Multivariate Calculus
&
Ordinary Differential Equations

Lecture 10



1 Ordinary Differential Equations

1.7 Linear Second-Order Differential Equations with Constant Coefficients


Second-order ODEs are covered in Stewart in Sections 17.1 and 17.2.

They often correspond with unforced (homogeneous) oscillators in our applications, but they arise in many other problems.





1 Ordinary Differential Equations

1.7.1 Definition


If the unknown function and its derivatives appear linearly in an ODE, the ODE is said to be linear. Otherwise it is nonlinear .







1 Ordinary Differential Equations

1.7.1 Definition

If the unknown function and its derivatives appear linearly in an ODE, the ODE is said to be linear. Otherwise it is nonlinear .

Example: Which of the following ODEs are linear?

  • $y'' + y'=y\log x$
  • $y' = y^2 +y''$
  • $y''y' = y$
  • $y'y = y''$
  • $y'+x^3y'' = xy+3\sin x$
  • $y' = y''t^5 - t^2y$
  • $y'' = \sin y +e^x$
  • $y'' + (y')^2 = y$


1 Ordinary Differential Equations

1.7.1 Definition

A second-order linear ODE is an ODE that can be written in the form

$\ds \frac{\dup^2y}{\dup t^2}+p(t)\dif{y}{t}+q(t)y=r(t). $

The functions $p(t)$ and $q(t)$ are called the coefficients of the ODE and if $r(t)=0$ the ODE is called homogeneous.





1 Ordinary Differential Equations

1.7.2 The superposition principle

If $y_1(t)$ and $y_2(t)$ are solutions of $$ \frac{\dup^2y}{\dup t^2} + p(t)\dif{y}{t} + q(t)y=0, $$ then so is $$ y(t) = c_1\, y_1(t) + c_2\, y_2(t). $$




1 Ordinary Differential Equations

1.7.2 The superposition principle

Proof

Let $y=c_1y_1+c_2y_2$ where $y_1$ and $y_2$ are solns to the ODE.

So $\,\ddot{y}_1+p\dot{y}_1+qy_1=0\,$ and $\,\ddot{y}_2+p\dot{y}_2+qy_2=0.$

$\ds \dfrac{d^2y}{dt^2}+p(t)\frac{dy}{dt}+q(t)y $

$\ds \; = \left(c_1\ddy_1+c_2\ddy_2\right) $ $\ds +\,p(t)\left(c_1\dy_1+ c_2\dy_2\right) $ $\ds +\,q(t)\left(c_1y_1+ c_2y_2\right) $

$\ds \; = c_1\left(\ddy_1+p\dy_1+qy_1\right) + c_2\left(\ddy_2+p\dy_2+qy_2\right)$

$\ds \; = c_1(0) + c_2(0)$ $\ds = 0.\quad \bs\;$ 😃


1 Ordinary Differential Equations

1.7.2 The superposition principle

Theorem: If $y_1(t)$ and $y_2(t)$ are two linearly independent solutions (i.e., $y_2(t)\neq C y_1(t)$) of the homogeneous second-order linear ODE $$\frac{\dup^2y}{\dup t^2} + p(t)\dif{y}{t} + q(t)y=0,$$ then the general solution is given by $y(t) = c_1y_1(t) + c_2y_2(t). $

For first-order ODEs we have seen that the general solution contains one arbitrary constant. The above result suggests that for second-order ODEs the general solution should contain two arbitrary constants, and this is in fact the case.


1 Ordinary Differential Equations

1.7.3 Reduction of order

The previous theorem states that all we need to do in order to solve a homogeneous linear second-order ODE is to find two linearly independent solutions. Unfortunately, that is where the good news ends: no general method (such as the integrating factor method for linear first-order ODEs) is known to find two such solutions.

There is however a method to find a second solution once a first solution has been found. So, if you are clever enough to guess one solution (and a guess it will have to be, given that we have no general method) you can obtain a second, linearly independent solution. This goes by the name of reduction of order.



1 Ordinary Differential Equations

1.7.3 Reduction of order

Assume your smart little sister has guessed that $y_1(x)$ is a solution to

$\ds \frac{\dup^2y}{\dup x^2} + p(x)\dif{y}{x} + q(x)y=0.$

To find a second solution $y_2(x)$ you set

$\ds y_2(x)=u(x)y_1(x).$

with $u(x)$ a yet-to-be-determined function. Substituting this in the ODE gives

$\ds u'' y_1+2u'y_1'+uy_1''+p(u'y_1+uy_1')+quy_1=0.$



1 Ordinary Differential Equations

1.7.3 Reduction of order

$\ds \frac{\dup^2y}{\dup x^2} + p(x)\dif{y}{x} + q(x)y=0.$

$\ds u'' y_1+2u'y_1'+uy_1''+p(u'y_1+uy_1')+quy_1=0.$

This may also be written as

$\ds u''y_1+u'(y_1p+2y_1')+u(y_1''+py_1'+qy_1)=0.$

But $y_1$ is a solution to the ODE so the third term actually vanishes! Thus

$\ds u''+u'\Bigl(p+2\frac{y_1'}{y_1}\Bigr)=0.$

