# If $\int_0^x\left(e^{-t^2}+\cos t\right)dt$ has the power series expansion $\sum_{n=1}^\infty a_n x^n$, then what is $a_5$ equal to?

If $\int_0^x\left(e^{-t^2}+\cos t\right)dt$ has the power series expansion $\sum_{n=1}^\infty a_n x^n$, then what is $a_5$ equal to?

I know that the Cauchy integral test says that the power series converges if the integral converges and diverges if integral diverges. But this is the test for convergence and divergence, how can i find the fifth term of series?

• Fix your title. Aug 22, 2016 at 17:27
• I've rewritten the title using latex. Please, check that this is what you were asking. Aug 22, 2016 at 17:29
• yes,Exactly this. Thank you @lisyarus Aug 22, 2016 at 17:37

Differentiating both sides, we obtain $e^{-x^2}+\cos x = \sum\limits_{n=1}^\infty n a_n x^{n-1}$, and we are interested in the term $5 a_5 x^4$.
$$e^{-x^2}=1-x^2+\frac{x^4}{2}+O\left(x^6\right)$$
$$\cos x=1-\frac{x^2}{2}+\frac{x^4}{24}+O\left(x^6\right)$$
Finally, by the uniqueness of Taylor series, $\frac{1}{2}+\frac{1}{24}=5a_5$, which is easy to solve.