Learning math: graphs and equations

Table of contents

These are my solutions to the problems in the book Maths: A Student's Survival Guide.

2.A.(a)

x+7=4x=47=33y=27y=27/3=95y=12y=1252p+3=82p=5p=522a+3=5a23=3a23a=5a=53102b=b+7103b=73b=3b=13(2x1)=2(2x+3)2x3=6x=92x4=35x=1253x8=59x=859/3=85913=40278x=22x=8x=42x+12=352x=110x=1205y=375=37yy=353 x + 7 = 4 \qquad x = 4 - 7 = -3 \\ 3y = 27 \qquad y = 27/3 = 9 \\ 5y = 12 \qquad y = \frac{12}{5} \\ 2p + 3 = 8 \qquad 2p = 5 \qquad p = \frac{5}{2} \\ 2a + 3 = 5a - 2 \qquad 3 = 3a - 2 \qquad 3a = 5 \qquad a = \frac{5}{3} \\ 10 - 2b = b + 7 \qquad 10 - 3b = 7 \qquad -3b = -3 \qquad b = 1 \\ 3(2x - 1) = 2(2x + 3) \qquad 2x - 3 = 6 \qquad x = \frac{9}{2} \\ \frac{x}{4} = \frac{3}{5} \qquad x = \frac{12}{5} \\ \frac{3x}{8} = \frac{5}{9} \qquad x = \frac{8*5}{9} / 3 = \frac{8*5}{9} * \frac{1}{3} = \frac{40}{27} \\ \frac{8}{x} = 2 \qquad 2x = 8 \qquad x = 4 \\ 2x + \frac{1}{2} = \frac{3}{5} \qquad 2x = \frac{1}{10} \qquad x = \frac{1}{20} \\ \frac{5}{y} = \frac{3}{7} \qquad 5 = \frac{3}{7}y \qquad y = \frac{35}{3}

In ay=bc\frac{a}{y} = \frac{b}{c} it seems I can't turn the left side into yy in one operation. (Might have something to do with the fact that yy only defines the granularity or scale of aa).

x+12=5x+1=10x=92y+34=52y=17y=172 \frac{x + 1}{2} = 5 \qquad x + 1 = 10 \qquad x = 9 \\ \frac{2y + 3}{4} = 5 \qquad 2y = 17 \qquad y = \frac{17}{2}

2y+13=y+322y+1=3(y+3)24y+2=3y+9y=3y+741=3y+74yy+2=9y=7 \frac{2y + 1}{3} = \frac{y + 3}{2} \qquad 2y + 1 = \frac{3(y + 3)}{2} \qquad 4y + 2 = 3y + 9 \qquad \cancel{y = \frac{3y + 7}{4} \qquad 1 = \frac{3y + 7}{4y}} \qquad y + 2 = 9 \qquad y = 7

3x5+3=x5x=3x5+8x=3x+85513x5=x83x=5x402x=40x=20 \frac{3x}{5} + 3 = x - 5 \qquad \cancel{x = \frac{3x}{5} + 8 \\ x = \frac{3x + 8*5}{5*1}} \qquad \frac{3x}{5} = x - 8 \\ 3x = 5x - 40 \qquad -2x = -40 \qquad x = 20 \\

2x33=x22x93=x24x186=3x6x18=0x=18 \frac{2x}{3} - 3 = \frac{x}{2} \qquad \frac{2x - 9}{3} = \frac{x}{2} \qquad \frac{4x - 18}{\cancel{6}} = \frac{3x}{\cancel{6}} \qquad x - 18 = 0 \qquad x = 18

Looks like you can multiply fractions with == diagonally, similar to how we can do for fractions with ++.

53a2=39a6=59a=11a=1193p+3=2p+43p+12=2p+6p=622a+1=53a26a4=10a+54a+5=4a=94 \frac{5}{3a - 2} = 3 \qquad 9a - 6 = 5 \qquad 9a = 11 \qquad a = \frac{11}{9} \\ \frac{3}{p + 3} = \frac{2}{p + 4} \qquad 3p + 12 = 2p + 6 \qquad p = -6 \\ \frac{2}{2a + 1} = \frac{5}{3a - 2} \qquad 6a - 4 = 10a + 5 \qquad 4a + 5 = -4 \qquad a = -\frac{9}{4}


Remember: in equations you can generally do the same thing to both sides — add, subtract, multiply, divide, raise to a power, take a logarithm, etc.: https://math.stackexchange.com/a/805939


2.A.1

x+8=5x=35y=40y=82y=7y=727+2x=5x3x=2x=234+2b=5b+93b=5b=533(x3)=63x=15x=53(y2)=2(y1)y=42(3a1)=3(4a+3)6a=11a=1163x1=2(2x1)+3x+1=1x=22(p+2)=6p3(p4)p+12=4p=8 x + 8 = 5 \qquad x = -3 \\ 5y = 40 \qquad y = 8 \\ 2y = 7 \qquad y = \frac{7}{2} \\ 7 + 2x = 5 - x \qquad 3x = -2 \qquad x = -\frac{2}{3} \\ 4 + 2b = 5b + 9 \qquad 3b = -5 \qquad b = -\frac{5}{3} \\ 3(x - 3) = 6 \qquad 3x = 15 \qquad x = 5 \\ 3(y - 2)=2(y - 1) \qquad y = 4 \\ 2(3a - 1) = 3(4a + 3) \qquad 6a = -11 \qquad a = -\frac{11}{6} \\ 3x - 1 = 2(2x - 1) + 3 \qquad x + 1 = -1 \qquad x = -2 \\ 2(p + 2) = 6p - 3(p - 4) \qquad p + 12 = 4 \qquad p = -8


Remember: in solving equations like 3a+5=a33a + 5 = a - 3, first put each variable and constant to only one side: 3aa=353a - a = -3 - 5. Then simplify.

Remember: cross-multiplying fractions is essentially just multiplying both sides by the same fraction. Cross-multiplying is a shortcut:

ab=cdad=cb \frac{a}{b} = \frac{c}{d} \qquad ad = cb \qquad

A longer, non-shortcut version:

ab=cdabdd=cdbbadbdbd=cbbdbdad=db \frac{a}{b} = \frac{c}{d} \qquad \frac{a}{b} * \frac{d}{d} = \frac{c}{d} * \frac{b}{b} \qquad \frac{ad}{bd} * bd = \frac{cb}{bd} * bd \qquad ad = db

We can multiply one side with dd\frac{d}{d} and the other side with bb\frac{b}{b}, because both equal 11, so we're still multiplying both sides by the same number. Also, you can always divide the numerator and the denominator of a fraction by the same value without the fraction's value changing, which we're doing here.

Remember: The best way is to multiply both sides by the product of the denominators...

ab=cdabbd=cdbdad=cb \boxed{\frac{a}{b} = \frac{c}{d} \qquad \frac{a}{b} * bd = \frac{c}{d} * bd \qquad ad = cb}

...since (unlike cross-multiplying) it works also when one or both of the sides consist of multiple fractions:

x+ab=cdbd(x1+ab)=bd(cd)xbd+ad=cb x + \frac{a}{b} = \frac{c}{d} \qquad bd(\frac{x}{1} + \frac{a}{b}) = bd(\frac{c}{d}) \qquad xbd + ad = cb

ab=cdxybdy(ab)=bdy(cdxy)ady=bcybdx \frac{a}{b} = \frac{c}{d} - \frac{x}{y} \qquad bdy(\frac{a}{b}) = bdy(\frac{c}{d} - \frac{x}{y}) \qquad ady = bcy - bdx


Remember: there are a few shortcuts for flipping numerators and denominators in an equation where both sides are a single fraction:

Invertendo: ab=cdba=dcFlip tops and bottoms\frac{a}{b} = \frac{c}{d} \qquad \frac{b}{a} = \frac{d}{c} \qquad \text{Flip tops and bottoms}

Alternando: ab=cdac=bdFlip one of the diagonals\frac{a}{b} = \frac{c}{d} \qquad \frac{a}{c} = \frac{b}{d} \qquad \text{Flip one of the diagonals}

Componendo: ab=cda+bb=c+dd\frac{a}{b} = \frac{c}{d} \qquad \frac{a + b}{b} = \frac{c + d}{d}

Dividendo: ab=cdabb=cdd\frac{a}{b} = \frac{c}{d} \qquad \frac{a - b}{b} = \frac{c - d}{d}


2.A.(c)

Solve for xx: 2x+133x24=x16 \frac{2x + 1}{3} - \frac{3x - 2}{4} = \frac{x - 1}{6}

8x+49x612=x16x212=x166x12=12x12x=0 \cancel{\frac{8x + 4 - 9x - 6}{12} = \frac{x - 1}{6} \qquad \frac{-x - 2}{12} = \frac{x - 1}{6} \qquad -6x - 12 = 12x - 12 \qquad x = 0}

Remember: always treat the numerator and denominator as bracketed expressions. That way you don't commit mistakes like above.

(8x+4)(9x6)12=x168x+49x+612=x16x+1012=x166x+60=12x1218x=72x=4 \frac{(8x + 4) - (9x - 6)}{12} = \frac{x - 1}{6} \qquad \frac{8x + 4 - 9x + 6}{12} = \frac{x - 1}{6} \qquad \frac{-x + 10}{12} = \frac{x - 1}{6} \qquad -6x + 60 = 12x - 12 \qquad 18x = 72 \qquad x = 4

Apparently there is an easier way: multiply the left-hand side and the right-hand side with the number whose factors are 3, 4 and 6.

12(2x+133x24)=12(x16)12(2x+1)312(3x2)4=12(x1)6 12(\frac{2x + 1}{3} - \frac{3x - 2}{4}) = 12(\frac{x - 1}{6}) \qquad \frac{12(2x + 1)}{3} - \frac{12(3x - 2)}{4} = \frac{12(x - 1)}{6}

Rather than multiplying by 346=723*4*6 = 72, we have multiplied by 1212. Then cancel repeated factors:

4(2x+1)13(3x2)1=2(x1)18x9x+4+6=2x23x=12x=4 \frac{4(2x + 1)}{1} - \frac{3(3x - 2)}{1} = \frac{2(x - 1)}{1} \qquad 8x - 9x + 4 + 6 = 2x - 2 \qquad 3x = 12 \qquad x = 4

2.A.2

5x3=2x=655+x=2x315+3x=2xx=15x3x4=14x3x=12x=12 \frac{5x}{3} = 2 \qquad x = \frac{6}{5} \\ 5 + x = \frac{2x}{3} \qquad 15 + 3x = 2x \qquad x = -15 \\ \frac{x}{3} - \frac{x}{4} = 1 \qquad 4x - 3x = 12 \qquad x = 12

y33y75=y265y9y+2115=y2624y+126=15y3039y=156y=4 \frac{y}{3} - \frac{3y - 7}{5} = \frac{y - 2}{6} \qquad \frac{5y - 9y + 21}{15} = \frac{y - 2}{6} \qquad -24y + 126 = 15y - 30 \qquad 39y = 156 \qquad y = 4


Remember: in a set of fractions, like in the equation above, you can multiply both sides of the equation by the lowest common denominator rather than the product of the denominators.

If we multiply with the product of the denominators (90), then the numbers get quite large:

y33y75=y2630y18(3y7)=15y30etc. \frac{y}{3} - \frac{3y - 7}{5} = \frac{y - 2}{6} \qquad 30y - 18(3y - 7) = 15y - 30 \qquad \text{etc.}

But if we multiply by the LCD (30), the numbers are smaller and therefore easier to work with:

y33y75=y2610y6(3y7)=5y10etc. \frac{y}{3} - \frac{3y - 7}{5} = \frac{y - 2}{6} \qquad 10y - 6(3y - 7) = 5y - 10 \qquad \text{etc.}

The lowest common denominator (LCD) is the lowest common multiple of the denominators of a set of fractions. It simplifies adding, subtracting, and comparing fractions.

You can see how this works when you factor the denominators into primes. Then take only one of each number in the denominators, multiply them together, and multiply both sides by the product. Below we have two 3's, one 5 and one 2. Therefore we will ignore the other 3, and multiply both sides by 3523*5*2 (not 35233*5*2*3).

y33y75=y223(352)y3(352)(3y7)5=(352)(y2)23 \frac{y}{3} - \frac{3y - 7}{5} = \frac{y - 2}{2 * 3} \qquad \frac{(\cancel{3}*5*2)y}{\cancel{3}} - \frac{(3*\cancel{5}*2)(3y - 7)}{\cancel{5}} = \frac{(\cancel{3}*5*\cancel{2})(y - 2)}{\cancel{2} * \cancel{3}}

10y6(3y7)=5y10 10y - 6(3y - 7) = 5y - 10

The same principle works when the denominators contain variables, not numbers. This is similar to what we did here, because we're ignoring repeated factors in the denominators, i.e., we're only taking one of each factor when multiplying both sides. We ignore the other bb and dd.

ab1cd=1bd \dfrac{a}{b} - \dfrac{1}{cd} = \dfrac{1}{bd}

We could multiply both sides by the product of the denominators:

b2cd2(ab1cd)=b2cd2(1bd)bcd2ab2d=bcd b^2cd^2\Big(\dfrac{a}{b} - \dfrac{1}{cd}\Big) = b^2cd^2\Big(\dfrac{1}{bd}\Big) \qquad bcd^2a - b^2d = bcd

But it's better to multiply both sides by the LCD (i.e., take only one of bb, cc and dd, and ignore the repeated factors bb and dd in the denominators):

bcd(ab1cd)=bcd(1bd)acdb=c bcd\Big(\dfrac{a}{b} - \dfrac{1}{cd}\Big) = bcd\Big(\dfrac{1}{bd}\Big) \qquad acd - b = c


3m5492m3=09m1536+8m12=017m51=012m=3 \frac{3m - 5}{4} - \frac{9 - 2m}{3} = 0 \qquad \frac{9m - 15 - 36 + 8m}{12} = 0 \qquad 17m - 51 = 0 * 12 \qquad m = 3

or multiply both sides by 12 and ignore repeating factors:

3m5492m3=034(3m5)434(92m)3=09m1536+8m=0m=3 \frac{3m - 5}{4} - \frac{9 - 2m}{3} = 0 \qquad \frac{3*\cancel{4}(3m - 5)}{\cancel{4}} - \frac{\cancel{3}*4(9 - 2m)}{\cancel{3}} = 0 \qquad 9m - 15 - 36 + 8m = 0 \qquad m = 3

x12x23=13x32x+4=1x=0Oops. Tired... \frac{x - 1}{2} - \frac{x - 2}{3} = 1 \qquad \cancel{3x - 3 - 2x + 4 = 1 \qquad x = 0} \qquad \text{Oops. Tired...}

Remember to multiply both sides of the equation by the LCD. Or if you want to only simplify the left side of the equation here by using abcd=adcbbd\frac{a}{b} - \frac{c}{d} = \frac{ad - cb}{bd}, remember to actually retain the bd\frac{}{bd} denominator (i.e. 6\frac{}{6}).

x12x23=16(x12x23)=6(11)3x32x+4=6x=5 \frac{x - 1}{2} - \frac{x - 2}{3} = 1 \qquad 6(\frac{x - 1}{2} - \frac{x - 2}{3}) = 6(\frac{1}{1}) \qquad 3x - 3 - 2x + 4 = 6 \qquad x = 5

p+1p1=344p+4=3p3p=7 \frac{p + 1}{p - 1} = \frac{3}{4} \qquad 4p + 4 = 3p - 3 \qquad p = -7

2y=3y+32y+6=3yy=6 \frac{2}{y} = \frac{3}{y + 3} \qquad 2y + 6 = 3y \qquad y = 6

42x+3=3x24x8=6x+9x=172 \frac{4}{2x + 3} = \frac{3}{x - 2} \qquad 4x - 8 = 6x + 9 \qquad x = -\frac{17}{2}

2xx+2=3xx+512x2+10x=3x2+6x1(x+2)(x+5)2x2+10x=3x2+6x(x2+7x+10)2x2+10x=3x2+6xx27x102x2+10x=2x2x10x=1011 \frac{2x}{x + 2} = \frac{3x}{x + 5} - 1 \qquad 2x^2 + 10x = 3x^2 + 6x - 1(x + 2)(x + 5) \\ 2x^2 + 10x = 3x^2 + 6x - (x^2 + 7x + 10) \qquad 2x^2 + 10x = 3x^2 + 6x - x^2 - 7x - 10 \\ 2x^2 + 10x = 2x^2 - x - 10 \qquad x = -\frac{10}{11}

