Feeds:
Posts
Comments

Archive for September, 2011

Hey everyone,

After spending some time experimenting with Mathematica, Maxima, and Sage, I’ve finally decided to use Sage as my primary computer algebra system (CAS)!  In short, computer algebra systems act like high-performance calculators, and their primary strength lies in the fact that they can manipulate mathematical expressions in symbolic form. Sage, in particular, has several benefits over Mathematca:

1) Sage is open source software, which means you can freely download, modify and distribute its source code. Mathematica, on the other hand, is proprietary software and a home license costs $300. If you want to use it for work, it’s a whopping $2500 for an individual license – and you can only install it on one machine. With Sage, it’s affordable, you don’t have to pay more for newer versions, and the fact that it’s open source means you can actively participate in the development community.

2) Sage uses Python. Python is a free programming language and it’s very easy to learn. If you already know Python, you won’t be bogged down learning a new language just to use the software.

3) Sage includes Maxima. Sage is actually made out of more than 90 different mathematical packages – one of which is Maxima – all integrated under a single interface with which you can communicate using only Python. For example, Maxima is written in Lisp, so you would have to learn some of it to become proficient with the program. However, if you use Sage, you can utilize Maxima even if you only know Python.

Sage, released in 2005 is relatively new compared to other CAS programs and still has a lot of raw edges. Known bugs and tasks that need to be completed are posted online and users are free to take on these challenges. I picked up a new, much, much, much needed book, the Sage Beginner’s Guide, which should give me a basic working knowledge of the program. I first tried installing Sage on my Linux machine about 3 years ago, and when I tried doing it then it took a lot of effort and a lot of command-line agony to get it to start working. Now I would say that the package has gone a long way, though it still doesn’t work on Windows. If you want to use it on Windows, you must install a Linux virtual machine using either VirtualBox or VMWare. Right now I have 3 cores and about 4 GB of RAM dedicated to a virtual machine set up on Fedora Linux – from there you can run Sage from your browser:

Sage runs on a Fedora Linux machine

Screenshot of the Sage Notebook Interface

Here are some examples of what Sage can do from the book – we plot 2 functions and place labels at their solutions. The following code:

The code defines the functions, finds the solutions, and plots the graph. Parameters can define labels, colors, etc.

Produces the following image:

Image produced from the preceding code

Also, the following code:

Code for plotting a Klein Bottle

Produces a 3D plot of a Klein Bottle:

A Klein Bottle

Sage can also display results in symbolic form:

Partial Fraction Decomposition

Here, Sage instantly calculates the above partial fraction decomposition. Anyone want to try it by hand?

I’m totally hooked. Sage, which is totally free, is extremely powerful – much more powerful than any expensive HP or TI calculator on the market. Right now Mathematica, Matlab, and Maple are more complete software packages that come with professional support, but they come at a cost. However, I think Sage can be the real Mathematica killer, similar to the way that R is currently eating into the market share of SAS – Sage, which is headed by professor William Stein of the University of Washington, is currently under active development by computer programmers and mathematicians all around the world! Check out the Sage website if you want to get involved. The era of extremely high-priced software can only last so long…

Read Full Post »

Hey everyone,

Due to time constraints and the fact that both of these races finished similarly, I decided to write a single post for both of them. After racing Gonzales, I felt strong and very confident – the week afterward, during my usual weekend ride with SCCC, I rode aggressively (probably to the ire of my packmates) and I realized that I could drop the group for long stretches at a time. However, by the time I came back to the 5:30 A.M. MPPPL ride I noticed that I had accumulated fatigue over the long, four-month buildup that I had initiated in March and started fading and getting dropped again, even after putting in serious efforts during my training. I felt that perhaps I had to rest, so I spent 2 weeks doing relatively little training and started to build up again after I came back from California. Unfortunately, that derailed plans for a serious aggressive effort at Chappell Hill, though I did make some good progress on my late-season training cycle. I told Philip that I planned on racing Chappell Hill so he let me borrow some deep-profile clinchers for the weekend:

My Cronus Ultimate, equipped with HED Jet 6 clinchers

