# Video: Iterating a Function

We can define a sequence 𝑥₀, 𝑥₁, 𝑥₂, ... using the recursive formula 𝑥_(𝑖) = 𝑓(𝑥_(𝑖 − 1)) for some function 𝑓 and initial value 𝑥₀. Write the first 5 terms of the sequence generated by 𝑓(𝑥_(𝑖)) = 8 − 3𝑥_(𝑖 − 1), 𝑥₀ = −11.

02:34

### Video Transcript

We can define a sequence 𝑥 sub zero, 𝑥 sub one, 𝑥 sub two using the recursive formula 𝑥 sub 𝑖 equals 𝑓 of 𝑥 sub 𝑖 minus one for some function 𝑓 and initial value 𝑥 sub zero. Write the first five terms of the sequence generated by 𝑓 of 𝑥 sub 𝑖 which is equal to eight minus three 𝑥 sub 𝑖 minus one, where 𝑥 sub zero is equal to negative 11.

So we’re told that 𝑥 sub zero is equal to negative 11, and 𝑥 sub zero is our initial value. So to get another term in this sequence, 𝑥 sub zero is the first one, so 𝑥 sub 𝑖 is another one. And notice it’s equal to eight minus three 𝑥 sub 𝑖 minus one. So if this is for 𝑥 sub 𝑖, 𝑥 sub 𝑖 minus one would be the number that we got before.

So if we wanna know the first five terms of the sequence, we already know 𝑥 sub zero is negative 11. So if we want the next one, 𝑥 sub one, in order to find that, if 𝑖 is one, one minus one is zero. And we know what 𝑥 sub zero is: it’s negative 11. So as we said before, essentially we’re plugging in the number that we got right before this.

So negative three times negative 11 is a positive 33, and eight plus 33 gives us 41. So 𝑥 sub one is equal to 41. So in order to get 𝑥 sub two, we plug in the number that we got right before, which was 41. So we have eight minus three times 41, and negative three times 41 is 123, negative 123. So eight minus 123 would be negative 115. So 𝑥 sub two is negative 115.

So to get 𝑥 sub three, we take eight minus three times negative 115. So we have eight plus 345, which is equal to 353. So to get 𝑥 sub four, we take eight minus three times 353, which is equal to eight minus 1059, making 𝑥 sub four equal to negative 1051.

So the first five terms would be negative 11, 41, negative 115, 353, and negative 1051. Again, these would be the first five terms of our sequence.