Ordinary Differential Equations

§2 First-Order Equations

Evan Luo

8 min read

A first-order scalar ODE has one unknown real-valued function yy and no derivative higher than yy'. Here tt is the independent variable, y=y(t)y=y(t) is the unknown function, and

y=dydt.y'=\frac{dy}{dt}.

The equation can often be written as

y=f(t,y).y'=f(t,y).

There is no single method for every first-order equation. In this section, two recognizable forms are especially important:

FormWhat to look forMethod
y+P(t)y=g(t)y'+P(t)y=g(t)yy and yy' appear linearlyIntegrating factor
y=f1(t)f2(y)y'=f_1(t)f_2(y)The tt-part and yy-part can be separatedSeparation of variables

The hard part is usually recognizing the form. Once that is done, the remaining steps are mostly algebra, differentiation, and integration.

First-order linear equations

A first-order linear equation may first appear as

a0(t)y(t)+a1(t)y(t)=h(t).a_0(t)y'(t)+a_1(t)y(t)=h(t).

On any interval where a0(t)0a_0(t)\ne0, divide the entire equation by a0(t)a_0(t):

y(t)+P(t)y(t)=g(t),y'(t)+P(t)y(t)=g(t),

where

P(t)=a1(t)a0(t),g(t)=h(t)a0(t).P(t)=\frac{a_1(t)}{a_0(t)}, \qquad g(t)=\frac{h(t)}{a_0(t)}.

This is the standard form. Always reach this form before finding an integrating factor. In particular, the coefficient of yy' must be 11.

The idea behind the integrating factor

We want to turn the two terms on the left,

y+P(t)y,y'+P(t)y,

into the derivative of one product. Introduce an unknown function μ(t)\mu(t), read “mu of tt,” and multiply the equation by it:

μy+μPy=μg.\mu y'+\mu P y=\mu g.

The product rule says

ddt(μy)=μy+μy.\frac{d}{dt}(\mu y)=\mu y'+\mu' y.

The μy\mu y' terms already match. To make the other terms match as well, choose μ\mu so that

μy=μPy.\mu' y=\mu P y.

It is enough to require

μ=Pμ.\mu'=P\mu.

For a nonzero μ\mu,

