Solution of Heat Equation Through Fourier Series.

  • #1
119
0
OK, so I was trying to solve the Heat Equation with Inhomogeneous boundary conditions for a rod through Fourier Series when I got stuck at the solution for the coefficient [tex]c_n[/tex], the part where I'm stuck is highlighted in red.

The following is just a step-by-step solution of how I got to [tex]c_n[/tex].

Heat Equation

[tex]\alpha^2 \frac{\partial^2}{\partial x^2}u(x,t) = \frac{\partial}{\partial t}u(x,t) [/tex]

Initial Conditions


1. [tex]u(0,t) = T_1 = 20,\ u(30,t) = T_2 = 50,\ \forall \ t > 0[/tex]

2. [tex]u(x,0) = 60 - 2x \ \forall \ 0 < x < 30[/tex]

3. [tex]\alpha^2 = 1[/tex]


Solution

So the general solution would be the steady-state temperature [tex]v(x)[/tex] plus the transient temperature [tex]w(x,t)[/tex] such as

[tex]u(x,t) = v(x) + w(x,t)[/tex]

I found out that

[tex]v(x) = 20 + x[/tex]

[tex]f(x) = u(x,0) + v(x) = w(x,0) + v(x) = 80 - x[/tex]

Then by evaluating the general expression for the nonhomogeneous heat equation I got to

[tex] u(x,t) = T_1 + (T_2 - T_1)\frac{x}{L} + \sum_{n=1}^{+\infty} c_n e^{-\frac{n^2 \pi^2 \alpha^2}{L^2}t} sin(\frac{n \pi x}{L}) [/tex]

Where

[tex]c_n = \frac{2}{L}\int_{0}^{L} [f(x) - (T_2 - T_1)\frac{x}{L} - T_1] sin(\frac{n \pi x}{L}) dx [/tex]

My struggling begins here, at [tex]c_n[/tex], let's evaluate it.

By using the initial conditions it can be rewritten as

[tex]c_n = \frac{1}{15}\int_{0}^{30} (60 - 2x) sin(\frac{n \pi x}{30}) dx [/tex]

I'll break it into two integrals as follows

[tex]c_n = \frac{1}{15}\int_{0}^{30} 60 sin(\frac{n \pi x}{30}) dx - \frac{1}{15}\int_{0}^{30} 2x sin(\frac{n \pi x}{30})dx[/tex]

[tex]c_n = (I) + (II) [/tex]

Let's solve the integrals separately, solving (I) first

[tex](I) = 4 \int_{0}^{30} sin(\frac{n \pi x}{30}) dx [/tex]

[tex](I) = \frac{120}{n \pi}(-cos(n \pi) + 1)[/tex]

Now here, I can consider two solutions, (I) = 0 for n ''even'' or (I) = [tex]\frac{240}{n \pi}[/tex] for n ''odd''.

Now, solving (II)

[tex](II) = \frac{2}{15}\int_{0}^{30} x sin(\frac{n \pi x}{30}) dx[/tex]

[tex](II) = \frac{120}{n \pi}(\frac{sin(n\pi)}{\pi} - cos(n \pi)) [/tex]

Now, [tex]sin(n\pi) = 0[/tex] for n ''odd'' or ''even'', therefore the solution of (II) becomes

[tex](II) = \frac{120}{n \pi}( - cos(n \pi)) [/tex]

Which will be [tex]\frac{120}{n \pi}[/tex] for n ''odd'' or [tex]-\frac{120}{n \pi}[/tex]for n ''even''.

So as you can see, I have two possible solutions for [tex]c_n[/tex] which happens when either n is ''odd'' or ''even'', my question is, which one should I consider? The one for all n ''odd'' or the one for all n ''even''?

Like, if I carry on I would eventually get to

For all n ''odd'':

[tex]c_n = (I)_{odd} + (II)_{odd} [/tex]

[tex]c_n = \frac{120}{n\pi}[/tex]

[tex] u(x,t) = (20 + x) + \frac{120}{\pi}\sum_{n=1,3,5,...}^{+\infty} \frac{1}{n} e^{-\frac{n^2 \pi^2}{900}t} sin(\frac{n \pi x}{30}) [/tex]

For all n ''even'':

[tex]c_n = (I)_{even} + (II)_{even} [/tex]

[tex]c_n = -\frac{120}{n\pi}[/tex]

[tex] u(x,t) = (20 + x) - \frac{120}{\pi}\sum_{n=2,4,6,...}^{+\infty} \frac{1}{n} e^{-\frac{n^2 \pi^2}{900}t} sin(\frac{n \pi x}{30}) [/tex]

So which solution should I use? The one for the n ''odd'' or the one for n ''even''?
 
Last edited:

Answers and Replies

  • #2
1,444
4
How it is that your two different conditions give one u(0,0)=20 and the second one u(0,0)=60?
 
  • #3
119
0
How it is that your two different conditions give one u(0,0)=20 and the second one u(0,0)=60?
They don't.

For [tex]u(x,0) = 60 - 2x[/tex]

