Presentation is loading. Please wait.

Presentation is loading. Please wait.

Recursive Functions, Iterates, and Finite Differences By: Jeffrey Bivin Lake Zurich High School Last Updated: May 21, 2008.

Similar presentations


Presentation on theme: "Recursive Functions, Iterates, and Finite Differences By: Jeffrey Bivin Lake Zurich High School Last Updated: May 21, 2008."— Presentation transcript:

1 Recursive Functions, Iterates, and Finite Differences By: Jeffrey Bivin Lake Zurich High School jeff.bivin@lz95.org Last Updated: May 21, 2008

2 Recursive Function A recursive function is a function whose domain is the set of nonnegative integers and is made up of two parts – 1.Start 2.Definition Jeff Bivin -- LZHS

3 Example 1 a 1 = 5 a n = a n-1 + 10 n = 2 a 2 = a (2-1) + 10 a 2 = a 1 + 10 a 2 = 5 + 10 a 2 = 15 n = 3 a 3 = a (3-1) + 10 a 3 = a 2 + 10 a 3 = 15 + 10 a 3 = 25 n = 4 a 4 = a (4-1) + 10 a 4 = a 3 + 10 a 4 = 25 + 10 a 4 = 35 Jeff Bivin -- LZHS

4 Example 2 f(1) = 3 f(n) = 5f(n-1) + 2 n = 2 f(2) = 5f(2-1) + 2 f(2) = 5f(1) + 2 f(2) = 53 + 2 f(2) = 17 n = 3 f(3) = 5f(3-1) + 2 f(3) = 5f(2) + 2 f(3) = 517 + 2 f(3) = 87 n = 4 f(4) = 5f(4-1) + 2 f(4) = 5f(3) + 2 f(4) = 587 + 2 f(4) = 437 Jeff Bivin -- LZHS

5 Example 3 f(1) = 1 f(2) = 1 f(n) = f(n-1) + f(n-2) f(3) = f(3-1) + f(3-2) = f(2) + f(1) = 1 + 1 = 2 f(4) = f(4-1) + f(4-2) = f(3) + f(2) = 2 + 1 = 3 f(5) = f(5-1) + f(5-2) = f(4) + f(3) = 3 + 2 = 5 f(6) = f(6-1) + f(6-2) = f(5) + f(4) = 5 + 3 = 8 Jeff Bivin -- LZHS

6 Write a recursive rule for the sequence 4, 12, 36, 108, 324,... Is it Arithmetic or Geometric? What is the pattern? multiply by 3 What is the start? What is the definition? a 1 = 4 a n = 3 ·a n-1

7 Is it Arithmetic or Geometric? Write a recursive rule for the sequence 7, 12, 17, 22, 27,... What is the pattern? add 5 What is the start? What is the definition? a 1 = 7 a n = a n-1 + 5

8 Is it Arithmetic or Geometric? Write a recursive rule for the sequence 3, 4, 7, 11, 18, 29, 47,... What is the pattern? 3+4 = 7, 4 + 7 = 11, 7 + 11 = 18 What is the start? What is the definition? a 1 = 3 a n = a n-2 + a n-1 neither a 2 = 4

9 Find the first three iterates of the function for the given initial value. f(x) = 5x + 3, x 0 = 2 x 1 = f(x 0 ) = f(2) = 5(2) + 3 = 13 x 2 = f(x 1 ) = f(13) = 5(13) + 3 = 68 x 3 = f(x 2 ) = f(68) = 5(68) + 3 = 343

10 Determine the degree of the function 4, 7, 10, 13, 16, 19, 22, 25, 28 3, 3, 3, 3, 3, 3, 3, 3 1 st difference Jeff Bivin -- LZHS

11 Now, write the linear model 4, 7, 10, 13, 16, 19, 22, 25, 28 f(1)f(2) (1, 4) (2, 7) Jeff Bivin -- LZHS

12 Determine the degree of the function -1, 0, 5, 14, 27, 44, 65, 90, 119 1, 5, 9, 13, 17, 21, 25, 29 1 st difference 4, 4, 4, 4, 4, 4, 4 2 nd difference Jeff Bivin -- LZHS

13 Now write the quadratic model -1, 0, 5, 14, 27, 44, 65, 90, 119 f(1)f(2)f(3) Jeff Bivin -- LZHS

14 Now write the quadratic model -1, 0, 5, 14, 27, 44, 65, 90, 119 f(1)f(2)f(3) Jeff Bivin -- LZHS a = 2 b = -5 c = 2

15 Determine the degree of the function 1, 10, 47, 130, 277, 506, 835, 1282, 1865 9, 37, 83, 147, 229, 329, 447, 583 28, 46, 64, 82, 100, 118, 136 18, 18, 18, 18, 18, 18 3 rd difference 2 nd difference 1 st difference Jeff Bivin -- LZHS

16 Now write the quadratic model f(1)f(2)f(3) 1, 10, 47, 130, 277, 506, 835, 1282, 1865 f(4) Jeff Bivin -- LZHS

17 Now write the quadratic model f(1)f(2)f(3) 1, 10, 47, 130, 277, 506, 835, 1282, 1865 f(4) Jeff Bivin -- LZHS a = 3b = -4c = 0d = 2


Download ppt "Recursive Functions, Iterates, and Finite Differences By: Jeffrey Bivin Lake Zurich High School Last Updated: May 21, 2008."

Similar presentations


Ads by Google