reserve r,x,x0,a,b for Real;
reserve n,m for Element of NAT;
reserve A for non empty closed_interval Subset of REAL;
reserve Z for open Subset of REAL;
reserve f, f1, f2, f3 for PartFunc of REAL, REAL;

theorem
  A c= Z & Z c= ]. -1,1 .[ & f2=#Z 2 & (for x st x in Z holds f1.x=1) &
  dom arccot=Z & Z = dom ((id Z)(#)(arccot)+(1/2)(#)(ln*(f1+f2))) implies
integral(arccot,A) =
 ((id Z)(#)(arccot)+(1/2)(#)(ln*(f1+f2))).(upper_bound A) -((id Z)
  (#)(arccot)+(1/2)(#)(ln*(f1+f2))).(lower_bound A)
proof
  assume that
A1: A c= Z and
A2: Z c= ]. -1,1 .[ and
A3: f2=#Z 2 & for x st x in Z holds f1.x=1 and
A4: dom arccot=Z and
A5: Z = dom ((id Z)(#)(arccot)+(1/2)(#)(ln*(f1+f2)));
  ].-1,1 .[ c= [.-1,1 .] & A c= ].-1,1 .[ by A1,A2,XBOOLE_1:1,XXREAL_1:25;
  then arccot|A is continuous by FCONT_1:16,SIN_COS9:54,XBOOLE_1:1;
  then
A6: arccot is_integrable_on A & arccot|A is bounded by A1,A4,INTEGRA5:10,11;
A7: ((id Z)(#)(arccot)+(1/2)(#)(ln*(f1+f2))) is_differentiable_on Z by A2,A3,A5
,SIN_COS9:104;
A8: for x being Element of REAL
st x in dom (((id Z)(#)(arccot)+(1/2)(#)(ln*(f1+f2)))`|Z) holds ((
  (id Z)(#)(arccot)+(1/2)(#)(ln*(f1+f2)))`|Z).x = arccot.x
  proof
    let x be Element of REAL;
    assume x in dom (((id Z)(#)(arccot)+(1/2)(#)(ln*(f1+f2)))`|Z);
    then x in Z by A7,FDIFF_1:def 7;
    hence thesis by A2,A3,A5,SIN_COS9:104;
  end;
  dom (((id Z)(#)(arccot)+(1/2)(#)(ln*(f1+f2)))`|Z) = dom arccot by A4,A7,
FDIFF_1:def 7;
  then (((id Z)(#)(arccot)+(1/2)(#)(ln*(f1+f2)))`|Z) = arccot by A8,PARTFUN1:5;
  hence thesis by A1,A2,A3,A5,A6,INTEGRA5:13,SIN_COS9:104;
end;
