|
Elementary Solution Methods for First-Order ODEs
Consider the first-order ODE
describing the evolution of y as a function of t. If we know
initial conditions y(t0) = y0, two questions immediately come to
mind:
- Does y¢ = f(t,y), y(t0) = y0 have a solution?
- If so, can we find a formula for the solution?
The first question is easily addressed:
Existence and Uniqueness Theorem
Suppose that f(t,y) and (¶f(t,y))/( ¶y) are
continuous on a closed rectangle R of the ty-plane. If
(t0,y0) Î R, then the IVP
has a unique solution y(t) on some t-interval containing t0.
The second question is much more difficult, and often we need to
resort to numerical methods. However, in this tutorial we review four
of the most commonly-used analytic solution methods for first-order
ODES.
Separating the Variables
If an ODE can be written in the form
then the ODE is said to be separable. In this case, a simple
solution technique can be derived as follows:
Suppose y = f(t) solves the ODE. Rewriting the ODE as
h(y)y¢ = g(t),
| | | |
| | since y = f(t), y¢ = f¢(t) |
| |
|
| | | |
| | Integrating with respect to t on each side. |
| |
|
| | | |
Upon integrating, we have our implicitly-defined general
solution of the ODE, which we can often solve explicitly for y(t).
Example
Let's solve the separable ODE y¢ = 4y/t. Separating the
variables and integrating,
|
| |
|
|
|
|
|
|
|
|
| Recall that r ln a = ln ar and
ln a - ln b = ln a/b |
|
|
|
|
|
|
|
|
|
| eln a = a. Relabel eC1as C2. |
|
|
|
|
|
|
|
|
| |
|
The general solution, y = ct4, defines a family of solution curves
corresponding to various initial conditions.
View Solutions
Using an Integrating Factor to solve a Linear ODE
If a first-order ODE can be written in the normal linear form
the ODE can be solved using an integrating factor m(t) = eòp(t)dt:
|
m(t)[ y¢+ p(t)y ] = m(t)q(t) |
|
|
| Multiplying both sides of the ODE by
m(t). |
|
|
|
|
( m(t)y ) ¢ = m(t)y¢+ m¢(t)y and m¢(t) = p(t) m(t) using the chain rule to
differentiate m(t) = eòp(t)dt.
|
|
|
m(t)y = |
ó õ
|
m(t)q(t) dt + C |
|
|
|
Integrating each side with respect to t.
|
|
Dividing through by m(t), we have the general solution of the
linear ODE.
Example
We can solve the linear ODE y¢-2ty = t using an integrating facter.
Here, p(t) = -2t and q(t) = 1, so
Multiplying both sides of the ODE by m(t),
|
| |
|
|
| You can verify that
(e-t2y)¢ = e-t2(y¢-2ty)
by using the Chain Rule
to differentiate e-t2y |
|
|
|
|
|
|
| Integrating each side
with respect to t. |
|
|
|
| | Dividing through by e-t2. |
|
| |
|
You can verify that (e-t2y)¢ = e-t2(y¢-2ty)
by using the Chain Rule to differentiate e-t2y
Integrating each side with respect to t.
Dividing through by e-t2.
So the general solution of y¢-2ty = t is y(t) = Cet2-1/2.
For practice, solve y¢ = [4y/ t] by putting it in normal linear
form and using an integrating factor. Verify that you get the same
result as we did by separating the variables.
View Solutions
Using a Change of Variables
Often, a first-order ODE that is neither separable nor linear can be
simplified to one of these types by making a change of variables.
Here are some important examples:
- Homogenous Equation of Order 0: [dy/ dx] = f(x,y)
where f(kx,ky) = f(x,y).
Use the change of variables z = y/x to convert the ODE to
x[dz/ dx] = f(1,z)-z, which is separable.
- Bernoulli Equation: [dy/ dt]+p(t)y = q(t)yb (b ¹ 0,1).
Use the change of variables z = y1-b to convert the ODE to
[dx/ dt] + (1-b)p(t)z = (1-b)q(t), which is linear.
- Riccati Equation: [dy/ dt] = a(t)y+b(t)y2+ F(t).
If one particular solution g(t) is known, use the change of
variables z = [1/( y-g)] to convert the ODE to [dz/ dt]+(a+2bg)z = -b, which is linear.
When using a change of variables, solve the transformed ODE and then
return to the original variables to obtain the general solution of the
original ODE. Often, you will have to leave your solution in implicit
form.
Example
Let's solve the ODE dy/dx = [(y-x)/( x-4y)]. To see that it
is homogeneous of order 0, note that
|
f(kx,ky) = |
ky-kx kx-4ky
|
= |
y-x x-4y
|
= f(x,y) |
|
Let z = y/x. Then y = xz, so
dy/dx = x[dz/dx]+z. The ODE becomes
which is separable. Separating the variables and integrating,
|
| |
|
|
|
|
|
ó õ
|
|
æ ç
è
|
|
-3/2 2z+1
|
+ |
-1/2 2z-1
|
ö ÷
ø
|
dz |
|
|
| |
|
- |
3 4
|
ln|2z+1| - |
1 4
|
ln|2z-1| |
|
|
|
|
|
| Multiplying through
by -4 and relabelling
-4C1 as C2. |
|
|
|
|
|
|
|
|
|
|
|
|
æ ç
è
|
2 |
y x
|
+1 |
ö ÷
ø
|
3
|
|
æ ç
è
|
2 |
y x
|
-1 |
ö ÷
ø
|
x4 |
|
|
| Returning to the
original variables
using z = y/x |
|
|
|
|
| |
|
The general solution, (2y+x)3(2y-x) = C, is written implicitly.
View Solutions
Finding an Integral for an Exact Equation
An ODE N(x,y)y¢+ M(x,y) = 0 is an exact equation if
(¶N)/(¶x) = (¶M)/(¶y) in a
region of the xy-plane. If we can find a function H(x,y) for
which (¶H)/(¶x) = M and (¶H)/(¶y) = N, then H(x,y) is called an integral of the
ODE and H(x,y) = C is the general solution of the original ODE.
To find H(x,y), note that
|
H(x,y) = |
ó õ
|
M(x,y)dx + g(y) |
|
for some g(y) since [(¶H)/( ¶x)] = M(x,y). To
find g(y), calculate
|
|
¶H ¶y
|
= |
¶ ¶y
|
|
é ë
|
|
ó õ
|
M(x,y)dx |
ù û
|
+ g¢(y) |
|
and set it equal to N(x,y). Solve for g¢(y) (which will be
independent of x) and integrate with respect to y to obtain
g(y), and so H(x,y), explicitly. Notice that our solution H(x,y) = C is written in implicit form. (Alternatively, we can start with
H(x,y) = òN(x,y)dy + h(x) for some h(x) and proceed
accordingly.)
Example
The ODE ( 2yx2 + 4 ) [dy/ dx] + ( 2y2x -3) = 0 is exact, since for N(x,y) = 2yx2 + 4 and M(x,y) = 2y2x -3,
Thus, there exists an integral H(x,y) for which
|
|
¶H ¶x
|
= 2y2x-3 and |
¶H ¶y
|
= 2yx2+4. |
|
From the first of these,
Then (¶H)/(¶y) = 2yx2 + g¢(y) = 2yx2+4, so
g¢(y) = 4.
Integrating, g(y) = 4y, so H(x,y) = y2x2-3x+4y.
The general solution is given implicitly by
View Solutions
Key Concepts
-
| Separable ODES: dy/dt = g(t)/ h(y) |
The general solution is given by integrating òh(y)dy = òg(t)dt +C |
- Linear First-Order ODEs: y¢+ p(t)y = g(t)
Use an integrating factor eòp(t)dt
Homogeneous of Order Zero,
Benoulli Equation,
Riccati Equation: |   | Use the appropriate change of
variable to convert the original ODE into either a separable ODE or a
linear ODE. |
-
| Exact ODEs: | | N(x,y)y¢+ M(x,y) = 0,
where (¶N)/(¶x) = (¶M)/(¶y) | | Find H(x,y) such that (¶H)/(¶x) = M and (¶H)/(¶y) = N. The
general solution is given by H(x,y) = C. |
|
 |