Second Order Differential Equations
Contents
Second Order Differential Equations#
Occur in many important applications: fluid mechanics, diffusion, heat transport, statics and circuit theory.
In general \(F(y'',y',y,x)=0\) where \(y'' = \frac{d^2y}{dx^2}\)Analytical solutions are possible (usually) only when \(2^\circ\) ODE is linear. Exceptions are two special types of \(2^\circ\) ODE that can be solved by change of variables to make \(1^\circ\) ODE.
Linear \(2^\circ\) ODE:#
where \(p(x), q(x)\) and \(r(x)\) are any functions of \(x\).
\(\rightarrow\) if \(y''\) has a coefficient, divide through.
Linear \(2^\circ\) ODEs come in two flavors:
\(r(x) = 0 \implies\) homogeneous
\(r(x) \neq 0 \implies\) non-homogeneous
\(\rightarrow\) We will begin with homogeneous equations. We will later show that once homogeneous equation has been solved, we can always solve the non-homogeneous one.
Because \(2^\circ\) ODEs typically require two integrations, we will have two constants of integration.
\(\therefore\) We need two initial/boundary conditions to find particular solutions.
Let’s begin by considering a simple example of a homogeneous linear \(2^\circ\) ODE:
Second derivative is the same as the function itself. Can you think of any solutions?
\(y(x) = e^x\)
\(y(x) = e^{-x}\)
Multiples: \(y(x) = c_1 e^x\) or \(y(x) = c_2e^{-x}\)
Sum: \(y(x) = c_1 e^x + c_2 e^{-x}\)
check: \(y' = c_1 e^x - c_2 e^{-x}\)
\(\hspace{1cm}\) \(y'' = c_1e^x + c_2 e^{-x} \implies y'' = y\) for all values of \(c_1\) and \(c_2\)
Once we noticed that \(y_1 = e^x\) and \(y_2 = e^{-x}\) are solutions, it follows that the general linear combination is also a solution.
Since \(c_1\) and \(c_2\) are arbitrary, this gives a double infinity family of solutions.
\(y_1(x)\) and \(y_2(x)\) form a basis \(\rightarrow\) they are linearly independent.
Let’s pick out a particular member of the \(\infty\) solution family that also satisfies a set of initial conditions:
(202)#\[\begin{align} y(0) = 2 && \text{and} &&y'(0) = -1 \end{align}\]These specify the value and slope of the function ar \(x=0\)
IC 1:(203)#\[\begin{align} y(0) = &2 = c_1 e^0 + c_2 e^{-0}\\ &2 = c_1 + c_2 \implies c_1 = 2 - c_2 \end{align}\]IC 2:
(204)#\[\begin{align} y'(0) = -1 &= c_1 e^0 - c_2 e^{-0}\\ -1 &= c_1 - c_2\\ c_2 &= (2-c_2) + 1\\ 2c_2 &= 3 \\ \implies c_2 = \frac{3}{2}\\ c_1 = \frac{1}{2} \end{align}\]then, \(y(x) = \frac{1}{2} e^x + \frac{3}{2}e^{-x}\)
Solution Basis#
Consider \(y(x) = c_1 e^x + c_2 e^{-x}\)
or more generally \(y(x) = c_1y_1(x) + c_2y_2(x)\)
\(\implies\) provided that \(y_1(x)\) and \(y_2(x)\) are linearly independent, they form a basis for the ODE solution. Similar concept to a basis of vectors
\(\implies\) \(y_1(x)\) and \(y_2(x)\) are linearly independent as long as \(\frac{y_1(x)}{y_2(x)}\neq \) constant
Let’s consider a general homogeneous linear \(2^\circ\) ODE with constant coefficients
with arbitrary, real coefficients (not functions of x)
Based on our exprience with simple case, let us seek exponential solutions. Let’s suppose \(y(x) = e^{\lambda x}\) where \(r\) is to be determined.
then, \(y' = \lambda e^{\lambda x}\) and \(y'' = \lambda^2 e^{\lambda x}\)Substituting these into our \(2^\circ\) ODE gives:
Since \(e^{\lambda x} \neq 0\) :
Any \(\lambda\) that is a root will give an ODE solution
The characteristic equation is a quadratic equation with real coefficients. We will have three variations on the two roots:
real and different \((a^2 - 4b > 0)\)
real but repeated \((a^2 - 4b = 0)\)
complex conjugates \((a^2 - 4b < 0)\)
Example (Case 1) Two real and different roots#
\(y'' + 2y' - 3y = 0\) ; \(y(0) = 1\) and \(y'(0) = 4\)
$y(x) = c_1 e^{\lambda_1 x} + c_2 e^{\lambda_2 x}$ is the general solution\
Either solve characteristic equation:
or with formula:
then,
Let’s double check that this works:
ODE:
Both coefficients on LHS are 0.
Now we need a particular solution
Example (Case 2): Real, double roots#
in the special circumstance that \(b = \frac{1}{4}a^2\) the characteristic equation is \(\lambda^2 + a\lambda + b = 0\) where
That’s great but it’s only one solution (half of our basis). We need another linearly independent solution. Fortunately, there is a method to obtain a basis if one solution is known:
Reduction of Order#
To obtain \(y_2(x)\) we set
then,
and
OK, let’s plug those terms back into our general linear homogeneous \(2^\circ\) ODE:
Rearrange strategically:
Now since we have \(u''\) and \(u'\) (but no \(u\)), we can reduce the order.
Let \(U = u'\) and \(U' = u''\). Now,
Since \(U = u'\), then
Integral looks ugly but it’s known since we know \(p\) and already found \(y_1\)
Now that we have \(u(x)\), we obtain our second solution, allowing us to complete our basis:
and
$\rightarrow\( Now let's use reduction of order to solve a linear homogeneous \)2^\circ$ ODE with double roots:\
Example#
\(y'' - y' + 0.25 y = 0\) ; \(y(0) = 2\) and \(y'(0) = \frac{1}{3}\)
We can either
Solve characteristic equation
Use formula
need reduction of variables to find \(y_2(x) = u(x)y_1(x)\)
and
Now,
and
Example: Case 3 (Complex roots)#
\(y'' + ay' + by = 0\) (second order, homogeneous, linear with constant coefficients)
\(\rightarrow\) complex roots when the characteristic equation \(\lambda^2 + a \lambda + b = 0\) yields
Then,
\(\omega\) is always real.
How to evaluate imaginary exponentials?
(Aside) Complex exponentials#
For any complex number \(z = s + it\),
\(e^z = e^{s + it} = e^se^{it} \equiv e^s(\cos t + i\sin t)\)\
Look at \(e^{it}\):
\(\rightarrow e^{it}\) oscillates back and forth into imaginary space.
Derivative:
So,
and
Now,
Looks messy, but remember, we can pick any basis as long as it solves the ODE.
If
Let’s define
and
Then, we can say
where \(A\) and \(B\) are our arbitrary constants. All components of the solution are real.