# Homework Help: Fourier sine series

1. Sep 4, 2014

### 8700

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: Sep 4, 2014
2. Sep 4, 2014

### HomogenousCow

buddy, you're supposed to integrate from 0 to 1

3. Sep 4, 2014

### 8700

Yes and when i do that i get:

2(sin(1)/4-cos(1))+1 if n=1

Last edited: Sep 4, 2014
4. Sep 4, 2014

### 8700

By the way how do you use Latex here on the site???

5. Sep 4, 2014

### olivermsun

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.

6. Sep 4, 2014

### 8700

$$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?

Last edited: Sep 4, 2014
7. Sep 4, 2014

looks right

8. Sep 4, 2014

### 8700

$$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???

9. Sep 4, 2014

### olivermsun

Why is it $x^3$?

10. Sep 4, 2014

### 8700

Because the assignment say that f(x)= x^3 ???

11. Sep 4, 2014

### olivermsun

Okay, I was just confused because your original post says this:

12. Sep 4, 2014

### 8700

I've writen 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. Sep 4, 2014

### AlephZero

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$.

14. Sep 4, 2014

### olivermsun

What I'm saying is that your original post says x^2, and your later posts say x^3.

15. Sep 4, 2014

### 8700

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: Sep 4, 2014
16. Sep 4, 2014

### 8700

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: Sep 4, 2014
17. Sep 4, 2014

### 8700

yeah I see that, sorry for confusing you!

18. Sep 4, 2014

### Staff: Mentor

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

For inline LaTeX, use $and$ or a pair of $symbols. 19. Sep 4, 2014 ### 8700 I am really lost here, hope someone can help me! 20. Sep 4, 2014 ### Ray Vickson 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 = 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. Sep 4, 2014 ### 8700 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: Sep 4, 2014 22. Sep 4, 2014 ### Ray Vickson 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. Sep 4, 2014 ### AlephZero 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). OK ... but what is the value of$\sin(2\pi)$? 24. Sep 4, 2014 ### 8700 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. Sep 4, 2014 ### olivermsun 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?