Find y' for y = tan x - cot x
Find $y'$ for $y = \tan x - \cot x$.
Explanation of Method
Combine two standard derivatives and simplify with trigonometric identities.
Step 1: Recall the standard derivatives
\[ (\tan x)' = \frac{1}{\cos^{2} x}, \qquad (\cot x)' = -\frac{1}{\sin^{2} x}. \]
The first was derived in Problem 16; the second follows the same way from $\cot x = \dfrac{\cos x}{\sin x}$.
Step 2: Differentiate term by term
Subtracting a function with a negative derivative produces a sum: \[y' = \frac{1}{\cos^{2} x} - \left(-\frac{1}{\sin^{2} x}\right) = \frac{1}{\cos^{2} x} + \frac{1}{\sin^{2} x}.\]
Step 3: Combine over a common denominator
Using $\sin^{2}x + \cos^{2}x = 1$: $y' = \frac{\sin^{2} x + \cos^{2} x}{\sin^{2} x\,\cos^{2} x} = \frac{1}{\sin^{2} x\,\cos^{2} x}$.
Step 4: Simplify with the double-angle identity
From $\sin 2x = 2\sin x\cos x$ we get $\sin^{2}x\cos^{2}x = \dfrac{\sin^{2} 2x}{4}$, hence
\[ y' = \frac{4}{\sin^{2} 2x}. \]
Step 5: Verification
\[x = \frac{\pi}{4}:\quad \frac{1}{\cos^{2}(\pi/4)} + \frac{1}{\sin^{2}(\pi/4)} = 2 + 2 = 4\]
\[x = \frac{\pi}{4}:\quad \frac{4}{\sin^{2}(\pi/2)} = \frac{4}{1} = 4 \;\;\checkmark\]
The two forms agree. At $x = \tfrac{\pi}{4}$ the function itself vanishes, since $\tan\tfrac{\pi}{4} = \cot\tfrac{\pi}{4} = 1$.
Result
Final answer:
\[\boxed{\,y' = \dfrac{1}{\cos^{2} x} + \dfrac{1}{\sin^{2} x} = \dfrac{4}{\sin^{2} 2x}, \qquad x \neq \frac{k\pi}{2},\; k \in \mathbb{Z}\,}\]
Remark
Remark. A shorter route notes that $\tan x - \cot x = -2\cot 2x$, whose derivative is $-2\cdot\left(-\dfrac{2}{\sin^{2}2x}\right) = \dfrac{4}{\sin^{2}2x}$. Since $y' \geq 4 \gt 0$, the function is strictly increasing on every interval between consecutive multiples of $\tfrac{\pi}{2}$.