# How to solve these $3$ equations for three unknowns $x$,$y$,$z$? [duplicate]

Question:

Solve:

$$xy+x+y=23\tag{1}$$

$$yz+y+z=31\tag{2}$$

$$zx+z+x=47\tag{3}$$

My attempt:

$$\sum xy +2\sum x =101$$

Multiplying $$(1)$$ by $$z$$, $$(2)$$ by $$x$$, and $$(3)$$ by $$y$$ and adding altogether gives

$$3xyz+ 2\sum xy =31x+47y+23z$$

Then, from above two equations after eliminating $$\sum xy$$ term we get

$$35x+51y+27z=202+3xyz$$

After that subtracting $$(1)\times 3z$$ from equation just above (to eliminate $$3xyz$$ term) gives

$$35x +51y-3z(14+x+y)=202\implies (x+y)[35-3z]+16y-42z=202$$

I tried pairwise subtraction of $$(1),(2)$$ and $$(3)$$ but it also seems to be not working.

Please give me some hint so that I can proceed or provide with the answer.

• What are the constraints on x, y, and z? Sep 28, 2018 at 23:29
• Duplicate of 1, 2, 3, but for the numbers on the RHS.
– dxiv
Sep 29, 2018 at 2:43
• @Dancrumb I don't think so, given that solving this with general system solving techniques is a tad bit overkill. Sep 30, 2018 at 20:14

Hint: Put $$X=x+1$$ $$Y=y+1$$ $$Z=z+1$$

Then we have

$$XY=24$$ $$YZ=32$$ $$ZX=48$$

Can you take it from there?

• K : that was nice trick ......now i can take it
– user454960
Sep 28, 2018 at 19:52

We can use Simon's favorite factoring trick.

$$xy+x+y+1=(x+1)(y+1)$$

This tells us

$$(x+1)(y+1)=24$$$$(y+1)(z+1)=32$$$$(x+1)(z+1)=48$$So, we know that $$x+1 = \pm\frac{\sqrt{24\cdot32\cdot48}}{32}\to x=5,-7$$. Likewise, you can find the other variables.

• amazing thank you ...i will take it from here .....
– user454960
Sep 28, 2018 at 19:53
• You could also have $x+1 = -\frac{\sqrt{24 \cdot 32 \cdot 48}}{32} \rightarrow x = -7$. Sep 28, 2018 at 22:51

You can convert the first equation into an equation that expresses y in terms of x.

You can convert the third equation into an equation that expresses z in terms of x.

You can substitute these formulas for y and z into the second equation. This gives a single equation, in a single variable (x).

The single equation can be simplified, by letting v = x + 1, and substituting v-1 in for x. Then you can multiply through by v². Notice that you are assuming that v ≠ 0. Then you can solve for v. Since this is a second order equation, you will get two solutions (which might be equal to each other).

Now you can solve for x. (It is v-1). Notice that you are assuming that x ≠ -1.

Now you can solve the first equation for y, and the third equation for z.

Now you need to make sure you don't have a divide-by-zero error. In other words, check what values you get for y and z if x were equal to -1. Since these are the asymptotes of the hyperbolas that are hinted at by marshal craft's answer, y and z turn out to be ±∞. This demonstrates that it was okay to assume that x ≠ -1.

Now you can perform your check-by-substitution, to verify that both solutions are correct.

hint

$(2)-(1)$ gives

$$(z-x)(y+1)=8=(z+1-(x+1))(y+1)$$

$(3)-(2)$ becomes

$$(x-y)(z+1)=16=(x+1-(y+1))(z+1)$$

$(3)-(1)$ yields to

$$(z-y)(x+1)=24=(z+1-(y+1))(x+1)$$

From here, we put $$X=x+1,\;Y=y+1,\; Z=z+1$$ thus

$$YZ-YX=8$$ $$ZX-ZY=16$$ $$XZ-XY=24$$

• OP mentioned he took pairwise differences and couldn't make progress. Sep 28, 2018 at 19:52

Consider first equation :

XY + X + Y = 23 => X ( Y + 1 ) = 23 -Y => X = (23-Y)/(Y+1) -(a)

Consider second equation :

YZ + Y +Z = 31 => Y (Z+1)=31-Z =>Y=(31-Z)/(Z+1)-(b)

Consider third equation :

XZ +Z+X = 47 => Z(X+1)=47-X =>Z=(47-X)/(X+1)-(c)

Now put the value of z from eq c into eq b , then simply that equation , then put the simplified value of Y from eq b into eq A , then from there you will get the value of X , then put that value into eq c you will get the value of Z and finally put the value of Z into eq b to get the value of Y .