solving a simple maths problem

10 ビュー (過去 30 日間)
Michael
Michael 2011 年 6 月 28 日
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!

回答 (2 件)

Paulo Silva
Paulo Silva 2011 年 6 月 28 日
syms x y z
solve('(exp(2*y + 2*z))*(exp(z)-1)-x','z')
  2 件のコメント
Michael
Michael 2011 年 6 月 28 日
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 2011 年 6 月 28 日
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

サインインしてコメントする。


Walter Roberson
Walter Roberson 2011 年 6 月 29 日
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.

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by