Matlab Taylor series

171 Views Asked by At

In matlab, given a function $f(x)$ let's say $f(x)=e^{2x}$

If we know $\int _0^a\:f(x)=0.4$ how can we calculate $a$ with a precision of three decimals.

I integrated the Taylor series of $f(x)$ in the interval $0,a$ made that a function $h(a)$ and solved the equation $h(a)-0.4=0$. By changing $n$ in the series (number of terms added together) $a$ will vary of course, but how do I make it so that it has a precision of three decimals