# Existence of solutions to $a^2x^2 + bx = y^2$

Is there a way to determine if there are or aren't any integer positive solutions $$(x,y)$$ to the equation $$a^2x^2 + bx = y^2$$ depending on the values of $$a$$ and $$b$$?

I tried to deal with it using Pell equations but I just couldn't work it out. Any help is appreciated.

• If you complete the square on the left, you get something like $(ax+c)^2=y^2+d^2$, when $c$ and $d$ depend on $a$ and $b$. So it looks like finding Pythagorean triple. – Paul Sep 27 '18 at 14:53
• We have $(2a^2x+b-2ay)(2a^2x+b+2ay)=b^2$. So, every positive integer solution (if any) is of the form $x=\frac{(s-b)^2}{4a^2s},y=\frac{(b+s)(b-s)}{4as}$ where $s$ is a divisor of $b^2$ with $0\lt s\lt |b|$. – mathlove Sep 27 '18 at 15:58
• Thanks! I am also wondering about one more similar equation: $a^2x^2+bx=y^2+2^k$ with fixed $k$ (and fixed $a,b$). is it possible to generate a similar conclusion? – oren1 Sep 28 '18 at 20:11
• Yes, we get $(2a^2x+b-2ay)(2a^2x+b+2ay)=a^22^{k+2}+b^2$ similarly. – mathlove Sep 30 '18 at 15:03

Above equation shown below has solution:

$$a^2x^2 + bx = y^2$$

$$x=3(k-3)^2$$

$$y=3(k-3)(3k-4)$$

$$a=2$$

$$b=15(k^2-4)$$

For $$k=5$$ we get:

$$(x,y,a,b)= (12,66,2,315)$$

• The question is asking how to tell, if we know (a,b), whether there is a corresponding (x,y) to make a solution. – Carl Mummert Sep 27 '18 at 20:45
• Yes it's not fully solving my question but it is a help, thanks. can generate something similar for $a^2x^2+bx=y^2+2^k$? – oren1 Sep 28 '18 at 20:25

"OP" has follow up question for equation shown below:

$$a^2x^2+bx=y^2+w$$

For w=2^6 & w=2^12 there are solutions shown below:

$$x=k^2-10k+29$$

$$y=5k^2-33k+20$$

$$a=2$$

$$b=25(k^2-4)$$

$$w=(2k^2-8)^2$$

For k=6 we get w= 2^12 and :

$$(x,y,a,b)= (5,2,2,800)$$

For k=0 we get w =2^6 and,

$$(x,y,a,b)= (29,20,2,-100)$$