This question concerns the inequality
\begin{equation}
\int_0^\pi \bigl( f(x) \bigr)^2 \d x \le \int_0^\pi \bigl(
f'(x)\bigr)^2 \d x\,.\tag{\(*\)}
\end{equation}
Show that \((*)\) is satisfied in the case \(f(x)=\sin nx\), where \(n\) is a positive integer.
Show by means of counterexamples that \((*)\) is not
necessarily satisfied if either \(f(0) \ne 0\) or \(f(\pi)\ne0\).
You may now assume that \((*)\) is satisfied for any (differentiable) function \(f\) for which \(f(0)=f(\pi)=0\).
By setting \(f(x) = ax^2 + bx +c\), where \(a\), \(b\) and \(c\) are suitably chosen, show that
\(\pi^2\le 10\).
By setting \(f(x) = p \sin \frac12 x + q\cos \frac12 x +r\), where \(p\), \(q\) and \(r\) are suitably chosen, obtain another inequality for \(\pi\).
Which of these inequalities leads to a better estimate for \(\pi^2\,\)?
Solution:
If \(f(x) = \sin nx\) then \(f'(x) = n \cos n x\) and so
\begin{align*}
&& LHS &= \int_0^\pi \sin^2 n x \d x \\
&&&= \left [ \frac{x+\frac1{2n}\sin 2n x}{2} \right ]_0^{\pi} \\
&&&= \frac{\pi}{2} \\
\\
&& RHS &= \int_0^{\pi} n^2 \cos^2 n x \d x \\
&&&= n^2 \left [ \frac{\frac{1}{2n}\sin 2n x + x}{2} \right]_0^{\pi} \\
&&&= n^2\frac{\pi}{2} \geq LHS
\end{align*}
[\(f(0) = 0, f(\pi) \neq 0\)] Suppose \(f(x) = x\) then \(f'(x) = 1\) and \(LHS = \frac{\pi^3}{3} > \pi = RHS\).
[\(f(0) \neq 0, f(\pi) = 0\)] Suppose \(f(x) = \pi - x\) then \(f'(x) = -1\) and \(LHS = \frac{\pi^3}{3} > \pi = RHS\)
Suppose \(f(x) = x(\pi - x)\) then \(f'(x) = \pi - 2x\) and so
\begin{align*}
&& \int_0^\pi x^2(\pi-x)^2 \d x &\leq \int_0^\pi (\pi-2x)^2 \d x \\
\Leftrightarrow && \left [\pi^2 \frac{x^3}{3} - 2\pi \frac{x^4}{4} + \frac{x^5}{5} \right]_0^{\pi} &\leq \left [ \pi^2x - 4\pi \frac{x^2}{2} + \frac{4x^3}{3} \right]_0^{\pi} \\
\Leftrightarrow && \pi^5 \left (\frac13 - \frac12+\frac15 \right) &\leq \pi^3 \left ( 1 - 2+\frac43 \right) \\
\Leftrightarrow && \pi^2 \frac{1}{30} &\leq \frac13 \\
\Leftrightarrow && \pi^2 &\leq 10
\end{align*}
Suppose \(f(x) = p\sin \tfrac12 x + q \cos \tfrac12 x + r\), so \(f(0) = q + r\) and \(f(\pi) = p + r\), so say \(p = q = 1, r = -1\)
\begin{align*}
&& LHS &= \int_0^{\pi} \left ( \sin \tfrac12 x + \cos \tfrac12 x-1\right)^2
\d x \\
&&&=\int_0^\pi \left ( \sin^2 \tfrac12 x + \cos^2 \tfrac12 x+1-2\sin \tfrac12 x - 2\cos \tfrac12 x+ \sin x \right)\\
&&&= \left [2x + 4\cos \tfrac12 x - 4\sin \tfrac12 x - \cos x \right]_0^{\pi} \\
&&&= \left ( 2\pi -4+1 \right) - \left ( 4-1 \right) \\
&&&= 2\pi -6\\
\\
&& RHS&= \int_0^{\pi} \left ( \tfrac12 \cos \tfrac12 x -\tfrac12 \sin \tfrac12 x\right)^2 \d x \\
&&&= \int_0^{\pi} \left ( \tfrac14 \cos^2 \tfrac12 x +\tfrac14 \sin^2 \tfrac12 x-\tfrac14 \sin x\right) \d x \\
&&&= \frac{\pi}{4} - \frac12 \\
\Rightarrow && 2\pi -6 &\leq \frac{\pi}{4} - \frac12 \\
\Rightarrow && \frac{7\pi}{4} &\leq \frac{11}{2} \\
\Rightarrow && \pi &\leq \frac{22}{7}
\end{align*}
\(22^2/7^2 = 484/49 < 10\) therefore \(\pi \leq \frac{22}{7}\) is the better estimate.