cos^2x+cos^2(3x)=1
Subtract cos^2x from both sides
cos^2(3x)=1-cos^2x
Using the Pythagorean Identity sin^2theta+cos^2theta=1,
1-cos^2x=sin^2x, therefore
cos^2(3x)=sin^2x
Subtract sin^2x from both sides
cos^2(3x)-sin^2x=0
Factor the left side using the difference of squares
(cos(3x)+sinx)(cos(3x)-sinx)=0
Time to find the value of x
Case 1: cos(3x)+sinx=0
Subtract sinx from both sides
cos(3x)="-"sinx
Since "-"sintheta=sin("-"theta),
"-"sinx=sin("-"x), therefore
cos(3x)=sin("-"x)
Since sintheta=cos(pi/2-theta) and cos(theta)=cos(theta+2npi),ninZZ,
sin("-"x)=cos(pi/2+x+2npi), therefore
cos(3x)=cos(pi/2+x+2npi)
Since costheta=cos("-"theta),
3x=pi/2+x+2npi or 3x=("-"pi)/2-x-2npi
Case 1.1: 3x=pi/2+x+2npi
Subtract x from both sides
2x=pi/2+2npi
Divide both sides by 2
color(blue)(x=pi/4+npi,ninZZ)
Case 1.2: 3x=("-"pi)/2-x-2npi
Add x to both sides
4x=("-"pi)/2-2npi
Divide both sides by 4
color(blue)(x=("-"pi)/8-(npi)/2,ninZZ)
Case 2: cos(3x)-sinx=0
Add sinx to both sides
cos(3x)=sinx
Since sintheta=cos(pi/2-theta) and cos(theta)=cos(theta+2npi),ninZZ,
sinx=cos(pi/2-x+2npi), therefore
cos(3x)=cos(pi/2-x+2npi)
Since costheta=cos("-"theta),
3x=pi/2-x+2npi or 3x=("-"pi)/2+x-2npi
Case 2.1: 3x=pi/2-x+2npi
Add x to both sides
4x=pi/2+2npi
Divide both sides by 4
color(blue)(x=pi/8+(npi)/2,ninZZ)
Case 2.2: 3x=("-"pi)/2+x-2npi
Subtract x from both sides
2x=("-"pi)/2-2npi
Divide both sides by 2
color(blue)(x=("-"pi)/4-npi,ninZZ)
Since n can be any integer, any term with "-"n can be replaced with n, so compiling everything gives
color(red)({x:x={:(pi/4+npi),(("-"pi)/8+(npi)/2),(pi/8+(npi)/2),(("-"pi)/4+npi):},ninZZ}) or equivalently color(red)({x:x=(npi)/8,n!=4m,ninZZ,m inZZ})