 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*exp_R) implies
 integral(f,A)=(-cos*exp_R).(upper_bound A)-(-cos*exp_R).(lower_bound A)
proof
 assume
A1:A c= Z & Z = dom f & f=exp_R(#)(sin*exp_R);
then Z = dom exp_R /\ dom (sin*exp_R) by VALUED_1:def 4;
then A2:Z c= dom exp_R & Z c= dom (sin*exp_R) by XBOOLE_1:18;
for y being object st y in Z holds y in dom (cos*exp_R)
   proof
   let y be object;
   assume y in Z;then
   y in dom exp_R & exp_R.y in dom cos by A2,SIN_COS:24,XREAL_0:def 1;
   hence thesis by FUNCT_1:11;
   end;
then A3:Z c= dom (cos*exp_R);
A4:sin*exp_R is_differentiable_on Z by A2,FDIFF_7:34;
exp_R is_differentiable_on Z by FDIFF_1:26,TAYLOR_1:16;
   then f|Z is continuous by A1,A4,FDIFF_1:21,25;then
f|A is continuous by A1,FCONT_1:16;
then A5:f is_integrable_on A & f|A is bounded by A1,INTEGRA5:10,11;
A6:cos*exp_R is_differentiable_on Z by A3,FDIFF_7:35;
A7:Z c= dom (-cos*exp_R) by A3,VALUED_1:8;
then A8:(-1)(#)(cos*exp_R) is_differentiable_on Z by A6,FDIFF_1:20;
A9:for x st x in Z holds ((-cos*exp_R)`|Z).x = exp_R.x * sin.(exp_R.x)
   proof
     let x;
     assume
A10:x in Z;
A11: exp_R is_differentiable_in x by SIN_COS:65;
A12: cos is_differentiable_in exp_R.x by SIN_COS:63;
A13: cos*exp_R is_differentiable_in x by A6,A10,FDIFF_1:9;
  ((-cos*exp_R)`|Z).x=diff(-cos*exp_R,x) by A8,A10,FDIFF_1:def 7
                    .=(-1)*(diff(cos*exp_R,x)) by A13,FDIFF_1:15
                    .=(-1)*(diff(cos,exp_R.x)*diff(exp_R,x))
      by A11,A12,FDIFF_2:13
                    .=(-1)*((-sin.(exp_R.x))*diff(exp_R,x)) by SIN_COS:63
                    .=(-1)*((-sin.(exp_R.x))*exp_R.x) by SIN_COS:65
                    .=exp_R.x*sin.(exp_R.x);
     hence thesis;
   end;
A14:for x st x in Z holds f.x=exp_R.x * sin.(exp_R.x)
    proof
    let x;
    assume
A15:x in Z;
   then (exp_R(#)(sin*exp_R)).x=exp_R.x*(sin*exp_R).x by A1,VALUED_1:def 4
                         .=exp_R.x*sin.(exp_R.x) by A2,A15,FUNCT_1:12;
      hence thesis by A1;
   end;
A16:for x being Element of REAL
     st x in dom((-cos*exp_R)`|Z) holds ((-cos*exp_R)`|Z).x = f.x
   proof
     let x be Element of REAL;
     assume x in dom((-cos*exp_R)`|Z);then
A17:x in Z by A8,FDIFF_1:def 7; then
  ((-cos*exp_R)`|Z).x=exp_R.x * sin.(exp_R.x) by A9
   .=f.x by A17,A14;
   hence thesis;
   end;
  dom((-cos*exp_R)`|Z)=dom f by A1,A8,FDIFF_1:def 7;
  then ((-cos*exp_R)`|Z)= f by A16,PARTFUN1:5;
  hence thesis by A1,A5,A6,A7,FDIFF_1:20,INTEGRA5:13;
end;
