$$3^x = 2+y^2$$
Solve for the integer values of $x$ and $y$. Can this be solved using graph theory and calculus? I am trying out for half an hour and uses most of my preknowledge but still it is not solved, however I found two solutions for $(x,y)$ which are $(1,1)$ and $(3,5)$.
Let $x$ and $y$ be integers such that $3^x=2+y^2$. Note that $2+y^2>1$ and hence $x>0$.
In the ring $\Bbb{Z}[\sqrt{-2}]$ the element $3$ factors as $3=(1+\sqrt{-2})(1-\sqrt{-2})$, and we have $$3^x=(y+\sqrt{-2})(y-\sqrt{-2}).$$ The gcd of the two factors on the right hand side divides $$(y+\sqrt{-2})-(y-\sqrt{-2})=2\sqrt{-2}=-(\sqrt{-2})^3,$$ and it also divides $3^x$, and so the two factors are coprime. Because $\Bbb{Z}[\sqrt{-2}]$ is a unique factorization domain, it follows that $y+\sqrt{-2}=(1+\sqrt{-2})^x$ and $y-\sqrt{-2}=(1-\sqrt{-2})^x$.
I'll leave it for you (for now) to check that the coefficient of $\sqrt{-2}$ in the expansion of $(1+\sqrt{-2})^x$ equals $1$ if and only if $x=1$ or $x=3$.