Expand f(x)=x^3 in Fourier Sine Series: Step by Step Guide

In summary: x^2 is when you integrate from 0 to 1, x^3 is when you integrate from 0 to 1, and then integrate by parts again.
  • #1
8700
25
1
1. Expand the function f(x)=x^3 in a Fourier sine series on the inteval 0≤ x ≤ 1


2. I was thinking of using these equations in an attempt to find the solution

f(x)=∑b[itex]_{n}[/itex]sin(nx)


and

b_n=[itex]\frac{2}{∏}[/itex]∫f(x)sin(nx)dx where n=1,2,...,I am somewhat lost in what to do exactly, could anyone help me step by step??

3. when i integrate in respect of x i get [x^4/4sinnx)-cos(nx)n]
 
Last edited:
Physics news on Phys.org
  • #2
buddy, you're supposed to integrate from 0 to 1
 
  • #3
Yes and when i do that i get:

2(sin(1)/4-cos(1))+1 if n=1
 
Last edited:
  • #4
By the way how do you use Latex here on the site?
 
  • #5
The Fourier series on x [itex]\in[/itex] [0, 1] needs to be made up of sines which are periodic over [0, 1], so you probably want to use ##\sum b_n \sin(2\pi nx)##.

As for using ##\LaTeX##, go "Advanced" in the editor; under "Quick Symbols" you'll see a link to the LaTeX FAQ.
 
  • #6
[tex]b_n = 2 \int_{0}^{1} x^3 sin(2 \pi n x) dx [/tex]

i get the integration to give me

[tex]2[\frac{x^4}{4}sin(2\pi n x)-cos(2 \pi n x)2 \pi n]_0^1 [/tex]Is this correct?
 
Last edited:
  • #7
looks right
 
  • #8
[tex]b_n = 2 \int_{0}^{1} x^3 sin(2 \pi n x) dx [/tex]

i get the integration to give me

[tex]2[\frac{x^4}{4}sin(2\pi n x)-cos(2 \pi n x)2 \pi n]_0^1 [/tex]


so when i take it from 0 to 1, i get something like this.

[tex]\frac{sin(2 \pi n)}{4}-cos(2 \pi n)*2 \pi n[/tex]

which gives me

[tex]f(x) = \sum_{n=1}^{\infty}(\frac{sin(2 \pi n)}{4}-cos(2 \pi n)*2 \pi n)sin(2 \pi n x)[/tex]

Am i on the right path or?
 
  • #9
8700 said:
[tex]b_n = 2 \int_{0}^{1} x^3 sin(2 \pi n x) dx [/tex]
Why is it ##x^3##?
 
  • #10
Because the assignment say that f(x)= x^3 ?
 
  • #11
Okay, I was just confused because your original post says this:

8700 said:
1. Expand the function f(x)=x^2 in a Fourier sine series on the inteval 0≤ x ≤ 1
 
  • #12
I've written down exactly what the assignement says, but I can't denie that I've misunderstood something?

except for x^2 which is x^3
 
  • #13
You seem to be on the right track, except your OP said the function was ##x^2## and you seem to be working on ##x^3##.
8700 said:
[tex]b_n = 2 \int_{0}^{1} x^3 sin(2 \pi n x) dx [/tex]

i get the integration to give me

[tex]2[\frac{x^4}{4}sin(2\pi n x)-cos(2 \pi n x)2 \pi n]_0^1 [/tex]
That looks like you tried to integrate by parts (which is the right thing to do) but the answer looks wrong. You should have more terms, and you need to integrate by parts more than once.

so when i take it from 0 to 1, i get something like this.

[tex]\frac{sin(2 \pi n)}{4}-cos(2 \pi n)*2 \pi n[/tex]

What are ##\sin 2 \pi n## and ##\cos 2 \pi n##, when ##n## is an integer?

Comment on LaTeX: use \sin \cos \tan \log etc for functions, not just sin cos tan log. Notice the difference between ##\sin 2 \pi n## and ##sin 2 \pi n##.
 
  • #14
What I'm saying is that your original post says x^2, and your later posts say x^3.
 
  • #15
AlephZero said:
You seem to be on the right track, except your OP said the function was ##x^2## and you seem to be working on ##x^3##.

