Greetings. Need help on this textbook question:

The tangent for an acute angle x, is m. Find cos2x.

Texbook answer : (1-m^2)/(1+m^2)

My answer:

cos2x = cos^2 - sin^2

= 1 - (sin^2 /cos^2 )

= 1 - tan^2

= 1 - m^2

Appreciate your help to clarify, thank you.

Best regards