daily pastebin goal
55%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. double a = 1, b = 4,n = 52;
  2.             double h = (b - a) / n;
  3.             double x = a, sum = 0;
  4.             double S = 0;
  5.             double ln_x =
  6.             double y = Math.Pow(Math.Log(x), 2) / x;
  7.             double ya = Math.Pow(Math.Log(a), 2) / a;
  8.             double yb = Math.Pow(Math.Log(b), 2) / b;
  9.             for (int i = 1; i <= n - 1; i++)
  10.             {
  11.                 x = x + h;
  12.                 sum = sum + y;
  13.             }
  14.             S = (ya + yb + 2 * sum) * (h / 2);
  15.  
  16.             Console.WriteLine(y);    
  17.  
  18.             Console.WriteLine("Величина определенного интеграла ln^2(x)/x равна {0}",S);
  19.  
  20.             //double F = Math.Pow(Math.Log(x), 3) / 3;
  21.             double Fa = Math.Pow(Math.Log(a), 3) / 3;
  22.             double Fb = Math.Pow(Math.Log(b), 3) / 3;
  23.             double Sprov = Fb - Fa;
  24.  
  25.             Console.WriteLine(Fa);
  26.  
  27.             Console.WriteLine("Проверка численным методом - {0}", Sprov);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top