## Task B-3.7.

Determine all integers $n$ for which the equation $x^{3}-n x^{2}+n x-\left(n^{2}+1\right)=0$ has an integer solution.
## Solution.

Let $x$ be an integer solution of the given equation. Then we have:

$$
\begin{aligned}
& x^{3}-n x^{2}+n x-n^{2}=1 \\
& x^{2}(x-n)+n(x-n)=1 \\
& (x-n)\left(x^{2}+n\right)=1
\end{aligned}
$$

The product is equal to 1 only if both factors are 1 or -1.

In the first case, we solve the system

$$
\begin{array}{r}
x-n=1 \\
x^{2}+n=1
\end{array}
$$

Then we have

$$
x=n+1 \Longrightarrow(n+1)^{2}+n=1
$$

which, after simplification, gives the equation

$$
n^{2}+3 n=0
$$

Thus, the solutions of the system are $n=0$ and $x=1$, or $n=-3$ and $x=-2$.

In the second case, we solve the system

$$
\begin{aligned}
x-n & =-1 \\
x^{2}+n & =-1
\end{aligned}
$$

Then we have

$$
x=n-1 \Longrightarrow(n-1)^{2}+n=-1
$$

After simplification, we get the equation

$$
n^{2}-n+2=0
$$

which has no solutions in the set of integers. 1 point

## COUNTY COMPETITION IN MATHEMATICS

4th grade - high school - B variant
February 5, 2015.

## IF A STUDENT HAS A DIFFERENT APPROACH TO SOLVING THE TASK, THE COMMITTEE IS OBLIGED TO GRADE AND EVALUATE THAT APPROACH IN AN APPROPRIATE MANNER.