08.06.06
Posted in Mathematics at 11:56 pm by Haris
I’m at Knoxville, TN for Project NExT and we just finished our first day. So far it has been a blast. I’ve gotten to meet a number of recent PhD’s and exchange a lot of information on life after the PhD.
The day started rather late, at 1:30pm, with Aparna Higgins introducing herself and the rest of the Project NExT team, Joe Gallian, Judith Covington and Gavin LaRose. These are all people with unbelievable energy and passion for teaching, and they are being assisted by a group of very gifted teachers.
Read the rest of this entry »
Permalink
06.22.06
Posted in TextMate, LaTeX at 8:07 pm by Haris
This is just a quick entry to reference to clear the problems with the syncing between TextMate and Texniscope on the Intel Macs, that were discussed in the comments to this post. You will need:
- The Rosetta version of Texniscope, i.e. the non-native one, that can be found here.
- An updated version of the LaTeX bundle for TextMate. This contains a fix for the “Find in TeXniscope” command, whose main difference from the old one is that the line:
FILE=`basename "$TM_LATEX_MASTER"`
has been replaced by the line:
FILE="$TM_LATEX_MASTER"
- Well, pdfsync I guess.
With this setup, TeXing and syncing back and forth between TeXniscope and TextMate should be a breeze.
Thanks to mdadm for all his help and testing with this. Both of these fixes are really his.
Later
Permalink
06.04.06
Posted in Mathematics at 4:38 pm by Haris
I haven’t been writing much here because I am hard at work to finish my thesis, so I only write about things that come up while I do that. In particular, here is a picture that I particularly like and that is quite relevant to my thesis, believe it or not. Can you guess what it is?
Click for a bigger version.

Btw, it was all done in Ruby.
Later
Permalink
05.30.06
Posted in Mathematics, ruby/rails at 1:11 pm by Haris
This post has gotten a bit longer than expected, so a quick summary is in order here: If you run Ruby 1.8.2 or earlier, be very careful about using rational.rb and mathn.rb. The algorithms in there for computing the gcd of numbers, necessary in almost every operation, are from kind of bad to utterly horrible, and in particular in one of my projects 30% of the program time was spent in computing gcds.
Ok, and now for our feature presentation:
Read the rest of this entry »
Permalink
05.15.06
Posted in Mathematics at 3:27 am by Haris
We all learn at some point in time how to approximate real roots of functions via Newton’s method. To refresh your memory, Newton’s method is a wonderful simple iterative process that, given a differentiable function, produces a sequence of numbers that, if it converges to some number, then that number is guaranteed to be a root. In fact, there is a very straightforward geometric interpretation of the method, which can be summarized in the sentence:
Follow the tangent line to the curve at your current x0, and see where it meets the x axis. Then use this intercept as the next x0.
Drawing a picture will convince you immediately. But what about complex functions and complex roots? Will Newton’s method work then? It would largely depend on the point you start. For instance, to find roots to
, using Newton’s method, if we start with a real value we will remain within the real numbers, and thus will never reach the two imaginary roots. Imagine even more complicated functions.
Ok, so the general problem might not be too easy, but what about the special case of polynomials? Surely there should be an easy way for polynomials!
There’s some obvious things you can do. For instance, you can compute the greatest common divisor of your polynomial and its derivative, and if this divisor is not a constant, then its roots are multiple roots of your polynomials. Since this g.c.d has smaller degree, this can make our live easier, as we can apply whatever method we have to the two factors that we get this way.
Ok, that wasn’t very interesting, right? Chances are that all the roots of the polynomial are distinct. I just found out that there is a wonderful method, called the Durand-Kerner method, which, when applied to a polynomial with distinct roots, gives us all the roots at the same time, pretty fast and with great precision. The idea is to start with a random set of numbers as our initial guesses for the roots, and keep improving them all at the same time via a very simple iterative process.
I haven’t seen the theory behind this method, but I implemented it and it works great! It will not work for a polynomial of degree less than 2 though, so you’ll have to find some other way to compute the roots of those polynomials
.
Permalink