Skip to content

Algebraic Identities and Equations

Updated Β· Equations updated; Sections updated; Examples or practice updated; Explanations expanded What changed?
  1. β€” Equations updated; Sections updated; Examples or practice updated; Explanations expanded

Often times, a nasty expression or equation requires factoring to simplify and solve.

One of the most common factorizations are the difference of squares and cubes factorization:

a2βˆ’b2=(aβˆ’b)(a+b),a3Β±b3=(aΒ±b)(a2βˆ“ab+b2).a^2-b^2=(a-b)(a+b),\qquad a^3\pm b^3=(a\pm b)(a^2\mp ab+b^2).

// add like a general form of a^n + b^n, as well as the fact that any polynomial can be factored up to quadratics

Another useful (lesser-known) factorization is Sophie Germain’s identity:

a4+4b4=(a2βˆ’2ab+2b2)(a2+2ab+2b2).a^4+4b^4=(a^2-2ab+2b^2)(a^2+2ab+2b^2).

It comes from adding and subtracting 4a2b24a^2b^2 to create a difference of squares. This is a useful move when a sum has almost enough terms to be a perfect square, and can be manipulated for sums of fourth powers.

Example. Without expanding four large factors, evaluate 19β‹…20β‹…21β‹…22+1\sqrt{19\cdot20\cdot21\cdot22+1}.

Pair the outside numbers and the inside numbers:

19β‹…22=418,20β‹…21=420.19\cdot22=418,\qquad20\cdot21=420.

The product is therefore one below a square:

418β‹…420+1=(419βˆ’1)(419+1)+1=4192.418\cdot420+1=(419-1)(419+1)+1=419^2.

The required square root is 419419.

// add an AMC/AIME problem as an example

// add a section on completing the square and stuff

Simon’s Favorite Factoring Trick, usually shortened to SFFT, completes a product in the same way that completing the square creates a square. If an equation contains a mixed term and two linear terms, compare it with

(x+b)(y+a)=xy+ax+by+ab.(x+b)(y+a)=xy+ax+by+ab.

Thus adding the missing constant turns xy+ax+by=cxy+ax+by=c into (x+b)(y+a)=c+ab(x+b)(y+a)=c+ab. The coefficients cross over: the coefficient of xx becomes the constant added to yy. Expanding the proposed product once is a good way to check the placement.

For a leading coefficient other than one, multiply first:

Axy+Bx+Cy=D⟹(Ax+C)(Ay+B)=AD+BC.Axy+Bx+Cy=D \quad\Longrightarrow\quad (Ax+C)(Ay+B)=AD+BC.

The transformed factors carry extra restrictions. If the original variables are integers, the first factor must be CC modulo AA and the second must be BB modulo AA. Listing every divisor pair without checking these restrictions can create false solutions.

Example. Find every positive integer ordered pair satisfying xyβˆ’3xβˆ’2y=20xy-3x-2y=20.

The missing product constant is six:

(xβˆ’2)(yβˆ’3)=26.(x-2)(y-3)=26.

The factors have the same sign. They cannot both be negative: positivity would force xβˆ’2=βˆ’1x-2=-1 and yβˆ’3∈{βˆ’2,βˆ’1}y-3\in\{-2,-1\}, whose product is at most two. Therefore both factors are positive. The ordered positive divisor pairs of twenty-six give

(x,y)=(3,29),(4,16),(15,5),(28,4).(x,y)=(3,29),(4,16),(15,5),(28,4).

These are all the possibilities because every original solution determines one of those factor pairs. Expanding the completed product verifies the reverse implication.

A particularly useful disguised version involves reciprocals. Clearing denominators in 1/x+1/y=1/n1/x+1/y=1/n gives xy=n(x+y)xy=n(x+y), which becomes

(xβˆ’n)(yβˆ’n)=n2.(x-n)(y-n)=n^2.

