# Best approximation to $t^2$ in first-dgree polynmial in $L^1[0,1]$

Let $u(t)=t^2$. Find the best approximation $v(t)$ in the form of $v(t)= ct+d$ (with $c,d\in\mathbb{R}$) to $u(t)$ in $L^1[0,1]$.

So we need to find

$$\inf\limits_{c,d\in\mathbb{R}} \int_0^1 \left|t^2-ct-d\right|dt$$

I've tried to approach this problem from different angles: completing the square, taking derivatives $\frac{\partial}{\partial c}$ and $\frac{\partial}{\partial d}$, but nothing has been helpful so far.

Would appreciate a hint.

• Have you seen Chebyshev polynomials? – Mark Nov 27 '17 at 7:36
• See here for a solution (not a hint). – Mark Nov 27 '17 at 7:46
• Taking derivatives should work, but won't be pleasant (split your integral at roots of the polynomial and exhaust the cases of where those roots lie with respect to $[0,1]$) – user7530 Nov 27 '17 at 8:05

As user7530 commented, consider the roots $$t^2-ct-d=0 \implies t_{1,2}=\frac{1}{2} \left(c\pm\sqrt{c^2+4 d}\right)$$ So $$I=\int_0^1 \left|t^2-ct-d\right|\,dt=\int_0^{t_1}(t^2-ct-d)\,dt-\int_{t_1}^{t_2}(t^2-ct-d)\,dt+\int_{t_2}^{1}(t^2-ct-d)\,dt$$
Compute each of these three integrals; for sure, the formulae are not the most pleasant but the total is quite nice $$I=\frac{1}{3} c^2 \sqrt{c^2+4 d}+\frac{4}{3} d \sqrt{c^2+4 d}-\frac{c}{2}-d+\frac{1}{3}$$ Now, compute $\frac{\partial I}{\partial c}$ and $\frac{\partial I}{\partial d}$ which, after simplication, are nice and simple. Set these equal to $0$ and solve.
• Can you please clarify how do we know that $t^2-ct-d>0$ on $[0,t_1]$ and $[t_2, 1]$, and $t^2-ct-d<0$ on $[t_1,t_2]$? – sequence Nov 27 '17 at 9:01
• Consider $y=ax^2+bx+c=a(x-r_1)(x-r_2)$ between the roots $y$ has the same sign as $a$. Here, $a=1$. Do you see that ? – Claude Leibovici Nov 27 '17 at 9:28
• Between the roots, $x>r_1$ and $x< r_2$, correct? Then $\mbox{sgn}[(x-r_1)(x-r_2)]=-\mbox{sgn}(a)$ I think. – sequence Nov 27 '17 at 11:48
• So I guess it's the opposite - the sign is the sign of $a$ before and after the roots, and -sign between the roots. So it's clear now. Thanks! @ClaudeLeibovici – sequence Nov 27 '17 at 12:15