josdejong/mathjs

Nested derivatives fail

Open

#3,528 创建于 2025年9月8日

在 GitHub 查看
 (3 评论) (0 反应) (0 负责人)JavaScript (1,298 fork)batch import
bughelp wanted

仓库指标

Star
 (13,832 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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

贡献者指南