4

$$ax+by=c$$ $$ax^2+by^2=d$$ where $ab\neq 0$ and $x,y$ are coprime?

  • 1
    Well, the second implies that $abx^2+(by)^2=bd\implies abx^2+(c-ax)^2=bd$ so you have a quadratic equation. – lulu Oct 26 '19 at 20:30
  • I agree. However, I will have to establish conditions to ensure that the discriminant is a perfect square and another one to make sure that the solutions are not rationals but integers, I wonder if it's the only method. – NumThcurious Oct 26 '19 at 20:35
  • But those conditions are real...not artifacts of the method. One way or another you are going to have to grapple with them. The discriminant is pretty ugly...removing a stray factor of $4$ I get $\Delta=a^2c^2-c^2ab-c^2a+ab^2d+abd$ which doesn't look promising, though anything is possible. I would check that discriminant, by the way. I did it very hastily and it could easily be wrong. – lulu Oct 26 '19 at 20:42
  • I appreciate your input @Lulu. – NumThcurious Oct 26 '19 at 20:44
  • I just tried something different: – NumThcurious Oct 26 '19 at 20:51
  • I just tried something different: $$a=\frac{ dy-c}{y-x}$$ $$b=\frac{c-dx}{y-x}$$ We set $$y=x+e$$ Then $$x=\frac{c-be}{d}$$ $$y=\frac{c-be}{d}+e$$. I just need to pick my $e$ such that $x$ is an integer. What are your thoughts? – NumThcurious Oct 26 '19 at 20:57
  • 1
    Well...just looking at the bottom lines, if we let $c=be$ then you get $x=0, y=e$ independent of $a,d$ which seems wrong. – lulu Oct 26 '19 at 21:01
  • 1
    I suggest working a number of examples; including cases where there are no integer solutions for $x,y$. Perhaps some useful pattern emerges. – lulu Oct 26 '19 at 21:03
  • When $x=0$ That yields the degenerate cases where $y=\pm 1$ – NumThcurious Oct 26 '19 at 21:08
  • Instead of solving for (real) roots (or trying it) I'd propose to start with looking $\pmod a$,$\pmod b$ and so on. – Gottfried Helms Oct 30 '19 at 16:15

3 Answers3

7

You can solve this by talking the first equation and solving for y. Then substituting y in the second equation, as so:

$$ax+by=c$$

$$ax-c=-by$$

$$(ax-c)/(-b)=y$$

Now substitute into second equation:

$$ax^{2}+\frac{b\left(ax-c\right)^{2}}{b^{2}}=d$$

Expand:

$$ax^{2}+\frac{a^{2}x^{2}-2acx+c^{2}}{b}=d$$

Simplify:

$$\frac{bax^{2}}{b}+\frac{a^{2}x^{2}-2acx+c^{2}}{b}=d$$

$$\frac{bax^{2}+a^{2}x^{2}-2acx+c^{2}}{b}=d$$

Subtract d from both sides:

$$\frac{bax^{2}+a^{2}x^{2}-2acx+c^{2}-bd}{b}=0$$

Simplify more...

$$\frac{\left(a^{2}+ba\right)}{b}x^{2}-\frac{2ac}{b}x+\frac{\left(c^{2}-bd\right)}{b}=0$$

This is just a quadratic. You can solve it with the quadratic equation:

$$x=\frac{-g+\sqrt{g^{2}-4fh}}{2f}$$

And

$$x=\frac{-g-\sqrt{g^{2}-4fh}}{2f}$$

Where $$f=\frac{\left(a^{2}+ba\right)}{b}$$

$$g=-\frac{2ac}{b}$$

$$h=\frac{\left(c^{2}-bd\right)}{b}$$

Try it out: https://www.desmos.com/calculator/dw9xe3ppxe

Larry
  • 5,090
BanePig
  • 196
  • 3
  • Where exactly did you get the f and the g. Please specify, – Max0815 Oct 26 '19 at 22:08
  • @Max0815 f is the coefficient of x^2, g is the coefficient of x, and h is the constant. Related to a, b, and c respectively in the quadratic formula. – BanePig Oct 26 '19 at 22:13
  • 1
    We are asked to find integer solutions, not find real roots... – zwim Oct 26 '19 at 23:05
  • 1
    @zwim This will find the solutions to the system. Whether they are integers is dependent on a, b, c, and d. This can be used to determine whether they are or are not integers. – BanePig Oct 27 '19 at 12:48
-1

Easiest Possible solution. Its a simple solution using trignometry. I use this to solve many problems

-3

Above simultaneous equation shown below:

$ax^2+by^2=d$

$ax+by=c$

Taking, $(a,b,c,d)=(4,5,22,56)$ we get:

$(x,y)=(3,2)$ & $(x,y)=(17/9,26/9)$

Sam
  • 1