When y is a function of itself When playing around with equations, I've twice found myself in the dilemma where my dependent variable is dependent on itself. In the first instance of this occurring, I spent hours trying things but I concluded algebra could no longer help, so I used Microsoft excel to recursively apply the function for discrete values (small changes in $x$) and referred to the previous cell's value of the dependent variable. I was able to attain a solution this way. However, now that I've come across this problem again in a different context, I would like to understand a bit more about it and if it's possible to solve with math alone. Let me recount to you the dilemma I've had today:
Consider $\displaystyle v = \frac{Gmt}{r^2}$ where $v$ is the velocity of a small particle affected by the gravitation of a larger object, $G$ is the gravitational constant, $m$ is the mass of the larger object applying gravitation, $r$ is the distance between the two objects and $t$ is time.
The problem is $r$, which is both a function of time and velocity. But velocity is a function of $r$. Can you see my dilemma?
$$r = r_0-vt$$
where $r_0$ is the initial distance between the to objects (assume we know this value)
The aim here is to plot velocity as a function of time, but I can't even get a concrete function for velocity. Is there any mathematical techniques that can be applied to get velocity solely in terms of $t$? I've been staring at it for ages but I can't figure it out for the life of me. Am I going about this the wrong way, is it even possible to what am asking? If it's not possible, perhaps someone can explain to me exactly what's going on and just help me understand. Thank you, it's much appreciated.
(p.s I've not yet been to university so my mathematical background isn't strong. Perhaps the solution is obvious and for that I apologize, but please help if you can)
 A: You’re onto something, but your question seems a little confused. I’ll admit, this answer is also a little confused, and doesn’t actually answer your question. But hopefully it will shed some light.

It seems like you’re on the brink of differential calculus. I’ll try to reconstruct your scenario:
For a particle of mass $m$ at distance $x$ from a larger mass $M$, the force experienced is, as you say:
$$
F=\frac{GMm}{x^2}
$$
As $F=ma$, Dividing both sides by the particle’s mass gives us this
$$
a=\frac{GM}{x^2}
$$
which is a little more helpful. However, you cannot say $a=\frac{v}{t}$ and multiply by $t$ to get $v=\frac{GMt}{x^2}$, since that assumes acceleration is constant over time, but in this scenario it is changing. However, you can say $a=\frac{dv}{dt}$. Notice the difference; it is always true that acceleration is the instantaneous rate of change of velocity over time.
$$
\frac{dv}{dt}=\frac{GM}{x^2}
$$
The same relationship applies to velocity and distance over time; $v=\frac{dx}{dt}$.
$$
\frac{d\big(\frac{dx}{dt}\big)}{dt}=\frac{d^2x}{\color{#aaa}(dt\color{#aaa})^2}=\frac{GM}{x^2}
$$
This is a second-order nonlinear differential equation. Thinking of $x$ is a function in terms of $t$, we could try to solve for $x(t)$ using this equation, but it turns out to be shockingly complicated and not actually reducible to a solid form. Here’s a related question.
We can, however, solve for $v$, by doing some calculus. Starting with the equation before the last, we can apply the chain rule:
$$
\frac{dv}{dt}=\frac{dv}{dx}\times\frac{dx}{dt}=\frac{dv}{dx}\,v=\frac{GM}{x^2}
$$
Then, first separating the variables $v$ and $x$ to either side, we can integrate:
$$
\begin{align*}
v\,dv&=\frac{GM}{x^2}\,dx\\
\int v\,dv&=\int \frac{GM}{x^2}\,dx\\
\frac{1}{2}v^2&=-\frac{GM}{x}\\
\end{align*}
$$

But honestly, I really don’t know what I’m doing. Hopefully someone will be able to extend this answer (is that how it works?). Until then, think of this ‘answer’ as a super-long comment.
