Archive of entries posted by

## Decomposing Functions into Even and Odd Parts

When it comes to functions, the concepts even and odd have always been important to me as a teacher.  Connecting the algebraic and geometric representations of mathematical ideas is a primary goal in my classroom, and these concepts provide great opportunities to do that.

Algebraically, a function is even if $f(-x) = f(x)$, and this condition manifests itself geometrically as symmetry with respect to the y-axis in the graph of $y = f(x)$.  A function is odd if $f(-x) = -f(x)$, and geometrically this means that the graph of $y = f(x)$ is symmteric with respect to the origin.  Knowing a function is even or odd provides a wealth of information to work with, and can make solving some problems trivially easy.

But it wasn’t until recently that I learned the following amazing fact:  functions can essentially be uniquely decomposed into even and odd parts!

Claim:  Let $f(x)$ be a non-zero, real-valued function whose domain is symmetric about the origin; that is, $f(x)$ exists implies $f(-x)$ exists.  Then $f(x)$ can be uniquely expressed as the sum of an even function and an odd function.

Proof:  For any function $f(x) \neq 0$, define the functions $a(x)$ and $b(x)$ in the following way:

$a(x) = \frac{f(x)+f(-x)}{2}$   and   $b(x) = \frac{f(x)-f(-x)}{2}$

First, we see that

$a(x) + b(x) = \frac{f(x)+f(-x)}{2} + \frac{f(x)-f(-x)}{2} = \frac{2f(x)}{2} = f(x)$.

Next, since $a(-x) = \frac{f(-x)+f(x)}{2} = a(x)$, we have that $a(x)$ is even.

Similarly, since $b(-x) = \frac{f(-x)-f(x)}{2} = -\frac{(f(x)-f(-x))}{2} = -b(x)$, we have that $b(x)$ is odd.  Thus, $f(x)$ can be expressed as the sum of an even function and an odd function.

Now, suppose $f(x)$ could written as the sum of an even and an odd function in two ways:

$f(x) = a_{1}(x) + b_{1}(x) = a_{2}(x) + b_{2}(x)$

A little algebra gives us

$a_{1}(x) - a_{2}(x) = b_{2}(x) - b_{1}(x)$

Since the sum of even functions is even and the sum of odd functions is odd, we have an even function, $a_{1}(x) - a_{2}(x)$, equal to an odd function, $b_{2}(x) - b_{1}(x)$.  The only function that is both even and odd is the zero function (another fun proof!), therefore

$a_{1}(x) - a_{2}(x) = b_{2}(x) - b_{1}(x) = 0$

and so

$a_{1}(x) = a_{2}(x)$

$b_{1}(x) = b_{2}(x)$

Thus, this representation of $f(x)$ is unique.  (Note: since 0 is both even and odd, we can consider $f(x) = f(x) + 0$ to be the unique decomposition in case $f(x)$ is itself even or odd.)

I was fortunate to encounter this unfamiliar fact at a time when hyperbolic trig functions were on my mind, which made it obvious to me where the hyperbolic sine and cosine functions come from:  they are the even and odd parts of $e^x$!

$e^x = \frac{e^{x} - e^{-x}}{2} + \frac{e^{x} + e^{-x}}{2} = sinh(x) + cosh(x)$

I also used this fact in a fun but inefficient proof that the derivative of an even function is an odd function.

Are there are other cool consequences of this unique decomposition of functions?

## Math Art: Building Sines

This is Building Sines, one of the pieces I will have on display at the 2013 Bridges Math and Art conference in Enschede, the Netherlands.

Building Sines, by Patrick Honner

Inspired by the mathematicians, computer scientists, and artists of the Bridges organization, I have started writing computer programs to alter and transform my photography in mathematical ways.  Here, a custom Python script was used to smoothly compress the original image along a vertical sine wave, creating an interesting visual effect.

You can see the other pieces I will have on display here, and you can peruse the entire Bridges 2013 gallery here.  I will also be presenting a short paper at the conference about my work and its potential as a project-based learning activity for teachers and students.

## Infinite Prime Gaps

The mathematics world is abuzz with news that someone may have proved a weak version of the Twin Prime conjecture.

A pair of numbers are called twin primes if the two numbers are both prime and they differ by 2.  Examples of twin primes include 11 and 13, 29 and 31, and 137 and 139.  Notice that for all prime numbers other than 2, twin primes are as close as two prime numbers could possibly be:  the number between the twin primes will always be even, and thus not prime.

The Twin Prime conjecture simply postulates that there are infinitely many pairs of twin primes.  Although it is simple to state, the Twin Prime conjecture has been hard to prove:  it has been an open question in Number Theory for hundreds of years.  But a breakthrough has been made.  Someone apparently has proved that there are infinitely many pairs of primes that differ by at most 70 million!

Now, being 70 million apart isn’t the same as being 2 apart, so at first glance this result may not seem significant or relevant.  But the difference between 70 million and 2 is nothing compared to the difference bewteen 70 million and infinity!  Essentially, this result says that no matter how far out you go on the number line, you can always find two primes that are relatively close to each other, where relatively close here means “no more than 70 million apart”.

And while being 70 million away may not seem close as far as prime numbers go, consider the following amazing fact:  given any number N, we can find a string of N consecutive numbers that contains no primes at all!  That is, we can find “gaps” between the primes as large as imaginable:  70 million, 700 million, 7 trillion trillion, and beyond.  What’s more, it’s quite easy to prove this fact.

Consider $n! = n*(n-1)*(n-2)*...*3*2*1$.  Since n! is the product of all the integers from 1 to n, it is clear that every integer less than or equal to n divides n!.

Now, since n! is divisible by 2, we know (n! + 2) must also be divisible by 2.  Similarly, since n! is divisible by 3, then (n! + 3) must be divisble by 3, and so on.   Thus, we have the following sequence of n-1 consecutive numbers

$n! + 2, n! + 3, n! + 4, . . . , n! + (n-1), n! + n$

none of which are prime!  For example, if n = 5, the numbers 5! + 2, 5! + 3, 5! + 4, and 5! + 5 are

122, 123, 124, 125

which are are consecutive and not prime.

Using this technique, we can generate strings of consecutive non-primes of any length.  For example, if we let n = 70 million, we’ll get a string of 70 million – 1 consecutive non-primes.  Or if we let n = 1 googol ($10^{100}$), we’ll get a string of  $10^{100} - 1$ consecutive non-primes!

This technique shows if we go out very far on the number line we are sure to find huge gaps bewteen prime numbers.  But according to the new mathematical result, no matter how far out we go, we can always find primes that are relatively close to each other.

This is a major result, and an exciting day for mathematics!

## 5/12/13 — Happy Right Triangle Day!

Happy Right Triangle Day!  Today we celebrate a favorite geometric object:  the 5-12-13 right triangle.

Of course, the sides of this triangle satisfy the Pythagorean Theorem

$5^2 + 12^2 = 13^2$

but one reason I like this particular right triangle so much is the role it plays in another favorite triangle.  The 5-12-13 triangle fits together perfectly with the 9-12-15 right triangle

to make the 13-14-15 triangle!

The 13-14-15 triangle is special in its own right:  it is a Heronian triangle, a triangle with rational side lengths and rational area.  In fact, this triangle has  integer side lengths and integer area, making it especially interesting!

Happy Right Triangle Day!  Be sure to marvel at some perpendicularity today.

## When a Dollar is not a Dollar

There must be some way to capitalize on this through arbitrage, right?