 a
n
Result

# Root Calculator

By Maciej Kowalski, PhD candidate

Welcome to the root calculator, where we'll go through the theory and practice of how to calculate the nth root of a number, also called the nth radical, together. We'll start with a quick explanation of what is a root in math, and give some easy examples that you might have already seen, like the square root of 2, square root of 3, or the cube root of 4. But what if it's the fourth root that you'd like to find? The previous ones were fairly simple, but what is, say, the 4th root of 81? No worries, we'll show you soon enough!

Sit back, relax, and enjoy the ride through the world of radicals!

## What is a root in math?

We all know multiplication, right? Like `12 * 4 = 48`? If we want to multiply the same number a few times, then we can write it in a simplified form:

`12 * 12 * 12 * 12 * 12 = 12⁵`,

where the small `5` is called the exponent and means how many copies of the big number (in this case, `12`) we take. We also call this operation taking the `5`-th power of `12`.

A root is the opposite operation. To connect it to the biological meaning, when we look at a grown tree, we see its leaves and trunk, but it is all built upon its roots. And the story is very similar with numbers: when we see the number `125`, then taking its root will show us the tiny grain that it grew out of. In this example, it will show us that the seed is `5` because `5³ = 125`.

Formally, the `n`th root of a number `a` is the number `b`, such that:

`bⁿ = a`.

For instance, let's take a closer look at what is the square root of some number. Suppose that you're digging a swimming pool in your backyard. You'd like it to be as long as it is wide and, all in all, cover an area of `256` square feet. How can you figure out how long the sides should be? That's right - by calculating the radical! In this case, it should be the square root of the area, i.e., the square root of `256`.

And what is the square root of that number? Well, let's see how we can find it and how to calculate the square root in general.

## How to calculate the square root

Sometimes calculating the root in math may resemble a guessing game. But it's not the same as rolling dice with your eyes closed and guessing what you'll get. It's more of a calculated guess. After all, once we know that `3⁴ = 81`, we can safely say that the 4th root of `81` is `3`. But we have to know that first.

So what can we do if we forgot our handy table of the first one hundred numbers and their first few powers at home? Is it a lost cause? Fortunately, no. Not entirely, but we'll come back to this in a second.

As an example, we'll show how to calculate the square root of `72`. Our main tool here will be prime factorization, i.e., splitting `72` into its smallest pieces possible.

In the prime factorization procedure, we take a number (in our case `72`) and find the smallest prime number that divides it. Recall that a prime number is an integer which has only two divisors: `1` and itself. It's fairly easy to see that for us it will be `2` since

`72 / 2 = 36`.

The next step is to find the smallest prime number of the result of the division of the number by the prime number, i.e., the number `36`. If we continue this until we reach `1`, we'll get the following primes: `2`, `2`, `2`, `3`, `3`. This is the prime factorization of `72`, and it means that

`72 = 2 * 2 * 2 * 3 * 3`.

Now, if we find pairs among the same numbers, we'll see that we have a couple of `2`'s, a couple of `3`'s, and a single `2` is left. This allows us to write the square radical of `72` as

`√72 = √(2*2*2*3*3) = √(2²*3²*2) = 2*3 * √2 = 6√2`.

A keen eye will observe that the only numbers that stay under the root are exactly the loners that didn't find a pair.

But what about the `2`? What is the square root of `2`? Well, that's what the "not entirely" was all about. The square root of `2`, the square root of `3`, or of any other prime number takes us back to a guessing game. Fortunately, we can use our root calculator to figure out that `√2 ≈ 1.4142`, which gives us

`√72 = 6√2 ≈ 6 * 1.4142 = 8.4852`.

In essence, when we're asked "what is the square root of...,", we should first do prime factorization to break down the problem, and if (as above) we're left with some small digit in the end, we just have to use a tool like the root calculator to find it.

"But what about higher radicals? What if I need, e.g., the fourth root of a number?" Well, how convenient of you to ask! That is precisely the problem we'll deal with in the next section.

