# Algebra that's making me crazy

**URL:** <https://boards.straightdope.com/t/algebra-thats-making-me-crazy/97187>\
**Category:** Factual Questions\
**Created:** [December 6, 2001, 6:45am UTC](https://boards.straightdope.com/t/algebra-thats-making-me-crazy/97187 "2001-12-06T06:45:30Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bricker](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@Bricker](https://boards.straightdope.com/u/Bricker)\
**Post date:** [December 6, 2001, 6:45am UTC](https://boards.straightdope.com/t/algebra-thats-making-me-crazy/97187/1 "2001-12-06T06:45:30Z")

</div>

It’s not homework - but it is driving me crazy. Someone tossed this puzzling problem at me:

x + y + xy = 8  
y + z + yz = 15  
z + x + zx = 35

Given this, what is x + y + z + xyz ?

I have no idea how to get the term xyz in there.

- Rick

---

<div class="post-metadata">

**Author:** ![Darwins\_Finch](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/darwins_finch/32/20304_2.png) [@Darwins\_Finch](https://boards.straightdope.com/u/Darwins_Finch)\
**Post date:** [December 6, 2001, 6:55am UTC](https://boards.straightdope.com/t/algebra-thats-making-me-crazy/97187/2 "2001-12-06T06:55:13Z")

</div>

Actually, you don’t need an explicit **xyz** term. All you need to do is solve for **x** , **y** , and **z**. Since you have three equations and three unknowns, it should be easy.

The first equation, for starters, could be rewritten as:  
x(1 + y) + y = 8

And the second as:  
y(1 + z) + z = 15

And the third:  
z(1 + x) + x = 35

From here, it’s just a matter of solving each equation for a variable, and lots of substitution.

---

<div class="post-metadata">

**Author:** ![MonkeyMensch](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@MonkeyMensch](https://boards.straightdope.com/u/MonkeyMensch)\
**Post date:** [December 6, 2001, 7:13am UTC](https://boards.straightdope.com/t/algebra-thats-making-me-crazy/97187/3 "2001-12-06T07:13:34Z")

</div>

Well, I’m gonna give this a go but I have to disagree _prime facie_ with the finchster. There are three unknowns and three equations, but there are not linear. Just a bone thrown out there and here I go…

---

<div class="post-metadata">

**Author:** ![RM\_Mentock](https://avatars.discourse-cdn.com/v4/letter/r/e274bd/32.png) [@RM\_Mentock](https://boards.straightdope.com/u/RM_Mentock)\
**Post date:** [December 6, 2001, 7:46am UTC](https://boards.straightdope.com/t/algebra-thats-making-me-crazy/97187/4 "2001-12-06T07:46:59Z")

</div>

If you multiply the first one by z, then subtract the other two, you get

xyz - y - 10z - x = 50

That’s not what you wanted, but it’s got an xyz term!

---

<div class="post-metadata">

**Author:** ![aramis](https://avatars.discourse-cdn.com/v4/letter/a/e68b1a/32.png) [@aramis](https://boards.straightdope.com/u/aramis)\
**Post date:** [December 6, 2001, 8:24am UTC](https://boards.straightdope.com/t/algebra-thats-making-me-crazy/97187/5 "2001-12-06T08:24:45Z")

</div>

**Darwin’s Finch** gives the first step. Use that to put all of the variables in one of the equations in terms a third. For example, in the second equation, put _y_ and _z_ in terms of _x_. That yields a slightly ugly but solvable polynomial. (remember your quadratic formula?)  
Once you have one value, solve for the others. Finally, calculate the needed value.

---

<div class="post-metadata">

**Author:** ![aramis](https://avatars.discourse-cdn.com/v4/letter/a/e68b1a/32.png) [@aramis](https://boards.straightdope.com/u/aramis)\
**Post date:** [December 6, 2001, 8:37am UTC](https://boards.straightdope.com/t/algebra-thats-making-me-crazy/97187/6 "2001-12-06T08:37:02Z")

</div>

Note: there is more than one set of values that will satisfy the initial three equations. Which one you get will depend on the order in which you solve. Given that, the result of the final equation is not definite.

---

<div class="post-metadata">

**Author:** ![Darwins\_Finch](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/darwins_finch/32/20304_2.png) [@Darwins\_Finch](https://boards.straightdope.com/u/Darwins_Finch)\
**Post date:** [December 6, 2001, 8:59am UTC](https://boards.straightdope.com/t/algebra-thats-making-me-crazy/97187/7 "2001-12-06T08:59:16Z")

</div>

For the final answer, I get:

x + y + z + xyz = 36

or

x + y + z + xyz = -166

Since x, y and z can each have two values.  
For what it’s worth, the final polynomial I wound up with wasn’t ugly at all.

---

<div class="post-metadata">

**Author:** ![Achernar](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@Achernar](https://boards.straightdope.com/u/Achernar)\
**Post date:** [December 6, 2001, 9:12am UTC](https://boards.straightdope.com/t/algebra-thats-making-me-crazy/97187/8 "2001-12-06T09:12:22Z")

</div>

Typically, problems like this have a trick to them. Here’s how I solved it. Firstly, note that x + y + xy + 1 = (x + 1)(y + 1). With that in mind, you can rewrite the three equations thusly:

(x + 1)(y + 1) = 9  
(y + 1)(z + 1) = 16  
(z + 1)(x + 1) = 36

If you try to solve for (x + 1), (y + 1), and (z + 1), instead of x, y, and z, I think you’ll find this problem much simpler. There may be a way to get the answer cleverly without solving for any of those values explicitly, but I couldn’t find it. Some quick substitution on these gives:

(x + 1) = 9/2  
(y + 1) = 2  
(z + 1) = 8

I’m only taking the positive square roots here, but you can do it with the negative ones too. Not too difficult. Put another way,

2(x + 1) + 2(y + 1) + 2(z + 1) = 9 + 4 + 16 = 29, or  
2x + 2y + 2z = 23

Why the heck did I write it this way? Because if you add the original three equations (from **Bricker** ’s post) together, you get:

xy + yz + xz + 2x + 2y + 2z = 58, or  
xy + yz + xz = 35

Great. So? Well, if you multiply the first three equations I posted together, and take the (positive, again) square root, you get this:

(x + 1)(y + 1)(z + 1) = 72  
xyz + xy + yz + xz + x + y + z + 1 = 72  
xyz + x + y + z + 36 = 72  
xyz + x + y + z = 36

It would have been a bit easier to solve this problem for me if they’d asked for xyz - x - y - z. Are you sure they didn’t?

---

<div class="post-metadata">

**Author:** ![Bricker](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@Bricker](https://boards.straightdope.com/u/Bricker)\
**Post date:** [December 6, 2001, 2:55pm UTC](https://boards.straightdope.com/t/algebra-thats-making-me-crazy/97187/9 "2001-12-06T14:55:36Z")

</div>

Thanks for all the effort - especially Achenar, who seems to have the elegant “trick” I was sure was lurking around somewhere.

It’s only been twenty years since I was in an algebra class. I felt sure there was a way to do this without ending up with a second-order polynomial and needing the quadratic formula.

By the way, I am sure they asked for x + y + z + xyz – note the similar feel between that and the original equations.

- Rick