2x+13+x+52=3x17Lowest common multiple is 3*2*7, as they’re all primes \frac{2x + 1}{3} + \frac{x + 5}{2} = \frac{3x - 1}{7} \quad \text{Lowest common multiple is 3*2*7, as they're all primes}

27(2x+1)+37(x+5)=32(3x1)28x+14+21x+105=18x631x=125x=12531 2*7(2x + 1) + 3*7(x + 5) = 3*2(3x - 1) \qquad 28x + 14 + 21x + 105 = 18x - 6 \\ 31x = -125 \qquad x = -\frac{125}{31}

Trying to see if it's easier to simplify the left side first, and then cross-multiply the left and right sides of the equation:

2x+13+x+52=3x177x+176=3x1749x+119=18x631x=125x=12531 \frac{2x + 1}{3} + \frac{x + 5}{2} = \frac{3x - 1}{7} \qquad \frac{7x + 17}{6} = \frac{3x - 1}{7} \qquad 49x + 119 = 18x - 6 \\ 31x = -125 \qquad x = -\frac{125}{31}

x+34x15=2x110Lowest common multiple: 455x+154x+4=4x23x=21x=7 \frac{x + 3}{4} - \frac{x - 1}{5} = \frac{2x - 1}{10} \qquad \text{Lowest common multiple: }4 * 5 \\ 5x + 15 - 4x + 4 = 4x - 2 \qquad 3x = 21 \qquad x = 7

The rules for solving an equation are also used to rearrange a formula, a.k.a. changing the subject of the formula:

T=2πlgT2=(2πlg)2T2=4π2lgT2g=4π2ll=gT24π2 T = 2\pi\sqrt{\frac{l}{g}} \qquad T^2 = (2\pi\sqrt{\frac{l}{g}})^2 \qquad T^2 = 4\pi^2\frac{l}{g} \qquad T^2g = 4\pi^2l \qquad l = \frac{gT^2}{4\pi^2}

uu is the distance of an object from a lens. ff is the focal length of the lens. vv is the distance from the lens to the projected image.

1u+1v=1fvf+uf=uvuf=uvfvuf=v(uf)v=ufuf \frac{1}{u} + \frac{1}{v} = \frac{1}{f} \qquad vf + uf = uv \qquad uf = uv - fv \qquad uf = v(u - f) \qquad v = \frac{uf}{u - f}

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -40 -35 -30 -25 -20 -15 -10 -5 0 5 10 15 20 25 30 35 40 45 50 55 60 -40 -35 -30 -25 -20 -15 -10 -5 0 5 10 15 20 25 30 35 40 45 50 55 60 v (distance from lens to image, cm) u (distance from lens to object, cm) v v
set xrange [-40:60]
set yrange [-40:60]
set xlabel 'u (distance from lens to object, cm)'
set ylabel 'v (distance from lens to image, cm)'
f = 8
v(u) = (u * f) / (u - f)
plot v(x) title 'v'

2.A.3

S=4πr2r=S4π S = 4\pi r^2 \qquad r = \sqrt{\frac{S}{4\pi}}

V=43πr3r3=Vπ÷43r=3V4π3 V = \frac{4}{3} \pi r^3 \qquad r^3 = \frac{V}{\pi} \div \frac{4}{3} \qquad r = \sqrt[3]{\frac{3V}{4\pi}}

V=πr2hh=Vπr2r=Vπh V = \pi r^2h \qquad h = \frac{V}{\pi r^2} \qquad r = \sqrt{\frac{V}{\pi h}}

S=2πr2+2πrhh=S2πr22πr S = 2\pi r^2 + 2\pi rh \qquad h = \frac{S - 2\pi r^2}{2\pi r}

v2=u2+2asa=v2u22su=v22as v^2 = u^2 + 2as \qquad a = \frac{v^2 - u^2}{2s} \qquad u = \sqrt{v^2 - 2as}

1R=1R1+1R2R1R2=RR2+RR1R1R2=R(R1+R2)R1R2R=R1+R21R1R1=1R2R1RRR1=1R2R1RRR1R2=1R2=RR1R1R \frac{1}{R} = \frac{1}{R_1} + \frac{1}{R_2} \qquad \xcancel{R_1 R_2 = R R_2 + R R_1 \qquad R_1 R_2 = R(R_1 + R_2) \qquad \frac{R_1 R_2}{R} = R_1 + R_2} \\ \frac{1}{R} - \frac{1}{R_1} = \frac{1}{R_2} \qquad \frac{R_1 - R}{R R_1} = \frac{1}{R_2} \qquad \frac{R_1 - R}{R R_1}R_2 = 1 \qquad R_2 = \frac{R R_1}{R_1 - R}

R2=(2Ω)(3Ω)3Ω2Ω=6Ω21Ω=6Ω R_2 = \frac{(2\Omega)(3\Omega)}{3\Omega - 2\Omega} = \frac{6\Omega^2}{1\Omega} = 6\Omega

Remember: always start by isolating the variable-to-solve-for on one side of the equation. Above I made the mistake of not isolating 1R2\frac{1}{R_2} as the first step.


To find the midpoint of a line, take the average of the xx points, and the average of the yy points:

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -2 -1 0 1 2 3 4 5 6 0 1 2 3 4 5 6 7 8 9 10 Midpoint (5,2) y x gnuplot_plot_1 gnuplot_plot_2 gnuplot_plot_3
$data << EOD
2 -1
8 5
EOD

$dataXY << EOD
2 -1
8 -1
8 5
EOD

set label "Midpoint (5,2)" at 5,2 right offset -1,1
$dataMid << EOD
5 -1
5 2
8 2
EOD

set xtics 1
set ytics 1
set xrange [0:10]
set yrange [-2:6]
set nogrid

plot "$data" with linespoints notitle, "$dataXY" with lines dt 2 notitle, "$dataMid" with linespoints dt 2 notitle

Midpoint=(x1+x22,y1+y22) \boxed{Midpoint = \Big(\dfrac{x_1 + x_2}{2}, \dfrac{y_1 + y_2}{2}\Big)}

2.B.1

(3+12,2+62)=(1,2)(1+42,5+62)=(52,112) (\frac{-3 + 1}{2}, \frac{2 + -6}{2}) = (-1, -2) \\ (\frac{-1 + -4}{2}, \frac{-5 + -6}{2}) = (-\frac{5}{2}, -\frac{11}{2})


Remember: the slope or gradient of a line is usually denoted by mm. It measures the rate of change of yy relative to xx.

m=y2y1x2x1 or m=ΔyΔx \boxed{m = \frac{y_2 - y_1}{x_2 - x_1}} \quad \text{ or } \quad \boxed{m = \frac{\Delta y}{\Delta x}}

In the equation of a straight line, y=mx+c\boxed{y = mx + c}, mm is the gradient and cc is the y-intercept.

(If the equation is not in the form y=mx+cy = mx + c, first rearrange it to that form.)

2.B.2

y=35xm=52y=3x+7y=32x+72m=323y+x=1y=13x3y=1313xm=134y5x=2y=54x+12m=54 y = 3 - 5x \qquad m = -5 \\ 2y = 3x + 7 \qquad y = \frac{3}{2}x + \frac{7}{2} \qquad m = \frac{3}{2} \\ 3y + x = 1 \qquad y = \frac{1}{3} - \frac{x}{3} \qquad y = \frac{1}{3} - \frac{1}{3}x \qquad m = -\frac{1}{3} \\ 4y - 5x = 2 \qquad y = \frac{5}{4}x + \frac{1}{2} \qquad m = \frac{5}{4}

What does the value of cc tell us?

It's a constant offset to yy. It moves the whole of yy up or down.

If we put x=0x = 0 we get y=cy = c so the point (0,c)(0, c) is where the line cuts the y-axis (its y intercept).

I'll try with a graph:

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -2 -1 0 1 2 3 4 5 -2 -1 0 1 2 3 4 5 y-intercept y x gnuplot_plot_1
$data << EOD
-1 2
4 -1
EOD

set label "y-intercept" at 0,1.5 left offset 1,0.5

set xtics 1
set ytics 1
set xrange [-2:5]
set yrange [-2:5]
set nogrid

plot "$data" with linespoints notitle

The slope is:

m=1241=35 m = \frac{-1 - 2}{4 - -1} = -\frac{3}{5}

How to get the y-intercept, i.e. cc? Without knowing it, the function y=35xy = -\frac{3}{5}x will be drawn through the origin like this:

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -2 -1 0 1 2 3 4 5 -2 -1 0 1 2 3 4 5 y x gnuplot_plot_1
set xtics 1
set ytics 1
set xrange [-2:5]
set yrange [-2:5]
set nogrid

f(x) = -(3.0/5.0)*x
plot f(x) notitle

Find the y-intercept cc for any known point (x,y)(x, y) and slope mm:

y=mx+cc=ymx y = mx + c \qquad \boxed{c = y - mx}

2=351+c235=cc=75 2 = -\frac{3}{5} * -1 + c \qquad 2 - \frac{3}{5} = c \qquad c = \frac{7}{5}

Therefore our function y=35x+75y = -\frac{3}{5}x + \frac{7}{5} looks like this:

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -2 -1 0 1 2 3 4 5 -2 -1 0 1 2 3 4 5 y-intercept (0, 7/5) x-intercept (7/3, 0) y x gnuplot_plot_1
set xtics 1
set ytics 1
set xrange [-2:5]
set yrange [-2:5]
set nogrid

set label "y-intercept (0, 7/5)" at 0,(7.0/5.0) left offset 1,1
set label "x-intercept (7/3, 0)" at (7.0/3.0),0 left offset 1,1

f(x) = -(3.0/5.0)*x + (7.0/5.0)
plot f(x) notitle

How do we find the x-intercept? Analogously, it must be the value of xx when y=0y = 0.

y=mx+c0=mx+cx=ycmx=cm y = mx + c \qquad 0 = mx + c \qquad x = \frac{y - c}{m} \qquad x = -\frac{c}{m}

x=(75÷35)=(3515)=73 x = -(\frac{7}{5} \div -\frac{3}{5}) = -(-\frac{35}{15}) = \frac{7}{3}

2.B.3 special cases

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -5 -4 -3 -2 -1 0 1 2 3 4 5 -2 -1 0 1 2 3 4 5 y x f(x) f(x) g(x) g(x) h(x) h(x)
$data << EOD
3 -5
3 5
EOD

set xtics 1
set ytics 1
set xrange [-2:5]
set yrange [-5:5]
set nogrid
set nozeroaxis

f(x) = 2
g(x) = -3
plot f(x), g(x), "$data" with lines title "h(x)"

mx+c=20x+2=2f(x)=2Set the slope to 0mx+c=30x+3=3g(x)=3Set the slope to 0 mx + c = 2 \qquad 0x + 2 = 2 \qquad f(x) = 2 \qquad \text{Set the slope to 0} \\ mx + c = -3 \qquad 0x + -3 = -3 \qquad g(x) = -3 \qquad \text{Set the slope to 0}

Defining a function for the vertical line in terms of xx seems impossible.

x=3y=mx+cx=ycmm=1333=yundefined x = 3 \qquad y = mx + c \qquad x = \frac{y - c}{m} \qquad m = \frac{1}{3 - 3} \qquad 3 = \frac{y - \infty}{\text{undefined}} \qquad \dots


How much do you need to know to distinguish a particular straight line from all the other possible straight lines?

Based on the straight line equation y=mx+cy = mx + c:

  • The slope
  • At least one (x,y)(x,y) coordinate on the line
    • This can be the y-intercept, but doesn't have to be, since we can compute cc if given the slope and any point on the line

Or:

  • Any two points on the line. m=y2y1x2x1m = \frac{y_2 - y_1}{x_2 - x_1} gives you the slope, after which you can calculate cc as well: c=y1mx1c = y_1 - mx_1

The line equation

Remember: there are many forms of the equation for a straight line. The main ones are:

Slope-intercept form (when you know the slope and y-intercept): y=mx+c\boxed{y = mx + c}

Point-slope form (when you know a point and the slope): yy1=m(xx1)\boxed{y - y_1 = m(x - x_1)}

Standard form: Ax+By=C\boxed{Ax + By = C}

It's probably best to remember mainly the slope-intercept form and the slope equation.

You can rearrange the slope equation m=y2y1x2x1=yy1xx1\boxed{m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{y - y_1}{x - x_1}} to all of the different forms, so it's especially important to remember it.


From the slope equation to the point-slope form:

m=yy1xx1m(xx1)=yy1y=m(xx1)+y1 m = \frac{y - y_1}{x - x_1} \qquad m(x - x_1) = y - y_1 \qquad y = m(x - x_1) + y_1

This looks almost like the slope-intercept form, but not quite, since we have m(xx1)m(x - x_1) instead of mxmx.

With the point-slope form we know a point (x1,y1)(x_1, y_1) and the slope:

y=mxmx1+y1y=34(x)34(1)+54=34x+12 y = mx - mx_1 + y_1 \qquad \boxed{y = \frac{3}{4}(x) - \frac{3}{4}(1) + \frac{5}{4} = \frac{3}{4}x + \frac{1}{2}}

We can set x1=0x_1 = 0 to get the slope-intercept form. (I'll rename y1y_1 to y0y_0 here as well.)

y=m(x0)+y0Note the identity property: x0=xy=m(x)+y0This is the slope-intercept form y = m(x - 0) + y_0 \qquad \text{Note the identity property: } x - 0 = x \\ y = m(x) + y_0 \qquad \text{This is the slope-intercept form}

With the slope-intercept form we know the slope and the y-intercept:

y=34x+12 \boxed{y = \frac{3}{4}x + \frac{1}{2}}

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 0 1 2 3 4 5 -1 0 1 2 3 4 5 6 (x1, y1) (x, y) (x2, y2) m = 0.75 c = 0.5 y x gnuplot_plot_1 gnuplot_plot_2 gnuplot_plot_3 gnuplot_plot_4 gnuplot_plot_5
$data1 << EOD
1 1.25
4 1.25
4 3.5
EOD

$data2 << EOD
1 1.25
3 1.25
3 2.75
EOD

set xtics 1
set ytics 1
set xrange [-1:6]
set yrange [-0.5:5]

set label "(x_1, y_1)" at 1,1.25 right offset -1,0.5
set label "(x, y)" at 3,2.75 right offset -1,0.5
set label "(x_2, y_2)" at 4,3.5 right offset -1,0.5
set label "m = 0.75\nc = 0.5" at 1.2,3.7

set style fill solid 0.1

f(x) = (3.0/4.0)*x + 0.5
plot f(x) notitle, "$data1" with filledcurves lt 3 notitle, "$data2" with filledcurves lt 6 notitle, "$data1" with points pt 7 lt 3 notitle, "$data2" with points pt 7 lt 6 notitle

Remember that usually the xx and yy without a subscript mean any value in the sequence, and xnx_n and yny_n mean a specific value.

In the slope-intercept form, you plug in x1x_1 and y1y_1, since they're known. You leave xx and yy unknown, since they represent any possible point on the line. (There are infinitely many points on the line, infinitesimally far apart.) For example:

y5=2(x3)y=2x1 y - 5 = 2(x - 3) \qquad y = 2x - 1

In the graph below, you can think that moving (x,y)(x,y) anywhere along the line still satisfies m=y2y1x2x1=yy1xx1m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{y - y_1}{x - x_1}, or, rearranged, m=yy1y2y1=xx1x2x1m = \frac{y - y_1}{y_2 - y_1} = \frac{x - x_1}{x_2 - x_1}.

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 0 1 2 3 4 5 -1 0 1 2 3 4 5 6 (x1, y1) (x, y) (x2, y2) m = 0.75 c = 0.5 y x gnuplot_plot_1 gnuplot_plot_2 gnuplot_plot_3 gnuplot_plot_4 gnuplot_plot_5
$data1 << EOD
1 1.25
4 1.25
4 3.5
EOD

$data2 << EOD
1 1.25
3 1.25
3 2.75
EOD

set xtics 1
set ytics 1
set xrange [-1:6]
set yrange [-0.5:5]

set label "(x_1, y_1)" at 1,1.25 right offset -1,0.5
set label "(x, y)" at 3,2.75 right offset -1,0.5
set label "(x_2, y_2)" at 4,3.5 right offset -1,0.5
set label "m = 0.75\nc = 0.5" at 1.2,3.7

set style fill solid 0.1

f(x) = (3.0/4.0)*x + 0.5
plot f(x) notitle, "$data1" with filledcurves lt 3 notitle, "$data2" with filledcurves lt 6 notitle, "$data1" with points pt 7 lt 3 notitle, "$data2" with points pt 7 lt 6 notitle

2.B.4

y3=2(x1)y=2x+1y1=1(x2)y=x+1y4=23(x2)y=23x+(43)+4=23x+83=2x+83yy1y2y1=xx1x2x1y5105=x2826y30=5x10y=5x+2062541=y5x173=y5x+173x+73=y5y=73x+223 y - 3 = 2(x - 1) \qquad y = 2x + 1 \\ y - -1 = -1(x - 2) \qquad y = -x + 1 \\ y - 4 = \frac{2}{3}(x - 2) \qquad y = \frac{2}{3}x + (-\frac{4}{3}) + 4 = \frac{2}{3}x + \frac{8}{3} = \frac{2x + 8}{3} \\ \frac{y - y_1}{y_2 - y_1} = \frac{x - x_1}{x_2 - x_1} \qquad \frac{y - 5}{10 - 5} = \frac{x - 2}{8 - 2} \qquad 6y - 30 = 5x - 10 \qquad y = \frac{5x + 20}{6} \\ \frac{-2 - 5}{-4 - -1} = \frac{y - 5}{x - -1} \qquad \frac{7}{3} = \frac{y - 5}{x + 1} \qquad \frac{7}{3}x + \frac{7}{3} = y - 5 \qquad y = \frac{7}{3}x + \frac{22}{3}


Remember Pythagoras' theorem: A2+B2=C2\boxed{A^2 + B^2 = C^2}

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 A B C y x gnuplot_plot_1 gnuplot_plot_2 gnuplot_plot_3 gnuplot_plot_4
set terminal svg size 500,500 enhanced font 'Verdana,10'

$dataTri << EOD
0 0
3 0
3 2
EOD

$dataA << EOD
3 0
5 0
5 2
3 2
EOD

$dataB << EOD
0 0
0 -3
3 -3
3 0
EOD

$dataC << EOD
0 0
3 2
1 5
-2 3
EOD

set noxtics
set noytics
set xrange [-3:6]
set yrange [-3.5:5.5]
set nozeroaxis

set style fill solid 0.1
set label "A" at 2.9,1 right
set label "B" at 1.6,0.1 center
set label "C" at 1.6,0.9 center

plot "$dataTri" with filledcurves notitle, "$dataA" with filledcurves notitle, "$dataB" with filledcurves notitle, "$dataC" with filledcurves notitle

We can use the Pythagorean theorem to get the distance between two points:

D2=(y2y1)2+(x2x1)2D=(y2y1)2+(x2x1)2 D^2 = (y_2 - y_1)^2 + (x_2 - x_1)^2 \\ D = \sqrt{(y_2 - y_1)^2 + (x_2 - x_1)^2}

2.B.5

D=(82)2+(51)2=62+62=2(62)=72D=52+(9)2=25+81=106 D = \sqrt{(8 - 2)^2 + (5 - -1)^2} = \sqrt{6^2 + 6^2} = \sqrt{2(6^2)} = \sqrt{72} \\ D = \sqrt{5^2 + (-9)^2} = \sqrt{25 + 81} = \sqrt{106}

2.B.(h)

Remember: to find a line perpendicular (i.e. at 90 degrees) to another line, the two lines' slopes multiplied together must equal 1-1.

m1m2=1 m_1 m_2 = -1

Let's see if I can rearrange this, so that I can find a perpendicular line easily:

(yaya1xaxa1)(ybyb1xbxb1)=1for the slopes of any perpendicular lines A and B \Big(\dfrac{y_a - y_{a1}}{x_a - x_{a1}}\Big)\Big(\dfrac{y_b - y_{b1}}{x_b - x_{b1}}\Big) = -1 \quad \text{for the slopes of any perpendicular lines A and B}

Since I only need any possible perpendicular line, I can make both lines go through (0,0)(0,0). Therefore, some assumptions:

xa1=0ya1=0xb1=0yb1=0 x_{a1} = 0 \\ y_{a1} = 0 \\ x_{b1} = 0 \\ y_{b1} = 0

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -2 -1 0 1 2 3 4 -3 -2 -1 0 1 2 3 4 5 6 (xa1, ya1) and (xb1, yb1) (xa, ya) (xb, yb) y x A(x) A(x) B(x) B(x) gnuplot_plot_3
set xtics 1
set ytics 1
set xrange [-3:6]
set yrange [-2:4]

$data << EOD
0 0
2 1
-1 2
EOD

set label "(x_{a1}, y_{a1}) and (x_{b1}, y_{b1})" at 0,0 offset 1.5,-0.5
set label "(x_a, y_a)" at 2,1 offset 1.5,-0.3
set label "(x_b, y_b)" at -1,2 offset 1,0

A(x) = 0.5 * x
B(x) = -2 * x
plot A(x), B(x), "$data" with points lt 6 pt 7 notitle

Therefore:

(yaxa)(ybxb)=1 \Big(\dfrac{y_a}{x_a}\Big)\Big(\dfrac{y_b}{x_b}\Big) = -1

Rearranging:

ybxb=1÷yaxa=1(xaya) \dfrac{y_b}{x_b} = -1 \div \dfrac{y_a}{x_a} = -1\Big(\dfrac{x_a}{y_a}\Big)

Therefore, to find a perpendicular slope mbm_b for slope ma=yaxam_a = \dfrac{y_a}{x_a}:

mb=ybxb=xaya \boxed{m_b = \dfrac{y_b}{x_b} = -\dfrac{x_a}{y_a}}

Remember: negative reciprocal — take the reciprocal (i.e. flip the numerator and denominator) of slope mam_a, and negate.

Also remember: reciprocal (a.k.a. multiplicative inverse): what number multiplied by xx gives 11?

Answer: 1xx=1\frac{1}{x} * x = 1. For example, the reciprocal of 33 is 13\frac{1}{3} (just flip the fraction).

The reciprocal is often written as x1x^{-1}.

Playing with the line equations

What follows here is a long series of me just playing with the line equations.

If ma=yaxa=12m_a = \dfrac{y_a}{x_a} = \dfrac{1}{2}, then mb=xaya=21m_b = -\dfrac{x_a}{y_a} = -\dfrac{2}{1}.

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -2 -1 0 1 2 3 4 -2 -1 0 1 2 3 4 5 6 7 y x A(x) A(x) B(x) B(x)
set xtics 1
set ytics 1
set xrange [-2:7]
set yrange [-2:4]

A(x) = 0.5 * x
B(x) = -2 * x
plot A(x), B(x)

I can move line B along line A by changing the y-intercept of line B:

yb=2xb+10 y_b = -2 x_b + 10

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -1 0 1 2 3 4 5 -1 0 1 2 3 4 5 6 7 8 y x A(x) A(x) B(x) B(x)
set xtics 1
set ytics 1
set xrange [-1:8]
set yrange [-1:5]

A(x) = 0.5 * x
B(x) = -2 * x + 10
plot A(x), B(x)

Assuming A travels through (0,0)(0,0), how can I determine the correct y-intercept for B if I want the lines to intersect at a specific point of A?

If line A is horizontal, then the intersection point is at the x-intercept:

xb=cbmbmbxb=cbcb=mbxb=(xaya)xb x_b = -\frac{c_b}{m_b} \qquad m_b x_b = -c_b \qquad c_b = -m_b x_b = -(\frac{x_a}{y_a})x_b

So if I want the lines to intersect at xb=5x_b = 5:

cb=(21)(5)=10 c_b = -(-\frac{2}{1})(5) = 10

But it gets more difficult when line A is not horizontal.

Maybe I can just rearrange the slope-intercept equation:

yb=mbxb+cbxb=xayb=ya(xa,ya) and (xb,yb) are the same point (A and B intersect)ya=mbxa+cbcb=yambxacb=2(2)(4)=10 y_b = m_b x_b + c_b \\ x_b = x_a \qquad y_b = y_a \qquad (x_a, y_a)\text{ and }(x_b, y_b)\text{ are the same point (A and B intersect)} \\ y_a = m_b x_a + c_b \qquad \boxed{c_b = y_a - m_b x_a} \\ c_b = 2 - (-2)(4) = 10

Remember that mb=ybxb=xayam_b = \dfrac{y_b}{x_b} = -\dfrac{x_a}{y_a}:

cb=yambxa=ya(xaya)xa=ya+xa2ya c_b = y_a - m_b x_a = y_a - (-\dfrac{x_a}{y_a})x_a = y_a + \dfrac{x_a^2}{y_a}

Therefore, to find the y-intercept of B, when you only know a point (xa,ya)(x_a, y_a), and A travels through (0,0)(0,0):

cb=ya+xa2yacb=2+162=10 \boxed{c_b = y_a + \dfrac{x_a^2}{y_a}} \qquad c_b = 2 + \frac{16}{2} = 10

You can alternatively write this as dividing by the slope of A:

ma=yaxacb=ya+xa÷yaxacb=ya+xa÷ma m_a = \dfrac{y_a}{x_a} \qquad c_b = y_a + x_a \div \dfrac{y_a}{x_a} \qquad \boxed{c_b = y_a + x_a \div m_a}


I wonder: when we say ma=yaxam_a = \dfrac{y_a}{x_a} and the perpendicular slope mb=xayam_b = -\dfrac{x_a}{y_a}, rather than me just saying "flip the numerator and denominator and negate the value", is there some mathematical operation, e.g. multiplying by some value vv, that I can use to achieve this flipping and negation?

mb=v(ma)xaya=vyaxav=xaya÷yaxa=xa2ya2=((xaya)2) m_b = v(m_a) \qquad -\frac{x_a}{y_a} = v\frac{y_a}{x_a} \qquad v = -\frac{x_a}{y_a} \div \frac{y_a}{x_a} = -\frac{x_a^2}{y_a^2} = -((\frac{x_a}{y_a})^2)

OK, so mb=(x2y2)(yx)=(yx)÷(y2x2)=ma÷(ma2)=1ma=ma1m_b = \Big(-\dfrac{x^2}{y^2}\Big)\Big(\dfrac{y}{x}\Big) = \Big(\dfrac{y}{x}\Big) \div \Big(-\dfrac{y^2}{x^2}\Big) = m_a \div -(m_a^2) = -\dfrac{1}{m_a} = -m_a^{-1}.

To find the perpendicular slope mbm_b for mam_a, divide mam_a by itself squared and negated.

mb=ma÷(ma2) \boxed{m_b = m_a \div -(m_a^2)}

This might be interesting in the future, but doesn't help me now. For now it's better to remember that mbm_b is simply the negative reciprocal of mam_a, i.e. mb=ma1m_b = -m_a^{-1}.

Edit (2022-08-07): remember — when you have an equation like tanα=yx\tan \alpha = \frac{y}{x} and you want to flip yy and xx (i.e. take the reciprocal a.k.a. multiplicative inverse), flip the fractions on both sides of the equation: 1tanα=xy\frac{1}{\tan \alpha} = \frac{x}{y}.

Edit (2022-10-02): remember — when you want to take the reciprocal of a number, simply divide 11 by your number. For example:
if a=xya = \frac{x}{y}, then its reciprocal bb is b=1a=1/xy=1yx=yxb = \frac{1}{a} = 1 / \frac{x}{y} = 1 * \frac{y}{x} = \frac{y}{x}.


What if A does not travel through (0,0)(0,0)? How do I find cbc_b then? Just looking at the graph, maybe I can add the y-intercept of A (i.e. cac_a) to the equation, since it moves both A and B upwards on the Y axis:

cb=ya+xa2ya+ca c_b = y_a + \dfrac{x_a^2}{y_a} + c_a

For the graph below we want A and B to intersect at xa=3x_a = 3:

cb=72+3272+2=72+9(27)+2=72+327=113148.071 c_b = \frac{7}{2} + \dfrac{3^2}{\frac{7}{2}} + 2 = \frac{7}{2} + 9(\frac{2}{7}) + 2 = \frac{7}{2} + \frac{32}{7} = \frac{113}{14} \approx 8.071

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -1 0 1 2 3 4 5 6 7 8 9 10 11 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 y x A(x) A(x) B(x) B(x)
set xtics 1
set ytics 1
set xrange [-1:15]
set yrange [-1:11]

A(x) = 0.5 * x + 2
B(x) = -2 * x + 8.071
plot A(x), B(x)

This is close, but not correct, since the lines should intersect at xa=3x_a = 3. A does not travel through (0,0)(0,0). I need to have both cac_a and cbc_b in the same equation somehow, which the slope-intercept form yb=mbxa+cby_b = m_b x_a + c_b didn't allow.

Maybe I can use the earlier equation mamb=1m_a m_b = -1 instead, and undo some of the assumptions I made above.

(yaya1xaxa1)(ybyb1xbxb1)=1 \Big(\dfrac{y_a - y_{a1}}{x_a - x_{a1}}\Big)\Big(\dfrac{y_b - y_{b1}}{x_b - x_{b1}}\Big) = -1

Since A doesn't travel through (0,0)(0,0), I can now make these assumptions instead:

xa1=0ya1=caxb1=0yb1=cbxa=xbya=yb x_{a1} = 0 \\ y_{a1} = c_a \\ x_{b1} = 0 \\ y_{b1} = c_b \\ x_a = x_b \\ y_a = y_b

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 (xa1, ya1) (xb1, yb1) (xa, ya) and (xb, yb) y x A(x) A(x) B(x) B(x) gnuplot_plot_3
set noxtics
set noytics
set xrange [-3:6]
set yrange [-1:5]

$data << EOD
0 0.7
0 3.5
1.4 1.4
EOD

set label "(x_{a1}, y_{a1})" at 0,0.7 offset 1.5,0
set label "(x_{b1}, y_{b1})" at 0,3.5 offset 1.5,0
set label "(x_a, y_a) and (x_b, y_b)" at 1.4,1.4 offset 1.5,0

A(x) = 0.5 * x + 0.7
B(x) = -1.5 * x + 3.5
plot A(x), B(x), "$data" with points lt 6 pt 7 notitle

(yacaxa0)(yacbxa0)=1(yaca)(yacb)=xa2 \Big(\dfrac{y_a - c_a}{x_a - 0}\Big)\Big(\dfrac{y_a - c_b}{x_a - 0}\Big) = -1 \qquad (y_a - c_a)(y_a - c_b) = -x_a^2

yacb=xa2yacacb=ya+xa2yaca y_a - c_b = -\dfrac{x_a^2}{y_a - c_a} \qquad \boxed{c_b = y_a + \dfrac{x_a^2}{y_a - c_a}}

Can I get rid of yay_a?

First I'll write yay_a as the line equation:

ya=maxa+ca y_a = m_a x_a + c_a

Then:

ya=yaya1xaxa1xa+caya=yacaxa0xa+ca y_a = \dfrac{y_a - y_{a1}}{x_a - x_{a1}} x_a + c_a \qquad y_a = \dfrac{y_a - c_a}{x_a - 0} x_a + c_a

I can only get rid of yay_a by knowing the slope. So in addition to knowing cac_a and xax_a, I also need to know either yay_a or mam_a. I'll choose mam_a:

cb=(maxa+ca)+xa2(maxa+ca)ca c_b = (m_a x_a + c_a) + \dfrac{x_a^2}{(m_a x_a + c_a) - c_a}

cb=maxa+xama+ca=ma2xa+xama+ca=xa(ma2+1)ma+ca c_b = m_a x_a + \dfrac{x_a}{m_a} + c_a = \dfrac{m_a^2 x_a + x_a}{m_a} + c_a = \dfrac{x_a (m_a^2 + 1)}{m_a} + c_a

Therefore, to find the y-intercept of line B that is perpendicular to line A and intersects at xax_a:

cb=maxa+ca+xama \boxed{c_b = m_a x_a + c_a + \dfrac{x_a}{m_a}}

Note that this is almost the line equation y=mx+cy = mx + c, but with the additional xama\dfrac{x_a}{m_a}.

Now I can find the correct y-intercept of B that intersects at xa=3x_a = 3:

cb=123+2+3÷12=32+8=192=9.5 c_b = \frac{1}{2} 3 + 2 + 3 \div \frac{1}{2} = \frac{3}{2} + 8 = \frac{19}{2} = 9.5

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -1 0 1 2 3 4 5 6 7 8 9 10 11 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 y x A(x) A(x) B(x) B(x)
set xtics 1
set ytics 1
set xrange [-1:15]
set yrange [-1:11]

A(x) = 0.5 * x + 2
B(x) = -2 * x + 9.5
plot A(x), B(x)

Update: see here for an even better solution with trigonometry.

2.B.6

(a)

yy1=m(xx1)Start with point-slope formy4=12(x1)y4=12x+12y=12x+92Rearranged into slope-intercept form2y+x=9Rearranged into standard form y - y_1 = m(x - x_1) \qquad \text{Start with point-slope form} \\ y - 4 = -\frac{1}{2}(x - 1) \\ y - 4 = -\frac{1}{2}x + \frac{1}{2} \\ y = -\frac{1}{2}x + \frac{9}{2} \qquad \text{Rearranged into slope-intercept form} \\ 2y + x = 9 \qquad \text{Rearranged into standard form}

(b)

3y+2x=13y=2x+1y=2x+13=2x3+13=23x+13ma=23mb=32Negative reciprocal of may4=32(x1)y=32x+52or2y3x=5 3y + 2x = 1 \\ 3y = -2x + 1 \\ y = \frac{-2x + 1}{3} = -\frac{2x}{3} + \frac{1}{3} = -\frac{2}{3}x + \frac{1}{3} \\ m_a = -\frac{2}{3} \\ m_b = \frac{3}{2} \quad \text{Negative reciprocal of }m_a \\ y - 4 = \frac{3}{2}(x - 1) \\ y = \frac{3}{2}x + \frac{5}{2} \quad \text{or} \quad 2y - 3x = 5

(c)

4y+x=04y=xy=14xma=14mb=41y4=4(x1)y=4x 4y + x = 0 \\ 4y = -x \\ y = -\frac{1}{4}x \qquad m_a = -\frac{1}{4} \qquad m_b = \frac{4}{1} \\ y - 4 = 4(x - 1) \\ y = 4x


Above we found the midpoint of a line. Here we find a point on a line at a specific ratio:

(x1+pp+q(x2x1),y1+pp+q(y2y1)) \boxed{(x_1 + \frac{p}{p + q}(x_2 - x_1), y_1 + \frac{p}{p + q}(y_2 - y_1))}

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 -1 0 1 2 3 4 5 6 7 8 9 10 Point at ratio p:q p q y x p p q q gnuplot_plot_3 gnuplot_plot_4

$p << EOD
1 3
3 9
EOD

$q << EOD
3 9
6 18
EOD

$dataXY << EOD
1 3
6 3
6 18
EOD

set label "Point at ratio p:q" at 3,9 right offset -1.5,0.5
set label "p" at 2,6 right offset -1.5,0
set label "q" at 4.5,13.5 right offset -1.5,0

$dataPoint << EOD
3 3
3 9
6 9
EOD

set xtics 1
set ytics 1
set xrange [-1:10]
set yrange [-1:19]
set nogrid

plot "$p" with linespoints title "p", "$q" with linespoints title "q", "$dataXY" with lines dt 2 notitle, "$dataPoint" with linespoints dt 2 notitle

Self test 4, (7)

Initially I thought I could just plug in the ratio directly as a fraction r=pqr = \frac{p}{q}. In other words, I thought "ratio" means the same as "percentage" or "fraction", but it doesn't.

(x1+r(x2x1),y1+r(y2y1))(1+23(61),3+23(183))(133,13) (x_1 + r(x_2 - x_1), y_1 + r(y_2 - y_1)) \\ (1 + \frac{2}{3}(6 - 1), 3 + \frac{2}{3}(18 - 3)) \\ \cancel{(\frac{13}{3}, 13)}

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 -1 0 1 2 3 4 5 6 7 8 9 10 Point at fraction 2/3 y x gnuplot_plot_1 gnuplot_plot_2 gnuplot_plot_3
$data << EOD
1 3
6 18
EOD

$dataXY << EOD
1 3
6 3
6 18
EOD

set label "Point at fraction 2/3" at 4.333,13 right offset -1,0.5

$dataPoint << EOD
4.333 3
4.333 13
6 13
EOD

set xtics 1
set ytics 1
set xrange [-1:10]
set yrange [-1:19]
set nogrid

plot "$data" with linespoints notitle, "$dataXY" with lines dt 2 notitle, "$dataPoint" with linespoints dt 2 notitle

By ratio 2:32:3 they don't mean the fraction 23\frac{2}{3}. Rather they mean that pp has length 22 and qq has length 33, so the total length is 55, and the fraction is pp+q=22+3\frac{p}{p + q} = \frac{2}{2 + 3}.

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 -1 0 1 2 3 4 5 6 7 8 9 10 Point at ratio 2:3 (fraction 2/5) p = 2 q = 3 p:q = 2:3 y x p p q q gnuplot_plot_3 gnuplot_plot_4

$p << EOD
1 3
3 9
EOD

$q << EOD
3 9
6 18
EOD

$dataXY << EOD
1 3
6 3
6 18
EOD

set label "Point at ratio 2:3\n(fraction 2/5)" at 3,9 right offset -1.5,1
set label "p = 2" at 2,6 right offset -1.5,0
set label "q = 3" at 4.5,13.5 right offset -1.5,0
set label "p:q = 2:3" at 0.5,16.5 left offset 0,0

$dataPoint << EOD
3 3
3 9
6 9
EOD

set xtics 1
set ytics 1
set xrange [-1:10]
set yrange [-1:19]
set nogrid

plot "$p" with linespoints title "p", "$q" with linespoints title "q", "$dataXY" with lines dt 2 notitle, "$dataPoint" with linespoints dt 2 notitle

Simultaneous equations

{y=12x+2y=2x+192 \begin{cases} y = \frac{1}{2}x + 2 \\ y = -2x + \frac{19}{2} \end{cases}

What values of xx and yy will make both equations true? We're looking for an intersection.

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -1 0 1 2 3 4 5 6 7 8 9 10 11 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 y x A(x) A(x) B(x) B(x)
set xtics 1
set ytics 1
set xrange [-1:15]
set yrange [-1:11]

A(x) = 0.5 * x + 2
B(x) = -2 * x + 9.5
plot A(x), B(x)

Note: adding one more line CC does not add any new information, since AA and BB already show us where they intersect, and CC already intersects at the same point. We only need two from {A,B,C}\{A, B, C\}.

{y=12x+2y=2x+192y=2x+52 \begin{cases} y = \frac{1}{2}x + 2 \\ y = -2x + \frac{19}{2} \\ y = 2x + -\frac{5}{2} \end{cases}

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -1 0 1 2 3 4 5 6 7 8 9 10 11 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 y x A(x) A(x) B(x) B(x) C(x) C(x)
set xtics 1
set ytics 1
set xrange [-1:15]
set yrange [-1:11]

A(x) = 0.5 * x + 2
B(x) = -2 * x + 9.5
C(x) = 2 * x + -2.5
plot A(x), B(x), C(x)

On the other hand, if some of the lines intersect at different points, then not all of the equations are consistent with each other (i.e. simultaneously true):

{y=12x+2y=2x+192y=x1 \begin{cases} y = \frac{1}{2}x + 2 \\ y = -2x + \frac{19}{2} \\ y = x - 1 \end{cases}

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -1 0 1 2 3 4 5 6 7 8 9 10 11 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 y x A(x) A(x) B(x) B(x) C(x) C(x)
set xtics 1
set ytics 1
set xrange [-1:15]
set yrange [-1:11]

A(x) = 0.5 * x + 2
B(x) = -2 * x + 9.5
C(x) = x - 1
plot A(x), B(x), C(x)

Note: two parallel lines never intersect. Therefore there is no solution (xx and yy) that fits both of these lines' equations.

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -1 0 1 2 3 4 5 6 7 8 9 10 11 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 y x A(x) A(x) B(x) B(x)
set xtics 1
set ytics 1
set xrange [-1:15]
set yrange [-1:11]

A(x) = 0.5 * x + 2
B(x) = 0.5 * x + 5
plot A(x), B(x)

Remember: two ways of solving simultaneous equations:

Substitution

{2x+3y=5x2y=6 \begin{cases} 2x + 3y = 5 \\ x - 2y = 6 \end{cases}

Rearrange one of the equations so that it gives the value of xx or yy:

{2x+3y=5x=2y+6 \begin{cases} 2x + 3y = 5 \\ x = 2y + 6 \end{cases}

Since we're looking for values of xx and yy that satisfy both equations (i.e. we assume that their lines intersect), we can just substitute xx or yy in one equation with the whole other equation:

2x+3y=52(2y+6)+3y=54y+12+3y=5y=1 2x + 3y = 5 \\ 2(2y + 6) + 3y = 5 \\ 4y + 12 + 3y = 5 \\ y = -1

And then substitute yy in the other equation:

x2y=6x2(1)=6x=4 x - 2y = 6 \\ x - 2(-1) = 6 \\ x = 4

The lines intersect at (4,1)(4, -1).

Elimination

{2x+3y=5x2y=6 \begin{cases} 2x + 3y = 5 \\ x - 2y = 6 \end{cases}

Multiply one or both of the equations, such that either the xx or yy coefficients (factors) are each other's additive inverses (aka negation, aka sign change):

{2x+3y=52x+4y=12Multiplied both sides by 2 \begin{cases} 2x + 3y = 5 \\ -2x + 4y = -12 \qquad \text{Multiplied both sides by }-2 \end{cases}

Then add both equations (left-hand side to left-hand side, and right-hand side to right-hand side):

7y=7y=1 7y = -7 \\ y = -1

(You could've also subtracted the equations, if their signs were the same. Remember: when you're solving simultaneous equations with elimination, you can either add or subtract the two equations.)

And then substitute yy in the other equation, like in substitution above, to get xx.

When eliminating, you can also multiply the equations by different values (e.g. multiply the upper equation by 2 and lower equation by 3 to get rid of yy) — whichever values that allow you to eliminate either xx or yy.

Remember: in real-life situations there are likely more than 2 variables. If there are as many equations as there are variables (e.g. 4 equations with 4 variables), then you can usually solve them with multiple rounds of elimination, until just one variable is left.


Solving by substitution:

{3x2y=212x+5y=5 \begin{cases} 3x - 2y = 21 \\ 2x + 5y = -5 \end{cases}

3x2y=21x=21+2y3=7+23yx from equation 12(7+23y)+5y=5Substitute x in equation 214+43y+5y=5193y=19y=19/193=119319=3Found y for equation 2x=7+23(3)=5Found x for equation 12(5)+5(3)=5Test x in equation 2 3x - 2y = 21 \\ x = \frac{21 + 2y}{3} = 7 + \frac{2}{3}y \qquad x \text{ from equation 1} \\ 2(7 + \frac{2}{3}y) + 5y = -5 \qquad \text{Substitute }x\text{ in equation 2} \\ 14 + \frac{4}{3}y + 5y = -5 \\ \frac{19}{3}y = -19 \\ y = -19 / \frac{19}{3} = \frac{-1 * 19 * 3}{19} = -3 \qquad \text{Found }y\text{ for equation 2} \\ x = 7 + \frac{2}{3}(-3) = 5 \qquad \text{Found }x\text{ for equation 1} \\ 2(5) + 5(-3) = -5 \qquad \text{Test }x\text{ in equation 2}

Solving by elimination:

{x3y2+1=06x+y+8=0 \begin{cases} \frac{x}{3} - \frac{y}{2} + 1 = 0 \\ 6x + y + 8 = 0 \end{cases}

{2x32y2+2=026x+y+8=0 \begin{cases} \frac{2x}{3} - \frac{2y}{2} + 2 = 0 * 2 \\ 6x + y + 8 = 0 \end{cases}

203x+10=0x=10/203=32Solved x for both equations \frac{20}{3}x + 10 = 0 \\ x = -10 / \frac{20}{3} = -\frac{3}{2} \qquad \text{Solved }x\text{ for both equations}

6(32)+y+8=0y=98=1Solved y in equation 2 6(-\frac{3}{2}) + y + 8 = 0 \\ y = 9 - 8 = 1 \qquad \text{Solved }y\text{ in equation 2}

32/312+1=0Test y in equation 13612+1=0 -\frac{3}{2} / 3 - \frac{1}{2} + 1 = 0 \qquad \text{Test }y\text{ in equation 1} \\ -\frac{3}{6} - \frac{1}{2} + 1 = 0

Remember: when solving simultaneous equations (or any equations for that matter), aim to get rid of the fractions first. The above would've been easier if you first multiplied both equations by larger values (rather than just multiplying the top equation by 2) to get rid of the fractions.

2.C.1

{5a2b=683a+b=10 \begin{cases} 5a - 2b = 68 \\ 3a + b = 10 \end{cases}

b=103a5a2(103a)=6811a20=68a=8b=103(8)=14 b = 10 - 3a \\ 5a - 2(10 - 3a) = 68 \\ 11a - 20 = 68 \\ a = 8 \\ b = 10 - 3(8) = -14

{5p2q=92p+5q=8 \begin{cases} 5p - 2q = 9 \\ 2p + 5q = -8 \end{cases}

{10p4q=1810p25q=40 \begin{cases} 10p - 4q = 18 \\ -10p - 25q = 40 \end{cases}

29q=58q=58/29=2q=22p+5(2)=82p=2p=15(1)2(2)=95+4=9 -29q = 58 \\ -q = 58 / 29 = 2 \\ q = -2 \\ 2p + 5(-2) = -8 \\ 2p = 2 \\ p = 1 \\ 5(1) - 2(-2) = 9 \\ 5 + 4 = 9

{x8y=523x+y3=13 \begin{cases} \frac{x}{8} - y = -\frac{5}{2} \\ 3x + \frac{y}{3} = 13 \end{cases}

{x8y=209x+y=39 \begin{cases} x - 8y = -20 \\ 9x + y = 39 \end{cases}

{x=8y209x+y=39 \begin{cases} x = 8y - 20 \\ 9x + y = 39 \end{cases}

9(8y20)+y=3972y180+y=3973y=219y=3x=8(3)20=4 9(8y - 20) + y = 39 \\ 72y - 180 + y = 39 \\ 73y = 219 \\ y = 3 \\ x = 8(3) - 20 = 4

{3x+4y=02x2y=7 \begin{cases} \frac{3}{x} + \frac{4}{y} = 0 \\ \frac{2}{x} - \frac{2}{y} = 7 \end{cases}

{3x+4y=04x4y=14 \begin{cases} \frac{3}{x} + \frac{4}{y} = 0 \\ \frac{4}{x} - \frac{4}{y} = 14 \end{cases}

3x+4x=147x=1414x=7x=12 \frac{3}{x} + \frac{4}{x} = 14 \\ \frac{7}{x} = 14 \\ 14x = 7 \\ x = \frac{1}{2}

3/12+4y=06+4y=06y+4=0y6y=4y=234/124/23=148+122=14 3 / \frac{1}{2} + \frac{4}{y} = 0 \\ 6 + \frac{4}{y} = 0 \\ 6y + 4 = 0y \\ 6y = -4 \\ y = -\frac{2}{3} \\ 4 / \frac{1}{2} - 4 / -\frac{2}{3} = 14 \\ 8 + \frac{12}{2} = 14


Quadratic equations

E.g. x2x6=0\boxed{x^2 - x - 6 = 0}. A quadratic equation draws a parabola:

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 y x gnuplot_plot_1
set xtics 1
set ytics 1
set xrange [-5:6]
set yrange [-7:4]

f(x) = x*x - x - 6
plot f(x) notitle

There are two xx values where y=0y = 0. These are the roots.

Remember: factoring is important in solving quadratic equations:

x2x6=0(x+2)(x3)=0 x^2 - x - 6 = 0 \\ (x + 2)(x - 3) = 0

One of the factors (i.e. parentheses) there must be zero, since the right-hand side is zero. Therefore xx is either 2-2 or 33:

(2+2)(23)=0(3+2)(33)=0 (-2 + 2)(-2 - 3) = 0 \\ (3 + 2)(3 - 3) = 0

See https://en.wikipedia.org/wiki/Quadratic_equation#Factoring_by_inspection.

2.D.1

x2+9x+14=0(x+7)(x+2)=0x={7,2} x^2 + 9x + 14 = 0 \\ (x + 7)(x + 2) = 0 \qquad x = \{-7, -2\}

x2+4x12=0(x+6)(x2)=0x={6,2} x^2 + 4x - 12 = 0 \\ (x + 6)(x - 2) = 0 \qquad x = \{-6, 2\}

x211x+18=0(x9)(x2)=0x={2,9} x^2 - 11x + 18 = 0 \\ (x - 9)(x - 2) = 0 \qquad x = \{2, 9\}

x2x20=0(x+4)(x5)=0x={4,5} x^2 - x - 20 = 0 \\ (x + 4)(x - 5) = 0 \qquad x = \{-4, 5\}

2x2+13x+6=0(2x+1)(x+6)=0x={6,12} 2x^2 + 13x + 6 = 0 \\ (2x + 1)(x + 6) = 0 \qquad x = \{-6, -\frac{1}{2}\}

3x27x6=0(3x+2)(x3)=0x={23,3} 3x^2 - 7x - 6 = 0 \\ (3x + 2)(x - 3) = 0 \qquad x = \{-\frac{2}{3}, 3\}

2.D.2

Equations in this form don't require factoring, since you can just take the square root of both sides.

x2=9(Sidenote:) this is a diff. of two squares: x232=0x2=32x=±3 x^2 = 9 \qquad \text{(Sidenote:) this is a diff. of two squares: } x^2 - 3^2 = 0 \\ \sqrt{x^2} = \sqrt{3^2} \\ x = \pm 3

x2=162525x2=16Remember: 25x2=25x2=(25x2)1/2=251/2x2(1/2)5x=±4x=±45 x^2 = \frac{16}{25} \\ 25x^2 = 16 \qquad \text{Remember: } \sqrt{25x^2} = \sqrt{25}\sqrt{x^2} = (25x^2)^{1/2} = 25^{1/2} x^{2(1/2)} \\ 5x = \pm4 \\ x = \pm\frac{4}{5}

(x3)2=4x3=±2x={1,5} (x - 3)^2 = 4 \\ x - 3 = \pm2 \\ x = \{1, 5\}

(2x3)2=252x3=±5x={22,82}={1,4} (2x - 3)^2 = 25 \\ 2x - 3 = \pm5 \\ x = \{-\frac{2}{2}, \frac{8}{2}\} = \{-1, 4\}

(3x2)2=363x2=±6x={43,83} (3x - 2)^2 = 36 \\ 3x - 2 = \pm6 \\ x = \{-\frac{4}{3}, \frac{8}{3}\}

Completing the square

In addition to factoring, this is another way to solve quadratic equations.

Remember this, as this will be useful in many problems in math. See https://en.wikipedia.org/wiki/Completing_the_square.

The goal: turn an equation from standard form to vertex form — in other words, from a trinomial to a squared binomial plus a constant:

Standard form: x2+6x16Vertex form: (x+3)225 \begin{aligned} \text{Standard form: }&x^2 + 6x - 16 \\ \text{Vertex form: }&(x + 3)^2 - 25 \end{aligned}

Or more generally:

Standard form: ax2+bx+cVertex form: a(xh)2+k \begin{aligned} \text{Standard form: }&ax^2 + bx + c \\ \text{Vertex form: }&a(x - h)^2 + k \end{aligned}

These are the steps:

First make sure that a=+1a = +1. If it doesn't, first factor it out:

ax2+bx+c=a(x2+bax)+cax^2 + bx + c = a(x^2 + \frac{b}{a}x) + c

Then you have, for example:

1(x2+6x)16=01(x^2 + 6x) - 16 = 0

Now you have a binomial (a polynomial with two terms) inside the parentheses.

Factor the binomial to find the closest perfect square. You can do this quickly by taking half of bb:

b2=3x2+6x(x+3)2 \frac{b}{2} = \boxed{3} \\ x^2 + 6x \approx (x + \boxed{3})^2

Important: (x+3)2=x2+6x+9(x + 3)^2 = x^2 + 6x \boxed{+ 9}, so you have an extra 99. Subtract it:

(x+3)2916=0The 9 is redundant, so you must subtract it \boxed{(x + 3)^2 - 9} - 16 = 0 \qquad \text{The }9\text{ is redundant, so you must subtract it}

Now you have an "incomplete" square, because of the subtraction.

"Complete" the square (i.e. make it "perfect") by adding 9 to both sides:

(x+3)29+916=9(x+3)29+916=9(x+3)216=9(x+3)2=25 \boxed{(x + 3)^2 - 9 + 9} - 16 = \boxed{9} \\ \boxed{(x + 3)^2 \cancel{- 9 + 9}} - 16 = 9 \\ (x + 3)^2 - 16 = 9 \\ (x + 3)^2 = 25

Now you have a perfect square on the LHS.

Remember that when you have a perfect square trinomial x2+bx+cx^2 + bx + c, then:

  • b/2b/2 gives you the number for the perfect square's summand: 6/2=36/2 = 3
  • (b/2)2(b/2)^2 gives you the number to subtract: (6/2)2=9(6/2)^2 = 9

Remember: learn to think of completing the square whenever you see x2+bxx^2 + bx. You should immediately see that x2+bx=(x+b2)2(b2)2x^2 + bx = (x + \frac{b}{2})^2 - (\frac{b}{2})^2. You should also learn to always see the visualization of completing the square in your mind when you think of the algebra.


Perfect square

Remember that a "perfect square" has a couple of different definitions:

  1. A square number, i.e. n2n^2, such that nn is an integer: n2=1,4,9,16,25n^2 = 1, 4, 9, 16, 25, etc.
    • Note: these have two roots: n-n and nn
  2. A perfect square trinomial, i.e. (a+b)2=a2+2ab+b2(a + b)^2 = a^2 + 2ab + b^2. "Perfect square trinomials" are quadratics which are the results of squaring binomials.
    • Note: these always have only one root (when the trinomial is of degree two, i.e., a quadratic), a.k.a. a double root
    • Apparently aa and cc are always square numbers (according to the first definition above) in perfect square trinomials (but not enough — for example, 4x2+5x+164x^2 + 5x + 16 is not a perfect square trinomial).

For example, this satisfies the first definition:

x2=25Perfectsquarex=±5Integerroot x^2 = \underbrace{25}_{\substack{\text{Perfect} \\ \text{square}}} \qquad\qquad x = \underbrace{\pm5}_{\substack{\text{Integer} \\ \text{root}}}

Can I manipulate the above into a perfect square trinomial?

x2=25x=±5x±5=0(x±5)2=02x2±10x+25=0(x±5)2=0 x^2 = 25 \\ x = \pm 5 \\ x \pm 5 = 0 \\ (x \pm 5)^2 = 0^2 \\ x^2 \pm 10x + 25 = 0 \\ (x \pm 5)^2 = 0

Sure... but this doesn't satisfy the second definition, since this has two roots (5,5-5, 5).

(Sidenote: see details about ±\pm.)

Here is a perfect square trinomial (notice how it has only one root) that satisfies the second definition:

x2+6x+9=0(x+3)2=0x+3=0x=3 x^2 + 6x + 9 = 0 \\ (x + 3)^2 = 0 \\ x + 3 = \sqrt{0} \\ x = -3

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -1 0 1 2 3 4 5 6 -6 -5 -4 -3 -2 -1 0 1 y x f(x) f(x)
set terminal svg size 300,200 enhanced font 'Verdana,10'
set xtics 1
set ytics 1
set xrange [-6:1]
set yrange [-1:6]

f(x) = x*x + 6*x + 9

plot f(x)

Here is an example of a perfect square trinomial whose root is not an integer (so it does not satisfy the first definition, but is still called a "perfect square trinomial"):

49x214x+149(x227x)+1Factor so that a=1 inside the parentheses 49x^2 - 14x + 1 \\ 49(x^2 - \frac{2}{7}x) + 1 \qquad \text{Factor so that }a = 1\text{ inside the parentheses}

Next make the parentheses contain a perfect square trinomial. You'll do this by taking half of bb (i.e. 27/2=17-\frac{2}{7} / 2 = -\frac{1}{7}) and squaring it. Then add and subtract that value.

49(x227x+(17)2(17)2)+1 49(x^2 - \frac{2}{7}x \boxed{+ (-\frac{1}{7})^2 - (-\frac{1}{7})^2}) + 1

Now you have a perfect square trinomial. You can factor it into a squared binomial.

49(x227x+(17)2(17)2)+149((x17)2(17)2)+1 49(\boxed{x^2 - \frac{2}{7}x + (-\frac{1}{7})^2} - (-\frac{1}{7})^2) + 1 \\ 49(\boxed{(x - \frac{1}{7})^2} - (-\frac{1}{7})^2) + 1

Now you can multiply out and finish:

49(x17)249(17)2+149(x17)21+149(x17)2 49(x - \frac{1}{7})^2 - 49(-\frac{1}{7})^2 + 1 \\ 49(x - \frac{1}{7})^2 - 1 + 1 \\ 49(x - \frac{1}{7})^2

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -0.5 0 0.5 1 1.5 2 -0.5 0 0.5 1 y x f(x) f(x)
set terminal svg size 300,200 enhanced font 'Verdana,10'
set xtics 0.5
set ytics 0.5
set xrange [-0.5:1]
set yrange [-0.5:2]

f(x) = 49*x*x - 14*x + 1

plot f(x)

TODO: investigate more about how perfect squares (definition 1) and perfect square trinomials (definition 2) are related. Also think about the discriminant.


Here I'm just trying to find the roots of an arbitrary trinomial 4x2+5x+164x^2 + 5x + 16 by completing the square:

4x2+5x+16=04(x2+54x)+16=04(x2+54x+(58)2(58)2)+16=04((x+58)2(58)2)+16=04(x+58)24(58)2+16=04(x+58)2(2(58))2+16=04(x+58)2(108)2+16=04(x+58)210064+16=04(x+58)22516+16=04(x+58)2+23116=04(x+58)2=231162(x+58)=±23142x+54=±2314x=54±23142x=5±2318 4x^2 + 5x + 16 = 0 \\ 4(x^2 + \frac{5}{4}x) + 16 = 0 \\ 4(x^2 + \frac{5}{4}x + (\frac{5}{8})^2 - (\frac{5}{8})^2) + 16 = 0 \\ 4((x + \frac{5}{8})^2 - (\frac{5}{8})^2) + 16 = 0 \\ 4(x + \frac{5}{8})^2 - 4(\frac{5}{8})^2 + 16 = 0 \\ 4(x + \frac{5}{8})^2 - (2(\frac{5}{8}))^2 + 16 = 0 \\ 4(x + \frac{5}{8})^2 - (\frac{10}{8})^2 + 16 = 0 \\ 4(x + \frac{5}{8})^2 - \frac{100}{64} + 16 = 0 \\ 4(x + \frac{5}{8})^2 - \frac{25}{16} + 16 = 0 \\ 4(x + \frac{5}{8})^2 + \frac{231}{16} = 0 \\ 4(x + \frac{5}{8})^2 = -\frac{231}{16} \\ 2(x + \frac{5}{8}) = \pm \frac{\sqrt{-231}}{4} \\ 2x + \frac{5}{4} = \pm \frac{\sqrt{-231}}{4} \\ x = \frac{-\frac{5}{4} \pm \frac{\sqrt{-231}}{4}}{2} \\ x = \frac{-5 \pm \sqrt{-231}}{8}

Checking the result with the quadratic formula:

x=5±524(4)(16)2(4)x=5±252568x=5±2318 x = \frac{-5 \pm \sqrt{5^2 - 4(4)(16)}}{2(4)} \\ x = \frac{-5 \pm \sqrt{25 - 256}}{8} \\ x = \frac{-5 \pm \sqrt{-231}}{8}

Umm... looks we need complex numbers here: https://www.wolframalpha.com/input/?i=4x^2+%2B+5x+%2B+16+%3D+0


If you forget why we do what we do to complete the square, start with a(xh)2+ka(x - h)^2 + k [i.e. the vertex form], multiply it out, step by step, and then reverse the process.

https://stitz-zeager.com/ Precalculus, page 204

OK, let's see what that does. Multiplying out:

a(xh)2+ka(xh)(xh)+ka(x2hxhx+h2)+kax2a2hx+ah2+k a(x - h)^2 + k \\ a(x - h)(x - h) + k \\ a(x^2 - hx - hx + h^2) + k \\ ax^2 - a2hx + ah^2 + k

Reversing the process:

ax2a2hx+ah2+ka(x22hx+h2)+kNotice the pattern inside the parenthesesa((xh)2)+k ax^2 - a2hx + ah^2 + k \\ a(x^2 - 2hx + h^2) + k \quad \text{Notice the pattern inside the parentheses} \\ a((x - h)^2) + k

Remember the pattern a2+2ab+b2a^2 + 2ab + b^2 of a perfect square trinomial, which is a squared binomial (a+b)2(a + b)^2.


"Completing" the square visualized

x2+bxc=0x2+bx=c x^2 + bx - c = 0 \\ x^2 + bx = c

looks like this:

If you split bxbx in the middle and try to add the two halves to x2x^2, you get an incomplete square:

You can see this algebraically when you try to complete the square:

x2+bx=c(x+b2)2(b2)2=c x^2 + bx = c \\ (x + \frac{b}{2})^2 - (\frac{b}{2})^2 = c

The subtracted (b2)2(\frac{b}{2})^2 is the missing square in the corner.

Therefore you need to "complete" the big square by adding a smaller square (b2)2(\frac{b}{2})^2 to the corner. You can do this by adding (b2)2(\frac{b}{2})^2 to both sides of the equation:

(x+b2)2(b2)2+(b2)2=c+(b2)2(x+b2)2(b2)2+(b2)2=c+(b2)2These two cancel out(x+b2)2=c+(b2)2E.g. (x+3)2=25 (x + \frac{b}{2})^2 - (\frac{b}{2})^2 + (\frac{b}{2})^2 = c + (\frac{b}{2})^2 \\ (x + \frac{b}{2})^2 - \cancel{(\frac{b}{2})^2 + (\frac{b}{2})^2} = c + (\frac{b}{2})^2 \qquad \text{These two cancel out} \\ (x + \frac{b}{2})^2 = c + (\frac{b}{2})^2 \qquad \text{E.g. }(x + 3)^2 = 25

From Wikipedia:

Completing the square

2.D.3

x2+4x=21(x+2)24=21x+2=±5x={7,3} x^2 + 4x = 21 \\ (x + 2)^2 - 4 = 21 \\ x + 2 = \pm5 \\ x = \{-7, 3\}

x26x+8=0(x3)29=8x3=12x={2,4} x^2 - 6x + 8 = 0 \\ (x - 3)^2 - 9 = -8 \\ x - 3 = 1^2 \\ x = \{2, 4\}

x23x10=0x23x=10(x32)294=10(x32)2=494x32=494=(494)1/2=491/241/2=494x32=±72x={42=2,102=5} x^2 - 3x - 10 = 0 \\ x^2 - 3x = 10 \\ (x - \frac{3}{2})^2 - \frac{9}{4} = 10 \\ (x - \frac{3}{2})^2 = \frac{49}{4} \\ x - \frac{3}{2} = \sqrt{\frac{49}{4}} = (\frac{49}{4})^{1/2} = \frac{49^{1/2}}{4^{1/2}} = \frac{\sqrt{49}}{\sqrt{4}} \\ x - \frac{3}{2} = \pm\frac{7}{2} \\ x = \{-\frac{4}{2} = -2, \frac{10}{2} = 5\}

Important aspects of a quadratic equation

The different forms of a quadratic equation:

  • Standard form: y=ax2+bx+cy = ax^2 + bx + c
    • The cc constant is the y-intercept
  • Vertex form: y=a(xh)2+ky = a(x - h)^2 + k
    • The lowest point of the curve (i.e. the vertex) is at (h,k)(h, k)
  • Factored form: y=a(xr1)(xr2)y = a(x - r_1)(x - r_2)
    • r1r_1 and r2r_2 are roots (x-intercepts) of the equation
    • r1r_1 is often called α\alpha (alpha) and r2r_2 is β\beta (beta)

Completing the square gives us the vertex form:

y=x2bxcy=(xb2)2(b2)2cCompleted the square y = x^2 - bx - c \\ y = (x - \frac{b}{2})^2 - (\frac{b}{2})^2 - c \qquad \text{Completed the square}

For example:

y=x22x3y=(x1)213=(x1)24Completed the square y = x^2 - 2x - 3 \\ y = (x - 1)^2 - 1 - 3 = \boxed{(x - 1)^2 - 4} \qquad \text{Completed the square}

The vertex form has these nice aspects:

  • The smallest possible value of yy is 4\boxed{-4}, since squaring always gives a positive number: (x1)20(x - 1)^2 \geq 0, so xx must be 11 so that we get the smallest yy.
  • The xx giving the smallest possible yy is 1\boxed{1}, so the lowest possible point is (1,4)(1, -4)
  • The y-intercept can be found easily: just set x=0x = 0, which gives (01)24=3(0 - 1)^2 - 4 = -3
  • The roots, i.e. the values of xx where y=0y = 0, can be found easily:
    y=(x1)240=(x1)24(x1)2=4Solving for x...x1=±2x={1,3}Found the roots (x-intercepts) y = (x - 1)^2 - 4 \\ 0 = (x - 1)^2 - 4 \\ (x - 1)^2 = 4 \qquad \text{Solving for x...} \\ x - 1 = \pm2 \\ x = \{-1, 3\} \qquad \text{Found the roots (x-intercepts)}

A quadratic function's (y=ax2bxcy = ax^2 - bx - c) parabola will be upside down if aa is a negative number: https://youtu.be/MHXO86wKeDY?t=899

To mirror a quadratic function's curve while preserving the roots, multiply the function by 1-1:

f(x)=x22x3g(x)=1(x22x3)h(x)=13(x22x3) f(x) = x^2 - 2x - 3 \\ g(x) = -1(x^2 - 2x - 3) \\ h(x) = -\frac{1}{3}(x^2 - 2x - 3)

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -5 -4 -3 -2 -1 0 1 2 3 4 5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 y x f(x) f(x) g(x) g(x) h(x) h(x)
set xtics 1
set ytics 1
set xrange [-4:7]
set yrange [-5:5]

f(x) = x*x - 2*x - 3
g(x) = -1 * ( (x*x) - 2*x - 3 )
h(x) = -0.333 * ( (x*x) - 2*x - 3 )

plot f(x), g(x), h(x)

How does varying aa, bb and cc in ax2+bx+cax^2 + bx + c affect the curve?

Varying aa between [3,3][-3, 3]:

(Notice how a=0a = 0 gives a straight line, i.e. y=0+mx+cy = 0 + mx + c.)

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 -4 -3 -2 -1 0 1 2 3 4 5 y x -3 -3 -2 -2 -1 -1 0 0 1 1 2 2 3 3
set xtics 1
set ytics 1
set xrange [-4:5]
set yrange [-6:6]

f(x) = -3*x*x + 0*x + 0
g(x) = -2*x*x + 0*x + 0
h(x) = -1*x*x + 0*x + 0
i(x) = 0*x*x + 0*x + 0
j(x) = x*x + 0*x + 0
k(x) = 2*x*x + 0*x + 0
l(x) = 3*x*x + 0*x + 0

plot f(x) title "-3", g(x) title "-2", h(x) title "-1", i(x) title "0", j(x) lt rgb "violet" title "1", k(x) title "2", l(x) title "3"

Varying bb between [3,3][-3, 3]:

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 y x -3 -3 -2 -2 -1 -1 0 0 1 1 2 2 3 3
set xtics 1
set ytics 1
set xrange [-5:7]
set yrange [-4:8]

f(x) = x*x + -3*x + 0
g(x) = x*x + -2*x + 0
h(x) = x*x + -1*x + 0
i(x) = x*x + 0*x + 0
j(x) = x*x + x + 0
k(x) = x*x + 2*x + 0
l(x) = x*x + 3*x + 0

plot f(x) title "-3", g(x) title "-2", h(x) title "-1", i(x) title "0", j(x) lt rgb "violet" title "1", k(x) title "2", l(x) title "3"

Varying cc between [3,3][-3, 3]:

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 -5 -4 -3 -2 -1 0 1 2 3 4 5 y x -3 -3 -2 -2 -1 -1 0 0 1 1 2 2 3 3
set xtics 1
set ytics 1
set xrange [-5:5]
set yrange [-4:8]

f(x) = x*x + 0*x + -3
g(x) = x*x + 0*x + -2
h(x) = x*x + 0*x + -1
i(x) = x*x + 0*x + 0
j(x) = x*x + 0*x + 1
k(x) = x*x + 0*x + 2
l(x) = x*x + 0*x + 3

plot f(x) title "-3", g(x) title "-2", h(x) title "-1", i(x) title "0", j(x) lt rgb "violet" title "1", k(x) title "2", l(x) title "3"

How does varying aa, hh and kk in a(x+h)2+ka(x + h)^2 + k affect the curve?

Varying hh between [3,3][-3, 3]:

(h-h defines the xx coordinate of the lowest point on the curve.)

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -1 0 1 2 3 4 5 6 7 8 9 10 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 y x -3 -3 -2 -2 -1 -1 0 0 1 1 2 2 3 3
set xtics 1
set ytics 1
set xrange [-6:9]
set yrange [-1:10]

f(x) = (x + -3)*(x + -3) + 0
g(x) = (x + -2)*(x + -2) + 0
h(x) = (x + -1)*(x + -1) + 0
i(x) = (x + 0)*(x + 0) + 0
j(x) = (x + 1)*(x + 1) + 0
k(x) = (x + 2)*(x + 2) + 0
l(x) = (x + 3)*(x + 3) + 0

plot f(x) title "-3", g(x) title "-2", h(x) title "-1", i(x) title "0", j(x) lt rgb "violet" title "1", k(x) title "2", l(x) title "3"

Varying kk between [3,3][-3, 3]:

(kk defines the yy coordinate of the lowest point on the curve.)

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 -4 -3 -2 -1 0 1 2 3 4 5 y x -3 -3 -2 -2 -1 -1 0 0 1 1 2 2 3 3
set xtics 1
set ytics 1
set xrange [-4:5]
set yrange [-4:8]

f(x) = (x + 0)*(x + 0) + -3
g(x) = (x + 0)*(x + 0) + -2
h(x) = (x + 0)*(x + 0) + -1
i(x) = (x + 0)*(x + 0) + 0
j(x) = (x + 0)*(x + 0) + 1
k(x) = (x + 0)*(x + 0) + 2
l(x) = (x + 0)*(x + 0) + 3

plot f(x) title "-3", g(x) title "-2", h(x) title "-1", i(x) title "0", j(x) lt rgb "violet" title "1", k(x) title "2", l(x) title "3"

Varying aa between [3,3][-3, 3]:

(aa squeezes and widens the curve along the center line. Its sign determines whether the curve is U-shaped or an inverted U.)

(Notice how a=0a = 0 gives a straight line, just like with 0x2+bx+c0x^2 + bx + c, since 0(xh)2+k=k0(x - h)^2 + k = k.)

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 -4 -3 -2 -1 0 1 2 3 4 5 y x -3 -3 -2 -2 -1 -1 0 0 1 1 2 2 3 3
set xtics 1
set ytics 1
set xrange [-4:5]
set yrange [-4:8]

f(x) = -3*(x + 0)*(x + 0) + 0
g(x) = -2*(x + 0)*(x + 0) + 0
h(x) = -1*(x + 0)*(x + 0) + 0
i(x) = 0*(x + 0)*(x + 0) + 0
j(x) = 1*(x + 0)*(x + 0) + 0
k(x) = 2*(x + 0)*(x + 0) + 0
l(x) = 3*(x + 0)*(x + 0) + 0

plot f(x) title "-3", g(x) title "-2", h(x) title "-1", i(x) title "0", j(x) lt rgb "violet" title "1", k(x) title "2", l(x) title "3"

The quadratic formula

In addition to factoring and completing the square, this is another way to solve quadratic equations. It allows you to just plug in aa, bb and cc, giving you xx (the roots).

You can derive the quadratic formula by completing the square:

ax2+bx+c=0ax2+bx+ca=0aDivide both sides by ax2+bax+ca=0x2+bax=caMove to RHS(x+ba/2)2(ba/2)2=caComplete the square(x+b2a)2=(b2a)2caMove to RHS(x+b2a)2=b24a2ca(x+b2a)2=b24ac4a2x+b2a=±b24ac4a2x+b2a=±b24ac2ax=b2a±b24ac2aMove to RHSx=b±b24ac2aThe quadratic formula ax^2 + bx + c = 0 \\ \frac{ax^2 + bx + c}{a} = \frac{0}{a} \qquad \text{Divide both sides by a} \\ x^2 + \frac{b}{a}x + \frac{c}{a} = 0 \\ x^2 + \frac{b}{a}x = -\frac{c}{a} \qquad \text{Move to RHS} \\ (x + \frac{b}{a}/2)^2 - (\frac{b}{a}/2)^2 = -\frac{c}{a} \qquad \text{Complete the square} \\ (x + \frac{b}{2a})^2 = (\frac{b}{2a})^2 - \frac{c}{a} \qquad \text{Move to RHS} \\ (x + \frac{b}{2a})^2 = \frac{b^2}{4a^2} - \frac{c}{a} \\ (x + \frac{b}{2a})^2 = \frac{b^2 - 4ac}{4a^2} \\ x + \frac{b}{2a} = \pm\sqrt{\frac{b^2 - 4ac}{4a^2}} \\ x + \frac{b}{2a} = \frac{\pm\sqrt{b^2 - 4ac}}{2a} \\ x = -\frac{b}{2a} \pm \frac{\sqrt{b^2 - 4ac}}{2a} \qquad \text{Move to RHS} \\ \\ \boxed{x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}} \qquad \text{The quadratic formula}

Sum of the roots: if you add the two roots of a quadratic equation, you get ba\frac{-b}{a}.

Product of the roots: if you multiply the two roots of a quadratic equation, you get ca\frac{c}{a}.

When we either add or multiply any pair of roots, we get rid of the square root of the number b24acb^2 - 4ac. We therefore also get rid of any complications which might arise from trying to find this square root.

See here for details.

The discriminant: Δ=b24ac\Delta = b^2 - 4ac

x=b±b24ac2a x = \frac{-b \pm \sqrt{\boxed{b^2 - 4ac}}}{2a}

The discriminant tells us whether the solutions are real numbers or complex numbers, and how many solutions of each type to expect.

A quadratic equation always has two roots, if complex roots are included and a double root is counted for two.

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -3 -2 -1 0 1 2 3 4 5 6 -1 0 1 2 3 4 5 6 7 y x b2 - 4ac < 0 b2 - 4ac < 0 b2 - 4ac = 0 b2 - 4ac = 0 b2 - 4ac > 0 b2 - 4ac > 0
set terminal svg size 400,300 enhanced font 'Verdana,10'
set xtics 1
set ytics 1
set xrange [-1:7]
set yrange [-3:6]

f(x) = x*x - 4*x + 6
g(x) = x*x - 4*x + 4
h(x) = x*x - 4*x + 2

plot f(x) title "b^2 - 4ac < 0", g(x) title "b^2 - 4ac = 0", h(x) lt 4 title "b^2 - 4ac > 0"

To see whether you should use the quadratic formula or not, see if b24acb^2 - 4ac gives you a perfect square or 00. If not, then factoring and completing the square will probably be lots of work, and you will have an easier time with the quadratic formula.


I'll try with x22x3x^2 - 2x - 3:

a=1b=2c=3x=2±(2)24(1)(3)2(1)=2±162={1,3}Found the roots a = 1 \\ b = -2 \\ c = -3 \\ x = \frac{2 \pm \sqrt{(-2)^2 - 4(1)(-3)}}{2(1)} = \frac{2 \pm \sqrt{16}}{2} = \{-1, 3\} \qquad \text{Found the roots}


Remember that most square roots are irrational ("surds"; e.g. 5\sqrt{5}), and not perfect squares (e.g. 4\sqrt{4}). Therefore finding the roots (i.e. xx) of quadratics by factoring or completing the square can be impossible/difficult. That's why the quadratic formula is useful.

2x25x+1x=5±(5)24(2)(1)2(2)=5±174={0.22,2.28}Irrational square root 2x^2 - 5x + 1 \\ x = \frac{5 \pm \sqrt{(-5)^2 - 4(2)(1)}}{2(2)} = \frac{5 \pm \sqrt{17}}{4} = \{0.22, 2.28\} \qquad \text{Irrational square root}

What happens if I try to solve this by factoring?

2x25x+1=0Find p and q such that pq=ac=(2)(1) and p+q=b=5 2x^2 - 5x + 1 = 0 \\ \text{Find }p\text{ and }q\text{ such that }pq = ac = (2)(1)\text{ and }p + q = b = -5

...too difficult.

What happens if I try to solve this by completing the square?

2x25x+1=02x25x=1x252x=12(x54)2(54)2=12(x54)2=251612(x54)2=1716x54=1716x54=174x=5±174 2x^2 - 5x + 1 = 0 \\ 2x^2 - 5x = -1 \\ x^2 - \frac{5}{2}x = -\frac{1}{2} \\ (x - \frac{5}{4})^2 - (\frac{5}{4})^2 = -\frac{1}{2} \\ (x - \frac{5}{4})^2 = \frac{25}{16} - \frac{1}{2} \\ (x - \frac{5}{4})^2 = \frac{17}{16} \\ x - \frac{5}{4} = \sqrt{\frac{17}{16}} \\ x - \frac{5}{4} = \frac{\sqrt{17}}{4} \\ x = \frac{5 \pm \sqrt{17}}{4}

I got there, but using the quadratic formula is much easier.


2.D.5

x2+10x+16=0x=10±1024(1)(16)2(1)=10±62={2,8} x^2 + 10x + 16 = 0 \\ x = \frac{-10 \pm \sqrt{10^2 - 4(1)(16)}}{2(1)} = \frac{-10 \pm 6}{2} = \{-2, -8\}

x22x8=0x=2±(2)24(1)(8)2(1)=2±62={4,2} x^2 - 2x - 8 = 0 \\ x = \frac{2 \pm \sqrt{(-2)^2 - 4(1)(-8)}}{2(1)} = \frac{2 \pm 6}{2} = \{4, -2\}

2x2+5x3=0x=5±524(2)(3)2(2)=5±74={12,3} 2x^2 + 5x - 3 = 0 \\ x = \frac{-5 \pm \sqrt{5^2 - 4(2)(-3)}}{2(2)} = \frac{-5 \pm 7}{4} = \{\frac{1}{2}, -3\}

x2+4x+2=0x=4±424(1)(2)2(1)=4±82=4±242={0.59,3.41} x^2 + 4x + 2 = 0 \\ x = \frac{-4 \pm \sqrt{4^2 - 4(1)(2)}}{2(1)} = \frac{-4 \pm \sqrt{8}}{2} = \frac{-4 \pm \sqrt{2}\sqrt{4}}{2} = \{-0.59, -3.41\}

3x2x2=0x=1±(1)24(3)(2)2(3)=1±256={23,1} 3x^2 - x - 2 = 0 \\ x = \frac{1 \pm \sqrt{(-1)^2 - 4(3)(-2)}}{2(3)} = \frac{1 \pm \sqrt{25}}{6} = \{-\frac{2}{3}, 1\}

2x2x7=0x=1±(1)24(2)(7)2(2)=1±574=1±3194={1.64,2.14} 2x^2 - x - 7 = 0 \\ x = \frac{1 \pm \sqrt{(-1)^2 - 4(2)(-7)}}{2(2)} = \frac{1 \pm \sqrt{57}}{4} = \frac{1 \pm \sqrt{3}\sqrt{19}}{4} = \{-1.64, 2.14\}

(a)

Find what you get if you add the two solutions or roots together. Can you connect this answer with the aa, bb and cc of the particular equation in any way?

2+8=10// x2+10x+16=04+2=2// x22x8=012+3=52// 2x2+5x3=00.59+3.41=4// x2+4x+2=023+1=13// 3x2x2=01.64+2.14=0.5// 2x2x7=0 \begin{aligned} &-2 + -8 &= -10 \qquad &\text{// }x^2 + 10x + 16 = 0 \\ &4 + -2 &= 2 \qquad &\text{// }x^2 - 2x - 8 = 0 \\ &\frac{1}{2} + -3 &= -\frac{5}{2} \qquad &\text{// }2x^2 + 5x - 3 = 0 \\ &-0.59 + -3.41 &= -4 \qquad &\text{// }x^2 + 4x + 2 = 0 \\ &-\frac{2}{3} + 1 &= \frac{1}{3} \qquad &\text{// }3x^2 - x - 2 = 0 \\ &-1.64 + 2.14 &= 0.5 \qquad &\text{// }2x^2 - x - 7 = 0 \end{aligned}

{ax12+bx1+c=0ax22+bx2+c=0 \begin{cases} ax_1^2 + bx_1 + c = 0 \\ ax_2^2 + bx_2 + c = 0 \\ \end{cases}

Looks like we have this:

x1+x2=ba \boxed{x_1 + x_2 = \frac{-b}{a}}

Graph for 2x2+5x32x^2 + 5x - 3:

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 -5 -4 -3 -2 -1 0 1 2 3 x1 x2 (x1 + x2, c) (0, c) y x f(x) f(x) gnuplot_plot_2
set xtics 1
set ytics 1
set xrange [-5:3]
set yrange [-7:4]

set label "x_1" at -3,0 offset 0.5,0.6
set label "x_2" at 0.5,0 offset 0.5,0.6
set label "(x_1 + x_2, c)" at -2.5,-3 offset 0.5,0.5
set label "(0, c)" at 0,-3 offset 0.5,0.5

$points << EOD
-2.5 -3
0 -3
-3 0
0.5 0
EOD

f(x) = 2*x*x + 5*x - 3

plot f(x), "$points" with points lt 6 pt 7 notitle

Graph for x2+10x+16x^2 + 10x + 16:

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -10 -8 -6 -4 -2 0 2 4 6 8 10 12 14 16 18 20 -12 -10 -8 -6 -4 -2 0 2 4 x1 x2 (x1 + x2, c) (0, c) y x f(x) f(x) gnuplot_plot_2
set xtics 2
set ytics 2
set xrange [-12:4]
set yrange [-11:20]

set label "x_1" at -8,0 offset 0.5,0.6
set label "x_2" at -2,0 offset 0.5,0.6
set label "(x_1 + x_2, c)" at -10,16 offset 0.5,0.5
set label "(0, c)" at 0,16 offset 0.5,0.5

$points << EOD
-10 16
0 16
-2 0
-8 0
EOD

f(x) = x*x + 10*x + 16

plot f(x), "$points" with points lt 6 pt 7 notitle

Looks like x1+x2x_1 + x_2 gives the xx coordinate of a point opposite to the y-intercept.

(b)

Find what you get if you multiply each of the pairs of roots together. Then again see if you can connect the results with the aa, bb and cc of the particular equation.

28=16// x2+10x+16=042=8// x22x8=0123=32// 2x2+5x3=00.593.41=2.01// x2+4x+2=0231=23// 3x2x2=01.642.14=3.51// 2x2x7=0 \begin{aligned} &-2 * -8 &= 16 \qquad &\text{// }x^2 + 10x + 16 = 0 \\ &4 * -2 &= -8 \qquad &\text{// }x^2 - 2x - 8 = 0 \\ &\frac{1}{2} * -3 &= -\frac{3}{2} \qquad &\text{// }2x^2 + 5x - 3 = 0 \\ &-0.59 * -3.41 &= 2.01 \qquad &\text{// }x^2 + 4x + 2 = 0 \\ &-\frac{2}{3} * 1 &= -\frac{2}{3} \qquad &\text{// }3x^2 - x - 2 = 0 \\ &-1.64 * 2.14 &= -3.51 \qquad &\text{// }2x^2 - x - 7 = 0 \end{aligned}

Looks like we have:

x1x2=ca \boxed{x_1 * x_2 = \frac{c}{a}}


Remember: adding or multiplying the two roots of a quadratic equation gets rid of the square root in the quadratic formula:

x=b±b24ac2a x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

The two roots are (notice the subtraction versus addition):

x1=bb24ac2ax2=b+b24ac2a x_1 = \frac{-b - \sqrt{b^2 - 4ac}}{2a} \\ x_2 = \frac{-b + \sqrt{b^2 - 4ac}}{2a}

If you add the two together (x1+x2x_1 + x_2):

bb24ac2a+b+b24ac2a=(b2ab24ac2a)+(b2a+b24ac2a)=b2ab24ac2a+b2a+b24ac2a=2b2a=x1+x2=ba \frac{-b - \sqrt{b^2 - 4ac}}{2a} + \frac{-b + \sqrt{b^2 - 4ac}}{2a} = \\ (\frac{-b}{2a} - \frac{\sqrt{b^2 - 4ac}}{2a}) + (\frac{-b}{2a} + \frac{\sqrt{b^2 - 4ac}}{2a}) = \\ \frac{-b}{2a} - \cancel{\frac{\sqrt{b^2 - 4ac}}{2a}} + \frac{-b}{2a} + \cancel{\frac{\sqrt{b^2 - 4ac}}{2a}} = \\ -\frac{2b}{2a} = \\ \boxed{x_1 + x_2 = -\frac{b}{a}}

If you multiply the two together (x1x2x_1 * x_2):

bb24ac2ab+b24ac2a=(b2ab24ac2a)(b2a+b24ac2a)=Difference of two squares(b2a)2(b24ac2a)2=b24a2b24ac4a2=b2(b24ac)4a2=b2b2+4ac4a2=x1x2=ca \frac{-b - \sqrt{b^2 - 4ac}}{2a} * \frac{-b + \sqrt{b^2 - 4ac}}{2a} = \\ (\frac{-b}{2a} - \frac{\sqrt{b^2 - 4ac}}{2a}) * (\frac{-b}{2a} + \frac{\sqrt{b^2 - 4ac}}{2a}) = \qquad \text{Difference of two squares} \\ (\frac{-b}{2a})^2 - (\frac{\sqrt{b^2 - 4ac}}{2a})^2 = \\ \frac{b^2}{4a^2} - \frac{b^2 - 4ac}{4a^2} = \\ \frac{b^2 - (b^2 - 4ac)}{4a^2} = \\ \frac{b^2 - b^2 + 4ac}{4a^2} = \\ \boxed{x_1 x_2 = \frac{c}{a}}

Here's another way to find those two equations is to start with a standard quadratic equation. Let α\alpha and β\beta be the equation's two roots, i.e. x={α,β}x = \{\alpha, \beta\}. (Remember: the roots of a quadratic equation are often called alpha and beta, α\alpha and β\beta.)

ax2+bx+c=0x2+bax+ca=0Divide both sides by a ax^2 + bx + c = 0 \\ x^2 + \frac{b}{a}x + \frac{c}{a} = 0 \qquad \text{Divide both sides by }a

α\alpha and β\beta are the roots, so in factored form I have:

(xα)(xβ)=0x2αxβx+αβ=0Factoring...x2x(α+β)+αβ=0 (x - \alpha)(x - \beta) = 0 \\ x^2 - \alpha x - \beta x + \alpha \beta = 0 \qquad \text{Factoring...} \\ x^2 - x(\alpha + \beta) + \alpha \beta = 0

And if I now compare these two identical equations:

x2+bax+ca=0x2(α+β)x+αβ=0 x^2 + \frac{b}{a}x + \frac{c}{a} = 0 \\ x^2 - (\alpha + \beta)x + \alpha \beta = 0

I can see that α+β=ba\alpha + \beta = -\frac{b}{a} and αβ=ca\alpha \beta = \frac{c}{a}.

2.D.6

(1)

2x2+7x+3=0(2x+1)(x+3)=0x={12,3} 2x^2 + 7x + 3 = 0 \\ (2x + 1)(x + 3) = 0 \\ x = \{-\frac{1}{2}, -3\}

3x2+4x+1=0(3x+1)(x+1)x={13,1} 3x^2 + 4x + 1 = 0 \\ (3x + 1)(x + 1) \\ x = \{-\frac{1}{3}, -1\}

2x2+x4=0x2+12x2=0(x+14)21162=0(x+14)2=3316x+14=334x=1±334x={1.686,1.186} 2x^2 + x - 4 = 0 \\ x^2 + \frac{1}{2}x - 2 = 0 \\ (x + \frac{1}{4})^2 - \frac{1}{16} - 2 = 0 \\ (x + \frac{1}{4})^2 = \frac{33}{16} \\ x + \frac{1}{4} = \frac{\sqrt{33}}{4} \\ x = \frac{-1 \pm \sqrt{33}}{4} \\ x = \{-1.686, 1.186\}

Trying to see whether I should use the quadratic formula or not:

6x27x+2=0b24ac=(7)24(6)(2)=4948=1 6x^2 - 7x + 2 = 0 \\ b^2 - 4ac = (-7)^2 - 4(6)(2) = 49 - 48 = 1

Nope, I don't need it, since 1=1\sqrt{1} = 1.

I had some difficulty remembering how to factor a trinomial with a>1a > 1. Remember factoring by grouping when factoring trinomials. It'll help you whenever a>1a > 1. Split bb into pp and qq, such that pq=acpq = ac. Then group. Then factor the groups.

6x27x+2=06x23x4x+2=0Split3x(2x1)2(2x+1)=0Group(2x1)(3x2)=0Factorx={12,23} 6x^2 - 7x + 2 = 0 \\ 6x^2 - 3x - 4x + 2 = 0 \qquad \text{Split} \\ 3x(2x - 1) - 2(2x + 1) = 0 \qquad \text{Group} \\ (2x - 1)(3x - 2) = 0 \qquad \text{Factor} \\ x = \{\frac{1}{2}, \frac{2}{3}\}

x25x+3=0b24ac=(5)24(1)(3)=13I need 13. I better use the formula.x=5±132(1)={0.697,4.303} x^2 - 5x + 3 = 0 \\ b^2 - 4ac = (-5)^2 - 4(1)(3) = 13 \qquad \text{I need }\sqrt{13}\text{. I better use the formula.} \\ x = \frac{5 \pm \sqrt{13}}{2(1)} = \{0.697, 4.303\}

6x2+5x6=06x2+9x4x6=03x(2x+3)2(2x+3)=0(3x2)(2x+3)=0x={23,32} 6x^2 + 5x - 6 = 0 \\ 6x^2 + 9x - 4x - 6 = 0 \\ 3x(2x + 3) - 2(2x + 3) = 0 \\ (3x - 2)(2x + 3) = 0 \\ x = \{\frac{2}{3}, -\frac{3}{2}\}

x281=0x2=81x=±9 x^2 - 81 = 0 \\ x^2 = 81 \\ x = \pm 9

6x2x12=06x2+8x9x12=02x(3x+4)3(3x+4)=0(3x+4)(2x3)=0x={43,32} 6x^2 - x - 12 = 0 \\ 6x^2 + 8x - 9x - 12 = 0 \\ 2x(3x + 4) - 3(3x + 4) = 0 \\ (3x + 4)(2x - 3) = 0 \\ x = \{-\frac{4}{3}, \frac{3}{2}\}

x22=0x=±2=±1.414 x^2 - 2 = 0 \\ x = \pm \sqrt{2} = \pm 1.414

x25x=0(x52)2254=0x52=±52x=5±52 x^2 - 5x = 0 \\ (x - \frac{5}{2})^2 - \frac{25}{4} = 0 \\ x - \frac{5}{2} = \pm \frac{5}{2} \\ x = \frac{5 \pm 5}{2}

(2)

2x32x+3=x1x+1(2x3)(x+1)=(2x+3)(x1)2x2+2x3x3=2x22x+3x32x=0x=0 \frac{2x - 3}{2x + 3} = \frac{x - 1}{x + 1} \\ (2x - 3)(x + 1) = (2x + 3)(x - 1) \\ 2x^2 + 2x - 3x - 3 = 2x^2 - 2x + 3x - 3 \\ -2x = 0 \\ x = 0

2y+1+1y1=3y2y2+y+1y21=3y3y1y21=3y3y2y=3y23y=3 \frac{2}{y + 1} + \frac{1}{y - 1} = \frac{3}{y} \\ \frac{2y - 2 + y + 1}{y^2 - 1} = \frac{3}{y} \\ \frac{3y - 1}{y^2 - 1} = \frac{3}{y} \\ 3y^2 - y = 3y^2 - 3 \\ y = 3

2x+4x+1=x82x14x22x+8x4=x28x+x83x2+13x+4=03x(x+4)+(x+4)=0(3x+1)(x+4)=0x={13,4} \frac{2x + 4}{x + 1} = \frac{x - 8}{2x - 1} \\ 4x^2 - 2x + 8x - 4 = x^2 - 8x + x - 8 \\ 3x^2 + 13x + 4 = 0 \\ 3x(x + 4) + (x + 4) = 0 \\ (3x + 1)(x + 4) = 0 \\ x = \{-\frac{1}{3}, -4\}

2.D.(g)

s=ut12gt2 s = ut - \frac{1}{2}gt^2

(1)

d=14ms(1s)12(9.8ms2)(1s)2d=14m4.9m=9.1m d = 14\frac{m}{s}(1s) - \frac{1}{2}(9.8\frac{m}{s^2})(1s)^2 \\ d = 14m - 4.9m = 9.1m

(2)

s=ut12gt2s=12gt2+ut s = ut - \frac{1}{2}gt^2 \\ s = -\frac{1}{2}gt^2 + ut

Now I have an equation that looks like a quadratic equation. How to solve for tt?


s=12gt2+ut2s=gt2+2ut2s=g(t22ugt)2s=g((tug)2(ug)2)Complete the square inside the parentheses2s=g(tug)2+g(u2g2)2s=g(tug)2+u2g2su2g=g(tug)22sgu2g2=(tug)22sgu2g2=tugUhh, square root of a negative...2sgu2g2+ug=t2sgu2g+ug=t(There’s a mistake here)u±2sgu2g=t s = -\frac{1}{2}gt^2 + ut \\ 2s = -gt^2 + 2ut \\ 2s = -g(t^2 - \frac{2u}{g}t) \\ 2s = -g((t - \frac{u}{g})^2 - (-\frac{u}{g})^2) \qquad \text{Complete the square inside the parentheses} \\ 2s = -g(t - \frac{u}{g})^2 + g(\frac{u^2}{g^2}) \\ 2s = -g(t - \frac{u}{g})^2 + \frac{u^2}{g} \\ 2s - \frac{u^2}{g} = -g(t - \frac{u}{g})^2 \\ -\frac{2sg - u^2}{g^2} = (t - \frac{u}{g})^2 \\ \sqrt{-\frac{2sg - u^2}{g^2}} = t - \frac{u}{g} \qquad \text{Uhh, square root of a negative...} \\ \sqrt{-\frac{2sg - u^2}{g^2}} + \frac{u}{g} = t \\ \frac{\sqrt{-2sg - u^2}}{g} + \frac{u}{g} = t \qquad \text{(There's a mistake here)} \\ \frac{u \pm \sqrt{-2sg - u^2}}{g} = t

Where did I go wrong? Wolfram Alpha and Symbolab say I should have t=u±u22gsgt = \frac{u \pm \sqrt{u^2 - 2gs}}{g}.

Ah, algebra mistake.

2sgu2g2=tugUhh, square root of a negative...2sgu2g2+ug=t(2sgu2)g+ug=tSquare root is no problem. Fixed the mistake...u±2sg+u2g=tu±u22sgg=t \sqrt{-\frac{2sg - u^2}{g^2}} = t - \frac{u}{g} \qquad \text{Uhh, square root of a negative...} \\ \sqrt{-\frac{2sg - u^2}{g^2}} + \frac{u}{g} = t \\ \frac{\sqrt{-(2sg - u^2)}}{g} + \frac{u}{g} = t \qquad \text{Square root is no problem. Fixed the mistake...} \\ \frac{u \pm \sqrt{-2sg + u^2}}{g} = t \\ \frac{u \pm \sqrt{u^2 - 2sg}}{g} = t

Remember: I made tens of small algebra mistakes in the math above and below. A couple of times I thought there was a more fundamental math principle going on, but it ended up being just a silly algebra mistake. Do more algebra!

Note: above I completed the square inside the parentheses, but I didn't "zero" the equation. I essentially did this:

x2bx+c=0bx+c=x2c=x2+bxc=(x2bx)c=((xb2)2(b2)2)Complete the square inside the parenthesesc=((xb2)2b24)c=(1)(xb2)2+b24cb24=(1)(xb2)24cb24=(1)(xb2)24cb24=(xb2)24cb24=xb2b±4cb22=x x^2 - bx + c = 0 \\ -bx + c = -x^2 \\ c = -x^2 + bx \\ c = -(x^2 - bx) \\ c = -((x - \frac{b}{2})^2 - (- \frac{b}{2})^2) \qquad \text{Complete the square inside the parentheses} \\ c = -((x - \frac{b}{2})^2 - \frac{b^2}{4}) \\ c = (-1)(x - \frac{b}{2})^2 + \frac{b^2}{4} \\ c - \frac{b^2}{4} = (-1)(x - \frac{b}{2})^2 \\ \frac{4c - b^2}{4} = (-1)(x - \frac{b}{2})^2 \\ -\frac{4c - b^2}{4} = (x - \frac{b}{2})^2 \\ \sqrt{-\frac{4c - b^2}{4}} = x - \frac{b}{2} \\ \frac{b \pm \sqrt{-4c - b^2}}{2} = x

Remember: "zero" a quadratic equation before you complete the square. Completing the square is a bit more familiar that way. It also helps with simplifying the equation, since you can divide/multiply both sides without affecting the zero side at all, since 0 divided/multiplied by anything is 0.

So, I'll try this once more, this time setting one side to 00:

s=12gt2+ut2s=gt2+2ut2s=g(t22ugt)g(t22ugt)+2s=0g((tug)2(ug)2)+2s=0g(tug)2g(u2g2)+2s=0g(tug)2u2g+2s=0g(tug)2=u2g2sg(tug)2=u22sgg(tug)2=u22sgg2tug=u22sgg2tug=u22sggt=u±u22sgg s = -\frac{1}{2}gt^2 + ut \\ 2s = -gt^2 + 2ut \\ 2s = -g(t^2 - \frac{2u}{g}t) \\ g(t^2 - \frac{2u}{g}t) + 2s = 0 \\ g((t - \frac{u}{g})^2 - (-\frac{u}{g})^2) + 2s = 0 \\ g(t - \frac{u}{g})^2 - g(\frac{u^2}{g^2}) + 2s = 0 \\ g(t - \frac{u}{g})^2 - \frac{u^2}{g} + 2s = 0 \\ g(t - \frac{u}{g})^2 = \frac{u^2}{g} - 2s \\ g(t - \frac{u}{g})^2 = \frac{u^2 - 2sg}{g} \\ (t - \frac{u}{g})^2 = \frac{u^2 - 2sg}{g^2} \\ t - \frac{u}{g} = \sqrt{\frac{u^2 - 2sg}{g^2}} \\ t - \frac{u}{g} = \frac{\sqrt{u^2 - 2sg}}{g} \\ t = \frac{u \pm \sqrt{u^2 - 2sg}}{g}

Remember: whenever you see a quadratic equation in the wild, and you need to solve for xx, use the quadratic formula. That's much faster than completing the square.


t=u±u22sgg t = \frac{u \pm \sqrt{u^2 - 2sg}}{g}

Discriminant=u22sg \text{Discriminant} = u^2 - 2sg

A ball is thrown in the air with initial velocity u=14u = 14. How long does it take to reach the height of s=5,10,15s = 5, 10, 15? Solving with JavaScript:



  • Reaches 5 meters at 0.4 seconds going up, and 5 meters at 2.4 seconds coming down
  • Reaches 10 meters at the top (vertex)
  • Never reaches 15 meters

Remember: the discriminant tells you whether there are real solutions to a quadratic equation. If it's <0< 0, then you need imaginary numbers.

(3)

The curve is an upside down U on a graph, so the quadratic equation's a<0a < 0.

The vertex is at (1.4,10)(1.4, 10) (10 meters at 1.4 seconds). I can plug these values into the vertex form:

y=a(xh)2+ky=a(x1.4)2+10 y = a(x - h)^2 + k \\ y = a(x - 1.4)^2 + 10

What should aa be (without computing it)? I'll try with the aa that we saw above in the formula: 12g=129.8=4.9-\frac{1}{2}g = -\frac{1}{2}9.8 = -4.9.

y=4.9(x1.4)2+10 y = -4.9(x - 1.4)^2 + 10

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 0 1 2 3 4 5 6 7 8 9 10 11 12 -1 -0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 y x f(x) f(x)
set xtics 0.5
set ytics 1
set xrange [-1:4]
set yrange [0:12]

f(x) = -4.9 * (x - 1.4) * (x - 1.4) + 10

plot f(x)

y=(x1.4)2+10 y = -(x - 1.4)^2 + 10

Nice. What happens with a different aa value?

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 0 1 2 3 4 5 6 7 8 9 10 11 12 -1 -0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 y x f(x) f(x)
set xtics 0.5
set ytics 1
set xrange [-1:4]
set yrange [0:12]

f(x) = -1 * (x - 1.4) * (x - 1.4) + 10

plot f(x)

Looks like it transforms the width of the curve along the center (vertex). (In the case of this exercise it affects the value of gravity, gg, and the initial force, uu.)

(4)

To know how long the ball is in the air, i.e. to go up and come all the way back down, I need the roots of the quadratic curve. Therefore I set the height to zero, s=0s = 0. (Similarly, when you first start factoring a quadratic equation ax2+bx+c=0ax^2 + bx + c = 0, you aim to set the right-hand side, i.e. yy, to 0, so that you can find the two xx coordinates where y=0y = 0.)

t=14±1422(0)(9.8)9.8t={0,289.82.8} t = \frac{14 \pm \sqrt{14^2 - 2(0)(9.8)}}{9.8} \\ t = \{0, \frac{28}{9.8} \approx 2.8\}

So the ball is in the air for 2.8 seconds (i.e. two times the vertex, 2h2h).

After 2.9 seconds the ball is below the thrower's hands:

s=ut12gt2s=(14)(2.9)12(9.8)(2.9)20.6 s = ut - \frac{1}{2}gt^2 \\ s = (14)(2.9) - \frac{1}{2}(9.8)(2.9)^2 \approx -0.6

(5)

s=ut12gt2t=u±u22sgg s = ut - \frac{1}{2}gt^2 \\ t = \frac{u \pm \sqrt{u^2 - 2sg}}{g}

What does ut12gt2=0ut - \frac{1}{2}gt^2 = 0 mean here?

Answer: the height of the ball is zero: s=0s = 0. Solving this "zeroed" quadratic equation gives two xx coordinates (i.e. roots):

  • The point where the ball is thrown, (x1,0)(x_1, 0)
  • The point where the ball is back in the thrower's hand, (x2,0)(x_2, 0)

The book gives a realization about how important zeroing and then factoring is, for finding the roots.

  • You have a "zeroed" equation, ut12gt2=0ut - \frac{1}{2}gt^2 = 0
  • The xx coordinate on a graph here is tt, i.e. time
  • The yy coordinate is ss, i.e. height, which is 0

Then, factoring:

ut12gt2=0t(12gt+u)=0 ut - \frac{1}{2}gt^2 = 0 \\ \boxed{t(-\frac{1}{2}gt + u) = 0}

To get s=0s = 0, we need either one of these:

  • t=0t = 0
    • The full equation looks like this: 0(12g0+u)=00(-\frac{1}{2}g0 + u) = 0
  • 12gt+u=0-\frac{1}{2}gt + u = 0
    • The full equation looks like this: t(0)=0t(0) = 0
    • Note that if you rearrange 12gt+u=0-\frac{1}{2}gt + u = 0, you get t=2ugt = \frac{2u}{g}
      • t=2(14)9.82.86t = \frac{2(14)}{9.8} \approx 2.86 seconds of flight

Remember: this shows how important it is to "zero" an equation, and to factor it into a product of factors. You can then set any one of the factors to 00 to get one of the solutions. Each of the factors is a smaller "zeroed" equation in itself (see above). This is why the factored form of a quadratic equation is nice.

tFactor(12gt+uFactor)=0Set either factor to zero \underbrace{t}_{\text{Factor}}(\underbrace{-\frac{1}{2}gt + u}_{\text{Factor}}) = 0 \qquad \text{Set either factor to zero}


The book asks a few calculus-like questions as a teaser:

When does the ball move fastest?

At the start (t=0t = 0) and at the end (t2.8t \approx 2.8), I think. That's when we have the fastest change in instantaneous speed (i.e. the largest change in yy per xx, i.e. the greatest slope).

A quadratic equation's parabola is symmetric — surely the speed is identical at the start (the initial velocity) and at the end.

When does it move slowest?

The speed is 0 at the highest point (vertex), when the slope is zero.

Can you estimate how fast it is going one second after it has been thrown up?

From a 3Blue1Brown video I know that I can discretize the xx axis into several identical-width slices. For each of those slices I can draw a line that gives me the slope of the slice.

Slope: m=y2y1x2x1=ΔyΔx \text{Slope: } m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{\Delta y}{\Delta x}

The slope (and therefore the speed) is the rate of change of ss per tt:

v=st v = \frac{s}{t}

From the earlier calculations, the highest point is at (1.4,10)(1.4, 10).

Initial velocity is u=14u = 14 m/s. At t=0t = 0 I therefore have v=14v = 14 m/s.

At t=1.4t = 1.4 I have v=0v = 0 m/s.

s=12gt2+ut s = -\frac{1}{2}gt^2 + ut

If there was no gravity, the speed at t=1t = 1 would be identical to the speed at t=0t = 0 (u=v=14u = v = 14 m/s), and ss would increase linearly:

v=141=14Speed is constant v = \frac{14}{1} = 14 \qquad \text{Speed is constant}

s=utHeight increases at constant speed s = ut \qquad \text{Height increases at constant speed}

So, I need the speed at t=1t = 1. I need to draw a line to get a slope (i.e. a speed). I have the point (0,0)(0, 0). I need another point to draw a line. What is the height at t=1t = 1?

s=12(9.8)(1)2+(14)(1)=9.1 s = -\frac{1}{2}(9.8)(1)^2 + (14)(1) = 9.1

v=9.11=9.1 v = \frac{9.1}{1} = 9.1

Now I have a line from (0,0)(0,0) to (1,9.1)(1, 9.1). I think this gives me the average speed between t=[0,1]t = [0, 1]. Will I get a different value if I split the graph into smaller slices of tt?

st0=0st1=12(9.8)(0.25)2+(14)(0.25)3.19st2=12(9.8)(0.5)2+(14)(0.5)5.77st3=12(9.8)(0.75)2+(14)(0.75)7.74st4=12(9.8)(1)2+(14)(1)=9.1st5=12(9.8)(1.25)2+(14)(1.25)9.84 s_{t0} = 0 \\ s_{t1} = -\frac{1}{2}(9.8)(0.25)^2 + (14)(0.25) \approx 3.19 \\ s_{t2} = -\frac{1}{2}(9.8)(0.5)^2 + (14)(0.5) \approx 5.77 \\ s_{t3} = -\frac{1}{2}(9.8)(0.75)^2 + (14)(0.75) \approx 7.74 \\ s_{t4} = -\frac{1}{2}(9.8)(1)^2 + (14)(1) = 9.1 \\ s_{t5} = -\frac{1}{2}(9.8)(1.25)^2 + (14)(1.25) \approx 9.84

v0=14v1=st1st00.25=12.76v2=st2st10.25=10.32v3=st3st20.25=7.88v4=st4st30.25=5.44v5=st5st40.25=2.96 v_0 = 14 \\ v_1 = \dfrac{s_{t1} - s_{t0}}{0.25} = 12.76 \\ v_2 = \dfrac{s_{t2} - s_{t1}}{0.25} = 10.32 \\ v_3 = \dfrac{s_{t3} - s_{t2}}{0.25} = 7.88 \\ v_4 = \dfrac{s_{t4} - s_{t3}}{0.25} = 5.44 \\ v_5 = \dfrac{s_{t5} - s_{t4}}{0.25} = 2.96

Yep, I get a different value. The average speed between t3t_3 and t4t_4 is 5.445.44 m/s, and between t4t_4 and t5t_5 it's 2.962.96 m/s. Based on this I'd say the speed at t=1t = 1 is roughly v4+v52=4.2\frac{v_4 + v_5}{2} = 4.2 m/s.

Ah, of course... I only need one slope, and therefore only two tt steps (timesteps): one right before t=1t = 1, and one right after t=1t = 1.

s0=12(9.8)(0.999)2+(14)(0.999)=9.0957951s1=12(9.8)(1.001)2+(14)(1.001)=9.1041951 s_0 = -\frac{1}{2}(9.8)(0.999)^2 + (14)(0.999) = 9.0957951 \\ s_1 = -\frac{1}{2}(9.8)(1.001)^2 + (14)(1.001) = 9.1041951

v=Δs2(Δt)v=s1s02(0.001)=4.2 v = \frac{\Delta s}{2(\Delta t)} \\ v = \frac{s_1 - s_0}{2(0.001)} = 4.2

The smaller Δt\Delta t is, the better vv will approximate the speed at t=1t = 1.

2.D.(h)

x2+5x+6=x2+x24x+8=0x=2 x^2 + 5x + 6 = x^2 + x - 2 \\ 4x + 8 = 0 \\ x = -2

x2+5x+6=0(x+2)(x+3)=0x={2,3} x^2 + 5x + 6 = 0 \\ (x + 2)(x + 3) = 0 \\ x = \{-2, -3\}

x2+x2(x1)(x+2)x={1,2} x^2 + x - 2 \\ (x - 1)(x + 2) \\ x = \{1, -2\}

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 y x x2 + 5x + 6 x2 + 5x + 6 x2 + x - 2 x2 + x - 2 4x + 8 4x + 8
set xrange [-6:6]
set yrange [-3:9]
set xtics 1
set ytics 1

f(x) = x*x + 5*x + 6
g(x) = x*x + x - 2
h(x) = 4*x + 8

plot f(x) title "x^2 + 5x + 6", g(x) title "x^2 + x - 2", h(x) title "4x + 8"

x2x6=x2+3x44x2=0x=12The x coordinate where the two quadratics cross x^2 - x - 6 = x^2 + 3x - 4 \\ -4x - 2 = 0 \\ x = -\frac{1}{2} \qquad \text{The x coordinate where the two quadratics cross}

x2x6(x+2)(x3)x={2,3} x^2 - x - 6 \\ (x + 2)(x - 3) \\ x = \{-2, 3\}

x2+3x4(x+4)(x1)x={4,1} x^2 + 3x - 4 \\ (x + 4)(x - 1) \\ x = \{-4, 1\}

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 y x x2 - x - 6 x2 - x - 6 x2 + 3x - 4 x2 + 3x - 4 -4x - 2 -4x - 2
set xrange [-6:6]
set yrange [-7:4]
set xtics 1
set ytics 1

f(x) = x*x - x - 6
g(x) = x*x + 3*x - 4
h(x) = -4*x - 2

plot f(x) title "x^2 - x - 6", g(x) title "x^2 + 3x - 4", h(x) title "-4x - 2"

2x28x+8=x24x+5x24x+3 2x^2 - 8x + 8 = x^2 - 4x + 5 \\ x^2 - 4x + 3

2x28x+8x=8±(8)24(2)(8)2(2)x=2 2x^2 - 8x + 8 \\ x = \frac{8 \pm \sqrt{(-8)^2 - 4(2)(8)}}{2(2)} \\ x = 2

x24x+5x=4±(4)24(1)(5)2(1)x=4±42 x^2 - 4x + 5 \\ x = \frac{4 \pm \sqrt{(-4)^2 - 4(1)(5)}}{2(1)} \\ x = \frac{4 \pm \sqrt{-4}}{2}

x24x+3(x1)(x3)x={1,3}The two quadratics cross in two places, giving us two roots x^2 - 4x + 3 \\ (x - 1)(x - 3) \\ x = \{1, 3\} \qquad \text{The two quadratics cross in two places, giving us two roots}

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -2 -1 0 1 2 3 4 5 6 7 8 9 10 -2 -1 0 1 2 3 4 5 6 7 8 y x 2x2 - 8x + 8 2x2 - 8x + 8 x2 - 4x + 5 x2 - 4x + 5 x2 - 4x + 3 x2 - 4x + 3
set xrange [-2:8]
set yrange [-2:10]
set xtics 1
set ytics 1

f(x) = 2*x*x - 8*x + 8
g(x) = x*x - 4*x + 5
h(x) = x*x - 4*x + 3

plot f(x) title "2x^2 - 8x + 8", g(x) title "x^2 - 4x + 5", h(x) lt 4 title "x^2 - 4x + 3"

x26x+8=(x2)(x4)x26x+8=x26x+80=0x=x x^2 - 6x + 8 = (x - 2)(x - 4) \\ x^2 - 6x + 8 = x^2 - 6x + 8 \\ 0 = 0 \\ x = x

Two identical quadratics on top of each other. They cross in all places on the curve (any value of xx is possible). Remember: this kind of an equation is called an identity, and is often written with \equiv (i.e. \equiv in LaTeX).

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -2 -1 0 1 2 3 4 5 6 7 8 9 -1 0 1 2 3 4 5 6 7 8 y x x2 - 6x + 8 x2 - 6x + 8
set xrange [-1:8]
set yrange [-2:9]
set xtics 1
set ytics 1

f(x) = x*x - 6*x + 8

plot f(x) title "x^2 - 6x + 8"

Cubic equations

A.k.a. third degree polynomials.

2x35x26x+9=0 2x^3 - 5x^2 - 6x + 9 = 0

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 -4 -3 -2 -1 0 1 2 3 4 5 6 y x f(x) f(x)
set xrange [-4:6]
set yrange [-8:12]
set xtics 1
set ytics 1

f(x) = 2*x*x*x - 5*x*x - 6*x + 9

plot f(x)

There is no simple formula for solving polynomials of degree >2> 2, but there do exist (quite complex) formulas for degree 33 and 44.

The first method that the book gives is guessing one of the roots, and then solving the resulting quadratic polynomial to get the two remaining roots.

f(x)=3x3+2x212x8 f(x) = 3x^3 + 2x^2 - 12x - 8

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 -4 -3 -2 -1 0 1 2 3 4 y x f(x) f(x)
set xrange [-4:4]
set yrange [-16:6]
set xtics 1
set ytics 1

f(x) = 3*x*x*x + 2*x*x - 12*x - 8

plot f(x)

f(x)=3x3+2x212x8f(1)=3(1)3+2(1)212(1)80Not a rootf(2)=3(2)3+2(2)212(2)8=02 is a root f(x) = 3x^3 + 2x^2 - 12x - 8 \\ f(1) = 3(1)^3 + 2(1)^2 - 12(1) - 8 \neq 0 \qquad \text{Not a root} \\ f(2) = 3(2)^3 + 2(2)^2 - 12(2) - 8 = 0 \qquad 2\text{ is a root}

Similar to the factored form of a quadratic, I now have (x2)(some quadratic here)(x - 2)(\text{some quadratic here}).

It's easy to see what the leading coefficient and the last constant of "some quadratic here" should be:

f(x)=3x3+2x212x8(x2)(3x2+...+4) f(x) = 3x^3 + 2x^2 - 12x - 8 \\ (x - 2)(3x^2 + ... + 4)

What goes in the middle? Remember: you need the same number of xnx^n terms on each side.

3x3+2x212x8=(x2)(3x2+...+4) 3x^3 + 2x^2 - 12x - 8 = (x - 2)(3x^2 + ... + 4)

On the left I have 3x33x^3, 2x22x^2, and 12x-12x.

On the right I have 3x33x^3, 6x2-6x^2, and 4x4x (after factoring).

Therefore I need 8x2\boxed{8x^2} and 16x\boxed{-16x} on the right.

The only way I can have 8x28x^2 on the right (after factoring) is to have 8x8x in the middle (before factoring). x8x=8x2\boxed{x * 8x = 8x^2} and 28x=16x\boxed{-2 * 8x = -16x}:

3x3+2x212x8=(x2)(3x2+8x+4)3x3+2x212x8=3x3+8x2+4x6x216x8Checking the result3x3+2x212x8=3x3+2x212x8Checking the result 3x^3 + 2x^2 - 12x - 8 = (\boxed{x} - 2)(3x^2 + \boxed{8x} + 4) \\ 3x^3 + 2x^2 - 12x - 8 = 3x^3 + \boxed{8x^2} + 4x - 6x^2 \boxed{- 16x} - 8 \quad \text{Checking the result} \\ 3x^3 + 2x^2 - 12x - 8 = 3x^3 + 2x^2 - 12x - 8 \quad \text{Checking the result}

Remember: when you have an identity (an equivalence of two expressions), both sides must have an equal amount of xnx^n terms, i.e. the coefficient pp in pnxnp_nx^n must be the same on both sides. (I wrote pnp_n because I wanted to make it clear that I'm talking about the coefficient pp for only the xnx^n value, and not all xx values. For example: p3=3p_3 = 3 and p1=12p_1 = 12 in the above equation.)

In the example above, where you had to find out what to put in the middle in 3x2+...+43x^2 + ... + 4, you really only had to care about x8xx * 8x and 23x2-2 * 3x^2, to get 2x22x^2.


Surely there is an easier way than guessing? Can I just factor by grouping?

3x3+2x212x8=0x2(3x+2)4(3x+2)=0(3x+2)(x24)=0Expand the difference of two squares...(3x+2)(x+2)(x2)=0 3x^3 + 2x^2 - 12x - 8 = 0 \\ x^2(3x + 2) - 4(3x + 2) = 0 \\ (3x + 2)(x^2 - 4) = 0 \qquad \text{Expand the difference of two squares...} \\ (3x + 2)(x + 2)(x - 2) = 0

Found the roots (set each of the three factors above — i.e. the parenthesized expressions — to zero, one by one):

3(23)+2=02+2=022=0x={2,23,2} 3(\boxed{-\frac{2}{3}}) + 2 = 0 \\ \boxed{-2} + 2 = 0 \\ \boxed{2} - 2 = 0 \\ x = \{-2, -\frac{2}{3}, 2\}

Note: I first tried to factor like this, but this doesn't work:

3x3+2x212x8=0x(3x2+2x12)8=0x(0)80Tried to set the factor to 0 to get one of the roots 3x^3 + 2x^2 - 12x - 8 = 0 \\ x(3x^2 + 2x - 12) - 8 = 0 \\ x(0) - 8 \neq 0 \qquad \text{Tried to set the factor to }0\text{ to get one of the roots}

Looks like you can't assume that the quadratic in the middle equates to zero. In other words, you can't "guess" one of the cubic equation's roots by solving a quadratic inside it.

Remember: you're trying to
factor the polynomial equation axn+bxn1...+c=0ax^n + bx^{n-1} ... + c = 0 (of degree nn)
into a(xrn)(xrn1)...=0a(x - r_n)(x - r_{n-1})... = 0 (i.e. the factored form).
The factored form only contains multiplication. It doesn't contain summands (e.g. 8-8 above). The factored form allows you to easily set each factor to 00 one by one, giving you each root of the polynomial.

2.E.1

f(x)=3x3+2x23x2x2(3x+2)+(3x2)=0x2(3x+2)(3x+2)=0(x21)(3x+2)=0Expand the difference of two squares...(x+1)(x1)(3x+2)=0x={1,1,23} f(x) = 3x^3 + 2x^2 - 3x - 2 \\ x^2(3x + 2) + (-3x - 2) = 0 \\ x^2(3x + 2) - (3x + 2) = 0 \\ (x^2 - 1)(3x + 2) = 0 \qquad \text{Expand the difference of two squares...} \\ (x + 1)(x - 1)(3x + 2) = 0 \\ x = \{-1, 1, -\frac{2}{3}\}

f(x)=2x33x2+3x+2x2(2x3)+(3x+2)=0x2(2x+3)+(3x+2)=0x2(2x+3)+(3x+2)=0I see no immediate way to factor further(2)2(2(2)+3)+(3(2)+2)=0But it’s easy to see that 2 is a root(4)(1)+(4)=0(x+2)(2x2+...+1)=0(x+2)(2x2+x+1)=0(x+2)(2x+2)(x+12)=0x={2,1,12} f(x) = -2x^3 - 3x^2 + 3x + 2 \\ x^2(-2x - 3) + (3x + 2) = 0 \\ -x^2(2x + 3) + (3x + 2) = 0 \\ -x^2(2x + 3) + (3x + 2) = 0 \qquad \text{I see no immediate way to factor further} \\ -(-2)^2(2(-2) + 3) + (3(-2) + 2) = 0 \qquad \text{But it's easy to see that }-2\text{ is a root} \\ -(4)(-1) + (-4) = 0 \\ (x + 2)(-2x^2 + ... + 1) = 0 \\ (x + 2)(-2x^2 + x + 1) = 0 \\ (x + 2)(-2x + 2)(x + \frac{1}{2}) = 0 \\ x = \{-2, 1, -\frac{1}{2}\}

Just out of curiosity, what do the factors (i.e. lower-degree polynomials) look like if I graph them? Are they related to the higher-degree polynomial in some visual way?

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 -4 -3 -2 -1 0 1 2 3 4 5 6 y x x + 2 x + 2 -2 * x + 2 -2 * x + 2 x + 0.5 x + 0.5 -2*x*x + x + 1 -2*x*x + x + 1 -2*x*x*x - 3*x*x + 3*x + 2 -2*x*x*x - 3*x*x + 3*x + 2
set xrange [-4:6]
set yrange [-8:12]
set xtics 1
set ytics 1

plot x + 2, \
     -2 * x + 2, \
     x + 0.5, \
     -2*x*x + x + 1, \
     -2*x*x*x - 3*x*x + 3*x + 2 lt 6

They obviously share the same roots. At least some of them have the same y-intercept. Some of them seem to intersect at (0.5,1)(0.5, 1).

Rational zero theorem

Remember: Rather than blindly guessing one of the roots of a polynomial equation of degree 3\geq 3, you can apparently use the rational zero theorem (aka rational root theorem or p/q theorem). It says:

  • If you have a polynomial, e.g., ax3+bx2+cx+d=0\boxed{a}x^3 + bx^2 + cx + \boxed{d} = 0
  • And the coefficients (a,b,c,da, b, c, d) are integers
  • Then x={Factor of dFactor of a,...}x = \Big\{\dfrac{\text{Factor of } \boxed{d}}{\text{Factor of } \boxed{a}}, ...\Big\}

In other words, the roots of this polynomial must have a numerator that is a factor of dd, and a denominator that is a factor of aa, with either a ++ or - sign.

Note: the factors include 11, i.e., xx can be ?1\frac{?}{1} or 1?\frac{1}{?}.

To further trim down the list of possibilities, it's helpful to first treat xx as 11, 1-1, 22, etc., to see what the remainder is. If none of those match, try fractions next. The remainder tells you have close you're to a root. 00 remainder is an exact match.

I'll try to use this to find one of the roots:

f(x)=4x315x2+12x+44x315x2+12x+4=0Some possibilities: 44,12,21,14,41(x2)(4x2+...2)=021 is a root (I checked by substituting x)(x2)(4x27x2)=0Remaining roots can now be found with the quadratic formulax=7±(7)24(4)(2)2(4)=7±98={14,2}x={14,2,2} f(x) = 4x^3 - 15x^2 + 12x + 4 \\ 4x^3 - 15x^2 + 12x + 4 = 0 \qquad \text{Some possibilities: }\frac{4}{4}, \frac{1}{2}, \frac{2}{1}, \frac{1}{4}, \frac{4}{1} \\ (x - 2)(4x^2 + ... - 2) = 0 \qquad \frac{2}{1}\text{ is a root (I checked by substituting x)} \\ (x - 2)(4x^2 - 7x - 2) = 0 \\ \text{Remaining roots can now be found with the quadratic formula} \\ x = \frac{7 \pm \sqrt{(-7)^2 - 4(4)(-2)}}{2(4)} = \frac{7 \pm 9}{8} = \{-\frac{1}{4}, 2\} \\ x = \{-\frac{1}{4}, 2, 2\}

Remember: to find the roots of a cubic equation, first guess one root with the help of the rational zero theorem. That will factor the cubic equation into two polynomial factors: a linear and a quadratic. Then solve the quadratic with the quadratic formula to get the last two remaining roots.

f(x)=x33x2+3x1x33x2+3x1=0One of the roots must be 1 or -1(x1)(x22x+1)=0(x1)(x1)(x1)=0x={1,1,1} f(x) = x^3 - 3x^2 + 3x - 1 \\ x^3 - 3x^2 + 3x - 1 = 0 \quad \text{One of the roots must be 1 or -1} \\ (x - 1)(x^2 - 2x + 1) = 0 \\ (x - 1)(x - 1)(x - 1) = 0 \\ x = \{1, 1, 1\}

Arithmetic division

In arithmetic, Euclidean division – or division with remainder – is the process of dividing one integer (the dividend) by another (the divisor), in a way that produces a quotient and a remainder smaller than the divisor. (Wikipedia)

8/3=2R22 whole parts, with a remainder of 238 / 3 = 2 R 2 \qquad 2\text{ whole parts, with a remainder of }\frac{2}{3}

Euclidean division is based on Euclid's division lemma: a=bq+ra = bq + r

aa and bb are integers.
aa is the dividend (a.k.a. the numerator).
bb is the divisor (a.k.a. the denominator).
qq is the quotient (i.e. the integer result in Euclidean division).
rr is the remainder.

E.g. 8=(3)(2)+28 = (3)(2) + 2.

To see how we get that equation, let's say you have an integer aa.

If you divide aa by bb, you can say:

ab=q+rbE.g. 83=2+23\frac{a}{b} = q + \frac{r}{b} \qquad \text{E.g. }\frac{8}{3} = 2 + \frac{2}{3}

Multiply both sides by bb:

a=bq+ra = bq + r

Polynomial division

A polynomial can also be split into a "whole part" (quotient) and a remainder.

Let's say you have a polynomial:

f(x)=ax3+bx2+cx+d f(x) = ax^3 + bx^2 + cx + d

If you divide the whole polynomial by (xk)(x - k), you can say:

f(x)(xk)=q(x)+R(xk) \dfrac{f(x)}{(x - k)} = q(x) + \dfrac{R}{(x - k)}

Then, if you multiply both sides of the equation by (xk)(x - k):

f(x)=q(x)(xk)+R f(x) = q(x)(x - k) + R

RR is the remainder of f(x)(xk)\dfrac{f(x)}{(x - k)}. Now you have an equation that is essentially the same as Euclid's division lemma, a=bq+ra = bq + r.

Arithmetic long division

This is the good old algorithm that was taught in elementary school.

(I added a faint 0 to the steps below, so that you can see how long division starts dividing from the largest degrees of ten, and how it gives you an increasingly accurate answer.)

Solve 267 / 7.
Solve 267 / 7.


  _________
  )
Solve 267 / 7.


  _________
7 ) 267
Solve 267 / 7.


  _________
7 ) 267         What number does 7 go into at least once?
Solve 267 / 7.


  _________
7 ) 267         26 / 7
Solve 267 / 7.


  _________
7 ) 267         26 / 7, record quotient 3 at top
Solve 267 / 7.

     30
  _________
7 ) 267         26 / 7, record quotient 3 at top
Solve 267 / 7.

     30
  _________
7 ) 267         26 / 7, record quotient 3 at top
                Multiply the divisor (7) by the quotient (3)
Solve 267 / 7.

     30
  _________
7 ) 267         26 / 7, record quotient 3 at top
                3 * 7
Solve 267 / 7.

     30
  _________
7 ) 267         26 / 7, record quotient 3 at top
    210         3 * 7
    --
Solve 267 / 7.

     30
  _________
7 ) 267         26 / 7, record quotient 3 at top
    210         3 * 7
    --          Subtract the two stacked numbers
Solve 267 / 7.

     30
  _________
7 ) 267         26 / 7, record quotient 3 at top
    210         3 * 7
    --          26 - 21
Solve 267 / 7.

     30
  _________
7 ) 267         26 / 7, record quotient 3 at top
    210         3 * 7
    --          26 - 21
     50
Solve 267 / 7.

     30
  _________
7 ) 267         26 / 7, record quotient 3 at top
    210         3 * 7
    --          26 - 21, bring down next number
     50
Solve 267 / 7.

     30
  _________
7 ) 267         26 / 7, record quotient 3 at top
    210         3 * 7
    --          26 - 21, bring down next number
     57
Solve 267 / 7.

     30
  _________
7 ) 267         26 / 7, record quotient 3 at top
    210         3 * 7
    --          26 - 21, bring down next number
     57         Repeat the process for 57 (instead of 267)
Solve 267 / 7.

     30
  _________
7 ) 267         26 / 7, record quotient 3 at top
    210         3 * 7
    --          26 - 21, bring down next number
     57         57 / 7
Solve 267 / 7.

     38
  _________
7 ) 267         26 / 7, record quotient 3 at top
    210         3 * 7
    --          26 - 21, bring down next number
     57         57 / 7, record quotient 8 at top
Solve 267 / 7.

     38
  _________
7 ) 267         26 / 7, record quotient 3 at top
    210         3 * 7
    --          26 - 21, bring down next number
     57         57 / 7, record quotient 8 at top
                8 * 7
Solve 267 / 7.

     38
  _________
7 ) 267         26 / 7, record quotient 3 at top
    210         3 * 7
    --          26 - 21, bring down next number
     57         57 / 7, record quotient 8 at top
     56         8 * 7
     --
Solve 267 / 7.

     38
  _________
7 ) 267         26 / 7, record quotient 3 at top
    210         3 * 7
    --          26 - 21, bring down next number
     57         57 / 7, record quotient 8 at top
     56         8 * 7
     --         57 - 56
Solve 267 / 7.

     38
  _________
7 ) 267         26 / 7, record quotient 3 at top
    210         3 * 7
    --          26 - 21, bring down next number
     57         57 / 7, record quotient 8 at top
     56         8 * 7
     --         57 - 56
      1
Solve 267 / 7.

     38
  _________
7 ) 267         26 / 7, record quotient 3 at top
    210         3 * 7
    --          26 - 21, bring down next number
     57         57 / 7, record quotient 8 at top
     56         8 * 7
     --         57 - 56
      1         Done. Remainder is 1 / 7.
Solve 267 / 7.

     38
  _________
7 ) 267         26 / 7, record quotient 3 at top
    210         3 * 7
    --          26 - 21, bring down next number
     57         57 / 7, record quotient 8 at top
     56         8 * 7
     --         57 - 56
      1         Done. Remainder is 1 / 7.

Result: 38 + 1/7

Some thoughts:

  • Long division is repeatedly dividing the largest-to-lowest degree number by the divisor, while keeping track of remainders
  • If you have 1000/71000 / 7, you know that the result is at least 1010, because 1000/10=1001000 / 10 = 100, and 77 is smaller than 1010, so 77 divides 10001000 into even smaller parts than 1010 does
  • In other words: 1103101=102\dfrac{1 * 10^3}{10^1} = 10^2, and 11037100>102\dfrac{1 * 10^3}{7 * 10^0} > 10^2
  • The long division algorithm gives you an increasingly accurate answer. This is because it starts the division from the largest (divisible) degree-of-ten:

Solve 10007. \text{Solve }\dfrac{1000}{7}\text{.}

Remember Euclid's division lemma: a=bq+ra = bq + r. The long division algorithm is using this multiple times in succession. Long division is a divide and conquer algorithm. Split the dividend into two parts: the quotient qq (that the divisor bb divides wholly) and the remainder rr (that bb does not divide wholly). Then repeat the long division for rr. An example:

10007=7007+3007=1102+3007 \dfrac{1000}{7} = \dfrac{700}{7} + \dfrac{300}{7} = \boxed{1 * 10^2} + \dfrac{300}{7}

3007=2807+207=4101+207 \dfrac{300}{7} = \dfrac{280}{7} + \dfrac{20}{7} = \boxed{4 * 10^1} + \dfrac{20}{7}

207=147+67=2100+67 \dfrac{20}{7} = \dfrac{14}{7} + \dfrac{6}{7} = \boxed{2 * 10^0} + \dfrac{6}{7}

Result: 10007=142+67\frac{1000}{7} = 142 + \frac{6}{7}.

Long division uses a similar idea to Euclid's algorithm for GCD. Both algorithms are divide and conquer algorithms. (Hacker News)


Another example. Take this fraction:

37720942=3(105)+7(104)+7(103)+2(102)+0(101)+9(100)4(101)+2(100) \dfrac{377209}{42} = \dfrac{3(10^5) + 7(10^4) + 7(10^3) + 2(10^2) + 0(10^1) + 9(10^0)}{4(10^1) + 2(10^0)}

In code, a long division algorithm could look like this:

let dividend = 377209;
const divisor = 42;
const dividendMaxDegree = String( dividend ).length - 1;

let degreeDividend;
let remainder = 0;
let result = '';

// Go from the largest degree, e.g. 10^5, to 10^0
for ( let degree = dividendMaxDegree; degree >= 0; degree-- ) {

  // E.g. floor(377209 / 10^3) = 377
  degreeDividend = Math.floor( dividend / Math.pow( 10, degree ) );

  // Reduce the degree until divisor <= degreeDividend.
  // E.g. 42 > 3
  // or 42 > 37
  if ( divisor > degreeDividend ) {
    continue;
  }

  // E.g. floor(377 / 42) = 8
  const degreeQuotient = Math.floor( degreeDividend / divisor );

  // Mark the integer quotient (e.g. 8) at the top of the long division
  result += String( degreeQuotient );

  // E.g. 377 - 8 * 42 = 41
  remainder = degreeDividend - degreeQuotient * divisor;

  // We're now ready to move to the next lower degree. This is the step
  // in long division where the two stacked values are subtracted, and
  // the algorithm starts from the beginning again.
  // E.g. 377209 - 336000 = 41209
  dividend -= ( degreeQuotient * divisor ) * Math.pow( 10, degree );

  output( degreeDividend +' / '+ divisor +' = '+ degreeQuotient +' R '+ remainder );
  output( 'The correct answer is '+ result + '<i>0</i>'.repeat( degree ) +' + '+ dividend +'/'+ divisor );
}

Notice how the algorithm incrementially increases the accuracy of the integer quotient, and reduces the remainder. Also notice how the algorithm always uses the previous remainder as the new dividend.





A thought: all numbers can be represented as a(10n)+b(10n1)++z(100)a(10^n) + b(10^{n-1}) + \ldots + z(10^0).

For example: 243=2(102)+4(101)+3(100)243 = 2(10^2) + 4(10^1) + 3(10^0).

That looks like this quadratic function: 2x2+4x+3=2432x^2 + 4x + 3 = 243

Or, the same function zeroed: 2x2+4x240=02x^2 + 4x - 240 = 0

One of the roots is obviously 1010, since I chose 243243 to be a base-10 number above.

But I know that each polynomial of degree nn has nn roots. After solving for xx with the quadratic formula, I find that there is another root (or negative base), 12-12, that gives the same number:

243=2(102)+4(101)+3(100)243=2((12)2)+4((12)1)+3((12)0) 243 = 2(10^2) + 4(10^1) + 3(10^0) \\ 243 = 2((-12)^2) + 4((-12)^1) + 3((-12)^0)

Let's see what the two xx values are when y=243y = 243.

y=2x2+4x240y=2432x2+4x483=0x{16.5724,14.5724} y = 2x^2 + 4x - 240 \\ y = 243 \\ 2x^2 + 4x - 483 = 0 \\ x \approx \{-16.5724, 14.5724\}

Looks like they're identical, apart from an integer offset for the negative base.

Gnuplot Produced by GNUPLOT 5.4 patchlevel 2 0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 -20 -18 -16 -14 -12 -10 -8 -6 -4 -2 0 2 4 6 8 10 12 14 16 18 y x f(x) f(x) gnuplot_plot_2
set xrange [-20:18]
set yrange [-10:300]
set xtics 2
set ytics 20

$points << EOD
-16.5724 243
14.5724 243
EOD

f(x) = 2*x*x + 4*x - 240

plot f(x), "$points" with points lt 6 pt 7 notitle

Larger numbers have more bases, but looks like some of them are complex numbers when the polynomial's degree is 3\geq 3.


Polynomial long division

Polynomial long division uses the same process as arithmetic long division.

Note: each time you divide, only divide by the highest power of xx in the divisor.

        3x^2 +   2x +  4
      ______________________
x - 2 ) 3x^3 - 4x^2 + 0x - 2      <- 3x^3 / x
        3x^3 - 6x^2               <- 3x^2(x - 2)
        -----------
               2x^2 + 0x          <- 2x^2 / x
               2x^2 - 4x          <- 2x(x - 2)
               ---------
                      4x - 2      <- 4x / x
                      4x - 8      <- 4(x - 2)
                      ------
                           6

