Linear equations in higher order
Introduction
The simplest second-order equations can be solved by directed integration performed twice, as we saw in the section on direct integration. To solve the IVP:
we can integrate twice:
where and . At each stage in the integration, a new constant is produced, and the new constant covers all possibilities. (All possibilities because: any two antiderivatives differ by a constant. This fact comes from the Mean Value Theorem.)
From this we learn to expect that any second-order differential equation will determine a family of solution curves involving two parameters. Later we will consider a good argument for this expectation in the case of linear equations. For right now, an intuitive argument in the general case is that a second-order equation involves 3 functions: , and the ODE determines any one of them in terms of the other two. Initial conditions are therefore fully specified by giving starting values of two of the functions, e.g. and , since the equation can be used to solve for the third. These two components of the initial condition correspond to the two free parameters in the complete family of solutions.
Second order equations are called linear when the items appear only in first-degree powers. A more precise and complete definition would require the definition of a second-order linear differential operator , and we avoid the details for that right now. The ODE is determined from such an operator by setting (homogeneous case) or (inhomogeneous case) for some forcing function .
Link to original
Second-order, constant coefficients
Second-order, constant coefficients
Second-order linear equation with constant coefficients:
- Homogeneous:
- Inhomogeneous:
In this usage, the word ‘homogeneous’ means “no constant term”. This is a different meaning from ‘homogeneous’ as we have seen previously, although the two meanings are connected.
Homogeneous case
It is easy to guess a system of solutions for the homogeneous case, inspired by the use of for first-order linear equations. Suppose is a solution. Then:
We conclude: any solution of the form must have a solution to .
In reverse: if satisfies , then is a solution to the differential equation.
The polynomial equation is sometimes called the characteristic equation of the linear ODE.
Notice also: if and are solutions, then are also solutions, for any constants . This is the practical meaning of linearity. It is sometimes also called the superposition principle.
More abstractly: the homogeneous linear ODE has a vector space of solutions. Concretely: solutions can be added and scaled to form new solutions.
Normally, the quadratic equation has two distinct solutions, namely and . These two numbers provide a D vector space of solutions spanned by and . Namely:
is a solution for any choice of combo. This gives a two-parameter family of solutions.
There are two potential complications for this method:
- What happens if ?
- What happens if and are complex numbers?
Repeated roots
What happens if ?This means and . Now watch this: plug in to the equation:
When , certainly we have . But moreover, we also have .
The extra terms coming out of the product rule applied to exactly cancel from the condition of repeated roots. So is a new solution if-and-only-if is a repeated root.
Link to original
Example
Repeated roots
Link to originalRepeated roots
Problem: Solve the ODE: .
Solution: We first solve . So we have . Then is one solution, and is another solution. The complete family of solutions:
Check this complete family by plugging it into the ODE!
Exercise
01
Link to originalSecond-order linear: distinct roots, repeated roots
Find the 2-parameter family of solution curves for the ODEs:
- (a)
- (b)
Second-order, constant coefficients (part 2)
(It is a fact, a magical fact from this point of view, that in higher order, for an ODE like , the same phenomenon generalizes: we will have spanning the solutions precisely when is a -times repeated root of .)
Imaginary roots
What happens if and have imaginary components?In this case, we are naturally led to consider complex-valued solutions. It turns out, however, that by doing so, we will discover a family of pure real solutions. The pure real family is produced by applying a complex change of basis to the complex solution space.
Let us write and . (Since solve a quadratic, we know they must come in a conjugate pair like this with .) We can write two complex solutions:
In light of the Euler formula , we make a judicious choice of linear combination of these solutions. It is designed to cancel away the imaginary parts:
(These solution are given by applying the matrix to the original set. Notice that the columns are perpendicular, so the matrix is a ‘complex rotation’ plus overall scaling.)
Link to original
Exercise
02
Link to originalCancelling imaginary parts
By substituting the formulas for and , verify that and .
Exercise
03
Link to originalVerifying trigonometric solutions
Verify that and solve the original ODE.
To do this, first find the correct ODE: expand in order to find the appropriate for the general case of complex roots.
Then check that and are solutions to the ODE .
Second-order, constant coefficients (part 3)
Summary: because the repeated roots solutions have the form , we can always use the above method, namely judicious linear combinations, to reveal a pair of solutions and that do not involve imaginary numbers.
Link to originalReal vs. complex solutions
Even first-order linear ODEs have complex solutions. For example, has real solution but it also has the imaginary solution , and every combination of them. In the second-order case, we could have simply guessed the real solutions and . But the natural procedure using leads us first to the complex solutions, and from these we can extract purely real solutions using a complex combination.
Example
Second-order linear, complex roots, pure real solutions
Link to originalSecond-order linear, complex roots, pure real solutions
Problem: Solve the ODE: .
Solution: We first solve and find and . We therefore have complex solutions
and real solutions
The complete family of solutions is therefore:
Inhomogeneous theory
Introduction
The solution method for homogeneous second-order linear equations is part of the solution method for inhomogeneous ones. The homogeneous theory provides the parameters, while a single “particular” solution to the inhomogeneous equation provides an “offset.” This offset shifts the vector space of solutions to the homogeneous equation over to the affine space of solutions to the inhomogeneous equation.
The situation is exactly akin to that of solutions to homogeneous and inhomogeneous matrix equations, and . The solutions to form a vector space, namely the null space of . The solutions to form an affine space that is given by adding a single particular solution satisfying to the null space of . The reason: any two solutions to differ by a solution to . Therefore the affine space of all solutions to can be obtained by shifting the vector space of solutions to over by an offset which is one particular solution .
A generic second-order linear inhomogeneous ODE is given as follows:
This ODE determines a corresponding homogeneous ODE:
Given two “independent” solutions and to the homogeneous ODE, any linear combination of them is also a solution, and a complete family of solutions is determined as their span:
Given a single particular solution to the original inhomogeneous equation, the complete family of solutions to the inhomogeneous equation is the span for the corresponding homogeneous equation shifted by that particular solution as an offset:
Link to original
Variation of parameters
Introduction
The method of variation of parameters is to change a constant value parameter like into a variable function , and see whether we can cook up an appropriate so that the solution is still a solution with this variable parameter .
Link to original
Discovering a second solution
Discovering a second solution
Suppose we are given a single solution to the homogeneous equation . We know that is also a solution, but it isn’t independent of . We would like to find another, independent, solution which will span (along with ) the complete set of solutions.
Let us propose the hypothesis that there is a solution for some function of .
This solution will be independent of provided is not constant. The trick is to supply some additional constraints on that make it feasible to solve for what must be, given that solves the equation. These constraints emerge from the process of plugging into the equation and expanding the product and chain rules.
which we continue to solve as by separation of variables:
(We have allowed an abuse of notation by letting indicate any particular antiderivative, understood to be a function of .) By running these equations backwards, we find that if , then is indeed a second solution.
This method always works! That is, it provides a second solution in terms of a first solution and two integrations.
This method is enough to explain the factor appearing in our secondary solutions to linear equations with constant coefficients and repeated roots:
Link to original
Example
Variation of parameters - double repeated roots
Link to originalVariation of parameters: double repeated roots
Suppose is an ODE with and therefore and is a repeated root. We have seen that is one solution. Let us change the parameter in the family to a function and plug it in:
This quantity is zero when , which happens when and . It is enough to consider the specific case because the other parameters are already accounted for when we take the span to obtain the complete set of solutions:
Example
Variation of parameters - second nontrivial solution from trivial guess
Link to originalVariation of parameters: second nontrivial solution from trivial guess
Problem: Find a complete family of solutions to the ODE given by .
Solution: This ODE is reducible to first order because does not appear. However, let us use variation of parameters to solve it. Write it as . Notice first that is a (rather trivial) solution. Look for a second solution of the form . Using the formula, we have:
So is a second solution, and the complete family is given by .
Question
01
Link to originalVariation of parameters: triple repeated root
Suppose , and suppose for some . Use variation of parameters to find two (independent) additional solutions besides .
Question
02
Link to originalVariation of parameters: Legendre second solution
The Legendre equation for is . One solution is . Find a second solution.
Exercise
01
Link to originalVariation of parameters: double repeated root, inhomogeneous
Find a complete set of solutions to the ODE given by .
Exercise
02
Link to originalVariation of parameters: second solution from one obvious.
Find a complete set of solutions to the ODE given by .
Particular solution of inhomogeneous
Particular solution of inhomogeneous
The same strategy, with a complication, will provide a particular solution to an inhomogeneous equation by variation of the parameters of the complete set of solutions to its corresponding homogeneous equation.
Suppose is the complete family of solutions to . We seek a particular solution to . Let us propose the hypothesis that a particular solution has the form
As before, we substitute this form for into the equation and eliminate the consequences of and being solutions. We compute:
Now for the new complication of this method. It will be very convenient to add the additional constraint that . This is a constraint on the possibilities we are hypothetically contemplating for , meaning for and . We are not required to add this constraint, but we will discover that it is not too strong in the sense that we can always succeed in finding a solution with this constraint, and it greatly simplifies the algebra, so we do so. The first terms in brackets in the expressions for and therefore disappear.
Plugging the rest back into the equation, we find:
So it will be enough to solve this last equation simultaneously with our constraint equation, namely to solve the system:
Given , this is a simple system of linear equations in two unknowns and we can solve for them explicitly:
Therefore, setting
we have a solution .
Link to original
Example
Solving an inhomogeneous equation
Link to originalSolving an inhomogeneous equation
Problem: Find a complete set of solutions to the ODE given by .
Solution: The corresponding homogeneous ODE is , which has characteristic equation , and its general solution is therefore .
To find a particular solution to the inhomogeneous, we consider varying parameters. Let and . Using the formulas above for and , we compute:
(Notice, again, that we will not need the integration constants, since those will lead to repeat part of the homogeneous solution.)
Adding the particular inhomogeneous solution to the general homogeneous solution, we find the complete family:
Exercise
03
Link to originalSolving inhomogeneous linear ODE
Find a complete set of solutions to the ODE given by .
Exercise
04
Link to originalSolving inhomogeneous linear ODE
Find a complete set of solutions to the ODE given by .
Exercise
05
Link to originalSolving inhomogeneous linear ODE
Find a complete set of solutions to the ODE given by , where are constants.
Exercise
06
Link to originalSuperposition and sums of forcing terms
Find a complete set of solutions to the ODE given by .
(Hint: add two particular solutions together, each solving an inhomogeneous equation corresponding to a single one of the forcing terms.)
Applications
Introduction
Second-order ODEs frequently arise in physics because the laws of physics are frequently given using principles of force or energy, and these quantities are related to basic state variables (position) using second derivatives. Consider Newton’s Law:
and the Lagrange equation (having to do with energy and “action”):
Many important second-order ODEs in physics are also linear. The basic case of constant coefficient second-order linear equations gives what is called the harmonic oscillator. Harmonic oscillators arise in various branches of physics, from mechanical vibrations to electrical resonance circuits. “The” harmonic oscillator is a class of mathematical models (with assorted parameters and forcing functions) that describe the various real oscillators in physics.
Link to original
Damped harmonic oscillator
Damped harmonic oscillator
- A mechanical simple harmonic oscillator can be formed with a mass sliding frictionlessly over a surface, attached to a spring anchored to a wall.
- A basic damped harmonic oscillator can be formed by adding a “dashpot” that provides resistance to motion. Ordinary friction provides a resistance force that is independent of velocity, whereas a dashpot provides resistance that is proportional to velocity.
Let describe the position of the mass over time, with when the mass is resting statically. The spring force is given by , and the dashpot force is , where gives the spring constant and gives the dashpot constant. By Newton’s Law, , so we have . In other words:
Undamped case
The case corresponds to the absence of any dashpot. The resulting equation has characteristic equation with solutions . The complete set of solutions is therefore:For application purposes, it is useful to consider formulas like the above in a different format, using a trig identity:
Considering the form , the parameter is called the amplitude, is the angular frequency or circular frequency, and is the phase angle or phase lag. The angular frequency is related to the true frequency and the period by:
The relation can be summarized by saying that the sum of sinusoidal functions with the same frequency is also a sinusoidal function.
You are encouraged to manipulate the parameters of on Desmos:
https://www.desmos.com/calculator/i9tpybmra9Adding damping
Now suppose we allow . Let us write and , so then the ODE takes the form:Let use write . The solutions to the characteristic polynomial are and when , and and when .
Case 1: Overdamping
When , there are two real roots. The solutions are negative exponentials and quickly die out:https://www.desmos.com/calculator/yn9bcqflf9
Case 2: Underdamping
When , there are two imaginary roots. The solutions are decaying sinusoidal with continued oscillations that decay in amplitude:where we set .
https://www.desmos.com/calculator/s9oyz7gtot
Case 3: Critical Damping
When , the situation is that of repeated roots, . The complete family of solutions is therefore:Rewriting in terms of initial , starting at rest:
https://www.desmos.com/calculator/mjjyd54yf3
This critical damping case is very important in practical applications. The effect of critical damping is to dampen out oscillations (1) as quickly as possible, (2) without allowing “overshoot.”
Link to original
Driven harmonic oscillator
Driven harmonic oscillator
In this section we consider more closely the effect of a sinusoidal forcing function, at first without any damping. Our ODE becomes:
We know that this ODE has a complete family of homogeneous solutions given by
Here we are writing for the angular frequency of the forcing function, while we write for the natural response frequency of the system.
Link to original
Exercise
01
Link to originalDriven undamped harmonic oscillator amplitude
Show that the above ODE has a bona fide (particular) solution given by , where
Driven harmonic oscillator (part 2)
Notice! This amplitude is not free to vary as in the homogeneous case. It is determined by the driving function.
Notice something else! This amplitude goes to infinity when . The natural system response amplitude is called the resonant frequency and this phenomenon of a large response to a driving force that is oscillating in tune with the natural system frequency is called resonance. In real life, there is always some damping effect, and this will mitigate the actual infinity in the equation.
The complete family of solutions is given as usual by adding the homogeneous solutions to our bona fide solution:
Of course, the homogeneous solutions are simply superposed over the bona fide solution. (Added to it.)
The format of this solution is inconvenient because the homogeneous amplitude and phase lag is not necessarily apparent in the actual solution values , while on the other hand the initial conditions are also not apparent anywhere in the formula.
The concepts of Zero State Response (ZSR) and Zero Input Response (ZIR) are ideas from engineering that allow us to view the space of solutions in a more revealing format.
- Zero State Response refers to a bona fide solution with zero initial conditions: . We will write for this solution, where indicates the symbol for the forcing function.
- Zero Input Response refers to a homogeneous solution with given initial conditions: , . We will write for this solution, where indicates homogeneity.
In our case above, the ZSR is
and the ZIR is
The solution to any IVP will be the sum of the ZSR and a certain ZIR:
The former derives from the forcing function, and the latter derives from the initial conditions.
The purpose of these concepts is to treat the initial conditions as stimulating a homogeneous system response to the starting conditions, while the forcing function drives a particular solution (presumed starting from rest) that is layered on top. Any solution can be obtained in this way.
Link to original
Exercise
02
Link to originalChecking ZSR and ZIR
Verify that and are given correctly.
Driven, damped harmonic oscillator
Driven, damped harmonic oscillator
In the final case we add damping to the driven harmonic oscillator, obtaining the ODE:
The complete family of homogeneous solutions depends (as above) on cases, giving overdamped, underdamped, and critically damped solution types:
As before, here we are using , , and . These solutions are essentially in ZIR form already.
The ZSR is new and interesting. We have:
This formula shows that the amplitude of the ZSR has a distinctive peak of at the resonant frequency . At this frequency, the phase lag is . Notice that the extra term in the radical prevents blowing up at .
Link to original
https://www.desmos.com/calculator/hqlrgor3eb
Series RLC circuit
Series RLC circuit
The current flowing around the electrical circuit with diagram:
is described by a differential equation that may be compared to the equation for mechanical vibrations of a mass + spring + dashpot system:Here is a correspondence dictionary:
Link to original
All the theory developed above applies to such a circuit.
MIT Mathlet links
MIT Mathlet links
Spring and dashpot, spring is driven | Spring and dashpot, dashpot is driven | [Spring and dashpot, both are driven](https://mathlets.org/mathlets/amplitude-and-phase-2nd-order-iii/ | Spring and dashpot, mass is driven | Damped vibrations | Forced, damped vibrations | Series RLC circuit
Link to original






