# Algebraic Greatest Common Factor

This article shows how to calculate algebraic Greatest Common Factor by means of simple examples.

In Case 1 the method produces a unique GCF (if there is one).

In Case 2 the method produces several possibilities, any one of which could be the GCF depending on parameters supplied.

In Case 3 the method solves for a given variable if there are two equations containing two variables.

## Case 1: the unique GCF

Let two functions (f1) and (f2) be defined as follows:

$3x^{3}+23x^{2}-19x-231$ .... (f1)

$6x^{3}+31x^{2}-162x-715$ .... (f2)

The aim is to produce the GCF of (f1) and (f2).

(f1) and (f2) both have maximum power of x equal to 3 and they are not identical. Continue. Use (f1) and (f2) to produce two functions in which the maximum power of x equals 2.

2(f1) - (f2), $15x^{2}+124x+253$ .... (f3)

715(f1) - 231(f2), $69x^{2}+844x+2167$ .... (f4)

(f3) and (f4) both have maximum power of x equal to 2 and they are not identical. Continue. Use (f3) and (f4) to produce two functions in which the maximum power of x equals 1.

15(f4) - 69(f3), $3x+11$ .... (f5)

2167(f3) - 253(f4), $3x+11$ .... (f6)

(f5) and (f6) are identical. Therefore $(3x+11)$ is the GCF of (f1) and (f2).

## Case 2: solving the cubic

We will use the method to predict whether or not a given cubic function contains equal roots and, if so, how to calculate equal roots.

Equal roots occur where the function and the slope of the function both equal 0.

{\begin{aligned}&ax^{3}+bx^{2}+cx+d\,\,\,\,....\,\,\,\,(f0)\\&3ax^{2}+2bx+c\,\,\,\,....\,\,\,\,(f1)\end{aligned}} The cubic is given by (f0) and its derivative by (f1). The aim is to find the GCF of (f0) and (f1).

(f0) contains maximum power of x equal to 3. (f1) contains maximum power of x equal to 2.

Combine (f0) and (f1) to produce a second function containing maximum power of x equal to 2.

$c(f0)-d(f1),\,\,\,\,(+ac)xx+(-3ad+bc)x+(-2bd+cc)\,\,\,\,....\,\,\,\,(f2)$ (f1) and (f2) both have maximum power of x equal to 2. Use (f1) and (f2) to produce two functions in which the maximum power of x equals 1.

{\begin{aligned}c(f2)-(-2bd+cc)(f1),\,\,\,\,&(+6abd-2acc)x+(-3acd+4bbd-bcc)\,\,\,\,....\,\,\,\,(f3)\\3a(f2)-ac(f1),\,\,\,\,&(-9ad+bc)x+(-6bd+2cc)\,\,\,\,....\,\,\,\,(f4)\end{aligned}} (f3) and (f4) both have maximum power of x equal to 1. Use (f3) and (f4) to produce two values in which the variable x has been eliminated.

{\begin{aligned}(+6abd-2acc)(f4)-(-9ad+bc)(f3),\,\,\,\,&-27aadd+18abcd-4accc-4bbbd+bbcc\,\,\,\,....\,\,\,\,(f5)\\(-6bd+2cc)(f3)-(-3acd+4bbd-bcc)(f4),\,\,\,\,&-27aadd+18abcd-4accc-4bbbd+bbcc\,\,\,\,....\,\,\,\,(f6)\end{aligned}} (f5) and (f6) are identical, showing that we have not made any mistakes. Note that (f5) is the discriminant of the solution of the cubic equation.

Look at (f3) and (f4) again. From (f3) and (f4):

{\begin{aligned}&x={\frac {-(-3acd+4bbd-bcc)}{(+6abd-2acc)}}={\frac {-(-6bd+2cc)}{(-9ad+bc)}}\\\\&-(-6bd+2cc)(+6abd-2acc)=-(-3acd+4bbd-bcc)(-9ad+bc)\\\\&(-6bd+2cc)(+6abd-2acc)-(-3acd+4bbd-bcc)(-9ad+bc)=0\\\\&(-6bd+2cc)(+6abd-2acc)-(-3acd+4bbd-bcc)(-9ad+bc)\\\\&=-27aacdd+18abccd-4acccc-4bbbcd+bbccc\\\\&=c(-27aadd+18abcd-4accc-4bbbd+bbcc)\\\end{aligned}} where $(-27aadd+18abcd-4accc-4bbbd+bbcc)$ = the discriminant of the solution of the cubic equation.

Example 1

$(+2)x^{3}+(-3)x^{2}+(-44)x+(+105)\ ....\ (e1)$ Produce (f3) and (f4) for (e1).

{\begin{aligned}+9327-2881x\ ....\ (f3)\\\\+2881-879x\ ....\ (f4)\end{aligned}} (f3) and (f4) are not identical. (f5) is non-zero and there are no equal roots.

Example 2

$(+4)x^{3}+(-40)x^{2}+(+133)x+(-147)\ ....\ (e2)$ Produce (f3) and (f4) for (e2).

{\begin{aligned}+7-2x\ ....\ (f3)\\\\+7-2x\ ....\ (f4)\end{aligned}} (f3) and (f4) are identical. (f5) is zero and (e2) contains exactly two roots equal to 7/2.

