Solution:
Concept: The three Pythagorean identities hold for every angle A where the ratios exist: sin2A+cos2A=1, 1+tan2A=sec2A and 1+cot2A=cosec2A. Each can be rearranged, for example sec2A−tan2A=1 or 1−sin2A=cos2A.
Given: x=rcosAcosB, y=rcosAsinB and z=rsinA.
Step 1 — Start from the LHS.
We put the given values of x, y and z into x2+y2+z2:
LHS=r2cos2Acos2B+r2cos2Asin2B+r2sin2A
Step 2 — Take out r²cos²A from the first two terms.
The first two terms share the factor r2cos2A, and the bracket left is cos2B+sin2B=1:
LHS=r2cos2A(cos2B+sin2B)+r2sin2A=r2cos2A+r2sin2A
Step 3 — Take out r².
Now the bracket is cos2A+sin2A=1:
LHS=r2(cos2A+sin2A)=r2
This is the RHS.
Watch out: Use sin2+cos2=1 for angle B first, then for angle A; never mix the two angles.
Therefore, x2+y2+z2=r2. Hence shown.