begin
:: deftheorem Def1 defines #Z TAYLOR_1:def 1 :
for q being Integer
for b2 being Function of REAL,REAL holds
( b2 = #Z q iff for x being real number holds b2 . x = x #Z q );
theorem Th1:
theorem Th2:
theorem
Lm1:
for n being natural number
for x being real number holds (exp_R x) #R n = exp_R (n * x)
theorem Th4:
Lm2:
for i being Integer
for x being real number holds (exp_R x) #R i = exp_R (i * x)
theorem Th5:
theorem Th6:
Lm3:
for x being real number
for q being Rational holds (exp_R x) #R q = exp_R (q * x)
theorem Th7:
theorem Th8:
theorem Th9:
theorem
theorem
then Lm4:
number_e > 1
by XXREAL_0:2;
theorem Th12:
theorem Th13:
theorem Th14:
theorem Th15:
theorem Th16:
theorem Th17:
:: deftheorem Def2 defines log_ TAYLOR_1:def 2 :
for a being real number
for b2 being PartFunc of REAL,REAL holds
( b2 = log_ a iff ( dom b2 = right_open_halfline 0 & ( for d being Element of right_open_halfline 0 holds b2 . d = log (a,d) ) ) );
:: deftheorem defines ln TAYLOR_1:def 3 :
ln = log_ number_e;
theorem Th18:
theorem
theorem
:: deftheorem Def4 defines #R TAYLOR_1:def 4 :
for p being real number
for b2 being PartFunc of REAL,REAL holds
( b2 = #R p iff ( dom b2 = right_open_halfline 0 & ( for d being Element of right_open_halfline 0 holds b2 . d = d #R p ) ) );
theorem Th21:
theorem
begin
:: deftheorem Def5 defines diff TAYLOR_1:def 5 :
for f being PartFunc of REAL,REAL
for Z being Subset of REAL
for b3 being Functional_Sequence of REAL,REAL holds
( b3 = diff (f,Z) iff ( b3 . 0 = f | Z & ( for i being natural number holds b3 . (i + 1) = (b3 . i) `| Z ) ) );
:: deftheorem Def6 defines is_differentiable_on TAYLOR_1:def 6 :
for f being PartFunc of REAL,REAL
for n being natural number
for Z being Subset of REAL holds
( f is_differentiable_on n,Z iff for i being Element of NAT st i <= n - 1 holds
(diff (f,Z)) . i is_differentiable_on Z );
theorem Th23:
definition
let f be
PartFunc of
REAL,
REAL;
let Z be
Subset of
REAL;
let a,
b be
real number ;
func Taylor (
f,
Z,
a,
b)
-> Real_Sequence means :
Def7:
for
n being
natural number holds
it . n = ((((diff (f,Z)) . n) . a) * ((b - a) |^ n)) / (n !);
existence
ex b1 being Real_Sequence st
for n being natural number holds b1 . n = ((((diff (f,Z)) . n) . a) * ((b - a) |^ n)) / (n !)
uniqueness
for b1, b2 being Real_Sequence st ( for n being natural number holds b1 . n = ((((diff (f,Z)) . n) . a) * ((b - a) |^ n)) / (n !) ) & ( for n being natural number holds b2 . n = ((((diff (f,Z)) . n) . a) * ((b - a) |^ n)) / (n !) ) holds
b1 = b2
end;
:: deftheorem Def7 defines Taylor TAYLOR_1:def 7 :
for f being PartFunc of REAL,REAL
for Z being Subset of REAL
for a, b being real number
for b5 being Real_Sequence holds
( b5 = Taylor (f,Z,a,b) iff for n being natural number holds b5 . n = ((((diff (f,Z)) . n) . a) * ((b - a) |^ n)) / (n !) );
Lm5:
for b being Real ex g being PartFunc of REAL,REAL st
( dom g = [#] REAL & ( for x being Real holds
( g . x = b - x & ( for x being Real holds
( g is_differentiable_in x & diff (g,x) = - 1 ) ) ) ) )
Lm6:
for n being Element of NAT
for l, b being Real ex g being PartFunc of REAL,REAL st
( dom g = [#] REAL & ( for x being Real holds
( g . x = (l * ((b - x) |^ (n + 1))) / ((n + 1) !) & ( for x being Real holds
( g is_differentiable_in x & diff (g,x) = - ((l * ((b - x) |^ n)) / (n !)) ) ) ) ) )
Lm7:
for n being Element of NAT
for f being PartFunc of REAL,REAL
for Z being Subset of REAL
for b being Real ex g being PartFunc of REAL,REAL st
( dom g = Z & ( for x being Real st x in Z holds
g . x = (f . b) - ((Partial_Sums (Taylor (f,Z,x,b))) . n) ) )
theorem Th24:
Lm8:
for f being PartFunc of REAL,REAL
for Z being Subset of REAL st Z c= dom f holds
for n being Element of NAT st f is_differentiable_on n,Z holds
for a, b being Real st a < b & [.a,b.] c= Z & ((diff (f,Z)) . n) | [.a,b.] is continuous & f is_differentiable_on n + 1,].a,b.[ holds
for g being PartFunc of REAL,REAL st dom g = Z & ( for x being Real st x in Z holds
g . x = (f . b) - ((Partial_Sums (Taylor (f,Z,x,b))) . n) ) holds
( g . b = 0 & g | [.a,b.] is continuous & g is_differentiable_on ].a,b.[ & ( for x being Real st x in ].a,b.[ holds
diff (g,x) = - (((((diff (f,].a,b.[)) . (n + 1)) . x) * ((b - x) |^ n)) / (n !)) ) )
Lm9:
for n being Element of NAT
for f being PartFunc of REAL,REAL
for Z being Subset of REAL st Z c= dom f & f is_differentiable_on n,Z holds
for a, b being Real st a < b & [.a,b.] c= Z & ((diff (f,Z)) . n) | [.a,b.] is continuous & f is_differentiable_on n + 1,].a,b.[ holds
ex g being PartFunc of REAL,REAL st
( dom g = Z & ( for x being Real st x in Z holds
g . x = (f . b) - ((Partial_Sums (Taylor (f,Z,x,b))) . n) ) & g . b = 0 & g | [.a,b.] is continuous & g is_differentiable_on ].a,b.[ & ( for x being Real st x in ].a,b.[ holds
diff (g,x) = - (((((diff (f,].a,b.[)) . (n + 1)) . x) * ((b - x) |^ n)) / (n !)) ) )
theorem Th25:
for
n being
Element of
NAT for
f being
PartFunc of
REAL,
REAL for
Z being
Subset of
REAL st
Z c= dom f &
f is_differentiable_on n,
Z holds
for
a,
b being
Real st
a < b &
[.a,b.] c= Z &
((diff (f,Z)) . n) | [.a,b.] is
continuous &
f is_differentiable_on n + 1,
].a,b.[ holds
for
l being
Real for
g being
PartFunc of
REAL,
REAL st
dom g = [#] REAL & ( for
x being
Real holds
g . x = ((f . b) - ((Partial_Sums (Taylor (f,Z,x,b))) . n)) - ((l * ((b - x) |^ (n + 1))) / ((n + 1) !)) ) &
((f . b) - ((Partial_Sums (Taylor (f,Z,a,b))) . n)) - ((l * ((b - a) |^ (n + 1))) / ((n + 1) !)) = 0 holds
(
g is_differentiable_on ].a,b.[ &
g . a = 0 &
g . b = 0 &
g | [.a,b.] is
continuous & ( for
x being
Real st
x in ].a,b.[ holds
diff (
g,
x)
= (- (((((diff (f,].a,b.[)) . (n + 1)) . x) * ((b - x) |^ n)) / (n !))) + ((l * ((b - x) |^ n)) / (n !)) ) )
theorem Th26:
theorem Th27:
for
n being
Element of
NAT for
f being
PartFunc of
REAL,
REAL for
Z being
Subset of
REAL st
Z c= dom f &
f is_differentiable_on n,
Z holds
for
a,
b being
Real st
a < b &
[.a,b.] c= Z &
((diff (f,Z)) . n) | [.a,b.] is
continuous &
f is_differentiable_on n + 1,
].a,b.[ holds
ex
c being
Real st
(
c in ].a,b.[ &
f . b = ((Partial_Sums (Taylor (f,Z,a,b))) . n) + (((((diff (f,].a,b.[)) . (n + 1)) . c) * ((b - a) |^ (n + 1))) / ((n + 1) !)) )
Lm10:
for f being PartFunc of REAL,REAL
for Z being Subset of REAL st Z c= dom f holds
for n being Element of NAT st f is_differentiable_on n,Z holds
for a, b being Real st a < b & [.a,b.] c= Z & ((diff (f,Z)) . n) | [.a,b.] is continuous & f is_differentiable_on n + 1,].a,b.[ holds
for g being PartFunc of REAL,REAL st dom g = Z & ( for x being Real st x in Z holds
g . x = (f . a) - ((Partial_Sums (Taylor (f,Z,x,a))) . n) ) holds
( g . a = 0 & g | [.a,b.] is continuous & g is_differentiable_on ].a,b.[ & ( for x being Real st x in ].a,b.[ holds
diff (g,x) = - (((((diff (f,].a,b.[)) . (n + 1)) . x) * ((a - x) |^ n)) / (n !)) ) )
Lm11:
for n being Element of NAT
for f being PartFunc of REAL,REAL
for Z being Subset of REAL st Z c= dom f & f is_differentiable_on n,Z holds
for a, b being Real st a < b & [.a,b.] c= Z & ((diff (f,Z)) . n) | [.a,b.] is continuous & f is_differentiable_on n + 1,].a,b.[ holds
ex g being PartFunc of REAL,REAL st
( dom g = Z & ( for x being Real st x in Z holds
g . x = (f . a) - ((Partial_Sums (Taylor (f,Z,x,a))) . n) ) & g . a = 0 & g | [.a,b.] is continuous & g is_differentiable_on ].a,b.[ & ( for x being Real st x in ].a,b.[ holds
diff (g,x) = - (((((diff (f,].a,b.[)) . (n + 1)) . x) * ((a - x) |^ n)) / (n !)) ) )
theorem Th28:
for
n being
Element of
NAT for
f being
PartFunc of
REAL,
REAL for
Z being
Subset of
REAL st
Z c= dom f &
f is_differentiable_on n,
Z holds
for
a,
b being
Real st
a < b &
[.a,b.] c= Z &
((diff (f,Z)) . n) | [.a,b.] is
continuous &
f is_differentiable_on n + 1,
].a,b.[ holds
for
l being
Real for
g being
PartFunc of
REAL,
REAL st
dom g = [#] REAL & ( for
x being
Real holds
g . x = ((f . a) - ((Partial_Sums (Taylor (f,Z,x,a))) . n)) - ((l * ((a - x) |^ (n + 1))) / ((n + 1) !)) ) &
((f . a) - ((Partial_Sums (Taylor (f,Z,b,a))) . n)) - ((l * ((a - b) |^ (n + 1))) / ((n + 1) !)) = 0 holds
(
g is_differentiable_on ].a,b.[ &
g . b = 0 &
g . a = 0 &
g | [.a,b.] is
continuous & ( for
x being
Real st
x in ].a,b.[ holds
diff (
g,
x)
= (- (((((diff (f,].a,b.[)) . (n + 1)) . x) * ((a - x) |^ n)) / (n !))) + ((l * ((a - x) |^ n)) / (n !)) ) )
theorem Th29:
for
n being
Element of
NAT for
f being
PartFunc of
REAL,
REAL for
Z being
Subset of
REAL st
Z c= dom f &
f is_differentiable_on n,
Z holds
for
a,
b being
Real st
a < b &
[.a,b.] c= Z &
((diff (f,Z)) . n) | [.a,b.] is
continuous &
f is_differentiable_on n + 1,
].a,b.[ holds
ex
c being
Real st
(
c in ].a,b.[ &
f . a = ((Partial_Sums (Taylor (f,Z,b,a))) . n) + (((((diff (f,].a,b.[)) . (n + 1)) . c) * ((a - b) |^ (n + 1))) / ((n + 1) !)) )
theorem Th30:
theorem Th31:
theorem Th32:
theorem
for
n being
Element of
NAT for
f being
PartFunc of
REAL,
REAL for
x0,
r being
Real st
].(x0 - r),(x0 + r).[ c= dom f &
0 < r &
f is_differentiable_on n + 1,
].(x0 - r),(x0 + r).[ holds
for
x being
Real st
x in ].(x0 - r),(x0 + r).[ holds
ex
s being
Real st
(
0 < s &
s < 1 &
f . x = ((Partial_Sums (Taylor (f,].(x0 - r),(x0 + r).[,x0,x))) . n) + (((((diff (f,].(x0 - r),(x0 + r).[)) . (n + 1)) . (x0 + (s * (x - x0)))) * ((x - x0) |^ (n + 1))) / ((n + 1) !)) )