That looks like you tried to integrate by parts (which is the right thing to do) but the answer looks wrong. You should have more terms, and you need to integrate by parts more than once.



What are ##\sin 2 \pi n## and ##\cos 2 \pi n##, when ##n## is an integer?

Comment on LaTeX: use \sin \cos \tan \log etc for functions, not just sin cos tan log. Notice the difference between ##\sin 2 \pi n## and ##sin 2 \pi n##.

I integrated the function in respect of x, but only a single time. but why do i need to integrated several times? and would that still for x?

I guess $$ \sin(2 \pi), \sin(4 \pi)$$... & $$\cos(2 \pi) \cos(4 \pi)$$

??
 
Last edited:
  • #16
AlephZero said:
You seem to be on the right track, except your OP said the function was ##x^2## and you seem to be working on ##x^3##.

That looks like you tried to integrate by parts (which is the right thing to do) but the answer looks wrong. You should have more terms, and you need to integrate by parts more than once.
What are ##\sin 2 \pi n## and ##\cos 2 \pi n##, when ##n## is an integer?

Comment on LaTeX: use \sin \cos \tan \log etc for functions, not just sin cos tan log. Notice the difference between ##\sin 2 \pi n## and ##sin 2 \pi n##.

I integrated the function in respect of x, but only a single time. but why do i need to integrated several times? and would that still be for x?

I guess [tex] \sin(2 \pi), \sin( 9 \pi) [/tex] for n=1 & 2 &[tex] \cos(4 \pi) \cos(8 \pi)[/tex] for n=1 & 2

as sin is an uneven function and cos is an even function
??
 
Last edited:
  • #17
olivermsun said:
What I'm saying is that your original post says x^2, and your later posts say x^3.

yeah I see that, sorry for confusing you!:redface:
 
  • #18
8700 said:
I integrated the function in respect of x, but only a single time. but why do i need to integrated several times? and would that still for x?

I guess [text] \sin(2 \pi), \sin(4 \pi)... & \cos(2 \pi) \cos(4 \pi) [/txt]

??
You seem to have figured this out in later posts, but above you have [text] and [/txt], rather than [tex] and [/tex]. You can also use $$ characters at the start and end, which are easier to type.

For inline LaTeX, use [itex] and [/itex] or a pair of ## symbols.
 
  • Like
Likes 1 person
  • #19
I am really lost here, hope someone can help me!
 
  • #20
8700 said:
[tex]b_n = 2 \int_{0}^{1} x^3 sin(2 \pi n x) dx [/tex]

i get the integration to give me

[tex]2[\frac{x^4}{4}sin(2\pi n x)-cos(2 \pi n x)2 \pi n]_0^1 [/tex]


Is this correct?

No, it is not. If you do the integral and then plot some of the sums ##\sum_{n=1}^N b_n \sin(2\pi n x)## for large ##N## (say ##N = 10## or ##N = 15##) and over ##0 \leq x \leq 1## you will see that your series looks nothing at all like the function ##x^3##.

Instead, we can look at the function ##x^3## over the interval (-1,1) and take its Fourier series, which will be of the form
[tex] \sum_{n=1}^{\infty} c_n \sin(n \pi x), \: c_n = \int_{-1}^1 x^3 \sin(n \pi x)\, dx
= 2 \int_0^1 x^3 \sin(n \pi x) \, dx .[/tex]
When we plot ##\sum_{n=1}^N c_n \sin(\pi n x)## over [0,1] and for large ##N## it looks very close to the graph of ##x^3##.

BTW, in LaTeX, if you want sin and cos (and all the other standard functions) to come out looking nice, you should precede them by a backslash, so use \sin or \cos instead of sin and cos; you will get ##\sin, \cos## instead of ##sin, cos##. See the difference?
 
  • #21
Ray Vickson said:
No, it is not. If you do the integral and then plot some of the sums ##\sum_{n=1}^N b_n \sin(2\pi n x)## for large ##N## (say ##N = 10## or ##N = 15##) and over ##0 \leq x \leq 1## you will see that your series looks nothing at all like the function ##x^3##.

