 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 & Z = dom f & f=exp_R(#)(sin/cos)+exp_R/cos^2 implies
 integral(f,A)=(exp_R(#)tan).(upper_bound A)-(exp_R(#)tan).(lower_bound A)
 proof
 assume
A1:A c= Z & Z = dom f & f=exp_R(#)(sin/cos)+exp_R/cos^2;
then Z = dom (exp_R(#)(sin/cos)) /\ dom (exp_R/cos^2) by VALUED_1:def 1;
then
A2:Z c= dom (exp_R(#)(sin/cos)) & Z c= dom (exp_R/cos^2) by XBOOLE_1:18;
A3:dom (exp_R(#)(sin/cos)) c= dom exp_R /\ dom (sin/cos) by VALUED_1:def 4;
dom (exp_R/cos^2) c= dom exp_R /\ (dom cos^2 \ (cos^2)"{0})
   by RFUNCT_1:def 1;
   then dom (exp_R(#)(sin/cos)) c= dom exp_R &
   dom (exp_R(#)(sin/cos)) c= dom (sin/cos) &
   dom (exp_R/cos^2) c= dom cos^2 \ (cos^2)"{0} by A3,XBOOLE_1:18; then
A4:Z c= dom exp_R & Z c= dom (sin/cos) & Z c= dom cos^2 \ (cos^2)"{0}
   by A2;
A5:exp_R is_differentiable_on Z by FDIFF_1:26,TAYLOR_1:16;
for x st x in Z holds sin/cos is_differentiable_in x
    proof
    let x;
    assume x in Z;then
    cos.x<>0 by A4,FDIFF_8:1;
    hence thesis by FDIFF_7:46;
    end;
then sin/cos is_differentiable_on Z by A4,FDIFF_1:9;
then A6:exp_R(#)(sin/cos) is_differentiable_on Z by A2,A5,FDIFF_1:21;
cos is_differentiable_on Z by FDIFF_1:26,SIN_COS:67;
then A7:cos^2 is_differentiable_on Z by FDIFF_2:20;
x in Z implies (cos^2).x<>0
    proof
    assume x in Z;then
    x in dom (exp_R/cos^2) by A2;
    then x in dom exp_R /\ (dom cos^2 \ (cos^2)"{0}) by RFUNCT_1:def 1;
    then x in dom cos^2 \ (cos^2)"{0} by XBOOLE_0:def 4;
    then x in dom ((cos^2)^) by RFUNCT_1:def 2;
      hence thesis by RFUNCT_1:3;
    end;
then exp_R/cos^2 is_differentiable_on Z by A5,A7,FDIFF_2:21;
    then f|Z is continuous by A1,A6,FDIFF_1:18,25;then
f|A is continuous by A1,FCONT_1:16;
then A8:f is_integrable_on A & f|A is bounded by A1,INTEGRA5:10,11;
A9:(exp_R(#)tan) is_differentiable_on Z by A2,FDIFF_8:30;
A10:for x st x in Z holds f.x=exp_R.x*sin.x/cos.x+exp_R.x/(cos.x)^2
   proof
   let x;
   assume
A11:x in Z;
  then (exp_R(#)(sin/cos)+exp_R/cos^2).x
  =((exp_R(#)(sin/cos)).x)+(exp_R/cos^2).x by A1,VALUED_1:def 1
 .=((exp_R.x)*((sin/cos).x))+(exp_R/cos^2).x by VALUED_1:5
 .=((exp_R.x)*(sin.x*(cos.x)"))+(exp_R/cos^2).x by A4,A11,RFUNCT_1:def 1
 .=(exp_R.x)*sin.x/cos.x+exp_R.x/(cos^2).x by A2,A11,RFUNCT_1:def 1
 .=exp_R.x*sin.x/cos.x+exp_R.x/(cos.x)^2 by VALUED_1:11;
   hence thesis by A1;
   end;
A12:for x being Element of REAL
    st x in dom((exp_R(#)tan)`|Z) holds ((exp_R(#)tan)`|Z).x=f.x
   proof
     let x be Element of REAL;
     assume x in dom((exp_R(#)tan)`|Z);then
A13: x in Z by A9,FDIFF_1:def 7; then
 ((exp_R(#)tan)`|Z).x=exp_R.x*sin.x/cos.x+exp_R.x/(cos.x)^2 by A2,FDIFF_8:30
                    .=f.x by A13,A10;
   hence thesis;
   end;
   dom((exp_R(#)tan)`|Z)=dom f by A1,A9,FDIFF_1:def 7;
   then ((exp_R(#)tan)`|Z)= f by A12,PARTFUN1:5;
   hence thesis by A1,A8,A2,FDIFF_8:30,INTEGRA5:13;
 end;
