Determine all pairs $(a,b)$ of positive integers such that $ab^2+b+7$ divides $a^2b+a+b$ 
Determine all pairs $(a,b)$ of positive integers such that $ab^2 + b + 7$ divides $a^2b + a +b$.

I guess the trivial solution is $a=b=7$.
Also any $a$ and $b$ which are divisible by $7$ will seem to suit.
we can also write
$b(\frac{a}{b}+1+\frac{7}{b}) \cdot x=a\cdot(ab+1+\frac{b}{a})$
From where all $a, b$ that satisfy: $\frac{b^2}{a}=7$ and $a>b$, are OK.
Is my solution full and complete? Are there any other solutions?
 A: $$%%ab^2 + b + 7 \ | \ a^2b + a + b$$
We know that: 
$$ 
ab^2 + b + 7 \ | \ a(ab^2 + b + 7) 
= 
a^2b^2+ab+7a 
; 
$$ 
$$ 
ab^2 + b + 7 \ | \ b(a^2b + a + b) 
= 
a^2b^2+ab+b^2 
; 
$$
so we can conclude 
$$ 
ab^2 + b + 7 \ | \ 
\Big[ 
 a(ab^2 + b + 7) - b(a^2b + a + b) \Big] 
\ \ \ \ \ \ \ \
\Longrightarrow
\\ 
ab^2 + b + 7 \ | \ 
\Big[ 
 (a^2b^2+ab+7a) - (a^2b^2+ab+b^2) \Big] 
\Longrightarrow
\\ 
ab^2 + b + 7 \ | \ 
7a - b^2 
\ \ \ \ \
\color{Blue}{\star} 
$$ 



First case: 
$7a-b^2=0$; which implies that there exists an integer $n$; such that: 
$$(a,b)=(7n^2,7n);$$ 
one can check that $(a,b)=(7n^2,7n)$ satisfies in;
the divisibility condition $ab^2 + b + 7 \ | \ a^2b + a + b$.
Second case: 
$0 < 7a-b^2 $; 
note that 
$\color{Red}{0} < (b+\dfrac{1}{2})^2+\dfrac{27}{4} = \color{Red}{b^2+b+7}$,
so in this case we have: 
$$ 
ab^2 + (b + 7) < |ab^2 + b + 7| < 7a-(b^2) 
\Longrightarrow 
\\ 
ab^2 + \color{Red}{0} 
< 
ab^2 + \color{Red}{(b^2 + b + 7)} < 7a 
\Longrightarrow 
ab^2 < 7a 
\Longrightarrow 
\\ 
b^2 < 7 
\Longrightarrow 
b=1 
\ \ 
\text{or} 
\ \ 
b=2 
. 
$$


*

*If $b=1$; then by replacing in $\color{Blue}{\star}$ 
we get: 
$a + 8 \ | \  7a - 1 $,
on the otherhand we have: 
$a + 8 \ | \  7(a + 8) $,
so we can conclude that 
$a + 8 \ | \  57 $,
which gives us the two posibilities $a=11$ and $a=49$;
one can check that each of the pairs  $(a,b)=(11,1)$ and $(a,b)=(49,1)$ satisfies the divisibility condition.  

*If $b=2$; then by replacing in $\color{Blue}{\star}$ 
we get: 
$4a + 9 \ | \  7a - 4 \ | \  4(7a - 4) = 28a - 16 $,
on the otherhand we have: 
$4a + 9 \ | \  7(4a + 9) = 28a + 63 $,
so we can conclude that 
$4a + 9 \ | \  79 $,
which does not gives us any posibilities for $a$.
[Note that $79$ is a prime number.] 
Third case: 
$7a-b^2 < 0$; 
note that in this case $0 < a$,
so we have: 
$$ 
ab^2 + b + 7 < |ab^2 + b + 7| < b^2-7a 
\Longrightarrow 
\\ 
\color{Red}{0} < 
(a-1) 
\Bigg[ b + \dfrac{1}{2(a-1)} \Bigg]^2 
+ 
(7a-\dfrac{1}{4(a-1)}+7)
= 
(ab^2 + b + 7) + 
(7a-b^2) 
< \color{Red}{0} 
; 
$$
which is an obvious $\color{Red}{\text{contradiction}}$; so there is no solution in this case.  

So the solutions are as follows:
$$ 
(11,1), \ (49,1) 
\ \ \text{and} \ \ 
(7n^2,7n) 
\ \ \text{for any} \ \ 
n \in \mathbb{N} 
. 
$$
A: First we will dealt with the cases when $b=1,2,3,4,5,6$ and then we can assume that $b \geq 7$,
For the case $b=1$ we get that $a+8 | a^2+a+1$ which means $a(a+8) +r = a^2+a+1$  and we want $r=0 \mod a+8$ so solving the above gives that $r = 1 - 7 a$ so we want that $a+8|1-7a$ which means that $-7(a+8)+r = 1-7a$ and we want $r=0 \mod a+8$ so solving the above gives that $r = 57 \mod a+8$.
Now $57=3*19$ so $3=0 \mod a+8$ or $19 = 0 \mod a+8$ or $57 = 0 \mod a+8$ solving these equations yields that $(11,1)$ and $(49,1)$ are solutions.
Doing the same for $b=2,3,4,5,6$ yields that there are no solutions.
Now we can assume $b \geq 7$, also $a \geq b \geq 7$, because if we let $a< b$ and $a b^2 +b +7 < a^2 b+a+b$ we will get contradiction arriving at $a \geq b-\frac{1}{7}$ and since $a,b$ are integers we get that $a\geq b$.
Divide the equation by $a b$ we get that $(b+\frac{1}{a}+\frac{7}{ab})x = a+\frac{1}{a} +\frac{1}{b}$ which is just $ b x +\frac{x}{a}+ \frac{7x}{ab} = a+\frac{1}{a}+\frac{1}{b}$
Now we know that $\frac{1}{a}+\frac{1}{b} \leq \frac{2}{7}<1$ so assuming that $\frac{x}{a}+ \frac{7x}{ab} <1$ we must have that $a = b x$ substituting that we get that $b=7x$ so $a = b x = 7x x = 7x^2$ for all $x \geq 1$.
Now, what if $\frac{x}{a}+ \frac{7x}{ab}\geq y \geq 1$ we get that $a= b x+y$ substituting we get that $\frac{7 x}{b (b x+y)}+\frac{x}{b x+y}+b x = \frac{1}{b x+y}+b x+\frac{1}{b}+y$  which is $\frac{7 x}{b (b x+y)}+\frac{x}{b x+y}-\frac{1}{b x+y}-\frac{1}{b}-y=0$ solving for $x$  we get that $x =\frac{-b y^2-b-y}{b^2 y-7}$ Now since $b \geq 7 $ and $y \geq 1$ the denominator is non-negative and the numerator is negative so $x$ is negative which is contradiction thus,
the solutions $(11,1),(49,1),(7x^2,7x)$ for all $x\geq 1$ are the only solutions.