ab=q+rb3x34x22x2=(3x2+2x+4)+6x2 \frac{a}{b} = q + \frac{r}{b} \qquad \frac{3x^3 - 4x^2 - 2}{x - 2} = (3x^2 + 2x + 4) + \frac{6}{x - 2}

a=bq+r3x34x22=(x2)(3x2+2x+4)+6 a = bq + r \qquad 3x^3 - 4x^2 - 2 = (x - 2)(3x^2 + 2x + 4) + 6

Synthetic division

Long division can be made shorter with some shortcuts: see synthetic division.

Remainder theorem and factor theorem

Polynomial remainder theorem: if a polynomial f(x)f(x) is divided by xkx - k, the remainder is the constant r=f(k)r = f(k).

If you know one of the factors of a polynomial, e.g. (x1)(Other factors here)(x - 1)(\text{Other factors here}), you know one of the roots of the polynomial, e.g. 11.

Factor theorem: a polynomial f(x)f(x) has a factor (xk)(x - k) if and only if f(k)=0f(k) = 0 (i.e. kk is a root).

If you know one of the roots of the polynomial, e.g. x=1x = 1 (that is, f(1)=0f(1) = 0), you know one of the factors of the polynomial, e.g. (x1)(x - 1).

To check whether some (xk)(x - k) is a factor of a polynomial (and whether kk is one of its roots), you can use polynomial long division.

