bump85.gif

First-Order Nonhomogeneous Linear Differential Equations

An Introduction to Differential Equations A Fast Solution Algorithm
First-Order Homogeneous Linear Diff Eqs A Specific Example
A System with Air Resistance Another Specific Example
Tutorial Index An Initial-Value Example
Maple Index  
How to...
Problem Set Index

First-order nonhomogeneous linear differential equations are those in which, after isolating the linear terms containing y(t) and d/dt y(t) on the left side of the equation, the right side is not identically zero.  In these cases the right hand side of the equation is usually represented as one function, b(t), and the standard form looks like

( d/dt y(t) )+a(t) y(t) = b(t)

When the right hand side is actually a constant, k, it is still valid to think of it as a function; it's merely the constant function b(t) = k for all t.

The general solution for the nonhomogeneous case is a little trickier than that of the homogeneous case, but it's far from being beyond understanding.  In a manner similar to both the simplest and homogeneous cases, we will manipulate the equation into a form that looks like.

d/dt (some function of t) = all other parts of the equation

Then, also as in the simplest and homogeneous cases, we will integrate both sides of the equation and solve for y(t).  The trick to accomplishing this in the nonhomogeneous case is to find an integrating factor.   An integrating factor is a function that you can multiply both sides of the equation by (the factor) to produce a form of the equation that transforms into a manageable form (then comes the integrating).   Here's how it works.

Let's start with an analysis of the situation that's actually a little ahead of where we actually are, and then work backwards.  Looking at what the situation would be like if you already knew the integrating factor actually yields the crucial insights into how to find the integrating factor (this is not an uncommon solution strategy in mathematics and physics).  So, let's assume we know the integrating factor, sigma(t).  Then after multiplication the original equation looks like

sigma(t) (d/dt y(t)) + sigma(t) a(t) y(t) = sigma(t) b(t)

Now here's the real trick.  The left side of the equation doesn't look to promising as it stands now (from an integration standpoint), but by a judicious choice of the function sigma(t), we can transform the left side of this equation to

(d/dt sigma(t) y(t))

That is, we need to find a specific function, sigma(t), that satisfies the equality

(d/dt sigma(t) y(t)) = sigma(t) (d/dt y(t))+sigma(t) a(t) y(t)

This will enable a substitution that leave us with the "simpler" form of the equation which we know how to solve (remember, the product of two functions of t is itself a function of t).

(d/dt sigma(t) y(t)) = sigma(t) b(t)

A theorem of calculus tells us how to compute the derivative of a product of two functions f(t) and g(t).

(d/dt f(t) g(t)) = (d/dt f(t)) g(t) + f(t) (d/dt g(t))

Compare this to the equality that we want sigma(t) to satisfy.

(d/dt sigma(t) y(t)) = sigma(t) (d/dt y(t))+sigma(t) a(t) y(t)

Striking similarity.  Note what the similarity implies: if you find a sigma(t) such that

(d/dt sigma(t)) = sigma(t) a(t)

then you can make the needed substitution to create the "simpler" form of the differential equation you want to solve (if you don't see it, take a moment to figure it out -- let y(t) = f(t), and sigma(t) = g(t)).  But, this equation is a homogeneous linear differential equation, and we know how to solve it (yet again an an instance of reducing a problem to one that we already know how to solve).  It's solution is

sigma(t) = e^( Int( a(t), t ) )

This is the general form of the integrating factor for all first-order nonhomogeneous linear differential equations.  We can now make the desired substitution,

(d/dt sigma(t) y(t)) = sigma(t) (d/dt y(t))+sigma(t) a(t) y(t)

that results in the "simpler" form that we know how to solve (simpler in quotes because in many cases finding an exact form for the needed integrals can be quite difficult, perhaps impossible).

(d/dt sigma(t) y(t)) = sigma(t) b(t)

Integrating both sides,

Int( (d/dt sigma(t) y(t)), t ) = Int( sigma(t) b(t) , t)

simplifies to

sigma(t) y(t) = Int( sigma(t) b(t), t ) +C

And finally, substituting

sigma(t) = e^( Int( a(t), t ) )

and isolating y(t) yields

y(t) = (e^(-Int( a(t), t) )) ( Int(  (e^(-Int( a(t), t ) ) b(t), t ) ) + C )

This is the general solution of a first-order nonhomogeneous linear differential equation.  It looks a little scary, but sometimes you gotta' do what you gotta' do.  Of course, it could get a lot scarier depending on the difficulty of the two integrals. 

Perhaps this is the first point in this tutorial where the use of tools supplied by a CAS like Maple can really start to save you a lot of time and trouble.  The example problems below involve simple integrals, but in the real world this is typically not the situation.

Top

horzn_ln.gif (2407 bytes)

Actually, its easier to not memorize the equation above.  Instead, put the equation in standard form, and remember the much simpler formula for creating the integrating factor, sigma(t),

sigma(t) = e^( Int( a(t), t ) )

Evaluate its integral (not shown here), and multiply both sides of the equation in standard form by this integrating factor.

sigma(t) (d/dt y(t)) + sigma(t) a(t) y(t) = sigma(t) b(t)

Then make the needed substitution.

(d/dt sigma(t) y(t)) = sigma(t) b(t)

Once you get the feel of it you can combine the above two steps.  Now take the integral of both sides of this equation,

sigma(t) y(t) = Int( sigma(t) b(t), t ) +C

and then isolate y(t) to one side of the equation.

y(t) = (e^(-Int( a(t), t) )) ( Int(  (e^(-Int( a(t), t ) ) b(t), t ) ) + C )

This process may seem like a lot more work than just memorizing the general solution, but in actuality it is much easier to remember, because it attaches the solution to the exact steps that bring it about.  The continual reinforcement of much of the solution process is another benefit of not memorizing the general solution equation.  Either way, you still have to do the same number of integrals.

Top

horzn_ln.gif (2407 bytes)

An example:

Solve (d/dt y(t)) - 4 y(t) = 7for y(t).

Solution: Note that this equation is already in standard form.  Following the suggested solution algorithm, we see that

sigma(t) = e^( Int( -4, t ) )

Evaluate the integral in sigma(t).

sigma(t) = e^( -4 t )

Multiply both sides of the equation in standard form by this integrating factor.

(e^(-4 t)) (d/dt y(t)) - 4 (e^(-4 t)) y(t) = 7 (e^(-4 t))

Make the substitution.

(d/dt (e^(-4 t)) y(t)) = 7 (e^(-4 t))

Integrate both sides of this equation.

Int( (d/dt (e^(-4 t)) y(t)), t ) = Int( 7 (e^(-4 t)), t )

(e^(-4 t)) y(t) = (-7/4) (e^(-4 t)) + C

Isolate y(t).

y(t) = (-7/4) + C (e^(4 t))

As a check, substitute y(t) back into the original equation and evaluate it.

(d/dt ((-7/4) + C (e^(4 t))) + 7 - 4 C (e^(4 t)) = 7

This obviously simplifies to

0 = 0

Top

horzn_ln.gif (2407 bytes)

Another example:

Solve d/dt y(t) = t^3 - (4/t) y(t)for y(t).

Solution: First place the equation in standard form.

(d/dt y(t)) + (4/t) y(t) = t^3

Create the needed integrating factor.

sigma(t) = e^( Int( 4/t, t ) )

sigma(t) = e^( 4 ln(t) )

sigma(t) = t^4

Combine the multiplication of the integrating factor and the substitution steps to produce the more easily integrated version of the equation to be solved.

d/dt (t^4 y(t)) = t^7

Integrate both sides of the equation.

t^4 y(t) = (1/8) t^8 + C

Isolate y(t).

y(t) = (1/8) t^4 + (C/t^4)

As a check, substitute y(t) into the original equation and then simplify it.

d/dt ((1/8) t^4 + (C/t^4)) = t^3 - 4 (((1/8) t^4 + (C/t^4))/t)

(1/2) t^3 - 4 (C/t^5) = (1/2) t^3 - 4 (C/t^5)

0 = 0

Top

horzn_ln.gif (2407 bytes)

Solving initial-value problems of nonhomogeneous linear differential equations is directly analogous to solving them in the homogeneous case.

An example:

Solve d/dt y(t) + 2 t y(t) = t,  y(2) = 4.

Solution: Create the integrating factor.

sigma(t) = e^( Int( 2 t, t ) )

sigma(t) = e^(t^2)

Multiply the original equation by the integrating factor and make the substitution.

d/dt (e^(t^2) y(t) ) = e^(t^2)

Integrate both sides of the equation between 2 and t (thus, we need to introduce the dummy variable s).

Int( d/dt (e^(s^2) y(s)), s = 2..t ) = Int( e^(s^2), s = 2..t )

e^(t^2) y(t) - e^4 y(2) = (1/2) e^(t^2) - (1/2) e^4

Substitute y(2) = 4.

e^(t^2) y(t) - 4 e^4 = (1/2) e^(t^2) - (1/2) e^4

Isolate y(t).

e^(t^2) y(t) = (1/2) e^(t^2) + (7/2) e^4

y(t) = (1/2) + (7/2) e^(4 - t^2)

On your own, as a check, substitute this back into the original equation and simplify it to see that this is indeed the solution.

At this point you now have a solid introductory knowledge of first-order linear differential equations, both the homogeneous and nonhomogeneous types.  It's now time to learn how to use Maple functions to solve these equations very quickly, even when the integrals involved are difficult.

 

horzn_ln.gif (2407 bytes)

A System with Air Resistance        An Introduction to Differential Equations

Homogeneous Linear Diff Eqs        Top

Tutorial Index        Maple Index         How to...        Problem Set Index

Please send me any polite comments, suggestions, or corrections.