Finding maximum radius of inscribed circle I am working through a pure maths text book as a hobby. I am having difficulty with the second half of this problem:
The equal sides AB and AC of an isosceles triangle have length a, and the angle A is denoted by $2 \theta$. Show that the radius of the inscribed circle of the triangle is given by $\frac {a \sin\theta \cos \theta}{1 + \sin \theta}$
Show that, if a is constant and $\theta$ varies between $0^\circ$ and $90^\circ$, the maximum value of r occurs when $\sin \theta = \frac{(\sqrt 5 - 1)}{2}$
I have solved the first part of the question. Now I need to differentiate $\frac {a \sin\theta \cos \theta}{1 + \sin \theta}$
Using the quotient formula I get this to be:
$\frac{dr}{d\theta} = \frac{(1 + \sin \theta)(a\cos^2\theta - a\sin^2\theta) - (a\sin \theta \cos\theta)\cos \theta}{(1 + \sin\theta)^2}$
But I cannot get this to equal the answer given.

HINT:
Let $$\frac{dr}{d\theta}=0$$
and then rewrite the numerator completely in terms of $\sin \theta$.
If you need any more help please don't hesitate to ask :)

EDIT:
As you correctly found, the numerator of the derivative is equal to
$$a(1-2\sin^2\theta-\sin^3\theta)$$
Hence, $$a(1-2\sin^2\theta-\sin^3\theta)=0$$
as when a fraction is equal to $0$ the denomiantor plays no part in making the fraction equal to $0$; the numerator must be equal to $0$. Now, assuming $a\ne0$, we can divide through by $a$ to obtain
$$1-2\sin^2\theta-\sin^3\theta=0\implies \sin^3\theta+2\sin^2\theta-1=0$$
Now we can simply verify that $\sin\theta=\frac{\sqrt5 -1}{2}$ is a solution the equation above, and we are done.
Alternatively, we can find this solution directly. Notice that substituting $\sin\theta=-1$ gives us $0$; hence by the factor theorem $(\sin\theta+1)$ is a factor of $\sin^3\theta+2\sin^2\theta-1$. Hence,
$$\sin^3\theta+2\sin^2\theta-1=(\sin\theta+1)(\sin^2\theta+\sin\theta-1)=0$$
Solving for the second factor we obtain the required solution. Notice that the other $2$ solutions are outside of the range of allowed solutions for $\theta$.
