Using the Hessian Matrix to Determine the Nature of a Turning Point

6 views (last 30 days)
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

Answers (1)

Torsten
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)
maxima = [ empty sym ]
minima = sol(ddy_at_critical_point>0)
minima = 
0
unknown = sol(ddy_at_critical_point==0)
unknown = [ empty sym ]

Categories

Find more on Mathematics in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!