TITLE: Local maxima of Legendre polynomials
QUESTION [24 upvotes]: When I plotted the (normalized) Legendre polynoials, I couldn't help noticing that all the local maxima lay on a really nice curve:

What is the equation of the curve (and how can we arrive to that equation)?

REPLY [10 votes]: Estimates of the form $$(1-x^2)^{1/4}|P_n(x)|<Cn^{-1/2}\tag{A1}$$ (here and in the sequel $-1\le x\le 1$) have a long history. Stiltjes obtained (A1) with unspecified $C$ in 1890. Gronwall (1913) and Fejer (1925) had explicit constants in (A1).  Bernstein (1937) proved (A1) with sharp constant $C=\sqrt{2/\pi}$; his proof is presented in Orthogonal Polynomials by Szegő, section 7.3.
In terms of the $L^2$-normalized polynomials $\widetilde P_n=\sqrt{(2n+1)/2}\,P_n$, the sharp (Bernstein) form of (A1) becomes
$$(1-x^2)^{1/4}|\widetilde P_n(x)|\le \sqrt{\frac{2n+1}{\pi n}} \tag{A2}$$
where the right-hand side obviously approaches $\sqrt{2/\pi}$.
But the stronger and simpler inequality 
$$(1-x^2)^{1/4}|\widetilde P_n(x)| \le \sqrt{\frac{2}{\pi}} \tag{1}$$
is also true and is very tight. On the plot below, (A2) is in green while (1) is in red; the blue curve is $\widetilde P_9$.

Proof of (1).  Let's return to original Legendre polynomial $P_n$. In terms of $P_n$ (1) takes the form
$$(1-x^2)^{1/4}|P_n(x)|\le \frac{2}{\sqrt{\pi (2n+1)}} \tag2$$ 
Theorem 7.3.3 in Orthogonal Polynomials by Szegő (originally proved by Bernstein) is more precise than (A1). It says that 
$$(1-x^2)^{1/4}|P_n(x)| \le |P_n(0)|,\quad \text{if $n$ is even} \tag3$$
$$(1-x^2)^{1/4}|P_n(x)| < \frac{2}{\sqrt{(2n+1)^2+1}}|P_n'(0)|,\quad \text{if $n$ is odd} \tag4$$
Sketch of proof of (3)-(4). Let $u(\theta)=\sqrt{\sin\theta}P_n(\cos\theta)$ for $\theta\in [0,\pi/2]$. Check that 
$u''(\theta)+\varphi(\theta)u(\theta)=0$ where $\varphi(\theta)=(n+1/2)^2+1/(2\sin\theta)^2$. Show that $u^2+(u')^2/\varphi$ has positive derivative on the interval $(0,\pi/2)$. At $\theta=\pi/2$, either $u$ or $u'$ vanishes, and (3)-(4) follow. $\Box$
From the coefficients of Legendre polynomials we see
that 
$$|P_{2k}(0)|=\frac{(2k-1)!!}{(2k)!!} \tag5 $$
$$|P_{2k+1}'(0)|=\frac{(2k+1)!!}{(2k)!!} \tag6 $$
The case of $n=2k$ turns out to be easier. A refined version 
of Wallis' product formula,  proved by D.K. Kazarinoff in On Wallis' formula,
states 
$$\frac{(2k-1)!!}{(2k)!!} = \frac{1}{\sqrt{\pi(n+\theta)}},\quad 
\frac14<\theta<\frac12 \tag7 $$
From (5) and (7) we have 
$$|P_{2k}(0)|<\frac{1}{\sqrt{\pi(k+1/4)}} = \frac{2}{\sqrt{\pi (4k+1)}} $$
which in view of (3) yields (2).
Instead of referring to Kazarinoff's paper one can prove directly that 
$$\left(\frac{(2k)!!}{(2k-1)!!}\right)^2\frac{4}{4k+1} \searrow \pi \tag8$$
Indeed, the limit is $\pi$ by Wallis' formula, and to show that the left hand side is 
decreasing, one has to check that
$$ \left(\frac{2k+2}{2k+1}\right)^2\frac{4k+1}{4k+5}< 1 \tag9$$
Clearing the denominators in (9), one obtains 
$ (2k+2)^2 (4k+1)- (2k+1)^2(4k+5) = -1 <0$  which gives (9). 
We can expect the  case $n=2k+1$ to be harder, because  (4) is not sharp, unlike (3). 
And indeed, the combination of (4), (6), and  (7) does not yield (2).  Instead, 
we can use a monotonicity fact similar to (8), though less elegant:
$$\left(\frac{(2k)!!}{(2k+1)!!}\right)^2\frac{(4k+3)^2+1}{4k+3} \searrow \pi \tag{10}$$
Indeed, the limit is $\pi$ by Wallis' formula, and to show that the left hand side is 
decreasing, one has to check that
$$ \left(\frac{2k+2}{2k+3}\right)^2 \frac{(4k+7)^2+1}{4k+7}\frac{4k+3}{(4k+3)^2+1} < 1 \tag{11}$$
Clearing the denominators in (11), one obtains 
$$ (2k+2)^2((4k+7)^2+1)(4k+3)  -(2k+3)^2((4k+3)^2+1)(4k+7) = -(4k+5)^2-5<0$$
which gives (11). 
From (10) it follows that 
$$ \frac{(2k+1)!!}{(2k)!!}\frac{2}{\sqrt{(4k+3)^2+1}} < \frac{2}{\sqrt{\pi(4k+3)}} \tag{12}$$
Combining (6) and (12) we obtain
$$ \frac{2}{\sqrt{(4k+3)^2+1}}|P_{2k+1}'(0)| < \frac{2}{\sqrt{\pi(4k+3)}}$$
which in view of (4) yields  (2). $\Box$