Chapter 2 First Order Differential Equations Notes, Kohler & Johnson 2e

Author

Chalmeta

2.1 First Order Equations - Existence and Uniqueness Theorems

A differential equation of the form:

\[y'+p(t)y=g(t) \tag{2.1}\]

is called a first order linear differential equation.

Equation (2.1) is called homogeneous if \(g(t) = 0\).

Equation (2.1) is called nonhomogeneous if \(g(t) \neq 0\).

TipExample 2.1.1

Consider the following initial value problems:

  1. \(y'=xy^3(x^2+1)^{1/2}, \quad y(0) = 1\)

  2. \(t^2y'+4ty = \cos t, \quad y(-1) = 2\)

  3. \(y'=t\sqrt{y}, \quad y(0)=0\)

  4. \((t^2 -4t)y'+ty = e^t, \quad y(2) = -1\)

Which of these are first order? Which are linear? Homogeneous?

Given the initial value problem \(y'+p(t)y=g(t)\), \(y(t_0)=y_0\) several questions arise:

  1. Under what circumstances can we be sure the equation has a solution passing through the given point?

  2. Is it possible for an equation to have more than one solution through an initial point? Or equivalently, if we find a solution passing through a point, can we be sure it is the only solution?

NoteTheorem (Existence-Uniqueness Theorem I)

Given the IVP \(y'+p(t)y=g(t)\), \(y(t_0)=y_0\), if \(p(t)\) and \(g(t)\) are both continuous on an open interval \(I\) containing \(t_0\), the IVP is guaranteed to have a unique solution on \(I\).

Applied to (a), (b), (c), and (d)?

Consider the following first order linear differential equations. For each of the initial conditions, determine the largest interval \(a < t < b\) on which the Existence-Uniqueness Theorem guarantees the existence of a unique solution.

TipExample 2.1.2

\[y' + \frac{t}{t^2+1}y=\sin t\]

  1. \(y(-2)=1\)

  2. \(y(0)=\pi\)

  3. \(y(\pi)=0\)

TipExample 2.1.3

\[y' + \frac{t}{t^2-4}y=0\]

  1. \(y(6)=0\)

  2. \(y(1)=-1\)

  3. \(y(0)=1\)

  4. \(y(-6)=2\)

TipExample 2.1.4

\[y' + \frac{t}{t^2-9}y=\tan t\]

  1. \(y(6)=0\)

  2. \(y(1)=-1\)

  3. \(y(0)=1\)

  4. \(y(-6)=2\)

2.2 Linear First Order Differential Equations

First Order Linear Homogeneous Equations

Consider a linear first order differential equation of the form:

\[y'+p(t)y=g(t) \tag{2.2}\]

where \(p(t)\) and \(g(t)\) are continuous functions on some interval \(a \leq t \leq b\). We will begin by solving this equation for the homogeneous case (\(g(t) =0\)).

We would like to find a function whose derivative is close to the original function. A good choice is \(y=e^{h(t)}\). The trick will be to choose \(h(t)\) appropriately so let’s try our choice for \(y\) in the original function and see what happens. We will need a derivative first:

\[y' = h'(t) e^{h(t)}\]

Now we substitute into equation (2.2) to get:

\[h'(t) e^{h(t)} + p(t) e^{h(t)} = 0\]

\[h'(t) e^{h(t)} =- p(t) e^{h(t)}\]

\[h'(t) =- p(t)\]

Taking a few liberties with the notation we can integrate both sides to solve for \(h(t)\):

\[h(t) = \int h'(t) dt = - \int p(t) dt\]

And our solution to the first order homogeneous differential equation is:

\[y = e^{- \int p(t) dt} \tag{2.3}\]

TipExample 2.2.1

Solve \(y'-2y = 0\)

In general they are not so easy.

TipExample 2.2.2

Solve \(ty' + 2y = 0\), \(y(1)=0\)

We need to fix the equation so it has the correct form: \(y'+p(t)y=0\)

TipExample 2.2.3

Solve \(y' + 2ty = 0\), \(y(0)=2\)

Choose \(y = e^{- \int 2t dt} =e^{-t^2+c}\)

TipExample 2.2.4

Solve \(y' + (2t+ \sin t)y = 0\), \(\displaystyle y\left( \frac{\pi}{2} \right)=\frac{\pi}{2}\)

First Order Linear Nonhomogeneous Equations

The Product Rule and Integration by Parts:

Recall: Product Rule: \(d[uv] = uv' +vu'\) or \(d[uv] = udv +vdu\)

We can rewrite this as \(d[uv] - v du =u dv\) and integrate both sides:

\[\int d[uv] - \int v du = \int u dv\]

to get \(\boxed{\displaystyle uv - \int v du = \int u dv}\) Integration by Parts

Also from the product rule we can get:

\[uv = \int (udv +vdu) \tag{2.4}\]

We will use equation (2.4) with a change of variables to solve differential equations.

If we start with a differential equation of the form: \(y' + p(t) y = 0\) then we could easily integrate it if we could write it in the form: \[u(t) y' + u'(t) y = 0\] for some appropriate \(u(t)\) since this is in the form of the right hand side of equation (2.4).

What do we mean by “appropriate”?

We need to multiply by some function \(u(t)\) so that: \[u(t) y' + \underbrace{u(t) p(t)}_{=u'(t)} y = 0\]

We will choose: \[u(t) = e^{\int p(t) dt} = e^{P(t)} \tag{2.5}\]

and this is called the integrating factor. To see why this is a good choice of \(u(t)\) notice that \(u'(t) = p(t) e^{\int p(t) dt} = p(t) u(t)\). If we take our original differential equation \(y' + p(t) y = 0\) and multiply by \(u(t)\) we get:

\[u(t) y' + u(t) p(t) y = u(t) y' + u'(t)y\]

\[\frac{d}{dt}(u(t) y(t))=0 \tag{2.6}\]

which is what we wanted. Integrating both sides of equation (2.6) we have a solution: \[u(t) y(t) = C\]

If the original equation is not homogeneous: \[y' + p(t) y = g(t)\]

we can still multiply by the integrating factor: \(u(t) = e^{\int p(t) dt}\)

Steps for solving nonhomogeneous equation \(y' + p(t) y = g(t)\)

  1. Write \(y'+p(t)y=g(t)\)

  2. Find the integrating factor: \(u(t)=e^{\int p(t) dt}\)

  3. Multiply by the integrating factor: \[u(t)(y'+p(t)y)=u(t) \cdot g(t)\]

  4. Recognize that you have \(\displaystyle \frac{d}{dt} [u \cdot y] = u(t) \cdot g(t)\)

  5. Integrate: \(uy=\displaystyle \int \frac{d}{dt} [u \cdot y] = \int u(t) \cdot g(t) dt\)

TipExample 2.2.5

\(y' + 2t y = 2t e^{-t^2}\)

Choose \(u = \displaystyle e^{\int 2t dt} = e^{t^2+c}\). What do we do with \(c\)?

TipExample 2.2.6

\(ty' + y = 3t \cos{2t}\), \(t>0\)

First put the equation in the correct form. The coefficient of \(y'\) must be 1.

TipExample 2.2.7

Initial Value Problem: we can solve for \(C\) when we have an initial condition.

\[ty' + 2y = \sin{t}, \quad y\left( \frac{\pi}{2} \right) = 1\]

TipExample 2.2.8

\[ty' + 2y = g(t), \quad y(0) = 3\]

where

\[g(t) = \begin{cases} \sin t & \text{if } 0 \leq t \leq \pi\\ -\sin t & \text{if } \pi \leq t \leq 2\pi \end{cases}\]

2.3 Mixing Problems and Cooling Problems

TipExample 2.3.1

A tank originally contains 100 gal of fresh water. Then water containing \(\frac{1}{2}\) lb of salt per gallon is poured into the tank at a rate of 2 gal/min, and the mixture is allowed to leave at the same rate. After 10 minutes the process is stopped, and fresh water is poured into the tank at a rate of 2 gal/min, with the mixture again leaving at the same rate. Find the amount of salt in the tank at the end of an additional 10 min.

TipExample 2.3.2

In an oil refinery, a storage tank contains 2000 gallons of gasoline that initially has 100 lbs. of additive mixed in. In order to produce a different grade of gas, gasoline containing 2 lbs. of additive per gallon is pumped into the tank at the rate of 40 gallons per minute, and the well stirred mixture is pumped out at the same rate. Find the amount and concentration of additive after 35 minutes.

TipExample 2.3.3

In Example 2.3.2, suppose the tank holds 3000 gallons and is initially only 2/3 full of the original mixture. Gasoline containing 2 lbs. of additive per gallon flows into the tank at the rate of 40 gallons per minute but the well-stirred mixture is draining out at the slower rate of 10 gallons per minute. How many pounds of additive will be in the tank at the moment the tank becomes full?

2.4 Population Dynamics and Radioactive Decay

TipExample 2.4.1

Radiocarbon Dating: The amount of carbon-14 present in a piece of wood decreases at a rate proportional to the current amount.

  1. If carbon-14 has a half life of 5730 years find an expression for \(Q(t)\), the amount of carbon-14 present at any time \(t\), if \(Q(0)=Q_0\).

  2. Suppose that certain remains are discovered in which the current residual amount of carbon-14 is 20% of the original amount. Determine the age of these remains.

TipExample 2.4.2

Suppose 200 mg. of Einsteinium-253 are present in a closed container and additional amounts are added at the rate of 3 mg. per day.

  1. Find a formula for the amount \(y(t)\) present at time \(t\) if the decay constant for this substance is \(-0.02828\).

  2. Find the limiting amount \(y_L\) as \(t \rightarrow \infty\).

  3. After how long will the amount present be 150 mg.?

Since the amount decreases at a rate proportional to the current amount we can write our differential equation as:

\[\frac{dy}{dt} = -0.02828 y(t) + 3 \tag{2.7}\]

The important thing to check is your units. \(dy/dt\) is mg/day and the amount being added is mg/day so the units agree.

Solving the differential equation (2.7) is fairly straight forward using the integrating factor.

\[y'+0.02828 y(t) = 3\]

Multiply by the integrating factor \(u = e^{0.02828t}\) to get:

\[e^{0.02828t}y'+0.02828e^{0.02828t} y(t) = 3e^{0.02828t}\]

Integrate:

\[\int \left( e^{0.02828t}y'+0.02828e^{0.02828t} y(t) \right) dt= \int 3e^{0.02828t}dt\]

\[e^{0.02828t}y= \frac{3}{0.02828}e^{0.02828t} + C\]

Solve for \(y(t)\) to get:

\[y= \frac{3}{0.02828} + Ce^{-0.02828t}\]

Apply the initial condition \(y(0)=200 = \frac{3}{0.02828} +C\) so \(C= 93.9\) and our final answer is:

\[y= \frac{3}{0.02828} + 93.9e^{-0.02828t} \tag{2.8}\]

TipExample 2.4.3

Suppose that 50 mg of a radioactive substance, having a half-life of 3 years, is initially present. More of this material is to be added at a constant rate so that 100 mg of the substance is present at the end of 2 years. At what constant rate must this radioactive material be added?

TipExample 2.4.4

An art dealer claims that a painting he is selling is a 400-year old original. A pigment in the painting contains white lead \(^{210}\)Pb, a radioactive isotope having a half-life of 22 years. Careful measurements indicate that 97.5% of the original amount of \(^{210}\)Pb has disintegrated. Using the fact the rate of decay of such a substance is directly proportional to the amount of substance present at the time, determine the actual age of the painting.

2.5 First Order Nonlinear Differential Equations

Given the initial value problem \(y'=f(t,y)\), \(y(t_0)=y_0\) several questions arise:

  1. Under what circumstances can we be sure the equation has a solution passing through the given point?

  2. Is it possible for an equation to have more than one solution through an initial point? Or equivalently, if we find a solution passing through a point, can we be sure it is the only solution?

NoteTheorem (Existence-Uniqueness Theorem II)

Given the IVP \(y'=f(t,y)\), \(y(t_0)=y_0\), if \(f(t,y)\) and \(\frac{\partial f}{\partial y}\) are both continuous on an open rectangle \(R\) \(a < t <b\) \(c <y < d\) in the \(ty\)-plane containing \((t_0, y_0)\), the IVP is guaranteed to have a unique solution on the rectangle \(R\).

TipExample 2.5.1

Apply the Existence-Uniqueness Theorem II to find the largest interval where the following have solutions:

  1. \(2t+(1+y^2)y'=0\), \(y(1)=1\)

  2. \(3ty'+2\cos y = 1\), \(y(\pi/2) = -1\)

  3. \((\cos y) y' = 2 + \tan t\), \(y(0)=0\)

Autonomous Differential Equations:

First order autonomous differential equations have the form \(y' = f(y)\). If you have two different initial conditions for \(y' = f(y)\) you will get two different solutions: \(y_1(t)\) and \(y_2(t)\). The following theorem shows that the solution \(y_2(t)\) is related to the solution \(y_1(t)\) by:

\[y_2(t) = y_1(t-c) \tag{2.9}\]

where \(c\) is a constant.

NoteTheorem

Let the initial value problem \(y' = f(y)\), \(y(0) = y_0\) satisfy the conditions of the Existence-Uniqueness Theorem II and let \(y_1(t)\) be the unique solution, where the interval of existence for \(y_1(t)\) is \(a < t < b\), with \(a < 0 < b\).

Consider the initial value problem:

\[y' = f(y), \qquad y(t_0) = y_0 \tag{2.10}\]

Then the function \(y_2(t)\) defined by \(y_2(t) = y_1(t-t_0)\) is the unique solution of the initial value problem (2.10), and has an interval of existence:

\[t_0 + a < t < t_0 + b\]

TipExample 2.5.2

The solution of the initial value problem \(y' = f(y)\), \(y(0) = 8\), is known to be \(y(t)=(4+t)^{3/2}\). Let \(\bar{y}(t)\) represent the solution of the initial value problem \(y' = f(y)\), \(y(t_0) = 8\). Suppose we know that \(\bar{y}(0)=1\). What is \(t_0\)?

2.6 Separable Equations

Separable means we can group the \(x\)’s and \(y\)’s separately. Usually solved by integration.

TipExample 2.6.1

\[y' = \frac{x^2}{y(1+x^3)}\]

Rewrite and integrate

TipExample 2.6.2

\[y' = (\cos^2 x)(\cos^2 2y)\]

TipExample 2.6.3

\[y' = \frac{2x}{1+2y}, \qquad y(2)=0\]

TipExample 2.6.4

\[y' = 2(1+x)(1+y^2)\]

If you remember \(\displaystyle \int \frac{dy}{1+y^2} dy = \tan^{-1} y\) then this is finished. Otherwise you can try a substitution such as \(y = \tan u\) and \(dy = \sec^2 u du\)

2.9 One Dimensional Motion with Air Resistance

The equation of the forces acting on an object is:

\[\sum F = ma\]

If we have a falling object with air resistance then we can construct a differential equation to describe the motion. Usually the force of air resistance is proportional to the velocity (or the velocity squared).

TipExample 2.9.1

Write an equation that models the motion of an object of mass \(m\) falling in the atmosphere near sea level. There are two forces acting on the object: \(F_g=mg\) the force of gravity and air resistance. For the purposes of this problem the force of the air resistance is proportional to the velocity. If \(\gamma\) is the drag coefficient then the force of the air resistance is \(\gamma v\).

Here \(\gamma\) depends on the properties of the falling object. Here we will assume that positive acceleration/velocity/position is upward.

\[m \frac{dv}{dt}= -mg-\gamma v, \qquad v(0) = v_0\]

\[m \frac{dv}{dt}= -mg-kv^2, \qquad v(t) > 0\]

\[m \frac{dv}{dt}= -mg+kv^2, \qquad v(t) < 0\]

TipExample 2.9.2

A sky diver weighing 180 lbs falls vertically downward from an altitude of 5000 ft, and opens the parachute after 10 sec of free fall. Assume that the force of air resistance is \(0.75|v|\) when the parachute is closed and \(12|v|\) when the parachute is open, where the velocity is measured in ft/sec.

  1. Find the speed of the sky diver when the parachute opens.

  2. Find the distance fallen before the parachute opens.

  3. What is the limiting velocity after the parachute opens?

  4. Determine how long the sky diver is in the air after the parachute opens.

TipExample 2.9.3

A ball weighing 0.75 lb. is thrown vertically upward from a point 6 feet above the ground with an initial velocity of 20 feet per second. As it rises, it is acted on by air resistance equal to \(v/64\) lbs. How high will the ball rise?

One-Dimensional Dynamics with Distance as the Independent Variable

\[\frac{dv}{dt} = \frac{dv}{dx}\frac{dx}{dt} = v \frac{dv}{dx}\]

Using this formula we can change an equation from being velocity as a function of time to velocity as a function of distance.

TipExample 2.9.4

A boat of mass \(m\) is pushed away from a dock in the positive \(x\)-direction. The only horizontal force acting on the boat is a drag force that we assume is proportional to the boat’s velocity. The velocity at the initial position \(x_0=0\) is \(v_0 > 0\). The initial time is \(t_0=0\). Find the velocity of when the boat has position \(x_1 > 0\).

TipExample 2.9.5

A boat of mass \(m\) is pushed away from a dock in the positive \(x\)-direction. The only horizontal force acting on the boat is a drag force that we assume is proportional to the square of the boat’s velocity. The velocity at the initial position is \(v_0\). Find the velocity of the boat when it is a distance \(d\) from the dock.

2.10 Euler’s Method (Tangent Lines)

Euler’s method is a numerical approximation to a differential equation using tangent lines. This method is easy to implement because we know that the slope of the line is y’ and we have a starting point \((x_0, y_0)\).

Recall (from Algebra I): The equation of a line using the point slope formula.

If \(m =\) slope and \((x_0, y_0)\) = a point then the equation of the line is given by:

\[y-y_0=m(x-x_0)\]

or

\[y=y_0+m(x-x_0)\]

If we start with a differential equation initial value problem how does this apply?

Start with the IVP:

\[\frac{dy}{dx} = f(t,y); \qquad y(t_0)=y_0\]

then \(f(t,y)\) = slope and \((t_0, y_0)\) = point.

We can approximate the solutions near that point by a straight line approximation:

\[y=y_0+f(t_0, y_0)(t-t_0)\]

Graph showing Euler's method tangent line approximation. The diagram displays a coordinate system with t on the horizontal axis and y on the vertical axis. A curved solution line y = φ(t) passes through point (t₀, y₀) and continues to a later point (t₁, φ(t₁)). A straight tangent line with equation y = y₀ + f(t₀, y₀)(t - t₀) starts at (t₀, y₀) and approximates the solution curve near this point. The tangent line intersects the vertical line at t₁, giving the approximation y₁. Dashed horizontal and vertical lines help identify the key points and show how the linear approximation compares to the actual solution.

Figure 1: A tangent line approximation

As long as we stay close to \((t_0, y_0)\) this approximation is good, however, we would like to be able to approximate the value of \(y\) at any time \(t\). To do this we will find a linear approximation at the point \(t_1\) which is close to \(t_0\) and then, using that point, we will find an approximation for \(t_2\) which is close to \(t_1\) and so on. We still don’t know the function \(y(t)\) so we don’t know the \(y\) value at \(t_1\) but we can assume that if we use our linear approximation at \((t_0, y_0)\) this point will be close enough to the actual value of the function.

We are going to use the linear approximation to calculate the new \(y\)-value using the slope \(\frac{dy}{dx} = f(t_0,y_0)\). Then the new \(y\)-value is \(y_1=y_0+f(t_0, y_0)(t_1-t_0)\).

Using this new point \((t_1, y_1)\) we can approximate the solutions near \((t_1, y_1)\) using the line:

\[y=y_1+f(t_1, y_1)(t-t_1)\]

To find another point we use \(t_2\) to get \(y_2=y_1+f(t_1, y_1)(t_2-t_1)\).

In general we can find the point \((t_{n+1}, y_{n+1})\) by the following formula:

\[y_{n+1}=y_{n}+f(t_{n}, y_n)(t_{n+1}-t_n)\]

And if we let the difference \(t_{n+1}-t_n = h\) always be constant (\(h\)) then the formula reduces to:

\[y_{n+1}=y_n+f(t_n, y_n)h \tag{2.11}\]

The algorithm for the Euler Method is as follows:

Step 1: Define \(f(t,y)\)

Step 2: Input initial values of \(t_0\) and \(y_0\)

Step 3: Input step size \(h\) and the number of steps \(n\).

Step 4: Output \(t=t_0\) and \(y=y_0\)

Step 5: For \(j\) from 1 to \(n\) Do

Step 6: - \(k_1=f(t,y)\) - \(y=y+h \cdot k_1\) - \(t=t+h\)

Step 7: Output \(t\) and \(y\).

Step 8: End

TipExample 2.10.1

Using the Euler method with \(h = 0.1\) find approximate values to the solution of \(y'=3+t-y\) at \(t =\) 0.1, 0.2, 0.3 and 0.4.