A problem to be solved using integration by parts. Assume all functions of the form $(0,1)\to\mathbb{R}$. Given that
$$
f(x) - \lambda_1 f''(x) = 0
$$
and
$$
g(x) - \lambda_2 g''(x) = 0,
$$
for all $x \in (0,1)$.
Also, $$
f(0) = f(1),\qquad f'(0) = f'(1),\qquad g(0) = g(1),\qquad g'(0) = g'(1).
$$
Prove using integration by parts, that 
$$
\int_0^1 f(x)g(x) dx = 0
$$
when $\lambda_1 \ne \lambda_2$.
 A: You just have to do integration by parts twice.
Let $I=\int f(x)g(x)dx$
The first by parts with $u=f(x)$ and $v'=g(x)=\lambda_2g''(x)$ gives 
$$I=\lambda_2f(x)g'(x)-\int\lambda_2f'(x)g'(x)dx$$
Then by parts again with $u=f'(x)\implies u'=\frac{1}{\lambda_1}f(x)$ and $v'=g'(x)$ gives $$I=\lambda_2f(x)g'(x)-\lambda_2[f'(x)g(x)-\frac{1}{\lambda_1}\int f(x)g(x)dx]$$
Therefore $$I\left(1-\frac{\lambda_2}{\lambda_1}\right)=\lambda_2\left(f(x)g'(x)-f'(x)g(x)\right)$$
Now apply the limits and the required result follows immediately
A: From the equations
$$\int^1_0f(x)\,dx=\lambda_1\int^1_0f''(x)\,dx=\lambda_1(f'(1)-f'(0))=0\\\int^1_0g(x)\,dx=\lambda_2\int^1_0g''(x)\,dx=\lambda_2(g'(1)-g'(0))=0$$
Thus
$$\int^1_0f(x)g(x)\,dx=\int^x_0f(u)\,du\cdot g(x)\Big|^1_0-\int^1_0g'(x)\int^x_0f(u)\,du\,dx\\=\lambda_1(f'(1)-f'(0))g(1)-\lambda_1\int^1_0g'(x)(f'(x)-f'(0))\,dx\\=-\lambda_1\int^1_0g'(x)(f'(x)-f'(0))\,dx$$
Regarding the last integral 
$$\int^1_0g'(x)(f'(x)-f'(0))\,dx\\=\int^x_0(f'(u)-f'(0))\,du\cdot g'(x)\Big|^1_0-\int^1_0g''(x)\int^x_0(f'(x)-f'(0))\,du\,dx\\=(f(x)-f(0)-xf'(0))g'(x)\Big|^1_0-\int^1_0g''(x)(f(x)-f(0)-xf'(0))\,dx\\=(f(1)-f(0)-f'(0))g'(1)-\int^1_0g''(x)f(x)\,dx+f(0)\int^1_0g''(x)\,dx+f'(0)\int^1_0xg''(x)\,dx\\=-f'(0)g'(1)-\frac{1}{\lambda_2}\int^1_0g(x)f(x)\,dx+f'(0)g'(1)-f'(0)\int^1_0g'(x)\,dx\\=-\frac{1}{\lambda_2}\int^1_0g(x)f(x)\,dx$$
All in all we have
$$\int^1_0f(x)g(x)\,dx=\frac{\lambda_1}{\lambda_2}\int^1_0g(x)f(x)\,dx$$
Since $\lambda_1\neq\lambda_2$ by assumption the claim follows
$$\int^1_0f(x)g(x)\,dx=0$$
