We have a mini catapult that fires balls at a velocity of 5 m/s. It is placed 1 meter above the ground and pointed at an angle $\displaystyle \theta$ towards the positive x-axis. What angle(s) do we need to set it to in order to hit a target on the ground at x=2.7 meters?

In other words:

$\displaystyle v_{0}=5 m/s$

$\displaystyle x(t)=2.7 m$

$\displaystyle y(t)=-1 m$ (assuming the catapult is standing in the origin)

$\displaystyle \theta=?$

My thinking so far

First express the velocity in thex-direction andy-direction separately:

$\displaystyle v_{x}=v_{0}cos\theta $

$\displaystyle v_{y}=v_{0}sin\theta-gt$

Then find a way to expresstin terms of the angle and the positions:

$\displaystyle x(t)=\frac{v_{x}}{t}$

$\displaystyle t=\frac{v_{x}}{x(t)}=\frac{v_{0}cos\theta}{x(t)}$

Use what I now have to writeyas a function of theta:

$\displaystyle y(t)=v_{y}-\frac{1}{2}gt^2$

$\displaystyle y(t)=v_{0}sin\theta-gt-\frac{1}{2}gt^2$

$\displaystyle y(\theta)=v_{0}sin\theta-g(\frac{v_{0}cos\theta}{x(t)})-\frac{1}{2}g(\frac{v_{0}cos\theta}{x(t)})^2$

Since I know x, y and v, I should now be able to solve for theta.

Have I set this up correctly? Is there maybe an easier way to calculate the angle? And finally, if this is the best way to find it, how the hell do I solve for theta??