First order equations
1.3 Separable equations
Note: 1 lecture, Β§1.4 in [ ], Β§2.2 in [ ]
When a differential equation is of the form π¦0 = π(π₯), we can just integrate: π¦ =
β« π(π₯)ππ₯
+πΆ. Unfortunately this method no longer works for the general form of the equationπ¦0= π(π₯, π¦). Integrating both sides yields
π¦=β« π(π₯, π¦)ππ₯+πΆ.
Notice the dependence on π¦in the integral.
1.3.1
Separable equations
We say a differential equation isseparableif we can write it as π¦0
= π(π₯)π(π¦),
for some functions π(π₯)and π(π¦). Let us write the equation in the Leibniz notation ππ¦
ππ₯ = π(π₯)π(π¦).
Then we rewrite the equation as
ππ¦
π(π¦) = π(π₯)ππ₯.
Both sides look like something we can integrate. We obtain
β« ππ¦
π(π¦) =
β«
π(π₯)ππ₯ +πΆ.
If we can find closed form expressions for these two integrals, we can, perhaps, solve for π¦. Example 1.3.1: Take the equation
π¦0
=π₯ π¦.
Note that π¦ =0 is a solution. We will remember that fact and assumeπ¦ β 0 from now on,
so that we can divide byπ¦. Write the equation as ππ¦ππ₯ = π₯ π¦. Then
β« ππ¦
π¦ =
β«
π₯ ππ₯+πΆ.
We compute the antiderivatives to get
ln|π¦| = π₯
2
or |π¦| =ππ₯22+πΆ =π π₯2 2 ππΆ = π·π π₯2 2 ,
whereπ· >0 is some constant. Becauseπ¦ =0 is also a solution and because of the absolute
value we can write:
π¦ =π·ππ₯22,
for any numberπ·(including zero or negative). We check: π¦0 =π·π₯π π₯2 2 =π₯ π·ππ₯22 =π₯ π¦. Yay!
We should be a little bit more careful with this method. You may be worried that we integrated in two different variables. We seemingly did a different operation to each side. Let us work through this method more rigorously. Take
ππ¦
ππ₯ = π(π₯)π(π¦).
We rewrite the equation as follows. Note that π¦= π¦(π₯)is a function of π₯and so is ππ₯ππ¦!
1 π(π¦)
ππ¦
ππ₯ = π(π₯).
We integrate both sides with respect to π₯:
β« 1 π(π¦) ππ¦ ππ₯ ππ₯ = β« π(π₯)ππ₯+πΆ.
We use the change of variables formula (substitution) on the left hand side:
β«
1
π(π¦) ππ¦ =
β«
π(π₯)ππ₯+πΆ.
And we are done.
1.3.2
Implicit solutions
We sometimes get stuck even if we can do the integration. Consider the separable equation π¦0 = π₯ π¦ π¦2+1. We separate variables, π¦2+1 π¦ ππ¦ = π¦+ 1 π¦ ππ¦ =π₯ ππ₯.
We integrate to get
π¦2
2 +ln|π¦| = π₯2
2 +πΆ, or perhaps the easier looking expression (whereπ·=2πΆ)
π¦2+2 ln|π¦| =π₯2+π·.
It is not easy to find the solution explicitly as it is hard to solve forπ¦. We, therefore, leave the solution in this form and call it animplicit solution. It is still easy to check that an implicit solution satisfies the differential equation. In this case, we differentiate with respect toπ₯, and remember that π¦is a function ofπ₯, to get
π¦0 2π¦+ 2 π¦ =2π₯.
Multiply both sides by π¦and divide by 2(π¦2+1)and you will get exactly the differential equation. We leave this computation to the reader.
If you have an implicit solution, and you want to compute values for π¦, you might have to be tricky. You might get multiple solutionsπ¦for eachπ₯, so you have to pick one. Sometimes you can graphπ₯as a function ofπ¦, and then flip your paper. Sometimes you have to do more.
Computers are also good at some of these tricks. More advanced mathematical software usually has some way of plotting solutions to implicit equations. For example, forπΆ =0 if you plot all the points(π₯, π¦)that are solutions toπ¦2+2 ln|π¦| =π₯2, you find the two curves
in on the following page. This is not quite a graph of a function. For eachπ₯there are two choices of π¦. To find a function you would have to pick one of these two curves. You pick the one that satisfies your initial condition if you have one. For example, the top curve satisfies the conditionπ¦(1)=1. So for eachπΆwe really got two solutions. As you can
see, computing values from an implicit solution can be somewhat tricky. But sometimes, an implicit solution is the best we can do.
The equation above also has the solution π¦ =0. So the general solution is
π¦2+2 ln|π¦| =π₯2+πΆ, and π¦ =0.
These outlying solutions such asπ¦ =0 are sometimes calledsingular solutions.
1.3.3
Examples of separable equations
Example 1.3.2: Solveπ₯2π¦0=1βπ₯2+π¦2βπ₯2π¦2, π¦(1) =0. Factor the right-hand side
π₯2π¦0
-5.0 -2.5 0.0 2.5 5.0 -5.0 -2.5 0.0 2.5 5.0 -5.0 -2.5 0.0 2.5 5.0 -5.0 -2.5 0.0 2.5 5.0
Figure 1.8: The implicit solutionπ¦2+2 ln|π¦| =π₯2toπ¦0 = π¦π₯ π¦2+
1.
Separate variables, integrate, and solve for π¦: π¦0 1+π¦2 = 1βπ₯2 π₯2 , π¦0 1+π¦2 = 1 π₯2 β1, arctan(π¦)= β1 π₯ βπ₯+πΆ, π¦ =tan β 1 π₯ βπ₯+πΆ .
Solve for the initial condition, 0 =tan(β2+πΆ)to get πΆ = 2 (or πΆ = 2+π, orπΆ =2+2π, etc.). The particular solution we seek is, therefore,
π¦=tan β 1 π₯ βπ₯+2 .
Example 1.3.3: Bob made a cup of coffee, and Bob likes to drink coffee only once reaches 60 degrees Celsius and will not burn him. Initially at timeπ‘ =0 minutes, Bob measured the temperature and the coffee was 89 degrees Celsius. One minute later, Bob measured the coffee again and it had 85 degrees. The temperature of the room (the ambient temperature) is 22 degrees. When should Bob start drinking?
Letπ be the temperature of the coffee in degrees Celsius, and let π΄be the ambient (room) temperature, also in degrees Celsius. Newtonβs law of cooling states that the rate at which the temperature of the coffee is changing is proportional to the difference between the ambient temperature and the temperature of the coffee. That is,
ππ
for some constantπ. For our setupπ΄=22,π(0)=89,π(1) =85. We separate variables and integrate (letπΆ andπ· denote arbitrary constants):
1 πβπ΄ ππ ππ‘ =βπ, ln(πβπ΄)=βππ‘+πΆ, (note thatπ βπ΄> 0) πβπ΄= π· πβππ‘, π = π΄+π· πβππ‘.
That is,π = 22+π· πβππ‘. We plug in the first condition: 89 = π(0) = 22+π·, and hence π· =67. Soπ =22+67πβππ‘. The second condition says 85=π(1) =22+67πβπ. Solving for πwe getπ =βln85β22
67 β0.0616. Now we solve for the timeπ‘that gives us a temperature of
60 degrees. Namely, we solve
60=22+67πβ0.0616π‘ to get π‘ = βln60
β22 67
0.0616 β 9.21 minutes. So Bob can begin to drink the coffee at just over 9
minutes from the time Bob made it. That is probably about the amount of time it took us to calculate how long it would take. See .
0.0 2.5 5.0 7.5 10.0 12.5 0.0 2.5 5.0 7.5 10.0 12.5 60 70 80 90 60 70 80 90 0 20 40 60 80 0 20 40 60 80 20 40 60 80 20 40 60 80
Figure 1.9: Graphs of the coffee temperature functionπ(π‘). On the left, horizontal lines are drawn at
temperatures 60, 85, and 89. Vertical lines are drawn atπ‘ =1andπ‘ =9.21. Notice that the temperature of the coffee hits 85 atπ‘ =1, and 60 atπ‘ β9.21. On the right, the graph is over a longer period of time,
with a horizontal line at the ambient temperature 22.
Example 1.3.4: Find the general solution toπ¦0= βπ₯ π¦2
3 (including singular solutions).
First note that π¦=0 is a solution (a singular solution). Now assume thatπ¦ β 0.
β3 π¦2π¦ 0 =π₯, 3 π¦ = π₯2 2 +πΆ,
π¦ = 3
π₯2/
2+πΆ
= 6
π₯2+2πΆ.
So the general solution is,
π¦ = 6
π₯2+2πΆ, and π¦ =0.
1.3.4
Exercises
Exercise1.3.1: Solveπ¦0 =π₯/π¦.