Skip to content

Instantly share code, notes, and snippets.

@michaeljymsgutierrez
Last active May 8, 2020 12:38
Show Gist options
  • Save michaeljymsgutierrez/5c2f6d35a7bb0262b25fd76d0d18e386 to your computer and use it in GitHub Desktop.
Save michaeljymsgutierrez/5c2f6d35a7bb0262b25fd76d0d18e386 to your computer and use it in GitHub Desktop.
# Requires python 3
import scipy as sp
import sympy as sym
x = sym.symbols('x')
expression = input('Enter Expression: ')
transform = sym.diff(expression);
init_transform = str(transform)
print(init_transform.replace('**','^').replace('*',''))
# print(sym.diff(3 * x**2 + 6 * x))
# print(sym.diff(x**5))i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment