(cos(x))^4 into a Fourier series

kottur

1. The problem statement, all variables and given/known data

Put $cos^{4}(x)$ into a Fourier series.

2. Relevant equations

$cos^{4}(x)=(\frac{e^{ix}+e^{-ix}}{2})^{4}$

$a_0+\sum^{\infty}_{n=1}(a_{n}cos(nx)+b_{n}sin(nx))$

3. The attempt at a solution

I don't get what I'm supposed to use as $a_{0}$, $a_{n}$ and $b_{n}$ so I'm stuck...

Related Calculus and Beyond Homework News on Phys.org

ibysaiyan

1. The problem statement, all variables and given/known data

Put $cos^{4}(x)$ into a Fourier series.

2. Relevant equations

$cos^{4}(x)=(\frac{e^{ix}+e^{-ix}}{2})^{4}$

$a_0+\sum^{\infty}_{n=1}(a_{n}cos(nx)+b_{n}sin(nx))$

3. The attempt at a solution

I don't get what I'm supposed to use as $a_{0}$, $a_{n}$ and $b_{n}$ so I'm stuck...
As a starting point , see what type of function it's ^ . Sketch the graph , and check whether it's even or odd. You should be aware that depending on the nature of the function , coefficients cancel out.
Odd : a - >0 - , Even - > b -> 0

I have got test on the same thing tomorrow.

EDIT: On the question , does it gave any range to which this is to be found ?

HallsofIvy

Homework Helper
The simplest way to do this is using the trig identity,
$cos^2(x)= (1/2)(1+ cos(2x))$.

kottur

Okay well it's an even function so $b_{n}=0$.

And no I'm not given any interval so I'm not entirely sure how to find $a_0$ and $a_n$. I thought I was supposed to find them with:

$a_0=\frac{1}{2L}\int^{L}_{-L}f(x)dx$

$a_n=\frac{1}{L}\int^{L}_{-L}f(x)cos(\frac{n\pi x}{L})dx$ $(n\geq1)$

$[-L;L]$ being the interval of course.

kottur

Okay HallsofIvy, that would be:

$\frac{1}{8}(4cos(2x)+cos(4x)+3)$

But what should I do about the interval that I don't have?

kottur

Ahh shouldn't I use the period of the function as the interval?

HallsofIvy

Homework Helper
?There was nothing in your question that said anything about an interval.

kottur

The period is $\pi$ so should I use the interval $[0;\pi]$?

kottur

Yes but if I have to use these formulas:

$a_0=\frac{1}{2L}\int^{L}_{-L}f(x)dx$

$a_n=\frac{1}{L}\int^{L}_{-L}f(x)cos(\frac{n\pi x}{L})dx$ $(n\geq1)$

Then I need to know what L is... And it is half of the period of the function f. So it would be $\frac{\pi}{2}$? No?

HallsofIvy

Homework Helper
Why do you have to use those equations? Please write the problem exactly as it was given to you.

kottur

No I don't have to use them, that's just the only Idea I've got.

The problem is exactly like this:

Expand $cos^{4}(x)$ into Fourier series.

Nothing else given.

HallsofIvy

Homework Helper
And you have already done that in post #5. The integral formula you give is one method of finding the Fourier series. You are not required to use it and for special special functions there may be easier methods. What do you think the Fourier series for sin(3x) is?

kottur

But how is my answer in #5 a series? Shouldn't I have a sum there or something...?

I'm sorry I'm confused now. And I don't know what the series expansion for sin(3x) is, I would probably try to use the formulas for it.

genericusrnme

But how is my answer in #5 a series? Shouldn't I have a sum there or something...?

I'm sorry I'm confused now. And I don't know what the series expansion for sin(3x) is, I would probably try to use the formulas for it.
Do you know about the orthogonality of the trig functions?
That Sin[n x] and Sin[m x] ,m≠n are orthogonal on any interval in which sin is periodic, that is to say on [0,2π], [-π,π],[-5π,5π] etc?
You should really know this if you're using series expansion.

Do you know WHY you can use fourier series and what you're doing when you're taking a fourier series?

kottur

I think I know what you mean about the orthogonality.

And about the Fourier series. I find the series to try to approximate a certain function.

genericusrnme

Yes, but to you know WHY it works?

kottur

No, I don't think so, I only know what it's supposed to do unfortunately.

kottur

No, unfortunately I only know what it is supposed to give me.

I know that it approximates a function but how exactly I don't know.

genericusrnme

Okay, I'll try and explain it

Just say I have a vector $\left( \begin{array}{ccc} a\\ b\\ c\end{array} \right)$ and I want to expand it as a combination of $\left( \begin{array}{ccc} 1\\ 0\\ 0\end{array} \right)$, $\left( \begin{array}{ccc} 0\\ 1\\ 0\end{array} \right)$, $\left( \begin{array}{ccc} 0\\ 0\\ 1\end{array} \right)$

I should be able to do this pretty easily if I make use of the fact that the vectors I want to expand with are orthogonal.

I set $\left( \begin{array}{ccc} a\\ b\\ c\end{array} \right) = c_1 \left( \begin{array}{ccc} 1\\ 0\\ 0\end{array} \right) + c_2 \left( \begin{array}{ccc} 0\\ 1\\ 0\end{array} \right) + c_3 \left( \begin{array}{ccc} 0\\ 0\\ 1\end{array} \right)$

I can now take the inner product on both sides by each of my expansion vectors

$\left( \begin{array}{ccc} 1 & 0 & 0 \end{array} \right) . \left( \begin{array}{ccc} a\\ b\\ c\end{array} \right) = \left( \begin{array}{ccc} 1 & 0 & 0 \end{array} \right) . (c_1 \left( \begin{array}{ccc} 1\\ 0\\ 0\end{array} \right) + c_2 \left( \begin{array}{ccc} 0\\ 1\\ 0\end{array} \right) + c_3 \left( \begin{array}{ccc} 0\\ 0\\ 1\end{array} \right) )$

Since my expansion vectors are both orthogonal and normal (of unit length, the inner product with itself is 1) there are no normalisation constants, and but calculating the prudcuts I find that $c_1 = a$

Taking the inner product with the other expansion vectors I readily find that
$c_2=b$ and $c_3=c$

Pretty simple right?

Well we're doing the exact same thing when we expand in terms of sin[n x] and cos[n x]. We're taking advantage of the fact that they are orthogonal, and using the inner product defined by $f.g = \int f(x)g(x) dx$ over whatever region we are working in. (You can compare this to what we did before where the functions f(x), g(x) are replaced by vectors in component form $f_n$ and $g_n$ so that the inner product is $\vec{f}. \vec{g} = \sum_n f_n\ g_n$)

Okay, so we have an f(x) and we want to expand it as a series of cos. We set

$f(x) = \sum_n c_n Cos(n x)$

We take the inner product on both sides by Cos[m x]

$\int Cos(m x) f(x) dx= \sum_n c_n \int Cos(n x) Cos(m x) dx$

Since cos(n x) and cos(m x) are orthogonal we end up with

$\int cos(m x) f(x) dx= c_m \int cos(m x)^2 dx$

Or $c_m = \frac{ \int Cos(m x)f(x) dx}{\int Cos(m x)^2 dx}$

It's pretty handy if the region you are working with is something like [0,2π] or [-π,π] because then the cos^2 integral will just turn into π

The fourier series expansion is simply telling you 'how much' of each frequency of Cos (or Sin) there is in a function.

Do you understand what you're doing when you're taking a fourier series?

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving