Wednesday, March 27, 2013

Simple Partial Differential Equations Example

I am really enjoying my current partial differential equations class, so I thought I'd share an example problem. Note that this is probably one of the simplest problems in partial DE.

Problem

\begin{equation}
  \text{(1)    } k^2 \frac{\partial^2 U}{\partial t^2} = \frac{\partial^2 U}{\partial x^2}
\end{equation}
\begin{equation}
  \text{(2)    } U \left( 0, t \right) = 0
\end{equation}
\begin{equation}
  \text{(3)    } U \left( L, t \right) = 0
\end{equation}
\begin{equation}
  \text{(4)    } U \left( x, 0 \right) = 0
\end{equation}
\begin{equation}
  \text{(5)    } \frac{\partial U}{\partial t} \left( x, 0 \right) = f \left( x \right)
\end{equation}

Solution


We are looking for a solution of the form:
\[
  U = XT
\]
Where \(X\) is a function of \(x\) and \(T\) is a function of \(t\).

Translating (1) to match the expected solution, we get:
\[
  k^2 XT^{\prime\prime} = X^{\prime\prime} T
\]

Dividing each side by \( XT \):
\[
  k^2 \frac{T^{\prime\prime}}{T} = \frac{X^{\prime\prime}}{X}
\]

Since we have a function of only \(T\) on the left and only \( X \) on the right, we know that these are equal to a constant.
\[
  k^2 \frac{T^{\prime\prime}}{T} = \frac{X^{\prime\prime}}{X} = constant = \left\{\begin{array}{lr}
  0 \\
  -\lambda^2 \\
  \lambda^2
\end{array}   \right.
\]

The notation above says that the constant can either be \(0\), some negative number (as forced to be negative by \( -\lambda^2 \)) or some positive number (forced by \( \lambda^2 \)).

Case \( constant = 0 \):

Finding \( X \):
\[
  \frac{X^{\prime\prime}}{X} = 0 \Rightarrow X^{\prime\prime} = 0
\]

Integrating both sides:
\[
  X^{\prime} = A
\]
Where \( A \) is an arbitrary constant.

Integrating again:
\[
  X = A x + B
\]
Where \( B \) is an arbitrary constant.

Finding \( T \):
\[
  \frac{k^2 T^{\prime\prime}}{T} = 0 \Rightarrow T^{\prime\prime} = 0
\]

Integrating both sides:
\[
  T^{\prime} = C
\]
Where \( C \) is an arbitrary constant.

Integrating again:
\[
  T = C t + D
\]
Where \( D \) is an arbitrary constant.

Since \( U = XT \):
\[
  U = \left(A x + B\right) \left( C t + D \right)
\]
Therefore, this satisfies (1).

Looking at (2), we have:
\[
  U \left( 0, t \right) = 0 \Rightarrow \left(A (0) + B\right) \left( C t + D \right) = 0 \Rightarrow B \left( C t + D \right)= 0
\]

This implies that \( B = 0 \), so:
\[
  U = A x \left( C t + D \right) = x \left( C t + D \right)
\]
satisfies (1) and (2); note that the constant \( A \) was absorbed into the other constants (since they are, after all, just arbitrary constants).

Looking at (3), we have:
\[
  U \left( L, t \right) = 0 \Rightarrow L \left( C t + D \right) = 0
\]

To make this true, we can't change the value of \( L \) because it is a constraint, so the only option is to make \( C = D = 0\).

So,
\[
  U = 0
\]
This, however, is an uninteresting solution for \( U \). So, we examine the next possible constant.

Case \( constant = -\lambda^2 \):

Finding \( X \):
\[
  \frac{X^{\prime\prime}}{X} = -\lambda^2
\]

Multiply both sides by \( X \):
\[
  X^{\prime\prime} = -\lambda^2 X
\]

Using methods from differential equations (DE), we know that we can solve this by subbing \( \alpha^2 \) in for \( X^{\prime\prime} \) and \( 1 \) in for \( X \):
\[
  \alpha^2 = -\lambda^2
\]

Taking the square root of both sides we get:
\[
  \alpha = \pm \lambda i
\]

From DE we know that this fits the form \(\alpha = b \pm c i \), where the answer the the DE is:
\[
  X = e^{bx} \left[ A \cos \left( c x \right) + B \sin \left( c x \right)\right]
\]
Where \(A\) and \(B\) are arbitrary constants.

Therefore:
\[
  X = e^{0x} \left[ A \cos \left( \lambda x \right) + B \sin \left( \lambda x \right)\right] = \left[ A \cos \left( \lambda x \right) + B \sin \left( \lambda x \right)\right]
\]

Finding \( T \):

\[
  k^2 \frac{T^{\prime\prime}}{T} = -\lambda^2
\]

Multiply both sides by \( \frac{T}{k^2} \):
\[
  T^{\prime\prime} = -\frac{\lambda^2}{k^2} T
\]

Using methods from differential equations (DE), we know that we can solve this by subbing \( \beta^2 \) in for \( T^{\prime\prime} \) and \( 1 \) in for \( T \):
\[
  \beta^2 = -\frac{\lambda^2}{k^2}
\]

Taking the square root of both sides we get:
\[
  \beta = \pm \frac{\lambda}{k} i
\]

From DE we know that this also fits the form \(\beta = b \pm c i \), where the answer the the DE is:
\[
  T = e^{bt} \left[ C \cos \left( c t \right) + D \sin \left( c t \right)\right]
\]
Where \(C\) and \(D\) are arbitrary constants (not necessarily the same as \(A\) and \( B \)).

Therefore:
\[
  T = e^{0t} \left[ C \cos \left( \frac{\lambda}{k} t \right) + D \sin \left( \frac{\lambda}{k} t \right)\right] = \left[ C \cos \left( \frac{\lambda}{k} t \right) + D \sin \left( \frac{\lambda}{k} t \right)\right]
\]

Since \( U = XT \):
\[
  U = \left[ A \cos \left( \lambda x \right) + B \sin \left( \lambda x \right)\right] \left[ C \cos \left( \frac{\lambda}{k} t \right) + D \sin \left( \frac{\lambda}{k} t \right)\right]
\]
Therefore, this satisfies (1).

Looking at (2), we have:
\[
  U \left( 0, t \right) = 0 \Rightarrow \left[ A \cos \left( 0 \right) + B \sin \left( 0 \right)\right] \left[ C \cos \left( \frac{\lambda}{k} t \right) + D \sin \left( \frac{\lambda}{k} t \right)\right] = 0
\]

\(\cos \left( 0 \right) = 1\) and \( \sin \left( 0 \right) = 0\), so,
\[
  A \left[ C \cos \left( \frac{\lambda}{k} t \right) + D \sin \left( \frac{\lambda}{k} t \right)\right] = 0
\]

This implies that \( A = 0 \), so:
\[
  U = \sin \left( \lambda x \right) \left[ C \cos \left( \frac{\lambda}{k} t \right) + D \sin \left( \frac{\lambda}{k} t \right)\right]
\]  
satisfies (1) and (2); note that the constant \( B \) was absorbed into the other constants (since they are, after all, just arbitrary constants).

Looking at (3), we have:
\[
  U \left( L, t \right) = 0 \Rightarrow \sin \left( \lambda L \right) \left[ C \cos \left( \frac{\lambda}{k} t \right) + D \sin \left( \frac{\lambda}{k} t \right)\right] = 0
\]

So, we need to pick a value for \( \lambda \) that causes the above expression to always be zero. We find that there are an infinite number of them (everywhere \( \sin \left( n \pi \right) \) where n is a natural number (better suited to match the solution than an integer). So, because of this, we find that:
\[
  \lambda = \frac{n \pi}{L},\, \forall n \in \mathbb{N}
\]

So, subbing in for \( \lambda \), we have:
\[
  U = \sin \left( \frac{n \pi x}{L} \right) \left[ C \cos \left( \frac{n \pi}{L k} t \right) + D \sin \left( \frac{n \pi}{L k} t \right)\right]
\]
Which satisfies (1), (2) and (3).

Looking at (4), we have:
\[
  U \left( x, 0 \right) = 0 \Rightarrow \sin \left( \frac{n \pi x}{L} \right) \left[ C \cos \left( 0 \right) + D \sin \left( 0 \right)\right] = 0
\]

\(\cos \left( 0 \right) = 1\) and \( \sin \left( 0 \right) = 0\), so,
\[
    U \left( x, 0 \right) = 0 \Rightarrow \sin \left( \frac{n \pi x}{L} \right) \left( C \right) = 0
\]

This implies that \( C = 0\), so,
\[
  U = \sin \left( \frac{n \pi x}{L} \right) \left( D \right) \sin \left( \frac{n \pi}{L k} t \right)
\]
Satisfies (1), (2), (3) and (4).

Since constraint (5) is non-zero, I will evaluate it lastly. For now, I claim that:
\[
  U = \sum_{n = 1}^{\infty} D_n \sin \left( \frac{n \pi x}{L} \right) \sin \left( \frac{n \pi}{L k} t \right)
\]
\( \forall n \in \mathbb{N}\), also satisfies (1), (2), (3), and (4). This claim is justified because, as show above, constraint (3) is satisfied for all values of \( n \). So, for whatever \( n \) I pick from the natural numbers (\( 1,2,3...\), \(\mathbb{N}\)) the resulting \( U \) will also be an answer. So, summing together the infinite answers for \( U \) still meets the problem's criteria. \( D \) became \( D_n \) because \( D \) is not necessarily the same thing for any \( n \) value.

So, considering constraint (5), we need to first find \( \frac{\partial U}{\partial t}\):
\[
  \frac{\partial U}{\partial t} = \sum_{n = 1}^{\infty} D_n \sin \left( \frac{n \pi x}{L} \right) \left( \frac{n \pi}{L k} \right) \cos \left( \frac{n \pi}{L k} t \right)
\]

Looking at the actual constraint, (5):
\[
  \frac{\partial U}{\partial t} \left( x, 0 \right) = f \left( x \right) \Rightarrow \sum_{n = 1}^{\infty} D_n \sin \left( \frac{n \pi x}{L} \right) \left( \frac{n \pi}{L k} \right) \cos \left( 0 \right) = f \left( x \right)
\]

Since, \( \cos \left( 0 \right) = 1\):
\[
  f \left( x \right) = \sum_{n = 1}^{\infty} D_n \sin \left( \frac{n \pi x}{L} \right) \left( \frac{n \pi}{L k} \right)
\]

By the Fourier sine series, we know that the coefficients are given by:
\[
  D_n \left( \frac{n \pi}{L k} \right) = \frac{2}{L} \int_0^L f \left( x \right) \sin \left( \frac{n \pi x}{L} \right) dx
\]
We include \( \left( \frac{n \pi}{L k} \right) \) because it does not match the Fourier series and needs to be divided out.

Solving for the actual coefficients:
\[
  D_n = \frac{2 k}{n \pi} \int_0^L f \left( x \right) \sin \left( \frac{n \pi x}{L} \right) dx
\]

Where our final \( U \) is, as above:
\[
  U = \sum_{n = 1}^{\infty} D_n \sin \left( \frac{n \pi x}{L} \right) \sin \left( \frac{n \pi}{L k} t \right)
\]

Now, we could go on to examine the \( constant = \lambda^2 \) case. However, it ends up just being \( 0 \) (and is therefore redundant). You can use methods like those above to come to this conclusion for yourself.

No comments:

Post a Comment