Solve the following two equations:

$$
\begin{aligned}
& \sqrt{(x-1)(x-2)}+\sqrt{(x-3)(x-4)}=\sqrt{2} \\
& \sqrt{(x-p-q)(x-p+q)}+\sqrt{(x-r-q)+(x-r+q)}=\sqrt{(p-r)(p-r)(p-r+2q)}
\end{aligned}
$$
a) Our equation on the left side has no (real) meaning if any of the square root symbols have a negative number under them. This only happens if either the factor pair $x-1, x-2$ or $x-3, x-4$ has opposite signs, meaning if $x$ falls between 1 and 2, or between 3 and 4: $1<x<2$, or $3<x<4$. - Moving the second term of our first equation to the right side, and then squaring both sides of the equation,

\[
x^{2}-3 x+2=2-2 \sqrt{2(x-3)(x-4)}+x^{2}-7 x+12
\]

Leaving only the square root expression on the right side, and squaring again and rearranging,

\[
\begin{gathered}
2(x-3)=-\sqrt{2(x-3)(x-4)} \\
2(x-3)^{2}=(x-3)(x-4) \\
(x-3)(x-2)=0
\end{gathered}
\]

From this, we see that - since no roots were lost during our transformations - our equation can only be satisfied by $x=3$ and $x=2$. These are not excluded values, and substitution shows that both are roots of the equation. This gives us the solution.

b) In our second equation, it would lead to a lengthy examination to determine under which value ranges of $p, r, q$ the equation has a real meaning. We will examine this for the left-hand side terms containing $x$ at the roots that will come into play. However, we immediately assume that the constant on the right-hand side is real, i.e., $(p-r)(p-r+2 q) \geq 0$.

![](https://cdn.mathpix.com/cropped/2024_05_02_3ae2d62f17f94b8c9f1cg-1.jpg?height=415&width=545&top_left_y=936&top_left_x=779)

Notice that with $q=0$, our equation simplifies to $|x-p|+|x-r|=|p-r|$, and in the case of $p \neq r$, every number between $p$ and $r$ is a solution, including $p$ and $r$ (see the figure), and in the case of $p=r$, $x=p$ is the only root; furthermore, that in the case of $p=r$, the two terms on the left side are equal, and 0 stands on the right side, so the roots are $x_{1}=p+q$, $x_{2}=p-q$, unless $q=0$, which case we have already seen. We can now assume that $p \neq r$ and $q \neq 0$.

Similarly to the above, after rearrangement, first squaring, and rearrangement,

\[
(p-r)(x-r+q)=\sqrt{(p-r)(p-r+2 q)(x-r-q)(x-r+q)}
\]

with another squaring and rearrangement,

\[
\begin{gathered}
(p-r)(x-r+q)^{2}=(p-r+2 q)(x-r-q)(x-r+q) \\
(x-r+q)[(p-r)(x-r+q)-(p-r+2 q)(x-r-q)]= \\
=(x-r+q)\left(-2 q x+2 p q+2 q^{2}\right)=-2 q(x-r+q)(x-p-q)=0
\end{gathered}
\]

Thus, only $x_{1}=r-q$ and $x_{2}=p+q$ can be roots. Both satisfy the equation because substituting them, one term on the left side is 0, and the other term is equal to the real number on the right side.

Our first equation is a special case of the second with the values $p=3 / 2, q=1 / 2, r=7 / 2$.

Hegyi László (Pécs, Zipernovszky K. Mechanical Engineering High School III. grade)