Find dy for y = (sin x)/(2 cos²x) + dfrac12 ln |tan (x/2+
Find $dy$ for $y = \dfrac{\sin x}{2\cos^{2}x} + \dfrac12\ln\left|\tan\!\left(\dfrac{x}{2}+\dfrac{\pi}{4}\right)\right|$.
Explanation of Method
Two untidy terms whose sum is remarkably clean.
Step 1: Differentiate the first term
Quotient rule with numerator $\sin x$ and denominator $2\cos^{2}x$, whose derivative is $-4\cos x\sin x$: \[\frac{d}{dx}\left(\frac{\sin x}{2\cos^{2}x}\right) = \frac{\cos x\cdot 2\cos^{2}x - \sin x\cdot\bigl(-4\cos x\sin x\bigr)}{4\cos^{4}x} = \frac{2\cos^{2}x+4\sin^{2}x}{4\cos^{3}x}.\]
Dividing by $2$ and using $\cos^{2}x+2\sin^{2}x = 1+\sin^{2}x$: \[= \frac{\cos^{2}x+2\sin^{2}x}{2\cos^{3}x} = \frac{1+\sin^{2}x}{2\cos^{3}x}. \tag{1}\]
Step 2: A general rule for the second term
For any differentiable $u$, \[\frac{d}{dx}\left(\frac12\ln|\tan u|\right) = \frac12\cdot\frac{1}{\tan u}\cdot\frac{u'}{\cos^{2}u} = \frac{u'}{2\sin u\cos u} = \frac{u'}{\sin 2u}.\]
Step 3: Apply it with $u = \dfrac{x}{2}+\dfrac{\pi}{4}$
Here $u' = \tfrac12$ and $2u = x+\tfrac{\pi}{2}$, and $\sin\!\left(x+\tfrac{\pi}{2}\right) = \cos x$: \[\frac{d}{dx}\left(\frac12\ln\left|\tan\!\left(\frac{x}{2}+\frac{\pi}{4}\right)\right|\right) = \frac{1/2}{\cos x} = \frac{1}{2\cos x}. \tag{2}\]
Step 4: Add (1) and (2)
Put both over the common denominator $2\cos^{3}x$; the second term needs a factor $\cos^{2}x$: \[y' = \frac{1+\sin^{2}x}{2\cos^{3}x} + \frac{\cos^{2}x}{2\cos^{3}x} = \frac{1+\sin^{2}x+\cos^{2}x}{2\cos^{3}x} = \frac{2}{2\cos^{3}x} = \frac{1}{\cos^{3}x}.\]
Step 5: Verification
\[x = \frac{\pi}{4}:\quad \sec^{3}\frac{\pi}{4} = \bigl(\sqrt2\bigr)^{3} = 2\sqrt2 \approx 2.828427\]
\[\frac{y(\pi/4+10^{-4})-y(\pi/4-10^{-4})}{2\times10^{-4}} \approx 2.828427 \;\;\checkmark\]
\[x = 0:\quad y' = 1, \text{ and } y(0) = 0 + \tfrac12\ln\tan\tfrac{\pi}{4} = 0 \;\;\checkmark\]
Result
Final answer:
\[\boxed{\,dy = \dfrac{dx}{\cos^{3}x} = \sec^{3}x\,dx\,}\]
Remark
Remark. This problem is the standard integral formula read backwards:
\[ \int\sec^{3}x\,dx = \frac{\sin x}{2\cos^{2}x}+\frac12\ln\left|\tan\!\left(\frac{x}{2}+\frac{\pi}{4}\right)\right| + C. \]
Differentiating is the honest way to confirm such a formula, and the collapse of $1+\sin^{2}x+\cos^{2}x$ to $2$ is exactly where the two apparently unrelated terms lock together.