1. Not finding help here? Sign up for a free 30min 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!

Quadratic least squares equation

  1. Dec 4, 2011 #1
    f(x) = –3√x, 1 ≤ x ≤ 4
    (a) Find the quadratic least squares approximating function g for the function f.

    g(x)=?
     
  2. jcsd
  3. Dec 4, 2011 #2

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    The best fit function is clearly g(x)=-3/sqrt(x). But I'm guessing you trying to fit a function that's doesn't have that form. What kind of function are you trying to fit and what's the definition of 'least squares fit'?
     
  4. Dec 4, 2011 #3
    Using g(x)= a0+a1x+a2x^2 when 1<x<4
    using intergral(f(x)-g(x)dx)
     
  5. Dec 4, 2011 #4
    If you could help that would be very much appreciated as I do not knw how to punch and chug that in an intergral.
     
  6. Dec 4, 2011 #5

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    I think you want to minimize the integral of (f(x)-g(x))^2 don't you? Put in your f(x) and your g(x). It's not a hard integral. Just square it out. It's just powers of x. Then try to minimize with respect to a0, a1 and a2.
     
  7. Dec 4, 2011 #6
    How do I minimize the a0,a1 and a2 I do not get that part
     
  8. Dec 4, 2011 #7

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    Use partial derivatives with respect to a0, a1 and a2. What should they be at a minimum? Didn't they teach you that part?
     
    Last edited: Dec 4, 2011
  9. Dec 4, 2011 #8
    Yes, but I missed the class. So could you tell me how to do that
     
  10. Dec 4, 2011 #9

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    What should the partial derivatives be at a minimum? Missing the class means i) you could try to find the method yourself by looking it up or reading a book or even better, ii) thinking about it yourself.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Quadratic least squares equation
  1. Least squares (Replies: 8)

  2. Least Squares (Replies: 3)

Loading...