Difference between revisions of "Simon's Favorite Factoring Trick"

(Olympiad)
m (Intermediate)
 
(23 intermediate revisions by 16 users not shown)
Line 1: Line 1:
 +
'''Simon's Favorite Factoring Trick''' ('''SFFT''') is often used in [[Diophantine equation]]s where factoring is needed, applicable for Diophantine equations of the form <math>xy+jx-ky = a</math>, for integer constants <math>j</math>, <math>k</math>, and <math>a</math>, where there is a constant on one side of the equation and on the other side and a product of variables with each of those variables in linear terms. Simon's Favorite Factoring Trick was developed by AoPS user [{{SERVER}}/community/user/1233 ComplexZeta], or Dr. Simon Rubinstein-Salzedo.
  
==The General Statement==
+
== Statement ==
Simon's Favorite Factoring Trick (SFFT) (made by AoPS user [https://artofproblemsolving.com/community/user/1233 Complex Zeta]) is often used in a Diophantine equation where factoring is needed. The most common form it appears is when there is a constant on one side of the equation and a product of variables with each of those variables in a linear term on the other side. An example would be: <cmath>xy+66x-88y=23333</cmath>where <math>23333</math> is the constant term, <math>xy</math> is the product of the variables, <math>66x</math> and <math>-88y</math> are the variables in linear terms.
 
  
 
+
Let's put it in general terms. We have an equation <math>xy+jx+ky=a</math>, where <math>j</math>, <math>k</math>, and <math>a</math> are integer constants. Simon's Favorite Factoring Trick states that this equation can be factored into the equation <cmath>(x+k)(y+j)=a+jk</cmath>  
Let's put it in general terms. We have an equation <math>xy+jx+ky=a</math>, where <math>j</math>, <math>k</math>, and <math>a</math> are integer constants, and the coefficient of xy must be 1(If it is not 1, then divide the coefficient off of the equation.). According to Simon's Favorite Factoring Trick, this equation can be transformed into: <cmath>(x+k)(y+j)=a+jk</cmath>  
+
For example, <math>xy+66x-88y=23333</math> is the same as: <cmath>(x-88)(y+66)=(23333)+(-88)(66)</cmath>
Using the previous example, <math>xy+66x-88y=23333</math> is the same as: <cmath>(x-88)(y+66)=(23333)+(-88)(66)</cmath>
 
 
 
 
 
If this is confusing or you would like to know the thought process behind SFFT, see this eight-minute video by Richard Rusczyk from AoPS: https://www.youtube.com/watch?v=0nN3H7w2LnI. For the thought process, start from https://youtu.be/0nN3H7w2LnI?t=366.
 
  
 
Here is another way to look at it.
 
Here is another way to look at it.
Line 18: Line 14:
 
This is important because this keeps showing up in number theory problems. Let's look at this problem below:  
 
This is important because this keeps showing up in number theory problems. Let's look at this problem below:  
  
