Equation for curve where $f(x)= f(x-1)+50 x$ I want a curve where $y(x)$ takes the same values as at $y(x-1)$ with $50x$ added on. What equation do you use to calculate this?
An easy way would be with a loop, but is there any way to calculate this without a loop?
Here is what values you would get from the curve:
X - Y
0 - 0   (0   + 0*50)
1 - 50  (0   + 1*50)
2 - 150 (50  + 2*50)
3 - 300 (150 + 3*50)
4 - 500 (300 + 4*50)

 A: Hint: subtracting f(x-1) from both sides gives you that the successive difference is linear - so f is quadratic. 
A: By induction, and using the triangular number formula
$$f(x)=f(x-1)+50x=f(x-2)+50(x-1)+50x=\cdots f(x-k)+50\sum_{i=0}^{k-1}(x-i)\\
=f(x-k)+50kx-25k(k-1).$$
You need to know the value of $f(x-k)$ for some $x-k$. For example, if $f(0)=0$, you can deduce
$$f(k)=25k(k+1).$$
A: What you are trying to solve can be described as a recurrence relationship.
The notation usually used is $u_n=u_{n-1}+50n$,
so $u$ instead of your $y$ and $n$ instead of your $x$.
When $u_n=\lambda u_{n-1}$, the general solution is $u_n=A\lambda^n$.
When $u_n=\lambda u_{n-1}+p(n)$, the general solution is $u_n=A\lambda^n+q(n)$, with $p(n)$ and $q(n)$ being polynomials of the same order.
If, however, $\lambda=1$, then we take a slightly different approach. When $u_n=u_{n-1}$, the general solution is $u_n=A$.
When $u_n=u_{n-1}+p(n)$, the general solution is $u_n=q(n)$, with $q(n)$ being a polynomial of order $1$ greater than the order of $p(n)$.
In your specific case you have $u_n=u_{n-1}+50n$,
There is no need for a power or exponential term beacuse $\lambda = 1$.
So we know that $u_n$ will be a polynomial of order $2$ since your expression $50n$ is linear.
Take a "trial solution" $u_n=an^2+bn+c$.
This gives $u_{n-1}=a(n-1)^2+b(n-1)+c=an^2-2an+a+bn-b+c$.
Substituting these into $u_n=u_{n-1}+50n$ gives us:
$an^2+bn+c=an^2-2an+a+bn-b+c+50n$
A little manipulation gives: $0=-2an+a-b+50n$
Taking coefficients of $n$ gives $0=-2a+50\Rightarrow a=25$
Taking constant terms gives $0=a-b \Rightarrow a=b \Rightarrow b=25$
To find $c$ we need the initial condition that $u_0=0$.
So $0=0+0+c\Rightarrow c=0$
$u_n=25n^2+25n$
Or in your notation $y=25x^2+25x$.