Polynomial long division (just like arithmetic long division) will give you the remainder of doing the division. If the remainder is 00, then (xk)(x - k) is a factor of the polynomial, and kk is a root.

Polynomial long division is slow, though. Remember: you don't have to do polynomial long division to find out if (xk)(x - k) is a factor (and if kk is a root) in your polynomial f(x)f(x). Instead:

  • Just evaluate r=f(k)r = f(k) for some kk (e.g. a guess)
  • If r=0r = 0, then kk is a root

Why is this important? Why worry about algebraic long division and these theorems? Remember: apparently algebraic fractions come up often in engineering and elsewhere in the real world.

If you see a fraction like 3x34x2+5x2x2\frac{3x^3 - 4x^2 + 5x - 2}{x - 2} in the real world, it's not immediately apparent if it can be simplified, and how — but the factor theorem helps [although it's easier to just do polynomial long division, as I wrote further down]:

y=3x34x2+5x2x2Is 2 a root? Let’s test. y = \frac{3x^3 - 4x^2 + 5x - 2}{x - 2} \qquad \text{Is 2 a root? Let's test.}

3(2)34(2)2+5(2)2=16No. Can’t simplify further. 3(2)^3 - 4(2)^2 + 5(2) - 2 = 16 \qquad \text{No. Can't simplify further.}

Although... now I know that r=16r = 16, i.e. the numerator looks like 3x34x2+5x2=163x^3 - 4x^2 + 5x - 2 = 16.

Therefore I should be able to "zero" the polynomial in the numerator, and "extract" the remainder out of the now-zeroed polynomial (so that the whole fraction still stays the same).

3(2)34(2)2+5(2)18=0Yep, 2 is now a root 3(2)^3 - 4(2)^2 + 5(2) - 18 = 0 \qquad \text{Yep, 2 is now a root}

y=3x34x2+5x18x2+16x2 y = \frac{3x^3 - 4x^2 + 5x - 18}{x - 2} + \frac{16}{x - 2}

Therefore we have an implicit (x2)(x - 2) as a factor in the numerator, and we can simplify:

y=3x34x2+5x18x2+16x2 y = \frac{3x^3 - 4x^2 + 5x - 18}{x - 2} + \frac{16}{x - 2}

y=(x2)(3x2+2x+9)x2+16x2 y = \frac{(x - 2)(3x^2 + 2x + 9)}{x - 2} + \frac{16}{x - 2}

y=3x2+2x+9+16x2 y = 3x^2 + 2x + 9 + \frac{16}{x - 2}

I did the conversion from 3x34x2+5x183x^3 - 4x^2 + 5x - 18 to (x2)(some quadratic here)(x - 2)(\text{some quadratic here}) manually (without polynomial long division), but it took some time. It's probably better to just always do polynomial long division, since it requires less thinking.

Remember: when dividing one polynomial by another, just use polynomial long division. It gives you a simplified polynomial, plus a remainder. Using the factor theorem to try to avoid having to do polynomial long division is actually more work, as seen above.

Algebraic fractions

94x3x2x2=1x173x+2\dfrac{9 - 4x}{3x^2 - x - 2} = \dfrac{1}{x - 1} - \dfrac{7}{3x + 2}

As for polynomial remainders, those are also useful. It comes up a lot in engineering when you look at a fraction of one polynomial divided by the other; a lot of the time, it's much easier to have a simple polynomial plus a proper fraction (which will tend to zero for sufficiently large values of x). (Reddit)

If the denominator has a higher degree, we call it a proper fraction (because the denominator doesn't go fully into the numerator). Otherwise it's an improper fraction.

See "Partial fraction" on WolframAlpha for more examples.


rr can also be used to approximate roots iteratively — the smaller the remainder rr, the closer you are to a root. An example:

Find an approximation for one of the roots of 2x3+6x2+7x+92x^3 + 6x^2 + 7x + 9.

var func = (x) => 2*x*x*x + 6*x*x + 7*x + 9;
var approximationIterationsLeft = 10;
var minI = -5;
var step = 1;

for ( var i = minI; i < 1000; i += step ) {
  var remainder = func( i );

  output( ( 'f('+ i +') ' ).padEnd( 15, ' ' ) +' = '+ remainder );

  if ( remainder === 0 ) {
    output( 'Found a root: '+ i );
    output( 'Therefore (x '+ ( i < 0 ? '+' : '-' ) +' '+ Math.abs( i ) +') is a factor.' );
    break;
  }

  if ( remainder > 0 ) {
    if ( --approximationIterationsLeft <= 0 ) {
      output( 'Found an approximate root: '+ i.toFixed( 3 ) );
      output( 'Therefore (x '+ ( i < 0 ? '+' : '-' ) +' '+ Math.abs( i ).toFixed( 3 ) +') is an approximate factor.' );
      break;
    }
    step /= 2;
    i = minI;
  }
  else {
    minI = i;
  }
}



2.E.(d)

Example 2

Given that (x4)(x - 4) is a factor of f(x)=6x3+ax2+bx+8f(x) = 6x^3 + ax^2 + bx + 8 and that the remainder when f(x)f(x) is divided by (x+1)(x + 1) is 15-15, find aa and bb and the other two factors.

f(x)=6x3+ax2+bx+8f(4)=06(4)3+42a+4b+8=0 f(x) = 6x^3 + ax^2 + bx + 8 \\ f(4) = 0 \\ 6(4)^3 + 4^2a + 4b + 8 = 0

384+16a+4b+8=016a=3924b 384 + 16a + 4b + 8 = 0 \\ 16a = -392 - 4b

I think I can't solve aa or bb yet. Need to try something else.

f(x)x4=q(x)+Rx4f(x)=(x4)q(x)+REuclid’s division lemmaf(x)=(x4)(6x2+...+u)+0 \frac{f(x)}{x - 4} = q(x) + \frac{R}{x - 4} \\ f(x) = (x - 4)q(x) + R \qquad \text{Euclid's division lemma} \\ f(x) = (x - 4)(6x^2 + ... + u) + 0

To get +8+8 in the cubic, I can see that I need 4u=8-4 * u = 8.

4u=8u=2f(x)=(x4)(6x2+...2) -4u = 8 \\ u = -2 \\ f(x) = (x - 4)(6x^2 + ... - 2)

What next? Hmm, I want to see the whole thing via algebraic manipulation to understand this deeper...

f(x)=(xk)q(x)+Rax3+bx2+cx+d=(xk)(ux2+vx+w)+Rd=kwc=wkvb=vkua=u f(x) = (x - k)q(x) + R \\ ax^3 + bx^2 + cx + d = (x - k)(ux^2 + vx + w) + R \\ d = -kw \\ c = w - kv \\ b = v - ku \\ a = u

Therefore, in our cubic:

f(x)=6x3+ax2+bx+8=(xk)(ux2+vx+w)+Rf(4)=0=R f(x) = 6x^3 + ax^2 + bx + 8 = (x - k)(ux^2 + vx + w) + R \\ f(4) = 0 = R

8=kw8=(4)ww=2 8 = -kw \\ 8 = -(4)w \\ w = -2

b=wkvb=24v b = w - kv \\ b = -2 - 4v

a=vkua=v4(6) a = v - ku \\ a = v - 4(6)

6=u 6 = u

Can I use a simultaneous equation now? Let's see. I have three variables, so I'll need three equations.

av=24b+4v=2 a - v = -24 \\ b + 4v = -2

What to use as the third equation? Well, from the beginning, I know this:

384+16a+4b+8=0 384 + 16a + 4b + 8 = 0

(At this point I realize that I could've solved aa and bb immediately with two simultaneous equations, but I'll run through these three equations first.)

av=24b+4v=216a+4b=392 a - v = -24 \\ b + 4v = -2 \\ 16a + 4b = -392

Remember: when solving simultaneous equations of three variables or more (i.e. three equations or more), do this:

  • Pick any pair of equations and solve for one variable.
  • Pick another pair of equations and solve for the same variable.
  • You have created a system of two equations in two unknowns. Solve the resulting two-by-two system.

Solve for bb:

4a4v=96b+4v=2 4a - 4v = -96 \\ b + 4v = -2

4a+b=98 \boxed{4a + b = -98}

Now I have an equation with variables aa and bb. Then next step is to combine it with our other equation that has aa and bb, and solve that simultaneous equation.

4a+b=9816a+4b=392 4a + b = -98 \\ 16a + 4b = -392

4a+b=984a+b=98 4a + b = -98 \\ 4a + b = -98

OK, looks like I won't get anywhere with this approach. The reason is that all of my variables are from the same exact equation: 6x3+ax2+bx+8=(xk)(ux2+vx+w)6x^3 + ax^2 + bx + 8 = (x - k)(ux^2 + vx + w)

I need to have two different equations to solve a system of equations. Above, the non-factored form 6x3+ax2+bx+86x^3 + ax^2 + bx + 8 and its factored form (xk)(ux2+vx+w)(x - k)(ux^2 + vx + w) were the same equation.

Remember: when you're solving simultaneous equations, you need to have different equations. If you put the same equation in different forms to the same system of equations, then your solutions to the system of equations will all result in 0=00 = 0, which means the problem has an infinite number of solutions. You're essentially drawing the same equation on a graph twice.

(I'll now proceed with the realization I had earlier.)

Starting all the way from the beginning, we have:

6(4)3+a(4)2+b(4)+8=06(1)3+a(1)2+b(1)+8=15 6(4)^3 + a(4)^2 + b(4) + 8 = 0 \\ 6(-1)^3 + a(-1)^2 + b(-1) + 8 = -15

This should be solvable as a simultaneous equation.

384+16a+4b+8=06+ab+8=15 384 + 16a + 4b + 8 = 0 \\ -6 + a - b + 8 = -15

16a+4b=392ab=17 16a + 4b = -392 \\ a - b = -17

4a+b=98ab=17 4a + b = -98 \\ a - b = -17

5a=115a=23 5a = -115 \\ a = -23

Then, solving for bb via substitution:

ab=17b=a+17b=6 a - b = -17 \\ b = a + 17 \\ b = -6

Check with the other equation:

4a+b=984(23)6=98 4a + b = -98 \\ 4(-23) - 6 = -98

Now we now the full cubic polynomial: 6x323x26x+8=06x^3 - 23x^2 - 6x + 8 = 0. To find the other two factors (i.e. the two roots in addition to 44), I can use polynomial division and the quadratic formula.

        6x^2 +     x -      2
      _______________________
x - 4 ) 6x^3 - 23x^2 - 6x + 8
        6x^3 - 24x^2
        ------------
                 x^2 - 6x
                 x^2 - 4x
                 --------
                      -2x + 8
                      -2x + 8
                      -------
                            0

x=1±124(6)(2)2(6)x=1±4912x={12,23} x = \frac{-1 \pm \sqrt{1^2 - 4(6)(-2)}}{2(6)} \\ x = \frac{-1 \pm \sqrt{49}}{12} \\ x = \{\frac{1}{2}, -\frac{2}{3}\}

Remember: when you have a factored polynomial like (xk)(polynomial of degree 2)(x - k)(\text{polynomial of degree }\geq 2), e.g. (x4)(6x2+...+8)(x - 4)(6x^2 + ... + 8), just use polynomial long division, rather than trying to eyeball what the (polynomial of degree 2)(\text{polynomial of degree }\geq 2) should look like. Polynomial division is less error-prone, and probably faster, as long as you remember how to do it.

Example 3

Suppose you have been asked to show that x24x^2 - 4 is a factor of 3x3+4x212x163x^3 + 4x^2 - 12x - 16. Can you see that you have actually been asked about two factors? What are they?

The first thing that hits my eye is the difference of two squares.

x24=(x+2)(x2)Found the two factors x^2 - 4 = (x + 2)(x - 2) \qquad \text{Found the two factors}

3x3+4x212x16(x+2)(x2) \frac{3x^3 + 4x^2 - 12x - 16}{(x + 2)(x - 2)}

        3x^2 -   2x -   8
      ________________________
x + 2 ) 3x^3 + 4x^2 - 12x - 16
        3x^3 + 6x^2
        -----------
              -2x^2 - 12x
              -2x^2 -  4x
              -----------
                      -8x - 16
                      -8x - 16
                      --------
                             0

        3x^2 +  10x +   8
      ________________________
x - 2 ) 3x^3 + 4x^2 - 12x - 16
        3x^3 - 6x^2
        -----------
              10x^2 - 12x
              10x^2 - 20x
              -----------
                       8x - 16
                       8x - 16
                       -------
                             0

All of these are the same function:

3x3+4x212x16(x+2)(3x22x8)(x2)(3x2+10x+8) 3x^3 + 4x^2 - 12x - 16 \\ (x + 2)(3x^2 - 2x - 8) \\ (x - 2)(3x^2 + 10x + 8)

Since the cubic has two factors, (x+2)(x + 2) and (x2)(x - 2), one of these factors should also be a factor in the quadratic. Take one factor for the cubic, and use the other factor to simplify the quadratic.

(x+2)(3x22x8) (x + 2)(3x^2 - 2x - 8)

Divide the quadratic by the other factor, (x2)(x - 2):

          3x +  4
      _______________
x - 2 ) 3x^2 - 2x - 8
        3x^2 - 6x
        ---------
               4x - 8
               4x - 8
               ------
                    0

Therefore all of these are the same function:

3x3+4x212x16(x+2)(3x22x8)(x2)(3x2+10x+8)(x+2)(x2)(3x+4)(x24)(3x+4) 3x^3 + 4x^2 - 12x - 16 \\ (x + 2)(3x^2 - 2x - 8) \\ (x - 2)(3x^2 + 10x + 8) \\ (x + 2)(x - 2)(3x + 4) \\ (x^2 - 4)(3x + 4)

Neat! Remember: polynomial long division, the quadratic formula, and being able to spot the difference of two squares are very powerful tools when working with polynomials and algebraic fractions.

Example 4

Solve the equation 4x437x2+9=04x^4 - 37x^2 + 9 = 0.

"This is a red herring", says the book.

My first idea is to factor 4x437x24x^4 - 37x^2 into two lower-degree factors.

4x437x2=(2x2+1237x)(2x21237x) 4x^4 - 37x^2 = (2x^2 + \frac{1}{2}37x)(2x^2 - \frac{1}{2}37x)

And then... wildly guess that the result looks like (3)(3)+9=0(3)(-3) + 9 = 0.

2x2+1237x=32x2+1237x+3=04x2+37x6=0x=37±3724(4)(6)2(4)x=37±1369+968x=37±14658 2x^2 + \frac{1}{2}37x = 3 \\ 2x^2 + \frac{1}{2}37x + 3 = 0 \\ 4x^2 + 37x - 6 = 0 \\ x = \frac{-37 \pm \sqrt{37^2 - 4(4)(-6)}}{2(4)} \\ x = \frac{-37 \pm \sqrt{1369 + 96}}{8} \\ x = \frac{-37 \pm \sqrt{1465}}{8} \\

Not sure if this leads anywhere.

My second idea is to use polynomial long division to split the quadratic into its factors, plus a remainder.

4x437x2+9=04x437x2+9x23=0x23 4x^4 - 37x^2 + 9 = 0 \\ \frac{4x^4 - 37x^2 + 9}{x^2 - 3} = \frac{0}{x^2 - 3}

          4x^2 +    25
         _________________
x^2 - 3 ) 4x^4 - 37x^2 + 9
          4x^4 - 12x^2
          ------------
                 25x^2 + 9
                 25x^2 - 75
                 ----------
                         84

