2.3 Linear Equations and Bernoulli Equations
Linear first-order equations are everywhere in engineering. The current in an RL circuit, the charge on a capacitor, the temperature of a cooling part, the concentration in a stirred tank: each obeys an equation of the form "rate of change plus a multiple of the quantity equals a source". The good news is that every such equation can be solved by one method. In this section we derive that method carefully, and then use it to solve a nonlinear family, the Bernoulli equations.
Linear first-order equations
A first-order equation is linear in if it can be written as
On an interval where , dividing by gives the standard form
"Linear" means that and appear only to the first power, are not multiplied together, and are not inside other functions. The coefficients may depend on in any way. For example,
- is linear; its standard form is (for );
- is not linear (because of );
- is not linear (because of ).
Always divide by the coefficient of before reading off and . For , the coefficient is , not .
Deriving the integrating factor
The left side looks almost like the result of the product rule. The idea is to multiply the equation by a function that turns it into an exact derivative. Let us find such a in small steps.
- Multiply the standard form by an unknown positive function :
- Recall the product rule.
- Compare. The left side in step 1 equals exactly when the coefficients of agree:
- Solve for . This is a separable equation for . Divide by :
- Exponentiate. Any antiderivative will do, so we take the constant of integration equal to zero.
With this choice the equation becomes
Now integrate both sides and divide by (which is never zero):
Write the equation in differential form: . Here and , so it is not exact (unless ). Multiply by . The test of Section 2.1 now asks , i.e. . That is the same equation as in step 3. So is precisely an integrating factor in the sense of Section 2.1.
Two details that cause trouble
The constant inside . Why may we drop it? If we kept it, we would get . That just multiplies the whole equation by the nonzero number , which cancels when we divide by at the end. So any antiderivative of gives the same final answer. Pick the simplest one.
The constant after integrating . Here the constant matters a great deal. It must be added before dividing by .
Writing is wrong. The correct form is , so the constant is also divided by . In Example 2.3.1 below this is the difference between the correct and an incorrect , which does not even satisfy the equation.
The structure of the answer
Split the general solution into two pieces:
The first piece solves the equation with (the "unforced" equation). The second piece is one particular solution of the full equation. "General solution = unforced solution + one particular solution" is a pattern you will see again for all linear equations in Chapter 4.
Existence and uniqueness
For linear equations, the theory is especially clean. Because every step above can be reversed, the formula gives all solutions, not just some.
Let and be continuous on an open interval , let , and let be any real number. Then the initial-value problem
has exactly one solution, and this solution exists on the whole interval . With it is
Compare this with nonlinear equations, whose solutions can blow up at points you cannot see in the equation (Example 2.2.4 was one). A linear equation can only misbehave where or does.
- Put the equation in standard form . Note the intervals where and are continuous.
- Compute (no constant needed). Simplify, e.g. .
- Multiply through by and write the left side as .
- Integrate: . Do not forget .
- Divide by . Use the initial condition, if any, to find .
Practise with the solver below. In the "const" mode is a constant; in the "power" mode , as in the Cauchy–Euler-like equation . It shows , the integral , and the final answer.
Worked examples: linear equations
Solve .
Solution
- Standard form. Already: , , both continuous on .
- Integrating factor. .
- Multiply. , i.e. .
- Integrate. .
- Divide. .
As , the term dies out and every solution approaches , whatever the starting value.
Solve .
Solution
- Standard form. Divide by (so ): . We work on or on .
- Integrating factor. , so .
- Multiply. , i.e. .
- Integrate. .
- Divide. .
To try this kind of equation in the solver, choose the "power" mode with and .
Solve , .
Solution
- Interval. is continuous on , which contains . By Theorem 2.3.1 the solution exists on this whole interval.
- Integrating factor. there (since ), so
- Multiply. Using : .
- Integrate. .
- Divide (multiply by ): .
- Initial condition. , so and
A circuit has an inductance H, a resistance and a voltage source V. By Kirchhoff's voltage law the current satisfies . The switch closes at , so . Find .
Solution
- Equation. , with .
- Integrating factor. , giving .
- The integral. Integrating by parts twice (or using the standard formula with , ):
- Divide by . .
- Initial condition. , so :
- Interpretation. The transient decays with time constant s. After a few seconds the current is a pure sinusoid with amplitude A, at the same frequency as the source.
Solve .
Solution
- Not linear in . Because of in the denominator, no rearrangement makes this linear in .
- Swap roles. Regard as a function of . Since (where ), This is linear in : .
- Integrating factor. .
- Multiply and integrate. , so .
- Answer. .
- Lost solution. We needed to flip the derivative. The constant gives and (for ), so is also a solution.
Long-term behaviour: transient and steady state
Examples 2.3.1 and 2.3.4 show a pattern that engineers rely on. When is a positive constant, the unforced part of the solution is . It decays to zero, whatever the value of . So, after a while, every solution looks like the particular solution , and the initial condition is "forgotten".
The decaying piece is called the transient, and what remains is the steady state (or forced response). The number is the time constant: after one time constant the transient has shrunk by the factor , and after five time constants by . In practice, an RL circuit is said to reach steady state after about five time constants , and an RC circuit after about five times .
If is negative, the opposite happens: grows, and small changes in the initial value are amplified. Exercise 2 is an example. Recognising the sign of tells you, before any integration, whether the system is stable.
Bernoulli equations
Some nonlinear equations are linear equations in disguise. The most important family is named after Jacob Bernoulli.
An equation of the form
where is a real number, is called a Bernoulli equation.
If or , the equation is already linear. For any other , the term makes it nonlinear. The logistic population model is a Bernoulli equation with .
The substitution
- Divide by (assume ):
- Name the new unknown. Let . By the chain rule,
- Substitute.
- Multiply by . This is linear in . Solve it with the integrating factor, then return to .
When , the function solves the Bernoulli equation (). Step 1 divided by , so this solution is usually lost. Always add it to your answer.
Two more remarks on the exponent.
- If , then is not a solution, because is undefined at . For example, only makes sense where .
- If is not an integer, is usually defined only for (for , say). Then we look for positive solutions, and the substitution is safe.
Why does the substitution work at all? The term that made the equation nonlinear, , became the "source" after dividing by . At the same time, the left side turned out to be a linear expression in the single quantity and its derivative. The power is chosen precisely so that its derivative produces the factor .
- Write the equation as and read off .
- Set . The new equation is .
- Solve this linear equation for .
- Return to using .
- Add if .
Use the solver to explore Bernoulli equations with constant and . Try different exponents , including negative and fractional ones.
Worked examples: Bernoulli equations
Solve .
Solution
- Identify. Bernoulli with , , .
- Substitute. . Then , so
- Solve for . :
- Back to . , so
- Zero solution. , so is also a solution.
Note that the constant solutions correspond to . They are the equilibria where .
Solve , .
Solution
- Identify. Bernoulli with , , . Work on .
- Substitute. and :
- Integrating factor. , so
- Integrate. , so .
- Back to . .
- Initial condition. gives :
- Interval. The denominator vanishes at , i.e. . The solution exists on . Unlike linear equations, Bernoulli equations can blow up at points that the coefficients do not reveal.
Exercises
In Exercises 1–6, find the general solution.
-
Answer
. -
Answer
. -
Answer
. - ,
Answer
. - ,
Answer
. -
Answer
. - An RC circuit with , F and a battery of V obeys , where is the charge in coulombs. If , find and the final charge.
Answer
; ; final charge C. - Solve , .
Answer
, for . - Solve by treating as a function of .
Answer
. - Solve the Bernoulli equation .
Answer
, and . - Solve , .
Answer
, and . - A population model reads with . Solve it and find .
Answer
; the limit is .