CoCalc Public Filessupport / 2018-04-25-sympy tutorial.ipynbOpen in with one click!
Author: William A. Stein
Description: Jupyter notebook support/2015-06-04-141749-bokeh.ipynb
In [1]:
import sympy sympy.sqrt(3)
sqrt(3)
In [3]:
x, y = symbols('x y') expr = x + 2*y expr
x + 2*y
In [5]:
from sympy import expand, factor expanded_expr = expand(x*expr) expanded_expr
x**2 + 2*x*y
In [7]:
factor(expanded_expr)
x*(x + 2*y)
In [ ]: