Find a function orthogonal to $\sin(x),\dots,\sin(4x)$

357 Views Asked by At

Let $f:[0, \pi] \to \mathbb{R}$ with the $L^2$ inner product

$$ \langle f,g \rangle = \int_0^{\pi} f(x)g(x) \mathrm{d}x $$

I want to find a projection of $f(x)=1$ onto $\sin(x)$ and $\sin(3x)$ and use that to find a function of the form $1+k_1\sin(x)+k_3\sin(3x)$ that is orthogonal to $\sin(x), \sin(2x), \sin(3x), \sin(4x)$.

My work:

I calculate the projection (is this correct?):

$$ Pr_{\sin(x),\sin(3x)}(1)=\frac{\langle 1, \sin(x) \rangle}{\mid \mid \sin(x) \mid \mid^2}\sin(x)+\frac{\langle 1, \sin(3x) \rangle}{\mid \mid \sin(3x) \mid \mid^2}\sin(3x) \\ = \int_0^{\pi} 1\cdot\sin(x)dx\cdot\frac{1}{(\int_0^{\pi}\sin(x)\sin(x)dx)^2}\sin(x) + \int_0^{\pi} 1\cdot\sin(3x)dx\cdot\frac{1}{(\int_0^{\pi}\sin(3x)\sin(3x)dx)^2}\sin(3x) \\ =\frac{8}{\pi^2}\sin(x)+\frac{8}{3\pi^2}\sin(3x) $$

Now I have the function $\frac{8}{\pi^2}\sin(x)+\frac{8}{3\pi^2}\sin(3x)$, but how do I use that to find a function of the form $1+k_1\sin(x)+k_3\sin(3x)$ that is orthogonal to $\sin(x), \sin(2x), \sin(3x), \sin(4x)$?

I am unsure of how to proceed.

2

There are 2 best solutions below

1
On BEST ANSWER

First of all, $\cos(m+n)=\cos m\cos n-\sin m\sin n$ and $\cos(m-n)=\cos m \cos n+\sin m \sin n$ so when you subtract these, you find $$ \cos(m-n)-\cos(m+n)=2\sin m \sin n . $$ As a result, $$ \int_0^\pi \sin x \sin 3x \, dx =\frac{1}{2}\int_0^\pi \cos 2x-\cos4x\,dx=0 $$ so $\sin x \perp \sin 3x$. This result holds for any $m\neq n$ actually. Now the key is that since these two are orthogonal, the function $$ 1-Proj_{\sin x} 1 - Proj_{\sin 3x} 1 $$ will be orthogonal to $\sin x$ and $\sin 3x$. It's then easy to verify the rest of the orthogonality.

This is essentially the Gram-Schmidt method from scratch.

2
On

The problem is itself an application of the Gram-Schmidt process. The idea is that you can subtract from your vector ($f(x)=1$) the projections onto each vector (here, $\sin x, \sin 2x, \sin 3x, \sin 4x$) to get a vector that is orthogonal to each vector listed. However, your vector $f$ is orthogonal to $\sin kx$ whenever k is positive and even (since the period for $\sin kx$ is $\frac{2\pi}{k}$ and the integral of sin functions over a integer multiple of the period is always zero). As a result, what you need to do is to subtract the projections onto $\sin x$ and $\sin 3x$. So the answer should be $1-\frac{8}{\pi ^2}\sin x - \frac{8}{3\pi^2}\sin 3x$ (haven't checked your calculations of projections).

-----edited later-----

I did the calculations on my own. The answer should be $$1-\frac{\langle 1, \sin x \rangle}{||\sin x||^2} \sin x - \frac{\langle 1, \sin 3x \rangle}{||\sin 3x||^2} \sin 3x = 1-\frac{4}{\pi} \sin x - \frac{4}{3\pi}\sin 3x$$ as you can verified.