Hacker News new | ask | show | jobs
by robomartin 1705 days ago
Imagine you are trying to explain this to a 15 year old.

If math is going to make sense to kids we can't resort to explanations that sound like "and then a miracle occurs".

BTW, I am not being critical of your answer. What I am saying is that there are these corners in seemingly simple math that have me scratching my head when it comes to explaining the concepts to a kid in a manner that makes sense and isn't circular. I have yet to find good answers to these questions.

Kid: What does the 10th. root of n mean?

Dad: It's the number, let's call it x, that, when raise to the 10th power is equal to n

Kid: So: n = x * x * x * x * x * x * x * x * x * x?

Dad: Yes! You got it!

Kid: How do you calculate it?

Dad: Well...

Kid: What if it is the 10.1 root of n?

Dad: Well, that's a little different...

Kid: How?

Dad: It's the number than when raised to the p-1 power times the base raised to the fractional portion of the power is equal to n

Kid: What's the fractional portion?

Dad: For the case of p = 10.1, it's 0.1

Kid: x * x * x * x * x * x * x * x * x * x^(p - int(p)) then?

Dad: Yeah.

Kid: How do I calculate x to the 0.1 power?

Dad: Well, you could use your calculator...(now starting to sweat)

Kid: How does the calculator do the math. You know, like when the math teacher says "Show your work"

Dad: Well, you could use logarithms...

Kid: What are logarithms?

Dad: A better method could be to use Newton's method. Here:

https://en.wikipedia.org/wiki/Newton%27s_method

Kid: It says: "start with an initial guess which is reasonably close to the true root, then to approximate the function by its tangent line using calculus, and finally to compute the x-intercept of this tangent line by elementary algebra"

Dad: Yes...

Kid: I don't know calculus. Is that the only way? I just wanted to understand how to calculate the 10th root of a number?

Dad: OK, let's try this. I just threw it together:

    # Calculate the exp root of n using a binary search
    #
    def root_binary_search(n, exp):
        # Return b, which is the exp root of n
        # b**exp should be equal to n
        #
        min = 0
        
        # For exponents < 1 the max needs to be sufficiently large
        max = n
        if exp < 1:
            while max**exp < n:
                max *= 2

        max_error = 0.00001

        while True:
            b = (max + min) / 2
            b_exp = b**exp
            error = abs(n - b_exp)
            # print(f"min: {min:15.4f}   max: {max:15.4f}   b: {b:15.4f}   b_exp: {b_exp:15.4f}   n: {n:15.4f}   error: {error:5.8f}")
            
            if error <= max_error:
                return b
            else:
                if b_exp > n:
                    max = b
                else:
                    min = b


    # Tests
    print(root_binary_search(4, 2), f"  result should be: {4**(1/2)}")
    print(root_binary_search(16, 2), f"  result should be: {16**(1/2)}")
    print(root_binary_search(5, 0.1), f"  result should be: {5**(1/0.1)}")
    print(root_binary_search(2, 10), f"  result should be: {2**(1/10)}")
    print(root_binary_search(4, 0.25), f"  result should be: {4**(1/0.25)}")

Kid: So...you are telling me to guess?

Dad: Yeah...? (looking embarrassed)

Kid: And to accept an error? 4-squared is 256, not 255.998046875?

Dad: Well, you have to understand that with a binary search...

Kid: And, did you see what happens if I run this case?

    print(root_binary_search(4, 1), f"  result should be: {4**1}")
Kid: Dad?

Dad: I have to get back to work. Why don't you ask your math teacher tomorrow?

1 comments

I think you missed (or at least aren't building off of) the point of my comment.

I'm not questioning the pedagogy in the original comment, just the specific math. x^(1/10) takes a value of dimension [length^10] to a value of dimension [length].

Interestingly, I think you could take this in a few aesthetic directions. From a pure math perspective, this is where you can start talking about set theory, cardinality, etc. Irrational numbers are infinite sequences of digits we can only approximate. From a computer science perspective, you can talk about Newton's method, and also make the argument than an algorithm which converges to a number is a quite meaningful way to describe that number. Some would also add a caveat of 'efficiently' converging. And combining the two perspectives together, you can discuss that the set of computable numbers are of a lower cardinality than the set of reals -- aka 0% of real numbers are computable. You could also look at things from a geometrical perspective, and show how roots higher than square roots are tied to higher dimensions are are nonconstructible in the plane (this might be very hard to show!).

I understand what you are saying, believe me. I am trying to keep it simple because the objective is for the child to walk away with a useful non-scary answer that gives them a sense of proportion with which they can approach thinking about these things.

Anyone who has tried to teach a child math is familiar with just how hard it can to have them understand seemingly simple concepts. Simple example unrelated to powers/logs/roots. It took me about half an hour to explain how you can shift a parabola right and left by simply adding or subtracting a constant from x in the simplest form y = x^2. The fact that it moves in a direction opposite the sign caused even more confusion. It took telling the story in five different ways before the "aha!" moment happened.

The relationship between exponentiation and logarithms is another one that gets fun once things are not nice and even. Exponentiation is sequential multiplication and logs sequential division. Sounds good, until you can't multiply or divide by the base any more.

I find it interesting that in all of my searching I have not found a simple approach to explaining these things to children so they can build a tangible sense of what's in front of them.

That said, if the kid understands coding, yes, you can use programs to have them explore how things might work, create solutions, understand errors, estimation, etc. More the reasons to perhaps teach coding and math in parallel and to the same level of importance in schools.

>I understand what you are saying, believe me.

Do you? Almost nothing you've said has any relevance to my original comment.

Yes, I do. You can't approach kids with the kind of explanation you are proposing without their eyes glazing over. My kids are very comfortable with STEM and you still have to be careful. You cannot assume this to be the case with the general school population.
No, you still don't understand, because I'm not proposing an explanation!

I even clarified: "I'm not questioning the pedagogy in the original comment, just the specific math."

And yet, if you go back and look at this thread, what I am looking for is, in fact, an explanation that will work well for children. I thought I was explicit enough. I apologize if I was not.

Quote:

"I've spent the last couple of days working on cleaning-up an explanation of these things that makes sense without using a miracle to get to the answer. One of the problems is that there are natural explanations for things like square and cube (area and volume), but, what do powers of 2.1 and 3.25 mean? It is interesting how things completely break down. I don't think I have found a single mathematics text that bridges this gap.

If anyone has a sensible explanation of this I'd love to hear it!"

In other words, I have no use for anything else as it quickly becomes an irrelevant time sink given the stated goal: Trying to explain this to children.

If you can translate what you wrote into something that can be taught to an average teenager (meaning, not a mathematically gifted or advanced student), you might just have the answer.

So far the only explanation I have found for how to solve these kinds of problems is successive approximation by guessing the answer. One level up from there is to use various algorithms to do the guessing, either on paper or through a computational solution (which requires a reasonable level of comfort writing code or using something like Excel).

I do want to thank you for taking the time to contribute to the conversation. Be well.