There are two types of second order linear differential equations: Homogeneous Equations, and Non-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.
(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,
where ‘r’ is some real number(may be complex also as we will see!).
Ar2erx + Berxr + Cerx = 0 (erx)(Ar2 + Br + C) = 0 [Taking erx common from all the terms] Ar2 + Br + C = 0 [As erx cannot be zero]
Based on above equation 3 cases arise:
(I) If both roots are real, say r1 and r2, then the solution will be
f(x) = c1(er1x) + c2(er2x)
(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) = c1er1x + c2er2x
which if you will simplify will look like:
f(x) = ea1x(k1cos(a2x) + k2sin(a2x))
[ I hope you know eit = cos(t) + isin(t), Also k1 and k2 are different from c1 and c2].
I also encourage you to find the relation between k1 and k2 and c1 and c2.
(III) If the roots are repeated, then y = cerx is not the general solution but only a particular solution. So what to do? Hence again assume,
y = p(x)erx
where ‘r’ is the root that you got in the above equation. By solving you will get that
p(x)=c1x + c2
Hence your general solution will look like,
y = (c1x + c2)erx
These examples will give you clarity:
y" + 5y' + 6y = 0
Assume y = erx.Putting this in the equation, we finally get:
r2 + 5r + 6 = 0 (r+2)(r+3) = 0 r = (-2) OR r = (-3)
r1 = (-2) and r2 = (-3)
Since both are real the general solution will be:
y = c1e(-2x) + c2e(-3x)
y" + y' + y = 0
Again assume y = rrx and solve for ‘r’. Your ‘r’ will look something like this:
r1 = (-1/2) + i(-sqrt(3)/2) and r2 = (-1/2) - i(-sqrt(3)/2) So, a1 = (-1/2) and a2 = (sqrt(3)/2)
Hence the general solution will look like this:
y = e(-x/2)(c1cos(x√(3)/2) + c2sin(x√(3)/2))
y" + 4y' + 4y = 0
Again assume y = rrx and solve for ‘r’. The ‘particular solution will be:
y = ce2x
Assume y = p(x)e2x.Putting it in the differential equation will give you:
p" = 0 which implies p'= c2 which again implies p = c1x + c2
Hence the general solution will be:
y = (c1x + c2)e2x
- Mathematics | L U Decomposition of a System of Linear Equations
- Mathematics | System of Linear Equations
- Subgroup and Order of group | Mathematics
- 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)
- Properties of Determinants of Matrices
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.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.