Stationary point, local minimum, local maximum and inflection point

I am given some function of x1 and x2. Example f(x1,x2)=3x1^2+2x1x2+2x2^2+7. How can I find the stationary point, local minimum, local maximum and inflection point from that function using matlab? Please tell me the feature that can be used and the coding, because I am really new in this field. Thank you in advance.

3 Kommentare

syms x y
% Define the function f(x,y)
f = 8*x^2 + 6*y^2 - 2*y^3 + 5;
% Compute the partial derivatives of f(x,y) with respect to x and y
df_dx = diff(f, x);
df_dy = diff(f, y);
% Solve the system of equations df_dx = 0 and df_dy = 0 to find the stationary points
[stationary_points_x, stationary_points_y] = solve(df_dx == 0, df_dy == 0);
% Evaluate the function f(x,y) at the stationary points
stationary_point_values = subs(f, [x y], [stationary_points_x stationary_points_y])
% Display the results
disp("Stationary Points:")
disp([stationary_points_x stationary_points_y])
disp("Function Values at Stationary Points:")
disp(stationary_point_values)
Undefined function 'syms' for input arguments of type 'char'.
Stationary Points:
[ 0, 0]
Function Values at Stationary Points:
[ 5]
Unrecognized function or variable 'Stationary'.
Find the stationary points of the function f(x, y) = 8x 2 + 6y 2 −2y 3 + 5 and its function values. with matlab code
Find the stationary points of the function f(x, y) = 8x 2 + 6y 2 −2y 3 + 5 and its function values. with matlab code

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Jorge Herrera
Jorge Herrera am 27 Okt. 2015
Bearbeitet: Jorge Herrera am 27 Okt. 2015

0 Stimmen

Hello there! I recomend you to use diff and solve functions available in Matlab.
Check the examples to get more info about it, I suppose that you know the calculus theory, then solve the problem should be more less easy. If you have problems I'll help you.

Weitere Antworten (1)

reman
reman am 3 Mär. 2023

0 Stimmen

Find the stationary points of the function f(x, y) = 8x 2 + 6y 2 −2y 3 + 5 and its function values. with matlab code

Kategorien

Mehr zu Function Creation finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by