Difference Equations Notes PDF
Document Details
Uploaded by PrudentRainforest
null
Tags
Summary
These are video notes on difference equations, including various topics such as recurrence relations, forming difference equations, and solving 1st and 2nd order difference equations. The notes also contain several questions.
Full Transcript
Topic 11: Difference Equations-Introduction Lesson 11.0 Difference Equations-Introduction Lesson 11.1 Recurrence Relations Lesson 11.2 Difference Equations Lesson 11.3 Forming Difference Equations Lesson 11.4a Solving 1st Order Difference Equations Lesson 11.4...
Topic 11: Difference Equations-Introduction Lesson 11.0 Difference Equations-Introduction Lesson 11.1 Recurrence Relations Lesson 11.2 Difference Equations Lesson 11.3 Forming Difference Equations Lesson 11.4a Solving 1st Order Difference Equations Lesson 11.4b Solving 1st Order Difference Equations Lesson 11.4c Solving 1st Order Difference Equations – Financial Maths Lesson 11.5a 2nd Order Homogenous Difference Equations Lesson 11.5b 2nd Order Homogenous Difference Equations Lesson 11.6a 2nd Order Inhomogeneous Difference Equations Lesson 11.6b 2nd Order Inhomogeneous Difference Equations Lesson 11.6c 2nd Order Inhomogeneous Difference Equations Lesson 11.7 1st Order Inhomogeneous Difference Equations Topic 11.1: Recurrence Relations Recurrence relations A recurrence relations is an equation that defines a sequence where the next term is a function of the previous term(s). This mathematical relationship often involves the differences between successive values of a function of a discrete variable – hence the expression difference equations. Question 1 Write out the first 5 terms of the sequence defined as follows: 𝑢𝑛 = 2𝑢𝑛−1 + 5 where 𝑢1 = 3. Question 2 Given that, 𝑢𝑛+2 = 4𝑢𝑛+1 + 𝑢𝑛 where 𝑢0 = 5 and 𝑢1 = 8 Find 𝑢3. Topic 11.2: Difference Equations The order of a difference equation The order of a difference equation is the difference between the largest and the smallest subscript (how many terms back we go to calculate the new term) 3𝑢𝑛+2 = 5𝑢𝑛+1 − 3𝑢𝑛 + 6𝑛2 − 2 Equation Order 3𝑢𝑛+1 = 4𝑢𝑛 1st 2𝑢𝑛+2 − 5𝑢𝑛+1 = 3𝑢𝑛+6 2nd 𝑢𝑛 = 6𝑢𝑛−1 + 𝑢𝑛−2 + 3𝑛 + 2 2nd 𝑢𝑛 = 𝑢𝑛−1 + 8 1st 𝑢𝑛+2 = 5𝑢𝑛 2nd 2𝑢𝑛 = 3𝑢𝑛−1 + 𝑢𝑛−2 2nd 𝑢𝑛+1 = 𝑢𝑛 + 𝑢𝑛−1 + 6𝑛 2nd 5𝑢𝑛 − 𝑢𝑛−1 = 0 1st Homogeneous vs. Inhomogeneous Homogeneous – every part is from a previous term Inhomogeneous – some parts are not from previous terms 𝑢𝑛 = 4𝑢𝑛−1 + 2𝑢𝑛−2 + 3𝑛 𝑢𝑛 = 4𝑢𝑛−1 + 𝑢𝑛−2 Homogeneous / Equation Order Inhomogeneous 3𝑢𝑛+1 = 4𝑢𝑛 1st Homogeneous 2𝑢𝑛+2 − 5𝑢𝑛+1 = 3𝑢𝑛+6 2nd Inhomogeneous 𝑢𝑛 = 6𝑢𝑛−1 + 𝑢𝑛−2 + 3𝑛 + 2 2nd Inhomogeneous 𝑢𝑛 = 𝑢𝑛−1 + 8 1st Inhomogeneous 𝑢𝑛+2 = 5𝑢𝑛 2nd Homogeneous 2𝑢𝑛 = 3𝑢𝑛−1 + 𝑢𝑛−2 2nd Homogeneous 𝑢𝑛+1 = 𝑢𝑛 + 𝑢𝑛−1 + 6𝑛 2nd Inhomogeneous 5𝑢𝑛 − 𝑢𝑛−1 = 0 1st Homogeneous Topic 11.3: Forming Difference Equations We can model lots of different real-life situations with difference equations. We do this when our variable can be measured at discrete (or assumed discrete) intervals. Question 1 The deer population of a country is estimated to be 1000 in a given year. Wildlife experts reckon that there’s a 15% increase in the population each year. Form a difference equation to represent the population at year n. How does this model change if 75 deer are killed per year? Question 2 I owe €500 in my credit card that charges 3% interest each month, then I decided to pay off €50 each month. Form a difference equation for the balance remaining on my card after n month. Question 3 A certain virus lays dormant in your system for a week. Once it becomes active you become contagious and infect on average of 3 people per week. Model the weekly number of infected people with a difference equation. Topic 11.4a: Solving 1st Order Difference Equations Solving a difference equation means turning it into an equation where we can find any term, we want without having to use previous terms. Find the 5th term of this sequence 𝑢𝑛 = 3𝑢𝑛−1 − 2 where 𝑢1 = 2 𝑢𝑛 = 3𝑛+1 + 1 𝑢2 = 3𝑢1 − 2 = 3 2 − 2 = 4 𝑢5 = 35−1 + 1 = 82 𝑢3 = 3𝑢2 − 2 = 3 4 − 2 = 10 𝑢4 = 3𝑢3 − 2 = 3 10 − 2 = 28 𝑢5 = 3𝑢4 − 2 = 3 28 − 2 = 82 To solve first order equations in the form of: 𝑢𝑛 = 𝐴𝑢𝑛−1 + 𝐵 Our solution will always be in this form: 𝑢𝑛 = 𝑥𝐴𝑛 + 𝑦 Sub in terms from the sequence into this formula and solve the resulting equations to find x and y and this will give us our solution. Question 1 Solve: 𝑢𝑛 = 3𝑢𝑛−1 − 2 where 𝑢1 = 2 𝑢𝑛 = 𝑥𝐴𝑛 + 𝑦 2 = 𝑥(3)1 +𝑦 𝑢𝑛 = 𝑥(3)𝑛 +𝑦 2 = 3𝑥 + 𝑦 𝑢2 = 3 2 − 2 = 4 4 = 𝑥(3)2 + 𝑦 4 = 9𝑥 + 𝑦 1 𝑥= 𝑦=1 3 1 𝑢𝑛 = (3)𝑛 + 1 3 Question 2 Solve: 𝑢𝑛 = 0.5𝑢𝑛−1 + 4 where 𝑢0 = 32 𝑢𝑛 = 𝑥𝐴𝑛 + 𝑦 32 = 𝑥(0.5)0 +𝑦 𝑢𝑛 = 𝑥(0.5)𝑛 +𝑦 32 = 𝑥 + 𝑦 𝑢1 = 0.5 32 + 4 = 20 20 = 𝑥(0.5)1 + 𝑦 20 = 0.5𝑥 + 𝑦 𝑥 = 24 𝑦=8 𝑢𝑛 = 24(0.5)𝑛 +8 Question 3 Solve: 𝑢𝑛+1 = 5𝑢𝑛 + 4 where 𝑢0 = 1 𝑢𝑛 = 𝑥𝐴𝑛 + 𝑦 1 = 𝑥(5)0 +𝑦 𝑢𝑛 = 𝑥(5)𝑛 +𝑦 1= 𝑥+𝑦 𝑢1 = 5 1 + 4 = 9 9 = 𝑥(5)1 + 𝑦 9 = 5𝑥 + 𝑦 𝑥=2 𝑦 = −1 𝑢𝑛 = 2(5)𝑛 − 1 Topic 11.4b: Solving 1st Order Difference Equations steady state A steady state is when your sequence approaches a limit. This is the number that sequence will settle at and doesn’t change from term to term. We find the steady state by finding: lim 𝑢𝑛 𝑛→∞ Question 1 A certain type of fish in a lake has a 0.06 chance of surviving each year. To help replenish the numbers and keep the population going, 800 of these fish are added to the lake every year. It is thought that there is 300 of these fish in the lake this year. The population can be modelled with difference equation. Write down the difference equation, solve it, and find the steady state of the population of fish. 𝑢𝑛+1 = 0.6𝑢𝑛 + 800 where 𝑢0 = 300 𝑢𝑛 = 𝑥𝐴𝑛 + 𝑦 300 = 𝑥(0.6)0 +𝑦 𝑢𝑛 = 𝑥(0.6)𝑛 +𝑦 300 = 𝑥 + 𝑦 𝑢1 = 0.6 300 + 800 = 980 980 = 𝑥(0.6)1 + 𝑦 9 = 0.6𝑥 + 𝑦 𝑥 = 1700 𝑦 = 2000 𝑢𝑛 = 2000 − 1700(0.6)𝑛 lim 𝑢𝑛 = 2000 𝑛→∞ Question 2 In a certain area, deer are hunted for sport. The current population of deer here is estimated to be 8000. The population increases by 8% naturally, but 2000 are killed through hunting each year. Model the population of deer through a difference equation and use this to calculate when/if the deer population will die out. 𝑢𝑛+1 = 1.08𝑢𝑛 + 2000 where 𝑢0 = 8000 𝑢𝑛 = 𝑥𝐴𝑛 + 𝑦 8000 = 𝑥(1.08)0 +𝑦 𝑢𝑛 = 𝑥(1.08)𝑛 +𝑦 8000 = 𝑥 + 𝑦 𝑢1 = 1.08 8000 + 2000 = 6640 6640 = 𝑥(1.08)1 + 𝑦 6640 = 1.08𝑥 + 𝑦 𝑥 = −17000 𝑦 = 25000 𝑢𝑛 = 25000 − 1700(1.08)𝑛 0 = 25000 − 17000 (1.08)𝑛 25000 = 17000(1.08)𝑛 25 = (1.08)𝑛 17 𝑛=5 Question 3 What should be the maximum number of deer hunted per year to not kill the entire population? 𝑢𝑛+1 = 1.08𝑢𝑛 − 𝑥 where 𝑢0 = 8000 Topic 11.4c: Solving 1st Order Difference Equations – Financial Maths We can use difference equations to model and solve a lot of financial math questions (loans, saving, etc.) like those on the math course. Question 1 I have €2000 in my saving account. The bank offers me an interest rate of 0.2% a month. I deposit €120 into the account every month. Write a difference equation to show the amount of money on the account after n months. Solve the difference equations and find how much will be in my account after 3 years. 𝑢𝑛+1 = 1.002𝑢𝑛 + 120 where 𝑢0 = 2000 𝑢𝑛 = 𝑥𝐴𝑛 + 𝑦 2000 = 𝑥(1.002)0 +𝑦 𝑢𝑛 = 𝑥(1.08)𝑛 +𝑦 2000 = 𝑥 + 𝑦 𝑢1 = 1.002 8000 + 120 = 2124 2124 = 𝑥(1.002)1 + 𝑦 2124 = 1.002𝑥 + 𝑦 𝑥 = 62000 𝑦 = −60000 𝑢𝑛 = 62000(1.08)𝑛 − 60000 𝑢36 = 62000 (1.002)36 − 6000 = 6623.84 Question 2 You take out a loan of €2500 for your leaving cert holiday. The interest rate per annum is 5%. You plan to pay it back in monthly installments of €200 per month. Write the remaining balance of the loan after n months as a difference equation. Solve the difference equation and find out how long it will take you to repay the loan in full. 12 Monthly equivalent to 5% per annum = 1.05 = 1.004 𝑢𝑛+1 = 1.004𝑢𝑛 + 200 where 𝑢0 = 2500 2500 = 𝑥(1.004)0 +𝑦 𝑢𝑛 = 𝑥𝐴𝑛 + 𝑦 2310 = 𝑥(1.004)1 + 𝑦 𝑢𝑛 = 𝑥(1.004)𝑛 +𝑦 2310 = 1.004𝑥 + 𝑦 𝑢1 = 1.002 8000 + 120 = 2124 𝑥 = −47500 𝑦 = 50000 0 = −47500 (1.004)𝑛 + 50000 20 = 1.004𝑛 19 𝑛 = 12.8 = 13 Question 3 A couple get a mortgage of €230,000 to buy a house. The monthly interest rate is 0.03%. They decided to pay back the load over 20 years in equal monthly installments. Using difference equations, find the amount paid back each month. 𝑢𝑛+1 = 1.003𝑢𝑛 − 𝑅 where 𝑢0 = 230000 𝑢𝑛 = 𝑥𝐴𝑛 + 𝑦 230000 = 𝑥(1.003)0 +𝑦 𝑢𝑛 = 𝑥(1.003)𝑛 +𝑦 230000 = 𝑥 + 𝑦 0 = 𝑥(1.003)240 + 𝑦 𝑢240 = 0 0 = (1.003)240 𝑥 + 𝑦 230000 = (1 − 1.003240 )x 𝑥 = −218585.46 𝑦 = 448585.46 𝑢𝑛 = −218585(1.003)𝑛 + 448585.46 𝑢1 = −218585.46 1.003 1 + 448585.46 = 229344.24 𝑢𝑛+1 = 1.003𝑢𝑛 − 𝑅 229344.24 = 1.003 230000 − 𝑅 𝑅 = 1345.76 Topic 11.5a: 2nd Order Homogenous Difference Equations Recap: Homogeneous – every part is from a previous term Inhomogeneous – some parts are not from previous term 𝑢𝑛 = 4𝑢𝑛−1 + 2𝑢𝑛−2 + 3𝑛 𝑢𝑛 = 6𝑢𝑛−1 + 𝑢𝑛−2 Steps for solving second order homogeneous difference equations: 1. Form characteristics equations. 2. Get the roots of the characteristic equations. 3. Select the appropriate form of your answer for your roots. 4. Substitute in terms of the sequence to find the missing coefficients. To solve 2nd order difference equations, we need to create what is known as a characteristic equation and then find the roots of this equation: 𝑢𝑛 + 7𝑢𝑛−1 + 10𝑢𝑛−2 = 0 Difference Equation Characteristic Equation Roots 𝑢𝑛 − 5𝑢𝑛−1 − 14𝑢𝑛−2 = 0 3𝑢𝑛+2 + 10𝑢𝑛−1 − 8𝑢𝑛 = 0 𝑢𝑛 − 25𝑢𝑛−2 = 0 2𝑢𝑛 = 𝑢𝑛−1 − 6𝑢𝑛−2 𝑢𝑛 + 6𝑢𝑛−1 + 4𝑢𝑛−2 = 0 𝑢𝑛 − 4𝑢𝑛−1 + 4𝑢𝑛−2 = 0 Once we have found the roots of our characteristic equation, we select the appropriate form of our solution. If we have two distinct roots A and B we use, 𝑢𝑛 = 𝑥(𝐴𝑛 ) + 𝑦(𝐵𝑛 ) If we have two equal roots A, 𝑢𝑛 = 𝑥(𝐴𝑛 ) + 𝑦𝑛(𝐴𝑛 ) From here, we use terms in our sequence to solve for the missing coefficients as we did in our 1st order equations. Topic 11.5b: 2nd Order Homogenous Difference Equations Steps for solving second order homogeneous difference equations: 1. Form characteristics equations. 2. Get the roots of the characteristic equations. 3. Select the appropriate form of your answer for your roots. 4. Substitute in terms of the sequence to find the missing coefficients. Once we have found the roots of our characteristic equation, we select the appropriate form of our solution. If we have two distinct roots A and B we use, 𝑢𝑛 = 𝑥(𝐴𝑛 ) + 𝑦(𝐵𝑛 ) If we have two equal roots A, 𝑢𝑛 = 𝑥(𝐴𝑛 ) + 𝑦𝑛(𝐴𝑛 ) Question 1 Solve: 𝑢𝑛 − 3𝑢𝑛−1 = −2𝑢𝑛−2 where 𝑢1 = 3 and 𝑢2 = 7 𝑥 2 − 3𝑥 = −2 𝑢𝑛 = 𝑥(𝐴𝑛 ) + 𝑦(𝐵𝑛 ) 𝑥 2 − 3𝑥 + 2 = 0 𝑢𝑛 = 𝑥(1𝑛 ) + 𝑦(2𝑛 ) 𝑥 = 1 or 𝑥 = 2 3 = 𝑥(11 ) + 𝑦(21 ) 3 = 𝑥 + 2𝑦 7 = 𝑥(12 ) + 𝑦(22 ) 7 = 𝑥 + 4𝑦 𝑥 = −1 or 𝑦 = 2 𝑢𝑛 = −1(1𝑛 ) + 2(2𝑛 ) Question 2 Solve: 𝑢𝑛 = 5𝑢𝑛−1 −6𝑢𝑛−2 where 𝑢0 = 1 and 𝑢1 = 0 𝑥 2 = 5𝑥 − 6 𝑢𝑛 = 𝑥(𝐴𝑛 ) + 𝑦(𝐵𝑛 ) 𝑥 2 − 5𝑥 + 6 = 0 𝑢𝑛 = 𝑥(3𝑛 ) + 𝑦(2𝑛 ) 𝑥 = 3 or 𝑥 = 2 1 = 𝑥(30 ) + 𝑦(20 ) 1=𝑥+𝑦 0 = 𝑥(31 ) + 𝑦(21 ) 0 = 3𝑥 + 2𝑦 𝑥 = −2 or 𝑦 = 3 𝑢𝑛 = −2(3𝑛 ) + 3(2𝑛 ) Question 3 Solve: 𝑢𝑛 − 6𝑢𝑛−1 + 9𝑢𝑛−2 = 0 where 𝑢0 = 3 and 𝑢1 = 12 𝑥 2 − 6𝑥 + 9 = 0 𝑢𝑛 = 𝑥(𝐴𝑛 ) + 𝑦𝑛(𝐵𝑛 ) 𝑢𝑛 = 𝑥(3𝑛 ) + 𝑦𝑛(2𝑛 ) 𝑥=3 12 = 𝑥(31 ) + 𝑦1(31 ) 12 = 3𝑥 + 3𝑦 3 = 𝑥(40 ) + 𝑦(0)(40 ) 3=𝑥 𝑦=1 𝑢𝑛 = 3(3𝑛 ) + 1𝑛(3𝑛 ) Topic 11.6a: 2nd Order Inhomogeneous Difference Equations Recap – Inhomogeneous Difference Equation 𝑥𝑢𝑛 + 𝑦𝑢𝑛−1 + 𝑧𝑢𝑛−2 = 𝑓(𝑛) 𝑢𝑛 + 6𝑢𝑛−1 − 7𝑢𝑛−2 = 3𝑛 + 2 There are two parts in our solution to a 2nd order inhomogeneous difference equation 𝑢𝑛 = 𝑐𝑜𝑚𝑝𝑙𝑒𝑚𝑒𝑛𝑡𝑎𝑟𝑦 𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 + (𝑝𝑎𝑟𝑡𝑖𝑐𝑢𝑙𝑎𝑟 𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛) To solve a second order inhomogeneous difference equation 1. Solve the associated homogeneous difference equation to get the complimentary solution. 2. Select the appropriate form of the particular solution. 3. Sub the particular solution into the original equation for all U’s (matching their subscript). 4. Equate the coefficients to get the particular solution. 5. Put the complementary and particular solution together. 6. Use terms in the sequence to find the missing coefficients. Roots of Characteristic Form of Particular Form of 𝑓 𝑛 Equation Solution 𝑎 A,B ≠ 1 𝑎 𝑎𝑛 + 𝑏 A,B ≠ 1 𝑎𝑛 + 𝑏 𝑎𝑛2 + 𝑏𝑛 + 𝑐 A,B ≠ 1 𝑎𝑛2 + 𝑏𝑛 + 𝑐 A=1 𝑎 𝑎𝑛 B≠1 A=1 𝑎𝑛 + 𝑏 𝑎𝑛2 + 𝑏𝑛 B≠1 A=1 𝑎𝑛2 + 𝑏𝑛 + 𝑐 𝑎𝑛3 + 𝑏𝑛2 + 𝑐𝑛 B≠1 𝑘 𝑎𝑛 A,B ≠ a 𝑏 𝑎𝑛 A=a 𝑘 𝑎𝑛 𝑏𝑛 𝑎𝑛 B≠a 𝑘 𝑎𝑛 A=B=a 𝑏𝑛2 𝑎𝑛 Note: the particular solution can’t have any terms in common with the complementary solution. If they do we multiply the particular solution by n, as shown in the highlighted rows. Question 1 Choose the correct form for the particular solution. 𝑢𝑛 = 3𝑈𝑛−1 − 2𝑢𝑛−2 + 3𝑛 𝑥 2 − 3𝑥 + 2 = 0 Particular Solution Form 𝑥=2 𝑥=1 𝑏 3𝑛 Question 2 Choose the correct form for the particular solution. 𝑢𝑛 + 7𝑈𝑛+1 + 10𝑢𝑛−2 = 5 𝑥 2 + 7𝑥 + 10 = 0 Particular Solution Form 𝑥 = −5 𝑥 = −2 𝑎 Question 3 Choose the correct form for the particular solution. 𝑢𝑛 − 8𝑈𝑛−1 + 7𝑢𝑛−2 = 2n − 6 𝑥 2 + 7𝑥 + 10 = 0 Particular Solution Form 𝑥=7 𝑥=1 𝑎𝑛2 + 𝑏𝑛 Topic 11.6b: 2nd Order Inhomogeneous Difference Equations Calculating the particular solution Once you’ve chosen the correct form of the particular solution sub it in for all your U’s, matching the subscript each time. Question 1 𝑢𝑛 = 3𝑢𝑛−1 − 2𝑢𝑛−2 = 3𝑛 Particular Solution Form: b(3n ) 𝑏(3𝑛 ) = 3𝑏 3𝑛−1 − 2𝑏(3𝑛 −2) + 3𝑛 3𝑛 3𝑛 𝑏 3𝑛 = 3𝑏 − 2𝑏 2 + 3𝑛 3 3 9𝑏(3𝑛 ) = 9𝑏(3𝑛 ) − 2𝑏(3𝑛 ) + 3𝑛 2𝑏(3𝑛 ) = 3𝑛 1 𝑏=2 1 𝑛) Particular Solution: (3 2 Question 2 Calculate the particular solution. 𝑢𝑛 + 7𝑈𝑛−1 + 10𝑢𝑛−2 = 5 Particular Solution Form: 𝑎 𝑎 + 7𝑎 + 10𝑎 = 5 18𝑎 = 5 5 Particular Solution: a = 18 Question 3 Calculate the particular solution. 𝑢𝑛 − 8𝑈𝑛−1 + 7𝑢𝑛−2 = 2n − 6 Particular Solution Form: 𝑎𝑛2 + 𝑏𝑛 𝑎(𝑛 − 1)2 + 𝑏 𝑛 − 1 = 𝑎𝑛2 + 𝑎 − 1𝑎𝑛 + 𝑏𝑛 − 𝑏 𝑎(𝑛 − 2)2 + 𝑏 𝑛 − 2 = 𝑎𝑛2 + 4𝑎 − 4𝑎𝑛 + 𝑏𝑛 − 2𝑏 𝑎2 + 𝑏𝑛 − 8(𝑎(𝑛 − 1)2 +𝑏(𝑛 − 2)) + 7𝑎 𝑛 − 2 2 + 𝑏(𝑛 − 2) = 2𝑛 − 6 𝑎𝑛2 + 𝑏𝑛 − 8 𝑎𝑛2 + 𝑎 − 2𝑎𝑛 + 𝑏𝑛 − 𝑏 + 7 𝑎𝑛2 + 4a − 4an + bn − 2b = 2n − 6 𝑏 + 16𝑎 − 8𝑏 − 28𝑎 + 7𝑏 𝑛 + −8𝑎 + 8𝑏 + 28𝑎 − 14𝑏 = 2𝑛 − 6 1 4 𝑎=− 𝑏= 6 9 1 4 Particular Solution: − 6 𝑛2 + 9 𝑛 Topic 11.6c: 2nd Order Inhomogeneous Difference Equations There are two parts to solving a 2nd order inhomogeneous difference equation. 𝑢𝑛 = 𝑐𝑜𝑚𝑝𝑙𝑒𝑚𝑒𝑛𝑡𝑎𝑟𝑦 𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 + (𝑝𝑎𝑟𝑡𝑖𝑐𝑢𝑙𝑎𝑟 𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛) To solve a second order inhomogeneous difference equation: 1. Solve the associated homogeneous difference equation to get the complimentary solution. 2. Select the appropriate form of the particular solution. 3. Sub the particular solution into the original equation for all U’s (matching their subscript). 4. Equate the coefficients to get the solution together. 5. Put the complementary and particular solution together. 6. Use terms in the sequence to find the missing coefficients. Question 1 𝑢𝑛+1 − 3𝑈𝑛 + 2𝑢𝑛−1 = 6(−1)𝑛 𝑢0 = 12 𝑢1 = 12 𝑥 2 − 3𝑥 + 2 = 0 Particular solution: 𝑏(−1)n 𝑥=2 𝑥=1 Complementary Solution: 𝑥(2)n + 𝑦(1)n 𝑏(−1)n+1 − 3𝑏 −1 n + 2𝑏 −1 n = 6(−1)n −𝑏(−1)n − 3𝑏 −1 n − 2𝑏 −1 n = 6 −1 n 𝑏 = −1 n Particular solution: −1 −1 𝑢𝑛 = 𝑐𝑜𝑚𝑝𝑙𝑒𝑚𝑒𝑛𝑡𝑎𝑟𝑦 𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 + (𝑝𝑎𝑟𝑡𝑖𝑐𝑢𝑙𝑎𝑟 𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛) 𝑢𝑛 = 𝑥(2)n + 𝑦(1)n − 1(−1)n 𝑢0 = 12 𝑢1 = 12 12 = 𝑥 + 𝑦 − 1 12 = 2𝑥 + 𝑦 + 1 13 = 𝑥 + 𝑦 11 = 2𝑥 + 𝑦 𝑥 = −2 𝑦 = 15 𝑢𝑛 = −2 (2)n +15(1)n −1(−1)n Question 2 Solve: 𝑢𝑛 + 4𝑈𝑛−1 + 4𝑢𝑛−2 = 7 𝑢0 = 1 𝑢1 = 2 𝑥 2 − 4𝑥 + 4 = 0 Particular solution: a 𝑥 = −2 𝑎 + 4𝑎 + 4𝑎 = 7 Complementary Solution: 𝑥(−2)n + 𝑦𝑛(−2)n 7 𝑎= 9 7 Particular solution: 9 𝑛 𝑛 7 𝑢𝑛 = 𝑥(−2) + 𝑦𝑛(−2) + 9 𝑢0 = 1 𝑢1 = 2 7 7 1=𝑥+ 2 = −2𝑥 − 2𝑦 + 9 9 2 5 =𝑥 𝑦=− 9 6 2 2 5 𝑛 7 𝑢𝑛 = (−2) − 𝑛(−2) + 9 6 9 Question 3 Solve: 𝑢𝑛 − 7𝑈𝑛−1 + 10𝑢𝑛−2 = 6n + 8 𝑢0 = 1 𝑢1 = 2 𝑥 2 − 7𝑥 + 10 = 0 Particular solution form: 𝑥=5 x=2 𝑎𝑛 + 𝑏 Complementary Solution: 𝑥(5)n + 𝑦(2)n 𝑎𝑛 + 𝑏 − 7(𝑎 𝑛 − 1 + 𝑏 + 10(𝑎 𝑛 − 2 + 𝑏) 𝑎=2 𝑏=8 Particular solution: 2n + 8 𝑢𝑛 = 𝑥(5)𝑛 + 𝑦(2)n +2𝑛 + 8 𝑢0 = 1 𝑢1 = 2 1=𝑥+𝑦+8 2 = 5𝑥 + 2𝑦 + 2 + 8 −7 = 𝑥 + 𝑦 −8 = 5𝑥 + 2𝑦 𝑥=2 𝑦 = −9 𝑢𝑛 = 2(5)𝑛 −9(2)n + 2𝑛 + 8 Topic 11.7: 1st Order Inhomogeneous Difference Equations 𝑢𝑛 = 𝐴𝑢𝑛−1 + 𝑓(𝑛) 𝑢𝑛 = 𝑐𝑜𝑚𝑝𝑙𝑒𝑚𝑒𝑛𝑡𝑎𝑟𝑦 𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 + (𝑝𝑎𝑟𝑡𝑖𝑐𝑢𝑙𝑎𝑟 𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛) Complementary solution is in the form of 𝑥(𝐴)𝑛 Roots of Characteristic Form of 𝑓 𝑛 Form of Particular Solution Equation 𝑎 A≠1 𝑎 𝑎𝑛 + 𝑏 A≠1 𝑎𝑛 + 𝑏 𝑎𝑛2 + 𝑏𝑛 + 𝑐 A≠1 𝑎𝑛2 + 𝑏𝑛 + 𝑐 𝑎 A=1 𝑎𝑛 𝑎𝑛 + 𝑏 A=1 𝑎𝑛2 + 𝑏𝑛 𝑎𝑛2 + 𝑏𝑛 + 𝑐 A=1 𝑎𝑛3 + 𝑏𝑛2 + 𝑐𝑛 𝑘(𝑎𝑛 ) A≠a 𝑏(𝑎𝑛 ) 𝑘(𝑎𝑛 ) A=a 𝑏𝑛(𝑎𝑛 ) Note: the particular solution can’t have any terms in common with the complementary solution. If they do, we multiply the particular solution by n, as shown in the highlighted rows. Question 1 Solve: 𝑢𝑛 = 3𝑈𝑛−1 + 2𝑛 𝑢0 = 1 Particular solution form: 𝑎𝑛 + 𝑏 𝑎𝑛 + 𝑏 = 3 𝑎 𝑛 − 1 + 𝑏 + 2𝑛 3 𝑎 = −1 𝑏=− 2 3 Particular solution form: −n − 2 3 𝑢𝑛 = 𝑥(3)𝑛 −𝑛 − 2 3 1=𝑥− 2 5 𝑥= 2 5 3 𝑢𝑛 = (3)𝑛 − 𝑛 − 2 2 Question 2 Solve: 𝑢𝑛 = 2𝑈𝑛−1 + 3𝑛 𝑢0 = 4 Particular solution form: 𝑏(3)𝑛 𝑏(3)𝑛 = 2𝑏 3𝑛−1 + 3𝑛 𝑏=3 Particular solution form: 3(3)𝑛 𝑢𝑛 = 𝑥(2)𝑛 −3(3𝑛 ) 4=𝑥+3 𝑥=1 𝑢𝑛 = (2)𝑛 + 3(3𝑛 ) Question 3 Solve: 𝑢𝑛 = 4𝑈𝑛−1 + 4𝑛 𝑢0 = 3 Particular solution form: 𝑏𝑛(4)𝑛 𝑏𝑛(4)𝑛 = 4(𝑏 𝑛 − 1)(4𝑛−1 ) + 4𝑛 𝑏=1 Particular solution form: n(4)𝑛 𝑢𝑛 = 𝑥(4)𝑛 +𝑛(4𝑛 ) x=3 𝑢𝑛 = 3(4)𝑛 + 𝑛(4)𝑛