~4m13:25
Dr. Trefor Bazett

Solving 8 Differential Equations using 8 methods

Dec 7, 2024

Read: ~4m · You save: 9 min

Solving 8 Differential Equations Using 8 Methods

How do you choose a method for solving a differential equation? We cover 8 equation types and 8 methods: from separable and linear to Laplace transforms and series.

There are many differential equations, and there are also many methods for solving them. Choosing the appropriate method begins with classifying the equation. Below are three features that determine the type of equation, and the methods applied to each type.

Classification of the Equation

Three characteristics are analyzed to choose a method.

  1. Order. The order is the highest derivative appearing in the equation. An equation with the derivative y′y' is of first order, and one with y′′y'' is of second order. The lower the order, the simpler the equation, but order is not the only factor of complexity.

  2. Linearity. An equation is called linear if the dependent variable yy and its derivatives appear only to the first power. They are not raised to powers, do not appear inside functions such as eye^y, and are not in a denominator. The coefficients of yy and its derivatives may be functions of xx only. For example, a linear second-order equation has the form y′′+p(x)y′+q(x)y=r(x)y'' + p(x)y' + q(x)y = r(x). Linear equations are, as a rule, simpler than nonlinear ones.

  3. Homogeneity. The term that contains neither yy nor its derivatives is called the nonhomogeneity, or the right-hand side r(x)r(x). If r(x)=0r(x) = 0, the equation is called homogeneous. Homogeneous equations are, as a rule, simpler than nonhomogeneous ones. The nature of the function r(x)r(x) also affects the choice of method. For example, if r(x)r(x) is discontinuous, a different approach is required.

First-Order Equations

Separable Equations

A separable equation is nonlinear, but it can be solved explicitly. Example: dydx=xy\dfrac{dy}{dx} = \dfrac{x}{y}. Multiplying both sides by yy moves all terms containing yy to one side of the equation and all terms containing xx to the other. After integration, we get y22=x22+C\dfrac{y^2}{2} = \dfrac{x^2}{2} + C. Separable equations are one of the few classes of nonlinear equations that can be solved analytically. For this reason, a first-order equation is checked for separability first.

First-Order Linear Equations

The general form of a first-order linear equation is y′+P(x)y=Q(x)y' + P(x)y = Q(x). Such equations can always be solved. The method uses an integrating factor:

μ(x)=e∫P(x) dx\mu(x) = e^{\int P(x)\,dx}

Steps of the method:

  1. Find the integrating factor μ(x)\mu(x).
  2. Multiply the entire equation by μ(x)\mu(x). The left-hand side then becomes the derivative of the product μ(x) y\mu(x)\,y.
  3. Integrate both sides. The constant of integration CC appears.
  4. Divide by μ(x)\mu(x) and express yy.

Example: the equation y′+4y=e3xy' + 4y = e^{3x} has the integrating factor μ(x)=e4x\mu(x) = e^{4x}. The accuracy of the solution depends on whether the integrals can be computed analytically. In some cases, the integrals can be evaluated only numerically.

Equations Reducible to Known Types

Some equations at first glance are neither linear nor separable, but after a change of variable they reduce to one of these types.

  • Bernoulli equation has the form y′+P(x)y=Q(x)yny' + P(x)y = Q(x)y^n. It is nonlinear, but the substitution v=y1−nv = y^{1-n} reduces it to a linear equation.
  • Homogeneous first-order equation is written as y′=F ⁣(yx)y' = F\!\left(\dfrac{y}{x}\right). The substitution v=yxv = \dfrac{y}{x} reduces it to a separable equation.

Autonomous Equations

An autonomous equation has the form y′=f(y)y' = f(y). The derivative depends only on yy and does not depend on xx. Such equations are integrated as separable equations. They are also convenient to analyze graphically using a slope field (direction field). At each point of the field, a line segment is drawn with a slope equal to the value of the derivative. Since the derivative depends only on yy, the field has a characteristic structure. For autonomous equations, equilibrium points are additionally investigated: it is determined whether they are stable or unstable.

Second-Order Linear Equations with Constant Coefficients

The simplest class of second-order equations is the homogeneous equation with constant coefficients of the form ay′′+by′+cy=0ay'' + by' + cy = 0, where aa, bb, and cc are numbers.