Determine all possible ordered pairs of positive integers <math>(x,y)</math> that are solutions to the equation <math>\frac{4}{x}+\frac{5}{y}=1</math>. (2021 CEMC Galois #4b)
+
Determine all possible ordered pairs of positive integers <math>(x,y)</math> that are solutions to the equation <math>\frac{4}{x}+\frac{5}{y}=1</math>. ([//cemc.uwaterloo.ca/sites/default/files/documents/2021/2021GaloisSolution.html 2021 CEMC Galois #4b])
  
Let's remove the denominators: <math>4y+5x=xy</math>. Then <math>xy-5x-4y=0</math>. Take out the <math>x</math>: <math>x(y-5)-4(y-5)=0+20</math> (notice how I artificially grouped up the <math>y</math> terms by adding <math>4*5=20</math>).  
+
Let's remove the denominators: <math>4y+5x=xy</math>. Then <math>xy-5x-4y=0</math>. Take out the <math>x</math>: <math>x(y-5)-4(y-5)=0+20</math> (notice how I artificially grouped up the <math>y</math> terms by adding <math>4\cdot5=20</math>).  
  
 
Now, <math>(x-4)(y-5)=20</math> (you can just do SFFT directly, but I am guiding you through the thinking behind SFFT). Now we use factor pairs to solve this problem.
 
Now, <math>(x-4)(y-5)=20</math> (you can just do SFFT directly, but I am guiding you through the thinking behind SFFT). Now we use factor pairs to solve this problem.
  
Look at all factor pairs of 20: <math>1*20, 2*10, 4*5, 5*4, 10*2, 20*1</math>. The first factor is for <math>x</math>, the second is for <math>y</math>. Solving for each of the equations, we have the solutions as <math>\boxed{(5, 25), (24, 6), (6, 15), (14, 7), (8, 10), (9, 9)}</math>.
+
Look at all factor pairs of 20: <math>1\cdot20, 2\cdot10, 4\cdot5, 5\cdot4, 10\cdot2, 20\cdot1</math>. The first factor is for <math>x</math>, the second is for <math>y</math>. Solving for each of the equations, we have the solutions as <math>\boxed{(5, 25), (24, 6), (6, 15), (14, 7), (8, 10), (9, 9)}</math>.
 +
 
 +
== Applications ==
 +
 
 +
This factorization frequently shows up on contest problems, especially those heavy on algebraic manipulation. Usually <math>x</math> and <math>y</math> are variables and <math>j,k</math> are known constants. Sometimes, you have to notice that the variables are not in the form <math>x</math> and <math>y</math>. Additionally, you almost always have to subtract or add the <math>x, y,</math> and <math>xy</math> terms to one side so you can isolate the constant and make the equation factorable. It can be used to solve more than algebra problems, sometimes going into other topics such as number theory. When coefficient of <math>xy</math> is not <math>1</math>, you can sometimes achieve an equation that can be factored by dividing the coefficient off of the equation.
  
For more info on the solution: https://www.cemc.uwaterloo.ca/contests/past_contests/2021/2021GaloisSolution.pdf
+
== Problems ==
  
== Applications ==
+
=== Introductory ===
This factorization frequently shows up on contest problems, especially those heavy on algebraic manipulation. Usually <math>x</math> and <math>y</math> are variables and <math>j,k</math> are known constants. Sometimes, you have to realize that the variables are not in the form x and y. Additionally, you almost always have to subtract or add the x, y, and xy terms to one side so you can isolate the constant and make the equation factorable.
 
  
== Fun Practice Problems ==
+
* Two different [[prime number]]s between <math>4</math> and <math>18</math> are chosen. When their sum is subtracted from their product, which of the following numbers could be obtained?
===Introductory===
 
*Two different [[prime number]]s between <math>4</math> and <math>18</math> are chosen. When their sum is subtracted from their product, which of the following numbers could be obtained?
 
  
 
<math> \mathrm{(A) \ 22 } \qquad \mathrm{(B) \ 60 } \qquad \mathrm{(C) \ 119 } \qquad \mathrm{(D) \ 180 } \qquad \mathrm{(E) \ 231 }  </math>
 
<math> \mathrm{(A) \ 22 } \qquad \mathrm{(B) \ 60 } \qquad \mathrm{(C) \ 119 } \qquad \mathrm{(D) \ 180 } \qquad \mathrm{(E) \ 231 }  </math>
Line 39: Line 36:
 
([[2000 AMC 12/Problem 6|Source]])
 
([[2000 AMC 12/Problem 6|Source]])
  
===Intermediate===
+
=== Intermediate ===
  
==Problem 1==
+
* If <math>kn+54k+2n+108</math> has a remainder of <math>3</math> when divided by <math>5</math>, and <math>k</math> has a remainder of <math>1</math> when divided by <math>5</math>, find the value of the remainder when <math>n</math> is divided by <math>5</math>.
*If <math>kn+54k+2n+108</math> has a remainder of <math>4</math> when divided by <math>5</math>, and <math>k</math> has a remainder of <math>1</math> when divided by <math>5</math>, find the value of the remainder of when <math>n</math> is divided by <math>5</math>.
 
  
<math> \mathrm{(A) \ 1 } \qquad \mathrm{(B) \ 0 } \qquad \mathrm{(C) \ 4 } \qquad \mathrm{(D) \ 2 } \qquad \mathrm{(E) \ 3 } </math>
+
<math> \mathrm{(A) \ 1 } \qquad \mathrm{(B) \ 0 } \qquad \mathrm{(C) \ 4 } \qquad \mathrm{(D) \ 2 } \qquad \mathrm{(E) \ 3 }</math>
  
- icecreamrolls8
 
  
==Solution==
 
We have solution <math>\boxed{(C)}</math>. Note that <math>kn+54k+2n+108</math> can be factored into <cmath>(k+2)(n+54)</cmath> using Simon's Favorite Factoring Trick. Now, look at n. Then, since the problem tells us that <math>k</math> has a remainder of <math>1</math> when divided by 5, we see that the <math>(k+2)</math> factor in the <math>(k+2)(n+54)</math> expression has a remainder of <math>3</math> when divided by 5. Now, the <math>(n+54)</math> must have a remainder of <math>3</math> when divided by <math>5</math> as well (because then the main expression has a remainder of <math>4</math> when divided by <math>5</math>). Therefore, since 54 has a remainder of <math>4</math> when divided by <math>5</math>, <math>n</math> must have a remainder of <math>4</math>, so that the entire factor has a remainder of <math>3</math> when divided by <math>5</math>.
 
  
- icecreamrolls8
+
* <math>m, n</math> are integers such that <math>m^2 + 3m^2n^2 = 30n^2 + 517</math>. Find <math>3m^2n^2</math>.
 
 
==Problem 2==
 
*<math>m, n</math> are integers such that <math>m^2 + 3m^2n^2 = 30n^2 + 517</math>. Find <math>3m^2n^2</math>.
 
  
 
([[1987 AIME Problems/Problem 5|Source]])
 
([[1987 AIME Problems/Problem 5|Source]])
  
==Problem 3==
+
* A rectangular floor measures <math>a</math> by <math>b</math> feet, where <math>a</math> and <math>b</math> are positive integers with <math>b > a</math>. An artist paints a rectangle on the floor with the sides of the rectangle parallel to the sides of the floor. The unpainted part of the floor forms a border of width <math>1</math> foot around the painted rectangle and occupies half of the area of the entire floor. How many possibilities are there for the ordered pair <math>(a,b)</math>?
  
([[2008 AMC 12B Problems/Problem 16|Source]]) A rectangular floor measures <math>a</math> by <math>b</math> feet, where <math>a</math> and <math>b</math> are positive integers with <math>b > a</math>. An artist paints a rectangle on the floor with the sides of the rectangle parallel to the sides of the floor. The unpainted part of the floor forms a border of width <math>1</math> foot around the painted rectangle and occupies half of the area of the entire floor. How many possibilities are there for the ordered pair <math>(a,b)</math>?
+
([[2008 AMC 12B Problems/Problem 16|Source]])
  
Solution: <math>A_{outer}=ab</math>
+
=== Olympiad ===
  
<math>A_{inner}=(a-2)(b-2)</math>
+
* The integer <math>N</math> is positive. There are exactly <math>2005</math> ordered pairs <math>(x, y)</math> of positive integers satisfying:
 
 
<math>A_{outer}=2A_{inner}</math>
 
 
 
<math>ab=2(a-2)(b-2)=2ab-4a-4b+8</math>
 
 
 
<math>0=ab-4a-4b+8</math>
 
 
 
By Simon's Favorite Factoring Trick:
 
 
 
<math>8=ab-4a-4b+16=(a-4)(b-4)</math>
 
 
 
Since <math>8=1\times8</math> and <math>8=2\times4</math> are the only positive factorings of <math>8</math>.
 
 
 
<math>(a,b)=(5,12)</math> or <math>(a,b)=(6,8)</math> yielding <math>\Rightarrow\textbf{(B)}</math> <math>2</math> solutions. Notice that because <math>b>a</math>, the reversed pairs are invalid.
 
 
 
===Olympiad===
 
 
 
*The integer <math>N</math> is positive. There are exactly <math>2005</math> ordered pairs <math>(x, y)</math> of positive integers satisfying:
 
  
 
<cmath>\frac 1x +\frac 1y = \frac 1N</cmath>
 
<cmath>\frac 1x +\frac 1y = \frac 1N</cmath>
Line 88: Line 60:
 
Prove that <math>N</math> is a perfect square.  
 
Prove that <math>N</math> is a perfect square.  
  
Solution: https://socratic.org/questions/given-the-integer-n-0-there-are-exactly-2005-ordered-pairs-x-y-of-positive-integ
+
([//bmos.ukmt.org.uk/home/bmo2-2005.pdf Source])
  
Source: British Mathematical Olympiad Round 2 #1 https://bmos.ukmt.org.uk/home/bmo2-2005.pdf
+
== See Also ==
  
== See More==
+
* [[Number Theory]]
 +
* [[Diophantine equation]]
 
* [[Algebra]]
 
* [[Algebra]]
 
* [[Factoring]]
 
* [[Factoring]]
 +
 +
=== External Links ===
 +
 +
* [{{SERVER}}/videos/algebra1/chapter11/346 Video on AoPS]
  
 
[[Category:Number theory]]
 
[[Category:Number theory]]
 
[[Category:Theorems]]
 
[[Category:Theorems]]

Latest revision as of 14:41, 8 June 2025

Simon's Favorite Factoring Trick (SFFT) is often used in Diophantine equations where factoring is needed, applicable for Diophantine equations of the form $xy+jx-ky = a$, for integer constants $j$, $k$, and $a$, where there is a constant on one side of the equation and on the other side and a product of variables with each of those variables in linear terms. Simon's Favorite Factoring Trick was developed by AoPS user ComplexZeta, or Dr. Simon Rubinstein-Salzedo.

Statement

Let's put it in general terms. We have an equation $xy+jx+ky=a$, where $j$, $k$, and $a$ are integer constants. Simon's Favorite Factoring Trick states that this equation can be factored into the equation \[(x+k)(y+j)=a+jk\] For example, $xy+66x-88y=23333$ is the same as: \[(x-88)(y+66)=(23333)+(-88)(66)\]

Here is another way to look at it.

Consider the equation $xy+5x+6y=30$.Let's start to factor the first group out: $x(y+5)+6y=30$.

How do we group the last term so we can factor by grouping? Notice that we can add $30$ to both sides. This yields $x(y+5)+6(y+5)=60$. Now, we can factor as $(x+6)(y+5)=60$.

This is important because this keeps showing up in number theory problems. Let's look at this problem below:

Determine all possible ordered pairs of positive integers $(x,y)$ that are solutions to the equation $\frac{4}{x}+\frac{5}{y}=1$. (2021 CEMC Galois #4b)

Let's remove the denominators: $4y+5x=xy$. Then $xy-5x-4y=0$. Take out the $x$: $x(y-5)-4(y-5)=0+20$ (notice how I artificially grouped up the $y$ terms by adding $4\cdot5=20$).

Now, $(x-4)(y-5)=20$ (you can just do SFFT directly, but I am guiding you through the thinking behind SFFT). Now we use factor pairs to solve this problem.

Look at all factor pairs of 20: $1\cdot20, 2\cdot10, 4\cdot5, 5\cdot4, 10\cdot2, 20\cdot1$. The first factor is for $x$, the second is for $y$. Solving for each of the equations, we have the solutions as $\boxed{(5, 25), (24, 6), (6, 15), (14, 7), (8, 10), (9, 9)}$.

Applications

This factorization frequently shows up on contest problems, especially those heavy on algebraic manipulation. Usually $x$ and $y$ are variables and $j,k$ are known constants. Sometimes, you have to notice that the variables are not in the form $x$ and $y$. Additionally, you almost always have to subtract or add the $x, y,$ and $xy$ terms to one side so you can isolate the constant and make the equation factorable. It can be used to solve more than algebra problems, sometimes going into other topics such as number theory. When coefficient of $xy$ is not $1$, you can sometimes achieve an equation that can be factored by dividing the coefficient off of the equation.

Problems

Introductory

  • Two different prime numbers between $4$ and $18$ are chosen. When their sum is subtracted from their product, which of the following numbers could be obtained?

$\mathrm{(A) \ 22 } \qquad \mathrm{(B) \ 60 } \qquad \mathrm{(C) \ 119 } \qquad \mathrm{(D) \ 180 } \qquad \mathrm{(E) \ 231 }$

(Source)

Intermediate

  • If $kn+54k+2n+108$ has a remainder of $3$ when divided by $5$, and $k$ has a remainder of $1$ when divided by $5$, find the value of the remainder when $n$ is divided by $5$.

$\mathrm{(A) \ 1 } \qquad \mathrm{(B) \ 0 } \qquad \mathrm{(C) \ 4 } \qquad \mathrm{(D) \ 2 } \qquad \mathrm{(E) \ 3 }$


  • $m, n$ are integers such that $m^2 + 3m^2n^2 = 30n^2 + 517$. Find $3m^2n^2$.

(Source)

  • A rectangular floor measures $a$ by $b$ feet, where $a$ and $b$ are positive integers with $b > a$. An artist paints a rectangle on the floor with the sides of the rectangle parallel to the sides of the floor. The unpainted part of the floor forms a border of width $1$ foot around the painted rectangle and occupies half of the area of the entire floor. How many possibilities are there for the ordered pair $(a,b)$?

(Source)

Olympiad

  • The integer $N$ is positive. There are exactly $2005$ ordered pairs $(x, y)$ of positive integers satisfying:

\[\frac 1x +\frac 1y = \frac 1N\]

Prove that $N$ is a perfect square.

(Source)

See Also

External Links