[SOLVED]Fourier coefficient theta^2

dwsmith

Well-known member
We have $f(\theta) = \theta^2$ for $-\pi < \theta\leq \pi$.

$$a_0 = \frac{1}{\pi}\int_{-\pi}^{\pi}\theta^2 d\theta = \frac{2\pi^2}{3}$$

$$a_n = \frac{1}{\pi}\left[\left.\frac{\theta^2}{n}\sin n\theta\right|_{-\pi}^{\pi}-\frac{1}{n}\left[\left.\frac{-\theta}{n}\cos n\theta\right|_{-\pi}^{\pi}+\int_{-\pi}^{\pi}\cos n\theta d\theta\right]\right] = \frac{2}{n\pi}\left[\pi^2\sin n\pi - \frac{1}{n}\sin n\pi\right]$$

However, since I have only sine, all the coefficients would be zero. Is that correct?

dwsmith

Well-known member
We have $f(\theta) = \theta^2$ for $-\pi < \theta\leq \pi$.

$$a_0 = \frac{1}{\pi}\int_{-\pi}^{\pi}\theta^2 d\theta = \frac{2\pi^2}{3}$$

$$a_n = \frac{1}{\pi}\left[\left.\frac{\theta^2}{n}\sin n\theta\right|_{-\pi}^{\pi}-\frac{1}{n}\left[\left.\frac{-\theta}{n}\cos n\theta\right|_{-\pi}^{\pi}+\int_{-\pi}^{\pi}\cos n\theta d\theta\right]\right] = \frac{2}{n\pi}\left[\pi^2\sin n\pi - \frac{1}{n}\sin n\pi\right]$$

However, since I have only sine, all the coefficients would be zero. Is that correct?
$$\frac{1}{\pi}\left[\frac{2\pi^2}{n}\sin n\pi - \frac{1}{n}\left[\frac{-2\pi}{n}\cos n\pi - \frac{2}{n}\sin n\pi\right]\right]= \frac{2}{n^2}(-1)^n = \begin{cases} \frac{2}{n^2} & \text{if n even}\\ \frac{-2}{n^2} & \text{if n odd} \end{cases}$$

Correct?

Opalg

MHB Oldtimer
Staff member
We have $f(\theta) = \theta^2$ for $-\pi < \theta\leq \pi$.

$$a_0 = \frac{1}{\pi}\int_{-\pi}^{\pi}\theta^2 d\theta = \frac{2\pi^2}{3}$$

$$a_n = \frac{1}{\pi}\left[\left.\frac{\theta^2}{n}\sin n\theta\right|_{-\pi}^{\pi}-\frac{1}{n}\left[\left.\frac{-\theta}{n}\color{red}{\cos n\theta}\right|_{-\pi}^{\pi}+\int_{-\pi}^{\pi}\cos n\theta d\theta\right]\right] = \frac{2}{n\pi}\left[\pi^2\sin n\pi - \frac{1}{n}\sin n\pi\right]$$

However, since I have only sine, all the coefficients would be zero. Is that correct?
You don't "have only sine"!

dwsmith

Well-known member
You don't "have only sine"!
I made the correction is post 2.
Is this the solution?
$$\frac{\pi^2}{3} + 2\sum_{n = 1}^{\infty}\left[\frac{(-1)^n}{n}\cos n\theta\right].$$

Opalg

MHB Oldtimer
Staff member
I made the correction is post 2. (I didn't see that when making my previous post.)
Is this the solution?
$$\frac{\pi^2}{3} + 2\sum_{n = 1}^{\infty}\left[\frac{(-1)^n}{n}\cos n\theta\right].$$
Correct except that I think that the 2 should be a 4. It looks as though you left out the 2 in the derivative of $\theta^2$, when doing the integration by parts.