Instead, we can look at the function ##x^3## over the interval (-1,1) and take its Fourier series, which will be of the form
[tex] \sum_{n=1}^{\infty} c_n \sin(n \pi x), \: c_n = \int_{-1}^1 x^3 \sin(n \pi x)\, dx
= 2 \int_0^1 x^3 \sin(n \pi x) \, dx .[/tex]
When we plot ##\sum_{n=1}^N c_n \sin(\pi n x)## over [0,1] and for large ##N## it looks very close to the graph of ##x^3##.

BTW, in LaTeX, if you want sin and cos (and all the other standard functions) to come out looking nice, you should precede them by a backslash, so use \sin or \cos instead of sin and cos; you will get ##\sin, \cos## instead of ##sin, cos##. See the difference?

I understand what you are saying, but isn't what I'm already trying to do? By finding an expression for ##b_n##

or ##c_n## in your definition. The only difference i guess, is that it is ## \pi## and not ##2 \pi##??
 
Last edited:
  • #22
8700 said:
I understand what you are saying, but isn't what I'm already trying to do? By finding an expression for ##b_n##

or ##c_n## in your definition. The only difference i guess, is that it is ## \pi## and not ##2 \pi##??

No, it is not as simple as you seem to think. I have already said exactly what happens in the two forms, but until you try it for yourself you may not fully grasp what is happening. Don't take my word for it; give it a test: try plotting the two sums I gave to see what happens.

This example is a good learning exercise, and puzzling out what is happening will help your understanding of Fourier series. And make no mistake: it is puzzling at first.

BTW: I did all the work in Maple, but if you do not have access to that program (or to Mathematica) you can use the free on-line Wolfram Alpha package to do the integrations, sums and plots.
 
  • #23
8700 said:
I integrated the function in respect of x, but only a single time. but why do i need to integrated several times? and would that still for x?

If you integrate ##\displaystyle \int x^3 \sin(2\pi nx)\,dx## by parts, you should be getting terms something like ##\dfrac{x^4}{4}\sin(2\pi nx)## and ##\displaystyle \int x^2 \cos(2\pi nx)\,dx##. (I'm not telling you exactly what the right answer is here).

Then you have to integrate the ##\displaystyle \int x^2 \cos(2\pi nx)\,dx## by parts again (twice).

I guess $$ \sin(2 \pi), \sin(4 \pi)$$... & $$\cos(2 \pi) \cos(4 \pi)$$
OK ... but what is the value of ##\sin(2\pi)##?
 
  • #24
Ray Vickson said:
No, it is not as simple as you seem to think. I have already said exactly what happens in the two forms, but until you try it for yourself you may not fully grasp what is happening. Don't take my word for it; give it a test: try plotting the two sums I gave to see what happens.

This example is a good learning exercise, and puzzling out what is happening will help your understanding of Fourier series. And make no mistake: it is puzzling at first.

BTW: I did all the work in Maple, but if you do not have access to that program (or to Mathematica) you can use the free on-line Wolfram Alpha package to do the integrations, sums and plots.

I will try giving it a shot, but you are more then correct about me being puzzled right now.

I will report back if i gives me a problem
 
  • #25
Ray is saying is that sine series are used for odd functions (with antisymmetry around 0), so he is right, the transform should use ##\sin(\pi x n)## because the sine functions actually need to be periodic over [-1, 1]. You can evaluate the integrals either over [0, 1] or [-1, 1] because of the symmetry; it shouldn't matter.

P. S.: Does your homework assignment allow you to provide the correct coefficients in terms of integrals, or must you actually evaluate the integrals?
 
  • #26
olivermsun said:
Ray is saying is that sine series are used for odd functions (with antisymmetry around 0), so he is right, the transform should use ##\sin(\pi x n)## because the sine functions actually need to be periodic over [-1, 1]. You can evaluate the integrals either over [0, 1] or [-1, 1] because of the symmetry; it shouldn't matter.

P. S.: Does your homework assignment allow you to provide the correct coefficients in terms of integrals, or must you actually evaluate the integrals?


I don't think i need to evaluate the integrals, I just want to know exactly how it works. Trying to understand the mechanics in how to solve such a problem.
 
  • #27
