[Notes on Diffy Qs home] [PDF version] [Buy paperback on Amazon]

[next] [prev] [prev-tail] [tail] [up]

Note: 1 lecture, §1.5 in [EP], §2.1 in [BD]

One of the most important types of equations we will learn how to solve are the so-called linear equations. In fact, the majority of the course is about linear equations. In this section we focus on the ﬁrst order linear equation. A ﬁrst order equation is linear if we can put it into the form:

(1.3) |

The word “linear” means linear in and ; no higher powers nor functions of or appear. The dependence on can be more complicated.

Solutions of linear equations have nice properties. For example, the solution exists wherever and are deﬁned, and has the same regularity (read: it is just as nice). But most importantly for us right now, there is a method for solving linear ﬁrst order equations.

The trick is to rewrite the left hand side of (1.3) as a derivative of a product of with another function. To this end we ﬁnd a function such that

This is the left hand side of (1.3) multiplied by . So if we multiply (1.3) by , we obtain

Now we integrate both sides. The right hand side does not depend on and the left hand side is written as a derivative of a function. Afterwards, we solve for . The function is called the integrating factor and the method is called the integrating factor method.

We are looking for a function , such that if we diﬀerentiate it, we get the same function back multiplied by . That seems like a job for the exponential function! Let

We compute:

Of course, to get a closed form formula for , we need to be able to ﬁnd a closed form formula for the integrals appearing above.

First note that and . The integrating factor is . We multiply both sides of the equation by to get

We integrate Next, we solve for the initial condition , so . The solution isNote that we do not care which antiderivative we take when computing . You can always add a constant of integration, but those constants will not matter in the end.

Exercise 1.4.1: Try it! Add a constant of integration to the integral in the integrating factor and show that the solution you get in the end is the same as what we got above.

An advice: Do not try to remember the formula itself, that is way too hard. It is easier to remember the process and repeat it.

Since we cannot always evaluate the integrals in closed form, it is useful to know how to write the solution in deﬁnite integral form. A deﬁnite integral is something that you can plug into a computer or a calculator. Suppose we are given

Look at the solution and write the integrals as deﬁnite integrals.

(1.4) |

You should be careful to properly use dummy variables here. If you now plug such a formula into a computer or a calculator, it will be happy to give you numerical answers.

Exercise 1.4.2: Check that in formula (1.4).

Exercise 1.4.3: Write the solution of the following problem as a deﬁnite integral, but try to simplify as far as you can. You will not be able to ﬁnd the solution in closed form.

Remark 1.4.1: Before we move on, we should note some interesting properties of linear equations. First, for the linear initial value problem , , there is always an explicit formula (1.4) for the solution. Second, it follows from the formula (1.4) that if and are continuous on some interval , then the solution exists and is diﬀerentiable on . Compare with the simple nonlinear example we have seen previously, , and compare to Theorem 1.2.1.

Example 1.4.2: Let us discuss a common simple application of linear equations. This type of problem is used often in real life. For example, linear equations are used in ﬁguring out the concentration of chemicals in bodies of water (rivers and lakes).

A 100 liter tank contains 10 kilograms of salt dissolved in 60 liters of water. Solution of water and salt (brine) with concentration of 0.1 kilograms per liter is ﬂowing in at the rate of 5 liters a minute. The solution in the tank is well stirred and ﬂows out at a rate of 3 liters a minute. How much salt is in the tank when the tank is full?

Let us come up with the equation. Let denote the kilograms of salt in the tank, let denote the time in minutes. For a small change in time, the change in (denoted ) is approximately

Dividing through by and taking the limit we see that

In our example, we have

Our equation is, therefore,Or in the form (1.3)

Let us solve. The integrating factor is

We multiply both sides of the equation to get

We need to ﬁnd . We know that at , . So

or

We are interested in when the tank is full. So we note that the tank is full when , or when . So

See Figure 1.7 for the graph of over .

The concentration at the end is approximately 0.1186 ^{kg}/_{liter} and we started with or 0.167 ^{kg}/_{liter}.

In the exercises, feel free to leave answer as a deﬁnite integral if a closed form solution cannot be found. If you can ﬁnd a closed form solution, you should give that.

Exercise 1.4.9: Suppose there are two lakes located on a stream. Clean water ﬂows into the ﬁrst lake, then the water from the ﬁrst lake ﬂows into the second lake, and then water from the second lake ﬂows further downstream. The in and out ﬂow from each lake is 500 liters per hour. The ﬁrst lake contains 100 thousand liters of water and the second lake contains 200 thousand liters of water. A truck with 500 kg of toxic substance crashes into the ﬁrst lake. Assume that the water is being continually mixed perfectly by the stream. a) Find the concentration of toxic substance as a function of time in both lakes. b) When will the concentration in the ﬁrst lake be below 0.001 kg per liter? c) When will the concentration in the second lake be maximal?

Exercise 1.4.10: Newton’s law of cooling states that where is the temperature, is time, is the ambient temperature, and is a constant. Suppose that for some constants and . That is, the ambient temperature oscillates (for example night and day temperatures). a) Find the general solution. b) In the long term, will the initial conditions make much of a diﬀerence? Why or why not?

Exercise 1.4.11: Initially 5 grams of salt are dissolved in 20 liters of water. Brine with concentration of salt 2 grams of salt per liter is added at a rate of 3 liters a minute. The tank is mixed well and is drained at 3 liters a minute. How long does the process have to continue until there are 20 grams of salt in the tank?

Exercise 1.4.12: Initially a tank contains 10 liters of pure water. Brine of unknown (but constant) concentration of salt is ﬂowing in at 1 liter per minute. The water is mixed well and drained at 1 liter per minute. In 20 minutes there are 15 grams of salt in the tank. What is the concentration of salt in the incoming brine?

Exercise 1.4.103: Suppose a water tank is being pumped out at 3 ^{L}/_{min}. The water tank starts at 10 L of clean water. Water with toxic substance is ﬂowing into the tank at 2 ^{L}/_{min}, with concentration ^{g}/_{L} at time . When the tank is half empty, how many grams of toxic substance are in the tank (assuming perfect mixing)?

Exercise 1.4.104: Suppose we have bacteria on a plate and suppose that we are slowly adding a toxic substance such that the rate of growth is slowing down. That is, suppose that . If , ﬁnd the population at .

Exercise 1.4.105: A cylindrical water tank has water ﬂowing in at cubic meters per second. Let be the area of the cross section of the tank in meters. Suppose water is ﬂowing from the bottom of the tank at a rate proportional to the height of the water level. Set up the diﬀerential equation for , the height of the water, introducing and naming constants that you need. You should also give the units for your constants.