Advertisement
Guest User

Untitled

a guest
Dec 18th, 2014
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.87 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace NumericalIntegration
  8. {
  9.     internal class Functions
  10.     {
  11.         public static Double a = 0;
  12.  
  13.         public static Double b = 1;
  14.  
  15.         /// <summary>
  16.         /// Первообразная от f(x)
  17.         /// </summary>
  18.         /// <param name="x">Значение х</param>
  19.         public static Double F(Double x)
  20.         {
  21.             var coeff = (Double)2 / (3 * Math.Sqrt(5));
  22.             var power = (Double)3 / 2;
  23.             return coeff * Math.Pow(x, power);
  24.         }
  25.  
  26.         /// <summary>
  27.         /// Функция f(x)
  28.         /// </summary>
  29.         /// <param name="x">Значение х</param>
  30.         public static Double f(Double x)
  31.         {
  32.             return Math.Sqrt(x / 5);
  33.         }
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement