60
11.5 = Recursion & Iteration

11.5 = Recursion & Iteration

  • Upload
    upton

  • View
    125

  • Download
    3

Embed Size (px)

DESCRIPTION

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 - PowerPoint PPT Presentation

Citation preview

Page 1: 11.5 = Recursion & Iteration

11.5 = Recursion & Iteration

Page 2: 11.5 = Recursion & Iteration

Arithmetic = adding (positive or negative)

Page 3: 11.5 = Recursion & Iteration

Arithmetic = adding (positive or negative)3, 6, 9, 12, …

Page 4: 11.5 = Recursion & Iteration

Arithmetic = adding (positive or negative)3, 6, 9, 12, …

d = 3

Page 5: 11.5 = Recursion & Iteration

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

Page 6: 11.5 = Recursion & Iteration

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)

Page 7: 11.5 = Recursion & Iteration

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, …

Page 8: 11.5 = Recursion & Iteration

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

Page 9: 11.5 = Recursion & Iteration

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)

Page 10: 11.5 = Recursion & Iteration

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”)

Page 11: 11.5 = Recursion & Iteration

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, …

Page 12: 11.5 = Recursion & Iteration

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.

Page 13: 11.5 = Recursion & Iteration

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

Page 14: 11.5 = Recursion & Iteration

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!!!

Page 15: 11.5 = Recursion & Iteration

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)# ± #

Page 16: 11.5 = Recursion & Iteration

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.

Page 17: 11.5 = Recursion & Iteration

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

Page 18: 11.5 = Recursion & Iteration

Ex. 1 Find the first five terms of each sequence. a1 = 10, an+1 = 4an + 1

Page 19: 11.5 = Recursion & Iteration

Ex. 1 Find the first five terms of each sequence. a1 = 10, an+1 = 4an + 1

a1 = 10

Page 20: 11.5 = Recursion & Iteration

Ex. 1 Find the first five terms of each sequence. a1 = 10, an+1 = 4an + 1

a1 = 10

a1+1 = 4a1 + 1

Page 21: 11.5 = Recursion & Iteration

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

Page 22: 11.5 = Recursion & Iteration

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

Page 23: 11.5 = Recursion & Iteration

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

Page 24: 11.5 = Recursion & Iteration

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

Page 25: 11.5 = Recursion & Iteration

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

Page 26: 11.5 = Recursion & Iteration

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

Page 27: 11.5 = Recursion & Iteration

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

Page 28: 11.5 = Recursion & Iteration

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

Page 29: 11.5 = Recursion & Iteration

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

Page 30: 11.5 = Recursion & Iteration

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

Page 31: 11.5 = Recursion & Iteration

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

Page 32: 11.5 = Recursion & Iteration

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

Page 33: 11.5 = Recursion & Iteration

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

Page 34: 11.5 = Recursion & Iteration

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

Page 35: 11.5 = Recursion & Iteration

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 = 41a2 = 41a2+1 = 4a2 + 1 = 4(41) + 1 = 165a3 = 165a3+1 = 4a3 + 1 = 4(165) + 1 = 661a4 = 661a4+1 = 4a4 + 1 = 4(661) + 1 = 2645a5 = 2645

Page 36: 11.5 = Recursion & Iteration

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 = 41a2 = 41a2+1 = 4a2 + 1 = 4(41) + 1 = 165a3 = 165a3+1 = 4a3 + 1 = 4(165) + 1 = 661a4 = 661a4+1 = 4a4 + 1 = 4(661) + 1 = 2645a5 = 2645

Page 37: 11.5 = Recursion & Iteration

Ex. 2 Write a recursive formula for the sequence.

16, 10, 7, 5.5, 4.75

Page 38: 11.5 = Recursion & Iteration

Ex. 2 Write a recursive formula for the sequence.16 10 7 5.5 4.75 -6 -3 -1.5 -0.75

Page 39: 11.5 = Recursion & Iteration

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!

Page 40: 11.5 = Recursion & Iteration

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

Page 41: 11.5 = Recursion & Iteration

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

Page 42: 11.5 = Recursion & Iteration

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

Page 43: 11.5 = Recursion & Iteration

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 ± ? = 10a3 = 0.5(10) ± ? = 7

Page 44: 11.5 = Recursion & Iteration

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 ± ? = 10a3 = 0.5(10) ± ? = 7

5 ± ? = 7

Page 45: 11.5 = Recursion & Iteration

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 ± ? = 10a3 = 0.5(10) ± ? = 7

5 ± ? = 7a4 = 0.5(7) ± ? = 5.5

Page 46: 11.5 = Recursion & Iteration

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 ± ? = 10a3 = 0.5(10) ± ? = 7

5 ± ? = 7a4 = 0.5(7) ± ? = 5.5

3.5 ± ? = 5.5

Page 47: 11.5 = Recursion & Iteration

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 ± ? = 10a3 = 0.5(10) ± ? = 7

5 ± ? = 7a4 = 0.5(7) ± ? = 5.5

3.5 ± ? = 5.5a5 = 0.5(5.5) ± ? = 4.75

Page 48: 11.5 = Recursion & Iteration

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 ± ? = 10a3 = 0.5(10) ± ? = 7

5 ± ? = 7a4 = 0.5(7) ± ? = 5.5

3.5 ± ? = 5.5a5 = 0.5(5.5) ± ? = 4.75

2.75 ± ? = 4.75

Page 49: 11.5 = Recursion & Iteration

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 = 10a3 = 0.5(10) ± ? = 7

5 ± 2 = 7a4 = 0.5(7) ± ? = 5.5

3.5 ± 2 = 5.5a5 = 0.5(5.5) ± ? = 4.75

2.75 ± 2 = 4.75

Page 50: 11.5 = Recursion & Iteration

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 = 10a3 = 0.5(10) ± ? = 7

5 ± 2 = 7a4 = 0.5(7) ± ? = 5.5

3.5 ± 2 = 5.5a5 = 0.5(5.5) ± ? = 4.75

2.75 ± 2 = 4.75 So an+1 = 0.5an + 2

Page 51: 11.5 = Recursion & Iteration

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 = 10a3 = 0.5(10) ± ? = 7

5 ± 2 = 7a4 = 0.5(7) ± ? = 5.5

3.5 ± 2 = 5.5a5 = 0.5(5.5) ± ? = 4.75

2.75 ± 2 = 4.75 So an+1 = 0.5an + 2

Page 52: 11.5 = Recursion & Iteration

Iteration = proceeding terms of a recursive sequence

Page 53: 11.5 = Recursion & Iteration

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

Page 54: 11.5 = Recursion & Iteration

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

Page 55: 11.5 = Recursion & Iteration

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

Page 56: 11.5 = Recursion & Iteration

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

Page 57: 11.5 = Recursion & Iteration

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

Page 58: 11.5 = Recursion & Iteration

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

Page 59: 11.5 = Recursion & Iteration

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

Page 60: 11.5 = Recursion & Iteration

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