Find all natural numbers $x$ ($x$ in base $10$) so that the product of its digits is $x^2 - 10x - 22$.
Here is what I did so far:
I took two cases.
The first case was considering one or more digits(except the first one) being $0$. In this case $x$ wasn't a natural number.
The second case was considering no digit being $0$. Because $x$ is a natural number we must have the product of its digits bigger than $0$. After solving $x^2 - 10x - 22 > 0$ I got $x$ being a natural number bigger than $11$.
At this point I got stucked. I know the answer is $12$ but I don't know how to get it.
$\lg(x)$ here denotes $\log_{10}(x)$.
$x^2-10x-12\neq 0$, since $x$ is an integer.
$x^2-10x-22 > 0\iff x\ge 12$.
As suggested by Daniel Fischer in the comments:
$$x^2-10x-22\le 9^{d}=9^{\lfloor \lg x \rfloor+1}$$
$$\iff \lg(x^2-10x-22)\le \lg(9)\left(\lfloor\lg x\rfloor +1\right)< \lfloor \lg x\rfloor+1\le \lg x+1=\lg (10x)$$
$$\implies x^2-10x-22< 10x\iff x\in (10-\sqrt{122},10+\sqrt{122})$$
$\iff x\in [12,21]$. Then $0\le x^2-10x-22\le 1\cdot 9\implies x=12$. After checking, $12$ works.