In [2]:
# setup SymPy
from sympy import *
x, y, z, t = symbols('x y z t')
init_printing()

# setup plotting
%matplotlib notebook
import matplotlib.pyplot as mpl
from util.plot_helpers import plot_vec, plot_vecs, autoscale_arrows

In [5]:
simplify(sin(2*x)*cos(2*x))


Out[5]:
$$\frac{1}{2} \sin{\left (4 x \right )}$$

In [11]:
a = Matrix([1,1,1])
a.


Out[11]:
$$\left[\begin{matrix}1\\1\\1\end{matrix}\right]$$

In [14]:
S(1)/3


Out[14]:
$$\frac{1}{3}$$

In [15]:
type(1)


Out[15]:
int

In [16]:
type(S(1))


Out[16]:
sympy.core.numbers.One

In [17]:
float(S(1)/3)


Out[17]:
$$0.3333333333333333$$

In [18]:
N(S(1)/3)


Out[18]:
$$0.333333333333333$$

In [24]:
pi.n(100)
type(pi.n(100))


Out[24]:
sympy.core.numbers.Float

In [20]:
e


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-20-094e3afb2fe8> in <module>()
----> 1 e

NameError: name 'e' is not defined

In [21]:
E


Out[21]:
$$e$$

In [ ]: