Je m'appelle
- 117
- 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 c_n, the part where I'm stuck is highlighted in red.
The following is just a step-by-step solution of how I got to c_n.
Heat Equation
\alpha^2 \frac{\partial^2}{\partial x^2}u(x,t) = \frac{\partial}{\partial t}u(x,t)
Initial Conditions
1. u(0,t) = T_1 = 20,\ u(30,t) = T_2 = 50,\ \forall \ t > 0
2. u(x,0) = 60 - 2x \ \forall \ 0 < x < 30
3. \alpha^2 = 1
Solution
So the general solution would be the steady-state temperature v(x) plus the transient temperature w(x,t) such as
u(x,t) = v(x) + w(x,t)
I found out that
v(x) = 20 + x
f(x) = u(x,0) + v(x) = w(x,0) + v(x) = 80 - x
Then by evaluating the general expression for the nonhomogeneous heat equation I got to
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})
Where
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
My struggling begins here, at c_n, let's evaluate it.
By using the initial conditions it can be rewritten as
c_n = \frac{1}{15}\int_{0}^{30} (60 - 2x) sin(\frac{n \pi x}{30}) dx
I'll break it into two integrals as follows
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
c_n = (I) + (II)
Let's solve the integrals separately, solving (I) first
(I) = 4 \int_{0}^{30} sin(\frac{n \pi x}{30}) dx
(I) = \frac{120}{n \pi}(-cos(n \pi) + 1)
Now here, I can consider two solutions, (I) = 0 for n ''even'' or (I) = \frac{240}{n \pi} for n ''odd''.
Now, solving (II)
(II) = \frac{2}{15}\int_{0}^{30} x sin(\frac{n \pi x}{30}) dx
(II) = \frac{120}{n \pi}(\frac{sin(n\pi)}{\pi} - cos(n \pi))
Now, sin(n\pi) = 0 for n ''odd'' or ''even'', therefore the solution of (II) becomes
(II) = \frac{120}{n \pi}( - cos(n \pi))
Which will be \frac{120}{n \pi} for n ''odd'' or -\frac{120}{n \pi}for n ''even''.
So as you can see, I have two possible solutions for c_n 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'':
c_n = (I)_{odd} + (II)_{odd}
c_n = \frac{120}{n\pi}
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})
For all n ''even'':
c_n = (I)_{even} + (II)_{even}
c_n = -\frac{120}{n\pi}
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})
So which solution should I use? The one for the n ''odd'' or the one for n ''even''?
The following is just a step-by-step solution of how I got to c_n.
Heat Equation
\alpha^2 \frac{\partial^2}{\partial x^2}u(x,t) = \frac{\partial}{\partial t}u(x,t)
Initial Conditions
1. u(0,t) = T_1 = 20,\ u(30,t) = T_2 = 50,\ \forall \ t > 0
2. u(x,0) = 60 - 2x \ \forall \ 0 < x < 30
3. \alpha^2 = 1
Solution
So the general solution would be the steady-state temperature v(x) plus the transient temperature w(x,t) such as
u(x,t) = v(x) + w(x,t)
I found out that
v(x) = 20 + x
f(x) = u(x,0) + v(x) = w(x,0) + v(x) = 80 - x
Then by evaluating the general expression for the nonhomogeneous heat equation I got to
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})
Where
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
My struggling begins here, at c_n, let's evaluate it.
By using the initial conditions it can be rewritten as
c_n = \frac{1}{15}\int_{0}^{30} (60 - 2x) sin(\frac{n \pi x}{30}) dx
I'll break it into two integrals as follows
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
c_n = (I) + (II)
Let's solve the integrals separately, solving (I) first
(I) = 4 \int_{0}^{30} sin(\frac{n \pi x}{30}) dx
(I) = \frac{120}{n \pi}(-cos(n \pi) + 1)
Now here, I can consider two solutions, (I) = 0 for n ''even'' or (I) = \frac{240}{n \pi} for n ''odd''.
Now, solving (II)
(II) = \frac{2}{15}\int_{0}^{30} x sin(\frac{n \pi x}{30}) dx
(II) = \frac{120}{n \pi}(\frac{sin(n\pi)}{\pi} - cos(n \pi))
Now, sin(n\pi) = 0 for n ''odd'' or ''even'', therefore the solution of (II) becomes
(II) = \frac{120}{n \pi}( - cos(n \pi))
Which will be \frac{120}{n \pi} for n ''odd'' or -\frac{120}{n \pi}for n ''even''.
So as you can see, I have two possible solutions for c_n 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'':
c_n = (I)_{odd} + (II)_{odd}
c_n = \frac{120}{n\pi}
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})
For all n ''even'':
c_n = (I)_{even} + (II)_{even}
c_n = -\frac{120}{n\pi}
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})
So which solution should I use? The one for the n ''odd'' or the one for n ''even''?
Last edited: