L2-orthogonality Consider the following functions: 
$$
\psi_1(x) = \sinh(x)-\sin(x) \quad \quad\psi_2(x)=\cosh(x)-\cos(x)$$
$$\phi_a(x)=\psi_1(x)\psi_2(a)-\psi_1(a)\psi_2(x)$$
and define $\pi_k(x)=\phi_{a_k}(a_kx)$
where $a_k$ is a sequence such that $\phi'_{a_k}(a_k)=0=\phi'_{-a_k}(-a_k)$
I need to show that those functions are $L_2$-orthogonal
$\langle \pi_i,\pi_j \rangle =\delta_{i,j}=\int_0^1\pi_i(x)\pi_j(x)dx$
I am sitting at this problem for quite some time and tried to "brute-force" my way throug the calculation (applying partial integration).
Is there any quick way to see that those functions are orthogonal ?
 A: This can be seen by noticing that the zeroth and first derivatives of $\pi_i(x)$ are $0$ at $x=0$ and $x=1$, as well as the fact that $\pi_i^{(4)}(x)=a_i^4\ \pi_i(x)$. Let $\pi_i^{(-n)}$ denote the $n$th antiderivative of $\pi_i$. Then in particular $\pi_i^{(-4)}(x)=\frac{1}{a_i^4}\pi_i(x)$ (choose the antiderivative which satisfies this condition, this corresponds to choosing integration constants to be zero for the standard antiderivatives of trig functions). Then integration by parts four times gives
\begin{align}\int_0^1\pi_i(x)\pi_j(x)dx &= \pi_i(x)\pi_j^{(-1)}(x)\Big|_0^1-\int_0^1\pi_i'(x)\pi_j^{(-1)}(x)dx
\\
&= -\left(\pi_i'(x)\pi_j^{(-2)}(x)\Big|_0^1-\int_0^1\pi_i''(x)\pi_j^{(-2)}(x)dx\right)
\\
&= \pi_i''(x)\pi_j^{(-3)}(x)\Big|_0^1-\int_0^1\pi_i^{(3)}(x)\pi_j^{(-3)}(x)dx
\\
&= -\left(\pi_i^{(3)}(x)\pi_j^{(-4)}(x)\Big|_0^1-\int_0^1\pi_i^{(4)}(x)\pi_j^{(-4)}(x)dx\right)
\\
&= \frac{a_i^4}{a_j^4}\int_0^1\pi_i(x)\pi_j(x)dx
\end{align}
Thus, if $i\neq j$, the integral must be $0$ for equality to hold, since
$$\left(1-\frac{a_i^4}{a_j^4}\right)\int_0^1\pi_i(x)\pi_j(x)dx=0$$
and the factor in front is nonzero for $i\neq j$. As a result, $\pi_i$ and $\pi_j$ are orthogonal for $i\neq j$. Note that we did not require the particulars of the function, only its behavior at the boundaries and a differential equation it satisfies.
