Borrar filtros
Borrar filtros

Solve a transcendental equation

8 visualizaciones (últimos 30 días)
Dimitrios Anagnostou
Dimitrios Anagnostou el 4 de Mayo de 2023
Respondida: Piyush Patil el 31 de Mayo de 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!

Respuesta aceptada

Piyush Patil
Piyush Patil el 31 de Mayo de 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!

Más respuestas (0)

Categorías

Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by