Skip to content

Commit 5e3e44e

Browse files
Test higher-order derivatives
1 parent 2547a4e commit 5e3e44e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/derivatives.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ 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(sin(2t))) == simplify_constants(cos(2t) * 2)
19+
@test expand_derivatives(D2(sin(t))) == simplify_constants(-sin(t))
20+
@test expand_derivatives(D2(sin(2t))) == simplify_constants(sin(2t) * -4)
21+
@test expand_derivatives(D2(t)) == 0
22+
@test expand_derivatives(D2(5)) == 0
23+
1824
# Chain rule
1925
dsinsin = D(sin(sin(t)))
2026
@test expand_derivatives(dsinsin) == cos(sin(t))*cos(t)

0 commit comments

Comments
 (0)