Fourier series question, either i'm wrong or the answers are wrong

In summary, the homework equations state that the integral of (1/n)*sin(nx) equals (-1/n^2)*cos(nx). However, the solutions in the worked examples say that it integrates into (-1/n)*cos(nx). It seems that either the integration by parts is wrong or the limits in the integral by parts are not being met. The differentiation checks that the values in the equation are correct.
  • #1
imsleepy
49
0

Homework Statement


p2YPJ.png

Homework Equations


KIjJQ.png

The Attempt at a Solution


i'm pretty much learning Fourier series from scratch today after only looking at it in lectures (and my exam is tomorrow lol @ me) and I'm sort of stuck.
The solutions have something different to what i have, i think it might be an error in their integration by parts (which i also learned today, despite how simple it seems).

this is my working out: http://i.imgur.com/6OXlr.jpg
and this is the worked solutions: http://i.imgur.com/1RAJL.png

doesnt the integral of (1/n)*sin(nx) equal to (-1/n^2)*cos(nx)? like i have in my working?
because the solutions are saying it integrates into (-1/n)*cos(nx).
or is mine set out incorrectly after I've integrated by parts?

edit: I've only shown both workings from where i had to find a subscript n, before that everything was fine and correct.
 
Physics news on Phys.org
  • #2
little hard to follow but i think maybe you're just missing the limits in you int by parts...
[tex] u = x [/tex]
[tex] du = 1 [/tex]
[tex] dv = cos(nx) [/tex]
[tex] v = \frac{1}{n}.sin(nx) [/tex]

[tex] \int_{a}^{b} u.dv = (u.v)|_{a}^{b} - \int_{a}^{b}du.v[/tex]
[tex]\int_0^{\pi} x.cos(nx).dx [/tex]
[tex]= (x.\frac{1}{n}.sin(nx))|_{0}^{\pi} - \int_{0}^{\pi} \frac{1}{n}.sin(nx).dx [/tex]
[tex]= 0 - \frac{1}{n} \int_{0}^{\pi} sin(nx).dx [/tex]
[tex]= \frac{1}{n^2} (cos(nx).dx)|_{0}^{\pi}[/tex]
 
Last edited:
  • #3
it is true that
[tex] \frac{1}{n}\int sin(nx).dx = -\frac{1}{n^2}cos(nx)
[/tex]

just differentiate to check
 
  • #4
lanedance said:
little hard to follow but i think maybe you're just missing the limits in you int by parts...
[tex] \int_{a}^{b} u.dv = (u.v)|_{a}^{b} - \int_{a}^{b}du.v[/tex]

[tex]\int_0^{/pi} x.cos(nx).dx
= (x.n.sin(nx))|_{0}^{\pi} - \int_{0}^{\pi} cos(nx).dx
= 0 - \int_{0}^{\pi} cos(nx).dx
= -(\frac{1}{n}.sin(nx))|_{0}^{\pi} [/tex]
[/tex]

i don't understand what you're doing?

what have u used as u and v?
shouldnt (x.n.sin(nx) be (x/n).sin(nx) after the first = sign?
 
  • #5
sorry, did that a too quick, corrected and lines up with yours now

notice the sine terms cancel as [itex]sin(0) = sin(\pi) = 0[/itex]
 
Last edited:
  • #6
ok thanks.

also where do the cos's disappear to?
i think something about if that part of the function is odd then you make it -1 or something? and/or if it's even make it 1, i don't know :S
 
  • #7
which cos's? in the first step the sin appear instead of cos's due to the integration by parts

now you should be considering the whole integral from -pi to pi, braking it up into two pieces note that
cos(-x) = cos(x)
and
sin(-x) = -sin(x)

you should be able to show for any function
- if the function is odd, it only has sin components (sin is an odd function)
- if the function is even, it only has cos components (cos is an even function)
 
Last edited:
  • #8
yeah i underrstand, thanks a lot!

also regarding the values for a0, an, and bn (http://i.imgur.com/KIjJQ.png) they are all integrals from -L -> L, but in all the examples I've done or seen (about 3), they've taken the integral from 0 -> L and then multiplied the entire thing by 2.

Now i understand they're halving the region of integration and then doubling the overall answer, but can this always be done when a question asks for a Fourier series of a piecemeal function, whether the fn is even or odd? (with a question of the same style as the one in the OP)
And if so, any reason why my formula sheet gives us a0 etc as integrals from -L to L when we can just make it twice the integral from 0-L?
 
  • #9
write out the whole integral, break it into 2 pieces at 0, then use the properties of sin or cos as described last time and it should become obvious. this will only work for odd or even functions
 

1. What is a Fourier series?

A Fourier series is a mathematical representation of a periodic function as a sum of sine and cosine functions. It is used to decompose a function into its individual frequency components.

2. How is a Fourier series used in science?

Fourier series are used in various fields of science, including physics, engineering, and signal processing. They are used to analyze and model periodic phenomena, such as sound waves, electromagnetic waves, and electrical signals.

3. What is the difference between Fourier series and Fourier transform?

A Fourier series is used for periodic functions, while a Fourier transform is used for non-periodic functions. Fourier series decomposes a function into its individual frequency components, while Fourier transform decomposes a function into its frequency spectrum.

4. Can a Fourier series accurately represent any function?

No, a Fourier series can only accurately represent periodic functions. For non-periodic functions, a Fourier transform is used.

5. What are some applications of Fourier series in real life?

Fourier series have many practical applications, such as in audio and image compression, filtering and noise reduction, and signal analysis in various fields such as telecommunications, astronomy, and medicine.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
362
  • Calculus and Beyond Homework Help
Replies
3
Views
283
  • Calculus and Beyond Homework Help
Replies
1
Views
214
  • Calculus and Beyond Homework Help
Replies
2
Views
372
  • Calculus and Beyond Homework Help
Replies
1
Views
245
  • Calculus and Beyond Homework Help
Replies
2
Views
422
  • Calculus and Beyond Homework Help
Replies
1
Views
535
  • Calculus and Beyond Homework Help
Replies
4
Views
613
  • Calculus and Beyond Homework Help
Replies
3
Views
414
  • Calculus and Beyond Homework Help
Replies
5
Views
355
Back
Top