-1

Given the following question:

The function $f(x)$ is defined by $$ f(x)= \begin{cases} 2x& \textrm{if} \ 0 \leq x<\dfrac{\pi}{3} \\ \pi - x & \textrm{if} \ \dfrac{\pi}{3}\leq x \leq \pi \end{cases} $$

Also given the following info:

$f(-x)=-f(x) = f(x+2\pi)$

I know that the graph is a triangle wave form and it repeats every 2 period. I also know it is odd and to use $$b_n=\frac{1}{L}\int_{-L}^L f(x) \sin \left(\frac{n\pi}{L}x\right)\ dx$$ The problem I have is I don't know how to find the $f(x)$ value. Any help would be appreciated.

Dylan
  • 16,575
  • 2
    $f(x)$ was given to you right there in the problem statement $$ f(x)=\left{ \begin{array}{lr} 2x & 0\leq x < \frac{\pi}{3} \ \pi - x & \frac{\pi}{3} \leq x \leq \pi \end{array} \right. $$

    You have to split up your integration region like $$\int_0^{\pi} = \int_0^{\frac{\pi}{3}}+ \int_{\frac{\pi}{3}}^{\pi}$$

    – Triatticus Dec 03 '17 at 22:39

1 Answers1

1

I don't want to solve your problem, but try to give you some hints.

Your function is a pice-wise defined function, so you musn't expect an expression like $f(x)=2x+3/2$, but an expression like

$$ f(x)=\begin{cases} 2x, & \mbox{when } 0\leq x<\pi/3 \\ \pi-x & \mbox{when } \pi/3\leq x<\pi . \end{cases} $$

On the other hand, they tell you your function is odd ($f(-x)=-f(x)$), so you can achive a similar expresion but when $x$ is in $[-\pi,0]$ (try it).

Your total function will be the ''paste'' of two data, and is defined only on $[-L,L]$, $L=\pi$. The Fourier series extends it to the whole real line.

Now, how do yo compute coefficients? Well, since the function is odd you know that the only coefficients of $\sin$ matters. All you have to do it now is divide your integral in ''little'' integrals where you have an expression like $x^2$ for you function. I mean, cut the intergal interval $[-L,L]$ in some short intervals.

Finally, note that the argument is an even function (is the product of two odd) and is integred in a symmetric interval. Then you can reduce your above to expression to

$$ b_n=\frac{2}{L}\int_0^L f(x) \sin\left(\frac{n\pi x}{L}\right) dx. $$

PD: To get the symbol $\pi$ you must type \pi. Similar, for $\leq$ or $\geq$ you have to type \leq (Less or EQual) and \geq (Great or EQual), respectively.

Dog_69
  • 1,877
  • so ultimately I would get an equation of type $$b_n=\frac{2}{\pi}[\int_{0}^\frac{\pi}/3 2xsin(\frac{nx\pi}{\pi})}+\int_{\frac{\pi}{3}}^{\pi}(\pi-x)sin(\frac{nx\pi}{\pi})]$$ – Matlab rookie Dec 04 '17 at 11:48
  • Exactly. And this matches with Triatticus' comment. – Dog_69 Dec 04 '17 at 11:53
  • can $$\int_{\frac{\pi}/3}^\pi (\pi-x)sin(\frac{nx\pi}{\pi})$$ then be rearranged to $$\int_{\frac{\pi}/3}^\pi {\pi}sin(\frac{nx\pi}{\pi}) + \int_{\frac{\pi}/3}^\pi (-x)sin(\frac{nx\pi}{\pi})$$ and then move the $\pi$ outside the integral as its a constant? – Matlab rookie Dec 04 '17 at 12:02
  • Exactly. That's perfect. And de "-" sign of x un the second integral can also be moved outside, getting $$\pi\int_{\frac{\pi}{3}}^\pi\sin(nx)dx -\int x\sin(nx)dx$$ – Dog_69 Dec 04 '17 at 16:39
  • The limits in the second integral are the same, I forgot them, sorry. – Dog_69 Dec 04 '17 at 16:40