A fence 6 feet tall runs parallel to a tall building at a distance of 20 feet from the building. What is the length of the shortest ladder that will reach from the ground over the fence to the wall of the building?

Draw a diagram. Let

z = length of ladder
x = distance from fence to foot of ladder
θ = angle ladder makes with the ground
Then we have
tanθ = 6/x
cosθ = (x+20)/z
So,
z = (x+20)secθ = (x+20)√(1+(6/x)^2) = (x+20)/x * √(x^2+36)
dz/dx = (x^3-720)/(x^2 √(x^2+36))
dz/dx=0 when x=2∛90 ≈ 8.96
z=34.85 ft

To find the length of the shortest ladder that will reach from the ground over the fence to the wall of the building, we need to use the Pythagorean theorem.

The Pythagorean theorem states that in a right triangle, the square of the length of the hypotenuse (the side opposite the right angle) is equal to the sum of the squares of the other two sides.

In this case, the ladder forms the hypotenuse of a right triangle, while the fence and the distance from the fence to the wall form the other two sides.

Let's define the length of the ladder as "L", the height of the fence as "h", and the distance from the fence to the wall as "d".

Using the Pythagorean theorem, we can write the equation:

L^2 = h^2 + d^2

Substituting the given values into the equation, we have:

L^2 = 6^2 + 20^2
L^2 = 36 + 400
L^2 = 436

To find the length of the ladder, we take the square root of both sides:

L = √436

Using a calculator, we find that the square root of 436 is approximately 20.88.

Therefore, the length of the shortest ladder that will reach from the ground over the fence to the wall of the building is approximately 20.88 feet.