Not sure if this helps.

The book says that this polynomial is "a heavily disquised quadratic equation".

How do I "downgrade" a degree 4 polynomial into a degree 2 polynomial? How would I do it in arithmetic?

3(104)+5(102)+4(100)=30504102(3(102)+5)+4(100)=30504 3(10^4) + 5(10^2) + 4(10^0) = 30504 \\ 10^2(3(10^2) + 5) + 4(10^0) = 30504

4x437x2+9=0x2(4x237)+9=0 4x^4 - 37x^2 + 9 = 0 \\ x^2(4x^2 - 37) + 9 = 0

Hmm, 9=329 = 3^2. Maybe moving 99 and x2x^2 to the right-hand side leads somewhere.

x2(4x237)=94x237=9x24x237=32x2 x^2(4x^2 - 37) = -9 \\ 4x^2 - 37 = -\frac{9}{x^2} \\ 4x^2 - 37 = -\frac{3^2}{x^2}

Can't see it. Let's see what the book says.

If we put y=x2y = x^2, the equation becomes 4y237y+9=04y^2 - 37y + 9 = 0.

Ah, makes sense.

4y237y+9=0y=37±(37)24(4)(9)2(4)y=37±12258y=37±358y={9,14} 4y^2 - 37y + 9 = 0 \\ y = \frac{37 \pm \sqrt{(-37)^2 - 4(4)(9)}}{2(4)} \\ y = \frac{37 \pm \sqrt{1225}}{8} \\ y = \frac{37 \pm 35}{8} \\ y = \{9, \frac{1}{4}\}

