public void TestDerOverDer2() { var func = MathS.Derivative("x + 2", "y"); var derFunc = func.Differentiate(x); Assert.Equal(MathS.Derivative(func, x), derFunc); }
public void TestSgnDer() { Entity func = "sgn(x + 2)"; var derived = func.Differentiate("x"); Assert.Equal(MathS.Derivative(func, x), derived); }
[Fact] public void TestDerivative2Args2() => Assert.Equal(2 * MathS.Derivative("x + 2", "x"), FromString("2 derivative(x + 2, x)"));
[Fact] public void Derivative5() => Test(@"\frac{d\left[{x}^{23}-x_{16}\right]}{d\left[xf\right]}", MathS.Derivative("x^23-x_16", "xf"));
[Fact] public void Derivative4() => Test(@"\frac{d\left[\frac{1}{x}\right]}{d\left[xf\right]}", MathS.Derivative("1/x", "xf"));
[Fact] public void Derivative3() => Test(@"\frac{d^{3}\left[x+1\right]}{dx^{3}}", MathS.Derivative("x + 1", x, 3));
[Fact] public void Derivative2() => Test(@"\frac{d\left[x+y\right]}{d\left[quack\right]}", MathS.Derivative("x + y", "quack"));
[Fact] public void Derivative1() => Test(@"\frac{d\left[x+1\right]}{dx}", MathS.Derivative("x + 1", x));