1. ## 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.

2. Originally Posted by Anomander
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.

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?

4. 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.

5. Wow. I didn't expect it to be so... straightforward. Thank you a lot, Opalg.