示例#1
0
        static void Main(string[] args)
        {
            const double dx = 0.00001; // różniczka, h --> 0
            const double dy = 0.00001; // różniczka, k --> 0

            Console.WriteLine("Pierwsza Pochodna funkcji Sin(x) w punkcie 0 to: "
                              + Derivates.FirstDerivativeOneVariable(Functions.Sinx, 0, dx) + ".");

            Console.WriteLine("Druga Pochodna funkcji Sin(x) w punkcie 0 to: "
                              + Derivates.SecondDerivativeOneVariable(Functions.Sinx, 0, dx) + ".");

            Console.WriteLine("Pierwsza pochodna funkcji x^2*y zmiennej po x w punkcie (1,1) to: "
                              + Derivates.FirstDerivativeTwoVariablesOfx(Functions.FunctiononOfx2y, 1, 1, dx) + ".");

            Console.WriteLine("Pierwsza pochodna funkcji x^2*y  po zmiennej y w punkcie (1,1) to: "
                              + Derivates.FirstDerivativeTwoVariablesOfy(Functions.FunctiononOfx2y, 1, 1, dy) + ".");

            Console.WriteLine("Druga pochodna funkcji x^2*y po x zmiennej w punkcie (1,1) to: "
                              + Derivates.SecondDerivativeTwoVariablesOfx(Functions.FunctiononOfx2y, 1, 1, dx) + ".");

            Console.WriteLine("Druga pochodna funkcji x^2*y po zmiennej y w punkcie (1,1) to: "
                              + Derivates.SecondDerivativeTwoVariablesOfy(Functions.FunctiononOfx2y, 1, 1, dy) + ".");

            Console.WriteLine("Druga pochodna po zmiennej x i po zmiennej y funkcji x^2*y po y w punkcie (1,1) to: "
                              + Derivates.SecondDerivativeTwoVariablesOfxy(Functions.FunctiononOfx2y, 1, 1, dx, dy) + ".");

            Console.WriteLine("Pochodna funcji sin^2(x)) w punkcie PI/2 to: "
                              + Derivates.CompoundDerivateOnevariable(Functions.Square, Functions.Sinx, (Math.PI) / 2.0, dx) + ".");

            Console.ReadKey();
        }
示例#2
0
 public void check_second_derivate_for_xy(double x, double y, double expectedValue,
                                          double dx = 0.000001, double dy = 0.000001)
 {
     Derivates.SecondDerivativeTwoVariablesOfxy(test_function_2, x, y, dx, dy)
     .Should().Be(expectedValue);
 }
示例#3
0
 public void check_first_derivate_for_two_varables_constant_fucntion_for_xy(double x, double y,
                                                                            double expectedValue, double dx = 0.000001, double dy = 0.000001)
 {
     Derivates.SecondDerivativeTwoVariablesOfxy(test_function_1, x, y, dx, dy)
     .Should().Be(expectedValue);
 }
示例#4
0
 public void check_first_derivate_for_one_varable_for_Exp(double testValue,
                                                          double expectedValue, double dx = 0.000001)
 {
     Derivates.FirstDerivativeOneVariable(test_function_2, testValue, dx)
     .Should().Be(expectedValue);
 }
示例#5
0
 public void check_compound_derivate_one_variable_of_x(double x, double expectedValue, double dx = 0.00001)
 {
     Derivates.CompoundDerivateOnevariable(test_function_4, test_function_3, x, dx)
     .Should().Be(expectedValue);
 }