Consider the function:
f(x) = x^2* e^(-x)
.
I want to find the point that makes the derivative of this function zero. My code is:
syms xf=(x.^2).*exp(-x);k=diff(f);a = @(x) k;b=fzero(a,0,1000)
I am getting this error:
"Function value at starting guess must be finite and real."
What do you think it is wrong?
Best Answer