Answer: Height of tree = 26 ft
Make a triangle ABC with 40 degrees angle. The shadow is the base of the triangle equals 31 feet.
Base = AC = 31
Perpendicular = CB = ?
Hypotenuse = AB
Using trigonometric equation
tan 40 (deg) = CB / AC
CB = Tan 40 x AC
CB = 0.83909 x 31
CB = 26.011
Thus the height of the tree = 26 ft