Query about differential equations involving projectiles. A projectile is launched at a speed $U$ at an angle $θ$ to the horizontal from $(x,y) = (0,0)$. Thereafter the projectile moves so that the second derivative of $X$ is $0$ and the second derivative of $Y$ is $-g$, where $g$ is the cceleration due to gravity. Calculate $x(t)$, $y(x)$ and $y$ as a function of $x$.
I integrated both $x$ and $y$
first derivative of $x = c_1$
$x = c_1t + c_2$  
first derivative of $y = -gt + c_3$
$y = -0.5gt^2 + c_3t + c_4$
From here I used that as $x=0$ and $y=0$ from when $t=0$, so therefore $c4=0$ and $c_2=0$. However here I am stuck as to what to do. I tried to let $y=0$ and find out $c_3$ but with no success
 A: If your initial velocity from the gun is v0, you need to divide up the components of that initial condition into vx0 and vy0. vx0 = v0 * cos(Θ) and vy0 = v0 * sin(Θ). Now c1 = vx0 and c3 = vy0. The initial positions c2=x0=0, and c4=y0=0 go away.
A: In order to fix the constant $c_1$, consider the first derivative of $x(t)$ (the velocity in the $x$-direction) at a time $t=0$; namely $x'(0)=c_1=U_x$. You can use the same approach to find $c_3$. Taking the first derivative of $y(t)$ (the velocity in the $y$-direction) at $t=0$ yields $y'(t)=c_3=U_y$.
The velocity you are given is the velocity along the angle $\theta$. In order to decompose it into the $x$-, and $y$-components, consider the right triangle with hypotenuse $U$. The two other sides are then $U_x=U\cos(\theta)$ and $U_y=U\sin(\theta)$. 
With what this and what you have already calculated, we have
\begin{align}
x(t)=U\cos(\theta)t, \ \ \text{and} \ \ \ y(t)=-\frac{gt^2}{2}+U\sin(\theta)t.
\end{align}
In order to find $y$ as a function of $x$, note that $x(t)=U\cos(\theta)t$ means that
\begin{align}
t = \frac{x}{U\cos(\theta)}.
\end{align}
Inserting into the expression for $y(t)$ yields
\begin{align}
y\big[x(t)\big] &= -\frac{g}{2}\left(\frac{x}{U\cos(\theta)}\right)^2+U\sin(\theta)\frac{x}{U\cos(\theta)} \\
&= -\frac{gx^2}{2U^2\cos^2(\theta)}+\tan(\theta)x
\end{align}