But since we have a degree 4 polynomial, we should have 4 roots. Therefore:

y=x2y=9x2=9x=±(9)x=±3 y = x^2 \\ y = 9 \\ x^2 = 9 \\ x = \pm \sqrt(9) \\ x = \pm 3

y=x2y=14x2=14x=±(14)x=±12 y = x^2 \\ y = \frac{1}{4} \\ x^2 = \frac{1}{4} \\ x = \pm \sqrt(\frac{1}{4}) \\ x = \pm \frac{1}{2}

x={3,14,14,3} x = \{-3, -\frac{1}{4}, \frac{1}{4}, 3\}

Returning to my arithmetic example:

3(104)+5(102)+4(100)=30504h=1023h2+5h+4=30504 3(10^4) + 5(10^2) + 4(10^0) = 30504 \\ h = 10^2 \\ 3h^2 + 5h + 4 = 30504

2.E.2

(1)

f(x)=x3+2x25x6f(2)=8+2(4)5(2)6=0 f(x) = x^3 + 2x^2 - 5x - 6 \\ f(2) = 8 + 2(4) - 5(2) - 6 = 0

        x^2 +   4x +  3
      __________________
x - 2 ) x^3 + 2x^2 - 5x - 6
        x^2 - 2x^2
        ----------
              4x^2 - 5x
              4x^2 - 8x
              ---------
                     3x - 6
                     3x - 6
                     ------
                          0

