Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Fourier, square sign wave, f(x)sin(kx) integration

  1. Nov 27, 2015 #1
    I'm not sure whether to put this here or in Linear Algebra, if any Mod feels it should go in Linear Algebra I won't mind.

    I've just been introduced to Fourier Series decompositions in my Linear Algebra text, and I understand all the core concepts so far from the Linear Algebra side of it (a function space, where orthonormal bases allow you to isolate and solve for individual coefficients in a given Fourier Series).

    At the end of the decomposition ones sees (nb: [itex]\pi[/itex] is the length of any given base)

    [tex]b_k = \frac{1}{\pi}\int_0^{2\pi}f(x)sin(kx)dx[/tex]

    where [itex]f(x) =\left\{\begin{matrix}1, \ \ 0\leq x < \pi \\-1, \ \ \pi \leq x \leq 2\pi \end{matrix}\right.[/itex]

    I tried a number of approaches involving integration by parts using values of integration between certain ranges of the square wave [itex]f(x)[/itex] taken by inspection, but these attempts have lead nowhere.

    The text simply tells me that [itex]\int_0^{2\pi}f(x)sin(kx)dx = \frac{4}{k}[/itex] for odd k. It doesn't really explain how it came to that result, though it did earlier mention something about [tex]1 = \frac{4}{\pi}\left(1 - \frac{1}{3} + \frac{1}{5} - \frac{1}{7} + \frac{1}{9} - ... \right)[/tex] but I don't see exactly how that fits in...I can see something similar happening in there, but I'm not sure what.

    Furthermore, for [itex]f(x)sin(x)[/itex], I can see that they are both odd functions, and that as such, over the same range, and given the definition of [itex]f(x)[/itex] that in fact [itex]f(x)sin(x) = |sin(x)|[/itex]. But that doesn't give the needed [itex]\frac{4}{k}[/itex] and doesn't help with [itex]f(x)sin(kx)[/itex].(edit: my bad it does give 4/k...was this correct then? It must be...ok, but is there a general case?)

    How have they arrived at [itex]\int_0^{2\pi}f(x)sin(kx)dx = \frac{4}{k}[/itex], and how do I approach evaluating the numerator in these equations for solving Fourier Series coefficients in general?
    Last edited: Nov 27, 2015
  2. jcsd
  3. Nov 27, 2015 #2


    User Avatar
    Science Advisor
    Homework Helper
    2017 Award

    Going the way ##
    f(x)\sin(x) = |\sin(x)|## doesn't help much. Try going the way $$
    \int_0^{2\pi}f(x)\sin(kx)dx = 2 \int_0^{\pi}f(x)\sin(kx)dx = 2 \int_0^{\pi}\sin(kx)dx = \\ \qquad {2\over k} \int_0^{k\pi}\sin(kx)d(kx) = {2\over k} \cos(kx) \Bigg |^0_{k\pi} = \frac{4}{k} $$


    LaTeX hint: use \sin instead of sin
    Last edited: Nov 27, 2015
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook