5 7.20m, §5 Solve the Problem

We again expand everything in the problem for $v$ in a Fourier series:

Figure 4: Heat conduction in a bar.
\begin{figure}\begin{center}
\leavevmode
\epsffile{figures/2.eps}
\end{center}\end{figure}

We write

\begin{displaymath}
v = \sum_{n=1}^\infty v_n(t) X_n(x) \quad
\bar f = \sum_{n...
...bar f_n X_n(x) \quad
\bar q = \sum_{n=1}^\infty q_n(t) X_n(x)
\end{displaymath}

Since $\bar q(x)$ and $\bar f(x)$ are known functions, we can find their Fourier coefficients from orthogonality:

\begin{displaymath}
\bar f_n = \frac
{\int_0^\ell \bar f(x) X_n(x)\d x}
{\int_0^\ell X_n^2(x)\d x}
\end{displaymath}


\begin{displaymath}
\bar q_n(t) = \frac
{\int_0^\ell \bar q(x,t) X_n(x)\d x}
{\int_0^\ell X_n^2(x)\d x}
\end{displaymath}

or with the eigenfunctions written out

\begin{displaymath}
\fbox{$\displaystyle
\bar f_n = \frac
{\int_0^\ell \bar f...
... x/2\ell)\d x}
{\int_0^\ell \cos^2((2n-1)\pi x/2\ell)\d x} $}
\end{displaymath}


\begin{displaymath}
\fbox{$\displaystyle
\bar q_n(t) = \frac
{\int_0^\ell \ba...
... x/2\ell)\d x}
{\int_0^\ell \cos^2((2n-1)\pi x/2\ell)\d x} $}
\end{displaymath}

The integrals in the bottom equal $\frac12\ell$.

So the Fourier coefficients $\bar f_n$ are now known constants, and the $\bar q_n(t)$ are now known functions of $t$. Though in actual application, numerical integration may be needed to find them. During finals, I usually make the functions $f$, $g_0$ and $g_1$ simple enough that you can do the integrals analytically.

Now write the PDE $v_t = \kappa v_{xx}
+ \bar q$ using the Fourier series:

\begin{displaymath}
\sum_{n=1}^\infty \dot v_n(t) X_n(x) =
\kappa \sum_{n=1}^\infty v_n(t) X_n''(x)
+ \sum_{n=1}^\infty q_n(t) X_n(x)
\end{displaymath}

Looking in the previous section, the Sturm-Liouville ODE was $-X''
=\lambda X$, so the PDE simplifies to:

\begin{displaymath}
\sum_{n=1}^\infty \dot v_n(t) X_n(x) =
- \kappa \sum_{n=1}...
...fty \lambda_n v_n(t) X_n(x)
+ \sum_{n=1}^\infty q_n(t) X_n(x)
\end{displaymath}

It will always simplify or you made a mistake.

For the sums to be equal for any $x$, the coefficients of every individual eigenfunction must balance. So we get

\begin{displaymath}
\dot v_n(t) + \kappa \lambda_n v_n(t) = q_n(t)
\end{displaymath}

We have obtained an ODE for each $v_n$. It is again constant coefficient, but inhomogeneous.

Solve the homogeneous equation first. The characteristic polynomial is

\begin{displaymath}
k + \kappa \lambda_n = 0
\end{displaymath}

so the homogeneous solution is

\begin{displaymath}
v_{nh} = A_n e^{-\kappa\lambda_n t}
\end{displaymath}

For the inhomogeneous equation, since we do not know the actual form of the functions $q$, undetermined constants is not a possibility. So we use variation of parameter:

\begin{displaymath}
v_n = A_n(t) e^{-\kappa\lambda_n t}
\end{displaymath}

Plugging into the ODE produces

\begin{displaymath}
A_n' e^{-\kappa\lambda_n t} + 0 = q_n(t)\quad
\Longrightarrow\quad
A_n' = q_n(t) e^{\kappa\lambda_n t}
\end{displaymath}

We integrate this equation to find $A_n$. I could write the solution using an indefinite integral:

\begin{displaymath}
A_n(t) = \int q_n(t) e^{\kappa\lambda_n t} \d t
\end{displaymath}

But that has the problem that the integration constant is not explicitly shown, which makes it impossible to apply the initial condition. It is better to write the anti-derivative using an integral with limits plus an explicit integration constant as:

\begin{displaymath}
A_n(t) = \int_{\tau=0}^t q_n(\tau) e^{\kappa\lambda_n \tau} \d\tau + A_{n0}
\end{displaymath}

You can check using the Leibnitz rule for differentiation of integrals (or really, just the fundamental theorem of calculus,) that the derivative is exactly what it should be. (Also, the lower limit does not really have to be zero; you could start the integration from 1, if it would be simpler. The important thing is that the upper limit is the independent variable $t$.)

Putting the found solution for $A_n(t)$ into

\begin{displaymath}
v_n = A_n(t) e^{-\kappa\lambda_n t}
\end{displaymath}

we get, cleaned up:

\begin{displaymath}
v_n(t) = \int_{\tau=0}^t q_n(\tau)
e^{-\kappa \lambda_n(t - \tau)} \d\tau
+ A_{n0} e^{-\kappa\lambda_n t}
\end{displaymath}

We still need to find the integration constant $A_{n0}$. To do so, write the IC $v(x,0) = \bar f(x)$ using Fourier series:

\begin{displaymath}
\sum_{n=0}^\infty v_n(0) X_n(x) =
\sum_{n=0}^\infty \bar f_n X_n(x)
\end{displaymath}

This gives us initial conditions for the $v_n$:

\begin{displaymath}
v_n(0) = \bar f_n = A_{n0}
\end{displaymath}

the latter from above, and hence

\begin{displaymath}
v_n(t) = \int_{\tau=0}^t q_n(\tau)
e^{-\kappa \lambda_n(t - \tau)} \d\tau
+ \bar f_n e^{-\kappa\lambda_n t}
\end{displaymath}

or writing out the eigenvalue:

\begin{displaymath}
\fbox{$\displaystyle
v_n(t) = \int_{\tau=0}^t q_n(\tau)
e...
...^2}
\d \tau + \bar f_n e^{-\kappa (2n-1)^2\pi^2 t/4\ell^2} $}
\end{displaymath}

We have $v_n$ in terms of known quantities, so we are done.