필터 지우기
필터 지우기

Find critical points of parametric function

조회 수: 1 (최근 30일)
Elinor Ginzburg
Elinor Ginzburg 2024년 3월 16일
댓글: Elinor Ginzburg 2024년 3월 16일
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!

채택된 답변

Torsten
Torsten 2024년 3월 16일
이동: Torsten 2024년 3월 16일
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.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Polygons에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by