The following .nb file is simply Newton’s equation for gravity after being integrated to obtain a related differential equation.
To obtain the new equation, one simply takes:
y" = k/y^2
Multiply by y’ then integrate from 0 to t:
y’[t]^2/2-y’[0]^2/2 = -k/y[t]+k/y[0]
My real issue arises in that whenever I have y[0] (or y’[0]) in a differential equation, it returns an error that I don’t know how to clear up. I’d rather be able to leave y’[0] and y[0] in the equation instead of renaming them a or b.
looking at the error msg, I’d say that having y’[0] in the differential equation looks like a different functional dependence. You may have to rename them.
Your second version of the problem does not make sense. I can’t understand how it follows from the first equation and besides, Its a first order ODE so you can only specify one initial condition (y[0]==0). You can’t specify y’[0] because the differential equation is for y’[t]. To integrate the second equation (assuming it had some physical meaning) the proper formulation in MMA would be as follows (since y’[0] ==0 there can be no y’[0] term)