let A be closed-interval Subset of REAL ; :: thesis: for f1, g, f2, f being PartFunc of REAL ,REAL
for Z being open Subset of REAL st A c= Z & f1 = g - f2 & f2 = #Z 2 & ( for x being Real st x in Z holds
( f . x = x * ((1 - (x #Z 2)) #R (- (1 / 2))) & g . x = 1 & f1 . x > 0 ) ) & Z c= dom ((#R (1 / 2)) * f1) & Z = dom f & f | A is continuous holds
integral f,A = ((- ((#R (1 / 2)) * f1)) . (sup A)) - ((- ((#R (1 / 2)) * f1)) . (inf A))

let f1, g, f2, f be PartFunc of REAL ,REAL ; :: thesis: for Z being open Subset of REAL st A c= Z & f1 = g - f2 & f2 = #Z 2 & ( for x being Real st x in Z holds
( f . x = x * ((1 - (x #Z 2)) #R (- (1 / 2))) & g . x = 1 & f1 . x > 0 ) ) & Z c= dom ((#R (1 / 2)) * f1) & Z = dom f & f | A is continuous holds
integral f,A = ((- ((#R (1 / 2)) * f1)) . (sup A)) - ((- ((#R (1 / 2)) * f1)) . (inf A))

let Z be open Subset of REAL ; :: thesis: ( A c= Z & f1 = g - f2 & f2 = #Z 2 & ( for x being Real st x in Z holds
( f . x = x * ((1 - (x #Z 2)) #R (- (1 / 2))) & g . x = 1 & f1 . x > 0 ) ) & Z c= dom ((#R (1 / 2)) * f1) & Z = dom f & f | A is continuous implies integral f,A = ((- ((#R (1 / 2)) * f1)) . (sup A)) - ((- ((#R (1 / 2)) * f1)) . (inf A)) )

assume A1: ( A c= Z & f1 = g - f2 & f2 = #Z 2 & ( for x being Real st x in Z holds
( f . x = x * ((1 - (x #Z 2)) #R (- (1 / 2))) & g . x = 1 & f1 . x > 0 ) ) & Z c= dom ((#R (1 / 2)) * f1) & Z = dom f & f | A is continuous ) ; :: thesis: integral f,A = ((- ((#R (1 / 2)) * f1)) . (sup A)) - ((- ((#R (1 / 2)) * f1)) . (inf A))
then A2: ( f is_integrable_on A & f | A is bounded ) by INTEGRA5:10, INTEGRA5:11;
A3: for x being Real st x in Z holds
( g . x = 1 & f1 . x > 0 ) by A1;
A4: Z c= dom (- ((#R (1 / 2)) * f1)) by A1, VALUED_1:8;
A5: for y being set st y in Z holds
y in dom f1 by A1, FUNCT_1:21;
A6: Z c= dom (g + ((- 1) (#) f2)) by A1, A5, TARSKI:def 3;
A7: (#R (1 / 2)) * f1 is_differentiable_on Z by A1, A3, FDIFF_7:22;
A8: (- 1) (#) ((#R (1 / 2)) * f1) is_differentiable_on Z by A4, A7, FDIFF_1:28, X;
A9: ( f2 = #Z 2 & ( for x being Real st x in Z holds
g . x = 1 + (0 * x) ) ) by A1;
A10: ( f1 is_differentiable_on Z & ( for x being Real st x in Z holds
(f1 `| Z) . x = 0 + ((2 * (- 1)) * x) ) ) by A1, A6, A9, FDIFF_4:12, X;
A11: for x being Real st x in Z holds
((- ((#R (1 / 2)) * f1)) `| Z) . x = x * ((1 - (x #Z 2)) #R (- (1 / 2)))
proof
let x be Real; :: thesis: ( x in Z implies ((- ((#R (1 / 2)) * f1)) `| Z) . x = x * ((1 - (x #Z 2)) #R (- (1 / 2))) )
assume A12: x in Z ; :: thesis: ((- ((#R (1 / 2)) * f1)) `| Z) . x = x * ((1 - (x #Z 2)) #R (- (1 / 2)))
then A13: x in dom (g - f2) by A1, FUNCT_1:21;
A14: f1 is_differentiable_in x by A10, A12, FDIFF_1:16;
A15: (g - f2) . x = (g . x) - (f2 . x) by A13, VALUED_1:13
.= 1 - (f2 . x) by A1, A12
.= 1 - (x #Z 2) by A1, TAYLOR_1:def 1 ;
then A16: ( f1 . x = 1 - (x #Z 2) & f1 . x > 0 ) by A1, A12;
A17: (#R (1 / 2)) * f1 is_differentiable_in x by A7, A12, FDIFF_1:16;
((- ((#R (1 / 2)) * f1)) `| Z) . x = diff (- ((#R (1 / 2)) * f1)),x by A8, A12, FDIFF_1:def 8
.= (- 1) * (diff ((#R (1 / 2)) * f1),x) by A17, FDIFF_1:23, X
.= (- 1) * (((1 / 2) * ((f1 . x) #R ((1 / 2) - 1))) * (diff f1,x)) by A14, A16, TAYLOR_1:22
.= (- 1) * (((1 / 2) * ((f1 . x) #R ((1 / 2) - 1))) * ((f1 `| Z) . x)) by A10, A12, FDIFF_1:def 8
.= (- 1) * (((1 / 2) * ((f1 . x) #R ((1 / 2) - 1))) * (0 + ((2 * (- 1)) * x))) by A1, A6, A9, FDIFF_4:12, X, A12
.= x * ((1 - (x #Z 2)) #R (- (1 / 2))) by A1, A15 ;
hence ((- ((#R (1 / 2)) * f1)) `| Z) . x = x * ((1 - (x #Z 2)) #R (- (1 / 2))) ; :: thesis: verum
end;
A18: for x being Real st x in dom ((- ((#R (1 / 2)) * f1)) `| Z) holds
((- ((#R (1 / 2)) * f1)) `| Z) . x = f . x
proof
let x be Real; :: thesis: ( x in dom ((- ((#R (1 / 2)) * f1)) `| Z) implies ((- ((#R (1 / 2)) * f1)) `| Z) . x = f . x )
assume x in dom ((- ((#R (1 / 2)) * f1)) `| Z) ; :: thesis: ((- ((#R (1 / 2)) * f1)) `| Z) . x = f . x
then A19: x in Z by A8, FDIFF_1:def 8;
then ((- ((#R (1 / 2)) * f1)) `| Z) . x = x * ((1 - (x #Z 2)) #R (- (1 / 2))) by A11
.= f . x by A1, A19 ;
hence ((- ((#R (1 / 2)) * f1)) `| Z) . x = f . x ; :: thesis: verum
end;
dom ((- ((#R (1 / 2)) * f1)) `| Z) = dom f by A1, A8, FDIFF_1:def 8;
then (- ((#R (1 / 2)) * f1)) `| Z = f by A18, PARTFUN1:34;
hence integral f,A = ((- ((#R (1 / 2)) * f1)) . (sup A)) - ((- ((#R (1 / 2)) * f1)) . (inf A)) by A1, A2, A8, INTEGRA5:13; :: thesis: verum