Differential Equations / Unit 2, First Order Equations / Topic 2.1
Unit 2. First Order Equations
A first order equation is called separable when its right side is a product of a function of t and a function of y. A separable equation is solved by moving y to one side of the equation and t to the other side, and then integrating both sides. This topic covers how to recognize a separable equation, the method of solution, the constant solutions that the method can lose, and solutions that cannot be solved for y.
You need Topics 1.1 and 1.2 for this topic. The topic uses the integrals of powers, of 1/y, and of exponential functions, and the rules of logarithms.
A first order equation is separable when it can be written in the form
dy/dt = g(t) h(y)The factor g(t) contains only t, and the factor h(y) contains only y. Either factor can be the constant 1.
| Equation | Separable | Reason |
|---|---|---|
| y′ = ty | Yes | g(t) = t and h(y) = y |
| y′ = y² | Yes | g(t) = 1 and h(y) = y² |
| y′ = et − y | Yes | et − y = ete−y, so g(t) = et and h(y) = e−y |
| y′ = −t/y | Yes | g(t) = −t and h(y) = 1/y |
| y′ = t + y | No | A sum of t and y is not a product of a function of t and a function of y |
| y′ = sin(ty) | No | t and y are together inside the sine |
Each autonomous equation y′ = f(y) of Topic 1.2 is separable, with g(t) = 1.
The method has three steps: separate the variables, integrate both sides, and solve for y if that is possible.
dy/dt = g(t) h(y)the equation1/h(y) dy = g(t) dtdivide by h(y) and multiply by dt, so that y is on the left and t is on the right∫ 1/h(y) dy = ∫ g(t) dtintegrate the left side with respect to y and the right side with respect to tEach integral gives a constant. The two constants are combined into one constant C, which is written on the right side.
The second line treats dy/dt as a fraction, which it is not. The chain rule shows that the result is correct. Let H(y) be a function with the derivative 1/h(y), and let G(t) be a function with the derivative g(t).
1/h(y) dy/dt = g(t)divide both sides of the equation by h(y)d/dt [H(y)] = g(t)by the chain rule, the left side is the derivative of H(y(t)) with respect to tH(y) = G(t) + Ctwo functions with the same derivative differ by a constantThe last line is the result of the method. Writing dy and dt on separate sides is a short way to reach it.
Solve y′ = ty with the initial condition y(0) = 2.
The number eC₁ is positive, so the last line gives the solutions with a positive C and with a negative C. The constant function y = 0 is also a solution, because both sides of the equation are then 0. It was excluded in the second line, and it is included again by allowing C = 0. The general solution is y = Cet²/2 with any constant C.
Topic 1.1 stated that the general solution of y′ = ky is y = Cekt. The equation is separable, and the method finds this solution.
dy/dt = kythe equation1/y dy = k dtseparate the variables, for y ≠ 0ln|y| = kt + C₁integrate both sides|y| = eC₁ ektapply the exponential function to both sidesy = CektC stands for eC₁ or −eC₁, and C = 0 gives the solution y = 0Let y be any solution of y′ = ky. Multiply it by e−kt, and call the product u.
u = ye−ktthe definition of uu′ = y′e−kt − kye−ktthe product ruleu′ = (y′ − ky)e−ktfactor out e−ktu′ = 0because y′ = kyu = Ca function with the derivative 0 on an interval is a constanty = Cektmultiply both sides of ye−kt = C by ektSo each solution of y′ = ky has the form Cekt.
The method divides by h(y). This is not allowed at a value of y where h(y) = 0. At such a value c, the constant function y = c is an equilibrium solution of Topic 1.2, because the right side g(t)h(c) is 0. The method does not find these solutions, so they must be found before the division.
First step of each separable equation. Solve h(y) = 0. Each solution c gives a constant solution y = c. Then separate the variables for the other values of y.
Here h(y) = y², which is 0 for y = 0. So y = 0 is a constant solution. For y ≠ 0 the method gives
dy/dt = y²the equationy−2 dy = dtseparate the variables, for y ≠ 0−y−1 = t + Cintegrate both sidesy = −1/(t + C)solve for yNo value of C gives the solution y = 0, so the constant solution is not part of this family. The complete answer has two parts: y = −1/(t + C) and y = 0.
y(0) = −1/Csubstitute t = 0−1/C = 1the initial condition y(0) = 1C = −1solve for Cy = −1/(t − 1) = 1/(1 − t)the solutionThis solution grows without limit as t approaches 1. It exists only for t less than 1, although the equation y′ = y² has no special point at t = 1. A solution of a nonlinear equation can stop existing after a finite time. Topic 2.6 returns to this.
After the integration, the result is an equation that relates y and t. Sometimes this equation cannot be solved for y, or solving it gives a formula that is harder to use. An equation that relates y and t, and that the solutions satisfy, is called an implicit solution. A formula of the form y = (an expression in t) is called an explicit solution.
The implicit solution t² + y² = C is the equation of a circle around the origin with the radius √C. The initial condition selects the circle.
0² + 3² = Csubstitute t = 0 and y = 3C = 9the circle with the radius 3y = √9 − t²solve for y, with the positive root because y(0) = 3 is positiveThe explicit solution is the upper half of the circle, for t between −3 and 3. At the two ends, y is 0, and the equation gives no slope there.
The last line cannot be solved for y with a simple formula. It is still a complete answer. For a given t, it gives the value of y as the solution of an equation of algebra.
Try it: three separable equations
The gray segments are the direction field of the equation that the menu selects. The blue curve is the solution with y(0) = y₀, drawn from the formula of this topic. The slider sets y₀.
The law of cooling of Newton says that the temperature of an object changes at a rate that is proportional to the difference between its temperature and the temperature of the room. In this part, T is the temperature of the object in degrees Celsius, and t is the time in minutes.
A cup of coffee has the temperature 90 °C at the time 0. The room has the temperature 20 °C, and the constant of proportionality is 0.1 per minute.
dT/dt = −0.1(T − 20) with T(0) = 90The right side is 0 for T = 20, so T = 20 is a constant solution: an object at the temperature of the room stays at that temperature. For T ≠ 20 the method gives
1/(T − 20) dT = −0.1 dtseparate the variablesln|T − 20| = −0.1t + C₁integrate both sidesT − 20 = Ce−0.1tapply the exponential function, as in Part 3T = 20 + Ce−0.1tthe general solution. C = 0 gives the constant solution90 = 20 + Cthe initial condition T(0) = 90C = 70subtract 20 from both sidesT = 20 + 70e−0.1tthe solutionThe difference between the coffee and the room starts at 70 degrees and decreases exponentially. The time at which the coffee has the temperature 60 °C follows from the solution.
60 = 20 + 70e−0.1tset T equal to 60e−0.1t = 40/70 = 4/7subtract 20, then divide by 70−0.1t = ln(4/7)take the natural logarithm of both sidest = 10 ln(7/4)divide by −0.1, with −ln(4/7) = ln(7/4)t = 5.6 minuteswith ln(7/4) = 0.560| Idea | Statement |
|---|---|
| Separable equation | dy/dt = g(t)h(y) |
| Constant solutions | y = c for each c with h(c) = 0. Find them first |
| Method | 1/h(y) dy = g(t) dt, then integrate both sides |
| Constant of integration | One constant C, added in the integration step |
| Implicit solution | An equation that relates y and t, such as t² + y² = C |
| y′ = ky | y = Cekt, and there are no other solutions |
| Cooling | dT/dt = −k(T − A) has the solutions T = A + Ce−kt |
Work each problem on paper first. Then open the answer to check your work.
y′ = t²y is separable, with g(t) = t² and h(y) = y.
y′ = et + y is separable, because et + y = etey.
y′ = t + y² and y′ = cos(ty) are not separable.
The constant solution is y = 0. For y ≠ 0:
1/y dy = 3t² dtseparate the variablesln|y| = t³ + C₁integrate both sidesy = Cet³apply the exponential function. C = 0 gives y = 0C = 5the initial condition y(0) = 5y = 5et³the solution
y dy = t dtseparate the variablesy²/2 = t²/2 + C₁integrate both sidesy² = t² + Cmultiply by 2, with C = 2C₁(−2)² = 0² + Csubstitute t = 0 and y = −2C = 4the constanty = −√t² + 4the negative root, because y(0) = −2 is negative
The constant solution is y = 0. It does not satisfy y(0) = 1. For y ≠ 0:
y−2 dy = 4 dtseparate the variables−1/y = 4t + Cintegrate both sides−1/1 = 0 + Csubstitute t = 0 and y = 1C = −1the constant−1/y = 4t − 1the implicit solutiony = 1/(1 − 4t)solve for y
The denominator is 0 at t = 1/4. The solution exists for t less than 1/4, and it grows without limit as t approaches 1/4.
ey dy = 2t dtseparate the variables. Dividing by e−y is multiplying by eyey = t² + Cintegrate both sidese⁰ = 0 + Csubstitute t = 0 and y = 0C = 1the constanty = ln(t² + 1)take the natural logarithm of both sides
The factor e−y is never 0, so this equation has no constant solutions.
T = 25 + Ce−0.05tthe general solution of the cooling equation100 = 25 + Cthe initial condition T(0) = 100C = 75the constantT = 25 + 75e−0.05tthe solutionT(20) = 25 + 75e−1substitute t = 20T(20) = 52.6 °Cwith e−1 = 0.368
Part 3 found the solution y = 2et²/2 of the equation y′ = ty. The code below checks it with the method of Topic 1.1. It stores the function at 10001 times between 0 and 1, estimates the derivative with np.gradient, and prints the largest difference between the derivative and the right side ty.
Python
The largest difference is about 0.0003, so the function satisfies the equation. Now check the solution y = 5et³ of the equation y′ = 3t²y of Practice Problem 2. Two lines need a change. The largest difference should be about 0.01.
Python
The code below solves y′ = ty with y(0) = 2 in two ways. The loop takes 1000 steps of the method of Euler of Topic 1.3 up to the time t = 1. The line after the loop calculates the value of the formula y = y0 et²/2 at the same time.
Python
The method gives 3.2952, and the formula gives 3.2974. The two values agree to two decimal places, which supports the formula. Now change the initial value to y(0) = −1. Both values should be close to −1.6487.
Python
Part 5 found the solution y = 1/(1 − t) of y′ = y² with y(0) = 1. The code below calculates it at five times that come closer and closer to 1.
Python
The values are 1, 2, 10, 100, and 1000. The solution grows without limit as t approaches 1. For the initial condition y(0) = 2, the same method gives y = 2/(1 − 2t), which grows without limit as t approaches 0.5. Change the code so that it calculates this solution at the times 0, 0.25, 0.4, and 0.49. The values should be 2, 4, 10, and 100.
Python
Part 6 found that the solutions of y′ = −t/y satisfy t² + y² = C. The code below follows the solution with y(0) = 3 by the method of Euler up to the time t = 2. It then prints y and the value of t² + y², which should stay close to 9.
Python
The method gives y = 2.2371, and the formula y = √9 − t² gives √5 = 2.2361 at t = 2. The value of t² + y² is 9.005, so the point of the method is still close to the circle with the radius 3. Now start at y(0) = 4. The value of t² + y² should stay close to 16.
Python
Part 7 found the temperature T = 20 + 70e−0.1t of a cup of coffee. Solving this formula for t gives the time at which the coffee has a given temperature.
T − 20 = 70e−0.1tsubtract 20 from both sides(T − 20)/70 = e−0.1tdivide both sides by 70ln((T − 20)/70) = −0.1ttake the natural logarithm of both sidest = −10 ln((T − 20)/70)divide both sides by −0.1The natural logarithm is typed as np.log. The code below calculates the time for the temperature 60 °C.
Python
The time is 5.6 minutes, as in Part 7. Now find the time at which the coffee has the temperature 30 °C. The result should be about 19.46 minutes.
Python
This quiz has 5 questions on this topic. A question asks you either to choose one answer or to type numbers. The page grades your answers and explains each one. A number can be typed as a whole number, a decimal, a fraction such as 1/3, or a calculation such as sqrt(18)/2 or arccos(1/2). The page shows the value of a calculation next to the box. Angles in a calculation are in degrees. The Calculator button under each question opens a calculator. Your answers are saved in your browser, so they are still on the page when you come back to it.
Choose how your answers are checked
1. Which of these equations is separable?
The right side ty² is the product of g(t) = t and h(y) = y². In the other three equations, t and y are joined by a sum or a difference, which cannot be written as such a product.
2. Solve y′ = 2ty with y(0) = 3, and find y(1).
1/y dy = 2t dtseparate the variablesln|y| = t² + C₁integrate both sidesy = Cet²apply the exponential functionC = 3the initial condition y(0) = 3y(1) = 3e = 8.155substitute t = 1
3. Separating the variables in y′ = y² gives y = −1/(t + C). Which solution of the equation is not contained in this formula?
The division by y² is not allowed for y = 0. The constant function y = 0 satisfies the equation, because both sides are 0, and no value of C gives it. The function y = −1/t is the formula with C = 0.
4. A solution of y′ = −t/y satisfies y(0) = 5. Find y(3).
y dy = −t dtseparate the variablest² + y² = Cintegrate both sides and multiply by 2C = 0² + 5² = 25the initial condition y(0) = 5y = √25 − t²the positive root, because y(0) is positivey(3) = √25 − 9 = 4substitute t = 3
5. The integration of a separable equation gives ln|y| = t²/2 + C₁. Which formula is the general solution?
|y| = et²/2 + C₁apply the exponential function to both sides|y| = eC₁ et²/2the exponential of a sum is a producty = Cet²/2C stands for eC₁ or −eC₁The constant multiplies the exponential function. It is not added to it.
This is the last topic that is posted so far. Back to the list of units and topics