1. integrals of trigonometric functions

a thief tries to enter a building by placing a ladder over a 9-ft-high fence so it rests against the building,which is 2 ft back from the fence.

what is the length f the shortest ladder and the ground? (let Q be the angle between the ladder and the ground) express the length of the ladder in terms of Q,

and then find the value of Q that minimizes the length of the ladder.

2. let $\displaystyle x$ = distance from foot of the ladder to the fence

$\displaystyle f\cos{Q} = x+2$

$\displaystyle \cot{Q} = \frac{x}{9}$

$\displaystyle f\cos{Q} = 9\cot{Q} + 2$

$\displaystyle f = 9\csc{Q} + 2\sec{Q}$

find $\displaystyle \frac{df}{dQ}$ and minimize $\displaystyle f$

3. after I find out the derivetive, how can I minimize the f? let that equals to 0,but I don't know how to solve the value for Q

4. $\displaystyle f = 9\csc{Q} + 2\sec{Q}$

$\displaystyle \frac{df}{dQ} = -9\csc{Q}\cot{Q} + 2\sec{Q}\tan{Q} = 0$

$\displaystyle \frac{-9\cos{Q}}{\sin^2{Q}} + \frac{2\sin{Q}}{\cos^2{Q}} = 0$

$\displaystyle \frac{-9\cos^3{Q}}{\sin^2{Q}\cos^2{Q}} + \frac{2\sin^3{Q}}{\sin^2{Q}\cos^2{Q}} = 0$

$\displaystyle -9\cos^3{Q} + 2\sin^3{Q} = 0$

$\displaystyle 9\cos^3{Q} = 2\sin^3{Q}$

$\displaystyle \frac{9}{2} = \frac{sin^3{Q}}{\cos^3{Q}}$

$\displaystyle \frac{9}{2} = \tan^3{Q}$

$\displaystyle \sqrt[3]{\frac{9}{2}} = \tan{Q}$

$\displaystyle Q = \arctan\left(\sqrt[3]{\frac{9}{2}}\right)$

$\displaystyle Q \approx 58.8^{\circ}$

now go back and determine the length of the ladder.