Skip to content

fding/math-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

math-tools

###Complex Functions### This folder contains three scripts, complexanalysis.py, complexfunctions.py, and complexgrapher.py. I wrote these scripts after being inspired by a Complex Analysis course taught at Andover (Math 630).

complexanalysis.py has some code for computing path integrals, residues, Laurent coefficients, etc. It is meant more as a demonstration rather than an actual computational library.

complexfunctions.py has some code defining several complex functions, like the gamma function, the Riemann zeta function, the Weierstrass Elliptic function, and more. Once again, no claims are made about computational efficiency; it is for demonstrations too.

complexgrapher.py has two main functions for plotting complex functions, plot_function and square_plot. plot_function computes the values of functions on a specified square grid, and colors the points on the grid according to the function output: the modulus is indicated by shade (larger modulus correspond to brighter colors), and the argument is indicated by color (the real axis is red, numbers with argument of 120 degrees are green, and those with 240 degrees are blue). square_plot, on the other hand, computes the images of horizontal and vertical lines under the given function. These graphs are based off the ideas mentioned in Visual Complex Analysis by Tristan Needham.

Examples of graphs:

#####Sine#####

Note the real period of 2pi.

#####Exponential#####

Note the imaginary period of 2pi*i

#####Logarithm#####

Note the branch cut along the real axis.

#####Gamma#####

Note the singularities at the non-positive integers. These singularities are of order 1, since the colors wrap around these singularities only once.

#####Elliptic Theta#####

Note the real period. Also, although the theta function is not periodic along the imaginary axis, all the zeros line up in the imaginary direction.

#####sn#####

Note the period along the real axis and that along the imaginary axis. Also, notice that each "cell" has a singularity and a zero -- as predicted by Liouville's theorem.

#####log square plot#####

Notice all the sheets, corresponding to the Riemann surface of the log function. This is once again related to the branch cut along the negative real axis.

#####sn square plot#####

Notice once again the double-periods: the real lines and imaginary lines get mapped to closed loops -- except those lines that get mapped to infinity.

###Lie algebras###

A C++ library for working with finite dimensional associative algebras with a Lie bracket defined between basis elements (for instance, universal enveloping algebras). A simple program that exposes the functionality of this library is also provided, along with definition files for U(sl_2) and simple infinitesimal Cherednik algebras. Depending on future usage, I may use swig to allow a Python interface to the library and make usage of the code more user-friendly.

About

Various math programs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published