If f(x)=f(x-1)+5x and f(1)=2 then how to find f(20)?

If f(x)=f(x-1)+5x and f(1)=2 then how to find f(20)?
Easy but long way:

f(2) = f(1) + 5 * 2 = 12 ........ [edited .... Thanks Jeff]

f(3) = f(2) + 5 * 3 = ?

and continue.....

There are other methods - what method have you been taught?
 
Last edited by a moderator:
I would treat it as a linear inhomogeneous difference equation to get the closed form for f(x)\displaystyle f(x).
 
Another method would be to observe:

f(x)=f(1)+5k=2x(k)=5k=1x(k)+(f(1)5)=?\displaystyle \displaystyle f(x)=f(1)+5\sum_{k=2}^{x}(k)=5\sum_{k=1}^{x}(k)+(f(1)-5)=\,?
 
I would treat it as a linear inhomogeneous difference equation to get the closed form for f(x)\displaystyle f(x).
Expanding on MarkFL's suggestion, f(x)=f(x1)+5x,  f(1)=2\displaystyle f(x) = f(x-1) + 5x, \; f(1)=2 yields the recursively defined sequence:
an=an1+5n\displaystyle a_n = a_{n-1} + 5n whose first term is a1=2\displaystyle a_1 = 2 . Note that f(n)=an\displaystyle f(n) = a_n when n\displaystyle n is a natural number.
With the goal of finding a closed form formula for an\displaystyle a_n in mind, the first few terms are:
a1=2\displaystyle a_1 = 2
a2=a1+52\displaystyle a_2 = a_1 + 5 \cdot 2
a3=a2+53=(a1+52)+53=a1+5(2+3)\displaystyle a_3 = a_2 + 5 \cdot 3 = (a_1 + 5 \cdot 2) + 5 \cdot 3 = a_1 + 5(2 +3)
a4=a3+54=(a1+5(2+3))+54=a1+5(2+3+4)\displaystyle a_4 = a_3 + 5 \cdot 4 = (a_1 + 5(2 +3)) + 5 \cdot 4 = a_1 + 5(2+3+4)
By inspection, a formula (whose validity can be proved by an induction argument) for an\displaystyle a_n in terms of a1\displaystyle a_1 and n\displaystyle n is:
an=a1+5(2+3++n)\displaystyle a_n = a_1 + 5(2 + 3 + \cdots + n)
A closed form formula for an\displaystyle a_n can be derived from the identity 1+2++n=n(n+1)2\displaystyle 1+2+\cdots+n=\frac{n(n+1)}2 and the fact that a1=2\displaystyle a_1 = 2.
 
Top