Method. The solution is sought in the form y=erty = e^{rt}. Substitution gives erte^{rt} in every term, and after cancelling it, the characteristic equation ar2+br+c=0ar^2 + br + c = 0 remains. Its roots determine the form of the general solution. The roots are found using the quadratic formula. There are three cases, which are determined by the sign of the discriminant D=b2−4acD = b^2 - 4ac.

CaseRootsGeneral Solution
D>0D > 0Two distinct real roots r1r_1, r2r_2y=C1er1t+C2er2ty = C_1 e^{r_1 t} + C_2 e^{r_2 t}
D=0D = 0One repeated root rry=C1ert+C2 t erty = C_1 e^{rt} + C_2\, t\, e^{rt}
D<0D < 0Complex roots α±iβ\alpha \pm i\betay=eαt(C1cos⁡βt+C2sin⁡βt)y = e^{\alpha t}\left(C_1 \cos \beta t + C_2 \sin \beta t\right)

The method with constant coefficients is also applied when solving nonhomogeneous equations, since the solution of the homogeneous part is the first step.

Nonhomogeneous Equations

The general solution of a nonhomogeneous equation is constructed in three steps.

  1. Solve the homogeneous equation (with zero right-hand side) and obtain the general solution yhy_h with constants C1C_1 and C2C_2.
  2. Find any particular solution ypy_p of the complete nonhomogeneous equation.
  3. Add: y=yh+ypy = y_h + y_p.

The constants C1C_1 and C2C_2 are determined from the initial conditions, if they are given. Two methods are used to find ypy_p.

Method of Undetermined Coefficients

This method is applied when the right-hand side has a special form. The particular solution is sought in the same form as the right-hand side, with unknown coefficients. For example, for the right-hand side 3e2t3e^{2t}, the trial solution Ae2tAe^{2t} is used, where AA is an undetermined coefficient. Substituting into the equation allows us to find the value of AA. For different types of right-hand sides, there is a table of suitable trial solutions: for an exponential, an exponential is used; for sine and cosine, a trigonometric function with the same frequency. The method does not work for all right-hand sides. It is inapplicable if the right-hand side is not included in the table.

Method of Variation of Parameters

This method is applied when the method of undetermined coefficients does not work. It is universal for linear second-order equations.

Laplace Transform

For right-hand sides of a special kind, the Laplace transform is applied. Such right-hand sides include:

  • discontinuous functions, for example a function that grows over an interval and then drops abruptly to zero;
  • periodic functions, repeating the same fragment;
  • the delta function, describing an instantaneous impact, for example a hammer strike on a mass on a spring.

The idea of the method is as follows:

  1. The differential equation is transformed by the Laplace transform into an algebraic equation.
  2. The algebraic equation is solved by ordinary algebraic methods.
  3. The inverse Laplace transform is applied, which yields the solution of the original differential equation.

The Laplace transform also solves many equations for which other methods are suitable, but it is usually applied when the right-hand side has one of the special forms listed above. It is not covered in every differential equations course.

Linear Equations with Variable Coefficients

If a second-order linear equation has variable coefficients, the method with constant coefficients is not applicable. In this case, the power series method is used. The solution is sought in the form of a series

y=∑n=0∞cnxn,y = \sum_{n=0}^{\infty} c_n x^n,

where cnc_n are the coefficients to be determined. The series is substituted into the equation, after which the coefficients of like powers of xx are equated. The cnc_n are then found from the resulting relations. The power series method is widely used when other methods fail to yield a solution.

Summary Table

Type of EquationSolution Method
First order, separable variablesSeparation of variables and integration
First order, linearIntegrating factor μ(x)=e∫P(x)dx\mu(x) = e^{\int P(x)dx}
Bernoulli equationSubstitution v=y1−nv = y^{1-n}, then a linear equation
First-order homogeneous equationSubstitution v=y/xv = y/x, then separation of variables
Autonomous equation y′=f(y)y' = f(y)Integration; analysis of the direction field and equilibrium points
Second order, constant coefficients, homogeneousCharacteristic equation and three cases of the discriminant
Nonhomogeneous, right-hand side from the tableMethod of undetermined coefficients
Nonhomogeneous, arbitrary right-hand sideMethod of variation of parameters
Discontinuous, periodic, or delta right-hand sideLaplace transform
Second-order linear, variable coefficientsPower series method

Limitations of the Review

