Differentiating functions in SageMath
http://doc.sagemath.org/html/en/tutorial/tour_algebra.html#solving-differential-equations
x = var('x') a = function('a')(x) b = function('b')(x) ab1 = diff(a * b, x) show(ab1)
show(diff(2 * a + 3 * b^2, x))
# chain rule. # be explicit about what x is, i.e. a(x= ... ) t = var('t') show(diff(a(x = t^2 + b(x = x^2)), x))
ex3 = (a - 2*b)^3 / (b(x = 2*a(x=x)))^2 show(ex3)
show(diff(ex3, x))