If x,y,nx,y,n are positive, each of x,yx,y is greater than nn: a reciprocal term already equal to or greater than 1/n1/n leaves no room for the other positive term.

Example. Find the number of positive integer ordered pairs satisfying 1/x+1/y=1/121/x+1/y=1/12.

SFFT gives (xβˆ’12)(yβˆ’12)=144(x-12)(y-12)=144. Each positive divisor dd of 144144 gives exactly one pair

x=12+d,y=12+144d.x=12+d,\qquad y=12+\frac{144}{d}.

Since 144=2432144=2^4 3^2, it has (4+1)(2+1)=15(4+1)(2+1)=15 positive divisors, so there are fifteen ordered pairs. For unordered pairs there would be eight: seven reversed pairs and the single diagonal solution x=y=24x=y=24.


The binomial theorem expands a nonnegative integer power without multiplying the factors one at a time:

(a+b)n=βˆ‘k=0n(nk)anβˆ’kbk.(a+b)^n=\sum_{k=0}^n\binom nk a^{n-k}b^k.

The term with bkb^k occurs when exactly kk of the nn factors contribute their bb. There are (nk)\binom nk choices of those factors. This explains both the coefficient and the exponents. The coefficients in row nn are symmetric because choosing the bb factors also determines the remaining aa factors.

Use the general term to extract a requested coefficient. Expanding every term wastes time and makes exponent mistakes harder to find. In a product of two expansions, first determine which exponents can combine to produce the required total.

Example. Find the constant term in (2xβˆ’xβˆ’2)9(2x-x^{-2})^9.

If the second term is chosen kk times, the resulting term is

(9k)(2x)9βˆ’k(βˆ’xβˆ’2)k=(9k)29βˆ’k(βˆ’1)kx9βˆ’3k.\binom9k(2x)^{9-k}(-x^{-2})^k =\binom9k2^{9-k}(-1)^k x^{9-3k}.

A constant requires 9βˆ’3k=09-3k=0, so only k=3k=3 contributes. The constant term is

βˆ’(93)26=βˆ’5376.-\binom93 2^6=-5376.

Notice that both the exponent equation and the sign are needed. The coefficient alone does not determine whether the contribution is positive.

The same argument extends to a sum of several terms. The coefficient of aibjcka^ib^jc^k in (a+b+c)n(a+b+c)^n, with i+j+k=ni+j+k=n, is n!/(i!j!k!)n!/(i!j!k!). Choose the positions of the first type, then the second; the remaining positions contain the third. This multinomial theorem is useful for coefficient problems and arrangements with repeated objects.

Substitution into the binomial theorem also evaluates sums of coefficients. Setting a=b=1a=b=1 gives βˆ‘k(nk)=2n\sum_k\binom nk=2^n, while setting a=1,b=βˆ’1a=1,b=-1 gives βˆ‘k(βˆ’1)k(nk)=0\sum_k(-1)^k\binom nk=0 for nβ‰₯1n\ge1. Adding and subtracting these two equations separates the even-index and odd-index coefficients.

Example. Evaluate βˆ‘k=010k(10k)\sum_{k=0}^{10}k\binom{10}{k} without calculating eleven individual terms.

Differentiate (1+t)10=βˆ‘k(10k)tk(1+t)^{10}=\sum_k\binom{10}{k}t^k, then multiply by tt:

10t(1+t)9=βˆ‘k=010k(10k)tk.10t(1+t)^9=\sum_{k=0}^{10}k\binom{10}{k}t^k.

At t=1t=1, the required sum is 10β‹…29=512010\cdot2^9=5120. Differentiating twice would produce the weight k(kβˆ’1)k(k-1); to handle k2k^2, write it as k(kβˆ’1)+kk(k-1)+k.


A substitution should reduce the number of different expressions you need to track. For a reciprocal expression, let t=x+1/xt=x+1/x with x≠0x\ne0. Then

