225k views
0 votes
If f(1) =4 and f(n) = -4f(n-1) + n then find the value of f(5)

1 Answer

4 votes

Answer: 933

======================================================

Work Shown:

We use the first term to build to the second term.

Plug in n = 2

f(n) = -4f(n-1) + n

f(2) = -4f(2-1) + 2 ..... n replaced with 2

f(2) = -4f(1) + 2

f(2) = -4*4 + 2 ......... f(1) replaced with 4; since f(1) = 4

f(2) = -16 + 2

f(2) = -14

The second term is -14

------------------

Repeat for n = 3

f(n) = -4f(n-1) + n

f(3) = -4f(3-1) + 3 ..... n replaced with 3

f(3) = -4f(2) + 3

f(3) = -4*(-14) + 3 ......... f(2) replaced with -14

f(3) = 56 + 3

f(3) = 59

The third term is 59

------------------

We keep going until we get to f(5)

Plug in n = 4

f(n) = -4f(n-1) + n

f(4) = -4f(4-1) + 4 ..... n replaced with 4

f(4) = -4f(3) + 4

f(4) = -4*(59) + 4 ......... f(3) replaced with 59

f(4) = -236 + 4

f(4) = -232

The fourth term is -232

------------------

Just one more section

Plug in n = 5

f(n) = -4f(n-1) + n

f(5) = -4f(5-1) + 5 ..... n replaced with 4

f(5) = -4f(4) + 5

f(5) = -4*(-232) + 5 ......... f(4) replaced with -232

f(5) = 928 + 5

f(5) = 933

The fifth term is 933

------------------

As you can see, recursive sequences can get tedious for fairly large values of n. We need to compute every term before f(5) to figure it out. So if your teacher needed you to compute something like f(10), then it would get even worse. Sometimes it's possible to find a closed formula for it, but it may be tricky to find.

User Mercator
by
4.0k points