# Fourier sine series for $\sin^2ax$

This answer to a related question notes that in addition to the usual Fourier expansion of $\sin^2(x)=\frac12 -\frac{\cos2x}2$

we do have the freedom to extend $\sin^2(x)$ to an odd function on $[−\pi,\pi]$ instead, in which case the Fourier series will contain only sine functions

I didn't know that. What does that look like, even on all $x$ (not just $[−\pi,\pi]$)? I can't seem to find it online anywhere. It should be something like $\Sigma^\infty a_n\sin nx$ but what are the coefficients?

• The odd extension of $\sin^2(x)$ on $[-\pi,\pi]$ would look like $$\begin{cases} -\sin^2(x) & \text{ if }x<0\\\sin^2(x) & \text{ if }x>0\end{cases}$$ In other words, plot $\sin^2(x)$ on $[-\pi,0]$ and reflect it about the origin to generate the odd extension of it. To find the coefficients, just carry out the appropriate integrals (split each up into two terms; one for $[-\pi,0]$ and the other for $[0,\pi]$) Mar 30, 2017 at 20:18
• @NicholasStull The other answer says about this series that "Of course, the convergence isn't as fast [as the ordinary cosine version]" How is yours a slower convergence? It's just two terms Mar 30, 2017 at 20:51
• When extending to an odd function over the whole real number line, one way is to take the function, extend it to an odd function (on some prescribed interval), and then extend periodically. You then find the coefficients for the interval $[-\pi,\pi]$ and extend the series periodically (exactly as you would a function). Mar 30, 2017 at 20:52
• To address your question of why convergence would be slower, the cosine series on $[0,\pi]$ for the function is exactly $\frac{1}{2}-\frac{1}{2}\cos(2x)$ (i.e., the function), which means the cosine series converges to exactly match the function in 3 terms (the second term corresponding to $\cos(x)$ is zero) on the interval $[0,\pi]$. The sine series will not follow this, as there is no linear combination of $\sin(x)$, $\sin(2x)$, and $\sin(3x)$ which exactly yields the function (on $[0,\pi]$ or $[-\pi,\pi]$). Mar 30, 2017 at 20:57
• @NicholasStull Sorry I'm confused then about what your initial proposed series is. Is it not also directly equal to sin^2 since it is sin^2? Or is this a bunch of sin^2n with different periods and coefficients? Mar 30, 2017 at 21:38

There is an understandable cognitive dissonance created by questions like this: a function whose natural definition makes it continuous with continuous derivatives of all orders, and is periodic (say with period $2\pi$), is used to describe an "artificially/prankishly(?) created" function which is equal to the natural function on some interval, but is then extended (!!!) in some semi-random but not unreasonable way to be (maybe) a periodic function which may fail to be continuous or indefinitely differentiable, etc. Then the exercise of computing the somewhat-artificial functions' Fourier coefficients causes cognitive disturbance in juxtaposition with the natural function.