Question: If one root of the equation $x^2 + px + 12 = 0$ is $4$, while the equation $x^2 + px + q = 0$ has equal roots, then $q =$
If the roots of $x^2 + px + q = 0$ are $\tan 30^\circ$ and $\tan 15^\circ$, then $2 + q - p =$
1. **Problem 1:** Given one root of $x^2 + px + 12 = 0$ is $4$, find $q$ if $x^2 + px + q = 0$ has equal roots.
2. Since $4$ is a root of $x^2 + px + 12 = 0$, substitute $x=4$:
$$4^2 + p(4) + 12 = 0 \implies 16 + 4p + 12 = 0$$
3. Simplify:
$$4p + 28 = 0 \implies 4p = -28 \implies p = -7$$
4. For $x^2 + px + q = 0$ to have equal roots, the discriminant must be zero:
$$\Delta = p^2 - 4q = 0$$
5. Substitute $p = -7$:
$$(-7)^2 - 4q = 0 \implies 49 - 4q = 0$$
6. Solve for $q$:
$$4q = 49 \implies q = \frac{49}{4}$$
---
7. **Problem 2:** Roots of $x^2 + px + q = 0$ are $\tan 30^\circ$ and $\tan 15^\circ$. Find $2 + q - p$.
8. Recall:
$$\tan 30^\circ = \frac{1}{\sqrt{3}}$$
$$\tan 15^\circ = 2 - \sqrt{3}$$
9. Sum of roots $= -p$:
$$\tan 30^\circ + \tan 15^\circ = -p$$
Calculate sum:
$$\frac{1}{\sqrt{3}} + (2 - \sqrt{3}) = \frac{1}{\sqrt{3}} + 2 - \sqrt{3}$$
10. Product of roots $= q$:
$$\tan 30^\circ \times \tan 15^\circ = q$$
Calculate product:
$$\frac{1}{\sqrt{3}} \times (2 - \sqrt{3}) = \frac{2 - \sqrt{3}}{\sqrt{3}}$$
11. Simplify product:
Multiply numerator and denominator by $\sqrt{3}$:
$$q = \frac{(2 - \sqrt{3})\sqrt{3}}{3} = \frac{2\sqrt{3} - 3}{3}$$
12. Now compute $2 + q - p$:
Recall $p = -$(sum of roots), so:
$$p = -\left(\frac{1}{\sqrt{3}} + 2 - \sqrt{3}\right) = -\frac{1}{\sqrt{3}} - 2 + \sqrt{3}$$
Therefore:
$$2 + q - p = 2 + q - p = 2 + \frac{2\sqrt{3} - 3}{3} - \left(-\frac{1}{\sqrt{3}} - 2 + \sqrt{3}\right)$$
$$= 2 + \frac{2\sqrt{3} - 3}{3} + \frac{1}{\sqrt{3}} + 2 - \sqrt{3}$$
$$= (2 + 2) + \frac{2\sqrt{3} - 3}{3} + \frac{1}{\sqrt{3}} - \sqrt{3}$$
$$= 4 + \frac{2\sqrt{3} - 3}{3} + \frac{1}{\sqrt{3}} - \sqrt{3}$$
13. Combine terms with $\sqrt{3}$:
Rewrite $\frac{1}{\sqrt{3}}$ and $-\sqrt{3}$ with common denominator $3$:
$$\frac{1}{\sqrt{3}} = \frac{\sqrt{3}}{3}$$
$$-\sqrt{3} = -\frac{3\sqrt{3}}{3}$$
Sum these:
$$\frac{\sqrt{3}}{3} - \frac{3\sqrt{3}}{3} = -\frac{2\sqrt{3}}{3}$$
14. Now sum all:
$$4 + \frac{2\sqrt{3} - 3}{3} - \frac{2\sqrt{3}}{3} = 4 + \frac{2\sqrt{3} - 3 - 2\sqrt{3}}{3} = 4 + \frac{-3}{3} = 4 - 1 = 3$$
**Final answers:**
- For the first problem, $q = \frac{49}{4}$.
- For the second problem, $2 + q - p = 3$.