- #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].

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

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

[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]

[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

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: