Skip to content

D ​

The symbolic partial derivative of an expression with respect to one or more variables.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageD✓
D(expr, vars*)Re-evaluates compute-engine's own DD once more so a head this package differentiates through Derivative lands on the closed-form derivative instead of stopping one step short at the inert Apply(Derivative(f, …), …) form.
SageMathdiff(expr, vars*)SymPydiff(expr, vars*)
Typed signatures
TypePackageApplies
(expression, variables: symbol*) -> expressionanalyticreplaces compute-enginealways
(expression, variables: symbol*) -> expressioncompute-enginealways

Domain: Compute engine

Examples

Basic #

Product rule

live ↗
Ind(x2sin⁡(x))dx\frac{\mathrm{d}(x^2\sin(x))}{\mathrm{d}x}Outcos⁡(x)x2+2xsin⁡(x)\cos(x)x^2+2x\sin(x)
Scope #

A repeated variable differentiates again

live ↗
In∂2x3∂x2\frac{∂^{2}x^3}{∂x^{2}}Out6x6x

A derivative order given as {x,n}\{x, n\}; the order may also be symbolic, dkdxkxa=ak‾ xa−k\frac{d^k}{dx^k}x^a = a^{\underline{k}}\,x^{a-k}

live ↗
InD⁡(x5,[x,2])\operatorname{D}(x^5, \bigl\lbrack x, 2\bigr\rbrack)Out20x320x^3
About
Examples3
Checked againstWolfram Language 3 agreeSageMath 2 agree1 errorSymPy 3 agree
CrosswalkWolfram LanguageSageMath ×2SymPy ×2

Implementation

mappedwolframpackages/oracle/src/mappings.ts

identity rename (see names.wolframIdentity); D[expr, x, ...] repeats the derivative once per extra variable, same as ours.

mappedsympypackages/oracle/src/mappings.ts
mappedsympypackages/oracle/src/mappings.ts
mappedsagepackages/oracle/src/mappings.ts
mappedsagepackages/oracle/src/mappings.ts

See also: Derivative