Root solving an integral of an exponential function
Show older comments
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 Comment
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)
Answers (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)
Categories
Find more on Numerical Integration and Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!