求另一根
由兩根之積找出另一根
二次方程式的常數項是 $1$,表示兩根相乘等於 $1$,已知一根就能寫出另一根。
方程式 $x^2 - (\tan\theta + \cot\theta)x + 1 = 0$ 的常數項為 $1$,所以兩根之積為 $1$。設已知的一根為 $x_1 = 2 + \sqrt{3}$,另一根為 $x_2$,則
$$x_2 = \frac{1}{2 + \sqrt{3}} = 2 - \sqrt{3}$$
由根和列式
由兩根之和得到 $\tan\theta$ 的方程式
兩根之和就是一次項係數的相反數,也就是題目裡的 $\tan\theta + \cot\theta$。
兩根之和為
$$\tan\theta + \cot\theta = (2 + \sqrt{3}) + (2 - \sqrt{3}) = 4$$
把 $\cot\theta$ 寫成 $\frac{1}{\tan\theta}$
$$\tan\theta + \frac{1}{\tan\theta} = 4$$
兩邊同乘 $\tan\theta$ 並移項
$$\tan^2\theta - 4\tan\theta + 1 = 0$$
解式並取捨
解出並依範圍取捨
兩個解都是正數,要用 $\theta$ 的範圍決定取哪一個。
由公式解
$$\tan\theta = \frac{4 \pm \sqrt{16 - 4}}{2} = \frac{4 \pm \sqrt{12}}{2} = 2 \pm \sqrt{3}$$
因為 $0 < \theta < \frac{\pi}{4}$,此範圍內 $0 < \tan\theta < 1$。而 $2 + \sqrt{3} > 1$ 不合,$2 - \sqrt{3} < 1$ 合用,所以
$$\tan\theta = 2 - \sqrt{3}$$