Results 1 to 5 of 5

Math Help - Least squares approximation

  1. #1
    Newbie
    Joined
    May 2011
    Posts
    3

    Least squares approximation

    First, some definitions:
    The least squares approximation of a function f is a function \phi\epsilon\theta_n such as:
    ||f-\phi||\le||f-\phi_n||, for every \phi_n\epsilon\theta_n.
    Also: ||u||=(\int_R|u(t)|^2d\lambda t)^{1/2}

    Now the problem:
    Let's consider \theta_n a class of approximations with the following properties:
    - all functions \phi \in \theta_n are defined on a symmetric interval [-a, a];
    - if \phi(t)\in\theta_n, then \phi(-t)\in\theta_n;
    Consider d\lambda t=\omega(t)dt, where \omega is an even function.
    Prove that if f is an even function on [-a, a], its least squares approximation \phi\epsilon\theta_n is even.

    My attempt of a solution started by trying to prove that the approximation is a linear combination of even functions. So we consider an orthogonal basis \lbrace\pi_j\rbrace_{j=1}^n for the given class of approximations. In this case, the least squares approximation is:
    \phi=\sum_{j=1}^nc_j*\pi_j, where: c_j=(\pi_j,f)/(\pi_j,\pi_j)
    (u,v) is the dot product of functions u and v. More precisely:
    (u,v)=\int_{-a}^a u(t)v(t)\omega(t)dt
    Using this formula and the hypothesis, it can be proven that if \pi_j is an odd function, then c_j=0, because (\pi_j,f) is the integral of an odd function on a symmetric interval.
    This way, we eliminate from the approximation \phi all the odd basis functions. So now \phi is a linear combinations of even functions and functions that are neither even, nor odd. The even functions are good, because a linear combination of even functions is also an even function. But what happens when the basis function \pi_j is neither even, nor odd? I tried decomposing \pi_j in combinations of even and odd functions, but this approach does not seem to lead anywhere...

    Any help would be appreciated.
    Last edited by Anomander; May 22nd 2011 at 07:05 AM.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Opalg's Avatar
    Joined
    Aug 2007
    From
    Leeds, UK
    Posts
    4,041
    Thanks
    7
    Quote Originally Posted by Anomander View Post
    First, some definitions:
    The least squares approximation of a function f is a function \phi\epsilon\theta_n such as:
    ||f-\phi||\le||f-\phi_n||, for every \phi_n\epsilon\theta_n.
    Also: ||u||=(\int_R|u(t)|^2d\lambda t)^{1/2}

    Now the problem:
    Let's consider \theta_n a class of approximations with the following properties:
    - all functions \phi \in \theta_n are defined on a symmetric interval [-a, a];
    - if \phi(t)\in\theta_n, then \phi(-t)\in\theta_n;
    Consider d\lambda t=\omega(t)dt, where \omega is an even function.
    Prove that if f is an even function on [-a, a], its least squares approximation \phi\epsilon\theta_n is even.

    My attempt of a solution started by trying to prove that the approximation is a linear combination of even functions. So we consider an orthogonal basis \lbrace\pi_j\rbrace_{j=1}^n for the given class of approximations. In this case, the least squares approximation is:
    \phi=\sum_{j=1}^nc_j*\pi_j, where: c_j=(\pi_j,f)/(\pi_j,\pi_j)
    (u,v) is the dot product of functions u and v. More precisely:
    (u,v)=\int_{-a}^a u(t)v(t)\omega(t)dt
    Using this formula and the hypothesis, it can be proven that if \pi_j is an odd function, then c_j=0, because (\pi_j,f) is the integral of an odd function on a symmetric interval.
    This way, we eliminate from the approximation \phi all the odd basis functions. So now \phi is a linear combinations of even functions and functions that are neither even, nor odd. The even functions are good, because a linear combination of even function is also a even function. But what happens when the basis function \pi_j is neither even, nor odd? I tried decomposing \pi_j in combinations of even and odd functions, but this approach does not seem to lead anywhere...

    Any help would be appreciated.
    Best not to think in terms of basis functions, I think.

    Suppose that \phi is a least-squares approximation to f. Define \psi by \psi(t) = \phi(-t). Then \psi\in\theta_n. Use the fact that f is even to show that \|f-\psi\| = \|f-\phi\|. Assuming you know that a least-squares approximation is unique, it follows that \psi = \phi, and therefore \phi is even.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    May 2011
    Posts
    3
    Okay, I'll try this. So, keeping your notations, we must prove that:

    ||f - \psi|| = ||f - \phi|| \Leftrightarrow ||f - \psi||^2 = ||f - \phi||^2 (based on the fact that the norm is a positive integer).
    ||f - \psi||^2 = \int_{-a}^a |f(t) - \psi(t)|^2 * \omega(t)dt

    I'm thinking of making the substition v \leftarrow -t. With that we obtain:

    \int_{-a}^a |f(t) - \psi(t)|^2 * \omega(t)dt = -\int_a^{-a} |f(v) - \psi(v)|^2 * \omega(v)dv
    = \int_{-a}^a |f(v) - \psi(v)|^2 * \omega(v)dv

    Now I'm tempted to replace v with -t and obtain the final result:

    \int_{-a}^a |f(v) - \psi(v)|^2 * \omega(v)dv = \int_{-a}^a |f(-t) - \psi(-t)|^2 * \omega(-t)d(-t)
    = \int_{-a}^a |f(t) - \psi(-t)|^2 * \omega(t)dt(because f and \omega are even)

    But integrals aren't my strong point, so I'm wondering if the last step is ok. If it is, the problem is solved. But if it isn't... How else could I use the fact that f is even?
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor
    Opalg's Avatar
    Joined
    Aug 2007
    From
    Leeds, UK
    Posts
    4,041
    Thanks
    7
    Yes that's basically correct. The only other thing that you might want to clarify when making the substitution v = t in the integral is that dv becomes dt, and the limits of integration become \textstyle\int_a^{-a} rather than \textstyle\int_{-a}^a. But when you switch the limits of integration, that has the effect of changing the sign of the integral. Those two changes of sign (one in in dt and the other in the limits of integration) cancel each other out, so the t-integral ends up looking identical to the v-integral.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    May 2011
    Posts
    3
    Wow. I didn't expect it to be so... straightforward. Thank you a lot, Opalg.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Magic squares of Squares
    Posted in the Math Puzzles Forum
    Replies: 5
    Last Post: September 22nd 2010, 09:58 AM
  2. Matlab - Least squares approximation of f(x) = e^x
    Posted in the Math Software Forum
    Replies: 5
    Last Post: April 2nd 2010, 01:21 AM
  3. Replies: 0
    Last Post: November 30th 2009, 04:18 AM
  4. Replies: 4
    Last Post: November 13th 2009, 05:12 PM
  5. [SOLVED] Best approximation/least squares/inner product
    Posted in the Advanced Algebra Forum
    Replies: 1
    Last Post: June 19th 2008, 05:44 AM

/mathhelpforum @mathhelpforum