'Substitute factor by ratio in maxima expression

I have this expression in maxima:

a^2/sqrt((a*cos(φ))^2+(b*sin(φ))^2)

Can I have maxima rewrite it in terms of a factor times a/b?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source