Ignoring air resistace, I have that the height of our canon is $8.2$m and the height of the target is $6.34$m. And that our initial veocity $v_0=18$m/s. I have to determine a way to find the angle required to hit this target.
My work: We have our initial position $(0, 8.2)$ and target is at $(x,6.4)$
The component of the initial velocities would be $$v_{0x}=v_0\cos\theta\\v_{0y}=v_0\sin\theta$$
we also have that $$x=x_0+v_{0x}t\\ y = y_0+v_{0y}t+\frac{1}{2}a_yt^2$$
Where $a_y=-g$ so we have a height function $$S(t) = S_0+v_{0y}t-\frac{1}{2}gt^2$$. I also know that the range is given by $R=\frac{v_0^2\sin 2\theta}{g}$ We can find an expression for $t$ from the $x$ position equation which gives us $t=\frac{x}{v_0\cos\theta}$ Knowng all of this we see that $$S(t) = S_0+x\tan\theta -\frac{gx^2}{2v_0^2\cos^2\theta}$$ we have two unknowns now, namely $x,\theta$. So since the range is given by $R=\frac{v_0^2\sin 2\theta}{g}$ our target will be in $R$ so we have that $x=R$, then we get
$$S(t)=S_0+\left(\frac{v_0^2\sin 2\theta}{g}\right)\left(\frac{\sin\theta}{\cos\theta}\right)-\left(\frac{g}{2v_0^2\cos^2\theta}\right)\left(\frac{v_0^2\sin 2\theta}{g}\right)^2\\= S_0+\left(\frac{2v_0^2\sin \theta\cos\theta}{g}\right)\left(\frac{\sin\theta}{\cos\theta}\right)-\left(\frac{g}{2v_0^2\cos^2\theta}\right)\left(\frac{2v_0^2\sin \theta\cos\theta}{g}\right)^2$$
but now we see that they cancel eachother out, this is where I don't know how to continue, is it wrong to say that $x=R$? I need to know what $x$ is in order to find $\theta$. It also says in the problem that we need to make sure that the target is reasonably far away from the cannon