Find critical points of parametric function

3 views (last 30 days)
Hi, I want to find the critical points and the value of the function at those critical points, of the following function:
where are positive constants. I tried using this code:
clear; clc; close all;
syms y w ws R L C;
y = ((w+ws)*(w^2+ws^2)*(L^2*C^3))/((w*R^2*C+(w^2*L*C-1)^2)*(ws*R^2*C+(ws^2*L*C-1)^2));
dy = diff(y,w);
critical_points = solve(dy == 0);
The critical points calculated:
root(C^2*L^2*z^6 + 2*C^2*L^2*ws*z^5 + 3*C^2*L^2*ws^2*z^4 + 2*C*L*z^4 + 4*C^2*L^2*ws^3*z^3 - 2*C*R^2*z^3 - C*R^2*ws*z^2 - 2*C*L*ws^2*z^2 - 3*z^2 - 4*C*L*ws^3*z - 2*ws*z + C*R^2*ws^3 - ws^2, z, 1)
root(C^2*L^2*z^6 + 2*C^2*L^2*ws*z^5 + 3*C^2*L^2*ws^2*z^4 + 2*C*L*z^4 + 4*C^2*L^2*ws^3*z^3 - 2*C*R^2*z^3 - C*R^2*ws*z^2 - 2*C*L*ws^2*z^2 - 3*z^2 - 4*C*L*ws^3*z - 2*ws*z + C*R^2*ws^3 - ws^2, z, 2)
root(C^2*L^2*z^6 + 2*C^2*L^2*ws*z^5 + 3*C^2*L^2*ws^2*z^4 + 2*C*L*z^4 + 4*C^2*L^2*ws^3*z^3 - 2*C*R^2*z^3 - C*R^2*ws*z^2 - 2*C*L*ws^2*z^2 - 3*z^2 - 4*C*L*ws^3*z - 2*ws*z + C*R^2*ws^3 - ws^2, z, 3)
root(C^2*L^2*z^6 + 2*C^2*L^2*ws*z^5 + 3*C^2*L^2*ws^2*z^4 + 2*C*L*z^4 + 4*C^2*L^2*ws^3*z^3 - 2*C*R^2*z^3 - C*R^2*ws*z^2 - 2*C*L*ws^2*z^2 - 3*z^2 - 4*C*L*ws^3*z - 2*ws*z + C*R^2*ws^3 - ws^2, z, 4)
root(C^2*L^2*z^6 + 2*C^2*L^2*ws*z^5 + 3*C^2*L^2*ws^2*z^4 + 2*C*L*z^4 + 4*C^2*L^2*ws^3*z^3 - 2*C*R^2*z^3 - C*R^2*ws*z^2 - 2*C*L*ws^2*z^2 - 3*z^2 - 4*C*L*ws^3*z - 2*ws*z + C*R^2*ws^3 - ws^2, z, 5)
root(C^2*L^2*z^6 + 2*C^2*L^2*ws*z^5 + 3*C^2*L^2*ws^2*z^4 + 2*C*L*z^4 + 4*C^2*L^2*ws^3*z^3 - 2*C*R^2*z^3 - C*R^2*ws*z^2 - 2*C*L*ws^2*z^2 - 3*z^2 - 4*C*L*ws^3*z - 2*ws*z + C*R^2*ws^3 - ws^2, z, 6)
I'm not sure how to interpret the results in critical_points. What is z? and why are they all the same? what did I miss?
Another this, is there any easy way to place them back into the function to calculate its value at those points? couldn't find anything useful in the documentation, but I'm still new, so probably just missed it.
Thank you so much for your time and attention!

Accepted Answer

Torsten
Torsten on 16 Mar 2024
Moved: Torsten on 16 Mar 2024
The critical points are solutions of a polynomial of degree 6 in z. There is no solution formula for roots of polynomials of degree > 4. Thus you have to give values to the other constants involved to get a numerical solution.

More Answers (0)

Products


Release

R2023b

Community Treasure Hunt

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

Start Hunting!