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