Root solving an integral of an exponential function
显示 更早的评论
syms x
fun = @(t) exp(t.^2)-1/t;
f=int(fun,0,x)
eqn= f==0.1
what root solving function would i use to solve this? It is said it has a root around x=0.5
1 个评论
In general, you could use fzero or vpasolve, but the integral of the function as you've written it will always be
, so there must be a typo somewhere.
syms x t
int(exp(t.^2)-1/t,0,x)
回答(1 个)
Perhaps this is what you meant,
syms x t
fun = (exp(t.^2)-1)/t;
f=matlabFunction( int(fun,0,x) - 0.1 );
x=fzero(f,0.5)
类别
在 帮助中心 和 File Exchange 中查找有关 Numerical Integration and Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
