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 CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by