from sympy import * init_printing() # Set up fancy printing import math math.sqrt(2) sqrt(2) # This `sqrt` comes from SymPy cos(0) # Call acos on -1 to find where on the circle the x coordinate equals -1 # Call `math.acos` on -1 to find the same result using the builtin math module. # Is the result the same? # What do you think `numpy.acos` give you? x, y, z = symbols('x,y,z') alpha, beta, gamma = symbols('alpha,beta,gamma') x + 1 log(alpha ** beta) + gamma sin(x)**2 + cos(x)**2 ?, ? = symbols('?') exp(?) (x**2).diff(x) sin(x).diff(x) (x**2 + x*y + y**2).diff(x) (x**2 + x*y + y**2).diff(y) mu, sigma = symbols('mu,sigma') bell = exp((x - mu)**2 / sigma**2) bell ?.diff(?) # Derivative of bell curve with respect to sigma # Find the second and third derivative of `bell` expr = sin(x)**2 + cos(x)**2 expr simplify(expr) bell.diff(x).diff(x).diff(x) # Call simplify on the third derivative of the bell expression sympify('r * cos(theta)^2')