#"The Expression"=(cos3theta+2cos5theta+cos7theta)/(costheta+2cos3theta+cos5theta)#.
#"The Nr."=(cos3theta+2cos5theta+cos7theta)#
#=(cos7theta+cos3theta)+2cos5theta#,
#=2cos((7theta+3theta)/2)cos((7theta-3theta)/2)+2cos5theta#,
#=2cos5thetacos2theta+2cos5theta#,
#:." The Nr."=2cos5theta(cos2theta+1)#.
#"On similar lines the Dr."=2cos3theta(cos2theta+1)#.
#:."The Exp."=(cos5theta)/(cos3theta)#,
#={cos(3theta+2theta)}/(cos3theta)#,
#={cos3thetacos2theta-sin3thetasin2theta}/(cos3theta)#,
#=(cos3thetacos2theta)/(cos3theta)-(sin3thetasin2theta}/(cos3theta)#,
#=cos2theta-(sin2theta){(sin3theta)/(cos3theta)}#,
#=cos2theta-sin2theta*tan3theta#, as desired!