In Chapter 9 we discussed the concept of a differential equation and saw how to check if a function is a solution of a given DE. However, except for the case where the DE is of the form
\begin{equation*}
y^{(n)}(x)=f(x)
\end{equation*}
(where we can find the solutions just by integration) we have not yet seen any algebraic methods for finding the solutions to a DE. (We did see that for first order DEs we can obtain a graphical representation of the solutions via a direction field and a numerical approximation to a particular solution via Euler’s method.)
As mentioned in Chapter 9 there is no one general method that will solve all possible DEs. However, for various classes of DEs methods have been found that will find their solution. In this lecture we are going to look at an algebraic method for finding the solutions to the class of DEs called first order separable DEs.
This is not of the form \(y'=f(t)g(y)\) and hence this first order DE is not separable.
This DE is already in the form of a first order separable DE with \(f(x)=1\) and \(g(y)=y(1-y)\text{.}\)
The right hand side of this DE can’t be rearranged into the form \(y'=f(x)g(y)\) and so this DE is not a first order separable DE.
The method for solving first order separable DEs is based on integration by substitution. This integration technique was covered in Math1110 but the following example is given as a reminder.
Example10.3.
Evaluate the integral \(\displaystyle\int 2x\sin(x^2) \hspace{2mm} dx\text{.}\)
So long as we can actually perform the integrals on both sides of this equation we will have an equation which will implicitly define \(y\) (the unknown function) in terms of \(x\) (the independent variable). If we can further make \(y\) the subject of this equation then we will have found an explicit formula for the solution to the separable DE.
Note that we can check whether this function is a solution to the DE by substituting back into the original DE. On the left hand side, using the chain rule to differentiate \(y\) we obtain
The working so far has assumed that \(y^2\neq 0\) and hence that \(y\neq 0\text{.}\) Thus to check that we have found all of the solutions to the DE we must check whether the function \(y(x)=0\) is also a solution. Clearly it is. Thus the set of all solutions to the DE is
\begin{equation*}
y(x)=\frac{1}{2x^2+C}, \hspace{5mm} y(x)=0 \hspace{5mm} \textrm{ for } C\in\mathbb{R}
\end{equation*}
See Figure 10.5 for a sketch of these solutions for various values of \(C\text{.}\)
Figure10.5.A sketch of \(y(x)=\frac{1}{2x^2+C}\) for various values of \(C\text{.}\)
The Sage cell below can be used to plot the direction field of \(\dfrac{dy}{dx}\) as well as the solution \(y(x)\) for a given constant of integration \(c\text{.}\)
We can’t make \(y\) the subject of this equation and so in this case we can’t find an explicit formula for the general solution to the DE. Substituting the initial condition into the implicit equation gives
The curve defined implicitly by this equation is shown in Figure 10.7 and from this we can see that the "bottom" part of the curve will be the function that is the solution to the initial-value problem.
Figure10.7.
The Sage cell below can be used to plot the direction field of \(\dfrac{dy}{dt}\) as well as the solution \(y(x)\) for a given constant of integration \(c\text{.}\)
Note: We looked at this example in Chapter 9. There we sketched a direction field for the DE.
Answer.
\(y(x)=\dfrac{Ae^x}{1+Ae^x}\)
Solution.
This is a first order separable DE with \(f(x)=1\) (i.e. it is autonomous) and \(g(y)=y(1-y)\text{.}\) On separating the variables and integrating both sides with respect to \(x\) we obtain
(Some more detail on partial fraction decomposition can be found in an appendix to this lecture.) So, on evaluating the integral on the right hand side and combining the two constants of integration we obtain
Figure 10.9 shows this curve when \(A=1\) superimposed on top of the direction field for the DE. Also shown in the figure are the solutions \(y(x)=0\) and \(y(x)=1\) which come from checking separately the cases where \(g(y)=0\text{.}\)
Figure10.9.
The Sage cell below can be used to plot the direction field of \(\dfrac{dy}{dx}\) as well as the solution \(y(x)\) for a given constant of integration \(A\text{.}\)
Note: We looked at this example in section Chapter 9 where we used Euler’s method with \(\Delta x=0.1\) to approximate the value of the solution at \(x=0.3\text{.}\)
Answer.
\(y(x)=2e^{x^2/2}-1\)
Solution.
This is a first order separable DE with \(f(x)=x\) and \(g(y)=y+1\text{.}\) On separating the variables and integrating both sides with respect to \(x\) we obtain
Section10.2Some Simple Applications of First Order Separable DEs
Example10.12.
Find a curve in the \(xy\)-plane that passes through the point \((0,3)\) and whose tangent line at any point \((x,y)\) has its slope given by \(\frac{2x}{y^2}\text{.}\)
Suppose that the temperature a cup of coffee when it is poured is \(95^oC\text{.}\) The cup is left to stand in a room where the temperature is \(20^oC\text{.}\) If the temperature of the coffee is \(90^oC\) after \(2\) min, how long will it take for the temperature of the coffee in the cup to reach \(25^oC\) according to Newton’s law of cooling?
Answer.
\(t\approx 78.5 \textrm{ min}\)
Solution.
Let \(T(t)\) be the temperature of the cup of coffee at time \(t\) min after it was poured and let \(T_a\) be the room (ambient) temperature. Now, Newton’s law of cooling says that the rate at which the temperature of an object falls is proportional to the difference in the temperature of the object and the temperature of its surroundings. Thus
where \(k\gt 0\) is the constant of proportionality. This is a first order separable DE and on separating the variables and integrating both sides with respect to \(t\) we get
Consider a \(100\)L tank which contains pure water. At time \(t=0\) salt water begins to flow into the tank at a rate of \(2\)L/min and the mixed water flows out of the tank at the same rate. If the concentration of the salt in the inflowing water is \(35\)g/L determine the concentration, \(C(t)\text{,}\) of the salt in the tank as a function of time.
Figure10.15.Flow of water in and out of a tank.
Answer.
\(C(t)=35-35e^{-t/50}\)
Solution.
Let \(A(t)\) be the amount of salt in the tank (in grams) at time \(t\text{.}\) Then, since there is \(100\)L of water in the tank
Now, since the water in the tank is initially pure, we have the initial condition \(A(0)=0\) or equivalently \(C(0)=0\text{.}\) Finally, the rate at which the amount of salt in the tank is changing is given by the difference of the rate at which the amount of salt is increasing (due to the salt water entering the tank) and the rate at which the amount is decreasing (due to the mixed water flowing out). Since salt water is entering the tank at a rate of \(2\)L/min and each litre contains \(35\)g of salt, the rate at which the amount of salt is increasing is \(70\)g/min. Since the mixed water is flowing out of the tank at the rate of \(2\)L/min and each litre contains \(C(t)\)g the rate at which the amount of salt is decreasing is \(2C\)g/min. Thus
An ingot of gold is placed into a furnace which has a temperature of \(1200^oC\text{.}\) After \(3\) min the temperature of the ingot has risen from \(40^oC\) to \(610^oC\text{.}\) Assuming Newton’s Law of Cooling how long before the ingot reaches the melting temperature of \(1064^oC\text{?}\)
2.
Consider a \(50\)L tank which contains salt water with concentration of \(20\)g/L. At time \(t=0\) more salt water begins to flow into the tank at the rate of \(3\)L/min and the mixed water flows out of the tank at the same rate. Assuming that the concentration of salt in the inflowing water is \(30\)g/L how long will it take for the concentration of the water in the tank to reach \(25\)g/L?
Appendix10.APartial Fraction Decomposition
Partial fraction decomposition is, essentially, the inverse operation of combining fractions by putting them over a common denominator. More formally, partial fraction decomposition expresses a proper rational function (i.e. a function that is the ratio of two polynomials where the degree of the polynomial in the denominator is greater that the degree of the polynomial in the numerator) as the sum of proper rational functions of lesser degree.
Example10.16.
Write \(\dfrac{2}{x+2}-\dfrac{3}{2x-1}\) as a single fraction.
Answer.
\(=\dfrac{x-8}{(x+2)(2x-1)}\)
Solution.
Using \((x+2)(2x-1)\) as the common denominator we get
In partial fraction decomposition, for each distinct linear factor \((ax+b)\) in the denominator include a term \(\dfrac{A}{ax+b}\) in the decomposition, where \(A\) is a value we have to determine.
Example10.17.
Find the partial fraction decomposition of \(\dfrac{x-8}{(x+2)(2x-1)}\text{.}\)
If the denominator of the rational function contains a linear factor to some power, i.e. \((ax+b)^n\text{,}\) then the partial fraction decomposition should contain the terms
If the denominator of the rational function contains a quadratic factor, i.e. \((ax^2+bx+c)\text{,}\) then the partial fraction decomposition should contain the term