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

Click For Summary
SUMMARY

The discussion focuses on expanding the function f(x)=x^3 in a Fourier sine series over the interval 0≤x≤1. Participants clarify the correct formulation of the Fourier coefficients, specifically using the equation b_n=2∫_0^1 x^3 sin(2πnx) dx. The integration process requires multiple applications of integration by parts to derive the correct coefficients, which are essential for accurately representing the function as a Fourier series. The importance of using proper notation in LaTeX for sine and cosine functions is also emphasized to ensure clarity in mathematical expressions.

PREREQUISITES
  • Understanding of Fourier series and their applications
  • Proficiency in integration techniques, particularly integration by parts
  • Familiarity with LaTeX for mathematical notation
  • Knowledge of periodic functions and their properties
NEXT STEPS
  • Study the process of deriving Fourier coefficients for different functions
  • Practice integration by parts with trigonometric functions
  • Explore the use of LaTeX for mathematical documentation
  • Investigate the properties of sine and cosine functions in Fourier series
USEFUL FOR

Mathematicians, engineering students, and anyone interested in signal processing or harmonic analysis will benefit from this discussion, particularly those looking to deepen their understanding of Fourier series expansions.

8700
Messages
25
Reaction score
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_{n}sin(nx)


and

b_n=\frac{2}{∏}∫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
buddy, you're supposed to integrate from 0 to 1
 
Yes and when i do that i get:

2(sin(1)/4-cos(1))+1 if n=1
 
Last edited:
By the way how do you use Latex here on the site?
 
The Fourier series on x \in [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.
 
b_n = 2 \int_{0}^{1} x^3 sin(2 \pi n x) dx

i get the integration to give me

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

i get the integration to give me

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


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

\frac{sin(2 \pi n)}{4}-cos(2 \pi n)*2 \pi n

which gives me

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

Am i on the right path or?
 
8700 said:
b_n = 2 \int_{0}^{1} x^3 sin(2 \pi n x) dx
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:
b_n = 2 \int_{0}^{1} x^3 sin(2 \pi n x) dx

i get the integration to give me

2[\frac{x^4}{4}sin(2\pi n x)-cos(2 \pi n x)2 \pi n]_0^1
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.

\frac{sin(2 \pi n)}{4}-cos(2 \pi n)*2 \pi n

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 \sin(2 \pi), \sin( 9 \pi) for n=1 & 2 &\cos(4 \pi) \cos(8 \pi) 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[/color]] and [/tex[/color]]. You can also use $$ characters at the start and end, which are easier to type.

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

i get the integration to give me

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


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
\sum_{n=1}^{\infty} c_n \sin(n \pi x), \: c_n = \int_{-1}^1 x^3 \sin(n \pi x)\, dx<br /> = 2 \int_0^1 x^3 \sin(n \pi x) \, dx .
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
\sum_{n=1}^{\infty} c_n \sin(n \pi x), \: c_n = \int_{-1}^1 x^3 \sin(n \pi x)\, dx<br /> = 2 \int_0^1 x^3 \sin(n \pi x) \, dx .
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##.
 

Similar threads

  • · Replies 14 ·
Replies
14
Views
2K
Replies
2
Views
1K
Replies
1
Views
1K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 22 ·
Replies
22
Views
2K
Replies
12
Views
6K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
1K