December 2017
Intermediate to advanced
386 pages
10h 42m
English
Let's now define the expression for the function we want to compute by running the following code in a Jupyter cell:
r, theta = symbols('r, theta')x = r * cos(theta)y = r * sin(theta)x, y
In the first line in this code, we define the symbols r and theta. A symbol in sympy is used to represent the name of a mathematical variable.
Next, with the x = r * cos(theta) and y = r * sin(theta) assignments, we define two sympy expressions, x and y.
The last line in the cell, x,y, will print the x and y expressions in pretty format, according to the usual rules for typesetting mathematics. ...
Read now
Unlock full access