μμ=P(t).\frac{\mu'}{\mu}=P(t).

Integrating gives

lnμ(t)=P(t)dt,\ln|\mu(t)|=\int P(t)\,dt,

so we may choose the integrating factor

μ(t)=eP(t)dt.\boxed{\mu(t)=e^{\int P(t)\,dt}}.

There is no +C+C in the usual formula for μ\mu. Including one would only multiply μ\mu by a nonzero constant, and that constant cancels from the final answer. We simply choose it to be 11.

With this choice,

ddt(μy)=μg.\frac{d}{dt}(\mu y)=\mu g.

Some WeBWorK questions use u(t)u(t) for the reciprocal of the integrating factor:

u(t)=1μ(t).u(t)=\frac{1}{\mu(t)}.

Under that convention, μ\mu is still the factor multiplied into the ODE, while uu is the factor that appears after solving for yy. Read the requested symbol carefully; uu and μ\mu may be reciprocals rather than competing answers.

Integrating and then dividing by μ\mu gives

y(t)=1μ(t)(μ(t)g(t)dt+C).\boxed{ y(t)=\frac{1}{\mu(t)} \left(\int \mu(t)g(t)\,dt+C\right). }

The formula is useful, but the idea is more important: the integrating factor is chosen to create a product derivative.

A reliable procedure

For

a0(t)y+a1(t)y=h(t),a_0(t)y'+a_1(t)y=h(t),

use these steps:

  1. Divide by a0(t)a_0(t) to obtain y+P(t)y=g(t)y'+P(t)y=g(t).
  2. Calculate μ(t)=eP(t)dt\mu(t)=e^{\int P(t)\,dt}.
  3. Multiply every term by μ(t)\mu(t).
  4. Rewrite the left side as (μy)(\mu y)'.
  5. Integrate both sides and include +C+C here.
  6. Divide by μ(t)\mu(t).
  7. If an initial condition is given, use it to determine CC.
  8. Differentiate and substitute to check the result.

Example: a variable coefficient

Consider

y+2t4+t2y=4t4+t2.y'+\frac{2t}{4+t^2}y=\frac{4t}{4+t^2}.

This is already in standard form, with

P(t)=2t4+t2.P(t)=\frac{2t}{4+t^2}.

The integrating factor is

μ(t)=e2t4+t2dt=eln(4+t2)=4+t2.\begin{aligned} \mu(t) &=e^{\int \frac{2t}{4+t^2}\,dt}\\ &=e^{\ln(4+t^2)}\\ &=4+t^2. \end{aligned}

Here 4+t24+t^2 is always positive, so no interval split is needed. Multiply the equation by 4+t24+t^2:

(4+t2)y+2ty=4t.(4+t^2)y'+2ty=4t.

By the product rule,

ddt((4+t2)y)=4t.\frac{d}{dt}\bigl((4+t^2)y\bigr)=4t.

Integrate:

(4+t2)y=2t2+C.(4+t^2)y=2t^2+C.

Therefore,

y(t)=2t2+C4+t2.\boxed{y(t)=\frac{2t^2+C}{4+t^2}}.

This is the general solution: different values of CC give different solutions.

If y(0)=0y(0)=0, then

0=C4,0=\frac{C}{4},

so C=0C=0 and

y(t)=2t24+t2.y(t)=\frac{2t^2}{4+t^2}.

If instead y(0)=1y(0)=1, then C=4C=4, so

y(t)=2t2+44+t2.y(t)=\frac{2t^2+4}{4+t^2}.

An initial condition selects one member of the general family.

Example: an exponential right-hand side

Consider

y+12y=12et/3.y'+\frac12y=\frac12e^{t/3}.

The integrating factor is

μ(t)=e1/2dt=et/2.\mu(t)=e^{\int 1/2\,dt}=e^{t/2}.

Multiplying the equation gives

ddt(et/2y)=12et/2et/3=12e5t/6.\frac{d}{dt}\left(e^{t/2}y\right) =\frac12e^{t/2}e^{t/3} =\frac12e^{5t/6}.

Integrate:

et/2y=12e5t/6dt+C=35e5t/6+C.e^{t/2}y =\frac12\int e^{5t/6}\,dt+C =\frac35e^{5t/6}+C.

Divide by et/2e^{t/2}:

y(t)=35et/3+Cet/2.\boxed{y(t)=\frac35e^{t/3}+Ce^{-t/2}}.

The two terms have different roles. The first responds to the right-hand side of the ODE. The term Cet/2Ce^{-t/2} solves the corresponding homogeneous equation, obtained by replacing the right side with zero:

y+12y=0.y'+\frac12y=0.

Separable equations

A first-order ODE is separable if it can be written as

dydt=f1(t)f2(y).\frac{dy}{dt}=f_1(t)f_2(y).

The right side must be a product of:

  • a function depending only on tt;
  • a function depending only on yy.

For example,

y=et+y=eteyy'=e^{t+y}=e^t e^y

is separable. By contrast,

y=t2+y2y'=t^2+y^2

is not separable in this form because the right side is a sum that cannot generally be factored into f1(t)f2(y)f_1(t)f_2(y).

Assuming f2(y)0f_2(y)\ne0, divide by f2(y)f_2(y) and integrate:

1f2(y)dy=f1(t)dt+C.\boxed{ \int\frac{1}{f_2(y)}\,dy = \int f_1(t)\,dt+C. }

The result may define yy implicitly, meaning that yy is not isolated. That is still a valid solution.

Do not lose equilibrium solutions

Before dividing by f2(y)f_2(y), solve

f2(y)=0.f_2(y)=0.

Any constant value y=yy=y_* satisfying this equation gives

y(t)=0=f1(t)f2(y),y'(t)=0=f_1(t)f_2(y_*),

so y(t)yy(t)\equiv y_* is an equilibrium solution. Dividing by f2(y)f_2(y) would hide it, so check these values separately.

Why separation works

Writing dydy and dtdt on opposite sides is a useful mnemonic, but the chain rule is the real justification.

Starting from

y=f1(t)f2(y),y'=f_1(t)f_2(y),

rearrange it as

f1(t)+1f2(y)y=0.-f_1(t)+\frac{1}{f_2(y)}y'=0.

Define

M(t)=f1(t),N(y)=1f2(y).M(t)=-f_1(t), \qquad N(y)=\frac{1}{f_2(y)}.

Choose antiderivatives H1H_1 and H2H_2 such that

H1(t)=M(t),H2(y)=N(y).H_1'(t)=M(t), \qquad H_2'(y)=N(y).

Because yy depends on tt, the chain rule gives

ddtH2(y(t))=H2(y)y=N(y)y.\frac{d}{dt}H_2(y(t)) =H_2'(y)y' =N(y)y'.

Therefore,

M(t)+N(y)y=ddtH1(t)+ddtH2(y(t))=ddt(H1(t)+H2(y(t))).\begin{aligned} M(t)+N(y)y' &=\frac{d}{dt}H_1(t) +\frac{d}{dt}H_2(y(t))\\ &=\frac{d}{dt}\bigl(H_1(t)+H_2(y(t))\bigr). \end{aligned}

The ODE says this derivative is zero, so the quantity inside must be constant:

H1(t)+H2(y)=C.\boxed{H_1(t)+H_2(y)=C}.

This is exactly the implicit equation obtained by separating and integrating.

Potential functions and level curves

Define

ψ(t,y)=H1(t)+H2(y).\psi(t,y)=H_1(t)+H_2(y).

The function ψ\psi, read “psi,” is called a potential function. A solution follows a curve on which ψ\psi is constant:

ψ(t,y)=C.\psi(t,y)=C.

Such a curve is called a level curve. Different values of CC give different curves in the solution family.

Concentric level curves with the upper branch selected by an initial condition

Example: circles as implicit solutions

Consider

dydx=xy.\frac{dy}{dx}=-\frac{x}{y}.

Separate and integrate:

ydy=xdx,y22=x22+C.\begin{aligned} y\,dy&=-x\,dx,\\ \frac{y^2}{2}&=-\frac{x^2}{2}+C. \end{aligned}

Move both squared terms to the same side:

x22+y22=C.\boxed{\frac{x^2}{2}+\frac{y^2}{2}=C}.

The level curves are circles centered at the origin. If the initial condition is

y(0)=1,y(0)=1,

then

C=022+122=12.C=\frac{0^2}{2}+\frac{1^2}{2}=\frac12.

Thus

x2+y2=1.x^2+y^2=1.

Solving for yy produces two branches:

y=±1x2.y=\pm\sqrt{1-x^2}.

The initial value y(0)=1y(0)=1 selects the upper branch:

y(x)=1x2.\boxed{y(x)=\sqrt{1-x^2}}.

Its maximal solution interval—the largest interval containing the initial point on which the formula satisfies the original ODE—is

1<x<1.-1 < x < 1.

Although the formula is real at x=±1x=\pm1, it has y=0y=0 there, and the original ODE contains division by yy. The ODE itself is therefore undefined at those endpoints.

Finite-time blowup

A solution has finite-time blowup when its magnitude becomes unbounded at a finite endpoint of its interval of existence.

Consider

y=y2,y(0)=y0>0.y'=y^2, \qquad y(0)=y_0>0.

First note that y0y\equiv0 is an equilibrium solution. For a nonzero solution, separate variables:

dyy2=dt.\frac{dy}{y^2}=dt.

Integrate:

1y=t+C.-\frac1y=t+C.

The initial condition gives

C=1y0.C=-\frac1{y_0}.

Therefore,

y(t)=11y0t=y01y0t.\boxed{ y(t)=\frac{1}{\frac1{y_0}-t} =\frac{y_0}{1-y_0t}. }

The denominator becomes zero at

t=1y0.t=\frac1{y_0}.

As tt approaches this time from the left,

limt(1/y0)y(t)=+.\lim_{t\to(1/y_0)^-}y(t)=+\infty.

The maximal interval containing t=0t=0 is therefore

(,1y0).\boxed{\left(-\infty,\frac1{y_0}\right)}.

This is different from ordinary exponential growth. A solution of y=yy'=y grows like ete^t and becomes unbounded only as tt\to\infty. The solution of y=y2y'=y^2 becomes unbounded at a finite time.

Method check

When you see a first-order equation, ask:

  1. Can it be written as y+P(t)y=g(t)y'+P(t)y=g(t)? Use an integrating factor.
  2. Can it be written as y=f1(t)f2(y)y'=f_1(t)f_2(y)? Separate the variables.
  3. Before dividing by a function of yy, does that function have zeros? Check the corresponding equilibrium solutions.
  4. Does the final formula contain a denominator, logarithm, or square root? Use it to determine the actual solution interval.
  5. Does an initial condition select a constant, a branch, or both?
Back to Ordinary Differential Equations

0 reads

Last edited