December 30, 2008

Taking a Break From Number Theory

I came up with a formula that has to do with extending the arcsine function beyond limited input. My interest was sparked when I noticed that there is a simple pattern among the commonly known values for sine:

sin(π/6) = sqrt(1)/2 = 1/2
sin(π/4) = sqrt(2)/2
sin(π/3) = sqrt(3)/2
sin(π/2) = sqrt(4)/2 = 1

As the angles increase, the value for sin(Θ) increases as sqrt(n)/2, for n = 1,2,3,4. I then asked: For what angle will the sine of the angle be sqrt(5)/2?

Clearly, the angle must be imaginary: the range of sine for real input is [-1,1]. Here's how I went about solving it. (The solution I give here will give the angle for any given n, not just 5- though that is how I started out.)

I started with the identity

sin(Θ) = [e^(iΘ) - e^(-iΘ)]/2i

(If you are not familiar with this, it is easily derived with the knowledge that
e^iΘ = cosΘ + isinΘ- I'll leave the proof of sin(Θ) = [e^(iΘ) - e^(-iΘ)]/2i up to you.)

Continuing,

i*Sqrt(n) = e^iΘ - e^-iΘ, since sin(Θ) = Sqrt(n)/2

e^2iΘ - i*Sqrt(n)*e^iΘ -1 = 0

This is quadratic in e^iΘ, so

e^iΘ = {i*Sqrt(n) +- Sqrt(4-n)}/2

Θ = -i*log({iSqrt(n)+/- Sqrt(4-n)}/2)

This says that

arcsin[Sqrt(n)/2] = -i*log({iSqrt(n)+/- Sqrt(4-n)}/2)

Or, substituting n = 4k^2,

arcsin[k] = -i*log(ik+-Sqrt(1-k^2))

This is essentially an analytic continuation of the arcsin function, whose domain is usually only [-1,1]; this continuation defines arcsin(k) for any and all k, including complex values. You may notice that for values of k on [-1,1], the Sqrt(1-k^2) part is real, and within the log we are left with a familiar quantity. For example, take k = 1/2. Then

arcsin[1/2] = -i*log(i/2 + Sqrt(3)/4)

Since i/2 + Sqrt(3)/4 = e^(iπ/6),

arcsin[1/2] = -i*iπ/6

arcsin[1/2] = π/6, which is true.

For my original example of k = Sqrt(5)/2, the angle Θ is -i*log(iφ), where φ is phi, the golden ratio, so

sin(-ilogiφ) = sqrt(5)/2, an elegant result.

Beyond just arcsin, I also created analytic continuations for arccos and arctan, both derived in almost the exactly same manner.

arccos[k] = -i*log(k +- Sqrt(k^2-1)), derived from cos Θ = (e^iΘ + e^-iΘ)/2

arctan[k] = -i/2*log{(1+ik)/(1-ik)}, derived from tan Θ = (e^iΘ-e^-iΘ)/(ie^iΘ+ie^-iΘ)

Happy New Year!

December 9, 2008

Pell's Equation Rediscovered

One interesting equation I decided to study (for a reason I can't remember) was 2x^2+1=y^2, for positive integers x and y. I came across some very interesting conclusions in the relationships between x and y and patterns as the solutions grow larger and larger.

First, however, I would like to note that this equation has already been studied, quite extensively, by quite a few mathemetitions. It is known as Pell's Equation, and in a more general form is written as y^2-Nx^2 = 1. Traditionally it has been studied by looking at the smallest solution for x and y given a specific N. I approached it in a different manner, and found some relationships they seem to have missed. (I also eventually generalized the problem to Nx^2+1 = y^2 after getting bored with just N=2. I also tried out Nx^2 + m = y^2, given the flexibility that C++ allows.)

There were a few provable relationships. First, I noticed that as the solutions for x and y got larger and larger, there seemed to be some constant ratio between the two. (I considered y/x.) By approximation on my calculator, It seemed to approach the square root of 2. Fascinated, I realized that one could solve the given equation for y, yielding y = Sqrt[2x^2+1]. Then, all I had to do was take the limit as x goes to infinity of y/x, or

Lim[x-->infinity] (Sqrt[2x^2+1]/x)

Which is easily simplified to the square root of two.

Another strange set of relationships I noticed was between consecutive solutions. For example, consider one solution to the equation in (x,y); call it (a,b). Then, the solution immeadietly following that one is (c,d). As it turns out, a+b = d-c. I found this a striking result, and still I can't think of a way to relate a given solution to the solutions before and after it.

Determined to find something useful, I pressed on and came across some extremely far-fetched patterns I never would have suspected. It starts out simple. For each solution (x,y), x+y can be written as the sum of two square numbers. (I got excited, expecting some connection to Richey numbers; however, while some of these numbers can in fact be written as the sum of two squares in multiple ways, I haven't yet established a notable connection.) Then, those numbers began appearing all over the page- in old solutions! The relationship is quite difficult to explain, (in fact there are two), so I'll write out the solutions I looked at to formulate it.

(2,3) => Sum = 5 = 1^2 + 2^2
(12,17) => Sum = 29 = 2^2 + 5^2
(70,99) => Sum = 169 = 5^2 + 12^2
(408,577) => Sum = 985 = 12^2 + 29^2
(2378,3363) => Sum = 5741 = 29^2 + 70^2
(13860,19601) => Sum = 33461 = 70^2 + 169^2
...

I've bolded the important numbers, and it isn't difficult to see where the squared terms that compose the sum come from. The first, easier relationship is this: one of those terms comes from the sum of the solution before it. (I've written it in a way where you can see this: the 2 comes down from the first solution, the 5 comes down from the second solution, and so on.) However, you may notice where the "new" numbers are coming from. An easy way to put it is that the sum is re-written as u^2+v^2 in the (2n)th solution, where u is the x of the nth solution and v is the sum x+y of the nth solution. Also, the intermediate step (the 2n-1st solution) takes u from the sum of the nth solution and v from the x term of the n+1st solution. Though it may be difficult to sort out, the relationship is there.

There is more! Another, yet odder pattern I noticed is one concerning only the x part of the solutions. I saw that there seemed to be some common ratio of the x of the nth solution and the x of the n-1st solution, that Lim[x-->](Xn/Xn-1) == Some quantifiable value. Using calculators and some intuition, I found that this ratio (for N=2) is 3+2*Sqrt[2]. Furthermore, some ratio appears in the sequence of x solutions for all equations with a given N- for N=3 the ratio was Sqrt[3]+2; for N=5 it was 8*Sqrt[5], and so on. (N cannot equal a square number, because when it does there are no solutions to Nx^2+1 = y^2. I have not yet proven this result, but someone has (according to Mathworld) and I do think it is interesting.) Finally, these ratios do have somthing of a common pattern. Each one, given a particular N, contains the square root of N in it; it appears in the form a + b*Sqrt[N] for integral a and b. (Also, as far as I've noticed, a and b happen to be positive.)

Another part, which I haven't looked at in depth just yet, is something mentioned on wolfram's mathworld site. It says there that the solutions to the equation can in some way be quantified by continued fractions. I don't know much about continued fractions, and I plan on looking into it to see if anything can help me out.

(Check out http://mathworld.wolfram.com/PellEquation.html.)
Richey Numbers: An Overview

After reviewing this problem further for a while, I came to some new conclusions.

First, (I stole this one from a book by Paul J. Nahin), there is an alternate way to generate numbers of the form a^2+b^2 = c^2+d^2. His method uses the product of the sum of two squares:

(u^2+v^2)(x^2+y^2)

The theorem says that a product of this form (for integral values u, v, x and y) will always be equal to a number that can be expressed in two distinct ways as the sum of two squares. This can be verified by some algebra and the solutions can be found in terms of u, v, x and y.

This, along with a new ability I have maintained to use C++ code to find solutions to some of these number theory problems, led me to write a program that found solutions, and it works quite well. This leads me to another, quicker conclusion. The smallest Richey number that is not a multiple of 5 is 221, not 533 as I had said earlier. (221 = 5^2+14^2 = 10^2 + 11^2)

Finally, there is another element of these numbers that I have not yet studied. There appear some relationships between the numbers which compose my numbers. One example, which I noted last time, was the relationship that a+b-c-d was always an even number. There appear some more of these strange relationships, but I haven't yet determined anything with proof.