#### Transcript 11.5 = Recursion & Iteration

11.5 = Recursion & Iteration Arithmetic = adding (positive or negative) Arithmetic = adding (positive or negative) 3, 6, 9, 12, … Arithmetic = adding (positive or negative) 3, 6, 9, 12, … d=3 Arithmetic = adding (positive or negative) 3, 6, 9, 12, … d=3 *Formula for the nth term based on a1 and d. an = a1+(n–1)d Arithmetic = adding (positive or negative) 3, 6, 9, 12, … d=3 *Formula for the nth term based on a1 and d. an = a1+(n–1)d Geometric = multiplying (#’s > 1 or #’s < 1) Arithmetic = adding (positive or negative) 3, 6, 9, 12, … d=3 *Formula for the nth term based on a1 and d. an = a1+(n–1)d Geometric = multiplying (#’s > 1 or #’s < 1) 2, 10, 50, 250, … Arithmetic = adding (positive or negative) 3, 6, 9, 12, … d=3 *Formula for the nth term based on a1 and d. an = a1+(n–1)d Geometric = multiplying (#’s > 1 or #’s < 1) 2, 10, 50, 250, … r=5 Arithmetic = adding (positive or negative) 3, 6, 9, 12, … d=3 *Formula for the nth term based on a1 and d. an = a1+(n–1)d Geometric = multiplying (#’s > 1 or #’s < 1) 2, 10, 50, 250, … r=5 *Formula for the nth term based on a1 and r. an = a1r(n – 1) Arithmetic = adding (positive or negative) 3, 6, 9, 12, … d=3 *Formula for the nth term based on a1 and d. an = a1+(n–1)d Geometric = multiplying (#’s > 1 or #’s < 1) 2, 10, 50, 250, … r=5 *Formula for the nth term based on a1 and r. an = a1r(n – 1) Recursion = formula-based (“neither”) Arithmetic = adding (positive or negative) 3, 6, 9, 12, … d=3 *Formula for the nth term based on a1 and d. an = a1+(n–1)d Geometric = multiplying (#’s > 1 or #’s < 1) 2, 10, 50, 250, … r=5 *Formula for the nth term based on a1 and r. Recursion = formula-based (“neither”) 2, 4, 16, 256, … an = a1r(n – 1) Arithmetic = adding (positive or negative) 3, 6, 9, 12, … d=3 *Formula for the nth term based on a1 and d. an = a1+(n–1)d Geometric = multiplying (#’s > 1 or #’s < 1) 2, 10, 50, 250, … r=5 *Formula for the nth term based on a1 and r. an = a1r(n – 1) Recursion = formula-based (“neither”) 2, 4, 16, 256, … -The pattern is that you’re squaring each previous term. Arithmetic = adding (positive or negative) 3, 6, 9, 12, … d=3 *Formula for the nth term based on a1 and d. an = a1+(n–1)d Geometric = multiplying (#’s > 1 or #’s < 1) 2, 10, 50, 250, … r=5 *Formula for the nth term based on a1 and r. an = a1r(n – 1) Recursion = formula-based (“neither”) 2, 4, 16, 256, … -The pattern is that you’re squaring each previous term. an+1 = (an)2 Recursion = formula-based (“neither”) 2, 4, 16, 256, … -The pattern is that you’re squaring each previous term. an+1 = (an)2 *Note that this formula only applies to this particular example!!! Recursion = formula-based (“neither”) 2, 4, 16, 256, … -The pattern is that you’re squaring each previous term. an+1 = (an)2 *Note that this formula only applies to this particular example!!! Basic Formula: next term = #(1stterm)# ± # Recursion = formula-based (“neither”) 2, 4, 16, 256, … -The pattern is that you’re squaring each previous term. an+1 = (an)2 *Note that this formula only applies to this particular example!!! Basic Formula: next term = #(1stterm)# ± # **The #’s are possibilities, but not requirements. Recursion = formula-based (“neither”) 2, 4, 16, 256, … -The pattern is that you’re squaring each previous term. an+1 = (an)2 *Note that this formula only applies to this particular example!!! Basic Formula: next term = #(1stterm)# ± # **The #’s are possibilities, but not requirements. Exs. an = 3an-1 + 4 an+1 = (an)2 – 9 an+2 = 2an – an+1 Ex. 1 Find the first five terms of each sequence. a1 = 10, an+1 = 4an + 1 Ex. 1 Find the first five terms of each sequence. a1 = 10, an+1 = 4an + 1 a1 = 10 Ex. 1 Find the first five terms of each sequence. a1 = 10, an+1 = 4an + 1 a1 = 10 a1+1 = 4a1 + 1 Ex. 1 Find the first five terms of each sequence. a1 = 10, an+1 = 4an + 1 a1 = 10 a1+1 = 4a1 + 1 = 4(10) + 1 Ex. 1 Find the first five terms of each sequence. a1 = 10, an+1 = 4an + 1 a1 = 10 a1+1 = 4a1 + 1 = 4(10) + 1 = 41 Ex. 1 Find the first five terms of each sequence. a1 = 10, an+1 = 4an + 1 a1 = 10 a1+1 = 4a1 + 1 = 4(10) + 1 = 41 a2 = 41 Ex. 1 Find the first five terms of each sequence. a1 = 10, an+1 = 4an + 1 a1 = 10 a1+1 = 4a1 + 1 = 4(10) + 1 = 41 a2 = 41 a2+1 = 4a2 + 1 Ex. 1 Find the first five terms of each sequence. a1 = 10, an+1 = 4an + 1 a1 = 10 a1+1 = 4a1 + 1 = 4(10) + 1 = 41 a2 = 41 a2+1 = 4a2 + 1 = 4(41) + 1 Ex. 1 Find the first five terms of each sequence. a1 = 10, an+1 = 4an + 1 a1 = 10 a1+1 = 4a1 + 1 = 4(10) + 1 = 41 a2 = 41 a2+1 = 4a2 + 1 = 4(41) + 1 = 165 Ex. 1 Find the first five terms of each sequence. a1 = 10, an+1 = 4an + 1 a1 = 10 a1+1 = 4a1 + 1 = 4(10) + 1 = 41 a2 = 41 a2+1 = 4a2 + 1 = 4(41) + 1 = 165 a3 = 165 Ex. 1 Find the first five terms of each sequence. a1 = 10, an+1 = 4an + 1 a1 = 10 a1+1 = 4a1 + 1 = 4(10) + 1 = 41 a2 = 41 a2+1 = 4a2 + 1 = 4(41) + 1 = 165 a3 = 165 a3+1 = 4a3 + 1 Ex. 1 Find the first five terms of each sequence. a1 = 10, an+1 = 4an + 1 a1 = 10 a1+1 = 4a1 + 1 = 4(10) + 1 = 41 a2 = 41 a2+1 = 4a2 + 1 = 4(41) + 1 = 165 a3 = 165 a3+1 = 4a3 + 1 = 4(165) + 1 Ex. 1 Find the first five terms of each sequence. a1 = 10, an+1 = 4an + 1 a1 = 10 a1+1 = 4a1 + 1 = 4(10) + 1 = 41 a2 = 41 a2+1 = 4a2 + 1 = 4(41) + 1 = 165 a3 = 165 a3+1 = 4a3 + 1 = 4(165) + 1 = 661 Ex. 1 Find the first five terms of each sequence. a1 = 10, an+1 = 4an + 1 a1 = 10 a1+1 = 4a1 + 1 = 4(10) + 1 = 41 a2 = 41 a2+1 = 4a2 + 1 = 4(41) + 1 = 165 a3 = 165 a3+1 = 4a3 + 1 = 4(165) + 1 = 661 a4 = 661 Ex. 1 Find the first five terms of each sequence. a1 = 10, an+1 = 4an + 1 a1 = 10 a1+1 = 4a1 + 1 = 4(10) + 1 = 41 a2 = 41 a2+1 = 4a2 + 1 = 4(41) + 1 = 165 a3 = 165 a3+1 = 4a3 + 1 = 4(165) + 1 = 661 a4 = 661 a4+1 = 4a4 + 1 Ex. 1 Find the first five terms of each sequence. a1 = 10, an+1 = 4an + 1 a1 = 10 a1+1 = 4a1 + 1 = 4(10) + 1 = 41 a2 = 41 a2+1 = 4a2 + 1 = 4(41) + 1 = 165 a3 = 165 a3+1 = 4a3 + 1 = 4(165) + 1 = 661 a4 = 661 a4+1 = 4a4 + 1 = 4(661) + 1 Ex. 1 Find the first five terms of each sequence. a1 = 10, an+1 = 4an + 1 a1 = 10 a1+1 = 4a1 + 1 = 4(10) + 1 = 41 a2 = 41 a2+1 = 4a2 + 1 = 4(41) + 1 = 165 a3 = 165 a3+1 = 4a3 + 1 = 4(165) + 1 = 661 a4 = 661 a4+1 = 4a4 + 1 = 4(661) + 1 = 2645 Ex. 1 Find the first five terms of each sequence. a1 = 10, an+1 = 4an + 1 a1 = 10 a1+1 = 4a1 + 1 = 4(10) + 1 = 41 a2 = 41 a2+1 = 4a2 + 1 = 4(41) + 1 = 165 a3 = 165 a3+1 = 4a3 + 1 = 4(165) + 1 = 661 a4 = 661 a4+1 = 4a4 + 1 = 4(661) + 1 = 2645 a5 = 2645 Ex. 1 Find the first five terms of each sequence. a1 = 10, an+1 = 4an + 1 a1 = 10 a1+1 = 4a1 + 1 = 4(10) + 1 = 41 a2 = 41 a2+1 = 4a2 + 1 = 4(41) + 1 = 165 a3 = 165 a3+1 = 4a3 + 1 = 4(165) + 1 = 661 a4 = 661 a4+1 = 4a4 + 1 = 4(661) + 1 = 2645 a5 = 2645 Ex. 2 Write a recursive formula for the sequence. 16, 10, 7, 5.5, 4.75 Ex. 2 Write a recursive formula for the sequence. 16 10 7 5.5 4.75 -6 -3 -1.5 -0.75 Ex. 2 Write a recursive formula for the sequence. 16 10 7 5.5 4.75 -6 -3 -1.5 -0.75 *Each difference is half the previous difference! Ex. 2 Write a recursive formula for the sequence. 16 10 7 5.5 4.75 -6 -3 -1.5 -0.75 *Each difference is half the previous difference! a1 = 16 Ex. 2 Write a recursive formula for the sequence. 16 10 7 5.5 4.75 -6 -3 -1.5 -0.75 *Each difference is half the previous difference! a1 = 16 a2 = 0.5(16) ± ? = 10 Ex. 2 Write a recursive formula for the sequence. 16 10 7 5.5 4.75 -6 -3 -1.5 -0.75 *Each difference is half the previous difference! a1 = 16 a2 = 0.5(16) ± ? = 10 8 ± ? = 10 Ex. 2 Write a recursive formula for the sequence. 16 10 7 5.5 4.75 -6 -3 -1.5 -0.75 *Each difference is half the previous difference! a1 = 16 a2 = 0.5(16) ± ? = 10 8 ± ? = 10 a3 = 0.5(10) ± ? = 7 Ex. 2 Write a recursive formula for the sequence. 16 10 7 5.5 4.75 -6 -3 -1.5 -0.75 *Each difference is half the previous difference! a1 = 16 a2 = 0.5(16) ± ? = 10 8 ± ? = 10 a3 = 0.5(10) ± ? = 7 5±?=7 Ex. 2 Write a recursive formula for the sequence. 16 10 7 5.5 4.75 -6 -3 -1.5 -0.75 *Each difference is half the previous difference! a1 = 16 a2 = 0.5(16) ± ? = 10 8 ± ? = 10 a3 = 0.5(10) ± ? = 7 5±?=7 a4 = 0.5(7) ± ? = 5.5 Ex. 2 Write a recursive formula for the sequence. 16 10 7 5.5 4.75 -6 -3 -1.5 -0.75 *Each difference is half the previous difference! a1 = 16 a2 = 0.5(16) ± ? = 10 8 ± ? = 10 a3 = 0.5(10) ± ? = 7 5±?=7 a4 = 0.5(7) ± ? = 5.5 3.5 ± ? = 5.5 Ex. 2 Write a recursive formula for the sequence. 16 10 7 5.5 4.75 -6 -3 -1.5 -0.75 *Each difference is half the previous difference! a1 = 16 a2 = 0.5(16) ± ? = 10 8 ± ? = 10 a3 = 0.5(10) ± ? = 7 5±?=7 a4 = 0.5(7) ± ? = 5.5 3.5 ± ? = 5.5 a5 = 0.5(5.5) ± ? = 4.75 Ex. 2 Write a recursive formula for the sequence. 16 10 7 5.5 4.75 -6 -3 -1.5 -0.75 *Each difference is half the previous difference! a1 = 16 a2 = 0.5(16) ± ? = 10 8 ± ? = 10 a3 = 0.5(10) ± ? = 7 5±?=7 a4 = 0.5(7) ± ? = 5.5 3.5 ± ? = 5.5 a5 = 0.5(5.5) ± ? = 4.75 2.75 ± ? = 4.75 Ex. 2 Write a recursive formula for the sequence. 16 10 7 5.5 4.75 -6 -3 -1.5 -0.75 *Each difference is half the previous difference! a1 = 16 a2 = 0.5(16) ± ? = 10 8 ± 2 = 10 a3 = 0.5(10) ± ? = 7 5±2=7 a4 = 0.5(7) ± ? = 5.5 3.5 ± 2 = 5.5 a5 = 0.5(5.5) ± ? = 4.75 2.75 ± 2 = 4.75 Ex. 2 Write a recursive formula for the sequence. 16 10 7 5.5 4.75 -6 -3 -1.5 -0.75 *Each difference is half the previous difference! a1 = 16 a2 = 0.5(16) ± ? = 10 8 ± 2 = 10 a3 = 0.5(10) ± ? = 7 5±2=7 a4 = 0.5(7) ± ? = 5.5 3.5 ± 2 = 5.5 a5 = 0.5(5.5) ± ? = 4.75 2.75 ± 2 = 4.75 So an+1 = 0.5an + 2 Ex. 2 Write a recursive formula for the sequence. 16 10 7 5.5 4.75 -6 -3 -1.5 -0.75 *Each difference is half the previous difference! a1 = 16 a2 = 0.5(16) ± ? = 10 8 ± 2 = 10 a3 = 0.5(10) ± ? = 7 5±2=7 a4 = 0.5(7) ± ? = 5.5 3.5 ± 2 = 5.5 a5 = 0.5(5.5) ± ? = 4.75 2.75 ± 2 = 4.75 So an+1 = 0.5an + 2 Iteration = proceeding terms of a recursive sequence Iteration = proceeding terms of a recursive sequence Ex. 3 Find the first three iterates of the function for the given initial value. f(x) = -6x + 3 x0 = 8 Iteration = proceeding terms of a recursive sequence Ex. 3 Find the first three iterates of the function for the given initial value. f(x) = -6x + 3 x0 = 8 a1 = -6(8) + 3 Iteration = proceeding terms of a recursive sequence Ex. 3 Find the first three iterates of the function for the given initial value. f(x) = -6x + 3 x0 = 8 a1 = -6(8) + 3 = -45 Iteration = proceeding terms of a recursive sequence Ex. 3 Find the first three iterates of the function for the given initial value. f(x) = -6x + 3 x0 = 8 a1 = -6(8) + 3 = -45 a2 = -6(-45) + 3 Iteration = proceeding terms of a recursive sequence Ex. 3 Find the first three iterates of the function for the given initial value. f(x) = -6x + 3 x0 = 8 a1 = -6(8) + 3 = -45 a2 = -6(-45) + 3 = 273 Iteration = proceeding terms of a recursive sequence Ex. 3 Find the first three iterates of the function for the given initial value. f(x) = -6x + 3 x0 = 8 a1 = -6(8) + 3 = -45 a2 = -6(-45) + 3 = 273 a3 = -6(273) + 3 Iteration = proceeding terms of a recursive sequence Ex. 3 Find the first three iterates of the function for the given initial value. f(x) = -6x + 3 x0 = 8 a1 = -6(8) + 3 = -45 a2 = -6(-45) + 3 = 273 a3 = -6(273) + 3 = -1635 Iteration = proceeding terms of a recursive sequence Ex. 3 Find the first three iterates of the function for the given initial value. f(x) = -6x + 3 x0 = 8 a1 = -6(8) + 3 = -45 a2 = -6(-45) + 3 = 273 a3 = -6(273) + 3 = -1635