# 3.2: First order linear equations - Mathematics

We are searching data for your request:

Forums and discussions:
Manuals and reference books:
Data from registers:
Wait the end of the search in all databases.
Upon completion, a link will appear to access the found materials.

A first order differential equation is said to be ( extcolor{blue}{mbox{linear}} ) if it can be written as

egin{equation}label{eq:3.3.1}
y'+p(x)y=f(x),
end{equation}

A first order differential equation that can't be written like this is ( extcolor{blue}{mbox{nonlinear}} ). We say that eqref{eq:3.3.1} is ( extcolor{blue}{mbox{homogenous}} ) if (fequiv0); otherwise it's ( extcolor{blue}{mbox{nonhomogeneous}} ).

Since (yequiv0) is obviously a solution of the homogeneous equation (y'+p(x)y=0), we call it the ( extcolor{blue}{mbox{trivial solution}} ). Any other solution is ( extcolor{blue}{mbox{nontrivial}} ).

Example (PageIndex{1})

The first order equations

egin{eqnarray*}
x^2y'+3y=x^2
xy'-8x^2y=sin x
xy'+(ln x)y=0
y'=x^2y - 2
end{eqnarray*}

are not in the form eqref{eq:3.3.1}, but they are linear, since they can be rewritten as

egin{eqnarray*}
y'+{3over x^2}y=1
y'-8xy={sin xover x}
y'+{ln xover x}y=0
y'-x^2y=-2
end{eqnarray*}

## General Solution of a Linear First Order Equation

To motivate a definition that we'll need, consider the simple linear first order equation

egin{equation}label{eq:3.3.2}
y'={1over x^2}.
end{equation}

From calculus we know that (y) satisfies this equation if and only if

egin{equation}label{eq:3.3.3}
y=-frac{1}{x}+c,
end{equation}

where (c) is an arbitrary constant.

We call (c) a ( extcolor{blue}{mbox{parameter}} ) and say that eqref{eq:3.3.2} defines a ( extcolor{blue}{mbox{one--parameter family}} ) of functions. For each real number (c), the function defined by eqref{eq:3.3.3} is a solution of eqref{eq:3.3.2} on ((-infty,0)) and ((0,infty)); moreover, every solution of eqref{eq:3.3.2} on either of these intervals is of the form eqref{eq:3.3.3} for some choice of (c). We say that eqref{eq:3.3.3} is ( extcolor{blue}{mbox{the general solution}} ) of eqref{eq:3.3.2}.

We'll see that a similar situation occurs in connection with any first order linear equation

egin{equation}label{eq:3.3.4}
y'+p(x)y=f(x);
end{equation}

that is, if (p) and (f) are continuous on some open interval ((a,b)) then there's a unique formula (y=y(x,c)) analogous to eqref{eq:3.3.3} that involves (x) and a parameter (c) and has these properties:

For each fixed value of (c), the resulting function of (x) is a solution of eqref{eq:3.3.4} on ((a,b)). If (y) is a solution of eqref{eq:3.3.4} on ((a,b)), then (y) can be obtained from the formula by choosing (c) appropriately. We'll call (y=y(x,c)) the ( extcolor{blue}{mbox{general solution}} ) of eqref{eq:3.3.4}. When this has been established, it will follow that an equation of the form

egin{equation}label{eq:3.3.5}
P_0(x)y'+P_1(x)y=F(x)
end{equation}

has a general solution on any open interval ((a,b)) on which (P_0), (P_1), and (F) are all continuous and (P_0) has no zeros, since in this case we can rewrite eqref{eq:3.3.5} in the form eqref{eq:3.3.4} with (p=P_1/P_0) and (f=F/P_0), which are both continuous on ((a,b)).

To avoid awkward wording in examples and exercises, we won't specify the interval ((a,b)) when we ask for the general solution of a specific linear first order equation. Let's agree that this always means that we want the general solution on every open interval on which (p) and (f) are continuous if the equation is of the form eqref{eq:3.3.4}, or on which (P_0), (P_1), and (F) are continuous and (P_0) has no zeros, if the equation is of the form eqref{eq:3.3.5}. We leave it to you to identify these intervals in specific examples and exercises.

For completeness, we point out that if (P_0), (P_1), and (F) are all continuous on an open interval ((a,b)), but (P_0) ( extcolor{blue}{mbox{does}} ) have a zero in ((a,b)), then eqref{eq:3.3.5} may fail to have a general solution on ((a,b)) in the sense just defined. Since this isn't a major point that needs to be developed in depth, we won't discuss it further.

## Homogeneous Linear First Order Equations

We begin with the problem of finding the general solution of a homogeneous linear first order equation. The next example recalls a familiar result from calculus.

Example (PageIndex{2})

Let (a) be a constant.

a) Find the general solution of egin{equation} y'-ay=0.label{eq:3.3.6} end{equation}

b) Solve the initial value problem (y'-ay=0,quad y(x_0)=y_0)

a) You already know from calculus that if (c) is any constant, then (y=ce^{ax}) satisfies eqref{eq:3.3.6}. However, let's pretend you've forgotten this, and use this problem to illustrate a general method for solving a homogeneous linear first order equation. We know that eqref{eq:3.3.6} has the trivial solution (equiv0). Now suppose (y) is a nontrivial solution of eqref{eq:3.3.6}. Then, since a differentiable function must be continuous, there must be some open interval (I) on which (y) has no zeros.

We rewrite eqref{eq:3.3.6} as ({y'over y}=a) for (x) in (I). Integrating this shows that (ln|y|=ax+k), so (|y|=e^ke^{ax}) where (k) is an arbitrary constant. Since (e^{ax}) can never equal zero, (y) has no zeros, so (y) is either always positive or always negative. Therefore we can rewrite (y) as

egin{equation}label{eq:3.3.7} y=ce^{ax} end{equation}

where (c=left{egin{array}{cl}phantom{-}e^k&mbox{if } y>0, -e^k&mbox{if } y<0.end{array} ight.)

This shows that every nontrivial solution of eqref{eq:3.3.6} is of the form (y=ce^{ax}) for some nonzero constant (c). Since setting (c=0) yields the trivial solution, ({color{blue}it all}) solutions of eqref{eq:3.3.6} are of the form eqref{eq:3.3.7}. Conversely, eqref{eq:3.3.7} is a solution of eqref{eq:3.3.6} for every choice of (c), since differentiating eqref{eq:3.3.7} yields (y'=ace^{ax}=ay). Figure (PageIndex{1} ) shows the graphs of some solutions corresponding to various values of (c)

b) Imposing the initial condition (y(x_0)=y_0) yields (y_0=ce^{ax_0}), so (c=y_0e^{-ax_0}) and (y=y_0e^{-ax_0}e^{ax}=y_0e^{a(x-x_0)})

Example (PageIndex{3})

a) Find the general solution of egin{equation} xy'+y=0.label{eq:3.3.8} end{equation}

b) Solve the initial value problem egin{equation} xy'+y=0,quad y(1)=3.label{eq:3.3.9} end{equation}

a) We rewrite eqref{eq:3.3.8} as egin{equation}label{eq:3.3.10} y'+{1over x}y=0, end{equation} where (x) is restricted to either ((-infty,0)) or ((0,infty)). If

