You are on page 1of 2

Analytical Solutions to Difference Equations?

Find the analytical solution to: S(n)=S(n-1)+2S(n-2) n2 s(0)=1 s(1)=4 please show all steps, thanks. 2 years ago Report Abuse . Steven C

Best Answer - Chosen by Asker There are a couple of different ways to solve difference equations. Maybe the ea siest / most straightforward is the following. Start by moving everything involving S(n-...) to the LHS, giving: S(n) - S(n-1) - 2S(n-2) = 0 This is a homogeneous difference equation, the RHS is zero. It doesn't have any terms involving n, other than S(n-...). Start by assuming the solution is of the form S(n) = a^n, substituting this in s hows a must satisfy: a^n - a^(n-1) - 2a^(n-2) = 0 Now cancel a factor of a^(n-2), leaving: a^2 - a - 2 = 0 This is called the characteristic equation. Factor and solve for a: (a - 2)(a + 1) = 0 So: a = -1, 2. So, S(n) = (-1)^n, or S(n) = 2^n will solve this difference equation. The most g eneral solution will be the sum of multiples of these, i.e. S(n) = A*(-1)^n + B* 2^n. Now substitute the initial conditions: S(0) = 1 = A*(-1)^0 + B*2^0 = A + B S(1) = 4 = A*(-1)^1 + B*2^1 = -A + 2B Solve simultaneously the equations: 1 = A + B 4 = -A + 2B Add these together to get: 5 = 3B => B = 5/3

A = 1 - B => 1 - 5/3 = -2/3 So the solution to the difference equation is: S(n) = (-2/3)*(-1)^n + (5/3)*2^n ------------------------If the difference equation were not homogeneous to begin with we would have to d rop the extra terms involving n, and find the general solution the homogeneous e quation. Once we have done this, them go about finding a particular solution to the diffe rence equation, depending on the form of the non-homogeneous terms. Then solve for the initial conditions, to get the solution

You might also like