Home | Python | IPython | * IPython: Math Processor 2: Installation 3: Getting Started 4: Equation Processing 5: Equation Solving 6: Normal Distribution 7: Differential Equations 8: Fourier Transforms 9: Tips & Tricks   Share This Page
IPython: Math Processor
A tool that manipulates mathematics as a word processor manipulates words

Equation Processing

(double-click any word to see its definition)

Equation Processing

On this page, we will automatically find all the forms of a multi-variable equation, given one of its forms. The equation is used to describes a population's increase over time. Here's the equation:

(1) $\displaystyle N = N_0 e^{rt}$

Where:

• $N$ = population at time $t$.
• $N_0$ = population at time zero.
• $e$ = base of natural logarithms.
• $r$ = growth rate per time period as a ratio. A 1% growth rate would be expressed as 1.01.
• $t$ = time in consistent units.

Here's a workbook that produces and displays all the equation's forms:

Putting aside the somewhat elaborate code required to format the result, notice how simple the basic logic is. Given a list of variables present in the target equation, we submit each of them to "solve()" to get an equation expressed in terms of that variable. In fact, this simple list comprehension:
[solve(b,v) for v in vl]


Produces this result:

$\begin{bmatrix}N_{0} e^{r t}, & N e^{- r t}, & \frac{\log{\left (\frac{N}{N_{0}} \right )}}{r}, & \frac{\log{\left(\frac{N}{N_{0}} \right )}}{t}\end{bmatrix}$

To navigate this article set, use the arrows and drop-down lists at the top and bottom of each page.

 Home | Python | IPython | * IPython: Math Processor 2: Installation 3: Getting Started 4: Equation Processing 5: Equation Solving 6: Normal Distribution 7: Differential Equations 8: Fourier Transforms 9: Tips & Tricks   Share This Page