If gravity force of earth is $mg$:
- if positive y is pointing upwards, then: $m\vec a = -mg\hat y$ and $\ddot y = -g$
- if positive y is pointing down, then: $m\vec a = mg\hat y$ and $\ddot y = g$
If you assume force is $mgy$:
if positive y is pointing upwards, then: $m\ddot y = -mgy$ and $\ddot y = -gy$
if positive y is pointing down, then: $m\ddot y = mgy$ and $\ddot y = gy$
Solving the (3) and (4) differential eqs end up having completely different trajectories((3) with $c_1cos(\sqrt{2g}t)$ while (4) with $Ae^{\sqrt{g}t} + Be^{-\sqrt{g}t}$ which shouldn't be the case. There seems to be a flaw in (3) or (4), but no idea what.