\(\frac{dy}{dx} = \frac{1-\cos x}{1+\cos x}\)
Show solutionHide solution
We are given \(\frac{dy}{dx}=\frac{1-\cos x}{1+\cos x}\). The expression is defined when \(1+\cos x\neq0\), that is, \(x\neq(2k+1)\pi\) for \(k\in\mathbb Z\).
On any interval avoiding these points, use the half-angle identities:
\[\frac{1-\cos x}{1+\cos x}=\frac{2\sin^2(x/2)}{2\cos^2(x/2)}=\tan^2\frac{x}{2}.\]Hence\[\frac{dy}{dx}=\tan^2\frac{x}{2}.\]Integrating,\[y=\int \tan^2\frac{x}{2}\,dx=\int\left(\sec^2\frac{x}{2}-1\right)\,dx=2\tan\frac{x}{2}-x+C,\]where \(C\) is an arbitrary real constant.Therefore the general solution, valid on any interval not containing \(x=(2k+1)\pi\), is
\[\boxed{y=2\tan\frac{x}{2}-x+C,\qquad x\neq(2k+1)\pi,\ k\in\mathbb Z.}\]Verification: \(\frac{d}{dx}\left(2\tan\frac{x}{2}-x+C\right)=\sec^2\frac{x}{2}-1=\tan^2\frac{x}{2}=\frac{1-\cos x}{1+\cos x}\), so the solution is correct.