The deep rims help with the wind, but the type of rim – clinchers, tend to be heavy for racing so I felt concerned that they might hinder me on the rolling terrain at Cotton Patch. I tried out the wheels the day before the race and they felt fantastic – I was able to ride away from my usual group and I easily held a 25mph pace over them over the course of 8 miles or so into a headwind until I slowed down and waited for them to catch up. I got a good amount of sleep before the day of the race since my field started at 11:00 – but that meant that I would have to ride in the scorching 100+ degree heat at midday. When I arrived at the course, one of my Cat 5 teammates, Said Assali told me that he imploded in his race and advised me to conserve as much energy as possible and to not do too much work, if any at all. I agreed with his opinion, since that tactic helped me finish well on last year’s course.

After the start we quickly picked up the pace as the fist leg of the race went downhill, easily reaching speeds of 42 mph+. However, I thought we would slow down as the race settled down but unfortunately that didn’t happen – the race was very fast from the get go and the peloton showed no mercy – I had no chance for any breathers, or points in time at which I could relax, eat, drink, or think of a strategy for my teammates. Attacks frequently flew off the front and each time the group chased them down so they couldn’t get away. After 1.5 hours of hard racing the group put in another acceleration right before the feed zone and I got dropped. I checked my average speed which was 24 mph (I averaged 21.2 mph at last year’s race) on rolling terrain – the fastest I had ever put in over that interval of time over that type of terrain – faster than I had at Gonzales. I decided to finish the race to put in more training, but unfortunately I veered off course and got lost and spent about 30 minutes trying to find my way back and I ended up last out of the finishers. I did find out that 23 of the riders quit the race which made me feel slightly better about sticking it out. I think overall, the aerodynamic profile of the rims compensated for their weight. Bill Krause finished well for Shama – getting 11th.

I continued to train on my usual schedule and I felt pretty good for Cotton Patch coming up the week after in Greenville. I drove there after work and I only managed about 5 hours of sleep since I had to start at 8:10 AM the next day.

Staging for the women's race - photo taken by Team PACC

I talked to Bill at the beginning and he forgot to bring his kit to the race so he had to borrow some clothing from someone else. Anyway, the pace felt pretty easy at the beginning of the race – we had a strong tailwind and we could push 27-30 mph without too much effort. However, when the course moved into the wind attacks started to pick up and the pace was tough just like it was at Chappell Hill. I kept telling myself to stick it out for at least 2 hours but my legs gave in after 1 hour and it was no good. My last point of contact with the pack happened to be at an intersection when the lead motorcycle turned the wrong way and took all but 6-8 riders with it. I was with those 6-8 men and they decided to launch a fierce attack to take advantage of the mishap. I wasn’t able to stay with their acceleration and by the time the pack caught up with me they were all pissed that someone had the nerve to attack like that. However – when you’re racing you have to take advantage of every opportunity you get – though winning in this situation would not be the prettiest way to win a race. By this point the peloton had broken up in pieces and I got 2 guys to work with me to start sweeping up lone riders along the way. After about 10 minutes we saw some bodies sprawled out on the road and realized that there had been a crash in the chaos. As we continued the race, we picked up riders one by one and formed a group of about 10, taking turns doing work into the heavy headwind and crosswind. We eventually caught the Cat 5 group and passed them up. I felt good because this was a sign that I was making progress – last year I struggled in a lot of the Cat 5 races but this time, I was able to easily pass a field of 50 men racing against each other while I was in a smaller paceline of just 8 men (two other racers dropped off by that point). However, the paceline I was in were putting in a brutal effort – with about 14 miles to go, my legs gave up and I dropped back but finished the race, 33rd/45th, which was better than Chappell Hill. Afterward I learned the riders that I had dropped decided to pace themselves back by drafting off the Cat 5 racers – which is illegal and can result in disqualification. I was somewhat angry but since none of us were in contention anyway I let it slide. I checked the average speed before I got dropped which was about 23.7 mph – close to that of Chappell Hill – and much faster than I was riding last year. I’m getting stronger but perhaps the long term endurance isn’t there yet. Bill finished well in 15th place and I’ll probably end up helping him at Fort Hood next weekend – the last race of the season!

Read Full Post »