The MATLAB function to solve implicit equation
Ältere Kommentare anzeigen
Hi all,
Thanks once again to answer my questions every time.
I would like to request you tell me the best way to solve an Implicit equation in MATLAB.
Thank you very much
6 Kommentare
Dyuman Joshi
am 1 Mär. 2023
Please specify which equation you want to solve. It is difficult to suggest a proper working solution without adequate information.
Teja Reddy
am 1 Mär. 2023
Verschoben: John D'Errico
am 1 Mär. 2023
Torsten
am 1 Mär. 2023
Verschoben: John D'Errico
am 1 Mär. 2023
What is the correct form:
(m^2 / 3) * (a+a0)^2 * (2 * k1 + 3 * k2) = a0 * (2/v1 + 5/v2)
m^2 / (3 * (a+a0)^2) * (2 * k1 + 3 * k2) = a0 * (2/v1 + 5/v2)
m^2 / (3 * (a+a0)^2 * (2 * k1 + 3 * k2)) = a0 * (2/v1 + 5/v2)
?
Teja Reddy
am 1 Mär. 2023
Verschoben: John D'Errico
am 1 Mär. 2023
Torsten
am 1 Mär. 2023
Verschoben: John D'Errico
am 1 Mär. 2023
You open one time [ and close two times ] ] . Still unbalanced parenthesis.
Teja Reddy
am 1 Mär. 2023
Akzeptierte Antwort
Weitere Antworten (1)
John D'Errico
am 1 Mär. 2023
Bearbeitet: John D'Errico
am 1 Mär. 2023
Assuming your question is how to solve the equation
[m^2 /( 3(a+a0)^2)] * (2 * k1 + 3 * k2) = a0 * (2/v1 + 5/v2)
I removed the second closing ], since it seems to have been the spurious one. Even if not, the solution is still little different. Just use solve. This is just a simple polynomial equation at heart. And, you NEED to use * to multiply. MATLAB does not allow implicit multiplication. That is, 3(a+a0) is NOT seen as 3*(a + a0) in MATLAB. It is just a syntax error.
syms m a a0 k1 k2 v1 v2
EQ = [m^2 /( 3*(a+a0)^2)] * (2 * k1 + 3 * k2) == a0 * (2/v1 + 5/v2)
a0sol = solve(EQ,a0,'maxdegree',3)
Yes, the rsult is messy. But what do you expect from what is effectively a cubic polynomial? Not all problems have a nice simple solution. In fact, most implicit equations are written in that form because they do not have a simple solution, and worse yet, most implicit equations will have no algebraic solution at all.
1 Kommentar
Teja Reddy
am 1 Mär. 2023
Kategorien
Mehr zu Eigenvalue Problems finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