x2+1x2=t2βˆ’2,x3+1x3=t3βˆ’3t.x^2+\frac1{x^2}=t^2-2,\qquad x^3+\frac1{x^3}=t^3-3t.

Remember the possible values of the new variable. For real nonzero xx, we have tβ‰€βˆ’2t\le-2 or tβ‰₯2t\ge2; if x>0x>0, only tβ‰₯2t\ge2 is possible.

For expressions symmetric in two variables, use their sum s=x+ys=x+y and product p=xyp=xy:

x2+y2=s2βˆ’2p,x3+y3=s3βˆ’3ps.x^2+y^2=s^2-2p,\qquad x^3+y^3=s^3-3ps.

The individual variables are roots of u2βˆ’su+p=0u^2-su+p=0, so real values require s2β‰₯4ps^2\ge4p.

Example. Positive real numbers x,yx,y satisfy x+y=7x+y=7 and x2+y2=29x^2+y^2=29. Find x3+y3x^3+y^3.

Use the square of the sum to find the product:

49=29+2xy⟹xy=10.49=29+2xy\quad\Longrightarrow\quad xy=10.

Then

x3+y3=73βˆ’3(10)(7)=133.x^3+y^3=7^3-3(10)(7)=133.

Solving separately for xx and yy would add work without helping us find the requested symmetric expression.

We can also solve these types of equations using Newton’s Sums, which is explained in detail in the polynomials page.


For three variables, introduce the elementary symmetric quantities

s=x+y+z,q=xy+yz+zx,p=xyz.s=x+y+z,\qquad q=xy+yz+zx,\qquad p=xyz.

Then x2+y2+z2=s2βˆ’2qx^2+y^2+z^2=s^2-2q and

x3+y3+z3=s3βˆ’3sq+3p.x^3+y^3+z^3=s^3-3sq+3p.

A related factorization is

x3+y3+z3βˆ’3xyz=(x+y+z)(x2+y2+z2βˆ’xyβˆ’yzβˆ’zx).x^3+y^3+z^3-3xyz =(x+y+z)(x^2+y^2+z^2-xy-yz-zx).

It is particularly strong when the sum is zero. Instead of finding the individual variables, the entire cubic expression collapses to a product. Also,

x2+y2+z2βˆ’xyβˆ’yzβˆ’zx=12((xβˆ’y)2+(yβˆ’z)2+(zβˆ’x)2),x^2+y^2+z^2-xy-yz-zx =\frac12\bigl((x-y)^2+(y-z)^2+(z-x)^2\bigr),

so for real variables this factor is nonnegative and vanishes precisely when the three variables are equal. A factorization can therefore carry information about equality cases as well as numerical values.

Example. Real numbers x,y,zx,y,z satisfy x+y+z=0x+y+z=0 and xyz=18xyz=18. Find x3+y3+z3x^3+y^3+z^3.

The first factor in the displayed identity is zero, so x3+y3+z3=3xyz=54x^3+y^3+z^3=3xyz=54. The conditions do not identify one ordered triple, but they do identify the requested symmetric expression.

For two-variable symmetric systems, the discriminant can be more useful than solving the system. If x+y=sx+y=s and xy=pxy=p, the variables are roots of t2βˆ’st+p=0t^2-st+p=0. Real solutions require s2βˆ’4pβ‰₯0s^2-4p\ge0; positive solutions additionally require a positive sum and product.

Example. Find every real value of kk for which real numbers x,yx,y satisfy x+y=kx+y=k and x2+y2=6x^2+y^2=6.

The product is p=(k2βˆ’6)/2p=(k^2-6)/2. Hence the discriminant of the quadratic with roots x,yx,y is

k2βˆ’4p=12βˆ’k2.k^2-4p=12-k^2.

It is nonnegative exactly when βˆ’12≀k≀12-\sqrt{12}\le k\le\sqrt{12}. Conversely, for any such kk the roots of that quadratic are real and have the required sum and square sum, proving sufficiency as well as necessity.


