Find constant polynomial $g$ closest to $f= e^x$ using the inner product $\int_0^2 f(x)g(x) dx$

972 Views Asked by At

The inner product $(f,g) = \int_0^2 f(x)g(x) dx$. Let $f(x) = e^x$. Show that the constant polynomial $g$ nearest to $f$ is $g=1/2(e^2-1)$.

I know I need to take projections of $g$ onto $f$.

Let $g_p$ = $(g,f)f$ = ($\int_0^2 g(x)e^x dx$) $e^x$

Now what do I do?

Edit: Figured it out. see find linear polynomial g that is closest to f, where $f(x) = e^x$ and the distance between the two for a very similar problem

1

There are 1 best solutions below

1
On BEST ANSWER

You have to minimize the following

$$ f(A) = \int_{0}^{2}(e^x-A)^2dx . $$

One way to do this is to differentiate $f(A)$ with respect to $A$ and then solve $f'(A)=0$ for $A$

Added: If you want to use the projection method then the answer is

$$ \frac{(e^x,1)}{\sqrt{\int_{0}^{2}1.1 dx}}\frac{1}{\sqrt{2}} $$