Can't solve an equation

2 views (last 30 days)
Lu
Lu on 19 Nov 2013
Commented: Walter Roberson on 19 Nov 2013
my code:
x=0:0.1:1
y=solve('(1-x)*(exp(-30800/(8.314*y)+10.29))*exp(-500*x^2/(8.314*y))+x*exp(-31680/(8.314*y)+10.58)*exp(-500*(1-x)^2/(8.314*y))=1','y')
result: y =
[ empty sym ]
How to get the result of y? what is the code?

Answers (1)

Walter Roberson
Walter Roberson on 19 Nov 2013
Try
solve((1-x).*(exp(-30800/(8.314.*y)+10.29)).*exp(-500.*x.^2./(8.314.*y))+x.*exp(-31680./(8.314.*y)+10.58).*exp(-500.*(1-x).^2/(8.314.*y))-1,'y')
Note: the roots are all near y=360 over that range of x.
  2 Comments
Lu
Lu on 19 Nov 2013
tried, still show y =
[ empty sym ]
Could you paste over the answers you get?
Walter Roberson
Walter Roberson on 19 Nov 2013
[360.0189174, 360.5289311, 360.9475087, 361.2600669, 361.4558870, 361.5286988, 361.4769992, 361.3040682, 361.0176997, 360.6296713, 360.1550304]
More generally,
-44000000 ./ (415700 .* RootOf(x * exp(38 * Z) + exp(559/880 + (1603/44) * Z + (25/22) * x * Z - (59/88) * x) - x * exp(559/880 + (1603/44) * Z + (25/22) * x * Z - (59/88) * x) - exp(48379/4400 - (25/44) * x^2 * Z + (59/176) * x^2 + (25/22) * x * Z - (59/88) * x + (63/44) * Z, Z)) - 245263)
Here, RootOf(f(Z),Z) means the values of Z such that f(Z) == 0.
The RootOf expression is transcendental and there is no closed form solution for it. You can subs() x values into it and then apply fzero() or fsolve() to each result.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!