Adding or subtracting equations can expose a factor that substitution would bury. If swapping xx and yy exchanges the two equations, subtracting them often produces a factor of xβˆ’yx-y. Split into cases instead of dividing by that factor and losing solutions.

Example. Find all real ordered pairs satisfying x2+y=7x^2+y=7 and y2+x=7y^2+x=7.

Subtracting gives

x2βˆ’y2+yβˆ’x=(xβˆ’y)(x+yβˆ’1)=0.x^2-y^2+y-x=(x-y)(x+y-1)=0.

If x=yx=y, then x2+xβˆ’7=0x^2+x-7=0, giving the pairs

(βˆ’1+292,βˆ’1+292),(βˆ’1βˆ’292,βˆ’1βˆ’292).\left(\frac{-1+\sqrt{29}}2,\frac{-1+\sqrt{29}}2\right),\qquad \left(\frac{-1-\sqrt{29}}2,\frac{-1-\sqrt{29}}2\right).

If x+y=1x+y=1, substitute y=1βˆ’xy=1-x into the first equation:

x2βˆ’xβˆ’6=0.x^2-x-6=0.

This gives (x,y)=(3,βˆ’2)(x,y)=(3,-2) or (βˆ’2,3)(-2,3). Substitution verifies all four pairs in both original equations.


For exponential equations with a common base, replace the repeated power by one variable. For logarithms with different bases, change to a shared base:

log⁑ab=ln⁑bln⁑a,a>0,aβ‰ 1,b>0.\log_a b=\frac{\ln b}{\ln a},\qquad a>0,\quad a\ne1,\quad b>0.

In particular, reciprocals of logarithms often turn products in the base into sums.

Example. Let x,y,z,w>1x,y,z,w>1 satisfy log⁑xw=12\log_xw=12, log⁑yw=18\log_yw=18, and log⁑xyzw=4\log_{xyz}w=4. Find log⁑zw\log_zw.

Change the base to ww. The given equations become

log⁑wx=112,log⁑wy=118,log⁑w(xyz)=14.\log_wx=\frac1{12},\qquad\log_wy=\frac1{18},\qquad \log_w(xyz)=\frac14.

Using the product rule,

log⁑wz=14βˆ’112βˆ’118=19.\log_wz=\frac14-\frac1{12}-\frac1{18}=\frac19.

Thus log⁑zw=9\log_zw=9.

Example. Find all real solutions of 4xβˆ’5β‹…2x+4=04^x-5\cdot2^x+4=0.

Let t=2x>0t=2^x>0. Since 4x=t24^x=t^2, the equation becomes (tβˆ’1)(tβˆ’4)=0(t-1)(t-4)=0. Thus 2x=12^x=1 or 2x=42^x=4, giving x=0x=0 or x=2x=2. Both values satisfy the original equation.


Squaring can turn a false equality into a true one because a2=b2a^2=b^2 allows both a=ba=b and a=βˆ’ba=-b. Isolate the radical first, record the sign condition, and check the candidates in the original equation.

Example. Find all real solutions of x+6=x\sqrt{x+6}=x.

The left side is nonnegative, so any solution has xβ‰₯0x\ge0. Squaring gives

x+6=x2⟹(xβˆ’3)(x+2)=0.x+6=x^2\quad\Longrightarrow\quad(x-3)(x+2)=0.

The candidate x=βˆ’2x=-2 violates xβ‰₯0x\ge0. Checking x=3x=3 gives 9=3\sqrt9=3, so the only solution is 33.


When an expression contains two similar radicals, multiplication by a conjugate can remove them:

(u+v)(uβˆ’v)=uβˆ’v.(\sqrt u+\sqrt v)(\sqrt u-\sqrt v)=u-v.

For A+2B\sqrt{A+2\sqrt B}, try m+n\sqrt m+\sqrt n with m,nβ‰₯0m,n\ge0. Squaring shows that the required conditions are m+n=Am+n=A and mn=Bmn=B. Thus the same sum-and-product method used for symmetric systems also simplifies radicals.

