let a, b be Real; :: thesis: for A being closed-interval Subset of REAL
for f1, f being PartFunc of REAL ,REAL
for Z being open Subset of REAL st A c= Z & ( for x being Real st x in Z holds
f1 . x = (a * x) + b ) & Z = dom f & f = (a (#) (cos / sin )) - (f1 / (sin ^2 )) holds
integral f,A = ((f1 (#) cot ) . (sup A)) - ((f1 (#) cot ) . (inf A))

let A be closed-interval Subset of REAL ; :: thesis: for f1, f being PartFunc of REAL ,REAL
for Z being open Subset of REAL st A c= Z & ( for x being Real st x in Z holds
f1 . x = (a * x) + b ) & Z = dom f & f = (a (#) (cos / sin )) - (f1 / (sin ^2 )) holds
integral f,A = ((f1 (#) cot ) . (sup A)) - ((f1 (#) cot ) . (inf A))

let f1, f be PartFunc of REAL ,REAL ; :: thesis: for Z being open Subset of REAL st A c= Z & ( for x being Real st x in Z holds
f1 . x = (a * x) + b ) & Z = dom f & f = (a (#) (cos / sin )) - (f1 / (sin ^2 )) holds
integral f,A = ((f1 (#) cot ) . (sup A)) - ((f1 (#) cot ) . (inf A))

let Z be open Subset of REAL ; :: thesis: ( A c= Z & ( for x being Real st x in Z holds
f1 . x = (a * x) + b ) & Z = dom f & f = (a (#) (cos / sin )) - (f1 / (sin ^2 )) implies integral f,A = ((f1 (#) cot ) . (sup A)) - ((f1 (#) cot ) . (inf A)) )

assume A1: ( A c= Z & ( for x being Real st x in Z holds
f1 . x = (a * x) + b ) & Z = dom f & f = (a (#) (cos / sin )) - (f1 / (sin ^2 )) ) ; :: thesis: integral f,A = ((f1 (#) cot ) . (sup A)) - ((f1 (#) cot ) . (inf A))
A3: Z = (dom (a (#) (cos / sin ))) /\ (dom (- (f1 / (sin ^2 )))) by A1, VALUED_1:def 1;
A4: Z c= dom (a (#) (cos / sin )) by XBOOLE_1:18, A3;
A5: Z c= dom (cos / sin ) by A4, VALUED_1:def 5;
A6: Z c= dom (- (f1 / (sin ^2 ))) by XBOOLE_1:18, A3;
A7: Z c= dom (f1 / (sin ^2 )) by A6, VALUED_1:8;
dom (f1 / (sin ^2 )) = (dom f1) /\ ((dom (sin ^2 )) \ ((sin ^2 ) " {0 })) by RFUNCT_1:def 4;
then A9: Z c= dom f1 by A7, XBOOLE_1:18;
A11: Z c= (dom f1) /\ (dom cot ) by XBOOLE_1:19, A9, A5;
A12: Z c= dom (f1 (#) cot ) by A11, VALUED_1:def 4;
A13: for x being Real st x in Z holds
cos / sin is_differentiable_in x
proof end;
A14: cos / sin is_differentiable_on Z by A5, A13, FDIFF_1:16;
A15: a (#) (cos / sin ) is_differentiable_on Z by A4, A14, FDIFF_1:28;
A16: f1 is_differentiable_on Z by A1, A9, FDIFF_1:31;
A17: sin is_differentiable_on Z by FDIFF_1:34, SIN_COS:73;
A18: sin ^2 is_differentiable_on Z by FDIFF_2:20, A17;
A19: for x being Real st x in Z holds
(sin ^2 ) . x <> 0
proof
let x be Real; :: thesis: ( x in Z implies (sin ^2 ) . x <> 0 )
assume x in Z ; :: thesis: (sin ^2 ) . x <> 0
then x in dom (f1 / (sin ^2 )) by A7;
then x in (dom f1) /\ ((dom (sin ^2 )) \ ((sin ^2 ) " {0 })) by RFUNCT_1:def 4;
then x in (dom (sin ^2 )) \ ((sin ^2 ) " {0 }) by XBOOLE_0:def 4;
then x in dom ((sin ^2 ) ^ ) by RFUNCT_1:def 8;
hence (sin ^2 ) . x <> 0 by RFUNCT_1:13; :: thesis: verum
end;
f1 / (sin ^2 ) is_differentiable_on Z by A16, A18, A19, FDIFF_2:21;
then f | Z is continuous by FDIFF_1:33, A1, A15, FDIFF_1:27;
then A22: f | A is continuous by A1, FCONT_1:17;
A23: ( f is_integrable_on A & f | A is bounded ) by A1, A22, INTEGRA5:10, INTEGRA5:11;
A24: f1 (#) cot is_differentiable_on Z by A1, A12, FDIFF_8:29;
B1: for x being Real st x in Z holds
f . x = ((a * (cos . x)) / (sin . x)) - (((a * x) + b) / ((sin . x) ^2 ))
proof
let x be Real; :: thesis: ( x in Z implies f . x = ((a * (cos . x)) / (sin . x)) - (((a * x) + b) / ((sin . x) ^2 )) )
assume B2: x in Z ; :: thesis: f . x = ((a * (cos . x)) / (sin . x)) - (((a * x) + b) / ((sin . x) ^2 ))
((a (#) (cos / sin )) - (f1 / (sin ^2 ))) . x = ((a (#) (cos / sin )) . x) - ((f1 / (sin ^2 )) . x) by VALUED_1:13, A1, B2
.= (a * ((cos / sin ) . x)) - ((f1 / (sin ^2 )) . x) by VALUED_1:6
.= (a * ((cos . x) / (sin . x))) - ((f1 / (sin ^2 )) . x) by RFUNCT_1:def 4, B2, A5
.= ((a * (cos . x)) / (sin . x)) - ((f1 . x) / ((sin ^2 ) . x)) by RFUNCT_1:def 4, B2, A7
.= ((a * (cos . x)) / (sin . x)) - ((f1 . x) / ((sin . x) ^2 )) by VALUED_1:11
.= ((a * (cos . x)) / (sin . x)) - (((a * x) + b) / ((sin . x) ^2 )) by A1, B2 ;
hence f . x = ((a * (cos . x)) / (sin . x)) - (((a * x) + b) / ((sin . x) ^2 )) by A1; :: thesis: verum
end;
A25: for x being Real st x in dom ((f1 (#) cot ) `| Z) holds
((f1 (#) cot ) `| Z) . x = f . x
proof
let x be Real; :: thesis: ( x in dom ((f1 (#) cot ) `| Z) implies ((f1 (#) cot ) `| Z) . x = f . x )
assume x in dom ((f1 (#) cot ) `| Z) ; :: thesis: ((f1 (#) cot ) `| Z) . x = f . x
then A26: x in Z by A24, FDIFF_1:def 8;
then ((f1 (#) cot ) `| Z) . x = ((a * (cos . x)) / (sin . x)) - (((a * x) + b) / ((sin . x) ^2 )) by A1, A12, FDIFF_8:29
.= f . x by B1, A26 ;
hence ((f1 (#) cot ) `| Z) . x = f . x ; :: thesis: verum
end;
dom ((f1 (#) cot ) `| Z) = dom f by A1, A24, FDIFF_1:def 8;
then (f1 (#) cot ) `| Z = f by A25, PARTFUN1:34;
hence integral f,A = ((f1 (#) cot ) . (sup A)) - ((f1 (#) cot ) . (inf A)) by A1, A23, A12, FDIFF_8:29, INTEGRA5:13; :: thesis: verum