This is a first-order linear ODE in $v=u'$ which we known how to solve using an integrating factor.



1 Ordinary Differential Equations

1.7.3 Reduction of order


Example: One solution to the ODE $$ x^2 y''+2xy'-6y=0$$ is $y(x)=x^2$. Use reduction of order to find the general solution.







1 Ordinary Differential Equations

1.7.3 Reduction of order

Example: One solution to the ODE $ x^2 y''+2xy'-6y=0\,$ is $\,y(x)=x^2.$ Use reduction of order to find the general solution.

For $y_2 = u(x) x^2,$ we have that

$\quad \dy_2 = \dot u x^2 + 2xu\,$

$\quad \ddy_2 = \ddot u x^2 +\dot u(2x)+ \dot u (2x)+ 2u$ $= \ddot u x^2 +4 x \dot u+ 2u$

If we substitute in the ODE we get

$\ds x^2\left( \ddot u x^2 +4 x \dot u+ 2u\right) + 2x \left(\dot u x^2 + 2xu\right) - 6x^2u=0 $

$\ds \Ra x^4\ddot u + \left( 4x^3+2x^3\right)\dot u + \left( 2x^2+4x^2-6x^2\right) u = 0 $

$\ds \Ra x^4\ddot u + \left( 6x^3\right)\dot u = 0 $


1 Ordinary Differential Equations

1.7.3 Reduction of order

Example: One solution to the ODE $ x^2 y''+2xy'-6y=0\,$ is $\,y(x)=x^2.$ Use reduction of order to find the general solution.

$\ds \Ra x^4\ddot u + \left( 6x^3\right)\dot u = 0 $

Set $v = \dot u,$ so we get

$ x^4\dot v + \left( 6x^3\right)v = 0 $

This is a 1st order linear ODE. 😃

For $x\neq 0,$ then $\,\dot v + \dfrac{6}{x}v = 0 .$


1 Ordinary Differential Equations

1.7.3 Reduction of order

Example: One solution to the ODE $ x^2 y''+2xy'-6y=0\,$ is $\,y(x)=x^2.$ Use reduction of order to find the general solution.

For $x\neq 0,$ then $\,\dot v + \dfrac{6}{x}v = 0 .$

Here $I = \ds \exp\left(\int \frac{6}{x}~dx\right)$ $= \exp\left(6\ln |x|\right)$ $= x^6.$

$ \Ra\, \ds x^6 \dot v + x^6\dfrac{6}{x}v $ $ \,\Ra\, \ds x^6 \dot v + 6x^5 v $ $ = \ds\frac{d}{dx}\left(\left(x^6\right) v\right) $ $ = 0 $

$ \Ra\, x^6 v = K $ $ \,\Ra v = \dfrac{K}{x^6} .\;\;$ Now, since $ \, \dot u = v,$ then

$ \ds u = \int v\,dx $ $ \ds =\int \frac{K}{x^6}~dx$ $ \ds =\frac{-K}{5x^5} + K_1 $ $ \ds =\frac{K_0}{x^5} + K_1 .$


