josdejong/mathjs

Nested derivatives fail

Open

#3528 aperta il 8 set 2025

Vedi su GitHub
 (3 commenti) (0 reazioni) (0 assegnatari)JavaScript (1298 fork)batch import
bughelp wanted

Metriche repository

Star
 (13.832 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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")

Guida contributor