Using the Hessian Matrix to Determine the Nature of a Turning Point
6 views (last 30 days)
Show older comments
Suppose I have the equation y=x^2. How would I use the Hessian Matrix in an if-else clause to determine the nature of the turning point of y=x^2? Thanks
1 Comment
Answers (1)
Torsten
on 11 Jun 2022
If you mean the kind of extremum:
syms x
y = x^2;
dy = diff(y,x);
ddy = diff(dy,x);
sol = solve(dy==0);
ddy_at_critical_point = double(subs(ddy,sol));
maxima = sol(ddy_at_critical_point<0)
minima = sol(ddy_at_critical_point>0)
unknown = sol(ddy_at_critical_point==0)
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!