square root(a^2 -u^2) where a>0, let u=(a sinx) where -pi/2<x<pi/2

answer is (a cosx) and I don't know how to get there

√(a^2 -u^2) where u = asinx

= √(a$ - a^2(sinx)^2)
= √(a^2(1 - (sinx)^2)
= a√(cosx)^2
= a cos x