# 2.3: Oscillatory Solutions to Differential Equations

- Page ID
- 92349

The boundary conditions for the string held to zero at both ends argue that \(u(x,t)\) collapses to zero at the extremes of the string (Figure \(\PageIndex{1}\)).

Unfortunately, when \(K>0\), the general solution (Equation 2.2.7) results in a sum of exponential decays and growths that cannot achieve the boundary conditions (except for the trivial solution); hence \(K<0\). This means we must introduce complex numbers due to the \(\sqrt{K}\) terms in Equation 2.2.5. So we can rewrite \(K\):

\[K = - p^2 \label{2.3.1}\]

and Equation 2.2.4b can be

\[\dfrac{d^2X(x)}{dx^2} +p^2 X(x) = 0 \label{2.3.2}\]

The general solution to differential equations of the form of Equation \ref{2.3.2} is

\[X(x) = A e^{ix} + B e^{-ix} \label{2.3.3}\]

which when substituted with Equation \(\ref{2.3.1}\) give

\[X(x) = A e^{ipx} + B e^{-ipx} \label{2.2.4}\]

Expand the complex exponentials into trigonometric functions via Euler formula (\(e^{i \theta} = \cos \theta + i\sin \theta\))

\[X(x) = A \left[\cos (px) + i \sin (px) \right] + B \left[ \cos (px) - i \sin (px) \right] \label{2.3.5}\]

collecting like terms

\[X(x) = (A + B ) \cos (px) + i (A - B) \sin (px) \label{2.3.6}\]

Introduce new *complex *constants \(c_1=A+B\) and \(c_2=i(A-B)\) so that the general solution in Equation \(\ref{2.3.6}\) can be expressed as oscillatory functions

\[X(x) = c_1 \cos (px) + c_2 \sin (px) \label{2.3.7}\]

Now let's apply the boundary conditions from Equation 2.2.7 to determine the constants \(c_1\) and \(c_2\). Substituting the first boundary condition (\(X(x=0)=0\)) into the general solutions of Equation \(\ref{2.3.7}\) results in

\[ X(x=0)= c_1 \cos (0) + c_2 \sin (0) =0 \,\,\, at \; x=0 \label{2.3.8a}\]

\[ c_1 + 0 = 0 \label{2.3.8b}\]

\[c_1=0 \label{2.3.8c}\]

and substituting the second boundary condition (\(X(x=L)=0\)) into the general solutions of Equation \(\ref{2.3.7}\) results in

\[ X(x=L) = c_1 \cos (pL) + c_2 \sin (pL) = 0 \,\,\, at \; x=L \label{2.3.9}\]

we already know that \(c_1=0\) from the first boundary condition so Equation \(\ref{2.3.9}\) simplifies to

\[ c_2 \sin (pL) = 0 \label{2.3.10}\]

Given the properties of sines, Equation \(\ref{2.3.9}\) simplifies to

\[ pL= n\pi \label{2.3.11}\]

with \(n=0\) is the *trivial solution* that we ignore so \(n = 1, 2, 3...\).

\[ p = \dfrac{n\pi}{L} \label{2.3.12}\]

Substituting Equations \(\ref{2.3.12}\) and \(\ref{2.3.8c}\) into Equation \(\ref{2.3.7}\) results in

\[X(x) = c_2 \sin \left(\dfrac{n\pi x}{L} \right) \label{2.3.13}\]

which can simplify to

\[X(x) = c_2 \sin \left( \omega x \right) \label{2.3.14}\]

with

\[\omega=\dfrac{n\pi}{L}\]

A similar argument applies to the other half of the *ansatz *(\(T(t)\)).