Solve parametric equation with parameters

Hi, I have the following problem, in which a and b are constants (geometric parameters), phi is the variable (angle). Moreover, h and lbda are geometrical indicators depending on phi. U is the total elastic energy of the system, in which lbdan is the natural length (lbda>lbdan).
eqn1 represents the sationarity condition for U. It leads to lbda=lbdan or lbda'=0 (its derivative). By considering the last case, we have that tan(phi)=-(sqrt(3))/3.
clc; clear all; close all
syms lb a b phi k lbda_n
h = (lb^2 - a^2 - b^2 + 2*a*b*cos(phi))^1/2;
lbda = (lb^2 + a*b*(3*cos(phi) - sqrt(3)*sin(phi)))^(1/2);
dlbda_dphi = diff(lbda, phi);
% disp(dlbda_dphi)
d2_dlbda_dphi = diff(lbda, phi,2);
% disp(d2_dlbda_dphi)
assume (lbda > lbda_n)
U = (3*k*(lbda - lbda_n)^2)/2;
dU_dphi = diff(U, phi);
d2_dU_dphi = diff(U, phi,2);
% disp(dU_dphi)
eqn1=solve(dlbda_dphi==0,phi,'ReturnConditions',true);
I know analitically the solution of eqn1, how can I obtain the same result in matlab?
Is my script correct?
Thanks

2 comentarios

Ritam
Ritam el 16 de Abr. de 2026 a las 6:12
Could you please let me know what result you are expecting? It would also be helpful if you could briefly explain what each variable represents, and whether it is intended to be a constant or a variable. This additional context will help me verify whether the script is behaving as intended.
Gaetano Pavone
Gaetano Pavone hace alrededor de 16 horas
@Ritam I've edited my post with all info.

Iniciar sesión para comentar.

Respuestas (0)

Productos

Versión

R2022a

Etiquetas

Preguntada:

el 13 de Abr. de 2026 a las 15:35

Comentada:

el 20 de Abr. de 2026 a las 10:49

Community Treasure Hunt

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

Start Hunting!