The review is intentionally simplified. It does not cover the theory of existence and uniqueness of solutions, does not examine initial conditions in full, and does not present the special cases that arise in certain methods. Nevertheless, the review includes the main methods most commonly studied in a course on differential equations. The goal of the review is to learn how to determine, from the form of an equation, which method is applicable to it.

Order, Linearity, and Non-Homogeneity

To choose a method, first determine the order of the equation, its linearity, and the presence of a non-homogeneous term (a term without y and y').

  • The order of an equation is the highest derivative that appears in it
  • The lower the order, the simpler the equation, but this is not the only factor
  • Linear equation: y and its derivatives appear to the first power, and the coefficients may depend only on x
  • Linear equations are usually simpler than nonlinear ones
  • Constant coefficients are a special case of linear equations with numbers a, b, c
  • Homogeneous equation: the right-hand side equals zero; it is usually simpler than a non-homogeneous one

Separable First-Order Differential Equations

Separable equations are among the few nonlinear equations that can be solved explicitly; they are always checked first for first-order equations.

  • A separable equation is nonlinear, for example dy/dx = x/y
  • The variables are separated: all y terms are moved to one side, and all x terms to the other
  • After integration we get, for example, y²/2 = x²/2 + C

First-Order Linear Equations

First-order linear equations are solved using the integrating factor e raised to the power of the integral of P(x).

  • Example: y' + 4y = e^(3x)
  • Integrating factor: e^(∫4 dx) = e^(4x)
  • The left side is written as the derivative of the product y·e^(4x)
  • Integrate both sides, add the constant C, and divide by e^(4x)
  • Integrals sometimes have to be computed numerically

Bernoulli Equations and Homogeneous Equations

Bernoulli equations and homogeneous equations are reduced to linear or separable equations via variable substitution.

  • Bernoulli equation: y' + P(x)y = Q(x)y^n; the substitution v = y^(1−n) reduces it to a linear equation
  • Homogeneous equation: y' = f(y/x); the substitution v = y/x reduces it to a separable equation
  • Such equations may not be studied in some courses, depending on the instructor

Autonomous First-Order Equations

Autonomous equations are equations of the form y' = f(y), without dependence on x; they can be solved as separable equations and analyzed graphically.

  • Autonomous equation: the derivative depends only on y
  • Such an equation is solved by integration as a separable equation
  • The direction field (slope field) is constructed from the values of the derivative
  • Equilibrium points and their stability are analyzed

Constant Coefficients in Second Order

For second-order linear equations with constant coefficients, a solution of the form e^(rt) is sought; the characteristic equation yields three cases of roots.

  • Example of a homogeneous equation with constant coefficients; the solution is sought as e^(rt)
  • Substitution yields a quadratic equation in r
  • Two distinct real roots: C1·e^(r1·t) + C2·e^(r2·t)
  • Repeated root: solutions e^(rt) and t·e^(rt)
  • Complex roots α ± iβ: solutions in the form e^(αt)·cos(βt) and e^(αt)·sin(βt)

Nonhomogeneous Equations

The general solution of a nonhomogeneous equation equals the sum of the general solution of the associated homogeneous equation and a particular solution of the nonhomogeneous equation.

  • Step 1: solve the homogeneous equation with arbitrary constants
  • Step 2: find a particular solution y_p of the nonhomogeneous equation
  • Step 3: add the solutions: y = y_h + y_p
  • Example of a right-hand side: 3e^(2t)

Methods for Nonhomogeneous Equations

The method of undetermined coefficients suits standard right-hand sides; for discontinuous, periodic, and impulsive functions, variation of parameters and the Laplace transform are used.

  • Method of undetermined coefficients: for 3e^(2t), take the trial solution A·e^(2t)
  • For exponentials and sine/cosine, there is a table of suitable trial solutions
  • Variation of parameters applies when the right-hand side is not in the list (the author does not show this method in the video)
  • Discontinuous, periodic, and delta functions (impulse, hammer strike on a spring system) require the Laplace transform
  • The Laplace transform turns a differential equation into an algebraic one, which is then solved by the inverse transform

Power Series

For second-order linear equations with variable coefficients that cannot be solved by the method of constant coefficients, the power series method is used.

  • The solution is represented as a sum of a Taylor series: Σ c_n x^n
  • Series methods are especially important in a second course on differential equations
  • Series are useful when other methods do not work