 reserve a,b,x,r for Real;
 reserve y for set;
 reserve n for Element of NAT;
 reserve A for non empty closed_interval Subset of REAL;
 reserve f,g,f1,f2,g1,g2 for PartFunc of REAL,REAL;
 reserve Z for open Subset of REAL;

theorem
A c= Z & (for x st x in Z holds exp_R.x < 1 & f1.x=1)
& Z c= dom (arccot*exp_R) & Z = dom f & f=(-exp_R)/(f1+(exp_R)^2)
 implies integral(f,A)=(arccot*exp_R).(upper_bound A)
                      -(arccot*exp_R).(lower_bound A)
proof
   assume
A1:A c= Z & (for x st x in Z holds exp_R.x < 1 & f1.x=1)
   & Z c= dom (arccot*exp_R) & Z = dom f
   & f=(-exp_R)/(f1+(exp_R)^2);
then Z c= dom (-exp_R) /\ (dom (f1+(exp_R)^2) \ (f1+(exp_R)^2)"{0})
   by RFUNCT_1:def 1;
then A2:Z c= dom (-exp_R) & Z c= dom (f1+(exp_R)^2) \ (f1+(exp_R)^2)"{0}
   by XBOOLE_1:18;
then A3:Z c= dom ((f1+(exp_R)^2)^) by RFUNCT_1:def 2;
   dom ((f1+(exp_R)^2)^) c= dom (f1+(exp_R)^2) by RFUNCT_1:1;then
A4:Z c= dom (f1+(exp_R)^2) by A3;
then A5:Z c= dom f1 /\ dom ((exp_R)^2) by VALUED_1:def 1;
then A6:Z c= dom f1 & Z c= dom ((exp_R)^2) by XBOOLE_1:18;
A7:Z c= dom ((exp_R)(#)(exp_R)) by A5,XBOOLE_1:18;
A8:exp_R is_differentiable_on Z by FDIFF_1:26,TAYLOR_1:16;
then A9:(-1)(#)(exp_R) is_differentiable_on Z by A2,FDIFF_1:20;
A10:(exp_R)(#)(exp_R) is_differentiable_on Z by A7,A8,FDIFF_1:21;
for x st x in Z holds f1.x=0*x+1 by A1;
then f1 is_differentiable_on Z by A6,FDIFF_1:23;
then A11:f1+(exp_R)^2 is_differentiable_on Z by A4,A10,FDIFF_1:18;
for x st x in Z holds (f1+(exp_R)^2).x<>0
   proof
   let x;
   assume x in Z;then
   x in dom (-exp_R) /\ (dom (f1+(exp_R)^2) \ (f1+(exp_R)^2)"{0})
     by A1,RFUNCT_1:def 1;then
   x in dom (f1+(exp_R)^2) \ (f1+(exp_R)^2)"{0} by XBOOLE_0:def 4; then
   x in dom ((f1+(exp_R)^2)^) by RFUNCT_1:def 2;
   hence thesis by RFUNCT_1:3;
   end;
then f is_differentiable_on Z by A1,A9,A11,FDIFF_2:21;
then f|Z is continuous by FDIFF_1:25;
then f|A is continuous by A1,FCONT_1:16;
then A12:f is_integrable_on A & f|A is bounded by A1,INTEGRA5:10,11;
A13:for x st x in Z holds exp_R.x < 1 by A1;then
A14:arccot*exp_R is_differentiable_on Z by A1,SIN_COS9:116;
A15:for x being Element of REAL st x in Z holds f.x=-exp_R.x/(1+(exp_R.x)^2)
   proof
   let x be Element of REAL;
   assume
A16:x in Z;
    then ((-exp_R)/(f1+(exp_R)^2)).x=((-exp_R).x)*((f1+(exp_R)^2).x)"
                                 by A1,RFUNCT_1:def 1
                              .=(-exp_R.x)*((f1+(exp_R)^2).x)"
                                by RFUNCT_1:58
                              .=(-exp_R.x)*(f1.x+((exp_R)^2).x)"
                                by A16,A4,VALUED_1:def 1
                              .=(-exp_R.x)*(f1.x+(exp_R.x)^2)"
                                by VALUED_1:11
                              .=(-exp_R.x)/(1+(exp_R.x)^2) by A1,A16
                              .=-exp_R.x/(1+(exp_R.x)^2);
        hence thesis by A1;
      end;
A17:for x being Element of REAL
    st x in dom ((arccot*exp_R)`|Z) holds ((arccot*exp_R)`|Z).x=f.x
    proof
       let x be Element of REAL;
       assume x in dom ((arccot*exp_R)`|Z);then
A18:x in Z by A14,FDIFF_1:def 7;
   then
((arccot*exp_R)`|Z).x=-exp_R.x/(1+(exp_R.x)^2) by A1,A13,SIN_COS9:116
                       .=f.x by A18,A15;
   hence thesis;
   end;
   dom ((arccot*exp_R)`|Z)=dom f by A1,A14,FDIFF_1:def 7;
   then ((arccot*exp_R)`|Z)= f by A17,PARTFUN1:5;
   hence thesis by A1,A12,A14,INTEGRA5:13;
end;
