Monday, 11 November 2013

calculus - Fourier Series for f(x)=sin(x)+cos(2x)





Find the Fourier Series for f(x)=sin(x)+cos(2x)




I got a0=0 which seems correct but I'm struggling with an and bn. Here are my attempts:



an=12πodd function2π0cos(nx)sin(x)dx+2π0cos(nx)cos(2x)dx=12π[sin(nx)ncos(2x)]2π022π0sin(nx)nsin(2x)




If I integrate the second term again I get an even function again and again. I need a fitting addtion theorem or something else. Any hints?


Answer



a0=1πππ(sin(x)+cos(2x)) dx=
1π[ππsin(x) dx+ππcos(2x) dx]=






Now, use: sin(x) dx=Ccos(x)







1π[[cos(x)]ππ+ππcos(2x) dx]=






Substitute u=2x and du=2 dx.



This gives a new lower bound u=2π and upper bound u=2π:







1π[[cos(x)]ππ+122π2πcos(u) du]=






Now, use: cos(x) dx=sin(x)+C






1π[[cos(x)]ππ+12[sin(u)]2π2π]=0




NEXT:



an=1πππ(sin(x)+cos(2x))cos(nx) dx=
1π[ππsin(x)cos(nx) dx+ππcos(2x)cos(nx) dx]=






Now, as you noticed already:




Since sin(x)cos(nx) is an odd function and the interval [π,π] is symmetric about 0, so:



ππsin(x)cos(nx) dx=0






1πππcos(2x)cos(nx) dx=







Use the trigonometric identity cos(a)cos(b)=cos(ab)+cos(a+b)2:






12πππ(cos(x(n2))+cos(x(n+2))) dx=
12π[ππcos(x(n+2)) dx+ππcos(x(n2)) dx]=






For the left integral:




Substitute u=x(n+2) and du=(n+2) dx.



This gives a new lower bound u=(π)(n+2)=π(n+2) and upper bound u=π(n+2):






12π[1n+2π(n+2)π(n+2)cos(u) du+ππcos(x(n2)) dx]=







For the right integral:



Substitute s=x(n2) and ds=(n2) dx.



This gives a new lower bound s=(π)(n2)=π(n2) and upper bound s=π(n2):






12π[1n+2π(n+2)π(n+2)cos(u) du+1n2π(n2)π(n2)cos(s) ds]=







Now, use: cos(x) dx=sin(x)+C






12π[1n+2[sin(u)]π(n+2)π(n+2)+1n2[sin(s)]π(n2)π(n2)]=
sin(πn)π(n+2)+sin(πn)π(n2)=2nsin(πn)π(n24)




NEXT:



bn=1πππ(sin(x)+cos(2x))sin(nx) dx=
1π[ππsin(x)sin(nx) dx+ππcos(2x)sin(nx) dx]=






Now, as you noticed already:



Since cos(2x)sin(nx) is an odd function and the interval [π,π] is symmetric about 0, so:




ππcos(2x)sin(nx) dx=0






1πππsin(x)sin(nx) dx=






Use the trigonometric identity sin(a)sin(b)=cos(ab)cos(a+b)2:







12πππ(cos(x(n1))cos(x(n+1))) dx=
12π[ππcos(x(n1)) dxππcos(x(n+1)) dx]=






For the right integral:




Substitute u=x(n+1) and du=(n+1) dx.



This gives a new lower bound u=(π)(n+1)=π(n+1) and upper bound u=π(n+1):






12π[ππcos(x(n1)) dx1n+1π(n+1)π(n+1)cos(u) du]=







For the left integral:



Substitute s=x(n1) and ds=(n1) dx.



This gives a new lower bound s=(π)(n1)=π(n1) and upper bound s=π(n1):






12π[1n1π(n1)π(n1)cos(s) ds1n+1π(n+1)π(n+1)cos(u) du]=







Now, use: cos(x) dx=sin(x)+C






12π[1n1[sin(s)]π(n1)π(n1)1n+1[sin(u)]π(n+1)π(n+1)]=
sin(πn)π(1n)+sin(πn)π(1+n)=2sin(πn)π(1n2)



CONCLUSION:





  • a0=0

  • an=2nsin(πn)π(n24)

  • bn=2sin(πn)π(1n2)


No comments:

Post a Comment

real analysis - How to find limhrightarrow0fracsin(ha)h

How to find lim without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...