public void Constructor_Cos()
        {
            IndeterminateExpression v = IndeterminateExpression.Cos('v');

            v.IsOne.AssertIsFalse();
            v.HasUnaryModifier.AssertIsTrue();
            Assert.Throws <InvalidOperationException>(() =>
            {
                var _ = (char)v;
            });

            v.ToString().AssertIsEqualTo("Cos(v)");
            v.ToPower(2).ToString().AssertIsEqualTo("Cos²(v)");

            v.GetOperation('v').Value(0).AssertIsEqualTo(1);
            v.GetOperation('v').Value(Math.PI / 2).AssertIsEqualTo(0);

            v.ToPower(2).DerivativeBy('v').AssertIsEqualTo(-2 * Cos(Term.v) * Sin(Term.v));

            v.SimplifyForConstant(0).AssertIsEqualTo(1);
            v.SimplifyForConstant(Math.PI / 2).AssertIsEqualTo(0);
        }
 public void Cos_Variable()
 {
     PolynomialTerm.Cos(Term.a).AssertIsEqualTo(IndeterminateExpression.Cos('a'));
 }
 public static PolynomialTerm Cos(PolynomialTerm term) => IndeterminateExpression.Cos((char)term);