Commit 3b35d584 authored by Taddeus Kroes's avatar Taddeus Kroes

Added advanded unit tests for d/dx e^x.

parent 81415bb0
......@@ -197,7 +197,6 @@ def variable_exponent(root, args):
Note that (in combination with logarithmic/constant rules):
der(e ^ x) -> e ^ x * ln(e) -> e ^ x * 1 -> e ^ x
"""
# TODO: Put above example 'der(e ^ x)' in unit test
g, x = root[0]
return g ** x * ln(g)
......
......@@ -228,3 +228,12 @@ class TestRulesDerivatives(RulesTestCase):
f, g = root[0]
self.assertEqual(quotient_rule(root, ()),
(der(f) * g - f * der(g)) / g ** 2)
def test_natural_pase_chain(self):
self.assertRewrite([
'der(e ^ x)',
'e ^ x * ln(e)',
'e ^ x * (log(e) / log(e))',
'e ^ x * 1',
'e ^ x',
])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment