SOLVING SECOND ORDER LINEAR DIFFERENCE EQUATION
Quadratic by square root method,how to calculate greatest common divisor,Uniqueness of forcing terms in linear partial differential equations,finding the least common denominator for two rational expressions
 Thank you for visiting our site! You landed on this page because you entered a search term similar to this: solving second order linear difference equation, here's the result:

First-Order Homogeneous Linear Differential Equations

A differential equation that can be written in the form

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

is called a first-order homogeneous linear differential equation.  It's homogeneous because after placing all terms that include the unknown equation and its derivative on the left-hand side, the right-hand side is identically zero for all t.  It's linear because y(t) and its derivative both appear "alone", that is, they are not part of any composed function such as y(t)^3, sqrt(y(t)), e^y(t), or sin(y(t)).  Any differential equation that includes terms like these is nonlinear.   The above equation is first-order because the highest derivative of the unknown function is its first derivative.  A second-order differential equation would include a term like

d^2/dt^2 y(t)

The expression a(t) represents any arbitrary continuous function of t, and it could be just a constant that is multiplied by y(t); in such a case think of it as a constant function of t.

What follows is the general solution of a first-order homogeneous linear differential equation.  It might seem quite involved, but it is nothing more than one simple step after another.  If you don't move on to a next step until you understand the current one, you will have no problem understanding the solution process.  The fact that the process is somewhat involved is actually a good thing in our context; once you know how its done, and then see how long Maple takes to do it, you'll be convinced that Maple provides you with tools that really save a lot of time and brain power.

Start with

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

Then

d/dt y(t)=-a(t) y(t)

and

d/dt y(t)/y(t)=-a(t)

Remembering the derivative of the ln function, and using the chain rule,

d/dt y(t)/y(t)=d/dt ln(abs(y(t)))

Thus, by substitution,

d/dt ln(abs(y(t)))=-a(t)

Note that we have transformed the original equation into the form discussed at the end of the introduction to differential equations.

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

So at this point we simply need to integrate both sides of the equation.

int(d/dt ln(abs(y(t))),t)=-int(a(t),t)

Integration and differentiation being inverses of each other, this equation is the same as

ln(abs(y(t)))=-int(a(t),t)+C[1]

The constant comes from the constant produced by the integration of the left side of the equation, and then moving it to the right. 

Now we need to solve a logarithmic equation, and that involves taking exponents of both sides of the equation.

abs(y(t))=e^(-int(a(t),t)+C[1])

This equation is the same as

