Related rates (Pythagorean theorem)