Advertisement
MadCortez

Untitled

Nov 5th, 2020
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.88 KB | None | 0 0
  1. program MyJob;
  2.  
  3. {$APPTYPE CONSOLE}
  4.  
  5. uses
  6.   SysUtils,
  7.   Math;
  8.  
  9. var
  10. i,k,f:integer;
  11. x,f1,f2,Bpred,z,eps,zacon,n:double;
  12. begin
  13. eps:=0.01;
  14. x:=-0.6;
  15. i:=1;
  16.  
  17.  
  18.   for i:=1 to 20 do          //начало нахождения 20 знач
  19.     begin
  20.     f1:=(1/8)*((1-sqr(x))*ln((1-x)/(1+x))+2*(sqr(x)+1)*arctan(x));
  21.     k:=0;
  22.     f2:=((power(x,4*k+3))/((4*k+1)*(4*k+3)));
  23.     n:=f2;
  24.     write('X=',x:2:2);
  25.     write(' ', 'f1=',f1:6:6);
  26.     eps:=0.01;
  27.     repeat
  28.      repeat                                       //подсчет второй функции
  29.       Bpred:=n;
  30.       k:=k+1;
  31.       zacon:=power(x,4)*((16*sqr(k)-16*k+3)/(16*sqr(k)+16*k+3));
  32.       z:=Bpred*zacon;
  33.       Bpred:=z;
  34.       f2:=f2+z;
  35.      until z<eps;
  36.      write(' ','f2=',f2:6:6, ' ', 'N=',i);
  37.      eps := eps * 0.1;
  38.     until eps < 0.0001;
  39.     writeln('');
  40.    x:=x+0.05;
  41.    end;
  42.  
  43.  readln;
  44. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement