I am searching for a solution for my problem concerning the trajectory of projectiles. I have the following formulas to calculate the $x$, $y$-coordinates at any given time:
\begin{align*} x &= (\text{velocity} \times \cos \alpha \times \text{time})+ \left( \frac{\text{wind}}{2} \times \text{time}^2 \right) \tag{1}\\ y &= (\text{velocity} \times \sin \alpha \times \text{time})+ \left( \frac{\text{gravity}}{2} \times \text{time}^2 \right)\tag{2} \end{align*}
This works perfectly good, now I would like to calculate from a certain point $(x,y)$ with a fixed angle $\alpha$. The required velocity,
$$\text{velocity} = \frac{x}{\cos \alpha} \times \left[ \frac{\text{gravity}}{2(x\tan \alpha - y)} \right]\tag{3}$$
This works if I set wind to zero, but as soon as it is greater/smaller, it doesn't work anymore. What am I missing in the last formula to get the right result with wind?