Science and engineering math: Difference equation, non-homogeneous

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
6 replies · 2K views
chatterbug219
Messages
15
Reaction score
0

Homework Statement



Solve the difference equation: an+2 - 5an+1 + 6an = 4n
Subject to a0 = 0 & a1 = 1

Homework Equations



an = Arn

The Attempt at a Solution


I got two solutions for the first part for when it is homogeneous by substituting an = Arn into the equation and solving for r.
an = A(3)n
an = A(2)n

I just don't know where to start for non-homogeneous. I tried an = B*4n and I got B*4n+2 -5B*4n+1 + 6B*4n = 4n but I don't know where to go from there.
 
Physics news on Phys.org
welcome to pf!

hi chatterbug219! welcome to pf! :smile:
chatterbug219 said:
I tried an = B*4n and I got B*4n+2 -5B*4n+1 + 6B*4n = 4n but I don't know where to go from there.

erm :redface:

4n+2/4n = … ? :wink:
 
So B = 1/2
And plugging that in...
an = (1/2)(4n) for the particular solution
Making the general solution:
an = A(2)n + (1/2)(4n)
Right?
 
hi chatterbug219! :smile:

(just got up :zzz:)
chatterbug219 said:
… Making the general solution:
an = A(2)n + (1/2)(4n)
Right?

you mean an = A(2)n + B(3)n + (1/2)(4n) :wink:

(or you could write it 2n(2n-1 + A) + 3nB )
 
No...if you plug in the initial conditions they final answers don't match up...
Only 2 works
 
chatterbug219 said:

Homework Statement



Solve the difference equation: an+2 - 5an+1 + 6an = 4n
Subject to a0 = 0 & a1 = 1

Homework Equations



an = Arn

The Attempt at a Solution


I got two solutions for the first part for when it is homogeneous by substituting an = Arn into the equation and solving for r.
an = A(3)n
an = A(2)n

I just don't know where to start for non-homogeneous. I tried an = B*4n and I got B*4n+2 -5B*4n+1 + 6B*4n = 4n but I don't know where to go from there.

The simplest way is to determine the generating function [itex]A(z) = \sum_{n=0}^{\infty} a_n z^n[/itex], then invert it to find [itex]\{ a_n \}.[/itex] Google "difference equations" to see hundreds of examples.

RGV