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 & f1 = #Z 2 & f = (- ((sin / cos) / f1)) + (((id Z) ^) / (cos ^2)) & Z c= dom (((id Z) ^) (#) tan) & Z = dom f & f | A is continuous holds
integral (f,A) = ((((id Z) ^) (#) tan) . (upper_bound A)) - ((((id Z) ^) (#) tan) . (lower_bound A))

let f1, f be PartFunc of REAL,REAL; :: thesis: for Z being open Subset of REAL st A c= Z & f1 = #Z 2 & f = (- ((sin / cos) / f1)) + (((id Z) ^) / (cos ^2)) & Z c= dom (((id Z) ^) (#) tan) & Z = dom f & f | A is continuous holds
integral (f,A) = ((((id Z) ^) (#) tan) . (upper_bound A)) - ((((id Z) ^) (#) tan) . (lower_bound A))

let Z be open Subset of REAL; :: thesis: ( A c= Z & f1 = #Z 2 & f = (- ((sin / cos) / f1)) + (((id Z) ^) / (cos ^2)) & Z c= dom (((id Z) ^) (#) tan) & Z = dom f & f | A is continuous implies integral (f,A) = ((((id Z) ^) (#) tan) . (upper_bound A)) - ((((id Z) ^) (#) tan) . (lower_bound A)) )
assume A1: ( A c= Z & f1 = #Z 2 & f = (- ((sin / cos) / f1)) + (((id Z) ^) / (cos ^2)) & Z c= dom (((id Z) ^) (#) tan) & Z = dom f & f | A is continuous ) ; :: thesis: integral (f,A) = ((((id Z) ^) (#) tan) . (upper_bound A)) - ((((id Z) ^) (#) tan) . (lower_bound A))
then A2: ( f is_integrable_on A & f | A is bounded ) by INTEGRA5:10, INTEGRA5:11;
set g = id Z;
Z c= (dom ((id Z) ^)) /\ (dom tan) by A1, VALUED_1:def 4;
then B2: Z c= dom ((id Z) ^) by XBOOLE_1:18;
A3: not 0 in Z
proof
assume K: 0 in Z ; :: thesis: contradiction
dom ((id Z) ^) = (dom (id Z)) \ ((id Z) " {0}) by RFUNCT_1:def 8
.= (dom (id Z)) \ {0} by Lm0, K ;
then not 0 in {0} by XBOOLE_0:def 5, K, B2;
hence contradiction by TARSKI:def 1; :: thesis: verum
end;
then A4: ((id Z) ^) (#) tan is_differentiable_on Z by A1, FDIFF_8:34;
dom f = (dom (- ((sin / cos) / f1))) /\ (dom (((id Z) ^) / (cos ^2))) by VALUED_1:def 1, A1;
then ( dom f c= dom (- ((sin / cos) / f1)) & dom f c= dom (((id Z) ^) / (cos ^2)) ) by XBOOLE_1:18;
then A7: ( Z c= dom ((sin / cos) / f1) & Z c= dom (((id Z) ^) / (cos ^2)) ) by VALUED_1:8, A1;
dom ((sin / cos) / f1) = (dom (sin / cos)) /\ ((dom f1) \ (f1 " {0})) by RFUNCT_1:def 4;
then A8: Z c= dom (sin / cos) by A7, XBOOLE_1:18;
dom (((id Z) ^) / (cos ^2)) c= (dom ((id Z) ^)) /\ ((dom (cos ^2)) \ ((cos ^2) " {0})) by RFUNCT_1:def 4;
then ( dom (((id Z) ^) / (cos ^2)) c= dom ((id Z) ^) & dom (((id Z) ^) / (cos ^2)) c= (dom (cos ^2)) \ ((cos ^2) " {0}) ) by XBOOLE_1:18;
then A9: ( Z c= dom ((id Z) ^) & Z c= (dom (cos ^2)) \ ((cos ^2) " {0}) ) by A7, XBOOLE_1:1;
B3: for x being Real st x in Z holds
f . x = (- (((sin . x) / (cos . x)) / (x ^2))) + ((1 / x) / ((cos . x) ^2))
proof
let x be Real; :: thesis: ( x in Z implies f . x = (- (((sin . x) / (cos . x)) / (x ^2))) + ((1 / x) / ((cos . x) ^2)) )
assume B4: x in Z ; :: thesis: f . x = (- (((sin . x) / (cos . x)) / (x ^2))) + ((1 / x) / ((cos . x) ^2))
then ((- ((sin / cos) / f1)) + (((id Z) ^) / (cos ^2))) . x = ((- ((sin / cos) / f1)) . x) + ((((id Z) ^) / (cos ^2)) . x) by VALUED_1:def 1, A1
.= (- (((sin / cos) / f1) . x)) + ((((id Z) ^) / (cos ^2)) . x) by VALUED_1:8
.= (- (((sin / cos) . x) / (f1 . x))) + ((((id Z) ^) / (cos ^2)) . x) by RFUNCT_1:def 4, B4, A7
.= (- (((sin . x) * ((cos . x) ")) / (f1 . x))) + ((((id Z) ^) / (cos ^2)) . x) by A8, RFUNCT_1:def 4, B4
.= (- (((sin . x) / (cos . x)) / (f1 . x))) + ((((id Z) ^) . x) / ((cos ^2) . x)) by A7, RFUNCT_1:def 4, B4
.= (- (((sin . x) / (cos . x)) / (f1 . x))) + ((((id Z) . x) ") / ((cos ^2) . x)) by RFUNCT_1:def 8, A9, B4
.= (- (((sin . x) / (cos . x)) / (f1 . x))) + ((1 / x) / ((cos ^2) . x)) by FUNCT_1:35, B4
.= (- (((sin . x) / (cos . x)) / (f1 . x))) + ((1 / x) / ((cos . x) ^2)) by VALUED_1:11
.= (- (((sin . x) / (cos . x)) / (x #Z 2))) + ((1 / x) / ((cos . x) ^2)) by TAYLOR_1:def 1, A1
.= (- (((sin . x) / (cos . x)) / (x ^2))) + ((1 / x) / ((cos . x) ^2)) by FDIFF_7:1 ;
hence f . x = (- (((sin . x) / (cos . x)) / (x ^2))) + ((1 / x) / ((cos . x) ^2)) by A1; :: thesis: verum
end;
A10: for x being Real st x in dom ((((id Z) ^) (#) tan) `| Z) holds
((((id Z) ^) (#) tan) `| Z) . x = f . x
proof
let x be Real; :: thesis: ( x in dom ((((id Z) ^) (#) tan) `| Z) implies ((((id Z) ^) (#) tan) `| Z) . x = f . x )
assume x in dom ((((id Z) ^) (#) tan) `| Z) ; :: thesis: ((((id Z) ^) (#) tan) `| Z) . x = f . x
then A11: x in Z by A4, FDIFF_1:def 8;
then ((((id Z) ^) (#) tan) `| Z) . x = (- (((sin . x) / (cos . x)) / (x ^2))) + ((1 / x) / ((cos . x) ^2)) by A3, A1, FDIFF_8:34
.= f . x by A11, B3 ;
hence ((((id Z) ^) (#) tan) `| Z) . x = f . x ; :: thesis: verum
end;
dom ((((id Z) ^) (#) tan) `| Z) = dom f by A1, A4, FDIFF_1:def 8;
then (((id Z) ^) (#) tan) `| Z = f by A10, PARTFUN1:34;
hence integral (f,A) = ((((id Z) ^) (#) tan) . (upper_bound A)) - ((((id Z) ^) (#) tan) . (lower_bound A)) by A1, A2, A4, INTEGRA5:13; :: thesis: verum