• No results found

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 =π‘₯/𝑦.

Related documents