Question 1209684
<font color=black size=3>
Replace each instance of n with x.


The problem is
<font color=blue>Find all integers x for which (x^2+x+1)/(x^3+x-2) is an integer</font>


Consider these two functions
f(x) = abs(x^2+x+1)
g(x) = abs(x^3+x-2)
where "abs" is shorthand for "absolute value". 
Vertical bars can be used in place of abs notation.


The goal is to see when f/g is an integer for integer values of x.


Use a graphing tool of your choice, such as <a href="https://www.desmos.com/calculator">Desmos</a>, to get this diagram
{{{
drawing(400,400,-5,5,-2,20,
graph(400,400,-5,5,-2,20,-100,abs(x^2+x+1),abs(x^3+x-2)),
locate(-3.5,6,f(x)),
blue(locate(1.5,2,g(x)))
)
}}}
f(x) in green
g(x) in blue
Note that all of y = x^2+x+1 is entirely above the x axis, so abs(x^2+x+1) is identical to x^2+x+1. The absolute value bars have no effect on f(x).
The abs is much more useful with g(x) since some parts of x^3+x-2 go below the x axis.


The two functions intersect at these approximate locations
(0.3926, 1.5468)
(1.8637, 6.3371)
Which shows that the solutions to f(x) = g(x) are roughly x = 0.3926 and x = 1.8637


According to the graph, if 0.3926 < x < 1.8637 then the green curve is above the blue curve.
This is when f(x) > g(x).
Otherwise, f(x) < g(x)


So we only need to search for integers in the interval 0.3926 < x < 1.8637
This narrow interval contains the integer x = 1 and no other integers.


f(x) = x^2+x+1
f(1) = 1^2+1+1
f(1) = 3
g(x) = x^3+x-2
g(1) = 1^3+1-2
g(1) = 0
h(x) = ( f(x) )/( g(x) )
h(1) = ( f(1) )/( g(1) )
h(1) = 3/0
h(1) = undefined
Recall we cannot divide by zero.


So f/g is not an integer, and not even defined, when x = 1.


If x is an integer other than 1, then f/g will not be an integer.
Why not? Because the denominator g(x) is larger in absolute value compared to f(x).
As an example, f/g = 7/8 when x = 2
Another example is f/g = 3/(-12) = -1/4 when x = -2


So f/g is never an integer when x is an integer.
</font>