Indeterminate Limit using Second Fundamental Theorem of Calculus I am trying to find $$\lim_{x\to 0}\frac{\int_0^x(x-t)\sin(t^2) \, dt}{\ln(1+x^4)}$$It seems that I am meant to use the 2nd Fundamental Theorem of Calculus to solve this, but I have never used it on an integral that has $x$ in it. Do I approach it any differently? Or am I on the wrong track entirely?
 A: $$\frac{\int_{0}^{x}(x-t)\sin(t^2)\,dt}{\log(1+x^4)}$$ is of the form $\frac uv=\frac 00$ if $x=0$. So, let us use L'Hospital rule considering $\frac {u'}{v'}$.
$$u=\int_{0}^{x}(x-t)\sin(t^2)\,dt \implies u'=\frac d {dx} \int_{0}^{x}(x-t)\sin(t^2)\,dt$$ The fundamental theorem of calculus gives $$\frac d {dx} \int_{0}^{x}(x-t)f(t)\,dt=\int_0^x f(t) \, dt$$ So, for the considered case $$u'=\int_0^x \sin(t^2) \, dt=\sqrt{\frac{\pi }{2}} S\left(\sqrt{\frac{2}{\pi }} x\right)$$ where appears the Fresnel sine integral.
On the other hand $$v=\log(1+x^4)\implies v'=\frac{4 x^3}{1+x^4}$$ All of that makes $$\frac {u'}{v'}=\frac{\sqrt{\frac{\pi }{2}} \left(1+x^4\right) S\left(\sqrt{\frac{2}{\pi }}
   x\right)}{4 x^3}$$
In the Wikipedia page, you will find the expansion (that converges for all $z$)
$$S(z)  =\int_0^z \sin(t^2)\,dt=\sum_{n=0}^{\infty}(-1)^n\frac{z^{4n+3}}{(2n+1)!(4n+3)}$$ Keeping the first term of the expansion, we then have $$S\left(\sqrt{\frac{2}{\pi }}
   x\right)=\frac{1}{3} \sqrt{\frac{2}{\pi }} x^3+O\left(x^4\right)$$ which makes $$\frac {u'}{v'}=\frac{\sqrt{\frac{\pi }{2}} \left(1+x^4\right) S\left(\sqrt{\frac{2}{\pi }}
   x\right)}{4 x^3} \sim \frac{\sqrt{\frac{\pi }{2}} \left(1+x^4\right) \frac{1}{3} \sqrt{\frac{2}{\pi }} x^3}{4 x^3}=\frac{1}{12} \left(1+x^4\right) $$ and, if $x \to 0$, the limit is $\frac{1}{12}$.
Added just for your curiosity
We could have done more since a simple integration gives $$u=\int_{0}^{x}(x-t)\sin(t^2)\,dt=\frac{1}{2} \left(\sqrt{2 \pi } x S\left(\sqrt{\frac{2}{\pi }} x\right)-\sin
   \left(x^2\right)\right)$$ So, using Taylor series around $x=0$ $$\frac uv=\frac{\frac{x^4}{12}-\frac{x^8}{336}+O\left(x^9\right)} {x^4-\frac{x^8}{2}+O\left(x^9\right)}=\frac{1}{12}+\frac{13 x^4}{336}+O\left(x^5\right)$$ which shows the same limit but also how it is approached.
Update
As @Vim commented, a pure Taylor approach could be used and this is much simpler than all the above. 
Around $t=0$, we have $$(x-t)\sin(t^2)=t^2 x-t^3-\frac{t^6 x}{6}+\frac{t^7}{6}+O\left(t^9\right)$$ $$u=\frac{x^4}{12}-\frac{x^8}{336}+O\left(x^{10}\right)$$
$$\frac uv=\frac{\frac{x^4}{12}-\frac{x^8}{336}+O\left(x^{10}\right)} {x^4-\frac{x^8}{2}+O\left(x^9\right)}=\frac{1}{12}+\frac{13 x^4}{336}+O\left(x^6\right)$$
A: \begin{align}
& \frac d {dx} \int_0^x (x-t)\sin(t^2)\,dt = \frac d {dx} \int_0^x x\sin(t^2)\,dt - \frac d {dx} \int_0^x \sin(t^2)\,dt \\[10pt]
= {} & \frac d {dx} \left( x \int_0^x \sin(t^2) \, dt \right) - \frac d {dx} \int_0^x t \sin(t^2) \, dt \tag 1
\end{align}
Then you have
$$
\frac d {dx} \int_0^x t\sin(t^2) \, dt = x\sin(x^2)
$$
and for the first term in $(1)$ above, use the product rule.
(After that you get a cancelation, and then you have a bit  more work to do, applying L'Hopital's rule at least one more time.)
A: This is easy if you observe that the integral in the question is the second anti-derivative of $f(x) = \sin x^{2}$. More formally if $f(0) = 0$ then we know that $$\int_{0}^{x}\left(\int_{0}^{t}f(u)\,du\right)dt = \int_{0}^{x}(x - t)f(t)\,dt\tag{1}$$ This means that if $f(x) = \sin x^{2}$ and $$F(x) = \int_{0}^{x}(x - t)\sin t^{2}\,dt$$ then $F''(x) = f(x) = \sin x^{2}$ and $F(0) = F'(0) = 0$. Now we have
\begin{align}
L &= \lim_{x \to 0}\dfrac{{\displaystyle \int_{0}^{x}(x - t)\sin t^{2}\,dt}}{\log(1 + x^{4})}\notag\\
&= \lim_{x \to 0}\dfrac{{\displaystyle \int_{0}^{x}(x - t)\sin t^{2}\,dt}}{x^{4}}\cdot\frac{x^{4}}{\log(1 + x^{4})}\notag\\
&= \lim_{x \to 0}\frac{F(x)}{x^{4}}\notag\\
&= \lim_{x \to 0}\frac{F'(x)}{4x^{3}}\text{ (via L'Hospital's Rule)}\notag\\
&= \lim_{x \to 0}\frac{F''(x)}{12x^{2}}\text{ (via L'Hospital's Rule)}\notag\\
&= \frac{1}{12}\lim_{x \to 0}\frac{\sin x^{2}}{x^{2}}\notag\\
&= \frac{1}{12}\notag
\end{align}
In general note that if $f(0) = 0$ and the anti-differentiation operator $J$ is defined by $$Jf(x) = \int_{0}^{x}f(t)\,dt\tag{2}$$ then $$J^{n}f(x) = \frac{1}{(n - 1)!}\int_{0}^{x}(x - t)^{n - 1}f(t)\,dt\tag{3}$$ so that $F(x) = J^{n}f(x)$ is a function such that $$F^{(n)}(x) = f(x), F(0) = F'(0) = \cdots = F^{(n - 1)}(0) = 0\tag{4}$$ The above result is easily proved via integration by parts.
