0
$\begingroup$

The functions:

f(x) = -1 when -2 < x <0 and

f(x) = 1 when 0 < x < 2

What I've done:

  • Concluding that the period = p = 2 (edit: I've got it wrong, p should be 4, edited the way I compute $b_1$ below)
  • Graphing the function, you can tell that it is an odd function in which $a_n = 0$ and $b_n$ nonzero
  • Finding $a_0, a_1, b_1, b_2$, in which I always got zero (although $b_n$ shouldn't be zero)
  • The formulas I used for the fourier coefficients are from Wikipedia:

Formula

How do I do the computing for $b_1$ (edited for p = 2):

$b_1$= $(1/2)(\int_{-2}^0$ $-sin$ (pi x) dx + $\int_{0}^{2}$ sin (pi x) dx$)$

= $(1/pi) (cos((pi)x)) /_{-2}^0$ + $(-1/pi) (cos((pi)x)) /_{0}^2$

= $(1/2)$(($1/pi$ $cos(0)$ - $1/pi$ $cos(2pi)$) + ($(-1/pi)$ $cos(2pi)$ + $1/pi$ $cos(0))$)

= $(1/2)$$($$2/pi$ - $(2/pi)$$cos(2pi)$$)$

= $(1/2)$$(0)$

= 0

Please find the errors and correct me!

  • 0
    The period seems to be $4$ instead of $2$.2017-02-23
  • 0
    @nicomezi ah, yes. So $b_1$ will be $b_1$= $(1/2)$$($$\int_{-2}^0$ $-sin$ (pi x) dx + $\int_{0}^{2}$ sin (pi x) dx$)$? But $b_1$ will still be $0$...2017-02-23
  • 0
    You forgot to change the period into the $\sin$. $b_1=\frac 1 2 \int_{-2}^2 f(x) sin( \frac \pi 2 x )dx$2017-02-23

0 Answers 0