For the differential equation in given question find the general solution.
dydx=1−cosx1+cosx
Given, dydx=1−cosx1+cosx
On separating the variables and integrating, we get
∫dy=∫1−cosx1+cosxdx⇒y=∫2sin2(x/2)2cos2(x/2)dx [∵1−cosx=2sin2(x/2) and 1+cosx=2cos2(x/2)]⇒y=∫tan2(x/2)dx (∵1+tan2x2=sec2x2)⇒y=∫(sec2(x/2)−1)dx⇒y=∫sec2(x/2)dx−∫1dx⇒y=2tanx2−x+C. (∵∫sec2xdx=tanx)
which is the required general solution.