A collection of interesting and challenging math problems. Click “Show Solution” to reveal the answer.

System of Equations (Attributed to Srinivasa Ramanujan)

\(x,y\in\mathbb{Z}\). Solve for \(x\) and \(y\):

$$\sqrt{x}+y=7$$

$$x+\sqrt{y}=11$$

Show Solution

Let \(p=\sqrt{x}\,\) and \(q=\sqrt{y}\)

$$p+q^2=7$$

$$p^2+q=11$$

$$11=7+4=p+q^2+4$$

so

$$p^2+q=p+q^2+4$$

Rearrange

$$p^2-q^2+q-p=4$$

Since

$$p^2-q^2=(p-q)(p+q)$$

Substitute

$$(p-q)(p+q)+q-p=4$$

$$(p-q)(p+q)-(p-q)=4$$

$$(p-q)(p+q-1)=4$$

There are three ways to factor \(4\): \(2\times 2, 4\times 1, and 1\times 4\).

Assume \(p-q=2\) and \(p+q-1=2\).

$$p-q=2$$

$$p+q-1=2$$

Add the two equations.

$$2p-1=4$$

$$2p=5$$

$$p=5/2$$

This is not an integer, so not a valid solution.

Assume \(p-q=4\) and \(p+q-1=1\).

$$p-q=4$$

$$p+q-1=1$$

Add the two equations.

$$2p-1=5$$

$$2p=6$$

$$p=3$$

$$3-q=4$$

$$-q=1$$

$$q=-1$$

\(\sqrt{y}\ne -1\), so this is not valid.

Assume \(p-q=1\) and \(p+q-1=4\).

$$p-q=1$$

$$p+q-1=4$$

Add the two equations.

$$2p-1=5$$

$$2p=6$$

$$p=3$$

$$3-q=1$$

$$-q=-2$$

$$q=2$$

Thus

\(x=p^2=9\) and \(y=q^2=4\)