1 Ordinary Differential Equations

1.7.3 Reduction of order

Example: One solution to the ODE $ x^2 y''+2xy'-6y=0\,$ is $\,y(x)=x^2.$ Use reduction of order to find the general solution.

👉 $\, \ds u \ds =\frac{K_0}{x^5} + K_1.$ Then

$y_2 = u(x) x^2$ $= \ds \left(\frac{K_0}{x^5} + K_1 \right)x^2$ $ = \ds\frac{K_0}{x^3} + K_1x^2.$

Set $\, K_0=1\,$ & $\,K_1= 0$ $\,\Ra\ds y_2 = \dfrac{1}{x^3}$ is another solution.

😃 By the superposition principle, the general solution is:

$ y = \ds c_1 \dfrac{1}{x^3} + c_2x^2.$


1 Ordinary Differential Equations

1.7.4 Homogeneous linear second-order ODEs with constant coefficients

We next discuss how to solve a homogeneous linear second-order ODE with constant coefficients:

$ay''+by'+cy=0, \quad a\neq 0.$

The trick is to try to find a solution of the form $y=e^{\lambda t}$. Substituting this into the ODE gives

$ a\lambda^2e^{\lambda t} + b\lambda e^{\lambda t} +ce^{\lambda t}=0. $

Since $e^{\lambda t}\neq 0$ we may divide both sides of the above equation by this term to be left with the quadratic equation

$ a\lambda^2 + b\lambda + c = 0. $

This equation is called the characteristic equation of the ODE.






1 Ordinary Differential Equations

1.7.4 Homogeneous linear second-order ODEs with constant coefficients

Important remark: When you are solving ODEs of this type on your assignments and exams, you don't have to derive the characteristic equation. It is fine to simply start from the characteristic equation and solve the ODE from there.

Various scenarios can now arise, which we discuss in more detail below.

Case 1: Two distinct real roots

If $b^2-4ac>0$ the characteristic equation $a\lambda^2+b\lambda+c=0$ has two distinct real roots, say $\lambda_1$ and $\lambda_2$.



1 Ordinary Differential Equations

1.7.4 Homogeneous linear second-order ODEs with constant coefficients

Case 1: Two distinct real roots

If $b^2-4ac>0$ the characteristic equation $a\lambda^2+b\lambda+c=0$ has two distinct real roots, say $\lambda_1$ and $\lambda_2$.

In this case the general solution to the ODE is $$ y=c_1e^{\lambda_1t}+c_2e^{\lambda_2t}. $$

Question: What will this solution look like for very large $t$?

If $\lambda_1,\lambda_2\lt 0,$ $y\to 0$ as $t\to \infty.$

If $\lambda_1$ or $\lambda_2\gt 0,$ $y\to \pm \infty$ depending on the sign of $c_1,c_2.$



1 Ordinary Differential Equations

1.7.4 Homogeneous linear second-order ODEs with constant coefficients

Question: Solve the ODE $\;y''-3y'+2y=0$.

The characteristic equation is $\lambda^2 -3 \lambda +2 =0 $

Factorise: $\left(\lambda-1\right)\left(\lambda-2\right)=0.$ Then $\lambda_1=1, \lambda_2=2.$

We have two linear independet solutions

$y_1=e^t, \quad y_2 = e^{2t}$

Thus the general solution is

$y=c_1 e^t+ c_2e^{2t}.$



1 Ordinary Differential Equations

Case 2: A single root of multiplicity 2

If $b^2-4ac=0$ the characteristic equation $a\lambda^2+b\lambda+c=0$ has one root, say $\mu.$

$\quad$ General soln: $y(t) = \left(c_1 + c_2t \right) e^{\mu t}.$


Case 3: Complex roots

If $b^2-4ac\lt 0$ the characteristic equation $a\lambda^2+b\lambda+c=0$ has two complex conjugate roots, say $\alpha\pm i\beta.$

$\quad$ General soln: $ \ds y(t)=\Bigl(b_1\cos(\beta t)+b_2 \sin(\beta t)\Bigr) e^{\alpha t}. $



Credits