# Second Order Linear Differential Equations

There are two types of second order linear differential equations: Homogeneous Equations, and Non-Homogeneous Equations.

**Homogeneous Equations:**

**General Form of Equation:**

These equations are of the form:

A(x)y" + B(x)y' + C(x)y = 0

where y’=(dy/dx) and A(x), B(x) and C(x) are functions of independent variable ‘x’.

For the purpose of this article we will learn how to solve the equation where all the above three functions are constants.

**Properties:****(I)**Suppose**g(x)**is a solution of the homogeneous equation. We will prove that**‘cg(x)’**is also a solution, where c is a constant.Ag"+Bg'+Cg = 0 (1) Now, A(cg)" + B(cg)' + Cg = cAg" + cBg' + Cg = c(Ag" + Bg' + Cg) = c(0) [From (1)] = 0

Hence, ‘cg(x)’ is also a solution.

**(II)**Suppose h(x) is also a solution along with g(x).We will prove that ‘h(x)+g(x)’ is also a solution.Ag"+Bg'+Cg = 0 (1) Ah"+Bh'+Ch = 0 (2) Now, A(h+g)" + B(h+g)' + C(h+g) = A(h"+g") + B(h'+g') + C(h+g) = (Ah" + Bh' + Ch) + (Ag" + Bg' + Cg) = 0 + 0 [From (1) and (2)] = 0

**(III)**From I and II we can say that the general solution of a homogeneous equation is:'kg(x) + ch(x)'

where ‘k’ and ‘c’ are arbitrary constants.

**Solving Homogeneous Equations:**

The basic step is of course is to ‘guess’ the function which satisfies the equation. But in this case I have done this for you. The first step involves assuming,rx where ‘r’ is some real number(may be complex also as we will see!).

So,Ar

^{2}e^{rx}+ Be^{rx}r + Ce^{rx}= 0 (e^{rx})(Ar^{2}+ Br + C) = 0 [Taking e^{rx}common from all the terms] Ar^{2}+ Br + C = 0 [As e^{rx}cannot be zero]Based on above equation 3 cases arise:

**(I)**If both roots are real, say r_{1}and r_{2}, then the solution will bef(x) = c

_{1}(e^{r1x}) + c_{2}(e^{r2x})**(II)**If the roots are complex then they must be conjugate as the coefficients of the quadratic equation are real.Let r1 = a1 + ia2, r2 = a1 - ia2

where ‘i’ is iota, i.e., ‘i’ is square root of (-1).

So, the general solution will be:f(x) = c

_{1}e^{r1x}+ c_{2}e^{r2x}which if you will simplify will look like:

f(x) = e

^{a1x}(k_{1}cos(a_{2}x) + k_{2}sin(a_{2}x))[ I hope you know e

^{it}= cos(t) + isin(t), Also k_{1}and k_{2}are different from c_{1}and c_{2}].

I also encourage you to find the relation between k_{1}and k_{2}and c_{1}and c_{2}.**(III)**If the roots are repeated, then y = ce^{rx}is not the general solution but only a particular solution. So what to do? Hence again assume,y = p(x)e

^{rx}where ‘r’ is the root that you got in the above equation. By solving you will get that

p(x)=c

_{1}x + c_{2}Hence your general solution will look like,

y = (c

_{1}x + c_{2})e^{rx}

These examples will give you clarity:

**Example-1:**

y" + 5y' + 6y = 0

Assume y = e^{rx}.Putting this in the equation, we finally get:

r^{2}+ 5r + 6 = 0 (r+2)(r+3) = 0 r = (-2) OR r = (-3)

So,

r_{1}= (-2) and r_{2}= (-3)

Since both are real the general solution will be:

y = c_{1}e^{(-2x)}+ c_{2}e^{(-3x)}

**Example-2:**

y" + y' + y = 0

Again assume y = r^{rx} and solve for ‘r’. Your ‘r’ will look something like this:

r_{1}= (-1/2) + i(-sqrt(3)/2) and r_{2}= (-1/2) - i(-sqrt(3)/2) So, a_{1}= (-1/2) and a_{2}= (sqrt(3)/2)

Hence the general solution will look like this:

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

**Example-3:**

y" + 4y' + 4y = 0

Again assume y = r^{rx} and solve for ‘r’. The ‘particular solution will be:

y = ce^{2x}

Assume **y = p(x)e ^{2x}**.Putting it in the differential equation will give you:

p" = 0 which implies p'= c_{2}which again implies p = c_{1}x + c_{2}

Hence the general solution will be:

y = (c_{1}x + c_{2})e^{2x}

## Recommended Posts:

- Mathematics | L U Decomposition of a System of Linear Equations
- Mathematics | System of Linear Equations
- Subgroup and Order of group | Mathematics
- Check if a number is Prime, Semi-Prime or Composite for very large numbers
- Python - Legendre polynomials using Recursion relation
- Lehmann's Primality Test
- Hyperbolic Functions
- Lagrange Multipliers
- Gauss's Forward Interpolation
- Finite Group in Algebraic Structure
- Counting Boolean function with some variables
- Program for Picard's iterative method | Computational Mathematics
- Count of numbers whose 0th and Nth bits are set
- Program for Gauss Siedel Method (Computational Mathematics)

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.