an exercise ask me to calculate the Taylor term at $x = 0$ and degree four. I know how to take a derivative of an integral, but I'm having doubts about this one.
The function: $$\int_0^x e^{-t^2} dt $$
The derivative of this integral is $g'(x) = e^{-x^2}$. I know that I have to differentiate this further, but I don't get the correct result.
Thanks in advance.
Let \begin{equation*} g(x)=\int_{0}^{x}e^{-t^{2}}dt. \end{equation*}
The Taylor series of $g(x)$ at $x=0$, also called the Maclaurin series, is \begin{equation*} g(0)+\frac{g^{\prime }(0)}{1!}x+\frac{g^{\prime \prime }(0)}{2!}x^{2}+\frac{ g^{\prime \prime \prime }(0)}{3!}x^{3}+\frac{g^{(4)}(0)}{4!}x^{4}+\ldots \end{equation*}
Hence the term of degree 4 is $\dfrac{g^{(4)}(0)}{4!}$.
The differentiation can be carried out as follows. Your first evaluation is correct: $g^{\prime }(x)=e^{-x^{2}}$. Then we have $g^{\prime \prime }(x)=-2xe^{x^{2}}=-2xg^{\prime }(x)$. Differentiating it further yields $g^{(4)}(0)=0$, because
\begin{eqnarray*} g^{\prime \prime \prime }(x) &=&-2g^{\prime }(x)-2xg^{\prime \prime }(x)=-2g^{\prime }(x)+4x^{2}g^{\prime }(x) \\ && \\ g^{(4)}(x) &=&-2g^{\prime \prime }(x)+8xg^{\prime }(x)+4x^{2}g^{\prime \prime }(x) \\&=&12xg^{\prime }(x)+4x^{2}g^{\prime \prime }(x)=x\left( 12g^{\prime }(x)+4xg^{\prime \prime }(x)\right) . \end{eqnarray*} Thus $$\dfrac{g^{(4)}(0)}{4!}=0.$$