Filter löschen
Filter löschen

Solve a transcendental equation

8 Ansichten (letzte 30 Tage)
Dimitrios Anagnostou
Dimitrios Anagnostou am 4 Mai 2023
Beantwortet: Piyush Patil am 31 Mai 2023
I know it is simple but I am puzzled how to force Matlab to solve the following equation
to get
This is what I do (assuming and ; is the coefficient of static friction between a body and an incline plane and θ is the inclination angle):
syms theta mu_s positive
assume(theta > 0 & theta < pi/2)
eq = sin(theta) == mu_s*cos(theta);
sol = solve(eq, theta, 'Real', true, 'ReturnConditions', true, 'PrincipalValue', true);
simplify(sol.theta)
ans = 
Any ideas? Thank you very much!

Akzeptierte Antwort

Piyush Patil
Piyush Patil am 31 Mai 2023
Hello Dimitrios,
One way to force MATLAB to solve the given equation so that you can get the desired result is that try to rearrange the equation and then provide it to MATLAB.
You can write as
So your code will be -
syms theta mu_s positive
assume(theta > 0 & theta < pi/2)
% rearrange the equation
eq = tan(theta) == mu_s;
sol = solve(eq, theta, 'Real', true, 'ReturnConditions', true, 'PrincipalValue', true);
simplify(sol.theta)
By doing this, you will get solution as -
Hope this helps!

Weitere Antworten (0)

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by