error in approximation a monotonic function in L^1

83 Views Asked by At

I am trying to solve this problem, but I am getting an incorrect solution. Here is the problem and my approach:

Find the best $L^1$ linear approximation of $e^x$ on [0,1] i.e. minimize $\int_0^1|e^x-\alpha-\beta x| dx$

Assume that the function f(x) intersects the straight line at 2 points $x=x_1$ and $x=x_2$ such that $x_1<x_2$

The Error, $E$ with respect to the $L_1$ norm is given by: $$\int_0^1 |e^x-\alpha-\beta x| ~dx = \int_0^{x_1} (e^x-\alpha-\beta x)~dx+\int_{x_1}^{x_2} (-e^x+\alpha+\beta x)~dx+\int_{x_1}^{\beta} (e^x-\alpha-\beta x)~dx$$ After integrating, I get the following function for the error E: $E = 2e^{x_1}-2\alpha x_1+2\alpha x_2 - \beta x1^2-2e^{x_2}+\beta x_2^2-1+e-\alpha-\beta/2$ To find the minima: we take partial derivatives: $$\frac{dE}{d\alpha} = 0 \implies x_2-x_1 = 1/2$$ $$\frac{dE}{d\beta} = 0 \implies x_2^2-x_1^2 = 1/2$$. but the book gives a hint that $x_2+x_1 = 1 and x_2 - x_1 = 1/2$

1

There are 1 best solutions below

1
On BEST ANSWER

If $x_2-x_1 = \frac12$ then $x_2^2-x_1^2 = (x_2-x_1)(x_2+x_1) = \frac12$ is equivalent to $x_2+x_1 = 1$

The book may have wanted you to use Euler Lagrange equations?