sin x is also a wave, but it repeats every 2pi units.

Adding these gives a wavy wave (hard to describe, easy to replicate in Excel )

The only way I could think of to make it a JPG was to copy and paste it into paint and save it from there, so I'm unsure of how good the quality will be, but I've uploaded it into the image gallery.

The combined function would repeat itself every (lowest common multiple of 360 and 2pi) units, but as pi is transcendental that will never happen. So, it will be a wavy wave that looks almost exactly the same for whatever range of x values spanning 360 you choose, but it will actually always be slightly different.

]]>Is the function periodic?

]]>If n is even, say n = 2r, (2r)² = 4r² = 0 (mod 4). (Leaves remainder 0 when divided by 4.)

If n is odd, say n = 2r + 1, (2r + 1)² = 4(r² + r) + 1 = 1 (mod 4.)

So the sum of two squares, mod 4, is always equal to 0 = 0 + 0, 1 = 0 + 1 or 1 + 0, or 2 = 1 + 1; never 3. (Of course 4n - 1 = 3 (mod 4.))

In fact, for the square of an odd integer, we can write (2r + 1)² = 4r(r + 1) + 1.

Since one of r and r + 1 must be even, 4r(r + 1) is divisible by 8.

So the square of an odd integer leaves remainder 1 when divided by 8, which is sometimes useful.

However, there is a very simple proof that no primes of the form 4n-1 can be written as the sum of two squares.

4n-1 = a² + b²

4n = a² + b² + 1

n = (a² + b² + 1)/4

Since 4n-1 is an odd number, one of a and b is odd and the other is even.

When an even number is squared, the resultant is always a multiple of 4.

An odd number when squared is always of the form 2n+1.

Any number of the form 2n+2 would never be divisible by 4 when n is even! When n is odd, it is of the form(2n+1). When this is squared, we get

4n² +4n+1. i.e. 4(n² +n)+1. When 1 is added to this number, we get

4(n² +n)+2. This number is NOT divisible by 4.

Therefore,

a² + b² ≠ 4n-1

q.e.d

Random fact for the day: All primes of the form 4n+1 can be written as a²+b².

None of the primes of the form 4n-1 can be written in this way. (a, b, n ∈Z)

If you can prove/disprove this, you will be very rich.

Fermat proved this at the beginning of the 17th century! In fact, he proved that all primes of the form 4n+1 can be written as the sum of two squares in exactly one way. The proof is not trivial. However, there is a very simple proof that no primes of the form 4n-1 can be written as the sum of two squares.

]]>Does anyone know how to plot a star shaped graph?

]]>