$$F(x)=\left\{ \begin{array}{rl} ax,&0<x<\pi,\\ bx,&-\pi<x<0, \end{array} \right.$$

So, far i've got: $$a_0 = - \frac{b\pi}{2} + \frac{a\pi}{2}$$ $$bn = \frac{1}{\pi} \frac{(-1)^{n+1}}{n}(a+b)$$

Can someone help me get $a_n$? I did try, but I don't really think $0$ is the solution. Thank you.

  • $\begingroup$ $$F(x) = \frac{a-b}{2}\ |x| + \frac{a+b}{2} x$$ for $-\pi<x<\pi$, and probably you can lookup their Fourier series representation somewhere. $\endgroup$ – peterwhy May 21 '16 at 21:56
  • $\begingroup$ I did try, but nothing helped. $\endgroup$ – mirai May 21 '16 at 22:02

$$F(x) = \frac{a-b}{2}\ |x| + \frac{a+b}{2} x$$ for $-\pi<x<\pi$. The first part is an even function that corresponds to the $a_n$'s.

Without looking at tables, the formula for $a_n$, $n> 0$ is

$$\begin{align*} a_n &= \frac2{2\pi}\int_{-\pi}^\pi\frac{a-b}{2}\ |x|\cos nx\ dx\\ &= \frac{a-b}{2\pi}\int_{-\pi}^\pi|x|\cos nx\ dx\\ &= \frac{a-b}{2\pi}\int_{-\pi}^0(-x)\cos nx\ dx + \frac{a-b}{2\pi}\int_{0}^\pi x\cos nx\ dx\\ &= \frac{a-b}{\pi}\int_{0}^\pi x\cos nx\ dx\\ &= \frac{a-b}{n\pi}\int_{0}^\pi x\ d\sin nx\\ &= \frac{a-b}{n\pi}\left\{\left[x\sin nx\right]_0^\pi-\int_{0}^\pi \sin nx\ dx\right\}\\ &= \frac{a-b}{n\pi}\left\{\left[x\sin nx\right]_0^\pi+\left[\frac{\cos nx}n\right]_0^\pi\right\}\\ &= \frac{a-b}{n\pi}\left(0+\frac{\cos n\pi}{n} - \frac 1n\right)\\ &= \frac{(a-b)(\cos n\pi-1)}{n^2\pi}\\ &= \frac{(a-b)((-1)^n-1)}{n^2\pi}\\ &=\begin{cases} -\dfrac{2(a-b)}{n^2\pi}&n\text{ is odd}\\ 0&n\text{ is even, }n\ne 0\end{cases} \end{align*}$$

Or it is possible to do the following integration directly, and I don't think it is different:

$$a_n = \frac{2}{2\pi}\int_{-\pi}^\pi F(x)\cos nx\ dx$$

  • $\begingroup$ Thank you so much! I guess I was partly right :) $\endgroup$ – mirai May 21 '16 at 22:34
  • $\begingroup$ @mirai Are you allowed to lookup Fourier series tables? This is much easier to do if you can. The $|x|$ is just a triangular wave, and the $x$ is a sawtooth wave, possibly with scaling and shifting. $\endgroup$ – peterwhy May 21 '16 at 22:37
  • $\begingroup$ I can look, but i still have to do this. $\endgroup$ – mirai May 21 '16 at 22:43
  • $\begingroup$ @mirai If you think this is helpful, please mark this as an answer. $\endgroup$ – peterwhy May 21 '16 at 22:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.