Pre-Calculus for Programmers

Algebra foundations: the toolkit calculus never reteaches

6 / 397
Contents

Contents

Pre-Calculus for Programmers

0 of 397 complete

9 min read

Simplest form, and getting a root off the bottom

$\sqrt{72}$ and $6\sqrt{2}$ are the same number; one of them is an answer and the other is not.

There is more than one way to write most numbers, and mathematics has a habit of preferring one of them. For roots the preference is called simplest form, and it is worth seeing that the choice really is between two spellings of one number before learning how to move between them.

Two ways to write one numberPython

Change 72 to 48 and 6 to 4, and change the 2 under the root to 3. Do the two numbers still match? If not, adjust the outside number until they do.

The two spellings agree to every digit but the last, and that last one is the machine rounding differently on two different routes to one number. The move that gets from one to the other is a single rule.

The product and quotient rules for roots

abn=an⋅bnabn=anbn\sqrt[n]{ab} = \sqrt[n]{a} \cdot \sqrt[n]{b} \qquad\qquad \sqrt[n]{\frac{a}{b}} = \frac{\sqrt[n]{a}}{\sqrt[n]{b}}
True for every $a, b \ge 0$. For an odd index it holds for negatives too.

These are the exponent laws (ab)1/n=a1/nb1/n(ab)^{1/n} = a^{1/n}b^{1/n} in radical clothing, so there is nothing new to believe. What matters is that there is no matching rule for a sum: a+b\sqrt{a+b} cannot be split, as 9+16=5\sqrt{9+16} = 5 against 3+4=73 + 4 = 7 shows.

A square root is in simplest form when the radicand has no perfect-square factor bigger than 1. So the job is to find the largest perfect square hiding inside, and take it out.

Finding the largest square factorPython

Change n to 200, then to 98, then to 105. One of those three is already in simplest form. Which, and how can you tell from the output?

Higher roots and letters

For a cube root, look for perfect cubes instead: 543=27⋅23=323\sqrt[3]{54} = \sqrt[3]{27 \cdot 2} = 3\sqrt[3]{2}. Taking out 9 would achieve nothing, because 9 is a square and not a cube. For an index of nn, the factor you want is a perfect nnth power.

Letters behave the same way, and the exponent form shows which powers come out. Under a square root, an even power leaves cleanly, because half of an even number is a whole number: x6=x3\sqrt{x^{6}} = x^{3}. An odd power leaves one factor behind: x7=x6⋅x=x3x\sqrt{x^{7}} = \sqrt{x^{6} \cdot x} = x^{3}\sqrt{x}.

Under a cube root the test is divisibility by 3 rather than by 2, since a cube root undoes a third power. Here is one with a number and a letter together, every step.

Simplify 54x53\sqrt[3]{54x^{5}}, taking xx to be positive.

  1. Split the radicand into a number part and a letter part: 543⋅x53\sqrt[3]{54} \cdot \sqrt[3]{x^{5}}, using the product rule for roots.
  2. The largest perfect cube dividing 54 is 27, because 54=27⋅254 = 27 \cdot 2 and the next cube up, 64, is bigger than 54.
  3. So 543=273⋅23=323\sqrt[3]{54} = \sqrt[3]{27}\cdot\sqrt[3]{2} = 3\sqrt[3]{2}.
  4. For the letter, take the largest multiple of 3 that is no bigger than 5, which is 3: x5=x3⋅x2x^{5} = x^{3}\cdot x^{2}.
  5. So x53=x⋅x23\sqrt[3]{x^{5}} = x \cdot \sqrt[3]{x^{2}}, since x33=x\sqrt[3]{x^{3}} = x.
  6. Put the two halves together and gather what is left under one root: 3x2x233x\sqrt[3]{2x^{2}}.
  7. Check at x=2x = 2: the original radicand is 54⋅32=172854 \cdot 32 = 1728, and 17283=12\sqrt[3]{1728} = 12. The answer gives 3⋅2⋅2⋅43=683=6⋅2=123 \cdot 2 \cdot \sqrt[3]{2\cdot4} = 6\sqrt[3]{8} = 6 \cdot 2 = 12.

Two roots can be added only when they are like radicals, meaning the same index and the same radicand, in the same way that 3z+5z=8z3z + 5z = 8z but 3z+5w3z + 5w does not collapse. The trap is that two roots can look unlike and become like once they are simplified, so simplify first and only then look.

