f(n)=an+b
We need to find "a" and "b"
when n=1→f(n)=f(1)=18 (see the table), replacing n=1 and f(n)=18 in the equation above, we have:
n=1→f(1)=a(1)+b→a+b=18 (1)
when n=2→f(n)=f(2)=24 (see the table), replacing n=2 and f(n)=24 in the equation above, we have:
n=2→f(2)=a(2)+b→2a+b=24 (2)
We have a system of 2 equations and 2 unknwons:
(1) a+b=18
(2) 2a+b=24
Subtractict equation (1) from equation (2):
Equation (2) - Equation (1):
2a+b-(a+b)=24-18→2a+b-a-b=6→a=6
Replacing "a" by 6 in equation (1):
(1) a+b=18→a=6→6+b=18→6+b-6=18-6→b=12
Then the equation is:
f(n)=an+b; a=6, b=12
f(n)=6n+12
Answer: f(n)=6n+12