sin^2(pi/8) + cos^2(3pi/8) + sin^2(5pi/8) + cos^(7pi/8)=(1-cos(pi/4))/2+(1+cos(3*pi/4))/2+(1-cos(5*pi/4))/2+(1+cos(7*pi/4))/2=1/2-cos(pi/4)/2+1/2+cos(3*pi/4)/2+1/2-cos(5*pi/4)/2+1/2+cos(7*pi/4)/2
=2-cos(pi/4)/2-cos(pi/4)/2+cos(pi/4)/2+cos(pi/4)/2=2.
sin^2(pi/8) + cos^2(3pi/8) + sin^2(5pi/8) + cos^(7pi/8)=(1-cos(pi/4))/2+(1+cos(3*pi/4))/2+(1-cos(5*pi/4))/2+(1+cos(7*pi/4))/2=1/2-cos(pi/4)/2+1/2+cos(3*pi/4)/2+1/2-cos(5*pi/4)/2+1/2+cos(7*pi/4)/2
=2-cos(pi/4)/2-cos(pi/4)/2+cos(pi/4)/2+cos(pi/4)/2=2.