A guide to justify the calculation of $\operatorname{Ai}'(0)$: differentiation under the integral sign I would like to know how to justify rigorously that $$-\frac{1}{\pi}\int_0^\infty t\sin\left(\frac{t^3}{3}+0\right)dt=\operatorname{Ai}'(0).\tag{1}$$
I've performed the differentiation under the integral sign for the integral representation of the Airy function $\operatorname{Ai}(x)$ and with the help of Wolfram Alpha online calculator:
int -1/pi t*sin(t^3/3)dt, from t=0 to infinity
I did a comparison. I've used the formula from this Wikipedia.

Question. I know that numerically my statement $(1)$ is right, but what details are required for a rigorous proof? I only request a guide with hints about what is required to check, even the convergence of the resulting improper integral. Thank you very much.

 A: By addition formula for $\cos$, we have $\cos(t^3/3 + xt) = \cos(t^3/3)\cos xt - \sin(t^3/3) \sin xt$. 
If we can prove that $f(x)=\int_0^{\infty} \cos(t^3/3) \cos xt dt$ is differentiable under integral sign, then the same argument will work for $g(x) = \int_0^{\infty} \sin(t^3/3)\sin xt dt$. For $g(x)$, we need to split the integral into $\int_0^1$ and $\int_1^{\infty}$ due to the singularity at $t=0$. 
Integration by parts ($u=(\cos xt)/t^2$, $dv=t^2\cos(t^3/3)dt$) --- my previous answer had an error in finding $du$ --- gives
$$
f(x) = \frac{\sin(t^3/3)\cos xt}{t^2} \Bigg\vert_0^{\infty} + \int_0^{\infty} \frac{  x t^2\sin xt+2t\cos xt}{t^4} \sin(t^3/3) dt.
$$
Let us consider $\lim_{x\rightarrow 0+} \frac{f(x)-f(0)}x$, since $x\rightarrow 0-$ can be treated the same way. So, let $x_n$ be a sequence of positive real numbers converging to $0$. Then
$$
\begin{align}
\frac{f(x_n)-f(0)}{x_n} &= \int_0^{\infty} \left( \frac{  x_n t^2\sin x_n t+2t(\cos x_n t -1)}{x_nt^4}\right) \sin (t^3/3) dt
\end{align}
$$
By the Mean Value Theorem, inside of the big paranthesis is bounded by $C/t^2$ uniformly in $n$, for some $C>0$. Thus, we can apply the Dominated Convergence Theorem to obtain
$$\begin{align}
\lim_{n\rightarrow\infty} \frac{f(x_n)-f(0)}{x_n}  &= \int_0^{\infty} \lim_{n\rightarrow\infty} \left( \frac{ x_n t^2\sin x_n t+2t(\cos x_n t -1)}{x_nt^4}\right) \sin (t^3/3) dt < \infty.\end{align}
$$
Thus, the results are the same with $x=0$ plugged in to the expression of $f'$ after differentiated under integral. 
Let $g(x)=g_1(x)+g_2(x)$ where the integral is performed as $\int_0^1$ for $g_1$ and $\int_1^{\infty}$ for $g_2$. Then $g_1'$ under integral sign is justified by the Dominated Convergence Theorem without resorting to the integration by parts. We treat $g_2$ with the integration parts.
Integration by parts ($u=(\sin xt)/t^2$, $dv=t^2\sin(t^3/3)$) gives
$$
g_2(x) = \frac{-\cos(t^3/3)\sin xt}{t^2} \Bigg\vert_1^{\infty} + \int_1^{\infty} \frac{xt^2\cos xt-2t\sin xt}{t^4} \cos(t^3/3) dt.
$$
Let us consider $\lim_{x\rightarrow 0+} \frac{g_2(x)-g_2(0)}x$, since $x\rightarrow 0-$ can be treated the same way. So, let $x_n$ be a sequence of positive real numbers converging to $0$. Then
$$
\begin{align}
\frac{g_2(x_n)-g_2(0)}{x_n} &= \cos(1/3)\frac{\sin x_n}{x_n}+\int_1^{\infty} \left( \frac{x_nt^2\cos x_nt - 2t\sin x_n t}{x_nt^4}\right) \cos (t^3/3) dt
\end{align}
$$
By the Mean Value Theorem, inside of the big paranthesis is bounded by $C/t^2$ uniformly in $n$, for some $C>0$. Thus, we can apply the Dominated Convergence Theorem to obtain
$$\begin{align}
\lim_{n\rightarrow\infty} \frac{g_2(x_n)-g_2(0)}{x_n}  &= \cos(1/3)\frac{\sin x_n}{x_n}+  \int_1^{\infty} \lim_{n\rightarrow\infty} \left( \frac{x_nt^2\cos x_nt - 2t\sin x_n t}{x_nt^4}\right) \cos (t^3/3) dt\\
&= \cos(1/3) + \int_1^{\infty} \left(\frac1{t^2}-\frac2{t^2}\right)\cos(t^3/3)dt\end{align}
$$
Thus, the results are the same with $x=0$ plugged in to the expression of $g_2'$ after differentiated under integral. In fact, integration by parts ($u=1/t $, $dv=t^2\sin(t^3/3)dt$)
$$
\int_1^{\infty} t\sin(t^3/3)  dt=\cos(1/3) + \int_1^{\infty} \left(-\frac1{t^2} \right)\cos(t^3/3)dt.
$$
A: We shall prove a more general result. Let $\varphi\in C^{(1)}[0,\infty) \land \big(|\varphi(t)|<1,\,\forall t\in[0,\infty)\big)$. Let $f(t,x) = \varphi\big(\frac{t^3}3+xt\big)$. We will show the differentiation under the integral works for all $x\ge 0$. $I(x)=\int_0^\infty f(t,x)dt$. We need to show 
$$\lim_{\delta\to 0}\int_0^\infty \frac{f(t,x+\delta)-f(t,x)}{\delta}dt = \int_0^\infty \lim_{\delta\to 0}\frac{f(t,x+\delta)-f(t,x)}{\delta}dt. \tag1$$
Define
\begin{align}
I_1(x) &:= \int_0^1\varphi\big(\frac{t^3}3+xt\big)\,dt \\
I_2(x) &:= \int_1^\infty\varphi\big(\frac{t^3}3+xt\big)\,dt
\end{align}
Consider $I_2$ first.
Let $u:=\frac{t^3}3+xt$. Surely $u>0$.
$$u<\frac{(t+x)^3}3\Longleftrightarrow (3u)^\frac13-x<t,\,\forall (t>1\land x\ge0). \tag2$$ 
Now $(u,x)$ is the independent variable, while $t$ becomes a function of $(u,x)$ and is denoted as $t(u,x)$.
$$1 = (t^2+x)\frac{\partial t}{\partial u}$$
$$0=t^2\frac{\partial t}{\partial x}+t+x\frac{\partial t}{\partial x}\Longleftrightarrow \frac{\partial t}{\partial u}=-\frac{t}{t^2+x}$$
$$\frac{\partial}{\partial x}\frac1{t(u,x)^2+x}=-\frac{2t\frac{\partial t}{\partial x}+1}{(t^2+x)^2}=\frac1{(t^2+x)^2}\frac{t^2-x}{t^2+x},$$
$$I_2(x)=\int_{\frac13+x}^\infty \frac{\varphi(u)}{t^2+x}du,$$
and
$$\frac{I_2(x+\delta)-I_2(x)}\delta=J_{2,1}-J_{2,2}$$
where
\begin{align}
J_{2,1}&:=\int_{\frac13+x}^\infty\varphi(u)g(u,x,\delta)du \\
J_{2,2}&:= \frac1\delta\int_{\frac13+x}^{\frac13+x+\delta}\frac{\varphi(u)}{t(u,x+\delta)^2+x+\delta}\,du,
\end{align}
where 
\begin{align}
g(u,x,\delta) &:= \frac1\delta\Big(\frac1{t(u,x+\delta)^2+x+\delta}-\frac1{t(u,x)+x}\Big) \\
&=\frac1{(t(u,x+\theta\delta)^2+x+\theta\delta)^2}\frac{t(u,x+\theta\delta)^2-(x+\theta\delta)}{t(u,x+\theta\delta)^2+(x+\theta\delta)}
\end{align}
for some function $\theta:=\theta(u,x,\delta)\in[0,1]$ with the second equation coming from Taylor expansion to the first order.
By inequality (2), for some positive function $C$, $\forall u>C(x)$,
$$t(u,x)^2+x>((3u)^\frac13-x)^2+x>u^\frac23,$$
$$0<\frac{t(u,x)^2-x}{t(u,x)^2+x}\le 1$$
$\forall u>C(u+\Delta),\ \forall \delta<\Delta$, for some $\Delta>0$,
$$0<g(u,x,\delta)<\frac1{u^\frac43}$$
So
$$\int_{C(x+\Delta)}^\infty g(u,x,\delta)\varphi(u)du<\int_{C(x+\Delta)}^\infty\frac1{u^\frac43}du<\infty$$ 
For $g(u,x,\delta)$ is continuous for $(u,\delta)$ on a compact set $\big[\frac13+x,C(x+\Delta)\big]\times[0,\Delta]$ and thus is bounded for any given $x>0$. 
Hence we can apply the Lebesgue's dominated convergence theorem to the integral $J_{2,1}$ as $\delta\to0$.
It is easy to see $J_{2,2}\to\frac{\varphi(\frac13+x)}{1+x}$ as $\delta\to0$ since the integrand is continuous on a compact set.
Now we consider 
$$\frac{I_1(x+\delta)-I_1(x)}{\delta}
=\int_0^1\frac1\delta\Big(\varphi\Big(\frac{t^3}3+x+\delta\Big)-\varphi\Big(\frac{t^3}3+x\Big)\Big)\, dt
=\int_0^1\varphi'\Big(\frac{t^3}3+x+\theta_1\delta\Big)\, dt
$$
for some function $\theta_1:=\theta_1(\frac{t^3}3+x,\delta)\in[0,1]$.
As $\varphi\in C^{(1)}$ on a compact set, it is uniformly bounded with respect to $(t,\delta)$ for any given $x$. We can thus apply again Lebesgue's dominated convergence theorem to the above integral.
Summing up equation (1) is proved.
A: If I understand your question correctly, you are asking how we derive the solution to Airy function as a complex Riemannian integral? 
If so, consider the Airy equation:
$$
(1) \qquad \frac{d^2 y}{dx^2} - xy = 0
$$ 
If we search for a contour integral solution in some unknown function, over some general contour $C$ in the complex plane. 
$$
y(x) = \int _C f(z) e^{xz} dz
$$
Inserting this into (1) we find: 
$$
\int _C ( z^2 -x) f(z) e^{xz} dz = 0
$$
We then integrate the negative bit by parts: 
$$
0 = - f(z)e^{xz} \bigg|_C + \int _C \bigg( z^2f + \frac{df}{dz}\bigg) e^{xz} dz 
$$
If we choose $f(z) = e^{- z^3/3}$ then we must insist that at the end points of the contour: 
$$
f(z)e^{xz} \bigg|_C  = e^{-z^3/3 + zx} \bigg|_C = 0
$$
There are then three regions $j_{1,2,3}$ for a positive cosine where the contour vanishes in the complex plane giving us three functions; one for each region. 
$$
f_j = \frac{1}{2\pi} i \int _{C_j} e^{- z^3/3+ xz} dz
$$
We define the Airy function as the above solution evaluated in one of these regions. The function is expressed as: 
$$
\operatorname{Ai}(x) = \frac 1 \pi \int ^\infty_0 \cos (  z^3/ + xz) dz = \frac {1}{2\pi} \int ^\infty _0 e^{i(z^3/3 _xz) }dz + \frac {1}{2\pi} \int ^\infty _ 0 e^{i(z^3/3 _xz)} dz
$$
Using Jordan's lemma rotate the integral anti-clockwise in the first and clockwise in the second integrand. This will result in: 
$$
\operatorname{Ai}(x) = \frac 1{2\pi} \int ^\infty _0 e^{ i (z^3/3 e^{3i\theta} + xze^{i\theta})} + \frac 1{2\pi} \int ^\infty _0 e^{- i (z^3/3 e^{-3i\theta} + xze^{-i\theta})} e^{-i\theta}dz
$$
We then tidy them exponents to converge: 
$$
\operatorname{Ai}(x) = \frac 1 \pi \Re \bigg( \int ^\infty_ 0 e^{\frac{z^3}{3} ( - \sin(3\theta) + i \cos (3\theta)) + xz(-\sin (\theta) + i \cos(\theta)) + i\theta} dz\bigg) 
$$
Now we use the following integral assured of the convergence: 
$$
\int ^\infty _0 z^\lambda \cos (\frac {z^3}{3} + xz)dz = \frac 1 3 \int ^\infty_0 z^{\frac{(\lambda - 2)}{3}} \cos( \frac 1 3 z + x z^{\frac 1 3})dz
$$
In specific response to your question, differentiating under the integral sign:
$$
\frac{d}{dx}\int ^b_a f(x,z) dz = \int ^b_a \frac{\partial f(x,z)}{\partial x} dz
$$
Cannot be used since we are not certain that the R.H.S exists. That is why we perform the rotation to assure us of an exponentially convergent integrand. 
