Problem 8.2: Derive Product (optional, 0 pts)
Note: the formula for the derivative of a product is
(f(x) g(x))' = f'(x) g(x) + f(x) g'(x)
Implement derive-product
, which applies the product rule to differentiate products. This means taking the first-operand and second-operand, and then summing the result of multiplying one by the derivative of the other.
The
ok
tests expect the terms of the result in a particular order. First, multiply the derivative of the first-operand by the second-operand. Then, multiply the first-operand by the derivative of the second-operand. Sum these two terms to form the derivative of the original product. In other words,f' g + f g'
not some other ordering
(define (derive-product expr var)
'YOUR-CODE-HERE
)