(y) is a nontrivial solution of eqref{eq:3.3.10}, there must be some open interval (I) on which (y) has no zeros. We can rewrite eqref{eq:3.3.10} as ({y'over y}=-{1over x}) for (x) in (I). Integrating shows that (ln|y|=-ln|x|+k) so (|y|={e^kover|x|}).

Since a function that satisfies the last equation can't change sign on either ((-infty,0)) or ((0,infty)), we can rewrite this result more simply as egin{equation}label{eq:3.3.11} y={cover x} end{equation}

where (c=left{egin{array}{cl}phantom{-}e^k&mbox{if } y>0, -e^k&mbox{if } y<0.end{array} ight.)

We've now shown that every solution of eqref{eq:3.3.10} is given by eqref{eq:3.3.11} for some choice of (c). (Even though we assumed that (y) was nontrivial to derive eqref{eq:3.3.11}, we can get the trivial solution by setting (c=0) in eqref{eq:3.3.11}.) Conversely, any function of the form eqref{eq:3.3.11} is a solution of eqref{eq:3.3.10}, since differentiating eqref{eq:3.3.11} yields (y'=-{cover x^2}), and substituting this and eqref{eq:3.3.11} into eqref{eq:3.3.10} yields

egin{eqnarray*}
y'+{1over x}y=-{frac{c} {x^2}}+{frac{1}{x}}{frac{c}{x}}=-{frac{c}{x^2}}+{frac{c}{x^2}}=0.
end{eqnarray*}

Figure (PageIndex{2} ) shows the graphs of some solutions corresponding to various values of (c)

b) Imposing the initial condition (y(1)=3) in eqref{eq:3.3.11} yields (c=3). Therefore the solution of eqref{eq:3.3.9} is (y={3over x}).

The interval of validity of this solution is ((0,infty)).

The results in Example 3 are special cases of the next theorem.

Theorem (PageIndex{1})

If (p) is continuous on ((a,b),) then the general solution of the homogeneous equation egin{equation}label{eq:3.3.12} y'+p(x)y=0 end{equation} on ((a,b)) is (y=ce^{-P(x)}),

where egin{equation}label{eq:3.3.13} P(x)=int p(x),dx end{equation} is any antiderivative of (p) on ((a,b);) that is,

Proof

If (y=ce^{-P(x)}), differentiating (y) and using eqref{eq:3.3.14} shows that (y'=-P'(x)ce^{-P(x)}=-p(x)ce^{-P(x)}=-p(x)y,) so (y'+p(x)y=0); that is, (y) is a solution of eqref{eq:3.3.12}, for any choice of (c).

Now we'll show that any solution of eqref{eq:3.3.12} can be written as (y=ce^{-P(x)}) for some constant (c). The trivial solution can be written this way, with (c=0). Now suppose (y) is a nontrivial solution. Then there's an open subinterval (I) of ((a,b)) on which (y) has no zeros. We can rewrite eqref{eq:3.3.12} as egin{equation}label{eq:3.3.15} {y'over y}=-p(x) end{equation} for (x) in (I). Integrating eqref{eq:3.3.15} and recalling eqref{eq:3.3.13} yields (ln|y|=-P(x) + k,) where (k) is a constant. This implies that (|y|=e^ke^{-P(x)}.)

Since (P) is defined for all (x) in ((a,b)) and an exponential can never equal zero, we can take (I=(a,b)), so (y) has zeros on ((a,b)) so we can rewrite the last equation as (y=ce^{-P(x)}),

where (c=left{egin{array}{cl}phantom{-}e^k&mbox{if } y>0mbox{ on } (a,b), -e^k&mbox{if } y<0mbox{ on }(a,b).end{array} ight.)

Rewriting a first order differential equation so that one side depends only on (y) and (y') and the other depends only on (x) is called ( extcolor{blue}{mbox{separation of variables}} ). In rewriting eqref{eq:3.3.12} as eqref{eq:3.3.15}. We'll apply this method to nonlinear equations in Section 3.2.

Linear Nonhomogeneous First Order Equations

We'll now solve the nonhomogeneous equation egin{equation}label{eq:3.3.16} y'+p(x)y=f(x). end{equation}

When considering this equation we call (y'+p(x)y=0) the ( extcolor{blue}{mbox{complementary equation}} ).

We'll find solutions of eqref{eq:3.3.16} in the form (y=uy_1), where (y_1) is a nontrivial solution of the complementary equation and (u) is to be determined. This method of using a solution of the complementary equation to obtain solutions of a nonhomogeneous equation is a special case of a method called ( extcolor{blue}{mbox{variation of parameters}} ), which you'll encounter several times in this book.

(Obviously, (u) can't be constant, since if it were, the left side of eqref{eq:3.3.16} would be zero. Recognizing this, the early users of this method viewed (u) as a parameter'' that varies; hence, the name "variation of parameters.'')

If (y=uy_1) then ( y'=u'y_1+uy_1'). Substituting these expressions for (y) and (y') into eqref{eq:3.3.16} yields (u'y_1+u(y_1'+p(x)y_1)=f(x),) which reduces to egin{equation}label{eq:3.3.17} u'y_1=f(x) end{equation}

since (y_1) is a solution of the complementary equation; that is, (y_1'+p(x)y_1=0.)

In the proof of Theorem 3.2.1 we saw that (y_1) has no zeros on an interval where (p) is continuous. Therefore we can divide eqref{eq:3.3.17} through by (y_1) to obtain (u'=f(x)/y_1(x).) We can integrate this (introducing a constant of integration), and multiply the result by (y_1) to get the general solution of eqref{eq:3.3.16}. Before turning to the formal proof of this claim, let's consider some examples.

#### Example (PageIndex{4}):

Find the general solution of egin{equation}label{eq:3.3.18} y'+2y=x^3e^{-2x}.end{equation}

By applying part(a) of Example 3.2.3 with (a=-2), we see that (y_1=e^{-2x}) is a solution of the complementary equation (y'+2y=0). Therefore we seek solutions of eqref{eq:3.3.18} in the form (y=ue^{-2x}), so that egin{equation} label{eq:3.3.19} y'=u'e^{-2x}-2ue^{-2x} ext{ and } y'+2y=u'e^{-2x}-2ue^{-2x}+2ue^{-2x}=u'e^{-2x} end{equation}

Therefore (y) is a solution of eqref{eq:3.3.18} if and only if (u'e^{-2x}=x^3e^{-2x}) or, equivalently, (u'=x^3.)

Therefore (u={x^4over4}+c ) and (y=ue^{-2x}=e^{-2x}left({x^4over4}+c ight)) is the general solution of eqref{eq:3.3.18}.

Figure (PageIndex{3} ) shows some integral curves for eqref{eq:3.3.18}.

#### Example (PageIndex{5}):

(a) Find the general solution egin{equation}label{eq:3.3.20} y'+(cot x)y=xcsc x.end{equation}

(b) Solve the initial value problem egin{equation}label{eq:3.3.21} y'+(cot x)y=xcsc x,quad y(pi/2)=1.end{equation}

(a) Here (p(x)=cot x) and (f(x)= xcsc x) are both continuous except at the points (x=rpi), where (r) is an integer.Therefore we seek solutions of eqref{eq:3.3.20} on the intervals (left(rpi, (r+1)pi ight)). We need a nontrival solution (y_1) of the complementary equation; thus, (y_1) must satisfy (y_1'+(cot x)y_1=0), which we rewrite as egin{equation}label{eq:3.3.22} {y_1'over y_1}=-cot x=-{cos xoversin x} end{equation}

Integrating this yields (ln|y_1|=-ln|sin x|,) where we take the constant of integration to be zero since we need only ( extcolor{blue}{mbox{one}} ) function that satisfies eqref{eq:3.3.22}. Clearly (y_1=1/sin x) is a suitable choice. Therefore we seek solutions of eqref{eq:3.3.20} in the form (y={uoversin x},) so that egin{equation} label{eq:3.3.23} y'={u'oversin x}-{ucos xoversin^2x} end{equation}

and egin{equation}label{eq:3.3.24} y'+(cot x)y={u' over sin x}-{u cos x over sin^2x}+{u cot x over sin x}={u' over sin x}-{u cos x oversin^2x}+{ucos xoversin^2 x}={u'oversin x}.end{equation}

Therefore (y) is a solution of eqref{eq:3.3.20} if and only if (frac{u'}{sin x}=xcsc x=frac{x}{sin x}) or, equivalently, ( u'=x.)

Integrating this yields

egin{equation}label{eq:3.3.25} u={x^2over2}+c, ext y={uoversin x}= {x^2over 2sin x}+ {coversin x}. end{equation}

is the general solution of eqref{eq:3.3.20} on every interval (left(rpi,(r+1)pi ight)) ((r=integer)).

(b) Imposing the initial condition (y(pi/2)=1) in eqref{eq:3.3.25} yields (1=frac{pi^2}{8}+c) or (c=1-frac{pi^2}{8}.)

Thus,(y={x^2over 2sin x}+{(1-pi^2/8)oversin x}) is a solution of eqref{eq:3.3.21}. The interval of validity of this solution is ((0,pi));

Figure (PageIndex{4} ) shows its graph.

It wasn't necessary to do the computations eqref{eq:3.3.23} and eqref{eq:3.3.24} in Example (PageIndex{5}) since we showed in the discussion preceding Example (PageIndex{5}) that if (y=uy_1) where (y_1'+p(x)y_1=0), then (y'+p(x)y=u'y_1). We did these computations so you would see this happen in this specific example. We recommend that you include these "unnecesary'' computations in doing exercises, until you're confident that you really understand the method. After that, omit them.

We summarize the method of variation of parameters for solving egin{equation} label{eq:3.3.26} y'+p(x)y=f(x) end{equation} as follows:

(a) Find a function (y_1) such that ({y_1'over y_1}=-p(x).)

For convenience, take the constant of integration to be zero.

(b) Write egin{equation} label{eq:3.3.27} y=uy_1 end{equation} to remind yourself of what you're doing.

(c) Write (u'y_1=f) and solve for (u'); thus, (u'=f/y_1).

(d) Integrate (u') to obtain (u), with an arbitrary constant of integration.

(e) Substitute (u) into eqref{eq:3.3.27} to obtain (y).

To solve an equation written as (P_0(x)y'+P_1(x)y=F(x)) we recommend that you divide through by (P_0(x)) to obtain an equation of the form eqref{eq:3.3.26} and then follow this procedure.

Solutions in Integral Form

Sometimes the integrals that arise in solving a linear first order equation can't be evaluated in terms of elementary functions. In this case the solution must be left in terms of an integral.

#### Example (PageIndex{6}):

(a) Find the general solution of (y'-2xy=1.)

(b) Solve the initial value problem egin{equation}label{eq:3.3.28} y'-2xy=1, y(0)=y_0. end{equation}

(a) To apply variation of parameters, we need a nontrivial solution (y_1) of the complementary equation; thus, (y_1'-2xy_1=0), which we rewrite as ({y_1'over y_1}=2x.)

Integrating this and taking the constant of integration to be zero yields (ln|y_1|=x^2, |y_1|=e^{x^2}.)

We choose (y_1=e^{x^2}) and seek solutions of eqref{eq:3.3.28} in the form (y=ue^{x^2}), where (u'e^{x^2}=1, u'=e^{-x^2}).

Therefore (u=c+int e^{-x^2}dx,) but we can't simplify the integral on the right because there's no elementary function with derivative equal to (e^{-x^2})

Therefore the best available form for the general solution of eqref{eq:3.3.28} is egin{equation}label{eq:3.3.29} y=ue^{x^2}= e^{x^2}left(c+int e^{-x^2}dx ight). end{equation}

(b) Since the initial condition in eqref{eq:3.3.28} is imposed at (x_0=0), it is convenient to rewrite eqref{eq:3.3.29} as (y=e^{x^2}left(c+int^x_0 e^{-t^2} dt ight), int_0^0e^{-t^2},dt=0.)

Setting (x=0) and (y=y_0) here shows that (c=y_0). Therefore the solution of the initial value problem is egin{equation}label{eq:3.3.30} y=e^{x^2}left(y_0 +int^x_0 e^{-t^2}dt ight).end{equation}

For a given value of (y_0) and each fixed (x), the integral on the right can be evaluated by numerical methods. An alternate procedure is to apply the numerical integration procedures discussed in Chapter 3 directly to the initial value problem eqref{eq:3.3.28}.

Figure~ ef{figure:2.1.5} shows graphs of eqref{eq:3.3.30} for several values of (y_0).

egin{figure}[H]

centering

scalebox{.9}{

includegraphics[bb=-78 148 689 643,width=5.67in,height=3.66in,keepaspectratio]{fig020105} }

color{blue}

caption{Solutions of $y'-2xy=1$, $y(0)=y_{0}$}

label{figure:2.1.5}

end{figure}

An Existence and Uniqueness Theorem

The method of variation of parameters leads to this theorem.

#### Theorem (PageIndex{2})

Suppose (p) and (f) are continuous on an open interval ((a,b),) and let (y_1) be any nontrivial solution of the complementary equation (y'+p(x)y=0) on ((a,b)).

Then:

(a) The general solution of the nonhomogeneous equation egin{equation}label{eq:3.3.31} y'+p(x)y=f(x) end{equation} on ((a,b)) is

egin{equation}label{eq:3.3.32} y=y_1(x)left(c +int f(x)/y_1(x),dx ight) end{equation}

(b) If (x_0) is an arbitrary point in ((a,b)) and (y_0) is an arbitrary real number, then the initial value problem (y'+p(x)y=f(x),quad y(x_0)=y_0) has the unique solution

(y=y_1(x)left({y_0over y_1(x_0)} +int^x_{x_0} {f(t)over y_1(t)}, dt ight)) on ((a,b))

Proof

(a) To show that eqref{eq:3.3.32} is the general solution of eqref{eq:3.3.31} on ((a,b)), we must prove that:

(i) If (c) is any constant, the function (y) in eqref{eq:3.3.32} is a solution of eqref{eq:3.3.31} on ((a,b)).

(ii) If (y) is a solution of eqref{eq:3.3.31} on ((a,b)) then (y) is of the form eqref{eq:3.3.32} for some constant (c).

To prove part{i}, we first observe that any function of the form eqref{eq:3.3.32} is defined on ((a,b)), since (p) and (f) are continuous on ((a,b)). Differentiating eqref{eq:3.3.32} yields (y'=y_1'(x)left(c +int f(x)/y_1(x),dx ight)+f(x).)

Since (y_1'=-p(x)y_1), this and eqref{eq:3.3.32} imply that egin{eqnarray*} y'&=&-p(x)y_1(x)left(c +int f(x)/y_1(x), dx ight)+f(x)&=&-p(x)y(x)+f(x),end{eqnarray*}

which implies that (y) is a solution of eqref{eq:3.3.31}.

To prove part{ii}, suppose (y) is a solution of eqref{eq:3.3.31} on ((a,b)). From the proof of Theorem~ ef{thmtype:3.3.1}, we know that (y_1) has no zeros on ((a,b)), so the function (u=y/y_1) is defined on ((a,b)).

Moreover, since (y'=-py+f y_1'=-py_1,)

egin {eqnarray*}u'&=&{y_1y'-y_1'yover y_1^2}&=&{y_1(-py+f)-(-py_1)yover y_1^2}={fover y_1}end{eqnarray*}

Integrating (u'=f/y_1) yields (u=left(c +int f(x)/y_1(x), dx ight),) which implies eqref{eq:3.3.32}, since (y=uy_1).

(b) We've proved part{a}, where (int f(x)/y_1(x),dx) in eqref{eq:3.3.32} is an arbitrary antiderivative of (f/y_1). Now it's convenient to choose the antiderivative that equals zero when (x=x_0), and write the general solution of eqref{eq:3.3.31} as (y=y_1(x)left(c +int^x_{x_0} {f(t)over y_1(t)}, dt ight).)

Since (y(x_0)= y_1(x_0)left(c +int^{x_0}_{x_0} {f(t)over y_1(t)}, dt ight)=cy_1(x_0),) we see that (y(x_0)=y_0) if and only if (c=y_0/y_1(x_0)).

## 3.2: First order linear equations - Mathematics

An operation is linear if it behaves "nicely'' with respect to multiplication by a constant and addition. The name comes from the equation of a line through the origin, $f(x)=mx$, and the following two properties of this equation. First, $f(cx)=m(cx)=c(mx)=cf(x)$, so the constant $c$ can be "moved outside'' or "moved through'' the function $f$. Second, $f(x+y)=m(x+y)=mx+my= f(x)+f(y)$, so the addition symbol likewise can be moved through the function.

The corresponding properties for the derivative are:

It is easy to see, or at least to believe, that these are true by thinking of the distance/speed interpretation of derivatives. If one object is at position $f(t)$ at time $t$, we know its speed is given by $f'(t)$. Suppose another object is at position $5f(t)$ at time $t$, namely, that it is always 5 times as far along the route as the first object. Then it "must'' be going 5 times as fast at all times.

The second rule is somewhat more complicated, but here is one way to picture it. Suppose a flat bed railroad car is at position $f(t)$ at time $t$, so the car is traveling at a speed of $f'(t)$ (to be specific, let's say that $f(t)$ gives the position on the track of the rear end of the car). Suppose that an ant is crawling from the back of the car to the front so that its position on the car is $g(t)$ and its speed relative to the car is $g'(t)$. Then in reality, at time $t$, the ant is at position $f(t)+g(t)$ along the track, and its speed is "obviously'' $f'(t)+g'(t)$.

We don't want to rely on some more-or-less obvious physical interpretation to determine what is true mathematically, so let's see how to verify these rules by computation. We'll do one and leave the other for the exercises. eqalign< (f(x)+g(x)) &= lim_ cr &= lim_ cr &= lim_ cr &= lim_ left( + ight) cr &= lim_ + lim_ cr &=f'(x)+g'(x)cr > This is sometimes called the sum rule for derivatives.

Example 3.2.1 Find the derivative of $ds f(x)=x^5+5x^2$. We have to invoke linearity twice here: $f'(x) = (x^5+5x^2) = x^5 + (5x^2) = 5x^4+5(x^2) = 5x^4+5cdot 2x^1 = 5x^4+10x.$

Because it is so easy with a little practice, we can usually combine all uses of linearity into a single step. The following example shows an acceptably detailed computation.

Example 3.2.2 Find the derivative of $ds f(x)=3/x^4-2x^2+6x-7$. $f'(x) = left( <3over x^4>-2x^2+6x-7 ight) = (3x^<-4>-2x^2+6x-7) = -12x^<-5>-4x+6.$

## First Order Linear Equations

A first order linear differential equation has the following form:

The general solution is given by

called the integrating factor . If an initial condition is given, use it to find the constant C .

Here are some practical steps to follow: 1. If the differential equation is given as

2. Find the integrating factor

3. Evaluate the integral 4. Write down the general solution

5. If you are given an IVP, use the initial condition to find the constant C .

Example: Find the particular solution of:

Solution: Let us use the steps: Step 1: There is no need for rewriting the differential equation. We have

Step 2: Integrating factor

Step 4: The general solution is given by

Step 5: In order to find the particular solution to the given IVP, we use the initial condition to find C . Indeed, we have

Therefore the solution is

Note that you may not have to do the last step if you are asked to find the general solution (not an IVP).

## Glossary

Mathematica is not only powerful program for symbolic mathematics, it is also capable of handling sophisticated numerical calculations. In fact, almost all the symbolic operations have a numerical counterpart. Mathematica uses a special letter N for numerical evaluations. One of the most common problems encountered in numerical mathematics is solving equations. They are defined in Mathematica by a double equal sign. The basic command in Mathematica for solving equations is Solve. However, for numerical evaluations, we need other procedures.

Suppose that we need to solve the algebraic equation

for some smooth functions f(x) and g(x). Mathematica has two basic commands, FixedPoint and NSolve, to solve these equations numerically. More details can be found in the first three sections of Part III. Recall that FixedPoint[f,expr] starts with expr, then applies f repeatedly until the result no longer changes. NSolve works when restricted to reals:

Example: Suppose we want to find a square root of 4.5. First, we apply FixedPoint command:

or 2.121320343559643 . Another option is

which is actually the same value as Newton's method provides: 2.121320343559643

## Subsection Compartmental Analysis ¶ permalink

Find the general solution egin y' + 3y = 2xe^ <-3x>end

Find the general solution egin 2xy' + y = 10sqrt end

Find the particular solution egin xy' + y = 3xy qquad y(1)=0 end

Find the particular solution egin y' = (1-y)cos x qquad y(pi)=2 end

##### 5 Bernoulli Equation

The equation egin frac + 2y = xy^ <-2>label ag <2.3.4>end is an example of a Bernoulli equation.

Show that the substitution (v=y^3) reduces equation (2.3.4) to the equation egin frac + 6v = 3x label ag <2.3.5>end

Solve equation (2.3.5) for (v ext<.>) Then make the substitution (v=y^3) to obtain the solution to equation (2.3.4).

A 400 gal tank initially contains 100 gal of brine containing 50 lb of salt. Brine containing 1 lb of salt per gallon enters the tank at the rate of 5 gal ⁄s, and the well–mixed brine in the tank flows out at a rate of 3 gal ⁄s. How much salt will the tank contain when it is full of brine?

## APEX Calculus

In the previous section, we explored a specific techique to solve a specific type of differential equation called a separable differential equation. In this section, we develop and practice a technique to solve a type of differential equation called a first order linear differential equation.

Recall than a linear algebraic equation in one variable is one that can be written (ax + b = 0 ext<,>) where (a) and (b) are real numbers. Notice that the variable (x) appears to the first power. The equations (sqrt+1=0) and (sin(x)-3x = 0) are both nonlinear. A linear differential equation is one in which the dependent variable and its derivatives appear only to the first power. We focus on first order equations, which involve first (but not higher order) derivatives of the dependent variable.

Figure 8.3.1 . Introduction to Section 8.3, and presentation of Example 8.3.3

### Subsection 8.3.1 Solving First Order Linear Equations

###### Definition 8.3.2 . First Order Linear Differential Equation.

A is a differential equation that can be written in the form

where (p) and (q) are arbitrary functions of the independent variable (x ext<.>)

###### Example 8.3.3 . Classifying Differential Equations.

Classify each differential equation as first order linear, separable, both, or neither.

1. (displaystyle displaystyle yp = xy)
2. (displaystyle displaystyle yp = e^y + 3x)
3. (displaystyle displaystyle yp - (cos(x))y = cos(x))
4. (displaystyle displaystyle yyp -3xy = 4ln(x))

Both. We identify (p(x) = -x) and (q(x) = 0 ext<.>) The separated form of the equation is (displaystyle frac = x,dx ext<.>)

Neither. The (e^y) term makes the equation nonlinear. Because of the addition, it is not possible to write the equation in separated form.

First order linear. We identify (p(x) = -cos(x)) and (q(x) = cos(x) ext<.>) The equation cannot be written in separated form.

Neither. Notice that dividing by (y) results in the nonlinear term (displaystyle frac<4ln(x)> ext<.>) It is not possible to write the equation in separated form.

Notice that linearity depends on the dependent variable (y ext<,>) not the independent variable (x ext<.>) The functions (p(x)) and (q(x)) need not be linear, as demonstrated in part (c) of Example 8.3.3. Neither (cos(x)) nor (sin(x)) are linear functions of (x ext<,>) but the differential equation is still linear.

Before working out a general technique for solving first order linear differential equations, we look at a specific example. Consider the differential equation

This is an easy differential equation to solve. On the left, the antiderivative of the derivative is simply the function (xy ext<.>) Using the substitution (u = sin(x)) on the right and integrating results in the implicit solution

Solving for (y) yields the explicit solution

Though not obvious, the differential equation above is actually a linear differential equation. Using the product rule and implicit differentiation, we can write (displaystyle fracig(xyig) = xfrac + y ext<.>) Our original differential equation can be written

If we divide by (x ext<,>) we have

which matches the form in Definition 8.3.2. Reversing our steps would lead us back to the original form our our differential equation.

In the examples in the previous section, we performed operations on the arbitrary constant (C ext<,>) but still called the result (C ext<.>) The justification is that the result after the operation is still an arbitrary contant. Here, we divide (C) by (x ext<,>) so the result depends explicitly on the independent variable (x ext<.>) Since (C/x) is not contant, we can't just call it (C ext<.>)

As motivated by the problem we just explored, the basic idea behind solving first order linear differential equations is to multiply both sides of the differential equation by a function, called an integrating factor, that makes the left hand side of the equation look like an expanded Product Rule. We then condense the left hand side into the derivative of a product and integrate both sides. An obvious question is, “How do you find this integrating factor?”

Figure 8.3.4 . Using an integrating factor to solve a linear differential equation

Consider the first order linear equation

Let's call the integrating factor (mu(x) ext<.>) We multiply both sides of the differential equation by (mu(x)) to get

Though we use (mu(x)) for our integrating factor, the symbol is unimportant. The notation (mu(x)) is a common choice, but other texts my use (alpha(x), I(x) ext<,>) or some other symbol to designate the integrating factor.

Our goal is to choose (mu(x)) so that the left hand side of the differential equation looks like the result of a Product Rule. The left hand side of the equation is

Using the Product Rule and Implicit Differentiation,

Equating (frac ig ( mu(x) y ig )) and (mu(x) left ( frac + p(x)y ight )) gives

In order for the integrating factor (mu(x)) to perform its job, it must solve the differential equation above. But that differential equation is separable, so we can solve it. The separated form is

Following the steps outlined in the previous section, we should technically end up with (mu(x) = Ce^ ext<,>) where (C) is an arbitrary constant. Because we multiply both sides of the differential equation by (mu(x) ext<,>) the arbitrary constant cancels, and we omit it when finding the integrating factor.

If (mu(x)) is chosen this way, after multiplying by (mu(x) ext<,>) we can always write the differential equation in the form

Integrating and solving for (y ext<,>) the explicit solution is

Though this formula can be used to write down the solution to a first order linear equation, we shy away from simply memorizing a formula. The process is lost, and it's easy to forget the formula. Rather, we always always follow the steps outlined in Key Idea 8.3.5 when solving equations of this type.

###### Key Idea 8.3.5 . Solving First Order Linear Equations.

Write the differential equation in the form

Compute the integrating factor

Multiply both sides of the differential equation by (mu(x) ext<,>) and condense the left hand side to get

Integrate both sides of the differential equation with respect to (x ext<,>) taking care to remember the arbitrary constant.

Solve for (y) to find the explicit solution to the differential equation.

Let's practice the process by solving the two first order linear differential equations from Example 8.3.3.

###### Example 8.3.6 . Solving a First Order Linear Equation.

Find the general solution to (yp = xy ext<.>)

We solve by following the steps in Key Idea 8.3.5. Unlike the process for solving separable equations, we need not worry about losing constant solutions. The answer we find will be the general solution to the differential equation. We first write the equation in the form

By identifying (p(x) = -x ext<,>) we can compute the integrating factor

Multiplying both side of the differential equation by (mu(x) ext<,>) we have

The left hand side of the differential equation condenses to yield

The step where the left hand side of the differential equation condenses to the derivative of a product can feel a bit magical. The reality is that we choose (mu(x)) so that we can get exactly this condensing behavior. It's not magic, it's math! If you're still skeptical, try using the Product Rule and Implicit Differentiation to evaluate (displaystyle fracleft (e^<-frac<1><2>x^2>y ight) ext<,>) and verify that it becomes (e^<-frac<1><2>x^2>left(displaystyle frac - xy ight) ext<.>)

We integrate both sides with respect to (x) to find the implicit solution

###### Example 8.3.7 . Solving a First Order Linear Equation.

Find the general solution to (yp -(cos(x))y = cos(x) ext<.>)

The differential equation is already in the correct form. The integrating factor is given by

Multiplying both sides of the equation by the integrating factor and condensing,

Using the substitution (u = -sin(x) ext<,>) we can integrate to find the implicit solution

The explicit form of the general solution is

We continue our practice by finding the particular solution to an initial value problem.

###### Example 8.3.8 . Solving a First Order Linear Initial Value Problem.

Solve the initial value problem (displaystyle xyp - y = x^3ln(x) ext<,>) with (y(1)=0 ext<.>)

We first divide by (x) to get

The integrating factor is given by

Multiplying both sides of the differential equation by the integrating factor and condensing the left hand side, we have

Using Integrating by Parts to find the antiderivative of (xln(x) ext<,>) we find the implicit solution

Solving for (y ext<,>) the explicit solution is

The initial condition (y(1) = 0) yields (C = 1/4 ext<.>) The solution to the initial value problem is

Differential equations are a valuable tool for exploring various physical problems. This process of using equations to describe real world situations is called mathematical modeling, and is the topic of the next section. The last two examples in this section begin our discussion of mathematical modeling.

###### Example 8.3.9 . A Falling Object Without Air Resistance.

Suppose an object with mass (m) is dropped from an airplane. Find and solve a differential equation describing the vertical velocity of the object assuming no air resistance.

The basic physical law at play is Newton's second law,

Using the fact that acceleration is the derivative of velocity, mass × acceleration can be writting (mv' ext<.>) In the absence of air resistance, the only force of interest is the force due to gravity. This force is approximately constant, and is given by (mg ext<,>) where (g) is the gravitational constant. The word equation above can be written as the differential equation

Because (g) is constant, this differential equation is simply an integration problem, and we find

Since (v = C) with (t=0 ext<,>) we see that the arbitrary constant here corresponds to the initial vertical velocity of the object.

The process of mathematical modeling does not stop simply because we have found an answer. We must examine the answer to see how well it can describe real world observations. In the previous example, the answer may be somewhat useful for short times, but intuition tells us that something is missing. Our answer says that a falling object's velocity will increase linearly as a function of time, but we know that a falling object does not speed up indefinitely. In order to more fully describe real world behavior, our mathematical model must be revised.

Figure 8.3.10 . Video presentation of Examples 8.3.9–8.3.11

###### Example 8.3.11 . A Falling Object with Air Resistance.

Suppose an object with mass (m) is dropped from an airplane. Find and solve a differential equation describing the vertical velocity of the object, taking air resistance into account.

We still begin with Newon's second law, but now we assume that the forces in the object come both from gravity and from air resistance. The gravitational force is still given by (mg ext<.>) For air resistance, we assume the force is related to the velocity of the object. A simple way to describe this assumption might be (kv^

ext<,>) where (k) is a proportionality constant and (p) is a positive real number. The value (k) depends on various factors such as the density of the object, surface area of the object, and density of the air. The value (p) affects how changes in the velocity affect the force. Taken together, a function of the form (kv^

) is often called a power law. The differential equation for the velocity is given by

(Notice that the force from air resistance opposes motion, and points in the opposite direction as the force from gravity.) This differential equation is separable, and can be written in the separated form

For arbitrary positive (p ext<,>) the integration is difficult, making this problem hard to solve analytically. In the case that (p=1 ext<,>) the differential equation becomes linear, and is easy to solve either using either separation of variables or integrating factor techniques. We assume (p=1 ext<,>) and proceed with an integrating factor so we can continue practicing the process. Writing

## Kansas State University

Step 1: Find the integrating factor $mu(x)=e^=e^<2log(x)>=x^2$ Step 2: Multiply through by the integrating factor $x^2frac+2xy=4x^2$ Step 3: Recognize the left hand side as the derivative of $mu y$. $frac(x^2y)=4x^2$ Step 4: Integrate both sides $x^2y=int 4x^2,dx=(4/3)x^3+C$ Step 5: Solve for $y$. $y(x)=(4/3)x+Cx^ <-2>$ EXAMPLE: Solve the initial value problem $dy/dx+2xy=1, y(1)=2$.

FIRST: Find the general solution.

Step 4: $displaystyle e^y=int e^,dx=.$

Unfortunately, I don't know the indefinite integral of $e^$. So I leave the integral as a definite integral with $x$ as the upper limit to give me a function of $x$ and $1$ as the lower limit because the initial value is given at $1$ (you'll see why that matters in a second). And I won't forget the constant of integration.

Step 4: (Take Two) $displaystyle e^y=int_1^x e^,ds+C$

SECOND: Solve the initial value problem by plugging in. $egin y(1)=e^<-1^2>int_1^1 e^,ds+Ce^<-1^2>&<uildrel extover => 2 C&=2e end$ While I don't know the indefinite integral of $e^$, I do know that the integral of anything from $1$ to $1$ is $. That is the advantage of choosing the lower limit to be the same as the place where the initial value is given. So the final answer is$y(x)=e^<-x^2>int_1^x e^,ds+2e^<1-x^2>\$

## Linear Equations

A linear first order ordinary differential equation (ODE) can be used as a mathematical model for a variety of phenomena, either physical or non-physical. Examples of such phenomena include the following: heat flow problems (thermodynamics), simple electrical circuits (electrical engineering), force problems (mechanics), rate of bacterial growth (biological science), rate of decomposition of radioactive material (atomic physics), crystallization rate of a chemical compound (chemistry), and rate of population growth (statistics). Most of these problems, however, appear in systems of differential equations that are considered in the second course.

A differential equation, written in the normal form:

is called the linear equation, where a(x) is a coefficient function and f(x) is the forcing, driving, input, or nonhomogeneous term. If the driving term f(x) is not identically zero, then the linear equation is called nonhomogeneous/inhomogeneous or driven. Otherwise, it is called the homogeneous equation.

Theorem: Let a(x) and f(x) be continuous functions on the open interval (a,b), and let ( x_0 in (a,b) . ) Then for each ( x in (a,b) ) there exists a unique solution ( y = phi (x) ) to the differential equation ( y' + a(x),y = f(x) ) that also satisfies the initial value condition that ( y(x_0 ) = y_0 ) for any real number y0. Moreover, this initial value problem has no singular solution. ■

Note that if the interval in the above theorem is the largest possible interval on which a(x) and f(x) are continuous, then the interval is the interval of validity for the solution. This means, that for linear first order differential equations, we won't need to actually solve the differential equation in order to find the largest possible interval where the solution exists and continuous (such interval is called the validity interval). Notice as well that the interval of validity will depend only partially on the initial condition. The interval must contain x0, but the value of y0 has no effect on the interval of validity.

Example: validity interval

Example: validity interval: Determine the validity interval for the initial value problem

Solution: First, in order to use the theorem to find the interval of validity, we must rewrite the differential equation in the normal form given in the theorem. So we need to divide out by the coefficient of the derivative.

Next, we need to identify where the two functions ( a(x) = frac<3> ) and ( f(x) = frac ) are not continuous. This will allow us to find all possible intervals of validity for the differential equation. So, a(x) is discontinuous at ( x= pm 2 , ) while f(x) is also undefined at x = 7. Now, with these points in hand, we can break up the real number line into four intervals where both a(x) and f(x) will be continuous. These four intervals are,

A linear homogeneous (also called not driven) equation

Example: Consider the homogeneous linear equation

For nonhomogeneous linear equation, there are known two systematic methods to find their solutions: integrating factor method and the Bernoulli method.

Integrating factor method allows us to reduce a linear differential equation in normal form ( y' + a(x),y = f(x) ) to an exact equation. There always exists an integrating factor &mu(x) as a function of x:

The Bernoulli method suggests to seek a solution of the inhomogeneous linear differential equation (it does not matter whether the equation is in normal form or not) ( y' + a(x),y = f(x) ) in the form of the product of two functions:

Example: Consider the nonhomogeneous equation

Its solution can be obtained in one line Mathematica code:

Now we apply the Bernoulli method: ( y(x) = u(x),v(x) , ) where u is a solution of the homogeneous equation

Example: Consider another example for a linear equation with variable coefficients:

We use an integrating factor method by solving the corresponding homogeneous/separable equation for &mu(x):

Now we demonstrate the Bernoulli method: ( y(x) = u(x), v(x) , ) where u(x) is a solution of the homogeneous part ( x, u' -5,u =0 ) and v(x) is obtained upon solving the separable equation ( x,u, v' = 27, x^7 , e^x . ) Integrating these sequential equations

Example: Solve the IVP: ( 3ty' +2y=t^2 , quad y(1)=1 . ) We try to find its solution using Mathematica:

Example: Using Mathematica, solve the linear differential equation: ( y' = e^ <-2x>-3,y , ) and plot some its solutions.

In DSolve command, the first argument (y'[x]==Exp[-2 x]-3 y[x]) represents the differential equation, the second argument (y[x]) instructs Mathematica that we are solving for y=y(x), and the third argument (x) instructs Mathematica that the independent variable is x.
Note that gensol is a nested list. The first part of gensol, extracted with gensol[[1]], is the list (y(x)->E^(-2 x) + E^(-3 x) C[1])
and the first part of this list, extracted with gensol[[1,1,1]], is y(x) while the second part of this list
(which represents the formula for the solution), extracted with gensol[[1,1,2]], is y=E^(-2 x) + E^(-3 x) C[1]

Example: In mining, “mine tailing” are what is left after everything valuable (such as a mineral, coal, or oil) has been removed. The material that is left over after the minerals, coal, or oil is extracted often presents a great deal of hazard to the environment. One of the ways of processing mine tailing is to store them in a pong this method is commonly used when water is used in the mining extraction. This method allows any particles that are suspended in the water to settle at the bottom of the pond. The water can then be treated and recycled.

Suppose that we have a gold mining operation and we are storing our tailing in a pond that has an initial volume of 100,000 cubic meters. When we begin our operation, the pond is filled with clean water. The pond has a stream flowing into it, and water is also being pumped out of the pond. Chemicals are used as a way to process gold ore, which is the material being extracted in this operation. Chemicals that are used, like sodium cyanide, are often highly poisonous and harmful to the environment. Thus, the water must be treated before it is released into the watershed. Suppose that 3,000 cubic meters per day flow into the pond from stream, and 3,000 cubic meters are pumped out of the pond each day to be processed and recycled. Since inflow and outflow are equal, the water level of the pond remains constant.

At time t=0, the water from stream becomes contaminated with chemicals from the mining operation at a rate of 10 kilograms of chemicals per 1000 cubic meters. We will assume that water in our tailing pond is well mixed so that the concentration of chemicals throughout the pond is uniform. In addition, any matter pumped into the pond from the stream settles to the bottom of the pond at a rate of 100 cubic meters per day. Thus, the volume of the pond is reduced by 100 cubic meters each day, and will become full after 500 days of operation. We shall assume that the particulate matter and the chemicals are included in the 1000 cubic meters that flow into the pond from the stream each day.

We want to find a differential equation that will model the amount of chemicals in the tailing pond at any particular time. Let y(t) be the amount of chemicals in the pond at time t. Then ( < ext d>y/< ext d>t ) is the difference between the rate at which the chemicals enter the pond and the rate at which the chemicals leave the pond.

Since water flows into the pond from the stream at a rate of 1000 cubic meters per day, the rate as which the chemicals enter the pond is 10 kilograms per day. On the other hand, the rate at which the chemicals leave the pond will depend on the amount of chemicals in the pond at time t. The volume of the pond is decreasing due to sediment, and at time t it is V(t)=100000−100t. Thus, the concentration of chemicals in the pond at time t is y/(100000−100t), and the rate at which the chemicals are flowing out of the pond to be recycled is

Notice that the above equation is not autonomous. In fact, it is not even separable. We will have to use a different approach to find a solution. First, we will rewrite the equation in the form suitable for an integrating factor

Example: Mixing Models. Many applications involve the mixing of two or more substances together. We can model how petroleum products are mixed together in a refinery, how various ingredients are mixed together in a brewery, or how greenhouse gases mix and move across various layers of the earth's atmosphere. Basically, it consists of finding a formula for the amount of some "pollutant" in a container, into which pollutant is entering at a fixed rate and also flowing out at a fixed rate. The general physical rule used to describe this situation is

Suppose that a 400-liter tank initially contains 200 liters of salt water containing 2 kilograms of salt. A brine mixture containing 1/10 kilograms of salt per liter flows into the top of the tank at a rate of 4 liters per minute. A well-mixed solution leaves the tank at rate of 3 liters per minute. We wish to know how much salt is in the tank, when the tank is full.

To construct our model, we will let t be the time (measured in minutes) and set up a differential equation that will measure how fast the amount of salt at time t, y(t), is changing. We have the initial condition y(0) = 5, and

Example: gas in magma affects volcanic eruptions. Many andesitic volcanoes exhibit effusive eruption activity, with magma volumes as large as 10 7 -- 10 9 m 3 erupted at rates of 1 -- 10 m 3 /s over periods of years or decades. During such eruptions, many complex cycles in eruption rates have been observed, with periods ranging from hours to years. Longerterm trends have also been observed, and are thought to be associated with the continuing recharge of magma from deep in the crust and with waning of overpressure in the magma reservoir. Here we present a model which incorporates effects due to compressibility of gas in magma. The eruption duration and volume of erupted magma may increase by up to two orders of magnitude if the stored internal energy associated with dissolved volatiles can be released into the magma chamber. This mechanism would be favored in shallow chambers or volatile-rich magmas and the cooling of magma by country rock may enhance this release of energy, leading to substantial increases in eruption rate and duration.

Consider a magma with bulk density &rho in a chamber of volume V undergoing a mass recharge rate Qi and eruption rate Q0. Conservation of mass indicates that

It is known that the rate of change in volume of the chamber, ( < ext d>V / < ext d>t , ) is related to the associated rate of change in pressure, ( < ext d>p / < ext d>t , ) as a result of deformation of the surrounding rock by:

Although the initial equation has partial derivatives, it can be assumed for the sake of this model that temperature is constant throughout the eruption thus the equation can be simplified to an ODE and solved both numerically and analytically.

Example: adding milk to coffee. Usually, there is a gap in time between you drink coffee and add cold mild to hot coffee. The temperature inside a mug of coffee is governed by the Newtons's equation.

The database contains 327 equations (14 equations are awaiting activation).

1. Ordinary Differential Equations (11 equations)
(0 equations) (3 equations) (3 equations) (1 equations) (1 equations) (2 equations) (1 equations)
(3 equations) (0 equations) (1 equations)
(12 equations) (13 equations) (7 equations) (2 equations) (24 equations) (1 equations)
(17 equations) (41 equations) (0 equations) (106 equations) (21 equations) (5 equations) (27 equations) (1 equations)
(4 equations) (1 equations) (5 equations) (4 equations) (1 equations) (8 equations)
(2 equations) (1 equations) (9 equations) (0 equations)

The EqWorld website presents extensive information on solutions to various classes of ordinary differential equations, partial differential equations, integral equations, functional equations, and other mathematical equations.

Copyright © 2006-2011 Andrei D. Polyanin, Alexei I. Zhurov and Alexander L. Levitin

## First Order Differential Equations

The first technique, for use on first order 'separable' differential equations, is separation of variables. A first order differential equation (dy/dt) is said to be separable if it can be written in the form:

Then, separation of variables means to divide through by (f(y)) and then integrate with respect to (t), i.e.:

There's really no more to it than that! Though of course the integrals on the left and right hand sides may not be particularly simple ones they'l often require you to make a substitution. That's one of the reasons why knowing A-Level integration inside out is of key importance and you should consider going through Module 10 as well for some hints and tips there.

### The Method of Integrating Factors

Our second technique exploits the product rule for differentiation to solve first order differential equations that can be written in the form:

Our aim is to be able to write the left hand side as ( frac

[g(t)y]) for some function (g(t)). You don't need to worry too much about why, but if we take (g(t)=e^ ) then we have what we want. (g) here is what we usually refer to as our integrating factor. Specifically, this means our steps are:

Now, as a hopefully illuminating example, lets take the simple case:

Then our integrating factor is:

And we have jumping to the final formula above:

So, they're the two techniques you'll need to become familiar with to begin to tackle STEP first order differential equation problems. To really test things out though, lets proceed to work through part of a past STEP question.

### Example

This extract is from Question 6 on STEP III 2008 and it gives a nice introduction to first order differential equations in STEP. Firstly, we're first asked to differentiate (y) with respect to (x). The import thing to remember is that (p) is itself a function of (x) and so we're doing implicit differentiation. We find:

Then, realising the LHS (dy/dx) can be replaced by (p) and rearranging suitabily we find:

So, now we've got ourselves a differential equation for (x) that we need to solve. We ask ourselves firstly if it is separable, and the answer should hopefully clearly be no. But, it is of the form that allows us to use integrating factors. This should be a lot clearer if we write it as:

First then, we need to find our integrating factor. Here it is given by:

Therefore multiplying through and proceeding along the steps we went through in general earlier, or jumping to the final formula, we have:

as required. Then our condition (p=-3), (x=2) gives us (A):

(hspace <1.7 in>2=-frac<2><3>(-3)+A frac<1> <(-3)^2>Rightarrow 2=2+A frac<1> <9>Rightarrow A=0. )

So, we have (x=-frac<2><3>p) or (p=-frac<3><2>x), and substituting this in our original equation for (y) we have our final answer: