Finding how many integers will satisfy a logarithmic inequality 
How many integers $x$ will satisfy the inequality $$\log_{20}(x-30)+\log_{20}(70-x)<2 ?$$

Using the properties of logarithms we get
$$\log_{20}((x-30)(70-x))<2$$
$$\Rightarrow \log(-x^2+100x-2100)<2.$$
From here we have
$$-x^2+100x-2100<20^{2}$$
$$\Rightarrow-x^2+100x-2500<0$$
$$\Rightarrow x^2-100x+2500>0$$
$$\Rightarrow (x-50)^2>0.$$
Hence $x \neq 50$. From before we had the restriction that $30 < x <70$ from here I deduced that the answer would be $37$ since we have $31 \leqslant x \leqslant 69$ and $69-31=38$ and then we take off the $50$, hence totalling $37$ integers. The actual answer was $38$, I really cannot see what am I missing here?
 A: Given $p\leq, p,q\in\Bbb Z$, there are $q-p+1$ integers between $p$ and $q$ inclusive.  So, to count the number of integers between $31$ and $69$ excluding $50$, you have $$69-31+1-1=38$$ as desired.
A: How many integers satisfy $30\lt x\lt32$? Your reasoning would look at $31\le x\le 31$ and then calculate $31-31=0$. Can you see what's wrong here, and then generalize to the original problem, with $70$ instead of $32$?
A: Since the lines $x-30$ and $70-x$ give nice symmetry about $x = 50$, let's write this in terms of
$$y = x - 50 \in \mathbb{Z}$$
to give
$$\log_{20} (x-30) + \log_{20}(70-x) = \log_{20}(y+20) + \log_{20}(20-y)$$
Note the implicit domain restriction of both $y + 20 > 0$ and $20 - y > 0$, i.e.
$$-20 < y < 20 \iff -19 \leq y \leq 19$$
and observe that there are $2 \times 19 + 1 = 39$ such $y \in \mathbb{Z}$.
We combine the logs and consider our original inequality, giving
$$\log_{20}(20^2-y^2) < 2$$
i.e.
$$20^2 - y^2 < 20^2 \iff -y^2 < 0 \iff y \neq 0$$
So all except $y = 0$ (of our 39 possible $y$) will satisfy this inequality - that is, we have $39 - 1 = 38$ solutions.
