Having trouble solving an equation

18 Ansichten (letzte 30 Tage)
Quinn
Quinn am 19 Nov. 2025 um 3:06
Kommentiert: Quinn am 20 Nov. 2025 um 0:32
I am still relatively new to Matlab. I am trying to solve an equation, and when I try to run the code, it doesn't produce an answer.
syms x
eqn = sqrt(((((26892/(x)^3)+(254.7/(x^2)))/2)^2)+(6111.5/((x)^3))^2) == 19000;
sol = solve(eqn, x);
What am I doing wrong?

Akzeptierte Antwort

Paul
Paul am 19 Nov. 2025 um 3:50
syms x
eqn = sqrt(((((26892/(x)^3)+(254.7/(x^2)))/2)^2)+(6111.5/((x)^3))^2) == 19000;
expand(eqn)
ans = 
solve is telling it can't find closed form expressions for the eqn
sol = solve(eqn, x)
sol = 
So it returns a solution as the roots of a polynomial. The values of these roots can be optained as follows
vpa(sol)
ans = 
Check
subs(eqn,ans)
ans = 
  1 Kommentar
Quinn
Quinn am 20 Nov. 2025 um 0:32
That did it. Thank you very much for the help!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

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

Community Treasure Hunt

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

Start Hunting!

Translated by