How do you use solve() to solve a complicated symbolic equation with one variable in terms of unknown constants?

1 visualización (últimos 30 días)
I have a a complicated symbolic equation that I would like to solve for x in terms of the letter-name constants. I received the following warning:
Warning: Unable to find explicit solution. For options, see help.
In solve (line 317)
solx =
Empty sym: 0-by-1
This is what I input:
syms x a b c d e f g
eqn = a*x - ((b^2)/2)*(a/b)*((1 - 4*exp(-2*(c-x)/b))^(-1)) - b*(a/b)*((1 - 4*exp(-2*(c-x)/b))^(-1))*(x+(((1/b)+d)^(-1))*log(1-(((b/(g*e))+(g/f))*((b/a)^(-0.5)))*((1-4*exp(-2*(c-x)/b))^(-0.5)))) - ((d*e)/2)*(((1/b)+((2*d)/b)+d^2)^(-1))*(1-2*exp((((1/b)+d)^(-1))*log(1-((b/(g*e))+(g/f))*((b/a)^(-0.5))*((1-4*exp(-2*(c-x)/b))^(-0.5)))*((1/b)+d)) + exp(2*(((1/b)+d)^(-1))*log(1 - ((b/g*e)+(g/f))*((b/a)^(-0.5))*((1-4*exp(-2*(c-x)/b))^(-0.5)))*((1/b)+d)) - (((1/b)+d)^(-1))*log(1 - ((b/(g*e))+(g/f))*((b/a)^(-0.5))*((1 - 4*exp(-2*(c-x)/b))^(-0.5)))*(1/b) - (2/b)*(((1/b)+d)^(-1)) + (2/b)*(((1/b)+d)^(-1))*exp((((1/b)+d)^(-1))*log(1 - ((b/(g*e))+(g/f))*((b/a)^(-0.5))*((1-4*exp(-2*(c-x)/b))^(-0.5)))) + (1/(2*b))*(((1/b)+d)^(-1)) - (1/(2*b))*(((1/b)+d)^(-1))*exp(2*(((1/b)+d)^(-1))*log(1-((b/(g*e))+(g/f))*((b/a)^(-0.5))*((1-4*exp(-2*(c-x)/b))^(-0.5)))*((1/b)+d)) == 0;
solx = solve(eqn, x)
Is there a way to proceed to a solution for x in terms of the letter-name constants? I have already used the simplify(eqn) command and several assume(x>0), assume(e>0), etc. parameters based on what I can assume from the physical constants, but to no avail.
  11 comentarios
Kelly Catlin
Kelly Catlin el 22 de Nov. de 2017
Editada: Kelly Catlin el 22 de Nov. de 2017
You are correct, LambertW does not appear to work with this equation. I attempted Newton's Method, instead, but of course having a largely symbolic equation makes numerical approximation difficult. Is there even a script for approximating with Newton's Method when constants are not explicitly defined?
Walter Roberson
Walter Roberson el 23 de Nov. de 2017
"Is there even a script for approximating with Newton's Method when constants are not explicitly defined?"
At that point what you are heading towards is doing a taylor series and solve()'ing what results.
In Maple the sequence would be
eqn3 := E+a*x-b+2*b*exp(-x*c)-b*exp(-2*x*c)-x*b/d-2*b*exp(-x*c)/(d*c)+2*b/(d*c)-b/((2*d)*c)+b*exp(-2*x*c)/((2*d)*c);
convert(taylor(eqn3, x = 0, 5), polynom);
solve(%);
simplify([allvalues](%),size) assuming nonnegative;
which would get you a wall of about 75 lines of unreadable closed-form solution. And since this is only degree 5 approximation, the approximation to the exponential is not going to be all that good, especially further away from x = 0. You cannot go for any higher degree because you would get a quintic or higher degree, for which there are no closed form solutions. Even degree 4 should only be treated as a vague approximation, perhaps a starting point for numeric solutions.

Iniciar sesión para comentar.

Respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by