Studiolino

2009-01-13

An oscillator

This formula describes an simple oscillator and serves as a vehicle for expanding my knowledge about Sage:
The first step is to make it a bit more intresting. I add two oscillators and choose some arbitrary constants:
Now I know the position of the oscillating particle, then I calculate the first derivative to get the particle's velocity:
The next logical step is to do a graph of the functions:

The green lines indicate the two parts of the oscillator; the red line is the compound function; and the blue is the velocity.

The last step is to make a graph of position versus velocity and that graph looks really neat:

The change of color indicates the pasage of time. The sequence starts as red, and turn into yellow; green; blue and purple.

The whole thing is pretty simple to do even though a few Python constructs are needed.

Labels: , ,

2008-12-23

Sage a beginning

I have made some rather basic calculus experiments in the online version of Sage, the open source mathematical system. It works really well, the Notebook interface is easy to use, and the mathematical typesetting is beautiful. I think a have found a new tool, as there is no need for a local installation, a browser is all that's needed. It is also a way to get introduced to Python programming.

Labels: , ,