Integral involving derivatives of Airy functions I can see from WolframAlpha that
$$\int\mathrm{Ai}'(x)\mathrm{Bi}''(x)\,\mathrm{d}x = \frac{\mathrm{Ai}'(x)[x^{2}\mathrm{Bi}(x)+2\mathrm{Bi}'(x)]-x^{2}\mathrm{Ai}(x)\mathrm{Bi}'(x)}{4}.$$
I'm guessing this can be shown via repeated integration by parts and use of Airy's equation? I've given this multiple attempts but haven't really gotten anywhere. Has anyone got any thoughts about how to start off the calculation?
Just noticed that this solution can also be simplified using the fact that $W(\mathrm{Ai}(x),\mathrm{Bi}(x))=1/\pi$.
Any help/advice greatly appreciated. Thanks!
 A: It can indeed be shown using just integration by parts and the fact that $\operatorname{Ai}(x)$ and $\operatorname{Bi}(x)$ both satisfy the differential equation $$y''(x) -xy(x) =0. $$
$$ \begin{align} I &= \int \operatorname{Ai}'(x) \operatorname{Bi}''(x) \, dx \\ &= \int\operatorname{Ai}'(x) \, x \operatorname{Bi}(x) \, dx \tag{1}\\ &= \operatorname{Ai}'(x)  \operatorname{Bi}'(x) - \int \operatorname{Ai}''(x) \operatorname{Bi}'(x) \, dx \\ &= \operatorname{Ai}'(x)  \operatorname{Bi}'(x) - \int  x \operatorname{Ai}(x) \operatorname{Bi}'(x) \, dx \tag{2} \\ &= \operatorname{Ai}'(x)  \operatorname{Bi}'(x) - \frac{x^{2}}{2} \operatorname{Ai}(x)  \operatorname{Bi}'(x) + \frac{1}{2} \int x^{2} \operatorname{Ai}'(x)  \operatorname{Bi}'(x) \, dx + \frac{1}{2} \int x^{2} \operatorname{Ai}(x)  \operatorname{Bi}''(x) \, dx \end{align} $$
But $$ \small  \frac{1}{2} \int x^{2} \operatorname{Ai}'(x)  \operatorname{Bi}'(x) \, dx = \frac{x^{2}}{2} \operatorname{Ai}'(x) \operatorname{Bi}(x) -  \frac{1}{2}\int x^{2} \operatorname{Ai}''(x) \operatorname{Bi}(x) \, dx- {\color{red}{\int x \operatorname{Ai}'(x) \operatorname{Bi}(x) \, dx}} \tag{3} $$
Therefore, $$ \small \begin{align}  \color{red}{2I} &= \operatorname{Ai}'(x)  \operatorname{Bi}'(x) - \frac{x^{2}}{2} \operatorname{Ai}(x)  \operatorname{Bi}'(x) + \frac{x^{2}}{2} \operatorname{Ai}'(x) \operatorname{Bi}(x) + \frac{1}{2} \int x^{2} \left(\operatorname{Ai}(x) \operatorname{Bi}
''(x) - \operatorname{Ai}''(x) \operatorname{Bi}(x) \right)\, dx \\ &= \operatorname{Ai}'(x)  \operatorname{Bi}'(x) - \frac{x^{2}}{2} \operatorname{Ai}(x)  \operatorname{Bi}'(x) + \frac{x^{2}}{2} \operatorname{Ai}'(x) \operatorname{Bi}(x) + \frac{1}{2} \int x^{2} \underbrace{\left(\operatorname{Ai}(x) x \operatorname{Bi}(x) - x \operatorname{Ai}(x) \operatorname{Bi}(x)\right)}_{0}  \, dx \\   &= \operatorname{Ai}'(x)  \operatorname{Bi}'(x) - \frac{x^{2}}{2} \operatorname{Ai}(x)  \operatorname{Bi}'(x) + \frac{x^{2}}{2} \operatorname{Ai}'(x) \operatorname{Bi}(x) + C, \end{align} $$
and the result follows

$(1)$ Let $u = \operatorname{Ai}'(x)$ and $dv = x \operatorname{Bi}(x) \, dx$
$(2)$ Let $u = \operatorname{Ai}(x) \operatorname{Bi}'(x)$ and $dv = x \, dx$
$(3)$ Let $u = x^{2} \operatorname{Ai}'(x)$ and $dv= \operatorname{Bi}'(x) \, dx$
A: By Abel's identity we have $W(\text{Ai}(x),\text{Bi}(x))=\frac{1}{\pi}$ and both $\text{Ai}(x),\text{Bi}(x)$ are solutions of the differential equation $y''=xy$, hence the claim is equivalent to:
$$ \int \text{Ai}'(x)\, x\,\text{Bi}(x)\,dx = \frac{1}{2}\text{Ai}'(x)\text{Bi}'(x) -\frac{x^2}{4\pi}\tag{1}$$
or, by differentiating both sides, to:
$$ x \text{Ai}'(x)\text{Bi}(x) = \frac{x}{2}\left(\text{Ai}(x)\text{Bi}'(x)+\text{Ai}'(x)\text{Bi}(x)\right)-\frac{x}{2\pi}\tag{2} $$
that is a consequence of:
$$ \frac{1}{\pi} = \text{Ai}(x)\text{Bi}'(x)-\text{Bi}(x)\text{Ai}'(x).\tag{3} $$
A: There is a short algorithm that can produce this result.  First, of all, the expression $Ai'(x) Bi''(x)$ is holonomic (meaning: it satisfies a differential equation with polynomial coefficients). Computer algebra systems can find such a differential equation, the result is: $L: x^4 y'''' - 4x^3y''' -4(x^3-3)x^2 y'' - 2(x^3+12)xy' + (2x^3+24)y = 0$.
Next, there is a program (http://www.ccas.ru/sabramov/ps/avhfin.ps) which can decide if the anti-derivative of any solution $y$ of $L$ is a $\mathbb{C}(x)$-linear combination of $y, y', y'', \ldots$  (and if so, find it). Apply this program to $L$, then plug in $y = Ai'(x) Bi''(x)$, and you get the formula that WolframAlpha gave you.  I don't know if this is what WolframAlpha did, but it could have done it this way; the program is short and fast.