Take 18+50\sqrt{18} + \sqrt{50}. Neither is simplified, and the radicands 18 and 50 are different, so nothing can be done yet. Simplify each: 18=9⋅218 = 9 \cdot 2 gives 323\sqrt{2}, and 50=25⋅250 = 25 \cdot 2 gives 525\sqrt{2}. Now both are multiples of 2\sqrt{2}, so add the numbers in front: 3+5=83 + 5 = 8, and the sum is 828\sqrt{2}.

Subtraction is the same move. 98−18\sqrt{98} - \sqrt{18} becomes 72−327\sqrt{2} - 3\sqrt{2}, since 98=49⋅298 = 49\cdot2 and 18=9⋅218 = 9\cdot2, and that is 424\sqrt{2}. What never happens is the radicands themselves combining: 98−18\sqrt{98}-\sqrt{18} is not 80\sqrt{80}, because 80≈8.94\sqrt{80} \approx 8.94 while 42≈5.664\sqrt{2} \approx 5.66. The symbol ≈\approx means "is approximately equal to", and it is used whenever a decimal has been rounded.

Rationalising a denominator

By convention an answer does not leave a root on the bottom of a fraction. Rationalising the denominator means rewriting the fraction so the bottom is free of roots, without changing its value.

The tool is multiplication by 1, written in a useful disguise. Multiplying top and bottom by the same non-zero quantity is multiplying by 1, so the value cannot change, only the appearance. For 63\frac{6}{\sqrt{3}}, multiply top and bottom by 3\sqrt{3}: the bottom becomes 3⋅3=3\sqrt{3}\cdot\sqrt{3} = 3, the top becomes 636\sqrt{3}, and the whole thing is 633=23\frac{6\sqrt{3}}{3} = 2\sqrt{3}.

When the bottom is a sum such as 2−32 - \sqrt{3}, multiplying by 3\sqrt{3} fails, because the 2 picks up a root of its own. What works is the conjugate: the same two terms with the sign between them flipped. The conjugate of 2−32 - \sqrt{3} is 2+32 + \sqrt{3}, and multiplying them uses the pattern (a−b)(a+b)=a2−b2(a-b)(a+b) = a^{2} - b^{2}, which squares both terms and so destroys the root.

Checking a rationalised answer numericallyPython

Change the sign in 2 - r3 to a plus and run it again. The second line no longer matches. Work out on paper what the new answer should be, then edit line 3 until the two agree.

A worked example, every step

Rationalise the denominator of 65+2\dfrac{6}{\sqrt{5}+\sqrt{2}}.

  1. The bottom is a sum of two terms, so the conjugate is the same pair with the sign flipped: 5−2\sqrt{5}-\sqrt{2}.
  2. Multiply top and bottom by it. This is multiplying by 5−25−2\frac{\sqrt{5}-\sqrt{2}}{\sqrt{5}-\sqrt{2}}, which is 1, so the value is untouched.
  3. The bottom is (5+2)(5−2)(\sqrt{5}+\sqrt{2})(\sqrt{5}-\sqrt{2}). By the pattern (a+b)(a−b)=a2−b2(a+b)(a-b) = a^{2}-b^{2} with a=5a = \sqrt{5} and b=2b = \sqrt{2}, that is 5−2=35 - 2 = 3.
  4. The top is 6(5−2)6(\sqrt{5}-\sqrt{2}).
  5. So the fraction is 6(5−2)3\dfrac{6(\sqrt{5}-\sqrt{2})}{3}, and 6÷3=26 \div 3 = 2.
  6. The answer is 2(5−2)2(\sqrt{5}-\sqrt{2}), or 25−222\sqrt{5}-2\sqrt{2}. The snippet above checks it: both forms print as 1.6437088302533893.
Simplify 200x7\sqrt{200x^{7}}, taking xx to be positive.

10x32x10x^{3}\sqrt{2x}. The number first: 200=100⋅2200 = 100 \cdot 2 and 100=10\sqrt{100} = 10. Then the letter: x7=x6⋅xx^{7} = x^{6}\cdot x, and x6=x3\sqrt{x^{6}} = x^{3} because half of 6 is 3. What is left under the root is 2x2x. Writing x3.5x^{3.5} outside is the usual slip: only even powers escape a square root whole.

Check yourself

Which of these is 45+20\sqrt{45} + \sqrt{20} in simplest form?

All lessons in Pre-Calculus for Programmers