Stationary point, local minimum, local maximum and inflection point
Show older comments
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 Comments
reman
on 3 Mar 2023
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'.
reman
on 3 Mar 2023
Find the stationary points of the function f(x, y) = 8x 2 + 6y 2 −2y 3 + 5 and its function values. with matlab code
reman
on 3 Mar 2023
Find the stationary points of the function f(x, y) = 8x 2 + 6y 2 −2y 3 + 5 and its function values. with matlab code
Accepted Answer
More Answers (1)
reman
on 3 Mar 2023
0 votes
Find the stationary points of the function f(x, y) = 8x 2 + 6y 2 −2y 3 + 5 and its function values. with matlab code
Categories
Find more on Calculus in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!