Trouble determining the Fourier Cosine series for a Function

4 replies · 3K views · last reply
Arthur Yeh
Messages
2
Reaction score
0

Homework Statement


I am only interested in 9 (a)
Determine the Fourier Cosine series of the function g(x) = x(L-x) for 0 < x < L
Printed exercise sheet: part (b) of a diffusion problem with boundary conditions phi(0,t)=0, phi(L,t)=0, phi(x,0)=f(x); exercise 9 with g(x)=x(L-x) and diffusion equation boundary conditions.

Homework Equations


The Answer for 9 a.
g(x) = (L^2)/6 - ∑(L^2/(nπ)^2)cos(2nπx/L)
Printed page 50 showing series solutions: items 6 to 9 with formulas for phi(x,y), phi(x,t), f(x) and g(x) as sums of sine and cosine terms with L and n pi.


This is the relevant equation given where ω=π/L
f(t) = a0+∑ancos(nωt)
a0=1/L ∫f(t) dt from 0 to L
an=2/L∫f(t)cos(nωt) dt from 0 to L
Photo of printed course notes titled Engineering Mathematics, showing the Fourier Cosine Series for Even Functions: f(t) = a0 + sum from n=1 to infinity of an cos(n omega t), a0 = (1/L) integral from 0 to L of f(t) dt, and an = (2/L) integral from 0 to L of f(t) cos(n omega t) dt.

The Attempt at a Solution


This is my attempt at the solution
g(x) = a0 - Σancos(nωx)
where
a0=L^2/6
an= -2L^2[(cos(nπ)+1)/(nπ)^2]
I have double checked this answer both manually and through the use of an online integral calculator and i still arrive at this conclusion. As a result I believe my partial integrations are correct but my answer is in the wrong form. Initially I tried changing cos(nπ) to (-1)^n but i didnt get anywhere as i didnt couldn't get rid of the n power. I also tried working backwards from the answer using some double angle identities but did not arrive at any recognizable form.
Handwritten derivation of the Fourier cosine coefficients for g(x) = x(L-x) on 0 < x < L, showing a_0 = L^2/6 and integration by parts for a_n leading to 2[L^2 cos(nπ)/(nπ)^2 - L^2/(nπ)^2].

Handwritten derivation of Fourier cosine coefficients by integration by parts, ending with a_n = -2L^2(cos(nπ)+1)/(n^2π^2) and the series for g(x) = x(L-x).
 
Attachments
  • Handwritten derivation of Fourier cosine coefficients by integration by parts, ending with a_n = -2L^2(cos(nπ)+1)/(n^2π^2) and the series for g(x) = x(L-x).
    20180213_160254.jpg
    30 KB · Views: 852
  • Handwritten derivation of the Fourier cosine coefficients for g(x) = x(L-x) on 0 < x < L, showing a_0 = L^2/6 and integration by parts for a_n leading to 2[L^2 cos(nπ)/(nπ)^2 - L^2/(nπ)^2].
    20180213_160424.jpg
    30.5 KB · Views: 882
  • Printed exercise sheet: part (b) of a diffusion problem with boundary conditions phi(0,t)=0, phi(L,t)=0, phi(x,0)=f(x); exercise 9 with g(x)=x(L-x) and diffusion equation boundary conditions.
    20180213_160653.jpg
    20.1 KB · Views: 887
  • Printed page 50 showing series solutions: items 6 to 9 with formulas for phi(x,y), phi(x,t), f(x) and g(x) as sums of sine and cosine terms with L and n pi.
    20180213_160710.jpg
    22.3 KB · Views: 1,023
  • Handwritten working on lined paper deriving the Fourier cosine coefficient a_n by integration by parts, ending with a_n = -2L^2(cos(nπ)+1)/(n^2π^2) and the series g(x) = L^2/6 - sum of that coefficient times cos(nπx/L).
    20180213_160254.jpg
    30 KB · Views: 517
  • Photo of printed course notes titled Engineering Mathematics, showing the Fourier Cosine Series for Even Functions: f(t) = a0 + sum from n=1 to infinity of an cos(n omega t), a0 = (1/L) integral from 0 to L of f(t) dt, and an = (2/L) integral from 0 to L of f(t) cos(n omega t) dt.
    20180213_160738.jpg
    18.6 KB · Views: 957
Last edited:
Sure... I believe your integrals are correct. If you write out the first few of the a's you should be able to see that every other one goes to zero because cos(n*pi) is minus one and cos(n*pi)-1 is zero. Only the even n's count. For the even n's, let n=2*i. Then you have a sum from i=1,2,3,4...
 
  • Like
Likes   Reactions: Arthur Yeh
Thanks a lot!
I didnt think to look more closely at its behaviour for odd and even n's
 
Arthur Yeh said:

Homework Statement


I am only interested in 9 (a)
Determine the Fourier Cosine series of the function g(x) = x(L-x) for 0 < x < L
View attachment 220239

Homework Equations


The Answer for 9 a.
g(x) = (L^2)/6 - ∑(L^2/(nπ)^2)cos(2nπx/L)
View attachment 220240

This is the relevant equation given where ω=π/L
f(t) = a0+∑ancos(nωt)
a0=1/L ∫f(t) dt from 0 to L
an=2/L∫f(t)cos(nωt) dt from 0 to L
View attachment 220242

The Attempt at a Solution


This is my attempt at the solution
g(x) = a0 - Σancos(nωx)
where
a0=L^2/6
an= -2L^2[(cos(nπ)+1)/(nπ)^2]
I have double checked this answer both manually and through the use of an online integral calculator and i still arrive at this conclusion. As a result I believe my partial integrations are correct but my answer is in the wrong form. Initially I tried changing cos(nπ) to (-1)^n but i didnt get anywhere as i didnt couldn't get rid of the n power. I also tried working backwards from the answer using some double angle identities but did not arrive at any recognizable form.
View attachment 220238
View attachment 220237

You are developing a very bad habit: posting images instead of typing out your work. Most helpers will not be bothered to look at your images, so will not want to help. (See the post "Guidelines for students and helpers", by Vela, pinned to the start of this forum.)