Warning: Explicit solution could not be found. In solve at 81 ans = [ empty sym ]
Show older comments
Hello,
I have question about function solve. I would like to find r3. I have function like that:
f =1/(1/hext + r3/(hint*r1) + (r3*log(r2/r1))/k1 + (r3*log(r3/r2))/k2) - v
And i tried to do it like that:
>> syms r1 r2 r3 hint hext k1 k2 v
>> f = -v + 1/(((r3/(hint*r1))+(r3*log(r2/r1)/k1))+(r3*log(r3/r2)/k2)+(1/hext))
f = 1/(1/hext + r3/(hint*r1) + (r3*log(r2/r1))/k1 + (r3*log(r3/r2))/k2) - v
>> solve (f, r3)
Warning: Explicit solution could not be found.
> In solve at 81
ans =
[ empty sym ]
Do you have any ideas what's wrong?
Answers (3)
Roger Stafford
on 28 Jan 2017
Edited: Roger Stafford
on 28 Jan 2017
By a certain trick my ancient version of ‘solve’ can find the solution to your problem which involves the ‘lambertw’ function. Perhaps this will work with your version also. The equations x = log(r3) and r3 = exp(x) are equivalent. Therefore everywhere in f that r3 occurs replace it with exp(x) and in log(r3/r2) replace that with the equivalent (x-log(r2)). You should then get this:
f = -v+1/(1/hext+exp(x)/(hint*r1)+(exp(x)*log(r2/r1))/k1+(exp(x)*(x-log(r2)))/k2);
Then solve for x. If you get a solution, as I did, then you can get an expression for r3 by taking the exponential function of x: r3 = exp(x).
In general, however, you should realize that there are a great many equations which ‘solve’ cannot find explicit solutions for. That is to be expected. Seeing the message “Warning: Explicit solution could not be found” does not mean that an error was made. It may simply be something ‘solve’ cannot find a solution to. Perhaps none is known in all of mathematics.
1 Comment
Roger Stafford
on 28 Jan 2017
For the expression
f = -v+1/(1/hext+exp(x)/(hint*r1)+(exp(x)*log(r2/r1))/k1+(exp(x)*(x-log(r2)))/k2)
I obtained the rather horrendous solution
x = lambertw(exp(-(-k1*k2-hint*r1*k2*log(r2)+hint*r1*k2*log(r1)+hint*r1*k1*log(r2))/k1/hint/r1)/v/hext*k2*(hext-v))-1/hint/r1*k2-1/k1*k2*log(r2)+1/k1*k2*log(r1)+log(r2)
Its ‘pretty’ version is:
lambertw(
- k1 k2 - hint r1 k2 log(r2) + hint r1 k2 log(r1) + hint r1 k1 log(r2)
exp(- ----------------------------------------------------------------------)
k1 hint r1
k2 k2 log(r2) k2 log(r1)
k2 (hext - v)/(v hext)) - ------- - ---------- + ---------- + log(r2)
hint r1 k1 k1
Remember, however, that to get the solution for r3 you must take r3 = exp(x).
Ma mate
on 30 Jan 2017
0 votes
Categories
Find more on Utilities for the Solver in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!