Question: How to deal with very small number?

Hi, everyone, I am sorry that I have to post this question again since the last post sank and I did not give example at that time. In the example I post here, A[e,res1] and A[e,res2] are supposed to be the same theoretically. However, as I  used numeric solver (fsolve), they are 2 order different. Can anyone try the code and tell me what mistakes I made? I appreciate that.

 

> restart;
> with(PDEtools);
>
>
> # Electron velocity distribution:
> f[e] := A[e]*exp(-B[e]*(((1/2)*m[e]*v^2)^2+((1/2)*m[e]*v^2*m[e])*`ϖ`^2*lambda[e]^2)/T[e]^2);
> f[e, 1] := f[e]/A[e];
>
> f[e, 2] := (1/2)*f[e, 1]*m[e]*v^2;
> expr[e, 1] := `assuming`([4*Pi*(int(f[e, 1]*v^2, v = 0 .. infinity))], [positive]);
> expr[e, 2] := `assuming`([4*Pi*(int(f[e, 2]*v^2, v = 0 .. infinity))], [positive]);
> expr[e, lhs] := simplify(expr[e, 1]/expr[e, 2]);
> expr[e, rhs] := 1/T[e];
> eq[e, 1] := expr[e, lhs] = expr[e, rhs];
>
> # Constants:
> `ϖ` := 22*10^6;
> T[e] := (3*1.6)*10^(-19);
> lambda[e] := 0.1e-2;
> m[e] := 9.1*10^(-31);
>
>
>
> eq[e, 2] := simplify(eq[e, 1]);
> B[e] := fsolve(eq[e, 2], B[e]);
> A[e, res1] := simplify(1/expr[e, 1]);
> A[e, res2] := simplify(T[e]/expr[e, 2]);
>

Download questions_2.mpl.txt

Please Wait...