Skip to content

Commit 25d1ce6

Browse files
Test higher-order derivatives
1 parent 2547a4e commit 25d1ce6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/derivatives.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ dsin = D(sin(t))
1515
dcsch = D(csch(t))
1616
@test expand_derivatives(dcsch) == simplify_constants(coth(t) * csch(t) * -1)
1717

18+
@test expand_derivatives(D(-7)) == 0
19+
@test expand_derivatives(D(sin(2t))) == simplify_constants(cos(2t) * 2)
20+
@test expand_derivatives(D2(sin(t))) == simplify_constants(-sin(t))
21+
@test expand_derivatives(D2(sin(2t))) == simplify_constants(sin(2t) * -4)
22+
@test expand_derivatives(D2(t)) == 0
23+
@test expand_derivatives(D2(5)) == 0
24+
1825
# Chain rule
1926
dsinsin = D(sin(sin(t)))
2027
@test expand_derivatives(dsinsin) == cos(sin(t))*cos(t)

0 commit comments

Comments
 (0)