Example. Simplify 7+43+7βˆ’43\sqrt{7+4\sqrt3}+\sqrt{7-4\sqrt3}.

We need m+n=7m+n=7 and mn=12mn=12, giving m=4,n=3m=4,n=3. Thus the first radical is 2+32+\sqrt3. The second is ∣2βˆ’3∣=2βˆ’3\lvert2-\sqrt3\rvert=2-\sqrt3, because 2>32>\sqrt3. Their sum is four.

The absolute value is essential: a principal square root is nonnegative, and a2=∣a∣\sqrt{a^2}=\lvert a\rvert rather than automatically aa.

When a substitution reduces a difficult equation, finish by recovering the original variable and checking its domain. A quadratic in x+1/xx+1/x might produce an inadmissible value between negative two and two. A factorization after squaring might produce a candidate with the wrong sign. Keeping these checks beside the algebra makes a long solution much easier to trust.


An absolute value is a distance, so its graph changes slope where the inside expression is zero. For an equation containing several absolute values, mark those breakpoints first. On each interval, replace every absolute value by the correct signed expression, solve, and check that the solution lies in that interval.

A geometric interpretation can reveal an entire parameter classification before the algebra. The sum of distances from a point on a line to two fixed endpoints is at least the distance between the endpoints. Equality holds at every point between them, not just at the midpoint.

Example. For every real parameter cc, determine the number of real solutions of ∣xβˆ’2∣+∣x+1∣=c\lvert x-2\rvert+\lvert x+1\rvert=c.

The endpoints are negative one and two, at distance three. For βˆ’1≀x≀2-1\le x\le2, the left side is (2βˆ’x)+(x+1)=3(2-x)+(x+1)=3. Thus there are no solutions if c<3c<3 and infinitely many, the entire interval, if c=3c=3.

For c>3c>3, a solution must lie outside that interval. On x>2x>2, the equation is 2xβˆ’1=c2x-1=c, giving x=(c+1)/2>2x=(c+1)/2>2. On x<βˆ’1x<-1, it is 1βˆ’2x=c1-2x=c, giving x=(1βˆ’c)/2<βˆ’1x=(1-c)/2<-1.

There are exactly two solutions when c>3c>3. The boundary parameter creates a whole interval of solutions, which would be missed by squaring or by solving only the outside cases.

The same idea extends to sums of many distances. For fixed points on a line, the sum of distances is minimized at a median. Between consecutive listed points, count how many terms increase and decrease as xx moves; the slope is their difference. This gives a direct way to analyze a piecewise-linear expression without expanding every case independently.


For a floor equation, write x=n+tx=n+t with n∈Zn\in\mathbb Z and 0≀t<10\le t<1. Integer multiples of xx then separate into a known multiple of nn and a short list of possible floor values involving tt.

Example. Solve ⌊xβŒ‹+⌊2xβŒ‹=7\lfloor x\rfloor+\lfloor2x\rfloor=7 over the reals.

With x=n+tx=n+t, the equation becomes 3n+⌊2tβŒ‹=73n+\lfloor2t\rfloor=7. The last floor is either zero or one. Only n=2n=2 and ⌊2tβŒ‹=1\lfloor2t\rfloor=1 work. Hence 1/2≀t<11/2\le t<1 and the solution set is [5/2,3)[5/2,3).

The right endpoint is excluded because at three the floor sum jumps to nine. The left endpoint is included because the floor of 2t2t becomes one exactly at t=1/2t=1/2.

For inequalities involving floors, use the defining bounds ⌊uβŒ‹β‰€u<⌊uβŒ‹+1\lfloor u\rfloor\le u<\lfloor u\rfloor+1. They can first bound the integer part and make a finite case split possible. Avoid replacing a floor by a nearby real number as an equality; that loses the discontinuity carrying the integer information.