Please help!! Warning: Explicit solution could not be found

7 views (last 30 days)
Hi, I tried to solve the below equation in Matlab but it gave me no explicit solution. Please help explain to me.
solve(2*sqrt(t)*(exp(-0.05^2/(2.2925e-12*t))-(0.05*sqrt(pi)/(2*sqrt(2.2925e-12*t)))*erfc(0.05/(2*sqrt(2.2925e-12*t))))-0.97)
Warning: Explicit solution could not be found.
> In solve at 179
ans =
[ empty sym ]
Thanks.

Answers (2)

Star Strider
Star Strider on 2 Aug 2014
When I created an anonymous function from it and evaluated it numerically, it is constant with a value of -0.97:
Expr = @(t)sqrt(t).*(exp((-1.09051254089422e9)./t)-erfc(1.0./sqrt(t.*2.2925e-12).*(1.0./4.0e1)).*1.0./sqrt(t.*2.2925e-12).*4.43113462726379e-2).*2.0-9.7e1./1.0e2;
t = linspace(0,1000,1000);
y = Expr(t);
Ly = [min(y) max(y) max(y)-min(y)]

John D'Errico
John D'Errico on 2 Aug 2014
Star misses that this expression is not easy to evaluate for small t.
Well, think about the expression we have here. For example, inside, look at the first term. When t is as small as 1000,
exp((-1.09051254089422e9)./t)
What would you expect when t == 1000?
exp(-1.09e06)
is a small number. The other terms in the expression are equally strange for SMALL t. For larger t, things are better behaved. That is clear when you look more carefully at the expression.
In 100 digits of precision, I used HPF to evaluate it for various values of t.
t = hpf(1e10,100);
2*sqrt(t)*(exp(-0.05^2/(2.2925e-12*t))-(0.05*sqrt(pi)/(2*sqrt(2.2925e-12*t)))*(1-erf(0.05/(2*sqrt(2.2925e-12*t)))))-0.97
ans =
131611.1679415474972652817864554184049560224799782026217615695663050483589302071248793596089618628149
t = hpf(1e9,100);
2*sqrt(t)*(exp(-0.05^2/(2.2925e-12*t))-(0.05*sqrt(pi)/(2*sqrt(2.2925e-12*t)))*(1-erf(0.05/(2*sqrt(2.2925e-12*t)))))-0.97
ans =
-5687.559533083645762736832373592156758634552014801209197248134645087825861601907917013927457586499145
See that we have a sign change there, so I could easily enough solve for a solution. Bisection or the secant method would suffice, but then so would fzero.
fun = @(t) 2*sqrt(t)*(exp(-0.05^2/(2.2925e-12*t))-(0.05*sqrt(pi)/(2*sqrt(2.2925e-12*t)))*erfc(0.05/(2*sqrt(2.2925e-12*t))))-0.97;
fun(1e9)
ans =
-5687.6
fun(1e10)
ans =
1.3161e+05
t = fzero(fun,[1e9,1e10])
t =
1.2606e+09
fun(t)
ans =
3.4096e-12
fzero did pretty well here. If your goal is a better solution, vpasolve will suffice.
vpasolve(2*sqrt(t)*(exp(-0.05^2/(2.2925e-12*t))-(0.05*sqrt(pi)/(2*sqrt(2.2925e-12*t)))*erfc(0.05/(2*sqrt(2.2925e-12*t))))-0.97,1e10)
ans =
1260563972.8415626503609988124782
This is quite consistent with fzero.
That solve failed is no surprise however, as no analytical solution probably exists. Are you surprised at that? There are an immense number of simple expressions that will offer no analytical solution.

Community Treasure Hunt

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

Start Hunting!