let a be Real; :: thesis: for A being non empty closed_interval Subset of REAL
for f, f1 being PartFunc of REAL,REAL
for Z being open Subset of REAL st A c= Z & Z c= dom (cot * f1) & f = ((cos * f1) ^2) / ((sin * f1) ^2) & ( for x being Real st x in Z holds
( f1 . x = a * x & a <> 0 ) ) & Z = dom f holds
integral (f,A) = ((((- (1 / a)) (#) (cot * f1)) - (id Z)) . (upper_bound A)) - ((((- (1 / a)) (#) (cot * f1)) - (id Z)) . (lower_bound A))

let A be non empty closed_interval Subset of REAL; :: thesis: for f, f1 being PartFunc of REAL,REAL
for Z being open Subset of REAL st A c= Z & Z c= dom (cot * f1) & f = ((cos * f1) ^2) / ((sin * f1) ^2) & ( for x being Real st x in Z holds
( f1 . x = a * x & a <> 0 ) ) & Z = dom f holds
integral (f,A) = ((((- (1 / a)) (#) (cot * f1)) - (id Z)) . (upper_bound A)) - ((((- (1 / a)) (#) (cot * f1)) - (id Z)) . (lower_bound A))

let f, f1 be PartFunc of REAL,REAL; :: thesis: for Z being open Subset of REAL st A c= Z & Z c= dom (cot * f1) & f = ((cos * f1) ^2) / ((sin * f1) ^2) & ( for x being Real st x in Z holds
( f1 . x = a * x & a <> 0 ) ) & Z = dom f holds
integral (f,A) = ((((- (1 / a)) (#) (cot * f1)) - (id Z)) . (upper_bound A)) - ((((- (1 / a)) (#) (cot * f1)) - (id Z)) . (lower_bound A))

let Z be open Subset of REAL; :: thesis: ( A c= Z & Z c= dom (cot * f1) & f = ((cos * f1) ^2) / ((sin * f1) ^2) & ( for x being Real st x in Z holds
( f1 . x = a * x & a <> 0 ) ) & Z = dom f implies integral (f,A) = ((((- (1 / a)) (#) (cot * f1)) - (id Z)) . (upper_bound A)) - ((((- (1 / a)) (#) (cot * f1)) - (id Z)) . (lower_bound A)) )

assume A1: ( A c= Z & Z c= dom (cot * f1) & f = ((cos * f1) ^2) / ((sin * f1) ^2) & ( for x being Real st x in Z holds
( f1 . x = a * x & a <> 0 ) ) & Z = dom f ) ; :: thesis: integral (f,A) = ((((- (1 / a)) (#) (cot * f1)) - (id Z)) . (upper_bound A)) - ((((- (1 / a)) (#) (cot * f1)) - (id Z)) . (lower_bound A))
then A2: Z c= dom ((- (1 / a)) (#) (cot * f1)) by VALUED_1:def 5;
Z c= (dom ((- (1 / a)) (#) (cot * f1))) /\ (dom (id Z)) by A2, XBOOLE_1:19;
then A3: Z c= dom (((- (1 / a)) (#) (cot * f1)) - (id Z)) by VALUED_1:12;
A4: for x being Real st x in Z holds
f1 . x = (a * x) + 0 by A1;
Z = (dom ((cos * f1) ^2)) /\ ((dom ((sin * f1) ^2)) \ (((sin * f1) ^2) " {0})) by A1, RFUNCT_1:def 1;
then A5: ( Z c= dom ((cos * f1) ^2) & Z c= (dom ((sin * f1) ^2)) \ (((sin * f1) ^2) " {0}) ) by XBOOLE_1:18;
then A6: Z c= dom (cos * f1) by VALUED_1:11;
A7: Z c= dom (((sin * f1) ^2) ^) by A5, RFUNCT_1:def 2;
dom (((sin * f1) ^2) ^) c= dom ((sin * f1) ^2) by RFUNCT_1:1;
then Z c= dom ((sin * f1) ^2) by A7;
then A8: Z c= dom (sin * f1) by VALUED_1:11;
then A9: sin * f1 is_differentiable_on Z by A4, FDIFF_4:37;
A10: cos * f1 is_differentiable_on Z by A4, A6, FDIFF_4:38;
A11: (sin * f1) ^2 is_differentiable_on Z by A9, FDIFF_2:20;
A12: (cos * f1) ^2 is_differentiable_on Z by A10, FDIFF_2:20;
for x being Real st x in Z holds
((sin * f1) ^2) . x <> 0
proof
let x be Real; :: thesis: ( x in Z implies ((sin * f1) ^2) . x <> 0 )
assume x in Z ; :: thesis: ((sin * f1) ^2) . x <> 0
then x in (dom ((cos * f1) ^2)) /\ ((dom ((sin * f1) ^2)) \ (((sin * f1) ^2) " {0})) by A1, RFUNCT_1:def 1;
then x in (dom ((sin * f1) ^2)) \ (((sin * f1) ^2) " {0}) by XBOOLE_0:def 4;
then x in dom (((sin * f1) ^2) ^) by RFUNCT_1:def 2;
hence ((sin * f1) ^2) . x <> 0 by RFUNCT_1:3; :: thesis: verum
end;
then f is_differentiable_on Z by A1, A11, A12, FDIFF_2:21;
then f | Z is continuous by FDIFF_1:25;
then f | A is continuous by A1, FCONT_1:16;
then A13: ( f is_integrable_on A & f | A is bounded ) by A1, INTEGRA5:10, INTEGRA5:11;
A14: ((- (1 / a)) (#) (cot * f1)) - (id Z) is_differentiable_on Z by A1, A3, FDIFF_8:27;
A15: for x being Real st x in Z holds
f . x = ((cos . (a * x)) ^2) / ((sin . (a * x)) ^2)
proof
let x be Real; :: thesis: ( x in Z implies f . x = ((cos . (a * x)) ^2) / ((sin . (a * x)) ^2) )
assume A16: x in Z ; :: thesis: f . x = ((cos . (a * x)) ^2) / ((sin . (a * x)) ^2)
then (((cos * f1) ^2) / ((sin * f1) ^2)) . x = (((cos * f1) ^2) . x) / (((sin * f1) ^2) . x) by A1, RFUNCT_1:def 1
.= (((cos * f1) . x) ^2) / (((sin * f1) ^2) . x) by VALUED_1:11
.= (((cos * f1) . x) ^2) / (((sin * f1) . x) ^2) by VALUED_1:11
.= ((cos . (f1 . x)) ^2) / (((sin * f1) . x) ^2) by A6, A16, FUNCT_1:12
.= ((cos . (f1 . x)) ^2) / ((sin . (f1 . x)) ^2) by A8, A16, FUNCT_1:12
.= ((cos . (a * x)) ^2) / ((sin . (f1 . x)) ^2) by A16, A1
.= ((cos . (a * x)) ^2) / ((sin . (a * x)) ^2) by A16, A1 ;
hence f . x = ((cos . (a * x)) ^2) / ((sin . (a * x)) ^2) by A1; :: thesis: verum
end;
A17: for x being Element of REAL st x in dom ((((- (1 / a)) (#) (cot * f1)) - (id Z)) `| Z) holds
((((- (1 / a)) (#) (cot * f1)) - (id Z)) `| Z) . x = f . x
proof
let x be Element of REAL ; :: thesis: ( x in dom ((((- (1 / a)) (#) (cot * f1)) - (id Z)) `| Z) implies ((((- (1 / a)) (#) (cot * f1)) - (id Z)) `| Z) . x = f . x )
assume x in dom ((((- (1 / a)) (#) (cot * f1)) - (id Z)) `| Z) ; :: thesis: ((((- (1 / a)) (#) (cot * f1)) - (id Z)) `| Z) . x = f . x
then A18: x in Z by A14, FDIFF_1:def 7;
then ((((- (1 / a)) (#) (cot * f1)) - (id Z)) `| Z) . x = ((cos . (a * x)) ^2) / ((sin . (a * x)) ^2) by A1, A3, FDIFF_8:27
.= f . x by A15, A18 ;
hence ((((- (1 / a)) (#) (cot * f1)) - (id Z)) `| Z) . x = f . x ; :: thesis: verum
end;
dom ((((- (1 / a)) (#) (cot * f1)) - (id Z)) `| Z) = dom f by A1, A14, FDIFF_1:def 7;
then (((- (1 / a)) (#) (cot * f1)) - (id Z)) `| Z = f by A17, PARTFUN1:5;
hence integral (f,A) = ((((- (1 / a)) (#) (cot * f1)) - (id Z)) . (upper_bound A)) - ((((- (1 / a)) (#) (cot * f1)) - (id Z)) . (lower_bound A)) by A1, A13, A14, INTEGRA5:13; :: thesis: verum