let A be closed-interval Subset of REAL ; :: thesis: for Z being open Subset of REAL st A c= Z holds
integral ((- (id Z)) (#) sin ),A = (((- sin ) + ((id Z) (#) cos )) . (upper_bound A)) - (((- sin ) + ((id Z) (#) cos )) . (lower_bound A))

let Z be open Subset of REAL ; :: thesis: ( A c= Z implies integral ((- (id Z)) (#) sin ),A = (((- sin ) + ((id Z) (#) cos )) . (upper_bound A)) - (((- sin ) + ((id Z) (#) cos )) . (lower_bound A)) )
assume A1: A c= Z ; :: thesis: integral ((- (id Z)) (#) sin ),A = (((- sin ) + ((id Z) (#) cos )) . (upper_bound A)) - (((- sin ) + ((id Z) (#) cos )) . (lower_bound A))
A2: Z = dom ((- (id Z)) (#) sin )
proof
dom ((- (id Z)) (#) sin ) = (dom (- (id Z))) /\ REAL by SIN_COS:27, VALUED_1:def 4
.= dom (- (id Z)) by XBOOLE_1:28
.= dom (id Z) by VALUED_1:8 ;
hence Z = dom ((- (id Z)) (#) sin ) by RELAT_1:71; :: thesis: verum
end;
Z c= (dom (- (id Z))) /\ (dom sin ) by A2, VALUED_1:def 4;
then B1: ( Z c= dom (- (id Z)) & Z c= dom sin ) by XBOOLE_1:18;
B2: for x being Real st x in Z holds
(- (id Z)) . x = ((- 1) * x) + 0
proof
let x be Real; :: thesis: ( x in Z implies (- (id Z)) . x = ((- 1) * x) + 0 )
assume B3: x in Z ; :: thesis: (- (id Z)) . x = ((- 1) * x) + 0
(- (id Z)) . x = - ((id Z) . x) by VALUED_1:8
.= - x by B3, FUNCT_1:35
.= ((- 1) * x) + 0 ;
hence (- (id Z)) . x = ((- 1) * x) + 0 ; :: thesis: verum
end;
then B4: - (id Z) is_differentiable_on Z by B1, FDIFF_1:31;
A3: sin is_differentiable_on Z by FDIFF_1:34, SIN_COS:73;
((- (id Z)) (#) sin ) | Z is continuous by A2, B4, A3, FDIFF_1:29, FDIFF_1:33;
then ((- (id Z)) (#) sin ) | A is continuous by A1, FCONT_1:17;
then A4: ( (- (id Z)) (#) sin is_integrable_on A & ((- (id Z)) (#) sin ) | A is bounded ) by A1, A2, INTEGRA5:10, INTEGRA5:11;
A5: (- sin ) + ((id Z) (#) cos ) is_differentiable_on Z by Th17;
B: for x being Real st x in Z holds
((- (id Z)) (#) sin ) . x = - (x * (sin . x))
proof
let x be Real; :: thesis: ( x in Z implies ((- (id Z)) (#) sin ) . x = - (x * (sin . x)) )
assume C: x in Z ; :: thesis: ((- (id Z)) (#) sin ) . x = - (x * (sin . x))
((- (id Z)) (#) sin ) . x = ((- (id Z)) . x) * (sin . x) by VALUED_1:5
.= (((- 1) * x) + 0 ) * (sin . x) by B2, C
.= - (x * (sin . x)) ;
hence ((- (id Z)) (#) sin ) . x = - (x * (sin . x)) ; :: thesis: verum
end;
A6: for x being Real st x in dom (((- sin ) + ((id Z) (#) cos )) `| Z) holds
(((- sin ) + ((id Z) (#) cos )) `| Z) . x = ((- (id Z)) (#) sin ) . x
proof
let x be Real; :: thesis: ( x in dom (((- sin ) + ((id Z) (#) cos )) `| Z) implies (((- sin ) + ((id Z) (#) cos )) `| Z) . x = ((- (id Z)) (#) sin ) . x )
assume x in dom (((- sin ) + ((id Z) (#) cos )) `| Z) ; :: thesis: (((- sin ) + ((id Z) (#) cos )) `| Z) . x = ((- (id Z)) (#) sin ) . x
then A7: x in Z by A5, FDIFF_1:def 8;
then (((- sin ) + ((id Z) (#) cos )) `| Z) . x = - (x * (sin . x)) by Th17
.= ((- (id Z)) (#) sin ) . x by B, A7 ;
hence (((- sin ) + ((id Z) (#) cos )) `| Z) . x = ((- (id Z)) (#) sin ) . x ; :: thesis: verum
end;
dom (((- sin ) + ((id Z) (#) cos )) `| Z) = dom ((- (id Z)) (#) sin ) by A2, A5, FDIFF_1:def 8;
then ((- sin ) + ((id Z) (#) cos )) `| Z = (- (id Z)) (#) sin by A6, PARTFUN1:34;
hence integral ((- (id Z)) (#) sin ),A = (((- sin ) + ((id Z) (#) cos )) . (upper_bound A)) - (((- sin ) + ((id Z) (#) cos )) . (lower_bound A)) by A1, A4, Th17, INTEGRA5:13; :: thesis: verum