# Solve Second Order Differential Equations - part 3

A tutorial on how to solve second order differential equations with auxiliary equation having 2 distinct complex solutions. Examples with detailed solutions are included.

The auxiliary equation of a second order differential equation d^{2}y / dx^{2} + b dy / dx + c y = 0 is given by

k^{2} + b k + c = 0

If b^{2} - 4c is < 0, the equation has 2 complex conjugate solution of the form

k1 = r + t i and k2 = r - t i , where i is the imaginary unit.

In such case, it can be shown that the general solution to the second order differential equation may be written as follows

y = e^{r x} [ A cos x t + B sin x t ] where A and B are constants.

## Examples

Example 1: Solve the second order differential equation given by**y" + y' + 2 y = 0**

__Solution to Example 1__

The auxiliary equation is given by

k^{2} + k + 2 = 0

Solve for k to obtain 2 complex conjugate solutions

k1 = -1 / 2 - i √7 / 2

and k2 = -1 / 2 + i √7 / 2,

r = -1/2 (real part)

and t = √7 /2 (imaginary part)

The general solution to the given differential equation is given by

y = e^{- x / 2} [ A cos ((√7 /2) x) + B sin ((√7/2) x) ]

where A and B are constants.

Example 2: Solve the second order differential equation given by

**y" + √3 y' + 3 y = 0**

with the initial conditions y(0) = 1 and y'(0) = 0

__Solution to Example 2__

The auxiliary equation is given by

k^{2} + √3 k + 3 = 0

Solve the quadratic equation to obtain

k1 = - √3/2 + 3/2 i and k2 = - √3/2 - 3/2 i

The general solution to the given differential equation is given by

y = e^{-(√3/2) x}[ A sin (3/2)x + B cos (3/2)x ]

The initial condition y(0) = 1 gives

y(0) = e^{0} [ A sin 0 + B cos (0) ] = 1 which gives B = 1

y'(0) = 0 gives

y'(0) = -(√3/2)e^{0} [ A sin 0 + B cos 0 ] + e^{0} [ (3/2) A cos 0 - (3/2) B sin 0 ]

Solve the system of equations B = 1
and -(√3/2) B + (3/2) A = 0 to obtain

A = √3/3 and B = 1

The solution may be written as

y = e^{-(√3/2) x} [ (√3/3) sin (3/2) x + cos (3/2) x]

## Exercises

Solve the following differential equations.1. y" - y' + y = 0

2. y" + y = 0 with the initial conditions y(0) = 1 and y'(0) = 0

__Answers to Above Exercises__

1. y = A e

^{ x / 2}[ A cos (√3 / 2) x + B sin (√3 / 2) x ] , A and B constant

2. y = cos x

More references on
Differential Equations

Differential Equations - Runge Kutta Method