General way of solve $ax^2+by+c=0$ For example ,the diophantine equation
$$x^2+1=25y$$
we can solve this by finding particular solution $(x,y)=(7,2)$
and using this , we can get general solution.
My question is 
"To solve $ax^2+by+c=0$ $(a, b, c \in \mathbb{Z})$ we must find particular solution or 
not?"
 A: Since x and y have a difference like $d$,we can have a single variable quadratic equation by transformation.
If $x=y ±d$ we have:
$a(y ±d)^2+by+c=0$
$ay^2 +(b ±2ad)y  ±ad^2+c=0$
$\Delta=(b ±2ad)^2-4a(c ±ad^2)>=0$
Limitation of value of $\Delta$ gives us a short range of numbers to try for solution. For example we solve $x^2+1=25y$:
We consider two cases:
$|x|>|y|$; so we can transform equation as follows:
Let $x= y+d$ , we have:
$(y+d)^2-25y+1=0$
$y^2+(2d-25)y+d^2+1=0$
$\Delta=-100 d +621$
For a solution in set of real numbers we must have:
$\Delta=-100 a +621>=0$  ⇒ $100a<=621$  ⇒$a<6$ .
Now we have a small range to try, for example :
$a=5$ ⇒$\Delta=121$ ⇒ $y=2$ and $y=13$
$y=2  ⇒ x=7$
$y=13 ⇒ x=18$.
Now suppose $|x|<|y|$, we have:
$(y-d)^2+1-25y=0$
$y^2+(-2a-25)y+a^2+1=0$
Which gives $y=2, x=7$ and $y=41, x=32$
For a general formula for x and y, the homogeneous equation $x\times x-25y=0$  gives $x=25$ and $y=1$  and we have:
$x=7$ as a single solution so the equation for x is $x=25t +7$.
Where t ∈ Z. For y we put x in equation:   
$(25t+7)^2+1=25y$  which gives $y=25t^2+14t+2$.
Hence there are infinitely many solutions for this equation.
A: Assume $b>0$. If $b<0$ make a change of variables $y'=-y$. Let $d=\gcd(a,b)$, then $d$ must divide $c$ so we can reduce $\{a,b,c\}$ to $\{a/d,b/d,c/d\}$. Hence we assume that $\gcd(a,b)=1$.  
Next, suppose $d = \gcd(b,c)$. Then since $\gcd(a,b)=1$, $d$ must divide $x^2$. Let $d=u^2v$ so that $v$ is squarefree, then $x$ must be of the form $x=uvw$ for some integer $w$, so we can replace the equation with
$$
\begin{align}
ax^2 + by + c &= 0\\
a\frac{u^2v^2w^2}{d} + \frac{b}{d} y + \frac{c}{d} &= 0\\
(av) w^2 + (b/d) y + (c/d) &= 0
\end{align}
$$
So we replace $\{a,b,c\}$ by $\{av,b/d,c/d\}$.  
After these two replacements, $\gcd(b,c)=1$. If $d=\gcd(a,b)\neq 1$, then $d$ must divide $c$. This contradicts $\gcd(b,c)=1$, so there are no solutions and we are done.  
Hence for the remaining case we may assume that $\gcd(a,b)=\gcd(b,c)=1$. Now the problem can be reduced to solving
$$
ax^2 + c \equiv 0 \pmod b \implies x^2 \equiv -ca^{-1} \pmod b
$$
i.e. a solutions exist iff $-ca^{-1}$ is a quadratic residue $\pmod b$.  
If $x$ is a solution so is $x+kb$ for any $k\in\mathbb Z$, so the distinct infinite classes can be classified by distinct solutions $0\leq x < b$ (which can be none). This is a finite search which in some sense solves the problem.  
For the given example it would be $x=7,18$ for the base case $0\leq x < 25$, so the two infinite classes are $x=7+25k$ and $x=18+25k$ for $k\in\mathbb Z$.  

To expand on this more, let the unique prime factorization of $b$ be
$$
b = \prod_{i=1}^kp_i^{e_i}
$$
Then the equation can be split into
$$
\begin{align}
x^2 &\equiv -ca^{-1} \pmod{p_i^{e_i}},\quad 1\leq i \leq k
\end{align}
$$
By solving each equation, the base solutions can be combined/obtained via Chinese Remainder Theorem. Also note that $a,c\not \equiv 0 \pmod{p_i}$ since $\gcd(a,b)=\gcd(b,c)=1$ by construction, so $x\not\equiv 0 \pmod{p_i}$.  

Edit 1: The discussion below works for odd primes but gets tricky for even prime powers. If $2^t$ divides $b$ then the equation
$$
x^2 \equiv -ca^{-1} \pmod{2^t}
$$
needs to be considered separately.  

For each odd prime, as $-ca^{-1} \not\equiv 0 \pmod {p_i}$, then a solution to
$$
x^2 \equiv -ca^{-1} \pmod {p_i}
$$
depends on whether $-ca^{-1}$ is a quadratic residue $\pmod{p_i}$. This will give either zero or two solutions $\pmod{p_i}$. If any one of the equations has no solutions, then there must be zero solutions for the original equation.  
Otherwise, each equation $\pmod{p_i}$ has two solutions. Then since $x\not\equiv 0 \pmod{p_i}$, by Hensel's lifting it can be shown that there are also exactly two solutions $\pmod{p_i^{e_i}}$.    
Since each of the $k$ equation has two solutions, after CRT there will be $2^k$ base solutions. This in turn gives $2^k$ infinite classes.
Edit 1: If one of the primes is even then the combination of the odd primes gives $2^{k-1}$ classes. The total number depends on how many classes there are for $x^2\equiv 0\pmod{p_1^{e_1} = 2^{e_1}}$.
