Mathwizurd.com is created by David Witten, a mathematics and computer science student at Vanderbilt University. For more information, see the "About" page.

# Example and Introduction

Let's say you have the following:

MathJax TeX Test Page $$xy - x - y = 119$$ You can factor the left side, making it $$x(y-1) - y = 119$$ Now, it seems like you're stuck, but by adding 1 on each side, you can factor it. $$x(y-1) - y + 1 = 120$$ $$x(y-1) - (y-1) = 120$$ $$(x-1)(y-1) = 120$$ Now, if the problem is asking for integers, you can just look through the possible factor pairs of 120, and figure out what x and y should be.

# General Case and Rule

MathJax TeX Test Page $$xy + ax + by = c$$ You add $ab$ to both sides. $$x(y + a) + by + ab = c + ab$$ $$x(y + a) + b(y + a) = c + ab$$ $$(x + b)(y + a) = c + ab$$ So, when you do those problems, you have to be careful with the signs.
This trick is very useful, and it is commonly asked in AMC competitions.

# Another Example

## Find the length and width of a rectangle whose area is equal to its perimeter

MathJax TeX Test Page We start with our equations: $$P = 2a + 2b$$ $$A = ab$$ Now, you set them equal. $$2a + 2b = ab$$ $$ab - 2a - 2b = 0$$ Now, we use Simon's Favorite Factoring Trick, and we get $$(a-2)(b-2) = 4$$ So the pairs could be $1 \cdot 4$, $2 \cdot 2$, and $4 \cdot 1$ So, we get $\boxed{(3, 6), (4, 4), (6, 3)}$

# Most Common Cases

MathJax TeX Test Page $$xy + x + y + 1 = (x+1)(y+1)$$ $$xy - x - y + 1 = (x-1)(y-1)$$
David Witten