#### AlphaCentauri

##### New member

- Joined
- Jul 4, 2018

- Messages
- 4

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

- Thread starter AlphaCentauri
- Start date

- Joined
- Jul 4, 2018

- Messages
- 4

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

- Joined
- Jun 18, 2007

- Messages
- 18,149

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

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:

Expanding on MarkFL's suggestion, \(\displaystyle f(x) = f(x-1) + 5x, \; f(1)=2\) yields the recursively defined sequence:I would treat it as a linear inhomogeneous difference equation to get the closed form for \(\displaystyle f(x)\).

\(\displaystyle a_n = a_{n-1} + 5n \) whose first term is \(\displaystyle a_1 = 2 \). Note that \(\displaystyle f(n) = a_n\) when \(\displaystyle n\) is a natural number.

With the goal of finding a closed form formula for \(\displaystyle a_n\) in mind, the first few terms are:

\(\displaystyle a_1 = 2\)

\(\displaystyle a_2 = a_1 + 5 \cdot 2\)

\(\displaystyle a_3 = a_2 + 5 \cdot 3 = (a_1 + 5 \cdot 2) + 5 \cdot 3 = a_1 + 5(2 +3)\)

\(\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 \(\displaystyle a_n\) in terms of \(\displaystyle a_1\) and \(\displaystyle n\) is:

\(\displaystyle a_n = a_1 + 5(2 + 3 + \cdots + n)\)

A closed form formula for \(\displaystyle a_n\) can be derived from the identity \(\displaystyle 1+2+\cdots+n=\frac{n(n+1)}2\) and the fact that \(\displaystyle a_1 = 2\).