Then tan(y)=(cosx−sinxcos+sinx)
We know that sinπ4 = cosπ4 = 1√2
Multiplying numerator and denominator with 1√2
Therefore, tany=sinπ4cosx−cosπ4sinxcosπ4cosx+sinπ4sinx
Using the formulae, sin(A−B)=sinAcosB−cosAsinB and cos(A−B)=cosAcosB+sinASinB,
tany=sin(π4−x)cos(π4−x) = tan(π4−x)
Therefore principal value of y=tan−1tan(π4−x)
Principal value of tan−1 must lie in (−π2,π2).
Therefore π4−x must lie in (−π2,π2).
−π2<π4−x<π2
−3π4<−x<π4
3π4>x>−π4
It is given that 0<x<π
Hence for 0<x<3π4
y=π4−x