abs(y(t))=e^(-int(a(t),t)+C[1]

The factor e^C[1] is a constant, so substitute C[2]=e^C[1] into the equation.

abs(y(t))=C[2] e^(-int(a(t),t)

We have now found an equation that yields y as a function of t, and it would be nice to say that we are finished.  But a problem still exists, perhaps even two problems, depending on how you feel about the expression int(a(t),t).  You might feel that int(a(t),t) looks "unfinished", and this is reasonable because to develop an easily useable form for abs(y(t)), you might need to do a painful and difficult integration.  So, if it puts you at ease, assume that we did the integration, and that A(t)=int(a(t),t), with d/dt A(t)=a(t).  We now have

abs(y(t))=C[2] e^(-A(t))

The bigger problem is that rather than knowing something about the absolute value of the unknown function, we want to say that

y(t)=C[2] e^(-A(t))

Top

horzn_ln.gif (2407 bytes)

(Note: The section designated by the above horizontal line and the next one is provided for completeness.  The above equation, with A(t) = Int( a(t), t ), is the general solution of a first-order homogeneous linear differential equation.

While the following material is essential to justify the removal of the absolute value function, it is not essential to understanding how to execute the solution steps.  However, there is one key point that you should know if you skip this section, and that is that the assumption that y(t) is a continuous function is essential to the justification for removing the absolute value function.   Also, know that if you skip this section you are missing out on a good example of the use of some basic theorems of calculus to make an interesting argument.

to skip the justification and continue with the rest of this introduction to first-order homogeneous linear differential equations.)

To justify this step, first make the following change (for reasons you'll see in a second, let's revert back to int(a(t),t)).

abs(y(t)) e^(int(a(t),t)=C[2]

Now 0 < e^(any real number).  Thus, by definition of the absolute value function,

abs(e^(int(a(t),t)))=e^(int(a(t),t))

A property of the absolute value function says that abs(x) abs(y)=abs(x y).  Hence,

y(t) e^(int(a(t),t))=C[2]

By assumption, a(t) is a continuous function of t.  A theorem of calculus tells us that if a(t) is continuous, then int(a(t),t) is also a continuous function of t.  Next, a continuity theorem says that the composition of two continuous functions is itself a continuous function.  Thus, e^(int(a(t),t) is a continuous function of t.  And still yet another continuity theorem assures us that the product of two continuous functions is also continuous.  Since the function we're looking for, y(t), is assumed to be continuous, this implies that y(t) e^(int(a(t),t) is a continuous function of t.

Now the equation

abs(y(t) e^(int(a(t),t)))=C[2]

says that the absolute value of the function y(t) e^(int(a(t),t) is a constant function of t.  But if the absolute value of a continuous function is a constant function, then the function itself must be a constant function.  Thus, it is either the case that

y(t) e^(int(a(t),t))=C[2]

or that

-y(t) e^(int(a(t),t))=C[2]

(Note that this conclusion is not necessarily true if the function inside the absolute value function is not continuous.  Why?  Hint: Define the function f to equal 5 for all t<15, and to equal -5 for all 15<=t.  Now take the absolute value of this function.  This is why it is important to know that homo35.gif (1297 bytes) is continuous.)

In either case, it is certainly true that we can write

y(t) e^(int(a(t),t))=c

where c=C[2] or c=-C[2], depending on which of the above is the case.  Moving y(t) e^(int(a(t),t)) back to the other side of the equation yields the desired result.

y(t)=c e^(-int(a(t),t))

Finally, this is the general solution of the homogeneous linear differential equation.  Note that c is an ancestor of C[1], which is an arbitrary constant that can take on infinitely many values.  This implies that the homogeneous linear differential equation has infinitely many solutions; one for each choice of c.

Top

horzn_ln.gif (2407 bytes)

An example:

Solve d/dt y(t)=y(t)/2 for y(t).

Solution:

d/dt y(t)=1/2 y(t)

becomes

d/dt y(t)-1/2 y(t)=0

with

a(t)=-1/2

Thus, by the formula we just developed,

y(t)=e^(-int(-1/2,t))

Which evaluates to

y(t)=e^(1/2 t+C)

or

y(t)=c e^(1/2 t)

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

d/dt c e^(t/2)=1/2 c e^(t/2)

Which evaluates to

1/2 c e^(t/2)=1/2 c e^(t/2)

Top

horzn_ln.gif (2407 bytes)

Another example:

Solve d/dt y(t)+(2/t) y(t)=0 for y(t).

Solution:

d/dt y(t)+(2/t) y(t)=0

has

a(t)=2/t

Now

int(2/t,t)=2 ln(abs(t))

And,

2 ln(abs(t))=ln(t^2)

Thus,

y(t)=c e^(-ln(t^2))

This simplifies to

y(t)=c/t^2

Checking our work,

d/dt (c/t^2)+2 c/t^3=0

0=0

Top

horzn_ln.gif (2407 bytes)

These two examples illustrate how to find the general solution of a homogeneous linear differential equation.  However, in most real world situations you generally want one specific solution that depends on certain initial conditions.  In these cases you know, or are given, a value y[0]=y(t[0]) at some initial time, t[0]. The initial-value, y[0], enables you to narrow down the general solution to a single specific solution.  Basically, it causes the replacement of the arbitrary constant, c, with a specific value, and it tailors the solution, y(t), to specific conditions in which y(t) has the initial value y[0] at time t[0]. The general form of an initial-value problem for a homogeneous first-order linear differential equation looks like

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

y(t[0])=y[0]

Its solution is as follows.  After transforming it into a form that we can integrate, integrate both sides between t[0] and t.

int(d/dt ln(abs(y(s))),s=t[0]..t)=-int(a(s),s=t[0]..t)

becomes

ln(abs(y(t)))-ln(abs(y(t[0])))=-int(a(s),s=t[0]..t)

And this becomes

ln(abs(y(t)/y[0]))=-int(a(s),s=t[0]..t)

Now take the exponential of both sides.

abs(y(t)/y[0])=e^(-int(a(s),s=t[0]..t))

Following a processes similar to the earlier solution of the absolute value enigma, either

(y(t) e^(int(a(s),s=t[0]..t))/y[0])=1

or

(y(t) e^(int(a(s),s=t[0]..t))/y[0])=-1

To decide this one, note that we already know the value of y(t) for one value of t, namely t[0].  Plug this value of t into the left-hand side of either of the above equations and evaluate it.  It turns out that

(y(t[0]) e^(int(a(s),s=t[0]..t[0]))/y[0])=1

Thus, the second option is not possible, and this implies that

(y(t) e^(int(a(s),s=t[0]..t))/y[0])=1

Isolate y(t) in this equation to find the general solution of an initial value problem involving a homogeneous first-order linear differential equation.

y(t)=y[0] e^(-int(a(s),s=t[0]..t))

Top

horzn_ln.gif (2407 bytes)

A couple of examples:

Solve d/dt y(t)-2 y(t)=0, y(0)=3

Solution:

According to the formula,

y(t)=3 e^(-int(-2,s=0..t))

This evaluates to

y(t)=3 e^(2 t)

As a check,

d/dt(3 e^(2 t))-6 e^(2 t)=0

Which of course simplifies to

[Maple Math]

Top

horzn_ln.gif (2407 bytes)

Here's another way to solve this kind of initial-value problem.

Solve d/dt y(t)+(t-1)y(t)=0, y(4)=5

Solution: First solve the equation without concern for the initial condition.

y(t)=c e^(-int(t-1,t))

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

Now solve for c by inserting the known values t[0]=4 and y(4) = 5.

5=c e^(-4)

Thus,

c=5 e^4

For this initial condition y(t) is

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

This simplifies to

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

A check,

d/dt(5 e^(-1/2 t^2+t+4))+5 (t-1) e^(-1/2 t^2+t+4)=0

becomes

5 (-t+1) e^(-1/2 t^2+t+4)+5 (t+1) e^(-1/2 t^2+t+4)=0

which simplifies to

0=0

The last section that you'll want to read before returning to any polite comments, suggestions, or corrections.