Hello Vicky1997

This is quite tricky - I've been puzzling over it for some time. But I have a solution - and it agrees with the one you've been given.

In the attached diagram, I have called the length of $\displaystyle AC, x$ cm, and I've drawn the perpendiculars from $\displaystyle C$ and $\displaystyle M$ (the mid-point of $\displaystyle BC$) to $\displaystyle AB$, meeting it at $\displaystyle E$ and $\displaystyle D$.

Here's my solution.

The Cosine Rule on $\displaystyle \triangle ABC$ gives:$\displaystyle AB^2 = x^2-4x+16$ (1)

The area of $\displaystyle \triangle ABC$ can be written in two ways, using the formulae $\displaystyle \tfrac12AC.BC\sin \angle ACB$ and $\displaystyle \tfrac12AB.EC$. This gives:$\displaystyle \tfrac124x\sin60^o=\sqrt3x=\tfrac12AB.EC$

$\displaystyle \Rightarrow EC = \frac{2\sqrt3x}{AB}$

$\displaystyle \Rightarrow DM = \frac{\sqrt3x}{AB}$, using the similar triangles $\displaystyle BMD, BCE$ (2)

Next, using Pythagoras on $\displaystyle \triangle BMD$:$\displaystyle DB^2=MB^2-DM^2$$\displaystyle = 4 - \frac{3x^2}{AB^2}$, from (2)

$\displaystyle = \frac{4AB^2-3x^2}{AB^2}$

$\displaystyle =\frac{x^2-16x+64}{AB^2}$, from (1)

$\displaystyle =\frac{(8-x)^2}{AB^2}$

$\displaystyle \Rightarrow DB = \frac{8-x}{AB}$ (3)

You'll see that I've taken this sign, rather than $\displaystyle (x-8)$, since $\displaystyle x>8$ will clearly not maximise the value of $\displaystyle \tan\theta$.

Now:$\displaystyle AD = AB-DB$

$\displaystyle = \frac{AB^2-(8-x)}{AB}$, from (3)

$\displaystyle =\frac{x^2-3x+8}{AB}$, from (1)

and:$\displaystyle \tan\theta = \frac{MD}{AD}$$\displaystyle = \frac{\sqrt3x}{x^2-3x+8}$ (4)

All the hard work is done now. It's a simple matter to differentiate this function, and equate the result to zero for a maximum or minimum. When you do this, the result simplifies to:$\displaystyle -x^2+8=0$

$\displaystyle \Rightarrow x = 2\sqrt2$

You can check that this gives a maximum value of $\displaystyle \tan\theta$, and that value, from (4), is:$\displaystyle \frac{2\sqrt2\sqrt3}{8-6\sqrt2+8}$$\displaystyle =\frac{\sqrt3}{4\sqrt2-3}$

Grandad