Docsity

Solving First-Order ODEs: Separable, Homogeneous, and Linear Equations, Slides of Differential Equations

Toggle sidebar
bg1
2 FIRST-ORDER ORDINARY DIFFERENTIAL EQUATIONS 8
2.2 Solving first-order ODEs
It is not always possible to solve ordinary differential equations analytically. Even when the solution of an
ODE is known to exist, it is not always possible to find the solution in terms of known standard functions,
such as powers, exponentials, logarithms, trigonometric functions or even more specialised functions such
as Bessel functions, error functions, etc.
Other methods, including numerical techniques, perturbation methods or graphical approaches, may
need to be invoked to obtain or, if necessary, to approximate the solution. In very many cases, that cannot
be solved in terms of standard functions, an infinite power series solution can be developed to provide
the correct solution at least over some interval where the series converges, although more approximate
solutions might sometimes be more revealing.
On the other hand, there are several forms of first-order ODE that can be solved analytically. There
are also some particular ODEs which can be solved by using suitable transformations. We will now
outline each of these types of equation and the ways in which they can be solved.
2.2.1 Separable first-order ODEs
•An ODE describing y(x) is separable if it can be rearranged into the form
g(y)dy
dx=h(x)
for some functions g(·) and h(·). Formally, multiplying both sides by dx, this produces the form of
the ODE
g(y) dy=h(x) dx
in which all dependence on xand dxhas been separated onto one side of the equation with all
dependence on yand dyon the other. In this form, each side of the equation can simply be
integrated to provide a solution
Zg(y) dy=Zh(x) dx+A
for an arbitrary constant of integration A. It might not always be possible to solve the resulting
formula explicitly for y, but, if that is the case, the formula does at least provide an implicit
relationship between xand the solution y.
Example 1. The ODE (1 −y2) sin(x)y′−ycos(x) = 0 can be rearranged, through dividing by y
and by sin(x), to give
1
y−yy′=cos(x)
sin(x).
Integrating both sides therefore gives
Z1
y−ydy=Zcos(x)
sin(x)dx+A
so that
ln |y| − 1
2y2= ln |sin x|+A.
This result cannot be solved explicitly for the solution y(x).
Example 2. The function v(z) satisfies dv
dz=−3z2evwith v(0) = 0. Rearranging the ODE gives
e−vdv
dz=−3z2
so that Ze−vdv=−3Zz2dz+Aor −e−v=−z3+A
giving the solution
v(z) = −ln(z3−A)
pf3
pf4

Partial preview of the text

Download Solving First-Order ODEs: Separable, Homogeneous, and Linear Equations and more Slides Differential Equations in PDF only on Docsity!

2.2 Solving first-order ODEs

It is not always possible to solve ordinary differential equations analytically. Even when the solution of an ODE is known to exist, it is not always possible to find the solution in terms of known standard functions, such as powers, exponentials, logarithms, trigonometric functions or even more specialised functions such as Bessel functions, error functions, etc. Other methods, including numerical techniques, perturbation methods or graphical approaches, may need to be invoked to obtain or, if necessary, to approximate the solution. In very many cases, that cannot be solved in terms of standard functions, an infinite power series solution can be developed to provide the correct solution at least over some interval where the series converges, although more approximate solutions might sometimes be more revealing. On the other hand, there are several forms of first-order ODE that can be solved analytically. There are also some particular ODEs which can be solved by using suitable transformations. We will now outline each of these types of equation and the ways in which they can be solved.

2.2.1 Separable first-order ODEs

  • An ODE describing y(x) is separable if it can be rearranged into the form

g(y)

dy dx

= h(x)

for some functions g(·) and h(·). Formally, multiplying both sides by dx, this produces the form of the ODE g(y) dy = h(x) dx in which all dependence on x and dx has been separated onto one side of the equation with all dependence on y and dy on the other. In this form, each side of the equation can simply be integrated to provide a solution ∫ g(y) dy =

h(x) dx + A

for an arbitrary constant of integration A. It might not always be possible to solve the resulting formula explicitly for y, but, if that is the case, the formula does at least provide an implicit relationship between x and the solution y.

Example 1. The ODE (1 − y^2 ) sin(x)y′^ − y cos(x) = 0 can be rearranged, through dividing by y and by sin(x), to give ( (^1) y − y

y′^ =

cos(x) sin(x)

Integrating both sides therefore gives ∫ (^) ( 1 y

− y

dy =

cos(x) sin(x)

dx + A

so that ln |y| − 12 y^2 = ln | sin x| + A. This result cannot be solved explicitly for the solution y(x). Example 2. The function v(z) satisfies d dvz = − 3 z^2 e v^ with v(0) = 0. Rearranging the ODE gives

e −v^

dv dz

= − 3 z^2

so that (^) ∫ e −v^ dv = − 3

z^2 dz + A or − e −v^ = −z^3 + A

giving the solution v(z) = − ln(z^3 − A)

for an arbitrary constant A. Applying the initial condition v(0) = 0 requires

0 = − ln(−A) so that A = − 1.

The unique solution that satisfies the initial condition is therefore

v = − ln(z^3 + 1).

2.2.2 First-order ODEs of homogeneous type

  • An ODE for y(x) is of homogeneous type if it can be rearranged into the form

y′^ = f (y/x)

and it can be simplified by using the substitution

z(x) = y(x)/x or y(x) = x z(x)

where z(x) is another function of x. Differentiating gives

y′^ = xz′^ + z so that xz′^ + z = f (z) or z′^ = f (z) − z x

which is a separable equation, that we already know how to solve for z(x).

  • The transformation z = y/x reduces an ODE of homogeneous type describing y(x) to a separable ODE describing z(x).
  • Once a solution for z(x) is found, the solution for y(x) is simply y = x z(x).

Example. The ODE for u(t)

tu du dt

= u^2 + 3t

tu becomes du dt

u t

t/u

after dividing both sides by tu. The right hand side is a function of u/t so that the ODE is of homogeneous type. It can be turned into a separable ODE using the substitution z(t) = u/t or u = tz so that u′^ = tz′^ + z giving tz′^ + z = z + 3z−^1 /^2 Simplifying and separating variables gives

z′^ = 3z−^1 /^2 /t or z^1 /^2 z′^ = 3/t

and so integrating gives ∫ z^1 /^2 dz = 3

dt t

  • A or 23 z^3 /^2 = 3 ln |t| + A

for an arbitrary constant A. Solving for z and substituting into u = tz to find the solution u gives z =

2 ln^ |t|^ +^ B

and so u = tz = t

2 ln^ |t|^ +^ B

where B is an arbitrary constant. Note. The constant 92 A is arbitrary, so there is no need to write it as 92 A and we might as well write it as one single symbol B. There is no error made if we leave it as 92 A, but writing it as B is a little simpler.

  • The solution of a linear first-order ODEs can be written as

y(x) = yP (x) + yH (x)

where yP (x) is any particular solution of the ODE y′^ + p(x) y = q(x), and yH (x) is the general solution of the corresponding homogenous ODE^2 y′^ + p(x) y = 0. This is a generic feature of all linear ODEs, not just linear ODEs of first order.

(^2) Do not confuse the “ODE of homogenous type”, discussed in section 2.2.2, with the homogenous linear ODE!