## Cube root, fourth root, nth root

Recall how you wanted to dig a swimming pool in the first section. Now suppose that you'd like the whole thing to be a cube that holds `1,728` cubic feet of water. (Don't ask us why. Perhaps anything above is taxed differently?)

How can you find the side of such a pool? Yup - by calculating the cube root of the number (that's where the name cubic root comes from). It will tell us that length should be

`∛1,728 = 12` feet long.

But how did we get there? Fortunately, the main tool here is the same: prime factorization. If we apply the procedure to `1,728`, we'll get that

`1,728 = 2*2*2*2*2*2*3*3*3`.

Now comes the thing that's different - instead of pairs, we group the numbers into triples. That's what the small `3` in the root symbol suggests - we need third powers. Note that the square roots are, in fact, radicals of order `2`, but we don't write the `2` because... Well, if we don't have to do it from one type of root, it might as well be the simplest one. That's just convention and tradition. Think of it as a mathematical equivalent of roasting a turkey for Thanksgiving.

Anyway, coming back to our problem, the grouping allows us to write

`∛1,728 = ∛(2*2*2*2*2*2*3*3*3) = ∛(2³*2³*3³) = 2*2*3 = 12`.

If we go higher with the order of the radical, the same rule applies. When calculating the fourth root, we group the primes into quadruples. Like if you need the 4th root of `81`, you first observe that

`81 = 3 * 3 * 3 * 3`,

so we have four `3`'s. This means that the 4th root of `81` is equal to `3`. And if we need the nth root, we take groups of `n` elements. And, if anything is left after the factorization, we just find with some external tool like our root calculator.

Alright, after all this time reading through the theory, it's high time we look at a real-life example and see the root calculator in action, don't you think?

## Example: using the root calculator

Congratulations, it's a boy! Now that you've become a parent, you decide to start early and save some money for when he goes to college. You choose to take a good slice of your savings and leave it in the bank for the next eighteen years so that the amount grows together with your kid.

Suppose that you've managed to put away a solid \$8,000. Unfortunately, somehow you forgot the interest rate on the investment, but what's done is done. The amount at the end will be as much of a surprise to you as it is to your son.

Time passes, years go by, and finally, it's time to gift your kid the money that you saved. You call the bank, and it turns out that there's `\$12,477.27` in the account. Not too bad, is it? It seems like you'll be able to make your son's dreams come true.

But, just for yourself, just out of sheer curiosity, can we calculate the interest rate from the numbers we have?

Sure we can, and the root calculator will help us!

Assume that the interest was added to the account at the end of each year and that the money was not taxed at all (yeah, we know we're going a bit far-fetched right there). Then the amount we get in the end is described by the formula

`end_amount = start_amount * (1 + interest_rate)¹⁸`,

where the `18`th power comes from the eighteen years that the money spent in the bank. In our case, this translates to

`\$12,477.27 = \$8,000 * (1 + interest_rate)¹⁸`.

If we divide both sides by `8,000`, we'll get that

`\$12,477.27 / \$8,000 = (1 + interest_rate)¹⁸`,

`1.5597 = (1 + interest_rate)¹⁸`.

So if we have the `18`th power on the right, we need to find the `18`th radical of the number on the left. Now, this is something slightly more complicated than the square root of 3, isn't it?

We turn to our root calculator. In there, we have two numbers: `a` and `n`. When we look at the symbolic picture in there, we see that `n` is the order of the root, so we input `n = 18`. In turn, `a` is the number under the radical, so we take `a = 1.5597`. This makes the root calculator spit out the answer to be

`1 + interest_rate = 1.025`.

If we translate the decimal into percentages, we obtain

`interest_rate = 0.025 = 2.5%`.

It seems fairly small, but oh, how it grew in eighteen years!

Alright, curiosity satisfied, time to go back to the birthday cake. Let's just hope that your son will make good use of the money and keep to his studies.

Maciej Kowalski, PhD candidate