Throwing a Projectile in 2D space Normally I am strong at maths, but here I have a Math question that after spending 5 pages, I just can't figure it out. Here goes:
A person is playing a game that requires throwing an object onto a ledge. The ledge is a distance $d$ and a height $\frac{d}{2}$ above the release point. You may neglect air resistance. You may use $g$ for the magnitude of the gravitational acceleration (i.e. $g=9.81 \text{m}/\text{s}$).

(a) At what angle must the person throw the object and with what magnitude of the velocity if the object is to be exactly at the top of its flight when it reaches the ledge? Express your answer for the speed in terms of the given quantities $d$ and $g$, as needed. For the angle, enter the numerical answer in degrees.
In short, I need to give a formula of the object's speed at $t=0$, and write this formula in terms of $d$ and $g$, only. I also must provide a single, numeric angle, which apparently is a static number.
Help...
 A: You can split into horizontal and vertical components.
Do vertical first, because that contains the constraint. The initial vertical component of the velocity is $v_0\sin\theta_0$ measuring upwards as positive and the vertical velocity at time $t$ is therefore $v_v(t)=v_0\sin\theta_0-gt$.
The rock lands on the ledge when $v_v(t)=0$, which is when $t=\frac {v_0}g\sin \theta_0$.
You now know the time taken. The vertical distance travelled is $$\frac d2=v_0t\sin \theta_0-\frac 12gt^2=\frac {v_0^2}g\sin^2\theta_0-\frac 12 \frac {v_0^2}g \sin^2\theta_0=\frac 12 \frac {v_0^2}g \sin^2\theta_0$$Another way of getting the same result more quickly is to equate in initial kinetic energy with final potential energy (taking the vertical component, since the horizontal component does not change).
Then horizontally we have $d=v_0t \cos \theta_0=\frac {v_0^2}g\cos \theta_0\sin\theta_0$ - though we could have saved time on the vertical component by using the energy equation, we still need to compute the time taken to plug into the horizontal equation.
The two expressions for $d$ are enough to find $\theta_0$, and then this can be fed back in to find $v_0$.
