let n be Element of NAT ; :: thesis: for A being closed-interval Subset of REAL
for f being PartFunc of REAL,REAL
for Z being open Subset of REAL st A c= Z & f = (n (#) ((#Z (n - 1)) * cos)) / ((#Z (n + 1)) * sin) & 1 <= n & Z c= dom ((#Z n) * cot) & Z = dom f holds
integral (f,A) = ((- ((#Z n) * cot)) . (upper_bound A)) - ((- ((#Z n) * cot)) . (lower_bound A))

let A be closed-interval Subset of REAL; :: thesis: for f being PartFunc of REAL,REAL
for Z being open Subset of REAL st A c= Z & f = (n (#) ((#Z (n - 1)) * cos)) / ((#Z (n + 1)) * sin) & 1 <= n & Z c= dom ((#Z n) * cot) & Z = dom f holds
integral (f,A) = ((- ((#Z n) * cot)) . (upper_bound A)) - ((- ((#Z n) * cot)) . (lower_bound A))

let f be PartFunc of REAL,REAL; :: thesis: for Z being open Subset of REAL st A c= Z & f = (n (#) ((#Z (n - 1)) * cos)) / ((#Z (n + 1)) * sin) & 1 <= n & Z c= dom ((#Z n) * cot) & Z = dom f holds
integral (f,A) = ((- ((#Z n) * cot)) . (upper_bound A)) - ((- ((#Z n) * cot)) . (lower_bound A))

let Z be open Subset of REAL; :: thesis: ( A c= Z & f = (n (#) ((#Z (n - 1)) * cos)) / ((#Z (n + 1)) * sin) & 1 <= n & Z c= dom ((#Z n) * cot) & Z = dom f implies integral (f,A) = ((- ((#Z n) * cot)) . (upper_bound A)) - ((- ((#Z n) * cot)) . (lower_bound A)) )
assume A1: ( A c= Z & f = (n (#) ((#Z (n - 1)) * cos)) / ((#Z (n + 1)) * sin) & 1 <= n & Z c= dom ((#Z n) * cot) & Z = dom f ) ; :: thesis: integral (f,A) = ((- ((#Z n) * cot)) . (upper_bound A)) - ((- ((#Z n) * cot)) . (lower_bound A))
then Z = (dom (n (#) ((#Z (n - 1)) * cos))) /\ ((dom ((#Z (n + 1)) * sin)) \ (((#Z (n + 1)) * sin) " {0})) by RFUNCT_1:def 4;
then A3: ( Z c= dom (n (#) ((#Z (n - 1)) * cos)) & Z c= (dom ((#Z (n + 1)) * sin)) \ (((#Z (n + 1)) * sin) " {0}) ) by XBOOLE_1:18;
then A4: Z c= dom (((#Z (n + 1)) * sin) ^) by RFUNCT_1:def 8;
dom (((#Z (n + 1)) * sin) ^) c= dom ((#Z (n + 1)) * sin) by RFUNCT_1:11;
then A5: Z c= dom ((#Z (n + 1)) * sin) by A4, XBOOLE_1:1;
A6: for x being Real st x in Z holds
((#Z (n + 1)) * sin) . x <> 0
proof
let x be Real; :: thesis: ( x in Z implies ((#Z (n + 1)) * sin) . x <> 0 )
assume x in Z ; :: thesis: ((#Z (n + 1)) * sin) . x <> 0
then x in (dom (n (#) ((#Z (n - 1)) * cos))) /\ ((dom ((#Z (n + 1)) * sin)) \ (((#Z (n + 1)) * sin) " {0})) by A1, RFUNCT_1:def 4;
then x in (dom ((#Z (n + 1)) * sin)) \ (((#Z (n + 1)) * sin) " {0}) by XBOOLE_0:def 4;
then x in dom (((#Z (n + 1)) * sin) ^) by RFUNCT_1:def 8;
hence ((#Z (n + 1)) * sin) . x <> 0 by RFUNCT_1:13; :: thesis: verum
end;
A9: Z c= dom ((#Z (n - 1)) * cos) by A3, VALUED_1:def 5;
A10: for x being Real holds (#Z (n - 1)) * cos is_differentiable_in x
proof
let x be Real; :: thesis: (#Z (n - 1)) * cos is_differentiable_in x
consider m being Nat such that
A11: n = m + 1 by A1, NAT_1:6;
cos is_differentiable_in x by SIN_COS:68;
hence (#Z (n - 1)) * cos is_differentiable_in x by A11, TAYLOR_1:3; :: thesis: verum
end;
(#Z (n - 1)) * cos is_differentiable_on Z
proof end;
then A15: n (#) ((#Z (n - 1)) * cos) is_differentiable_on Z by A3, FDIFF_1:28;
A16: for x being Real holds (#Z (n + 1)) * sin is_differentiable_in x
proof end;
(#Z (n + 1)) * sin is_differentiable_on Z
proof end;
then f | Z is continuous by FDIFF_1:33, A1, A6, A15, FDIFF_2:21;
then f | A is continuous by A1, FCONT_1:17;
then A22: ( f is_integrable_on A & f | A is bounded ) by A1, INTEGRA5:10, INTEGRA5:11;
A23: (#Z n) * cot is_differentiable_on Z by A1, FDIFF_8:21;
A24: dom ((#Z n) * cot) c= dom cot by RELAT_1:44;
A25: Z c= dom (- ((#Z n) * cot)) by A1, VALUED_1:8;
then A26: (- 1) (#) ((#Z n) * cot) is_differentiable_on Z by A23, FDIFF_1:28, X;
A27: for x being Real st x in Z holds
sin . x <> 0
proof
let x be Real; :: thesis: ( x in Z implies sin . x <> 0 )
assume x in Z ; :: thesis: sin . x <> 0
then x in dom (cos / sin) by A1, FUNCT_1:21;
hence sin . x <> 0 by FDIFF_8:2; :: thesis: verum
end;
A28: for x being Real st x in Z holds
((- ((#Z n) * cot)) `| Z) . x = (n * ((cos . x) #Z (n - 1))) / ((sin . x) #Z (n + 1))
proof
let x be Real; :: thesis: ( x in Z implies ((- ((#Z n) * cot)) `| Z) . x = (n * ((cos . x) #Z (n - 1))) / ((sin . x) #Z (n + 1)) )
assume A29: x in Z ; :: thesis: ((- ((#Z n) * cot)) `| Z) . x = (n * ((cos . x) #Z (n - 1))) / ((sin . x) #Z (n + 1))
then A30: sin . x <> 0 by A27;
then A31: cot is_differentiable_in x by FDIFF_7:47;
consider m being Nat such that
A32: n = m + 1 by A1, NAT_1:6;
set m = n - 1;
A33: (#Z n) * cot is_differentiable_in x by A23, A29, FDIFF_1:16;
((- ((#Z n) * cot)) `| Z) . x = diff ((- ((#Z n) * cot)),x) by A26, A29, FDIFF_1:def 8
.= (- 1) * (diff (((#Z n) * cot),x)) by A33, FDIFF_1:23, X
.= (- 1) * ((n * ((cot . x) #Z (n - 1))) * (diff (cot,x))) by A31, TAYLOR_1:3
.= (- 1) * ((n * ((cot . x) #Z (n - 1))) * (- (1 / ((sin . x) ^2)))) by A30, FDIFF_7:47
.= (- 1) * (- ((n * ((cot . x) #Z (n - 1))) / ((sin . x) ^2)))
.= (- 1) * (- ((n * (((cos . x) #Z (n - 1)) / ((sin . x) #Z (n - 1)))) / ((sin . x) ^2))) by A1, A24, A29, A32, FDIFF_8:3, XBOOLE_1:1
.= (- 1) * (- (((n * ((cos . x) #Z (n - 1))) / ((sin . x) #Z (n - 1))) / ((sin . x) ^2)))
.= (- 1) * (- ((n * ((cos . x) #Z (n - 1))) / (((sin . x) #Z (n - 1)) * ((sin . x) ^2)))) by XCMPLX_1:79
.= (- 1) * (- ((n * ((cos . x) #Z (n - 1))) / (((sin . x) #Z (n - 1)) * ((sin . x) #Z 2)))) by FDIFF_7:1
.= (- 1) * (- ((n * ((cos . x) #Z (n - 1))) / ((sin . x) #Z ((n - 1) + 2)))) by A27, A29, PREPOWER:54
.= (n * ((cos . x) #Z (n - 1))) / ((sin . x) #Z (n + 1)) ;
hence ((- ((#Z n) * cot)) `| Z) . x = (n * ((cos . x) #Z (n - 1))) / ((sin . x) #Z (n + 1)) ; :: thesis: verum
end;
B1: for x being Real st x in Z holds
f . x = (n * ((cos . x) #Z (n - 1))) / ((sin . x) #Z (n + 1))
proof
let x be Real; :: thesis: ( x in Z implies f . x = (n * ((cos . x) #Z (n - 1))) / ((sin . x) #Z (n + 1)) )
assume B2: x in Z ; :: thesis: f . x = (n * ((cos . x) #Z (n - 1))) / ((sin . x) #Z (n + 1))
then ((n (#) ((#Z (n - 1)) * cos)) / ((#Z (n + 1)) * sin)) . x = ((n (#) ((#Z (n - 1)) * cos)) . x) / (((#Z (n + 1)) * sin) . x) by RFUNCT_1:def 4, A1
.= (n * (((#Z (n - 1)) * cos) . x)) / (((#Z (n + 1)) * sin) . x) by VALUED_1:6
.= (n * ((#Z (n - 1)) . (cos . x))) / (((#Z (n + 1)) * sin) . x) by FUNCT_1:22, A9, B2
.= (n * ((cos . x) #Z (n - 1))) / (((#Z (n + 1)) * sin) . x) by TAYLOR_1:def 1
.= (n * ((cos . x) #Z (n - 1))) / ((#Z (n + 1)) . (sin . x)) by FUNCT_1:22, A5, B2
.= (n * ((cos . x) #Z (n - 1))) / ((sin . x) #Z (n + 1)) by TAYLOR_1:def 1 ;
hence f . x = (n * ((cos . x) #Z (n - 1))) / ((sin . x) #Z (n + 1)) by A1; :: thesis: verum
end;
A34: for x being Real st x in dom ((- ((#Z n) * cot)) `| Z) holds
((- ((#Z n) * cot)) `| Z) . x = f . x
proof
let x be Real; :: thesis: ( x in dom ((- ((#Z n) * cot)) `| Z) implies ((- ((#Z n) * cot)) `| Z) . x = f . x )
assume x in dom ((- ((#Z n) * cot)) `| Z) ; :: thesis: ((- ((#Z n) * cot)) `| Z) . x = f . x
then A35: x in Z by A26, FDIFF_1:def 8;
then ((- ((#Z n) * cot)) `| Z) . x = (n * ((cos . x) #Z (n - 1))) / ((sin . x) #Z (n + 1)) by A28
.= f . x by B1, A35 ;
hence ((- ((#Z n) * cot)) `| Z) . x = f . x ; :: thesis: verum
end;
dom ((- ((#Z n) * cot)) `| Z) = dom f by A1, A26, FDIFF_1:def 8;
then (- ((#Z n) * cot)) `| Z = f by A34, PARTFUN1:34;
hence integral (f,A) = ((- ((#Z n) * cot)) . (upper_bound A)) - ((- ((#Z n) * cot)) . (lower_bound A)) by A1, A22, A23, A25, FDIFF_1:28, X, INTEGRA5:13; :: thesis: verum