1. Use the angle addition and subtraction formulas:
\(\tan(A \pm B) = \frac{\tan A \pm \tan B}{1 \mp \tan A \tan B}\)
2. Apply the formulas:
\(\tan(\theta + 45^\circ) = \frac{\tan \theta + 1}{1 - \tan \theta}\)
\(\tan(\theta - 45^\circ) = \frac{\tan \theta - 1}{1 + \tan \theta}\)
3. Substitute into the equation:
\(\frac{\tan \theta + 1}{1 - \tan \theta} - 2 \left(\frac{\tan \theta - 1}{1 + \tan \theta}\right) = 4\)
4. Simplify and solve for \(\tan \theta\):
Multiply through by \((1 - \tan \theta)(1 + \tan \theta)\):
\((\tan \theta + 1)(1 + \tan \theta) - 2(\tan \theta - 1)(1 - \tan \theta) = 4(1 - \tan^2 \theta)\)
5. Simplify further:
\(\tan^2 \theta + 2\tan \theta + 1 - 2(\tan^2 \theta - 1) = 4 - 4\tan^2 \theta\)
\(\tan^2 \theta + 2\tan \theta + 1 - 2\tan^2 \theta + 2 = 4 - 4\tan^2 \theta\)
6. Rearrange to form a quadratic equation:
\(7\tan^2 \theta - 2\tan \theta - 1 = 0\)
7. Solve the quadratic equation using the quadratic formula:
\(\tan \theta = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\)
where \(a = 7, b = -2, c = -1\).
8. Calculate:
\(\tan \theta = \frac{2 \pm \sqrt{(-2)^2 - 4 \times 7 \times (-1)}}{2 \times 7}\)
\(\tan \theta = \frac{2 \pm \sqrt{4 + 28}}{14}\)
\(\tan \theta = \frac{2 \pm \sqrt{32}}{14}\)
\(\tan \theta = \frac{2 \pm 4\sqrt{2}}{14}\)
\(\tan \theta = \frac{1 \pm 2\sqrt{2}}{7}\)
9. Find \(\theta\) using \(\tan^{-1}\):
\(\theta = 28.7^\circ\) and \(\theta = 165.4^\circ\).