Lesson 6 - Linear First-Order Equations

The standard form of linear first order

dy+P(x)y=Q(x)

When solving for a differential equation of this form, the general solution is as follows:

y(x)=1μ(x)[μ(x)Q(x)dx+C]

where, μ(x)=eP(x)dx, which is also known as our integrating factor.

For existence and uniqueness of a linear first-order equation, we analyze the functions of x. If P(x) and Q(x) are continuous on an interval (a,b) that contains the point x0, then the IVP will have a unique solution y(x) in the interval (a,b).

Example

xy+2y=x2x1,y(1)=12

The first thing we must do here is analyze whether the DE is in the standard form. We can see here that the leading term contains an x. We can divide the entire equation by x to ensure proper form.

y+2xy=x11x

Notice that I chose to keep P(x) in the form 2x. This will help us later. On the right, if we split up the fraction x2x1x up into three parts, we end up with x2xxx1x. We end up with the simplification above.

From here, we can identify that P(x)=2x. We will use this to find μ(x).

μ(x)=e2xdx2xdx=21xdx=2ln|x|μ(x)=e2ln|x|

From our properties of ln, we know that bln|a|=ln|ab|. We also know that eln|a|=a. Using these properties, we find that

e2ln|x|=eln|x2|=x2

Now, we can find our general solution y(x). Recall y(x):

y(x)=1μ(x)[μ(x)Q(x)dx+C]

Also recall Q(x)=x11x

y(x)=1x2[x2(x11x)dx+C]

Let's solely focus on the integral, which can be simplified.

x2(x11xdx)=(x3x2x)dx=14x413x312x2

Now, let's continue by multiple the integrating factor by the fully integrated equation and our constant C.

1x2(14x413x312x2+C)=14x213x12+Cx2y(x)=14x213x12+Cx2

Now, simply plug in our initial conditions to find C.

12=14(1)213(1)12+C(1)212=141312+C1214+13+12=CC=1312

Our final solution is:

y(x)=14x213x12+1312x1

Try for Yourself:

  1. t2dxdt+3tx=t4lnt+1, x(1)=0
  2. ty=2y+t5sin(2t)t3+4t4, y(π)=π4

Applications of First-Order Linear Equations

A brine solution flows at a constant rate of 4 L/min into a large tank that initially held 100 L of pure water. The solution inside the tank is kept well stirred and flows out of the tank at a rate of 3 L/min. If the concentration of salt in the bring entering the tank is 0.2 Kg/L, determine the mass of salt in the tank after t min.

We must analyze two separate systems here. First, we have an input system where the rate of bring flowing into the tank is 4 L/min, with a concentration of 0.2 Kg/L. Let's calculate this input rate:

0.2kgL×4Lmin=0.8kgmin

Now let's look at our output system. The amount of salt outputs at 3 L/min, and the output system A(t) is the amount of salt in the tank at any time t, which will depend on the size of the tank.

A(t)kg100L+t×3Lmin=3A(t)kg100+t

The DE is the difference between the input and the output systems we have defined above.

dAdt=0.83A(t)100+t

If we adjust this equation, we can turn this into a linear first order equation

dAdt+3100+tA(t)=0.8

where P(t)=3100+t and Q(t)=0.8

Now we can solve the DE using an integrating factor.

μ(t)=e3100+tdt=e3ln|100+t|=(100+t)3A(t)=1μ(t)[μ(t)Q(t)dt+C]A(t)=1(100+t)3[(100+t)3(0.8)dt+C]A(t)=1(100+t)3[0.84(100+t)4+C]A(t)=1(100+t)3[0.2(100+t)4+C]A(t)=0.2(100+t)+C(100+t)3

Thus the general solution is

A(t)=0.2(100+t)+C(100+t)3

We know that the tank starts with pure water, meaning the salt content at time t=0 is 0, therefore A(0)=0.

A(0)=00=0.2(100+0)+C(100+0)30=0.2(100)+C(100)3C=20×(100)3C=2×107

Therefore,

A(t)=0.2(100+t)+2×107(100+t)3

Next Lesson: Lesson 7 - Exact Equations

Table of Contents: Table of Contents