x=4±16122x={3,1}(x2)(x+3)(x+1) x = \frac{-4 \pm \sqrt{16 - 12}}{2} \\ x = \{-3, -1\} \\ (x - 2)(x + 3)(x + 1)

(2)

2x33x28x3=(x3)(something)=0 2x^3 - 3x^2 - 8x - 3 = (x - 3)(something) = 0

        2x^2 +   3x +  1
      ______________________
x - 3 ) 2x^3 - 3x^2 - 8x - 3
        2x^3 - 6x^2
        -----------
               3x^2 - 8x
               3x^2 - 9x
               ---------
                       x - 3
                       x - 3
                       -----
                           0

Instead of using the quadratic formula, I'll factor by grouping this time, for practice:

2x2+3x+1=0ac=pq=(2)(1)(2x2+2x)+(x+1)=02x(x+1)+1(x+1)=0(2x+1)(x+1)=0 2x^2 + 3x + 1 = 0 \\ ac = pq = (2)(1) \\ (2x^2 + 2x) + (x + 1) = 0 \\ 2x(x + 1) + 1(x + 1) = 0 \\ (2x + 1)(x + 1) = 0

(3)

f(x)=3x3+x212x4=0 f(x) = 3x^3 + x^2 - 12x - 4 = 0

Trying to guess a root by using the rational zero theorem, but by always trying some integers first. I'll first try x=1x = 1 to see if I need an xx that is less or greater than 11.

