can't solve an equation
Afficher commentaires plus anciens
Hello,
I'm trying to solve this equation:
Fun=@(T) 1-exp(-n.*S.*( integral(@(T) exp(-E./(k.*T)),Ti,T)) ) ;
Where E=1; k=8.6e-5; n=10; S=1e12; Ti=300;
For T=300:500, this function changes from Fun= [0:1]. So, this function has real values from 0 to 1 in this range of T. However, the matlab can solve this equation for only the values in the range of [0:0.49]. If, for example, Fun=0.5 or 0.6....0.99, the MATLAB gives: "Warning: Explicit solution could not be found."
Here is the details of my code:
The solution of the integral in the equation is given by:
(T.*exp(-E./(k.*T))- ( (E./k).*expint(E./(k.*T)) )) - (Ti.*exp(-E./(k.*Ti))- ( (E./k).*expint(E./(k.*Ti)) ))
So, the final form of the equation will be given as:
fun=1-exp(-n.*S.*( ((T.*exp(-E./(k.*T))- ( (E./k).*expint(E./(k.*T)) )) - (Ti.*exp(-E./(k.*Ti))- ( (E./k).*expint(E./(k.*Ti)) ))))) ;
Examples:
syms T
>> solve(fun==0.2)
ans =
345.05417496592632071516378454629
However,
solve(fun==0.5)
Warning: Explicit solution could not be found.
> In solve at 179
ans =
[ empty sym ]
can anyone help me in this?
Thank you
Réponse acceptée
Plus de réponses (1)
1 commentaire
SK
le 29 Sep 2014
welcome :)
Catégories
En savoir plus sur Numeric Solvers dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!