we have 0 < x < 30

and for [tex]u(0,t) = 20[/tex]

we have t > 0.

I guess I haven't specified it very clear in the initial conditions on the original post, I'll edit that.

Here's the problem:

[PLAIN]http://img3.imageshack.us/img3/4238/ff212.jpg [Broken]
 
Last edited by a moderator:
  • #4
1,444
4
From (19) you have discontinuity at x=0? For t=0 you have u(0+,0)=60-0=60
And for t>0 you have u(0,t)=20. Just checking ...
 
Last edited:
  • #5
1,444
4
As for your odd-even problem: why don't you use odd solution for odd n and even solution for even n? I do not get it. After all you have to sum over n from 1 to infinity.....
 
  • #6
119
0
Hey, I think I've got it, listen

For all n ''odd'':

[tex]c_n = (I)_{odd} + (II)_{odd} [/tex]

[tex]c_n = \frac{120}{n\pi}[/tex]

[tex] u(x,t) = (20 + x) + \frac{120}{\pi}\sum_{n=1,3,5,...}^{+\infty} \frac{1}{n} e^{-\frac{n^2 \pi^2}{900}t} sin(\frac{n \pi x}{30}) [/tex]

For all n ''even'':

[tex]c_n = (I)_{even} + (II)_{even} [/tex]

[tex]c_n = -\frac{120}{n\pi}[/tex]

[tex] u(x,t) = (20 + x) - \frac{120}{\pi}\sum_{n=2,4,6,...}^{+\infty} \frac{1}{n} e^{-\frac{n^2 \pi^2}{900}t} sin(\frac{n \pi x}{30}) [/tex]

So which solution should I use? The one for the n ''odd'' or the one for n ''even''?
[tex]\frac{1}{n} e^{-\frac{n^2 \pi^2}{900}t} sin(\frac{n \pi x}{30}) [/tex]

is an even function right?

As both

[tex](\frac{1}{n}e^{-\frac{n^2 \pi^2}{900}t})[/tex] and [tex]sin(\frac{n \pi x}{30})[/tex] are odd functions, their product is an even function and therefore, for even functions

[tex]f(-x) = f(x)[/tex]

So I guess

[tex]\frac{120}{\pi}\sum_{n=1,3,5,...}^{+\infty} \frac{1}{n} e^{-\frac{n^2 \pi^2}{900}t} sin(\frac{n \pi x}{30}) = \frac{120}{\pi}\sum_{n=2,4,6,...}^{+\infty} (\frac{-1}{n}) e^{-\frac{n^2 \pi^2}{900}t} sin(\frac{n \pi x}{30}) [/tex]

And therefore as both solutions are equal for all n I can rewrite it as

[tex] u(x,t) = (20 + x) + \frac{60}{\pi}\sum_{n=1}^{+\infty} \frac{1}{n} e^{-\frac{n^2 \pi^2}{900}t} sin(\frac{n \pi x}{30}) [/tex]

What do you say? Is this acceptable?
 
Last edited:
  • #7
1,444
4
I do not understand what you are doing. You have 0<x<30, so the question of even-odd functions should not even arise. The exponential is a constant function (as a function of x), why you call it odd? Why don't you just add two sums, one for n even, one for n odd, including your (I) and (II) and simplifying according to the case?
 
  • #8
119
0
I do not understand what you are doing. You have 0<x<30, so the question of even-odd functions should not even arise. The exponential is a constant function (as a function of x), why you call it odd? Why don't you just add two sums, one for n even, one for n odd, including your (I) and (II) and simplifying according to the case?
Oh, you're right, what was I doing? :tongue: Never mind the previous post. I guess I'll just add the two sums then.

Thanks arkajad.
 
  • #9
LCKurtz
Science Advisor
Homework Helper
Insights Author
Gold Member
9,547
760
You started with the substitution

u(x,t) = v(x) + w(x,t)

This will give you w(x,0) = u(x,0) - v(x). You have correctly determined that v(x) = 20 + x so you should have

w(x,0) = 60 - 2x - (20 + x) = 40 - 3x.

It looks to me like you are copying a general answer from a text instead of understanding what you are doing. You should be solving the W system:

wxx(x,t) = wt(x,t)
w(0,t) = 0, w(0,30) = 0
w(x,0) = 40 - 3x.

Once you get w(x,t) you will add v(x) to it to get the solution. Eventually you should come to the fourier series

[tex]40 - 3x = \sum_{n = 1}^{\infty}b_n\sin\frac{n\pi}{30}x[/tex]

for which you can use the half range sine coefficients. Don't break it into odd and even, just calculate them.
 

Related Threads on Solution of Heat Equation Through Fourier Series.

Replies
15
Views
3K
Replies
3
Views
1K
Replies
2
Views
1K
Replies
3
Views
2K
  • Last Post
Replies
2
Views
912
Replies
4
Views
1K
Replies
2
Views
3K
Replies
8
Views
2K
Replies
2
Views
2K
  • Last Post
Replies
1
Views
2K
Top