public void TestSecant() { Entity func = "sec(2x)"; var derived = func.Differentiate("x"); Assert.Equal(2 * MathS.Sec("2x") * MathS.Tan("2x"), derived.Simplify()); }
public void TestComplex() { var expr = MathS.FromString("ln(x) + sqrt(x) + tan(x) + sec(x) + cosec(x) + cotan(x)"); var expected = MathS.Ln(x) + MathS.Sqrt(x) + MathS.Tan(x) + MathS.Sec(x) + MathS.Cosec(x) + MathS.Cotan(x); Assert.IsTrue(expr == expected); }
[Fact] public void TestSec() => Assert.Equal(MathS.Sec("x"), FromString("sec(x)"));
[TestMethod] public void SecCosec() => TestSimplify(@"\frac{1}{\cos\left(\frac{1}{\sin\left(x\right)}\right)}", MathS.Sec(MathS.Cosec(x)));
[Fact] public void SecCosec() => TestSimplify(@"\sec\left(\csc\left(x\right)\right)", MathS.Sec(MathS.Cosec(x)));