Calculate the Taylor polynomial of a definite integral I want to determine the Taylor polynomial of degree 1 to $f$ where $x=0$
$$f(x)=\int_0^{\sin x} \frac{e^t}{1+t^3} \,dt$$
This is my attempt:
$$f'(x)=\frac{e^{\sin x}}{1+\sin^3 x}$$
$$P(x)=f(0)+f'(0)x$$
$$f(0)=\int_0^0 \frac{e^t}{1+t^3}\,dt=0$$
$$f'(0)=\frac{e^{\sin 0}}{1+\sin^3 0}=\frac{1}{1}=1$$
$$P(x)=0+1\cdot x=x$$
Is this correct if not, can you help me where I calculated wrong? :)
Many thanks
 A: You neglected the chain rule, thus:
\begin{align}
f(x) = y & =\int_0^{\sin x} \frac{e^t}{1+t^3} \,dt \\[8pt]
& =\int_0^u \frac{e^t}{1+t^3} \,dt \qquad \text{where } u = \sin x \\[8pt]
\frac{dy}{dx} & = \frac{dy}{du} \cdot \frac{du}{dx} \qquad \text{(This is the chain rule.)} \\[8pt]
& = \frac{e^u}{1+u^3} \cdot \cos x = \frac{e^{\sin x}}{1+(\sin x)^3} \cdot\cos x 
\end{align}
So $f'(0) = 1.$
Then
$$
P(x) = f(0) + f'(0)(x-0) = x.
$$
Forgetting the chain rule didn't upset the answer in this case because what you needed to multiply by is $1.$ But in some cases—all cases in which the thing to be multiplied by is not $1$—that will lead to a wrong answer.
A: You have
$$f(x)=\int_0^{a(x)} g(t) \, dt \implies f'(x)=g(a(x))\, a'(x)$$ by the fundamental theorem of calculus.
So, for your case
$$f'(x)=\frac{e^{\sin (x)}\cos (x)}{1+\sin^3(x)} $$
Now, it is a nice problem of series composition
$$\sin(x)=x-\frac{x^3}{6}+\frac{x^5}{120}-\frac{x^7}{5040}+O\left(x^9\right)$$
$$e^{\sin (x)}=1+x+\frac{x^2}{2}-\frac{x^4}{8}-\frac{x^5}{15}-\frac{x^6}{240}+\frac{x^7}{90}+\frac
   {31 x^8}{5760}+O\left(x^9\right)$$
$$\cos(x)=1-\frac{x^2}{2}+\frac{x^4}{24}-\frac{x^6}{720}+\frac{x^8}{40320}+O\left(x^{10}\right)$$
$$e^{\sin (x)}\cos (x)=1+x-\frac{x^3}{2}-\frac{x^4}{3}-\frac{x^5}{40}+\frac{7 x^6}{90}+\frac{31
   x^7}{720}+\frac{x^8}{630}+O\left(x^9\right)$$
$$1+\sin^3(x)=1+x^3-\frac{x^5}{2}+\frac{13 x^7}{120}-\frac{41 x^9}{3024}+O\left(x^{11}\right)$$
Long division to get
$$f'(x)=1+x-\frac{3 x^3}{2}-\frac{4 x^4}{3}+\frac{19 x^5}{40}+\frac{187 x^6}{90}+\frac{913
   x^7}{720}-\frac{839 x^8}{630}+O\left(x^9\right)$$ Integrate termwise
$$f(x)=x+\frac{x^2}{2}-\frac{3 x^4}{8}-\frac{4 x^5}{15}+\frac{19 x^6}{240}+\frac{187
   x^7}{630}+\frac{913 x^8}{5760}-\frac{839 x^9}{5670}+O\left(x^{10}\right)$$
