~4m13:25Solving 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.
-
Order. The order is the highest derivative appearing in the equation. An equation with the derivative is of first order, and one with is of second order. The lower the order, the simpler the equation, but order is not the only factor of complexity.
-
Linearity. An equation is called linear if the dependent variable and its derivatives appear only to the first power. They are not raised to powers, do not appear inside functions such as , and are not in a denominator. The coefficients of and its derivatives may be functions of only. For example, a linear second-order equation has the form . Linear equations are, as a rule, simpler than nonlinear ones.
-
Homogeneity. The term that contains neither nor its derivatives is called the nonhomogeneity, or the right-hand side . If , the equation is called homogeneous. Homogeneous equations are, as a rule, simpler than nonhomogeneous ones. The nature of the function also affects the choice of method. For example, if is discontinuous, a different approach is required.
First-Order Equations
Separable Equations
A separable equation is nonlinear, but it can be solved explicitly. Example: . Multiplying both sides by moves all terms containing to one side of the equation and all terms containing to the other. After integration, we get . 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 . Such equations can always be solved. The method uses an integrating factor:
Steps of the method:
- Find the integrating factor .
- Multiply the entire equation by . The left-hand side then becomes the derivative of the product .
- Integrate both sides. The constant of integration appears.
- Divide by and express .
Example: the equation has the integrating factor . 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 . It is nonlinear, but the substitution reduces it to a linear equation.
- Homogeneous first-order equation is written as . The substitution reduces it to a separable equation.
Autonomous Equations
An autonomous equation has the form . The derivative depends only on and does not depend on . 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 , 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 , where , , and are numbers.
Method. The solution is sought in the form . Substitution gives in every term, and after cancelling it, the characteristic equation 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 .
| Case | Roots | General Solution |
|---|---|---|
| Two distinct real roots , | ||
| One repeated root | ||
| Complex roots |
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.
- Solve the homogeneous equation (with zero right-hand side) and obtain the general solution with constants and .
- Find any particular solution of the complete nonhomogeneous equation.
- Add: .
The constants and are determined from the initial conditions, if they are given. Two methods are used to find .
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 , the trial solution is used, where is an undetermined coefficient. Substituting into the equation allows us to find the value of . 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:
- The differential equation is transformed by the Laplace transform into an algebraic equation.
- The algebraic equation is solved by ordinary algebraic methods.
- 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
where are the coefficients to be determined. The series is substituted into the equation, after which the coefficients of like powers of are equated. The 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 Equation | Solution Method |
|---|---|
| First order, separable variables | Separation of variables and integration |
| First order, linear | Integrating factor |
| Bernoulli equation | Substitution , then a linear equation |
| First-order homogeneous equation | Substitution , then separation of variables |
| Autonomous equation | Integration; analysis of the direction field and equilibrium points |
| Second order, constant coefficients, homogeneous | Characteristic equation and three cases of the discriminant |
| Nonhomogeneous, right-hand side from the table | Method of undetermined coefficients |
| Nonhomogeneous, arbitrary right-hand side | Method of variation of parameters |
| Discontinuous, periodic, or delta right-hand side | Laplace transform |
| Second-order linear, variable coefficients | Power 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