Problems from Quadratic diophantine equations

Find two solutions to the following diophantine equation: $$x^2-y^2=21$$

See development and solution

Development:

In this case we have $$n=21$$. What it is necessary to do, then, is find the divisors of $$21$$. These are: $$1, 3, 7$$ and $$21$$.

Besides, the only way of multiplying them so that the result is exactly $$21$$ is:

1) $$1\cdot21=21$$. The two are odd, therefore making $$a = 1$$ and $$b = 21$$ we get a solution by means of the formula $$\displaystyle \begin{array}{c} x=\frac{a+b}{2} & y=\frac{a-b}{2}\end{array}$$.

2) $$3\cdot7=21$$ Here, both are also odd, therefore we will have another solution making $$a = 3$$ and $$b = 7$$ and substituting in the previous formula.

Solution:

The two solutions are:

1) If $$a = 1$$ and $$b = 21$$: $$$x=\dfrac{1+21}{2}=11 \ \ \ \ y=\dfrac{1-21}{2}=-10$$$ It is possible to easily check that this is a solution: $$$11^2-(-10)^2=121-100=21$$$

2) If $$a = 3$$ and $$b = 7$$, then the solution is: $$$x=\dfrac{3+7}{2}=5 \ \ \ \ y=\dfrac{3-7}{2}=-2$$$ If we want, it is possible to check that it is really a solution: $$$5^2-(-2)^2=25-4=21$$$

Hide solution and development
View theory