let A be non empty closed_interval Subset of REAL; :: thesis: for f, g, f1, f2 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)) . (upper_bound A)) - ((- ((#R (1 / 2)) * f1)) . (lower_bound A))

let f, g, f1, f2 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)) . (upper_bound A)) - ((- ((#R (1 / 2)) * f1)) . (lower_bound 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)) . (upper_bound A)) - ((- ((#R (1 / 2)) * f1)) . (lower_bound 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)) . (upper_bound A)) - ((- ((#R (1 / 2)) * f1)) . (lower_bound 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;
for y being object st y in Z holds
y in dom f1 by A1, FUNCT_1:11;
then A5: Z c= dom (g + ((- 1) (#) f2)) by A1;
A6: (#R (1 / 2)) * f1 is_differentiable_on Z by A1, A3, FDIFF_7:22;
then A7: (- 1) (#) ((#R (1 / 2)) * f1) is_differentiable_on Z by A4, FDIFF_1:20;
A8: ( f2 = #Z 2 & ( for x being Real st x in Z holds
g . x = 1 + (0 * x) ) ) by A1;
then A9: ( f1 is_differentiable_on Z & ( for x being Real st x in Z holds
(f1 `| Z) . x = 0 + ((2 * (- 1)) * x) ) ) by A1, A5, FDIFF_4:12;
A10: 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 A11: x in Z ; :: thesis: ((- ((#R (1 / 2)) * f1)) `| Z) . x = x * ((1 - (x #Z 2)) #R (- (1 / 2)))
then A12: x in dom (g - f2) by A1, FUNCT_1:11;
A13: f1 is_differentiable_in x by A9, A11, FDIFF_1:9;
A14: (g - f2) . x = (g . x) - (f2 . x) by A12, VALUED_1:13
.= 1 - (f2 . x) by A1, A11
.= 1 - (x #Z 2) by A1, TAYLOR_1:def 1 ;
then A15: ( f1 . x = 1 - (x #Z 2) & f1 . x > 0 ) by A1, A11;
A16: (#R (1 / 2)) * f1 is_differentiable_in x by A6, A11, FDIFF_1:9;
((- ((#R (1 / 2)) * f1)) `| Z) . x = diff ((- ((#R (1 / 2)) * f1)),x) by A7, A11, FDIFF_1:def 7
.= (- 1) * (diff (((#R (1 / 2)) * f1),x)) by A16, FDIFF_1:15
.= (- 1) * (((1 / 2) * ((f1 . x) #R ((1 / 2) - 1))) * (diff (f1,x))) by A13, A15, TAYLOR_1:22
.= (- 1) * (((1 / 2) * ((f1 . x) #R ((1 / 2) - 1))) * ((f1 `| Z) . x)) by A9, A11, FDIFF_1:def 7
.= (- 1) * (((1 / 2) * ((f1 . x) #R ((1 / 2) - 1))) * (0 + ((2 * (- 1)) * x))) by A1, A5, A8, A11, FDIFF_4:12
.= x * ((1 - (x #Z 2)) #R (- (1 / 2))) by A1, A14 ;
hence ((- ((#R (1 / 2)) * f1)) `| Z) . x = x * ((1 - (x #Z 2)) #R (- (1 / 2))) ; :: thesis: verum
end;
A17: for x being Element of REAL st x in dom ((- ((#R (1 / 2)) * f1)) `| Z) holds
((- ((#R (1 / 2)) * f1)) `| Z) . x = f . x
proof
let x be Element of 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 A18: x in Z by A7, FDIFF_1:def 7;
then ((- ((#R (1 / 2)) * f1)) `| Z) . x = x * ((1 - (x #Z 2)) #R (- (1 / 2))) by A10
.= f . x by A1, A18 ;
hence ((- ((#R (1 / 2)) * f1)) `| Z) . x = f . x ; :: thesis: verum
end;
dom ((- ((#R (1 / 2)) * f1)) `| Z) = dom f by A1, A7, FDIFF_1:def 7;
then (- ((#R (1 / 2)) * f1)) `| Z = f by A17, PARTFUN1:5;
hence integral (f,A) = ((- ((#R (1 / 2)) * f1)) . (upper_bound A)) - ((- ((#R (1 / 2)) * f1)) . (lower_bound A)) by A1, A2, A7, INTEGRA5:13; :: thesis: verum