josdejong/mathjs

Nested derivatives fail

Open

#3 528 ouverte le 8 sept. 2025

Voir sur GitHub
 (3 commentaires) (0 réactions) (0 assignés)JavaScript (13 832 stars) (1 298 forks)batch import
bughelp wanted

Description

Describe the bug mathJs evaluates this derivative correctly: derivative('x * e^x', "x") // returns "e ^ x * (x + 1)"

however, if the expression to be differentiated is involves another derivative mathJs returns an incorrect answer: derivative('x * derivative("e^x", "x")', "x") // returns "e^x"

To Reproduce enter expression in mathJs demo window: derivative('x * derivative("e^x", "x")', "x")

Guide contributeur