Answer:
16.65 ft
Explanation:
You want the length of the shortest ladder that will reach from the ground to a building over an 8 ft fence at a distance of 4 ft from the building.
Trig relations
We recall that the trig relations in a right triangle are ...
Sin = Opposite/Hypotenuse ⇒ Hypotenuse = Opposite/Sin
Cos = Adjacent/Hypotenuse ⇒ Hypotenuse = Adjacent/Cos
Ladder length
In the model attached, the ladder (GH) makes angle α with the ground. The above relations tell us the ladder length is ...
GH = GC +CH
GH = 8/sin(α) +4/cos(α)
Using the reciprocal trig relations, this becomes ...
GH = 8·csc(α) +4·sec(α)
Minimum
The minimum length of the ladder corresponds to the value of α that makes the derivative of GH with respect to α be zero.
GH' = -8·cos(α)csc(α)² +4·sin(α)sec(α)² = 0
Dividing by 4·cos(α)csc(α)², we get
tan(α)³ -2 = 0
α = arctan(∛2) ≈ 51.56095°
The length of the shortest ladder is then ...
GH = 8·csc(51.56095°) +4·sec(51.56095°) ≈ 16.65 . . . . feet
The shortest ladder that will reach is 16.65 feet long.
__
Additional comments
In the second attachment, the horizontal axis is degrees of angle α, and the vertical axis is feet of length GH. The calculator is set to degrees mode.
The derivatives of the trig functions can be found from a suitable table, or by using the power rule with the derivatives of the primary sin and cos functions.
We can divide by cos(α)csc(α)² because we know it is not zero for the angle of interest. The value 2 in the tangent formula is h/d, where the fence is h units high and d units from the building. You will notice the length expression is h·csc(α)+d·sec(α). This is a generic solution for this sort of problem.
The problem can be worked using similar triangles and the Pythagorean theorem. This seems easier. The solution in most cases will be irrational, involving cube roots at some point.