Question:medium

If \( y=\tan^{-1}\frac{\cos x+\sin x}{\cos x-\sin x} \), then find \( \frac{dy}{dx} \).

Show Hint

Divide top and bottom by \(\cos x\) and write the result as \(\tan\left(\frac{\pi}{4} + x\right)\). Then \(y = x + \frac{\pi}{4}\).
Show Solution

Solution and Explanation

Step 1: Plan:
I will differentiate directly with the chain rule instead of simplifying first. Let $u = \frac{\cos x + \sin x}{\cos x - \sin x}$, so $y = \tan^{-1} u$ and $\frac{dy}{dx} = \frac{1}{1 + u^2} \cdot \frac{du}{dx}$.

Step 2: Find du/dx by the quotient rule:
The derivative of the numerator $\cos x + \sin x$ is $-\sin x + \cos x = \cos x - \sin x$.
The derivative of the denominator $\cos x - \sin x$ is $-\sin x - \cos x = -(\cos x + \sin x)$.
\[ \frac{du}{dx} = \frac{(\cos x - \sin x)(\cos x - \sin x) + (\cos x + \sin x)(\cos x + \sin x)}{(\cos x - \sin x)^2} \]
Expand the top: $(\cos x - \sin x)^2 + (\cos x + \sin x)^2 = 2\cos^2 x + 2\sin^2 x = 2$.
\[ \frac{du}{dx} = \frac{2}{(\cos x - \sin x)^2} \]

Step 3: Find 1 + u^2:
\[ 1 + u^2 = \frac{(\cos x - \sin x)^2 + (\cos x + \sin x)^2}{(\cos x - \sin x)^2} = \frac{2}{(\cos x - \sin x)^2} \]

Step 4: Combine:
\[ \frac{dy}{dx} = \frac{(\cos x - \sin x)^2}{2} \cdot \frac{2}{(\cos x - \sin x)^2} = 1 \]
This agrees with the fact that $y = x + \frac{\pi}{4}$ on the principal branch.

Final Answer:
The derivative equals $1$. \[ \boxed{\frac{dy}{dx} = 1} \]
Was this answer helpful?
0