## Task B-2.3.

Given is the equation $x^{2}-p x+q=0$, where $p$ and $q$ are positive real numbers. If the difference between the solutions of the equation is 1, and the sum of the solutions is 2, calculate $p$ and $q$.
## First Solution.

According to Vieta's formulas, $x_{1}+x_{2}=p, x_{1} \cdot x_{2}=q$, and according to the conditions of the problem,

$$
\begin{array}{r}
x_{1}+x_{2}=2 \\
\left|x_{1}-x_{2}\right|=1
\end{array}
$$

from which it follows that $p=2$.

$$
\begin{aligned}
\left|x_{1}-x_{2}\right| & =\sqrt{\left(x_{1}-x_{2}\right)^{2}}=\sqrt{\left(x_{1}+x_{2}\right)^{2}-4 x_{1} \cdot x_{2}} \\
1 & =\sqrt{4-4 q} \\
q & =\frac{3}{4}
\end{aligned}
$$

## Note:

The difference in solutions can also be obtained by direct substitution into the formula for the solutions of a quadratic equation:

$$
\begin{aligned}
& \left|x_{1}-x_{2}\right|=\left|\frac{-b+\sqrt{D}}{2}-\frac{-b-\sqrt{D}}{2}\right|=|\sqrt{D}| \quad \Rightarrow \quad D=1 \\
& 4-4 q=1 \\
& q=\frac{3}{4}
\end{aligned}
$$

Note that the absolute value is not used even if it is not applied.