jianxu
- 91
- 0
Homework Statement
f(x) = |cos x| if -\pi \leq x \leq\ \pi
The Fourier series answer we should end up with is the following:
2/\pi - 4/\pi\sum\frac{-1^{k}}{(2k)^{2}-1}cos(2kx)
where for the summation, k = 1 and goes to infinity.
What I need to do is to actually go an solve for the Fourier series and show that we get the same series when we derive it given f(x)
Homework Equations
f(x) = a_{0} + \suma_{k}coskx + b_{k}sinkx where k =1 and goes to infinity
a_{0} = 1/2\pi\intf(x)dx
a_{k} = 1/\pi\intf(x)coskxdx
b_{k} = 1/\pi\intf(x)sinkxdx
where we integrate all the above integrals from -\pi to \pi
Lastly, the properties of even functions are also considered.
The Attempt at a Solution
So, to start out, since b_{k} = 1/\pi\intf(x)sinkxdx, cosx is even and the sinkx is odd,
b_{k} = 0
for
a_{0} = 1/2\pi\intf(x)dx
due to the properties of an even function I have:
= 1/\pi\intf(x)dx integrated from 0 to \pi
= 1/\pi(\intcosxdx + \int-cosxdx)
where the first integral is from 0 to \pi/2} and the second integral is from \pi/2 to \pi,
solving this gives me
a_{0} = 1/\pi(1 - (-1)) = 2/\pi
For a_{k}:
using even function properties again I have,
a_{k} = 2/\pi\intf(x)coskxdx
= 2/\pi\intcosx*coskx dx
where integral goes from 0 to \pi.
Maybe I'm just rusty with integration, but I just want to make sure I'm heading into the right direction and how do I integrate that? ( meaning \intcosx*coskx dx)
Thanks