using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static double f(double x) { return Math.Asin(Math.Sqrt(1/(1 +x ))); } static double F(double x) { return x * Math.Asin(Math.Sqrt(x / (1 + x))) - Math.Sqrt(x) + Math.Atan(Math.Sqrt(x)); } static double Simpson(double a, double b, int n) { double s, x, c, h; int i; s = f(a) + f(b); h = (b - a) / n; x = a; c = 1; for (i = 1; i < n; i++) { x = x + h; s = s + 2 * f(x); c = -c; } return s * h / 3; } static void Main(string[] args) { double Int; Int = Simpson(0, 3, 36); Console.WriteLine("Интеграл = {0:f4}", Int); Console.ReadKey(); } } }