// (lim x->0) (x*sin(x) - x*sin(x)) / 1 = 0 public void CalculateLimit_AndReturnsCorrectLimit_11() { var numerator = new List <Summand> { new Summand { PolynomialDegree = 1, Multiplicands = new List <IElementaryFunction> { new Sine { Aparam = 1 } } }, new Summand { Coefficient = -1, PolynomialDegree = 1, Multiplicands = new List <IElementaryFunction> { new Sine { Aparam = 1 } } } }; var denominator = new List <Summand> { new Summand() }; var normalizedFunction = new NormalizedFunction { Numerator = numerator, Denominator = denominator }; var result = LimitCalculator.CalculateLimit(normalizedFunction, 0); result.LimitResultType.Should().Be(LimitResultType.RealNumber); result.Value.Should().Be(0); }
// (lim x->1) sin(7Pi*x)/sin(2Pi*x) = -7/2 public void CalculateLimit_MKD_69_34() { var numerator = new List <Summand> { new Summand { Coefficient = 1.0, Multiplicands = new List <IElementaryFunction> { new Sine { Aparam = 7 * Math.PI } } } }; var denominator = new List <Summand> { new Summand { Coefficient = 1.0, Multiplicands = new List <IElementaryFunction> { new Sine { Aparam = 2 * Math.PI } } } }; var normalizedFunction = new NormalizedFunction { Numerator = numerator, Denominator = denominator }; var result = LimitCalculator.CalculateLimit(normalizedFunction, 1); result.LimitResultType.Should().Be(LimitResultType.RealNumber); result.Value.Should().Be(-3.5); }
// (lim x->0) cos(x) - 1 / x^2 = -1/2 public void Calculate_Antano_Limit_10_cos() { var numerator = new List <Summand> { new Summand { Coefficient = 1.0, Multiplicands = new List <IElementaryFunction> { new Cosine { Aparam = 1, Bparam = 0 } } }, new Summand { Coefficient = -1.0, } }; var denominator = new List <Summand> { new Summand { Coefficient = 1.0, PolynomialDegree = 2 } }; var normalizedFunction = new NormalizedFunction { Numerator = numerator, Denominator = denominator }; var result = LimitCalculator.CalculateLimit(normalizedFunction, 0); result.LimitResultType.Should().Be(LimitResultType.RealNumber); result.Value.Should().Be(-0.5); }
// x->-1 (x^3+1)/sin(x+1) public void Kuznecov_15_3() { var numerator = new List <Summand> { new Summand { Coefficient = 1.0, PolynomialDegree = 3 }, new Summand { Coefficient = 1.0, }, }; var denominator = new List <Summand> { new Summand { Coefficient = 1.0, Multiplicands = new List <IElementaryFunction> { new Sine { Aparam = 1.0, Bparam = 1.0 } } } }; var normalizedFunction = new NormalizedFunction { Numerator = numerator, Denominator = denominator }; var result = LimitCalculator.CalculateLimit(normalizedFunction, -1); result.LimitResultType.Should().Be(LimitResultType.RealNumber); result.Value.Should().Be(3.0); }
// (lim x->1) 5x-x^0.5 = 4 public void CalculatePoviloLimit1() { var numerator = new List <Summand> { new Summand { Coefficient = -1.0, Multiplicands = new List <IElementaryFunction> { new PowerFunction { Aparam = 1, Bparam = 0, PowerNumerator = 1, PowerDenominator = 2 } } }, new Summand { Coefficient = 5.0, PolynomialDegree = 1, } }; var denominator = new List <Summand> { new Summand { Coefficient = 1 } }; var normalizedFunction = new NormalizedFunction { Numerator = numerator, Denominator = denominator }; var result = LimitCalculator.CalculateLimit(normalizedFunction, 1); result.LimitResultType.Should().Be(LimitResultType.RealNumber); result.Value.Should().Be(4); }
// (lim x->0)(x) / ((4-x)^1/2)-2 = -4 public void Calculate_Antano_Limit_4() { var numerator = new List <Summand> { new Summand { PolynomialDegree = 1, Coefficient = 1.0 } }; var denominator = new List <Summand> { new Summand { Coefficient = 1.0, Multiplicands = new List <IElementaryFunction> { new PowerFunction { Aparam = -1, Bparam = 4, PowerNumerator = 1, PowerDenominator = 2 } } }, new Summand { Coefficient = -2.0 } }; var normalizedFunction = new NormalizedFunction { Numerator = numerator, Denominator = denominator }; var result = LimitCalculator.CalculateLimit(normalizedFunction, 0); result.LimitResultType.Should().Be(LimitResultType.RealNumber); result.Value.Should().Be(-4.0); }
// (lim x->0) ((32+x)^(1/5) - 2) / x = 1/80 public void CalculateLimit_MKD_74_5() { var numerator = new List <Summand> { new Summand { Multiplicands = new List <IElementaryFunction> { new PowerFunction { Aparam = 1, Bparam = 32, PowerNumerator = 1, PowerDenominator = 5 } } }, new Summand { Coefficient = -2 } }; var denominator = new List <Summand> { new Summand { PolynomialDegree = 1 } }; var normalizedFunction = new NormalizedFunction { Numerator = numerator, Denominator = denominator }; var result = LimitCalculator.CalculateLimit(normalizedFunction, 0); result.LimitResultType.Should().Be(LimitResultType.RealNumber); result.Value.Should().Be(1.0 / 80); }
// (lim x->-2/Pi) 1 - cos(Pi*x + 2) = 0 public void CalculateLimit_MKD_67_16() { var numerator = new List <Summand> { new Summand { Coefficient = 1 }, new Summand { Coefficient = -1, Multiplicands = new List <IElementaryFunction> { new Cosine { Aparam = Math.PI, Bparam = 2 } } }, }; var denominator = new List <Summand> { new Summand { Coefficient = 1 } }; var normalizedFunction = new NormalizedFunction { Numerator = numerator, Denominator = denominator }; var result = LimitCalculator.CalculateLimit(normalizedFunction, -2 / Math.PI); result.LimitResultType.Should().Be(LimitResultType.RealNumber); result.Value.Should().Be(0); }
// (lim x->-1/3) (9*x^2 - 1) / (x + 1/3) = -6 public void CalculateLimit_MKD_67_6() { var numerator = new List <Summand> { new Summand { Coefficient = 9, PolynomialDegree = 2 }, new Summand { Coefficient = -1 }, }; var denominator = new List <Summand> { new Summand { Coefficient = 1, PolynomialDegree = 1 }, new Summand { Coefficient = 1.0 / 3 }, }; var normalizedFunction = new NormalizedFunction { Numerator = numerator, Denominator = denominator }; var result = LimitCalculator.CalculateLimit(normalizedFunction, -1.0 / 3); result.LimitResultType.Should().Be(LimitResultType.RealNumber); result.Value.Should().Be(-6.0); }
// (lim x->0) (x^(1/5)) / (x^(1/3)) = +INF public void CalculateLimit_AndReturnsCorrectLimit_9() { var numerator = new List <Summand> { new Summand { Multiplicands = new List <IElementaryFunction> { new PowerFunction() { Aparam = 1, PowerNumerator = 1, PowerDenominator = 5 } } } }; var denominator = new List <Summand> { new Summand { Multiplicands = new List <IElementaryFunction> { new PowerFunction { Aparam = 1, PowerNumerator = 1, PowerDenominator = 3 } } } }; var normalizedFunction = new NormalizedFunction { Numerator = numerator, Denominator = denominator }; var result = LimitCalculator.CalculateLimit(normalizedFunction, 0); result.LimitResultType.Should().Be(LimitResultType.PositiveInfinity); }
// (lim x->0) sin (x + 3) = sin(3) ~ 0.141120008059867 public void CalculateLimit_AndReturnsCorrectLimit_5() { var numerator = new List <Summand> { new Summand { Coefficient = 1.0, Multiplicands = new List <IElementaryFunction> { new Sine() { Aparam = 1.0, Bparam = 3 } } } }; var denominator = new List <Summand> { new Summand { Coefficient = 1.0 } }; var normalizedFunction = new NormalizedFunction { Numerator = numerator, Denominator = denominator }; var result = LimitCalculator.CalculateLimit(normalizedFunction, 0); result.LimitResultType.Should().Be(LimitResultType.RealNumber); MathHelper.AreApproximatelyEqual(result.Value, 0.141, 0.005).Should().BeTrue(); }
// (lim x->0) sin(4*x) / x public void CalculateLimit_MKD_69_26() { var numerator = new List <Summand> { new Summand { Coefficient = 1.0, Multiplicands = new List <IElementaryFunction> { new Sine { Aparam = 4 } } } }; var denominator = new List <Summand> { new Summand { Coefficient = 1.0, PolynomialDegree = 1 } }; var normalizedFunction = new NormalizedFunction { Numerator = numerator, Denominator = denominator }; var result = LimitCalculator.CalculateLimit(normalizedFunction, 0.0); result.LimitResultType.Should().Be(LimitResultType.RealNumber); result.Value.Should().Be(4); }
// (lim x->0) x / 2^x = 0 public void Calculate_Antano_Limit_9_EX() { var numerator = new List <Summand> { new Summand { Coefficient = 1.0, PolynomialDegree = 1 } }; var denominator = new List <Summand> { new Summand { Coefficient = 1.0, Multiplicands = new List <IElementaryFunction> { new ExponentialFunction { Aparam = 2, Bparam = 0 }, } } }; var normalizedFunction = new NormalizedFunction { Numerator = numerator, Denominator = denominator }; var result = LimitCalculator.CalculateLimit(normalizedFunction, 0); result.LimitResultType.Should().Be(LimitResultType.RealNumber); result.Value.Should().Be(0); }
// tg(x) replaced with sin(x) / cos(x) // (lim x->0) (cos(x) * (e^(7x) - e^(2x))) / sin(x) = 5 public void CalculateLimit_MKD_69_33() { var numerator = new List <Summand> { new Summand { Coefficient = 1.0, Multiplicands = new List <IElementaryFunction> { new Cosine { Aparam = 1 } }, SumsRaisedToPower = new List <SumRaisedToPower> { new SumRaisedToPower { Degree = 1, Sum = new List <Summand> { new Summand { Coefficient = 1, Multiplicands = new List <IElementaryFunction> { new ExponentialFunction { Aparam = 7 } } }, new Summand { Coefficient = -1, Multiplicands = new List <IElementaryFunction> { new ExponentialFunction { Aparam = 2 } } } } } } } }; var denominator = new List <Summand> { new Summand { Coefficient = 1.0, Multiplicands = new List <IElementaryFunction> { new Sine { Aparam = 1 } } } }; var normalizedFunction = new NormalizedFunction { Numerator = numerator, Denominator = denominator }; var result = LimitCalculator.CalculateLimit(normalizedFunction, 0.0); result.LimitResultType.Should().Be(LimitResultType.RealNumber); result.Value.Should().Be(5); }
// (lim x->0) public void CalculateLimit_MKD_68_14() { var numerator = new List <Summand> { new Summand { Coefficient = 1.0, Multiplicands = new List <IElementaryFunction> { new PowerFunction { Aparam = 1.0, Bparam = 1.0, PowerNumerator = 1, PowerDenominator = 2 } }, SumsRaisedToPower = new List <SumRaisedToPower> { new SumRaisedToPower { Degree = 1, Sum = new List <Summand> { new Summand { Coefficient = 1.0, Multiplicands = new List <IElementaryFunction> { new PowerFunction { Aparam = 1.0, Bparam = 1.0, PowerNumerator = 1, PowerDenominator = 2 }, } }, new Summand { Coefficient = -1.0, Multiplicands = new List <IElementaryFunction> { new PowerFunction { Aparam = -1.0, Bparam = 1.0, PowerNumerator = 1, PowerDenominator = 2 }, } } } } } } }; var denominator = new List <Summand> { new Summand { Coefficient = 1.0, Multiplicands = new List <IElementaryFunction> { new PowerFunction { Aparam = 1.0, Bparam = 0, PowerNumerator = 1, PowerDenominator = 5 }, } } }; var normalizedFunction = new NormalizedFunction { Numerator = numerator, Denominator = denominator }; var result = LimitCalculator.CalculateLimit(normalizedFunction, 0.0); result.LimitResultType.Should().Be(LimitResultType.RealNumber); result.Value.Should().Be(0.0); }
//x->0 (1+x*sinx-cos2x)/sin^2(x) public void Kuznecov_15_2() { var numerator = new List <Summand> { new Summand { Coefficient = 1.0 }, new Summand { Coefficient = 1.0, Multiplicands = new List <IElementaryFunction> { new Sine { Aparam = 1.0, Bparam = 0 } }, PolynomialDegree = 1 }, new Summand { Coefficient = -1.0, Multiplicands = new List <IElementaryFunction> { new Cosine { Aparam = 2.0, Bparam = 0 } } } }; var denominator = new List <Summand> { new Summand { Coefficient = 1, SumsRaisedToPower = new List <SumRaisedToPower> { new SumRaisedToPower { Degree = 2, Sum = new List <Summand> { new Summand { Coefficient = 1, Multiplicands = new List <IElementaryFunction> { new Sine { Aparam = 1.0, Bparam = 0 } } } } } } } }; var normalizedFunction = new NormalizedFunction { Numerator = numerator, Denominator = denominator }; var result = LimitCalculator.CalculateLimit(normalizedFunction, 0); result.LimitResultType.Should().Be(LimitResultType.RealNumber); result.Value.Should().Be(3.0); }
// (lim x->0) (((1 + x)^3) - ((1 + 3x)^1)) / (x + x^5) = 0 public void CalculateLimit_AndReturnsCorrectLimit_2() { var numerator = new List <Summand> { new Summand { Coefficient = 1.0, SumsRaisedToPower = new List <SumRaisedToPower> { new SumRaisedToPower { Degree = 3, Sum = new List <Summand> { new Summand { Coefficient = 1.0 }, new Summand { Coefficient = 1.0, PolynomialDegree = 1 } } } } }, new Summand { Coefficient = -1.0, SumsRaisedToPower = new List <SumRaisedToPower> { new SumRaisedToPower { Degree = 1, Sum = new List <Summand> { new Summand { Coefficient = 1.0 }, new Summand { Coefficient = 3.0, PolynomialDegree = 1 } } } } } }; var denominator = new List <Summand> { new Summand { Coefficient = 1.0, PolynomialDegree = 1 }, new Summand { Coefficient = 1.0, PolynomialDegree = 5 } }; var normalizedFunction = new NormalizedFunction { Numerator = numerator, Denominator = denominator }; var result = LimitCalculator.CalculateLimit(normalizedFunction, 0); result.LimitResultType.Should().Be(LimitResultType.RealNumber); result.Value.Should().Be(0.0); }