1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Orthogonal projecitons, minimizing difference

  1. Nov 30, 2013 #1
    1. The problem statement, all variables and given/known data
    Determine the polynomial p of degree at most 1 that minimizes

    [tex]\int_0^2 |e^x - p(x)|^2 dx[/tex]

    Hint: First find an orthogonal basis for a suitably chosen space of polynomials of degree at most 1


    3. The attempt at a solution

    I assumed what I wanted was a p(x) of the form
    [tex]
    p(x) = \frac{<e^x, 1>}{<1,1>} + \frac{<e^x, x>}{<x,x>}x
    [/tex]

    where the inner product is

    [tex]<f, g> = \int_0^2 f(x)\bar{g(x)} dx[/tex]

    But this fails just for the first term, ie

    [tex]\frac{<e^x, 1>}{<1,1>} = \frac{e^2-1}{2}[/tex] does not coincide with the correct answer


    Correct answer:
    [tex]p(x) = 3x + \frac{1}{2}(e^2 - 7)[/tex]
     
  2. jcsd
  3. Nov 30, 2013 #2

    Office_Shredder

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Do you understand why the hint says you should find orthogonal polynomials first? And do you know if 1 and x are orthogonal?
     
  4. Nov 30, 2013 #3
    For the first question, yeah I believe so. Thinking in 'normal' linear algebra with a vector u in R^3 the best approximation of that vector in any plane in R^3 will be the orthogonal projection of u onto that plane, and you need an orthogonal basis to find that. Applying the same principle here, or that's what I think anyway.
    As for the second, err, I automatically assumed so for whatever reason. Checking now I see that's clearly not the case. I suppose I have to tinker a bit to find a basis that's actually an orthogonal set. Perhaps the inner product shouldn't be what it is too.
     
    Last edited: Nov 30, 2013
  5. Nov 30, 2013 #4

    Office_Shredder

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    A good way to find an orthogonal set is to use Gram Schmidt orthogonalization. Admittedly in the two dimensional case you can just figure it out by staring for a while/solving explicitly the equation for two polynomials to be orthogonal, but it's good practice anyway, and you'll feel smarter for doing it :tongue:
     
  6. Nov 30, 2013 #5
    Obviously, Christ, should be the same as always except it's not a dot product anymore. Didn't feel like it was even part of my toolbox for some inexplicable reason.

    Should be able to figure out the rest now, thank you.
     
    Last edited: Nov 30, 2013
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted