The general solution of sinx=cosx is (when n∈ℤ) given by
nπ+π4
2nπ±π4
nπ±π4
nπ-π4
Find the general solution
Given, sinx=cosx
We know that, x=x when x≥0 and x=-x when x<0
Similarly,
sinx=sinx when x∈0,π and sinx=-sinx when x∈π,2π
Now,x∈0,π
sinx=cosx
⇒tanx=1
⇒tanx=tanπ4
⇒x=nπ+π4,n∈Z
When x∈(π,2π)
-sinx=cosx
⇒-tanx=1
⇒tanx=-1
⇒tanx=-tanπ4⇒tanx=tanπ–π4⇒x=nπ+3π4,n∈Z
Combining both the equations, we get
The general solution is x=2nπ±π4
Hence, option (B) is the correct answer.