1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Science and engineering math: Difference equation, non-homogeneous

  1. Mar 18, 2012 #1
    1. The problem statement, all variables and given/known data

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

    2. Relevant equations

    an = Arn

    3. 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.
  2. jcsd
  3. Mar 18, 2012 #2


    User Avatar
    Science Advisor
    Homework Helper

    welcome to pf!

    hi chatterbug219! welcome to pf! :smile:
    erm :redface:

    4n+2/4n = … ? :wink:
  4. Mar 18, 2012 #3
    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)
  5. Mar 19, 2012 #4


    User Avatar
    Science Advisor
    Homework Helper

    hi chatterbug219! :smile:

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

    (or you could write it 2n(2n-1 + A) + 3nB )
  6. Mar 19, 2012 #5
    No...if you plug in the initial conditions they final answers don't match up...
    Only 2 works
  7. Mar 19, 2012 #6


    User Avatar
    Science Advisor
    Homework Helper

    yes, but to solve for the initial condition, you also need to find A
  8. Mar 19, 2012 #7

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    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.

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook