A person attempts to throw a ball over a wall of height $5m$ that is $12m$ away. It is thrown at a speed of $u ms^{-1}$ from a height of $2m$ at an angle $θ$ to the horizontal. Gravity is $10 ms^{-2}$ for this question.
(i) If the ball just clears the wall, use the cartesian equation of trajectory to find an expression of $u^2$ in terms of $tanθ$.
For this part, I have the general equation of $u^2 = {-gx^2(1+tan^2θ)\over 2(y-xtanθ)}$ but I'm not sure what numbers to input for $x$ and $y$? I assume $x = 12$ but do I put $y = 3$ as it is $3m$ above the starting point of $2m$ or $y = 5$ as the coordiate would be at $5m$?
(ii) Find $u$ when $θ = 45°$.
I think this is easy enough provided I have the right formula for part (i), but I'm not certain what that would be?
(iii) By differentiating a multiple of $u^2$, or otherwise, find the minimum speed at which the ball can be thrown, in order for the wall to be cleared, and the angle at which it must be thrown.
This part is where I'm just completely stuck - I'm not even sure where to begin! Please help!
On the x-axis: $x=u_x(0)\cdot t=u\cdot \cos(\theta)\cdot t$
On the y-axis: $y=y_0+u_y(0)\cdot t-\frac{g\cdot t^2}{2}$
Solve for t in first equation: $t=\frac{x}{u\cos(\theta)}$
Replace in the second equation: $y=y_0+u\sin(\theta)\cdot \frac{x}{u\cos(\theta)}-\frac{g\left(\frac{x}{u\cos(\theta)}\right)^2}{2}$
Simplify and separate terms: $y-y_0=x\tan(\theta)-\frac{gx^2(1+\tan^2(\theta)}{2u^2}$
Solve for $u^2$: $u^2=\frac{gx^2(1+tan^2(\theta)}{2[x\tan(\theta)-(y-y_0)]}, x=12, y=5, y_0=2, g=10$
As you see my formula is a bit more complex than yours. Let me know if you need extra explaining so far.
Now to the differentiating part.
$$u(\theta)=x\sqrt{\frac{g}{2}}\cdot \sqrt{\frac{1+\tan^2(\theta)}{x\tan(\theta)-h}}, h=y-y_0$$
$$u'(\theta)=0\Rightarrow\sqrt{x\tan(\theta)-h}\cdot [2\tan(\theta)(x\tan(\theta)-h)-(1+\tan^2(\theta))\cdot x]=0$$
$$x\tan^2(\theta)-2h\tan(\theta)-x=0$$
$$tan(\theta)=\frac{h\pm \sqrt{h^2+x^2}}{x}, \tan(\theta)\gt 0$$
$$\tan(\theta)=\frac{3+ \sqrt{3^2+12^2}}{12}=\frac{1+\sqrt{17}}{4}, \theta\approx 52^\circ$$ The minimal value of velocity is $u=12\sqrt{\frac{10}{2}}\cdot \sqrt{\frac{1+\left(\frac{1+\sqrt{17}}{4}\right)^2}{12\cdot \frac{1+\sqrt{17}}{4}-3}}\approx 12.4 \frac{m}{s}$
Please do your own calculations. Let me know if you find any discrepancies.