Why don't you step back a bit and tell us what the form of the series and the formula for the coefficients should be and how you get them? Until you get that part down, it's pointless to think about evaluating the integral.
 
  • #28
@8700: I'm going to toss in my 2 cents worth, even though part of this may be redundant, given what has already been posted. Suppose you have a periodic function ##f(x)## whose period is ##2p##, as opposed to ##2\pi##. So the interval ##(-p,p)## contains exactly one period. Then your Fourier coefficients are$$
a_n = \frac 1 p\int_{-p}^p f(x)\cos(\frac{n\pi x}{p})~dx,~~
b_n = \frac 1 p\int_{-p}^p f(x)\sin(\frac{n\pi x}{p})~dx$$and the resulting Fourier Series is$$
a_0+\sum_{n=1}^\infty \left(a_n\cos(\frac{n\pi x}{p})+b_n\sin(\frac{n\pi x}{p})\right)$$Notice that when ##p=\pi## these formulas give the standard formulas for the case when the function has period ##2\pi##. Also remember that ##p## is half the period, not the whole period.

In your example ##p=1## because you are given the definition of ##f(x)## on ##(0,1)##, and when you make the odd extension, you have one period defined on (-1,1). That is why you use the sine family ##\{\sin(\frac{n\pi x}{1})\}=\{\sin(n\pi x)\}## in your calculations.
 
  • #29
I came to this result after integrating by parts several times. I hope anyone can confirm this.


##\left ( \frac{12}{\left ( \pi n\right )^{3}}-\frac{2}{\pi n} \right ) \left ( -1 \right )^{n}##
 
  • #30
8700 said:
I came to this result after integrating by parts several times. I hope anyone can confirm this.


##\left ( \frac{12}{\left ( \pi n\right )^{3}}-\frac{2}{\pi n} \right ) \left ( -1 \right )^{n}##

That is the correct value for ##b_n##.
 
  • #31
Perfekt. Thank you :)
 

1. What is a Fourier Sine Series?

A Fourier Sine Series is a mathematical tool used to represent a periodic function as a sum of sine functions with different frequencies and amplitudes. It is a type of Fourier series that is used specifically for functions that are odd and periodic.

2. Why is it important to expand f(x) in a Fourier Sine Series?

Expanding a function in a Fourier Sine Series allows us to represent the function in terms of simpler sine functions, making it easier to analyze and manipulate. It also provides a way to approximate the function with a finite number of terms, which can be useful in applications such as signal processing and data compression.

3. What is the step-by-step process for expanding f(x) in a Fourier Sine Series?

The first step is to determine the period of the function, which is the distance between two consecutive peaks or troughs. Then, we find the coefficients of the sine functions by using the Fourier Sine Series formula. Next, we plug in the coefficients and the period into the formula to get the expanded form of the function. Finally, we can use this expanded form to approximate the original function.

4. How do you know if a function can be expanded in a Fourier Sine Series?

A function can be expanded in a Fourier Sine Series if it is odd and periodic. This means that f(x) = -f(-x) and f(x + T) = f(x), where T is the period of the function. If a function does not satisfy these conditions, it cannot be expanded in a Fourier Sine Series.

5. Can a function be expanded in both a Fourier Sine Series and a Fourier Cosine Series?

Yes, a function can be expanded in both a Fourier Sine Series and a Fourier Cosine Series. This is known as a Fourier series, which is a combination of sine and cosine functions that can represent any periodic function. However, if a function is odd, it will only have a Fourier Sine Series expansion, and if it is even, it will only have a Fourier Cosine Series expansion.

Similar threads

  • Calculus and Beyond Homework Help
Replies
2
Views
424
  • Calculus and Beyond Homework Help
Replies
1
Views
288
  • Calculus and Beyond Homework Help
Replies
3
Views
290
  • Calculus and Beyond Homework Help
Replies
22
Views
1K
  • Calculus and Beyond Homework Help
Replies
11
Views
365
  • Calculus and Beyond Homework Help
Replies
1
Views
220
  • Calculus and Beyond Homework Help
Replies
1
Views
971
  • Calculus and Beyond Homework Help
Replies
6
Views
392
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
12
Views
5K
Back
Top