11/1/2002 Difference Equations Solve f n = f n-1 + f n-2 f 0 = 2, f 1 = 1 Step 1: Find Roots f n = f n-1 + f n-2 f n - f n-1 - f n-2 = 0 λ 2 - λ - 1 = 0 (1± √ (1 2 - 4*1*(-1)))/(2*1) = (1± √ 5)/2 ⇒λ 1 = (1+ √ 5)/2, λ 2 = (1- √ 5)/2 1 Step 2: Find General Solution f n = a 1 λ 1 n + a 2 λ 2 n substitute in initial conditions and solve n = 0: f 0 = 2 = a 1 λ 1 0 + a 2 λ 2 0 = a 1 + a 2 2 - a 1 = a 2 n = 1: f 1 = 1 = a 1 λ 1 1 + a 2 λ 2 1 1 = a 1 λ 1 + (2 - a 1 ) λ 2 1 = a 1 λ 1 + 2 λ 2 - a 1 λ 2 1 - 2 λ 2 = ( λ 1 - λ 2 ) a 1 a 1 = (1 - 2 λ 2 )/ ( λ 1 - λ 2 ) ⇒ a 2 = 2 - 1 = 1 a 1 = 1 ⇒ f n = 1* λ 1 n + 1* λ 2 n = ((1+ √ 5)/2) n + ((1- √ 5)/2) n 2 1
11/1/2002 Solve x n = x n-1 + 2x n-2 x 0 = 1, x 1 = 1 Step 1: Find Roots x n = x n-1 + 2x n-2 x n - x n-1 - 2x n-2 = 0 λ 2 - λ - 2 = 0 (1 ±√ (1 2 - 4*1*(-2)))/(2*1) = (1 ±√ 9)/2 ⇒ λ 1 = (1+ √ 9)/2 = 2, λ 2 = (1- √ 9)/2 = -1 Step 2: Find General Solution x n = a 1 λ 1 n + a 2 λ 2 n substitute in initial conditions and solve 3 n = 0: x 0 = 1 = a 1 λ 1 0 + a 2 λ 2 0 1 = a 1 + a 2 1 - a 1 = a 2 n = 1: x 1 = 1 = a 1 λ 1 1 + a 2 λ 2 1 1 = a 1 λ 1 + (1 - a 1 ) λ 2 1 = a 1 λ 1 + λ 2 - a 1 λ 2 1 - λ 2 = ( λ 1 - λ 2 ) a 1 a 1 = (1 - λ 2 )/ ( λ 1 - λ 2 ) a 1 = (1 - (-1))/(2 - (-1)) = 2/3 ⇒ a 2 = 1 - 2/3 = 1/3 ⇒ x n = 2/3 λ 1 n + 1/3 λ 2 n = 2/3(2) n + 1/3(-1) n 4 2
11/1/2002 Solve x n = 2x n-1 + 3x n-2 x 0 = 1, x 1 = 1 Step 1: Find Roots x n = 2x n-1 + 3x n-2 x n - 2x n-1 - 3x n-2 = 0 λ 2 - 2 λ - 3 = 0 (2 ±√ (2 2 - 4*1*(-3)))/(2*1) = (2 ±√ (16))/2 ⇒ λ 1 = (2 + √ (16))/2 = 3 λ 2 = (2 - √ (16))/2 = -1 Step 2: Find General Solution x n = a 1 λ 1 n + a 2 λ 2 n substitute in initial conditions 5 n = 0: x 0 = 1 = a 1 λ 1 0 + a 2 λ 2 0 1 = a 1 + a 2 1 - a 1 = a 2 n = 1: x 1 = 1 = a 1 λ 1 1 + a 2 λ 2 1 1 = 3a 1 + (-1)(1 - a 1 ) 1 = 3a 1 -1 + a 1 2 = 4a 1 ⇒ a 2 = 1 - 1/2 = 1/2 a 1 = 1/2 ⇒ x n = 1/2( 3 n + (-1) n ) 6 3
11/1/2002 Forcing Functions Equations of the form: n x n = ∑ c i x n-i + g(n) i=1 where g(n) is the forcing function Homogeneous part Forcing function Output of equation Output will look like either the homogeneous solution or the forcing function, which ever is larger 7 Solve: x n = 3x n-1 + 5 x 0 =1 x n = h n + v n h n = 3h n-1 v n = 3v n-1 + 5 Step 1: Find Roots h n = 3h n-1 h n - 3h n-1 = 0 λ - 3 = 0 λ = 3 ⇒ h n = a 1 3 n 8 4
11/1/2002 Step 2: Find Particular Solution v n = 3v n-1 + 5 Guess v n = general equation of same form as forcing function GUESS: v n = c where c = constant Solve for variables by substituting in guess v n = 3v n-1 + 5 c = 3c + 5 -2c = 5 c = -5/2 Substitute results into the guess equation ⇒ v n = -5/2 9 Step 3: Find General Solution h n = a 1 3 n x n = h n + v n x n = a 1 3 n - 5/2 substitute in initial conditions and solve x 0 = 1 = a 1 3 0 - 5/2 n = 0: 1 = a 1 - 5/2 7/2 = a 1 ⇒ x n = 7/2 * 3 n - 5/2 10 5
11/1/2002 Solve x n = 3x n-1 + 2n - 4 x 0 = 1 x n = h n + v n h n = 3h n-1 v n = 3v n-1 + 2n - 4 Step 1: Find Roots h n = 3h n-1 h n - 3h n-1 = 0 λ - 3 = 0 λ = 3 ⇒ h n = a 1 3 n 11 Step 2: Find Particular Solution v n = 3v n-1 + 2n - 4 Guess v n = general equation of same form as forcing function GUESS: v n = c 1 n + c 0 Solve for variables by substituting in guess v n = 3v n-1 + 2n - 4 c 1 n + c 0 = 3(c 1 (n-1) + c 0 ) + 2n - 4 c 1 n + c 0 = 3c 1 n - 3c 1 + 3c 0 + 2n - 4 12 6
11/1/2002 Equation from last slide: c 1 n + c 0 = 3c 1 n - 3c 1 + 3c 0 + 2n - 4 pull out terms by their power n: c 1 n = 3c 1 n + 2n c 1 = 3c 1 + 2 -2 = 2 c 1 c 1 = -1 1: c 0 = - 3c 1 + 3c 0 - 4 c 0 = - 3(-1) + 3c 0 - 4 //sub in answer c 0 = 3 + 3c 0 - 4 -2 c 0 = - 1 c 0 = 1/2 ⇒ v n = c 1 n + c 0 = -1n + 1/2 = -n + 1/2 13 Why Can Break Up By Powers ax 3 +bx 2 + cx + d = ex 3 + fx 2 + gx + h if this means that they = 0 for the same values of n. 0 = ax 3 + bx 2 + cx + d Therefore, 0 = ex 3 + fx 2 + gx + h this means that a = e, b = f, c = g, and d = h otherwise the polynomials wouldn’t be equal 14 7
11/1/2002 Step 3: Find General Solution h n = a 1 3 n x n = h n + v n x n = a 1 3 n - n + 1/2 substitute in initial conditions and solve x 0 = 1 = a 1 3 0 - 0 + 1/2 n = 0: 1 = a 1 + 1/2 1/2 = a 1 ⇒ x n = 1/2 * 3 n - n + 1/2 15 Solve x n = 3x n-1 + 2 n x 0 = 1 x n = h n + v n h n = 3h n-1 v n = 3v n-1 + 2 n Step 1: Find Roots h n = 3h n-1 h n - 3h n-1 = 0 λ - 3 = 0 λ = 3 ⇒ h n = a 1 3 n 16 8
11/1/2002 Step 2: Find Particular Solution v n = 3v n-1 + 2 n Guess v n = general equation of same form as forcing function GUESS: v n = c 2 n Solve for variables by substituting in guess v n = 3v n-1 + 2 n c 2 n = 3(c 2 n-1 ) + 2 n c 2 = 3c + 2 //divide both sides by 2 n-1 -c = 2 c = -2 ⇒ v n = -2*2 n = - (2 n+1 ) 17 Step 3: Find General Solution h n = a 1 3 n x n = h n + v n x n = a 1 3 n - (2 n+1 ) substitute in initial conditions and solve x 0 = 1 = a 1 3 0 - (2 0+1 ) n = 0: 1 = a 1 - 2 3 = a 1 ⇒ x n = 3 * 3 n - 2 n+1 = 3 n+1 - 2 n+1 18 9
Recommend
More recommend