solving a simple maths problem

6 views (last 30 days)
Michael
Michael on 28 Jun 2011
Hey I'm looking for a solution to whats probably a fairly simple problem. Any help would be appreciated. I want to solve for z in the following: x = (exp(2y + 2z))*(exp(z)-1). I know it simplfies to x = exp(2y)*exp(2z) - exp(2y)*exp(z) but then not sure what to do. Thanks!

Answers (2)

Paulo Silva
Paulo Silva on 28 Jun 2011
syms x y z
solve('(exp(2*y + 2*z))*(exp(z)-1)-x','z')
  2 Comments
Michael
Michael on 28 Jun 2011
Thanks for the answer, but I'm not sure I understand the result. What does syms do? And how do I interpret the answer? It gives me a 3x1 sym object, but each entry within that object is empty. Is this a problem that is doable by hand?
Paulo Silva
Paulo Silva on 28 Jun 2011
doc syms
You got just one expression with 3 variables so unless you have more expressions or some restrictions to the values of the variables you won't get just a value for z, instead of get 3 possible expressions for z

Sign in to comment.


Walter Roberson
Walter Roberson on 29 Jun 2011
As Paulo noted, there are three values for z:
ln((1/6) * exp(-2*y) * ((8*exp(2*y) + 108*x + 12*3^(1/2) * (x*(4*exp(2*y) + 27*x))^(1/2)) * exp(4*y))^(1/3) + (2/3)*exp(2*y) / ((8*exp(2*y) + 108*x + 12*3^(1/2) * (x*(4*exp(2*y)+27*x))^(1/2)) * exp(4*y))^(1/3)+1/3)
ln((1/12)*(-4-(4*I)*3^(1/2))*exp(2*y) / ((8*exp(2*y)+108*x+12*3^(1/2)*(x*(4*exp(2*y)+27*x))^(1/2)) * exp(4*y))^(1/3)+1/3+(1/12)*exp(-2*y)*(-1+I*3^(1/2)) * ((8*exp(2*y)+108*x+12*3^(1/2)*(x*(4*exp(2*y)+27*x))^(1/2)) * exp(4*y))^(1/3))
ln((1/12)*(-4+(4*I)*3^(1/2))*exp(2*y) / ((8*exp(2*y)+108*x+12*3^(1/2)*(x*(4*exp(2*y)+27*x))^(1/2)) * exp(4*y))^(1/3)+1/3+(1/12)*(-1-I*3^(1/2))*exp(-2*y) * ((8*exp(2*y)+108*x+12*3^(1/2)*(x*(4*exp(2*y)+27*x))^(1/2)) * exp(4*y))^(1/3))
Sorry, the order of the terms is not exactly the same between the second and third: the only difference between the two is that the second has -1+I*3 where the third has -1-I*3 .
Over the range I tested, at least one of the three has real values, and possibly two of the three did over that range. I have not analyzed yet to establish whether any of the three produces strictly complex values... the trial plot I am doing is taking a long time on my home system.

Community Treasure Hunt

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

Start Hunting!