# The Spooky Function Horror Show

Be prepared, for you are about to see some of the scariest functions this Halloween

Now behold, a function that can be graphed as two lines, with nothing inbetween

What sorcery is this, you might ask!

Well defining such a function is a rather simple task

Set the value at the irrationals to be zero, so none

And at the rationals one

The irrationals are dense, so there will be a line at y equals zero

But so are the rationals, and they form a line above straight as an arrow

More than a scary graph, this function has

Its nowhere continuous, no where smooth, the total opposite of jazz

Indeed, for any delta you choose, no matter how small

You shall see that the definition of continuity will fall

Choose a small enough epsilon, and you shall see

Its neighborhood must hold both zero and one, so Q.E.D

But this is not the only function we have here today

Behold this one, continuous in its on unique way

On the irrationals, it’s continuous, on the rationals not

‘How is it possible?’, you may have thought

On the irrationals it is zero, the hard part comes later

As for each rationals its value is the lowest possible denominator

Say a rational can be written in the most reduced form as a/c

Then 1/c, shall the functions value at that point be

For 0.4, we get a fifth for 0.56, one over twenty five

As the number gets more complicated, the value takes a dive

To end this show, here is the engineer’s nightmare

A continuous function, that is differentiable nowhere

“All continuous functions have a derivative” some people assumed

But then came Weierstrass and made the argument doomed

Let b be a positive odd integer greater than five

For a small positive a, the function will come alive

Just assume that a times b, minus one

Is greater than three halves pi, we are almost done

Take the series of n from zero to infinity

Of a to the n, times the cosine of the following trinity:

b to the n, times x, times pi

And behold a function with the power to petrify

### 2 thoughts on “The Spooky Function Horror Show”

1. Another engineer’s nightmore: f(x) = e^(-1/x^2) if x!=0, and f(0) = 0. Infinitely differentiable, with the simple power series expansion 0 + 0*x + 0*x^2 + 0*x^3 ….so the power series converges everywhere, but not to f(x) at any x except 0.