f(x)=3x3+x212x4=03+1124=12 f(x) = 3x^3 + x^2 - 12x - 4 = 0 \\ 3 + 1 - 12 - 4 = -12

I need a larger xx, or a negative xx that is less than 1-1. How about 22?

f(x)=3x3+x212x4=024+4244=0 f(x) = 3x^3 + x^2 - 12x - 4 = 0 \\ 24 + 4 - 24 - 4 = 0

One of the factors is (x2)(x - 2), i.e., (x2)(A quadratic)(x - 2)(\text{A quadratic}). Find the quadratic with long division.

        3x^2 +   7x +   2
      ______________________
x - 2 ) 3x^3 +  x^2 - 12x - 4
        3x^3 - 6x^2
        -----------
               7x^2 - 12x
               7x^2 - 14x
               ----------
                       2x - 4
                       2x - 4
                       ------
                            0

3x2+7x+2=0x=7±724(3)(2)2(3)x=7±256x={13,2} 3x^2 + 7x + 2 = 0 \\ x = \frac{-7 \pm \sqrt{7^2 - 4(3)(2)}}{2(3)} \\ x = \frac{-7 \pm \sqrt{25}}{6} \\ x = \{-\frac{1}{3}, -2\}

Remember: you know the two roots of the quadratic: 13-\frac{1}{3} and 2-2. How do you find the factors? (x+13)(x+2)(x + \frac{1}{3})(x + 2) is incorrect. Be careful here. Remember that the factored form of a quadratic is a(xr1)(xr2)a(x - r_1)(x - r_2). In the quadratic we have a=3a = 3. Therefore the factors are 3(x+13)(x+2)3(x + \frac{1}{3})(x + 2), or, in other words, (3x+1)(x+2)(3x + 1)(x + 2).

(x2)(3x+1)(x+2)=0 (x - 2)(3x + 1)(x + 2) = 0

(4)

f(x)=2x3+7x2+2x3=0x=354+6363=0(x+3)(something)=0 f(x) = 2x^3 + 7x^2 + 2x - 3 = 0 \\ x = -3 \\ -54 + 63 - 6 - 3 = 0 \\ (x + 3)(something) = 0

        2x^2 +    x -  1
      ______________________
x + 3 ) 2x^3 + 7x^2 + 2x - 3
        2x^3 + 6x^2
        -----------
                x^2 + 2x
                x^2 + 3x
                --------
                      -x - 3
                      -x - 3
                      ------
                           0

(x+3)(2x2+x1)=0x=1±124(2)(1)2(2)={12,1}Quadratic formula(x+3)2(x12)(x+1)=(x+3)(2x1)(x+1) (x + 3)(2x^2 + x - 1) = 0 \\ x = \frac{-1 \pm \sqrt{1^2 - 4(2)(-1)}}{2(2)} = \{\frac{1}{2}, -1\} \qquad \text{Quadratic formula} \\ (x + 3)2(x - \frac{1}{2})(x + 1) = (x + 3)(2x - 1)(x + 1)

(5)

f(x)=x429x2+100=0f(2)=2429(22)+100=16116+100=0Guessed one of the rootsf(x)=(x2)(some cubic) f(x) = x^4 - 29x^2 + 100 = 0 \\ f(2) = 2^4 - 29(2^2) + 100 = 16 - 116 + 100 = 0 \qquad \text{Guessed one of the roots} \\ f(x) = (x - 2)(\text{some cubic})

Finding the cubic equation with polynomial long division:

        x^3 + 2x^2 - 25x -   50
      _______________________________
x - 2 ) x^4 + 0x^3 - 29x^2 + 0x + 100
        x^4 - 2x^3
        ----------
              2x^3 - 29x^2
              2x^3 -  4x^2
              ------------
                    -25x^2 + 0x
                    -25x^2 + 50x
                    ------------
                            -50x + 100
                            -50x + 100
                            ----------
                                     0

Then solving the cubic equation like we usually do:

f(x)=(x2)(x3+2x225x50)=0g(x)=x3+2x225x50g(2)=(2)3+2(2)225(2)50=0Guessing one of the rootsf(x)=(x2)(x+2)(some quadratic)=0 f(x) = (x - 2)(x^3 + 2x^2 - 25x - 50) = 0 \\ g(x) = x^3 + 2x^2 - 25x - 50 \\ g(-2) = (-2)^3 + 2(-2)^2 - 25(-2) - 50 = 0 \qquad \text{Guessing one of the roots} \\ f(x) = (x - 2)(x + 2)(\text{some quadratic}) = 0

        x^2 +    0 -  25
      _______________________
x + 2 ) x^3 + 2x^2 - 25x - 50
        x^3 + 2x^2
        ----------
              0x^2 - 25x
                       0
              ----------
                    -25x - 50
                    -25x - 50
                    ---------
                            0

f(x)=(x2)(x+2)(x2+025)=0 f(x) = (x - 2)(x + 2)(x^2 + 0 - 25) = 0

Solving the quadratic:

x2+025=0x={5,5} x^2 + 0 - 25 = 0 \\ x = \{5, -5\}

Therefore:

f(x)=(x2)(x+2)(x5)(x+5)=0f(x)=(x24)(x225)=0Difference of squares f(x) = (x - 2)(x + 2)(x - 5)(x + 5) = 0 \\ f(x) = (x^2 - 4)(x^2 - 25) = 0 \qquad \text{Difference of squares}

This could have been solved more easily, because x429x2+100x^4 - 29x^2 + 100 is a disguised quadratic, similarly to an earlier example. Let's try:

f(x)=x429x2+100=0y=x2f(y)=y229y+100=0y={25,4}x=y={25,4}={5,5,2,2} f(x) = x^4 - 29x^2 + 100 = 0 \\ y = x^2 \\ f(y) = y^2 - 29y + 100 = 0 \\ y = \{25, 4\} \\ x = \sqrt{y} = \{\sqrt{25}, \sqrt{4}\} = \{-5, 5, -2, 2\}

(6)

f(x)=5x3+ax2+bx6f(x)=(x3)(Some quadratic)f(x)(x+2)=40 f(x) = 5x^3 + ax^2 + bx - 6 \\ f(x) = (x - 3)(\text{Some quadratic}) \\ \frac{f(x)}{(x + 2)} = -40

We know that one of the roots is 33, and that f(x)(x+2)=40\frac{f(x)}{(x + 2)} = -40.

Maybe we can solve aa and bb with simultaneous equations. We get one equation by substituting xx with 33.

f(3)=5(3)3+a(32)+b(3)6=f(3)=9a+3b+129=0f(3)=3a+b+43=0 f(3) = 5(3)^3 + a(3^2) + b(3) - 6 = \\ f(3) = 9a + 3b + 129 = 0 \\ f(3) = 3a + b + 43 = 0

To get the other equation (for a system of two equations) we can use the remainder theorem.

r=f(x)(xk)=f(x)(x+2)=40f(k)=40f(2)=40f(2)=5(2)3+a(2)2+b(2)6=40f(2)=4a2b46=40f(2)=2ab23=20 r = \frac{f(x)}{(x - k)} = \frac{f(x)}{(x + 2)} = -40 \\ f(k) = -40 \\ f(-2) = -40 \\ f(-2) = 5(-2)^3 + a(-2)^2 + b(-2) - 6 = -40 \\ f(-2) = 4a - 2b - 46 = -40 \\ f(-2) = 2a - b - 23 = -20

Therefore:

{3a+b+43=02ab23=20 \begin{cases} 3a + b + 43 = 0 \\ 2a - b - 23 = -20 \end{cases}

{3a+b=432ab=3 \begin{cases} 3a + b = -43 \\ 2a - b = 3 \end{cases}

5a=40a=8 5a = -40 \\ a = -8

3(8)+b=43b=19 3(-8) + b = -43 \\ b = -19

Therefore:

f(x)=5x38x219x6=0 f(x) = 5x^3 - 8x^2 - 19x - 6 = 0

Then find the two other factors with polynomial long division.

        5x^2 +   7x +   2
      _______________________
x - 3 ) 5x^3 - 8x^2 - 19x - 6
        5x^3 - 15x^2
        ------------
               7x^2 - 19x
               7x^2 - 21x
               ----------
                       2x - 6
                       2x - 6
                       ------
                            0

f(x)=(x3)(5x2+7x+2) f(x) = (x - 3)(5x^2 + 7x + 2)

Solve the quadratic.

5x2+7x+2=0x=7±724(5)(2)2(5)x=7±310x={25,1} 5x^2 + 7x + 2 = 0 \\ x = \frac{-7 \pm \sqrt{7^2 - 4(5)(2)}}{2(5)} \\ x = \frac{-7 \pm 3}{10} \\ x = \{-\frac{2}{5}, -1\}

f(x)=(x3)5(x+25)(x+1)f(x)=(x3)(5x+2)(x+1) f(x) = (x - 3)5(x + \frac{2}{5})(x + 1) \\ f(x) = (x - 3)(5x + 2)(x + 1)

(7)

By long division:

          4x^2 +   4x -   3
       ________________________
3x - 2 ) 12x^3 + 4x^2 - 17x + 6
         12x^3 - 8x^2
         ------------
                12x^2 - 17x
                12x^2 -  8x
                -----------
                        -9x + 6
                        -9x + 6
                        -------
                              0

By factor theorem: kk is a root and (xk)(x - k) is a factor if f(k)=0f(k) = 0.

(3x2)=03(x23)=0k=2312x3+4x217x+6=012(23)3+4(23)217(23)+6=012(827)+4(49)(343)+6=09627+169343+6=0329+169343+6=0489343+6=0163343+6=0183+6=0 (3x - 2) = 0 \\ 3(x - \frac{2}{3}) = 0 \\ k = \frac{2}{3} \\ 12x^3 + 4x^2 - 17x + 6 = 0 \\ 12(\frac{2}{3})^3 + 4(\frac{2}{3})^2 - 17(\frac{2}{3}) + 6 = 0 \\ 12(\frac{8}{27}) + 4(\frac{4}{9}) - (\frac{34}{3}) + 6 = 0 \\ \frac{96}{27} + \frac{16}{9} - \frac{34}{3} + 6 = 0 \\ \frac{32}{9} + \frac{16}{9} - \frac{34}{3} + 6 = 0 \\ \frac{48}{9} - \frac{34}{3} + 6 = 0 \\ \frac{16}{3} - \frac{34}{3} + 6 = 0 \\ \frac{18}{3} + 6 = 0 \\

(8)

By long division:

         3x^2 +   4x -  2
       ______________________
2x - 1 ) 6x^3 + 5x^2 - 8x + 1
         6x^3 - 3x^2
         -----------
                8x^2 - 8x
                8x^2 - 4x
                ---------
                      -4x + 1
                      -4x + 2
                      -------
                           -1

2x12x - 1 is not a factor of 6x3+5x28x+16x^3 + 5x^2 - 8x + 1 because the remainder is not 00.

By remainder theorem:

f(12)=6(12)3+5(12)28(12)+1=1 f(\frac{1}{2}) = \\ 6(\frac{1}{2})^3 + 5(\frac{1}{2})^2 - 8(\frac{1}{2}) + 1 = -1