usn7564
- 61
- 0
Homework Statement
Determine the polynomial p of degree at most 1 that minimizes
\int_0^2 |e^x - p(x)|^2 dx
Hint: First find an orthogonal basis for a suitably chosen space of polynomials of degree at most 1
The Attempt at a Solution
I assumed what I wanted was a p(x) of the form
<br /> p(x) = \frac{<e^x, 1>}{<1,1>} + \frac{<e^x, x>}{<x,x>}x<br />
where the inner product is
<f, g> = \int_0^2 f(x)\bar{g(x)} dx
But this fails just for the first term, ie
\frac{<e^x, 1>}{<1,1>} = \frac{e^2-1}{2} does not coincide with the correct answer
Correct answer:
p(x) = 3x + \frac{1}{2}(e^2 - 7)