Second linearly independent solution of Airy Differential equation The Airy differential equation is
$$
\frac{d^2y}{dx^2}=xy.
$$
After Fourier transforming the equation, we get
$$
y=\frac{1}{2\pi}\int_{-\infty}^{\infty}e^{i\left(kx+\frac{k^3}{3}\right)}dk.
$$
Here $k$ is real, but to evaluate the integral we can take $k$ to be complex variable.
We can see that if $\mathrm{Im}(k^3)>0$ then $e^{i\left(kx+\frac{k^3}{3}\right)}\to 0$. Take $k=re^{i\theta}$, then $k^3=r^3e^{3i\theta}$ and thus $\mathrm{Im}(k^3)=r^3\sin(3\theta)$. Therefore,
\begin{align}
\mathrm{Im}(k^3)>0 
& \implies 0+2n\pi<3\theta<(2n+1)\pi
\\ & \implies \frac{2n\pi}{3}<\theta<\frac{(2n+1)\pi}{3}
.
\end{align}
Thus, for










$0<\theta<\frac{\pi}{3}$
Region I


$\frac{2\pi}{3}<\theta<\pi$
Region II


$\frac{4\pi}{3}<\theta<\frac{5\pi}{3}$
Region III




we have $e^{i\left(kx+\frac{k^3}{3}\right)}\to 0$.
So we have to find the integral along real $k$ to find the solution.

For contour $C_1$ the vertical edge of the rectangle gives zero contribution to the integral as the length of the rectangle tends to $\infty$. So, we get the first solution $y_1(x)=\int_{-\infty}^\infty\cos(kx+\frac{k^3}{3})dk$.
But we know that a second order differential equation has two linearly independent solutions. We get one of the two solutions. After Fourier transforming the differential equation we have got that $y=\frac{1}{2\pi}\int_{-\infty}^{\infty}e^{i\left(kx+\frac{k^3}{3}\right)}dk$. That means the solution is the integral of the given function along $\mathrm{Re}(k)$. So it would give just one function $y_1(x)$. How would it give the another function? Please help me in figuring out how the second solution of the Airy differential equation can be determined?
 A: 
After Fourier transforming the equation, we get
$$
y=\frac{1}{2\pi}\int_{-\infty}^{\infty}e^{i\left(kx+\frac{k^3}{3}\right)}\mathrm dk.
$$

This is not quite right. When you Fourier transform $y''(x)=xy(x)$ into $y(x)=\int_{\mathcal C} \tilde y(k) e^{ikx}\mathrm dk$ (where for now I'm allowing an arbitrary contour $\mathcal C$), you obtain the simpler equation
\begin{align}
\tilde y'(k) &= ik^2\tilde y(k)
\\ \implies \quad
\tilde y(k) &= e^{\frac13 ik^3}\tilde y(0)
.
\end{align}
This comes out of standard Fourier tricks, including an integration by parts where you assume the boundary term is zero:
\begin{align}
y''(x) 
& = 
\int_{\mathcal C} \tilde y(k)  \frac{\mathrm d^2}{\mathrm dx^2}\left[e^{ikx}\right] \mathrm dk
\\ & =
-\int_{\mathcal C} k^2\tilde y(k)  e^{ikx}\mathrm dk
\\
x y(x) 
& = 
\int_{\mathcal C} \tilde y(k) x e^{ikx}\mathrm dk
 = 
\int_{\mathcal C} \tilde y(k)  \frac1i\frac{\mathrm d}{\mathrm dk}\left[e^{ikx}\right] \mathrm dk
\\ & =
\left. \frac1i\tilde y(k)  e^{ikx}\right|_{\partial \mathcal C}
+i\int_{\mathcal C}   \tilde y'(k)e^{ikx} \mathrm dk
.
\end{align}
This much is simple mechanical transformation, but the details of what the heck happened are often obscured by the rush of calculating everything, so let's see what is the structure and assumptions of this calculation:

*

*We assumed that the solution $y(x)$ admits a representation of the form $y(x)=\int_{\mathcal C} \tilde y(k) e^{ikx}\mathrm dk$.

*We further assumed that $\mathcal C$ and $\tilde y(k)$ are such that $\left. \frac1i\tilde y(k)  e^{ikx}\right|_{\partial \mathcal C}$ vanishes.

*Under those conditions, we derived that $\tilde y(k)$ must equal $e^{\frac13 ik^3}$, modulo an irrelevant global constant.

What I haven't done, though, is give any particular form for $\mathcal C$.

So, with that in hand, let's look at your particular solution, which is obtained from mine by setting the contour $\mathcal C$ along the real axis. Is it really true that
$$
\left. \frac1i\tilde y(k)  e^{ikx}\right|_{\partial \mathcal C}
=
\left. \frac1i e^{\frac13 ik^3}  e^{ikx}\right|_{\partial \mathcal C}
= 
0
$$
along this axis? This means, specifically, asking that
$$
\lim_{k_R\to \infty}
\lim_{k_L \to -\infty}
\left[
  e^{i\left(k_Rx+\frac13 k_R^3\right)} - e^{i\left(k_Lx+\frac13 k_L^3\right)}
  \right]
$$
must vanish, where the left and right limits must be taken independently. And this is... simply not true.
It is, mostly, close enough. Those exponentials become very rapidly oscillatory in the limit of large $k$, so in a sense they do average to zero, but that is not what the integration-by-parts argument required.
What we can do is say that the integral should actually go from $-\infty+i\epsilon$, down to $-\infty$, then along the real axis to $+\infty$, and then up to $+\infty+i\epsilon$. As you have shown, once you're off the real axis, you're in regions II and I, resp., and that allows the boundary term to vanish. This is the understanding that allows the plain Fourier-transform solution to make sense.
... but really, once you're there, you're better off understanding that the better contour is the one that goes properly into the valleys of regions I and II, going through the origin along the way.

So what happens with the second solution? This should now be fairly obvious, and it is very easy to construct: you simply choose any contour $\mathcal C$ which is geometrically independent from the first one and which connects any two of the valleys that you have shaded in red.
That said, you might not want any possible linearly independent solution $-$ it is also desirable to construct the canonical one, which is the one which is also real-valued for real $x$. To do this, you need to take a suitable symmetric combination of the two other geometrically-independent contours, i.e., the ones that connect regions II and III, and regions I and III. To see this in practice, see eq. (9.5.5) in the DLMF.
