-- coding: utf-8 --
""" Created on Fri Mar 29 22:13:33 2024 @author: Mohammed """ import numpy as np def basic_differentials(a, x, c): step_one = a*c differentiated_power = c-1 step_two = x ** differentiated_power step_three = step_one * step_two return step_three
def chain_rule(x, y, z): t = basic_differentials(1, y, 1) return basic_differentials(x, y, z) * t def product_rule(a, b, c, d, e, f): "a, b, and c as well as d, e, f respectively represent the two values being differentiated" diff_p = basic_differentials(a, b, c) diff_g = basic_differentials(d, e, f) p = a * (b ** c) l = d * (e ** f) five = p * diff_g six = l * diff_p return five + six def quotient_rule(a, b, c, d, e, f): diff_p = basic_differentials(a, b, c) diff_g = basic_differentials(d, e, f) p = a * (b ** c) l = d * (e ** f) five = p * diff_g six = l * diff_p sev = six - five l = l ** 2 return sev / l
Log in or sign up for Devpost to join the conversation.