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 ex+sin(x). Well, we know what the graph of ex looks like:

Graph of y=e^x

and we know that the graph of sin(x) exists always between +1 and -1. So we can make a pretty good guess that for negative x, where ex is very small (less than 1), the graph will look something like the graph for sin(x):

Graph of sin(x) for x<0

But what about for positive x, where ex is now larger than sin(x), and is starting to grow faster? We might naïvely assume that ex+sin(x) continues to look like “a wavier version” of ex as it does for negative x. Well, let’s look at where these “waves” might be by looking at the derivative:

ddx(ex+sin(x))=ex+cos(x)

When is this zero?

ex+cos(x)=0ex=cos(x)

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

But what about higher-order waves?

Well, now that we’ve got this far we might spot that the further derivatives of ex+sin(x) don’t get much more exciting:

ddx(ex+sin(x))=ex+cos(x)

d2dx2(ex+sin(x))=exsin(x)

d3dx3(ex+sin(x))=excos(x)

And, since each of sin(x), cos(x), sin(x), and cos(x) are no larger than 1, we can see that these derivatives will always be positive for positive x, and so ex+sin(x) won’t have any stationary points, points of inflection, or any turns of any order for x>0. Great!

But what else do we know which might help us sketch it? Well, we know that because sin(x) is bounded by -1 and 1, ex+sin(x) must exist within the envelope of xx1 and ex+1, which look like this:

Graphs of e^x - 1, e^x + 1

They grow very fast after x=0, right? It hardly looks surprising that ex+sin(x) 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 /sin(x) oscillates between its bounds of +1 and -1 regularly and infinitely often, ex+sin(x) should oscillate between its bounds of ex1 and ex+1 also regularly and infinitely often. This is obvious for negative x, but it’s still true for positive x. ex+sin(x) 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.

Graph of e^x+sin(x) for x>0

It’s hard to see, given how fast everything grows, but it does in fact oscillate between its bounds as regularly as sin(x) 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 x, one only of positive x and with the aspect changed to demonstrate the oscillation as much as possible:

Graph of e^x+sin(x)

Graph of e^x+sin(x), very zoomed out