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)
ans = 

请先登录,再进行评论。

回答(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)
x = 0.4365

类别

在 帮助中心 和 File Exchange 中查找有关 Numerical Integration and Differential Equations 的更多信息

产品

版本

R2019a

标签

Community Treasure Hunt

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

Start Hunting!

Translated by