Solving y’ + a(x) y = b(x), Part 3

Yet another way to find the solution of

y' + a(x) y = b(x)\quad\quad\quad(1)

is to seek a function f(x) > 0 \; \forall x such that the result of multiply (1) by f(x), namely

f(x)y' + f(x) a(x) y =f(x) b(x)\quad\quad\quad(2)

can be written as

(f(x) y)' =  b(x) f(x),

i.e.,

f(x) y =\int b(x) f(x)\; dx + c_{3}

where c_{3} is a constant.

Or,

y = {1 \over f(x)} (\int b(x) f(x)\; dx + c_{3})\quad\quad\quad(3)

since f(x) > 0.

Let us proceed to find such f(x).

From (2) we see that if

f'(x)=a(x) f(x)

then the left side of (2) is certainly (f(x) y)' and consequently  for f(x) > 0 \;\forall x,

{1 \over f(x)} f'(x) = a(x)\quad\quad\quad(4)

or,

log(f(x)) = \int a(x) dx + c_{1}

where c_{1} is a constant.

Therefore, a solution to (4) is

f(x) = c_{2}e^{\int a(x)\;dx}\quad\quad\quad(5)

where c_{2} = exp(c_{1}). This is a positive function \forall x indeed.

With (5), (3) becomes

y = e^{-\int a(x)\;dx} (\int b(x) e^{ \int b(x) dx} dx + c)\quad\quad\quad(6)

where c = {c_{3} \over c_{2}}.

In fact, for any constant c,

 e^{-\int a(x) dx} (\int b(x) e^{\int a(x) dx} dx + c)

is a solution of (1):

(e^{-\int a(x) dx} (\int b(x) e^{\int a(x) dx} dx+ c))' +

a(x)\dot(e^{-\int a(x)\;dx} (\int b(x) e^{\int a(x) dx} dx + c))

= -a(x) (e^{-\int a(x) dx} (\int b(x) e^{\int a(x) dx} dx + c))

+ e^{-\int a(x) dx} b(x) e^{\int a(x) dx}

+ a(x)(e^{-\int a(x) dx} (\int b(x) e^{\int a(x) dx} dx + c))

=b(x)

Therefore, the solution of (1) is

 y = e^{-\int a(x) dx} (\int b(x) e^{\int a(x) dx} dx + c)

where c is any constant.

Exercise: prove that e^x  is a positive function.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s