Example 3

$(+27)x^{3}+(+297)x^{2}+(+1089)x+(+1331)\ ....\ (e3)$ Produce (f3) and (f4) for (e3).

0 .... (f3)

0 .... (f4)

(f3) and (f4) are identical, although null. (f5) is zero and (e3) contains equal roots. To identify the roots, produce (f1) and (f2) for (e3).

{\begin{aligned}+121+66x+9xx\ ....\ (f1)\\\\+121+66x+9xx\ ....\ (f2)\end{aligned}} (f1) and (f2) are identical with discriminant 0, as expected.

From $(f1),\ \ x=-66/(2*9)=-11/3,$ and (e3) contains three roots equal to -11/3.

## Case 3: Solving for a given variable in two equations with two unknowns.

Let two functions in $p$ and $Q$ be defined as follows:

{\begin{aligned}ap^{3}+3apQ+bp^{2}+bQ+cp+d\ ....\ (f0)\\3ap^{2}+aQ+2bp+c\ ....\ (f1)\end{aligned}} In functions (f0) and (f1) the values $a,b,c,d$ are constants. The aim is to eliminate $p$ and produce a function in $Q$ . Express both functions as functions in $p$ .

{\begin{aligned}(+a)ppp+(+b)pp+(+3Qa+c)p+(+Qb+d)\ ....\ (f2)\\(+3a)pp+(+2b)p+(+Qa+c)\ ....\ (f3)\end{aligned}} (f2) contains maximum power of $p$ equal to 3. (f3) contains maximum power of $p$ equal to 2.

Combine (f2) and (f3) to produce a second function containing maximum power of $p$ equal to 2.

{\begin{aligned}(+Qa+c)(f2)-(+Qb+d)(f3),\\&\\(+Qaa+ac)&pp+\\(-2Qab-3ad+bc)&p+\\(+3QQaa+4Qac-2Qbb-2bd+cc)&\ ....\ (f4)\end{aligned}} (f3) and (f4) both have maximum power of $p$ equal to 2. Use (f3) and (f4) to produce two functions in which the maximum power of $p$ equals 1.

{\begin{aligned}(3a)(f4)-(+Qaa+ac)(f3),\\&\\(-8Qab-9ad+bc)&p+\\(+8QQaa+10Qac-6Qbb-6bd+2cc)&\ ....\ (f5)\\\\(+Qa+c)(f4)-(+3QQaa+4Qac-2Qbb-2bd+cc)(f3),\\&\\(-8QQaaa-10Qaac+6Qabb+6abd-2acc)&p+\\(-8QQaab-3Qaad-9Qabc+4Qbbb-3acd+4bbd-bcc)&\ ....\ (f6)\end{aligned}} (f5) and (f6) both have maximum power of $p$ equal to 1. Use (f5) and (f6) to produce two values in which the variable $p$ has been eliminated.

from (f5), let

$c15=-8Qab-9ad+bc,$ and let

$c05=+8QQaa+10Qac-6Qbb-6bd+2cc.$ from (f6), let

$c16=-8QQaaa-10Qaac+6Qabb+6abd-2acc,$ and let

$c06=-8QQaab-3Qaad-9Qabc+4Qbbb-3acd+4bbd-bcc.$ {\begin{aligned}&(c15)(f6)-(c16)(f5),\\\\&+64QQQQaaaaa+160QQQaaaac-32QQQaaabb+132QQaaacc-56QQaabbc+4QQabbbb+27Qaaadd\\&-18Qaabcd+40Qaaccc+4Qabbbd-25Qabbcc+4Qbbbbc+27aacdd-18abccd+4acccc+4bbbcd-bbccc\dots (f7)\\\\&(c06)(f5)-(c05)(f6),\\\\&+64QQQQaaaaa+160QQQaaaac-32QQQaaabb+132QQaaacc-56QQaabbc+4QQabbbb+27Qaaadd\\&-18Qaabcd+40Qaaccc+4Qabbbd-25Qabbcc+4Qbbbbc+27aacdd-18abccd+4acccc+4bbbcd-bbccc\dots (f8)\end{aligned}} (f7) and (f8) are identical. $p$ has been eliminated from (f7). Express (f7) as a function in Q.

{\begin{aligned}(+64aaaaa)&Q^{4}+\\(+160aaaac-32aaabb)&Q^{3}+\\(+132aaacc-56aabbc+4abbbb)&Q^{2}+\\(+27aaadd-18aabcd+40aaccc+4abbbd-25abbcc+4bbbbc)&Q+\\(+27aacdd-18abccd+4acccc+4bbbcd-bbccc)&\ \dots \ (f9)\end{aligned}} The constant term of (f9)

{\begin{aligned}&=+27aacdd-18abccd+4acccc+4bbbcd-bbccc\\&=c(+27aadd-18abcd+4accc+4bbbd-bbcc)\end{aligned}} where $(+27aadd-18abcd+4accc+4bbbd-bbcc)$ is the discriminant of the solution of the cubic.

This method has combined (f0) and (f1) to eliminate $p$ and produce a function in Q.