# Find real number $x$ such that both $x+\sqrt{2022}$ and $\frac{3}{x}-\sqrt{2022}$ is an integer

I have some difficulty to do this problem:

Find real number $$x$$ such that both $$x+\sqrt{2022}$$ and $$\frac{3}{x}-\sqrt{2022}$$ is an integer

My attempts: I tried to addition and multiple $$x+\sqrt{2022}$$ and $$\frac{3}{x}-\sqrt{2022}$$ together but it seems doesn't help

Anyone have idea on how to solve this? Thank you so much

• $x = n - \sqrt{2022}$ for some $n \in \mathbb{Z}$. Maybe putting this in $3/x - \sqrt{2022}$ will help? Jun 17, 2022 at 3:01
• @L.F. ohhh, thank you so much for your idea!!! I solved it with your idea
– Lini
Jun 17, 2022 at 3:06

We know that $$2022$$ doesn't contain a square (as $$2022=2*3*337$$). So the solution must be of the form $$x=n-\sqrt{2022}$$ to satisfy the first equation, where $$n\in \mathbb Z$$.
Injection in the 2nd equation: $$\frac3{n-\sqrt{2022}}-\sqrt{2022}\in\mathbb Z$$ We multiply numerator/denominator by $$n+\sqrt{2022}$$: $$\frac{3(n+\sqrt{2022})}{n^2-2022}-\sqrt{2022}\in\mathbb Z$$ The denominator must be 3 so that the two square roots cancel, so $$n^2-2022=3$$ and then $$n=45$$ or $$n=-45$$.
• I think that $n^2-2022=3$ then n=45 or -45