Solve-Unable to find explicit solution
15 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Meng Lu
el 25 de Jun. de 2020
Comentada: Dyuman Joshi
el 1 de En. de 2024
Hi there,
I am tring to use the solve function to solve a pretty long equation but the system shoot me the warning that cannot find a explicit solution
clc,clear
syms A X Y E R n F M p
eq = p == (M*(exp(-A/X) - 1) - (exp(-A/X)*(M*(exp((A - R + E*n)/X) - 1)...
+ exp((A - R + E*n)/X)*((M*(exp(-E/X) - 1)*((exp(-E/X)*cos((pi*F)/180))^n - 1))...
/(exp(-E/X)*cos((pi*F)/180) - 1) + M*exp(-(E*n)/X)*cos((pi*F)/180)...
^n*(exp(-A/X) - 1))))/(exp(-R/X)*cos((pi*F)/180)^n + 1))/(M*(exp(-A/Y) - 1)...
- (exp(-A/Y)*(M*(exp((A - R + E*n)/Y) - 1) + exp((A - R + E*n)/Y)...
*((M*(exp(-E/Y) - 1)*((exp(-E/Y)*cos((pi*F)/180))^n - 1))...
/(exp(-E/Y)*cos((pi*F)/180) - 1) + M*exp(-(E*n)/Y)...
*cos((pi*F)/180)^n*(exp(-A/Y) - 1))))/(exp(-R/Y)*cos((pi*F)/180)^n + 1));
Q = rewrite(eq,'sincos')
solution = solve(Q,X)
I tried to rewirte the whole equation into trigonometric terms but still cannot solve this equation. My MATLAB version is R2018b
What else can I try?
2 comentarios
PIO MICHELE
el 1 de En. de 2024
Hi Meng,
I'm facing the same problem trying to solve a very long function.
Can I ask you how you switched from the symbolic solution to the numerical solution?
thank you,
Michele
Dyuman Joshi
el 1 de En. de 2024
Respuesta aceptada
darova
el 25 de Jun. de 2020
I think you can't find symbolical expression/solution for this equation. It's too complicated
Define all known constants/variables and use numerical approach (vpasolve or fsolve)
2 comentarios
John D'Errico
el 25 de Jun. de 2020
+1.
You can almost prove it will be too complicated to solve. That is, do the substitution in this problem of:
Z = exp(-1/X)
Then recognize that terms like exp(-A/X) will become Z^A. But then we will also have other polynomial like terms, Z^E, and Z^R. Finally, I even notice the term Z^(-(A - R + E*n)).
The point is, all of these exponents are completely unknown exponents. So you have a very complicated polynomial like problem, but with unknown, symbolic exponents on Z. Some of those exponents are positive, some may be negative. Since the exponents are completely symbolic, they may easily be non-integer exponents.
On top of all that, this is still a nasty looking mess of many such terms, but fundamentally rational polynomial-ish, except even if you know the values of the constants, the exponents will be just a list of real numbers with various signs.
Now, what do we know about polynomial equations? Even as simple a problem as one with higher degree than 4 will generally be unsolvable, unless you get very lucky that is. That goes back as far as Abel-Ruffini. And that applies to POSITIVE INTEGER exponents.
In this case of course, we have something much more complicated, because while it is polynomial-like (actually a rational polynomial, with terms in the numerator and denominator), we don't even get told what are the exponents of Z. We are not even told what degree the polynomial is, but a symbolic algebraic solution is requested?
Sure. That is gonna happen. Right after unicorns learn to fly. Hmm. Do unicorns know how to fly? Honestly, I don't really know, not until I see one.
If you supply value for ALL of the unknowns, as Darova says, then you can TRY to solve the problem. There will almost certainly be multiple solutions, many or most of them complex. A numerical solver will find only one of those solutions at a time, depending on the starting values provided.
Más respuestas (0)
Ver también
Categorías
Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!