# Graph sketching

Oh god, I'm going to talk about maths for a bit. Ignore me. You might find this interesting if you know what a derivative is and what it means.

This is a curiosity that my friend Anupam came up with. I'm not claiming any credit for noticing it but I thought I'd still share it with y'all.  It only requires very rudimentary calculus, but it produces a result which, the more I think about it, the less intuitive it seems.

Let's think about how to sketch the graph of . Well, we know what the graph of  looks like: and we know that the graph of  exists always between +1 and -1.  So we can make a pretty good guess that for negative , where  is very small (less than 1), the graph will look something like the graph for : But what about for positive , where  is now larger than  and is starting to grow faster?  We might naïvely assume that  continues to look like "a wavier version" of  as it does for negative .  Well, let's look at where these "waves" might be by looking at the derivative:

When is this zero?

But we know that  is at largest 1 and that  is always larger than 1 for positive , so this derivative will never be 0!  So we know that when sketching the rest of the graph for positive , it will be monotonically increasing with no obvious "waves".

Well, now that we've got this far we might spot that the further derivatives of  don't get much more exciting:

And, since each of , , ,  are no larger than 1, we can see that these derivatives will always be positive for positive , and so  won't have any stationary points, points of inflection, or any turns of any order for .  Great!

But what else do we know which might help us sketch it?  Well, we know that because  is bounded by -1 and 1,  must exist within the envelope of  and , which look like this: They grow very fast after , right?  It hardly looks surprising that  doesn't get a chance to wave around if it's bounded in that tiny space!  How does it fit within the gap, though?  Well, because  oscillates between its bounds of +1 and -1 regularly and infinitely often,  should oscillate between its bounds of  and  also regularly and infinitely often.  This is obvious for negative , but it's still true for positive .   will touch its bounds regularly and infinitely-many times.

So here is where I start to worry.

We've got a function which we've seen should oscillate regularly between two monotonically smooth bounds, touching them both infinitely many times; yet it itself is always increasing and never turns at any order.  I don't know about you, but these two facts just don't sit together with me.

But at least we can now draw it nicely. It's hard to see, given how fast everything grows, but it does in fact oscillate between its bounds as regularly as  does.

Pretty cool, huh?!

Here's a zoomed-out version of that graph so you can see it better.  One of the transition of negative to positive , one only of positive  and with the aspect changed to demonstrate the oscillation as much as possible:

1. send it to Daryl - - he's on facebook so friend him - he would be just fascinated!!

2. for intuition, i imagine two concentric circles and an ellipse sharing the same center and intersecting each circle twice as its radius oscillates between the inner and the outer circle's radius. because the circular bounds are themselves curved, the ellipse can vacillate between them without ever inverting its curvature from concave to convex.

3. This is actually really interesting and – surprisingly – easy enough to follow and appreciate for just us with just a lowly A-level understanding of maths.

4. Great post! More of these please ;)

5. That's a nice way to think about it, Niko! Though even the polar equation for the ellipse has some vanishing derivatives, doesn't it? What I found striking about this example was that not only does the function never decrease or change its curvature, ALL its infinite derivatives are strictly positive yet still vacillates! Also, good use of the word vacillate! ;)

6. brainstorming: the curvature need only oscillate between larger and smaller than the curvature of the bounds, not between positive and negative. so now, yes, we might expect higher derivatives to reflect this oscillation of the curvature. but derivatives are defined relative to the axes and curvature is axes-independent. that's why this intuition might be wrong. do you sense the answer just around the corner like i do?

7. brainstorming: the curvature need only oscillate between larger and smaller than the curvature of the bounds, not between positive and negative. so now, yes, we might expect higher derivatives to reflect this oscillation of the curvature. but derivatives are defined relative to the axes and curvature is axes-independen​t. that's why this intuition might be wrong. do you sense the answer just around the corner like i do?

8. Right on the head, Niko, great point! Seems like curvature is a horrible thing to define for curves in Euclidean space, it depends on a choice of parameterisation of the curve. But while curvature is axes-independent, it's still possible to find for a given pair of axes; for *functions* (ie, many-to-one) y=f(x) defined wrt the axes it can be found:k = y'' / (1+y'^2)^(3/2)(via wikipedia/mathworld). But your intuition of seeing how curvature can fluctuate where derivatives do not seems like the key. Perhaps to truly get to the bottom of this in a more general sense will require some serious calculus...

9. Right on the head, Niko, great point! Seems like curvature is a horrible thing to define for curves in Euclidean space, it depends on a choice of parameterisatio​n of the curve. But while curvature is axes-independen​t, it's still possible to find for a given pair of axes; for *functions* (ie, many-to-one) y=f(x) defined wrt the axes it can be found:k = y'' / (1+y'^2)^(3/2)(via wikipedia/mathw​orld). But your intuition of seeing how curvature can fluctuate where derivatives do not seems like the key. Perhaps to truly get to the bottom of this in a more general sense will require some serious calculus...

10. Thanks, both of you :)

11. Curvature does not depend on parameterization. It is the how far you turn the steering wheel if you drive along the curve at unit speed. The Gauss Bonnet theorem says if you drive round a smooth simple closed curve in the plane the total curvature (=integral of curvature round curve) is 2Pi: basically you have gone full circle. Curvature is a lovely thing.

12. Oh, my mistake! A temporary lapse in my ability to think >_< I looked up the definition of curvature and saw it defined in terms of a chosen parameterisation. But *of course* it's invariant of the choice! Thanks for setting the record straight! :!

13. I know little logic but find myself using non-standard analysis a la Robinson. It makes me want to learn a bit more about the "dark arts" (=logic)

14. Curvature does not depend on parameterizatio​n. It is the how far you turn the steering wheel if you drive along the curve at unit speed. The Gauss Bonnet theorem says if you drive round a smooth simple closed curve in the plane the total curvature (=integral of curvature round curve) is 2Pi: basically you have gone full circle. Curvature is a lovely thing.

15. Oh, my mistake! A temporary lapse in my ability to think >_< I looked up the definition of curvature and saw it defined in terms of a chosen parameterisatio​n. But *of course* it's invariant of the choice! Thanks for setting the record straight! :!

16. Perhaps its just me, with my inferior computer science degree :P, but first derivative for +ve x is never 0 because the curve doesn't have any turning points at least not with respect to x-axis, because of the exponential nature of exp(x) + sin(x). But instead oscillates with respect to y-axis. Which also checks out with dx/dy right? Am I being wrong?

17. Interesting to think about but y = e^x + sin xisn't easily writable in terms of y, I think, because it'd be a one-to-many assignment...And at least for negative x the graph is definitely oscillating wrt the x axis. When the exp starts to grow faster, though, I'm not sure what to think...