I have a function which is f=x^4-8x^3+24^2-32x.
I need to find the turning points (i.e. the maximum or minimum of the curve) using the inbuilt command 'fsolve'.
Now, I know that the turning point is x=2 because I worked it out manually by finding the first derivative of f and making it equal to zero, but when I tried doing it on matlab using fsolve I didn't manage it. I did this:
x=sym('x');
f=x^4-8*x^3+24*x^2-32*x;
f1=diff(f,x,1)
and I don't know how to continue from there (my approach is most probably wrong as I've been viewing the problem from a mathematical point of view)
Anyone know how I can write the code please?