 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 g.x=1 & f1.x=x/a & f1.x>-1 & f1.x<1)
 & Z = dom f & f|A is continuous
 & f=arccos*f1-(id Z)/(a(#)(( #R (1/2))*(g-f1^2))) implies
 integral(f,A)=((id Z)(#)(arccos*f1)).(upper_bound A)
              -((id Z)(#)(arccos*f1)).(lower_bound A)
proof
   assume
A1:A c= Z & (for x st x in Z holds g.x=1 & f1.x=x/a & f1.x>-1 & f1.x<1)
   & Z = dom f & f|A is continuous
   & f=arccos*f1-(id Z)/(a(#)(( #R (1/2))*(g-f1^2)));
then Z = dom (arccos*f1) /\ dom ((id Z)/(a(#)(( #R (1/2))*(g-f1^2))))
   by VALUED_1:12;
then A2:Z c= dom (arccos*f1) & Z c= dom ((id Z)/(a(#)(( #R (1/2))*(g-f1^2))))
   by XBOOLE_1:18;
Z c= dom id Z /\ dom (arccos*f1) by A2,XBOOLE_1:19;
then A3:Z c= dom ((id Z)(#)((arccos)*f1)) by VALUED_1:def 4;
   Z c= dom (id Z) /\ (dom (a(#)(( #R (1/2))*(g-f1^2)))
                             \ (a(#)(( #R (1/2))*(g-f1^2)))"{0})
   by A2,RFUNCT_1:def 1;then
Z c= dom (a(#)(( #R (1/2))*(g-f1^2))) \ (a(#)(( #R (1/2))*(g-f1^2)))"{0}
   by XBOOLE_1:18;
then A4:Z c= dom ((a(#)(( #R (1/2))*(g-f1^2)))^) by RFUNCT_1:def 2;
   dom ((a(#)(( #R (1/2))*(g-f1^2)))^) c= dom (a(#)(( #R (1/2))*(g-f1^2)))
   by RFUNCT_1:1; then
Z c= dom (a(#)(( #R (1/2))*(g-f1^2))) by A4;
then A5:Z c= dom (( #R (1/2))*(g-f1^2)) by VALUED_1:def 5;
A6:f is_integrable_on A & f|A is bounded by A1,INTEGRA5:10,11;
A7:for x st x in Z holds f1.x=x/a & f1.x>-1 & f1.x<1 by A1;then
A8:(id Z)(#)((arccos)*f1) is_differentiable_on Z by A3,FDIFF_7:26;
A9:for x st x in Z holds f.x=arccos.(x/a)-x/(a*sqrt(1-(x/a)^2))
   proof
   let x;
   assume
A10:x in Z;
then
A11:x in dom (g-f1^2) & (g-f1^2).x in dom ( #R (1/2)) by A5,FUNCT_1:11;
then A12:(g-f1^2).x in right_open_halfline(0) by TAYLOR_1:def 4;
    -1 < f1.x & f1.x < 1 by A1,A10; then
   0 < 1+f1.x & 0 < 1-f1.x by XREAL_1:50,148; then
A13:0 < (1+f1.x)*(1-f1.x) by XREAL_1:129;
A14:f1.x=x/a by A1,A10;
   (arccos*f1-(id Z)/(a(#)(( #R (1/2))*(g-f1^2)))).x
  =(arccos*f1).x-((id Z)/(a(#)(( #R (1/2))*(g-f1^2)))).x
    by A1,A10,VALUED_1:13
 .=arccos.(f1.x)-((id Z)/(a(#)(( #R (1/2))*(g-f1^2)))).x
    by A2,A10,FUNCT_1:12
 .=arccos.(x/a)-((id Z)/(a(#)(( #R (1/2))*(g-f1^2)))).x by A1,A10
 .=arccos.(x/a)-(id Z).x/(a(#)(( #R (1/2))*(g-f1^2))).x
    by A2,A10,RFUNCT_1:def 1
 .=arccos.(x/a)-x/(a(#)(( #R (1/2))*(g-f1^2))).x by A10,FUNCT_1:18
 .=arccos.(x/a)-x/(a*(( #R (1/2))*(g-f1^2)).x) by VALUED_1:6
 .=arccos.(x/a)-x/(a*(( #R (1/2)).((g-f1^2).x))) by A5,A10,FUNCT_1:12
 .=arccos.(x/a)-x/(a*(((g-f1^2).x) #R (1/2))) by A12,TAYLOR_1:def 4
 .=arccos.(x/a)-x/(a*((g.x-((f1^2).x)) #R (1/2))) by A11,VALUED_1:13
 .=arccos.(x/a)-x/(a*((g.x-((f1.x)^2)) #R (1/2))) by VALUED_1:11
 .=arccos.(x/a)-x/(a*((1-(f1.x)^2) #R (1/2))) by A1,A10
 .=arccos.(x/a)-x/(a*((1-(x/a)^2) #R (1/2))) by A1,A10
 .=arccos.(x/a)-x/(a*sqrt(1-(x/a)^2)) by A14,A13,FDIFF_7:2;
    hence thesis by A1;
    end;
A15:for x being Element of REAL st x in dom (((id Z)(#)((arccos)*f1))`|Z) holds
   (((id Z)(#)((arccos)*f1))`|Z).x=f.x
   proof
   let x be Element of REAL;
   assume x in dom (((id Z)(#)((arccos)*f1))`|Z);then
A16:x in Z by A8,FDIFF_1:def 7; then
   (((id Z)(#)((arccos)*f1))`|Z).x=arccos.(x/a)-x/(a*sqrt(1-(x/a)^2))
   by A3,A7,FDIFF_7:26
   .=f.x by A9,A16;
   hence thesis;
   end;
   dom (((id Z)(#)((arccos)*f1))`|Z)=dom f by A1,A8,FDIFF_1:def 7;
   then (((id Z)(#)((arccos)*f1))`|Z)= f by A15,PARTFUN1:5;
   hence thesis by A1,A6,A8,INTEGRA5:13;
end;
