Teiloro eilutė išsamiai[ keisti ]
Makloreno eilutės įrodymas[ keisti ]
Darome prielaidą, kad funkciją
f
(
x
)
{\displaystyle f(x)\;}
galima užrašyti tokia eilute
f
(
x
)
=
a
0
+
a
1
x
+
a
2
x
2
+
a
3
x
3
+
a
4
x
4
+
a
5
x
5
+
⋯
.
{\displaystyle f(x)=a_{0}+a_{1}x+a_{2}x^{2}+a_{3}x^{3}+a_{4}x^{4}+a_{5}x^{5}+\cdots .}
Tuomet surandame visų eilių (laipsnių) išvestines funkcijos
f
(
x
)
:
{\displaystyle f(x):\;}
f
′
(
x
)
=
a
1
+
2
a
2
x
+
3
a
3
x
2
+
4
a
4
x
3
+
5
a
5
x
4
+
⋯
,
{\displaystyle f'(x)=a_{1}+2a_{2}x+3a_{3}x^{2}+4a_{4}x^{3}+5a_{5}x^{4}+\cdots ,}
f
″
(
x
)
=
(
f
′
(
x
)
)
′
=
2
a
2
+
3
⋅
2
a
3
x
+
4
⋅
3
a
4
x
2
+
5
⋅
4
a
5
x
3
+
⋯
,
{\displaystyle f''(x)=(f'(x))'=2a_{2}+3\cdot 2a_{3}x+4\cdot 3a_{4}x^{2}+5\cdot 4a_{5}x^{3}+\cdots ,}
f
‴
(
x
)
=
3
⋅
2
a
3
+
4
⋅
3
⋅
2
a
4
x
+
5
⋅
4
⋅
3
a
5
x
2
+
⋯
,
{\displaystyle f'''(x)=3\cdot 2a_{3}+4\cdot 3\cdot 2a_{4}x+5\cdot 4\cdot 3a_{5}x^{2}+\cdots ,}
f
(
4
)
(
x
)
=
4
⋅
3
⋅
2
a
4
+
5
⋅
4
⋅
3
⋅
2
a
5
x
+
⋯
,
{\displaystyle f^{(4)}(x)=4\cdot 3\cdot 2a_{4}+5\cdot 4\cdot 3\cdot 2a_{5}x+\cdots ,}
f
(
5
)
(
x
)
=
5
⋅
4
⋅
3
⋅
2
a
5
+
⋯
.
{\displaystyle f^{(5)}(x)=5\cdot 4\cdot 3\cdot 2a_{5}+\cdots .}
Kad surasti kam lygūs koeficientai
a
n
{\displaystyle a_{n}}
, paimame gautų išvestinių reikšmes nuo nulio (kai
x
=
0
{\displaystyle x=0}
):
f
(
0
)
=
a
0
+
a
1
⋅
0
+
a
2
⋅
0
2
+
a
3
⋅
0
3
+
a
4
⋅
0
4
+
a
5
⋅
0
5
+
⋯
=
a
0
,
{\displaystyle f(0)=a_{0}+a_{1}\cdot 0+a_{2}\cdot 0^{2}+a_{3}\cdot 0^{3}+a_{4}\cdot 0^{4}+a_{5}\cdot 0^{5}+\cdots =a_{0},}
f
′
(
0
)
=
a
1
+
2
a
2
⋅
0
+
3
a
3
⋅
0
2
+
4
a
4
⋅
0
3
+
5
a
5
⋅
0
4
+
⋯
=
a
1
,
{\displaystyle f'(0)=a_{1}+2a_{2}\cdot 0+3a_{3}\cdot 0^{2}+4a_{4}\cdot 0^{3}+5a_{5}\cdot 0^{4}+\cdots =a_{1},}
f
″
(
0
)
=
2
a
2
+
3
⋅
2
a
3
⋅
0
+
4
⋅
3
a
4
⋅
0
2
+
5
⋅
4
a
5
⋅
0
3
+
⋯
=
2
a
2
=
2
!
⋅
a
2
,
{\displaystyle f''(0)=2a_{2}+3\cdot 2a_{3}\cdot 0+4\cdot 3a_{4}\cdot 0^{2}+5\cdot 4a_{5}\cdot 0^{3}+\cdots =2a_{2}=2!\cdot a_{2},}
f
‴
(
0
)
=
3
⋅
2
a
3
+
4
⋅
3
⋅
2
a
4
⋅
0
+
5
⋅
4
⋅
3
a
5
⋅
0
2
+
⋯
=
3
⋅
2
a
3
=
3
!
⋅
a
3
,
{\displaystyle f'''(0)=3\cdot 2a_{3}+4\cdot 3\cdot 2a_{4}\cdot 0+5\cdot 4\cdot 3a_{5}\cdot 0^{2}+\cdots =3\cdot 2a_{3}=3!\cdot a_{3},}
f
(
4
)
(
0
)
=
4
⋅
3
⋅
2
a
4
+
5
⋅
4
⋅
3
⋅
2
a
5
⋅
0
+
⋯
=
4
⋅
3
⋅
2
a
4
=
4
!
⋅
a
4
,
{\displaystyle f^{(4)}(0)=4\cdot 3\cdot 2a_{4}+5\cdot 4\cdot 3\cdot 2a_{5}\cdot 0+\cdots =4\cdot 3\cdot 2a_{4}=4!\cdot a_{4},}
f
(
5
)
(
0
)
=
5
⋅
4
⋅
3
⋅
2
a
5
+
⋯
=
5
⋅
4
⋅
3
⋅
2
a
5
=
5
!
⋅
a
5
.
{\displaystyle f^{(5)}(0)=5\cdot 4\cdot 3\cdot 2a_{5}+\cdots =5\cdot 4\cdot 3\cdot 2a_{5}=5!\cdot a_{5}.}
Dabar nesunku rasti koeficientus
a
n
{\displaystyle a_{n}}
:
a
0
=
f
(
0
)
,
{\displaystyle a_{0}=f(0),\;}
a
1
=
f
′
(
0
)
,
{\displaystyle a_{1}=f'(0),\;}
a
2
=
f
″
(
0
)
2
!
,
{\displaystyle a_{2}={\frac {f''(0)}{2!}},\;}
a
3
=
f
‴
(
0
)
3
!
,
{\displaystyle a_{3}={\frac {f'''(0)}{3!}},\;}
a
4
=
f
(
4
)
(
0
)
4
!
,
{\displaystyle a_{4}={\frac {f^{(4)}(0)}{4!}},\;}
a
5
=
f
(
5
)
(
0
)
5
!
,
{\displaystyle a_{5}={\frac {f^{(5)}(0)}{5!}},\;}
⋯
{\displaystyle \cdots }
a
n
=
f
(
n
)
(
0
)
n
!
.
{\displaystyle a_{n}={\frac {f^{(n)}(0)}{n!}}.\;}
Dabar tereikia įstatyti gautus koeficientus
a
n
{\displaystyle a_{n}}
į eilutę
f
(
x
)
=
a
0
+
a
1
x
+
a
2
x
2
+
a
3
x
3
+
a
4
x
4
+
a
5
x
5
+
⋯
=
f
(
0
)
+
f
′
(
0
)
x
+
f
″
(
0
)
2
!
x
2
+
f
‴
(
0
)
3
!
x
3
+
f
(
4
)
(
0
)
4
!
x
4
+
f
(
5
)
(
0
)
5
!
x
5
+
⋯
.
{\displaystyle f(x)=a_{0}+a_{1}x+a_{2}x^{2}+a_{3}x^{3}+a_{4}x^{4}+a_{5}x^{5}+\cdots =f(0)+f'(0)x+{\frac {f''(0)}{2!}}x^{2}+{\frac {f'''(0)}{3!}}x^{3}+{\frac {f^{(4)}(0)}{4!}}x^{4}+{\frac {f^{(5)}(0)}{5!}}x^{5}+\cdots .}
Taigi, gavome funkciją
f
(
x
)
{\displaystyle f(x)\;}
išreikšta Makloreno eilute:
f
(
x
)
=
f
(
0
)
+
f
′
(
0
)
x
+
f
″
(
0
)
2
!
x
2
+
f
‴
(
0
)
3
!
x
3
+
f
(
4
)
(
0
)
4
!
x
4
+
f
(
5
)
(
0
)
5
!
x
5
+
⋯
.
{\displaystyle f(x)=f(0)+f'(0)x+{\frac {f''(0)}{2!}}x^{2}+{\frac {f'''(0)}{3!}}x^{3}+{\frac {f^{(4)}(0)}{4!}}x^{4}+{\frac {f^{(5)}(0)}{5!}}x^{5}+\cdots .}
Išreikšti funkciją
f
(
x
)
=
sin
(
x
)
{\displaystyle f(x)=\sin(x)\;}
Makloreno eilute.
Sprendimas .
sin
(
x
)
+
(
sin
(
x
)
)
′
x
+
(
sin
(
x
)
)
″
2
!
x
2
+
(
sin
(
x
)
)
‴
3
!
x
3
+
(
sin
(
x
)
)
(
4
)
4
!
x
4
+
(
sin
(
x
)
)
(
5
)
5
!
x
5
+
⋯
=
{\displaystyle \sin(x)+(\sin(x))'x+{\frac {(\sin(x))''}{2!}}x^{2}+{\frac {(\sin(x))'''}{3!}}x^{3}+{\frac {(\sin(x))^{(4)}}{4!}}x^{4}+{\frac {(\sin(x))^{(5)}}{5!}}x^{5}+\cdots =}
=
sin
(
x
)
+
x
cos
(
x
)
+
−
sin
(
x
)
2
!
x
2
+
−
cos
(
x
)
3
!
x
3
+
sin
(
x
)
4
!
x
4
+
cos
(
x
)
5
!
x
5
+
⋯
.
{\displaystyle =\sin(x)+x\cos(x)+{\frac {-\sin(x)}{2!}}x^{2}+{\frac {-\cos(x)}{3!}}x^{3}+{\frac {\sin(x)}{4!}}x^{4}+{\frac {\cos(x)}{5!}}x^{5}+\cdots .}
sin
(
x
)
=
sin
(
0
)
+
x
cos
(
0
)
+
−
sin
(
0
)
2
!
x
2
+
−
cos
(
0
)
3
!
x
3
+
sin
(
0
)
4
!
x
4
+
cos
(
0
)
5
!
x
5
+
⋯
=
{\displaystyle \sin(x)=\sin(0)+x\cos(0)+{\frac {-\sin(0)}{2!}}x^{2}+{\frac {-\cos(0)}{3!}}x^{3}+{\frac {\sin(0)}{4!}}x^{4}+{\frac {\cos(0)}{5!}}x^{5}+\cdots =}
=
0
+
x
⋅
1
+
0
2
!
x
2
+
−
1
3
!
x
3
+
0
4
!
x
4
+
1
5
!
x
5
+
⋯
=
{\displaystyle =0+x\cdot 1+{\frac {0}{2!}}x^{2}+{\frac {-1}{3!}}x^{3}+{\frac {0}{4!}}x^{4}+{\frac {1}{5!}}x^{5}+\cdots =}
=
x
−
x
3
3
!
+
x
5
5
!
−
⋯
.
{\displaystyle =x-{\frac {x^{3}}{3!}}+{\frac {x^{5}}{5!}}-\cdots .}
Gauname, kad
sin
(
x
)
=
x
−
x
3
3
!
+
x
5
5
!
−
x
7
7
!
+
x
9
9
!
−
x
11
11
!
+
⋯
.
{\displaystyle \sin(x)=x-{\frac {x^{3}}{3!}}+{\frac {x^{5}}{5!}}-{\frac {x^{7}}{7!}}+{\frac {x^{9}}{9!}}-{\frac {x^{11}}{11!}}+\cdots .}
Užrašyti funkcija
f
(
x
)
=
1
1
−
x
{\displaystyle f(x)={\frac {1}{1-x}}}
Makloreno eilute.
Sprendimas .
1
1
−
x
+
(
1
1
−
x
)
′
x
+
(
1
1
−
x
)
″
2
!
x
2
+
(
1
1
−
x
)
‴
3
!
x
3
+
(
1
1
−
x
)
(
4
)
4
!
x
4
+
(
1
1
−
x
)
(
5
)
5
!
x
5
+
⋯
=
{\displaystyle {\frac {1}{1-x}}+({\frac {1}{1-x}})'x+{\frac {({\frac {1}{1-x}})''}{2!}}x^{2}+{\frac {({\frac {1}{1-x}})'''}{3!}}x^{3}+{\frac {({\frac {1}{1-x}})^{(4)}}{4!}}x^{4}+{\frac {({\frac {1}{1-x}})^{(5)}}{5!}}x^{5}+\cdots =}
=
1
1
−
x
+
1
(
1
−
x
)
2
x
+
−
(
(
1
−
x
)
2
)
′
(
(
1
−
x
)
2
)
2
2
!
x
2
+
−
2
(
(
1
−
x
)
3
)
′
(
(
1
−
x
)
3
)
2
3
!
x
3
+
−
6
(
(
1
−
x
)
4
)
′
(
(
1
−
x
)
4
)
2
4
!
x
4
+
−
24
⋅
(
(
1
−
x
)
5
)
′
(
(
1
−
x
)
5
)
2
5
!
x
5
+
⋯
=
{\displaystyle ={\frac {1}{1-x}}+{\frac {1}{(1-x)^{2}}}x+{\frac {\frac {-((1-x)^{2})'}{((1-x)^{2})^{2}}}{2!}}x^{2}+{\frac {\frac {-2((1-x)^{3})'}{((1-x)^{3})^{2}}}{3!}}x^{3}+{\frac {\frac {-6((1-x)^{4})'}{((1-x)^{4})^{2}}}{4!}}x^{4}+{\frac {\frac {-24\cdot ((1-x)^{5})'}{((1-x)^{5})^{2}}}{5!}}x^{5}+\cdots =}
=
1
1
−
x
+
1
(
1
−
x
)
2
x
+
2
(
1
−
x
)
(
1
−
x
)
4
2
!
x
2
+
−
2
⋅
3
(
1
−
x
)
2
⋅
(
−
1
)
(
1
−
x
)
6
3
!
x
3
+
−
6
⋅
4
(
1
−
x
)
3
⋅
(
−
1
)
(
1
−
x
)
8
4
!
x
4
+
−
24
⋅
5
(
1
−
x
)
4
⋅
(
−
1
)
(
1
−
x
)
10
5
!
x
5
+
⋯
=
{\displaystyle ={\frac {1}{1-x}}+{\frac {1}{(1-x)^{2}}}x+{\frac {\frac {2(1-x)}{(1-x)^{4}}}{2!}}x^{2}+{\frac {\frac {-2\cdot 3(1-x)^{2}\cdot (-1)}{(1-x)^{6}}}{3!}}x^{3}+{\frac {\frac {-6\cdot 4(1-x)^{3}\cdot (-1)}{(1-x)^{8}}}{4!}}x^{4}+{\frac {\frac {-24\cdot 5(1-x)^{4}\cdot (-1)}{(1-x)^{10}}}{5!}}x^{5}+\cdots =}
=
1
1
−
x
+
1
(
1
−
x
)
2
x
+
2
(
1
−
x
)
3
2
!
x
2
+
6
(
1
−
x
)
4
3
!
x
3
+
24
(
1
−
x
)
5
4
!
x
4
+
120
(
1
−
x
)
6
5
!
x
5
+
⋯
=
{\displaystyle ={\frac {1}{1-x}}+{\frac {1}{(1-x)^{2}}}x+{\frac {\frac {2}{(1-x)^{3}}}{2!}}x^{2}+{\frac {\frac {6}{(1-x)^{4}}}{3!}}x^{3}+{\frac {\frac {24}{(1-x)^{5}}}{4!}}x^{4}+{\frac {\frac {120}{(1-x)^{6}}}{5!}}x^{5}+\cdots =}
=
1
1
−
x
+
1
(
1
−
x
)
2
x
+
1
(
1
−
x
)
3
x
2
+
1
(
1
−
x
)
4
x
3
+
1
(
1
−
x
)
5
x
4
+
1
(
1
−
x
)
6
x
5
+
⋯
.
{\displaystyle ={\frac {1}{1-x}}+{\frac {1}{(1-x)^{2}}}x+{\frac {1}{(1-x)^{3}}}x^{2}+{\frac {1}{(1-x)^{4}}}x^{3}+{\frac {1}{(1-x)^{5}}}x^{4}+{\frac {1}{(1-x)^{6}}}x^{5}+\cdots .}
f
(
x
)
=
1
1
−
x
=
f
(
0
)
+
f
′
(
0
)
1
!
x
+
f
″
(
0
)
2
!
x
2
+
f
‴
(
0
)
3
!
x
3
+
f
(
4
)
(
0
)
4
!
x
4
+
f
(
5
)
(
0
)
5
!
x
5
+
⋯
=
{\displaystyle f(x)={\frac {1}{1-x}}=f(0)+{\frac {f'(0)}{1!}}x+{\frac {f''(0)}{2!}}x^{2}+{\frac {f'''(0)}{3!}}x^{3}+{\frac {f^{(4)}(0)}{4!}}x^{4}+{\frac {f^{(5)}(0)}{5!}}x^{5}+\cdots =}
=
1
1
−
0
+
1
(
1
−
0
)
2
1
!
x
+
2
(
1
−
0
)
3
2
!
x
2
+
6
(
1
−
0
)
4
3
!
x
3
+
24
(
1
−
0
)
5
4
!
x
4
+
120
(
1
−
0
)
6
5
!
x
5
+
⋯
=
{\displaystyle ={\frac {1}{1-0}}+{\frac {\frac {1}{(1-0)^{2}}}{1!}}x+{\frac {\frac {2}{(1-0)^{3}}}{2!}}x^{2}+{\frac {\frac {6}{(1-0)^{4}}}{3!}}x^{3}+{\frac {\frac {24}{(1-0)^{5}}}{4!}}x^{4}+{\frac {\frac {120}{(1-0)^{6}}}{5!}}x^{5}+\cdots =}
=
1
1
−
0
+
1
(
1
−
0
)
2
x
+
1
(
1
−
0
)
3
x
2
+
1
(
1
−
0
)
4
x
3
+
1
(
1
−
0
)
5
x
4
+
1
(
1
−
0
)
6
x
5
+
⋯
=
{\displaystyle ={\frac {1}{1-0}}+{\frac {1}{(1-0)^{2}}}x+{\frac {1}{(1-0)^{3}}}x^{2}+{\frac {1}{(1-0)^{4}}}x^{3}+{\frac {1}{(1-0)^{5}}}x^{4}+{\frac {1}{(1-0)^{6}}}x^{5}+\cdots =}
=
1
+
x
+
x
2
+
x
3
+
x
4
+
x
5
+
⋯
.
{\displaystyle =1+x+x^{2}+x^{3}+x^{4}+x^{5}+\cdots .}
Teiloro eilute užrašomos funkcijos pavidalas yra toks:
f
(
x
)
=
f
(
x
0
)
+
f
′
(
x
0
)
1
!
(
x
−
x
0
)
+
f
″
(
x
0
)
2
!
(
x
−
x
0
)
2
+
f
‴
(
x
0
)
3
!
(
x
−
x
0
)
3
+
.
.
.
+
f
(
n
)
(
x
0
)
n
!
(
x
−
x
0
)
n
+
f
(
n
+
1
)
(
c
)
(
n
+
1
)
!
(
x
−
x
0
)
n
+
1
.
(
8
)
{\displaystyle f(x)=f(x_{0})+{\frac {f'(x_{0})}{1!}}(x-x_{0})+{\frac {f''(x_{0})}{2!}}(x-x_{0})^{2}+{\frac {f'''(x_{0})}{3!}}(x-x_{0})^{3}+...+{\frac {f^{(n)}(x_{0})}{n!}}(x-x_{0})^{n}+{\frac {f^{(n+1)}(c)}{(n+1)!}}(x-x_{0})^{n+1}.\quad (8)}
Čia liekamasis narys Lagranžo formoje yra
r
n
+
1
=
f
(
n
+
1
)
(
c
)
(
n
+
1
)
!
(
x
−
x
0
)
n
+
1
.
{\displaystyle r_{n+1}={\frac {f^{(n+1)}(c)}{(n+1)!}}(x-x_{0})^{n+1}.}
Ir
x
0
<
c
<
x
.
{\displaystyle x_{0}<c<x.}
Teiloro formulė, kurios
x
0
=
0
,
{\displaystyle x_{0}=0,}
vadinama Makloreno formule. Remiantis (8) formule, galime parašyti tokią Makloreno formulės išraišką:
f
(
x
)
=
f
(
0
)
+
f
′
(
0
)
1
!
x
+
f
″
(
0
)
2
!
x
2
+
f
‴
(
0
)
3
!
x
3
+
.
.
.
+
f
(
n
)
(
0
)
n
!
x
n
+
f
(
n
+
1
)
(
c
)
(
n
+
1
)
!
x
n
+
1
.
(
9
)
{\displaystyle f(x)=f(0)+{\frac {f'(0)}{1!}}x+{\frac {f''(0)}{2!}}x^{2}+{\frac {f'''(0)}{3!}}x^{3}+...+{\frac {f^{(n)}(0)}{n!}}x^{n}+{\frac {f^{(n+1)}(c)}{(n+1)!}}x^{n+1}.\quad (9)}
Šįkart
0
<
c
<
x
.
{\displaystyle 0<c<x.}
Sinuso liekamojo nario įvertinimas[ keisti ]
Apskaičiuosime sin(1) su paklaida mažesne nei
10
−
6
.
{\displaystyle 10^{-6}.}
Žinoma, kad
f
(
n
)
(
x
)
=
(
sin
x
)
(
n
)
=
sin
(
n
π
2
+
x
)
.
{\displaystyle f^{(n)}(x)=(\sin x)^{(n)}=\sin(n{\frac {\pi }{2}}+x).}
Tuomet
f
(
n
)
(
0
)
=
sin
(
n
π
2
)
=
{
0
,
kai
n
=
2
k
,
(
−
1
)
k
,
kai
n
=
2
k
+
1.
{\displaystyle f^{(n)}(0)=\sin({\frac {n\pi }{2}})={\begin{cases}\quad 0,\quad \quad {\text{kai}}\;n=2k,&\\(-1)^{k},\quad {\text{kai}}\;n=2k+1.&\end{cases}}}
Čia k yra sveikasis skaičius. Todėl
sin
x
=
x
−
x
3
3
!
+
x
5
5
!
−
x
7
7
!
+
.
.
.
+
(
−
1
)
k
x
2
k
+
1
(
2
k
+
1
)
!
+
r
2
k
+
3
(
x
)
;
(
11
)
{\displaystyle \sin x=x-{\frac {x^{3}}{3!}}+{\frac {x^{5}}{5!}}-{\frac {x^{7}}{7!}}+...+(-1)^{k}{\frac {x^{2k+1}}{(2k+1)!}}+r_{2k+3}(x);\quad (11)}
čia
|
r
2
k
+
3
(
x
)
|
=
|
x
2
k
+
3
(
2
k
+
3
)
!
sin
(
(
2
k
+
3
)
π
2
+
c
)
|
=
|
x
2
k
+
3
(
2
k
+
3
)
!
cos
c
|
(
0
<
c
<
x
)
.
{\displaystyle |r_{2k+3}(x)|=|{\frac {x^{2k+3}}{(2k+3)!}}\sin((2k+3){\frac {\pi }{2}}+c)|=|{\frac {x^{2k+3}}{(2k+3)!}}\cos c|\;\;(0<c<x).}
Laikysime, kad cos(c)=1. Tada, tarus, kad x=1, turi būti tenkinama nelygybė
|
x
2
k
+
3
(
2
k
+
3
)
!
cos
c
|
<
10
−
6
,
{\displaystyle |{\frac {x^{2k+3}}{(2k+3)!}}\cos c|<10^{-6},}
|
1
2
k
+
3
(
2
k
+
3
)
!
⋅
1
|
<
10
−
6
,
{\displaystyle |{\frac {1^{2k+3}}{(2k+3)!}}\cdot 1|<10^{-6},}
|
1
(
2
k
+
3
)
!
|
<
10
−
6
,
{\displaystyle |{\frac {1}{(2k+3)!}}|<10^{-6},}
10
6
<
(
2
k
+
3
)
!
.
{\displaystyle 10^{6}<(2k+3)!.}
Paskutinė nelygybė tenkinama, kai
k
=
4
{\displaystyle k=4}
ir tada
(
2
k
+
3
)
!
=
(
2
⋅
4
+
3
)
!
=
11
!
=
39916800.
{\displaystyle (2k+3)!=(2\cdot 4+3)!=11!=39916800.}
Tuomet mums reikia paskaičiuoti Makloreno eilutę iki n=9:
sin
1
=
1
−
1
3
3
!
+
1
5
5
!
−
1
7
7
!
+
1
9
9
!
=
{\displaystyle \sin 1=1-{\frac {1^{3}}{3!}}+{\frac {1^{5}}{5!}}-{\frac {1^{7}}{7!}}+{\frac {1^{9}}{9!}}=}
=
1
−
1
6
+
1
120
−
1
5040
+
1
362880
=
{\displaystyle =1-{\frac {1}{6}}+{\frac {1}{120}}-{\frac {1}{5040}}+{\frac {1}{362880}}=}
=0.84147100970017636684303350970018.
Tikroji (tiksli) sin(1) reikšmė iš skaičiuotuvo yra:
sin(1)=
=0.8414709848078965066525023216303.
Atėmus gautą mūsų skaičiuotą sin(1) reikšmę iš kalkuliatoriaus sin(1) reikšmės gauname tokią paklaidą:
0.8414709848078965066525023216303 - 0.84147100970017636684303350970018=
=-2.4892279860190531188069881000377e-8=
=
−
2.489227986019
⋅
10
−
8
;
{\displaystyle =-2.489227986019\cdot 10^{-8};}
|
−
2.489227986019
⋅
10
−
8
|
<
10
−
6
.
{\displaystyle |-2.489227986019\cdot 10^{-8}|<10^{-6}.}
Taigi, viskas apskaičiuota pagal teoriją ir paklaida surasta teisingai.
Pastebėsime, kad
11
!
=
39916800
>
10
7
,
{\displaystyle 11!=39916800>10^{7},}
todėl paklaida gauta
|
−
2.489227986019
⋅
10
−
8
|
<
10
−
7
.
{\displaystyle |-2.489227986019\cdot 10^{-8}|<10^{-7}.}
Apskaičiuosime sin(0.1) su paklaida mažesne nei
10
−
9
.
{\displaystyle 10^{-9}.}
Pasinaudoję pirmu pavyzdžiu, išeina, kad turi būti tenkinama nelygybė
|
x
2
k
+
3
(
2
k
+
3
)
!
cos
c
|
<
10
−
9
,
{\displaystyle |{\frac {x^{2k+3}}{(2k+3)!}}\cos c|<10^{-9},}
kurioje laikysime, kad cos(c)=1, o
x
=
0.1.
{\displaystyle x=0.1.}
Tada
0.1
2
k
+
3
(
2
k
+
3
)
!
⋅
1
<
10
−
9
.
{\displaystyle {\frac {0.1^{2k+3}}{(2k+3)!}}\cdot 1<10^{-9}.}
Pabandykime atspėti, kad sveikasis skaičius k galėtų būti lygus 2. Tada
0.1
2
⋅
2
+
3
(
2
⋅
2
+
3
)
!
<
10
−
9
,
{\displaystyle {\frac {0.1^{2\cdot 2+3}}{(2\cdot 2+3)!}}<10^{-9},}
0.1
7
7
!
<
10
−
9
,
{\displaystyle {\frac {0.1^{7}}{7!}}<10^{-9},}
1
7
!
<
10
−
9
⋅
10
7
,
{\displaystyle {\frac {1}{7!}}<10^{-9}\cdot 10^{7},}
1
7
!
<
10
−
2
,
{\displaystyle {\frac {1}{7!}}<10^{-2},}
10
2
<
7
!
,
{\displaystyle 10^{2}<7!,}
100
<
7
!
=
5040.
{\displaystyle 100<7!=5040.}
Nesunku matyti, kad su skaičiumi k =2, paklaida bus mažesnė už
10
−
10
.
{\displaystyle 10^{-10}.}
Belieka užrašyti sinuso Teiloro eilutę, kai x =0.1, o n =5:
sin
(
0.1
)
=
0.1
−
0.1
3
3
!
+
0.1
5
5
!
=
{\displaystyle \sin(0.1)=0.1-{\frac {0.1^{3}}{3!}}+{\frac {0.1^{5}}{5!}}=}
=
0.1
−
0.001
6
+
0.00001
120
=
{\displaystyle =0.1-{\frac {0.001}{6}}+{\frac {0.00001}{120}}=}
= 0.09983341666666666666666666666667.
Windows kalkuliatoriaus
sin
0.1
{\displaystyle \sin 0.1}
reikšmė yra tokia
sin(0.1) =
= 0.09983341664682815230681419841062.
0.09983341664682815230681419841062 - 0.09983341666666666666666666666667 =
= -1.9838514359852468256047973010085e-11 =
=
−
1.983851
⋅
10
−
11
.
{\displaystyle =-1.983851\cdot 10^{-11}.}
|
−
1.983851
⋅
10
−
11
|
<
10
−
10
<
10
−
9
.
{\displaystyle |-1.983851\cdot 10^{-11}|<10^{-10}<10^{-9}.}
Vadinasi paklaidą radome teisingai.
Apskaičiuosime sin(1.5) su paklaida mažesne nei
10
−
6
.
{\displaystyle 10^{-6}.}
Pasinaudoję pirmu pavyzdžiu, išeina, kad turi būti tenkinama nelygybė
|
x
2
k
+
3
(
2
k
+
3
)
!
cos
c
|
<
10
−
6
,
{\displaystyle |{\frac {x^{2k+3}}{(2k+3)!}}\cos c|<10^{-6},}
kurioje laikysime, kad
cos
c
=
1
,
{\displaystyle \cos c=1,}
o
x
=
1.5
{\displaystyle x=1.5}
radiano. Ši nelygybė tenkinama, kai
k
=
5
,
{\displaystyle k=5,}
nes
|
1.5
2
⋅
5
+
3
(
2
⋅
5
+
3
)
!
⋅
1
|
<
10
−
6
,
{\displaystyle |{\frac {1.5^{2\cdot 5+3}}{(2\cdot 5+3)!}}\cdot 1|<10^{-6},}
|
1.5
13
13
!
⋅
1
|
<
10
−
6
,
{\displaystyle |{\frac {1.5^{13}}{13!}}\cdot 1|<10^{-6},}
1.5
13
13
!
<
10
−
6
,
{\displaystyle {\frac {1.5^{13}}{13!}}<10^{-6},}
194.6195068359375
6227020800
<
10
−
6
,
{\displaystyle {\frac {194.6195068359375}{6227020800}}<10^{-6},}
≈
3.1254031917789242
⋅
10
−
8
<
10
−
6
.
{\displaystyle \approx 3.1254031917789242\cdot 10^{-8}<10^{-6}.}
Taigi, matome, kad paklaida bus mažesnė už
10
−
7
.
{\displaystyle 10^{-7}.}
Sinuso eilutė, kai
x
=
1.5
,
{\displaystyle x=1.5,}
o
n
=
11
{\displaystyle n=11}
yra tokia:
sin
(
1.5
)
=
1.5
−
1.5
3
3
!
+
1.5
5
5
!
−
1.5
7
7
!
+
1.5
9
9
!
−
1.5
11
11
!
=
{\displaystyle \sin(1.5)=1.5-{\frac {1.5^{3}}{3!}}+{\frac {1.5^{5}}{5!}}-{\frac {1.5^{7}}{7!}}+{\frac {1.5^{9}}{9!}}-{\frac {1.5^{11}}{11!}}=}
=
1.5
−
3.375
6
+
7.59375
120
−
17.0859375
5040
+
38.443359375
362880
−
86.49755859375
39916800
=
{\displaystyle =1.5-{\frac {3.375}{6}}+{\frac {7.59375}{120}}-{\frac {17.0859375}{5040}}+{\frac {38.443359375}{362880}}-{\frac {86.49755859375}{39916800}}=}
= 1.5 - 3.375/6 + 7.59375/120 - 17.0859375/5040 + 38.443359375/362880 - 86.49755859375/39916800 = (šitą išraišką galima iškart įdėt (padaryt "Paste") į Windows kalkuliatorių ir jis iškart atliks visus aritmetinius veiksmus ir duos atsakymą)
= 0.99749495568213524756493506493506.
Gautą sin(1.5) reikšmę atėmę iš tikslios (kalkuliatoriaus) sin(1.5) reikšmės gauname paklaidą:
0.99749498660405443094172337114149 - 0.99749495568213524756493506493506 =
= 3.0921919183376788306206422387642e-8 =
=
3.0921919
⋅
10
−
8
<
10
−
7
<
10
−
6
.
{\displaystyle =3.0921919\cdot 10^{-8}<10^{-7}<10^{-6}.}
Paklaidos didumas gautas pagal teoriją.
Kosinuso liekamojo nario įvertinimas[ keisti ]
Apskaičiuosime cos(1) su paklaida mažesne nei
10
−
6
.
{\displaystyle 10^{-6}.}
f
(
x
)
=
cos
x
.
{\displaystyle f(x)=\cos x.}
Žinoma, kad
f
(
n
)
(
x
)
=
(
cos
x
)
(
n
)
=
cos
(
n
π
2
+
x
)
.
{\displaystyle f^{(n)}(x)=(\cos x)^{(n)}=\cos(n{\frac {\pi }{2}}+x).}
Tuomet
f
(
n
)
(
0
)
=
cos
n
π
2
=
{
0
,
kai
n
=
2
k
+
1
,
(
−
1
)
k
,
kai
n
=
2
k
.
{\displaystyle f^{(n)}(0)=\cos {\frac {n\pi }{2}}={\begin{cases}\quad 0,\quad \quad {\text{kai}}\;n=2k+1,&\\(-1)^{k},\quad {\text{kai}}\;n=2k.&\end{cases}}}
Čia k yra sveikasis skaičius. Todėl
cos
x
=
1
−
x
2
2
!
+
x
4
4
!
−
x
6
6
!
+
.
.
.
+
(
−
1
)
k
x
2
k
(
2
k
)
!
+
r
2
k
+
2
(
x
)
;
(
12
)
{\displaystyle \cos x=1-{\frac {x^{2}}{2!}}+{\frac {x^{4}}{4!}}-{\frac {x^{6}}{6!}}+...+(-1)^{k}{\frac {x^{2k}}{(2k)!}}+r_{2k+2}(x);\quad (12)}
čia
|
r
2
k
+
2
(
x
)
|
=
|
x
2
k
+
2
(
2
k
+
2
)
!
cos
(
(
2
k
+
2
)
π
2
+
c
)
|
=
|
x
2
k
+
2
(
2
k
+
2
)
!
cos
c
|
(
0
<
c
<
x
)
.
{\displaystyle |r_{2k+2}(x)|=|{\frac {x^{2k+2}}{(2k+2)!}}\cos((2k+2){\frac {\pi }{2}}+c)|=|{\frac {x^{2k+2}}{(2k+2)!}}\cos c|\;\;(0<c<x).}
Tada
|
r
2
k
+
2
(
x
)
|
=
|
x
2
k
+
2
(
2
k
+
2
)
!
cos
c
|
<
x
2
k
+
2
(
2
k
+
2
)
!
{\displaystyle |r_{2k+2}(x)|=|{\frac {x^{2k+2}}{(2k+2)!}}\cos c|<{\frac {x^{2k+2}}{(2k+2)!}}}
(nes |cos(c)| negali būti daugiau už 1),
|
r
2
k
+
2
(
x
)
|
<
x
2
k
+
2
(
2
k
+
2
)
!
<
10
−
6
.
{\displaystyle |r_{2k+2}(x)|<{\frac {x^{2k+2}}{(2k+2)!}}<10^{-6}.}
Paskutinė nelygybė tenkinama, kai
k
=
4
,
{\displaystyle k=4,}
nes (tada kai x=1)
|
r
2
k
+
2
(
1
)
|
<
1
2
⋅
4
+
2
(
2
⋅
4
+
2
)
!
<
10
−
6
,
{\displaystyle |r_{2k+2}(1)|<{\frac {1^{2\cdot 4+2}}{(2\cdot 4+2)!}}<10^{-6},}
|
r
2
k
+
2
(
1
)
|
<
1
10
!
<
10
−
6
,
{\displaystyle |r_{2k+2}(1)|<{\frac {1}{10!}}<10^{-6},}
|
r
2
k
+
2
(
1
)
|
<
1
3628800
<
10
−
6
,
{\displaystyle |r_{2k+2}(1)|<{\frac {1}{3628800}}<10^{-6},}
|
r
2
k
+
2
(
1
)
|
<
2.75573192
⋅
10
−
7
<
10
−
6
.
{\displaystyle |r_{2k+2}(1)|<2.75573192\cdot 10^{-7}<10^{-6}.}
Dabar galime užrašyti
cos
1
{\displaystyle \cos 1}
(kosinusas nuo 1 radiano) Makloreno eilutę, kai n=2k=8:
cos
1
=
1
−
1
2
2
!
+
1
4
4
!
−
1
6
6
!
+
1
8
8
!
=
{\displaystyle \cos 1=1-{\frac {1^{2}}{2!}}+{\frac {1^{4}}{4!}}-{\frac {1^{6}}{6!}}+{\frac {1^{8}}{8!}}=}
=
1
−
1
2
+
1
24
−
1
720
+
1
40320
=
{\displaystyle =1-{\frac {1}{2}}+{\frac {1}{24}}-{\frac {1}{720}}+{\frac {1}{40320}}=}
= 0.54030257936507936507936507936508.
Atėmę gautą
cos
1
{\displaystyle \cos 1}
reikšmę iš tikslios (kalkuliatoriaus)
cos
1
{\displaystyle \cos 1}
reikšmės gausime:
cos(1) - 0.54030257936507936507936507936508 =
= 0.54030230586813971740093660744298 - 0.54030257936507936507936507936508 =
= -2.7349693964767842847192210276135e-7.
|
−
2.734969396
⋅
10
−
7
|
<
2.75573192
⋅
10
−
7
<
10
−
6
.
{\displaystyle |-2.734969396\cdot 10^{-7}|<2.75573192\cdot 10^{-7}<10^{-6}.}
Vadinasi, liekamajį narį
|
r
2
k
+
2
(
x
)
|
=
|
x
2
k
+
2
(
2
k
+
2
)
!
cos
c
|
{\displaystyle |r_{2k+2}(x)|=|{\frac {x^{2k+2}}{(2k+2)!}}\cos c|}
apskaičiavome teisingai (kai x lygus 1 radianui).
Apskaičiuosime cos(0.1) su paklaida mažesne nei
10
−
8
.
{\displaystyle 10^{-8}.}
Pasinaudoję pirmu pavyzdžiu, turime
|
r
2
k
+
2
(
x
)
|
=
|
x
2
k
+
2
(
2
k
+
2
)
!
cos
c
|
<
x
2
k
+
2
(
2
k
+
2
)
!
,
{\displaystyle |r_{2k+2}(x)|=|{\frac {x^{2k+2}}{(2k+2)!}}\cos c|<{\frac {x^{2k+2}}{(2k+2)!}},}
|
r
2
k
+
2
(
x
)
|
<
x
2
k
+
2
(
2
k
+
2
)
!
<
10
−
8
.
{\displaystyle |r_{2k+2}(x)|<{\frac {x^{2k+2}}{(2k+2)!}}<10^{-8}.}
Paskutinė nelygybė tenkinama, kai
k
=
2
,
{\displaystyle k=2,}
o
x
=
0.1
{\displaystyle x=0.1}
radiano, nes
|
r
2
k
+
2
(
0.1
)
|
<
0.1
2
⋅
2
+
2
(
2
⋅
2
+
2
)
!
<
10
−
8
,
{\displaystyle |r_{2k+2}(0.1)|<{\frac {0.1^{2\cdot 2+2}}{(2\cdot 2+2)!}}<10^{-8},}
|
r
2
k
+
2
(
0.1
)
|
<
0.1
6
6
!
<
10
−
8
,
{\displaystyle |r_{2k+2}(0.1)|<{\frac {0.1^{6}}{6!}}<10^{-8},}
|
r
2
k
+
2
(
0.1
)
|
<
0.000001
720
<
10
−
8
,
{\displaystyle |r_{2k+2}(0.1)|<{\frac {0.000001}{720}}<10^{-8},}
|
r
2
k
+
2
(
0.1
)
|
<
1.388888889
⋅
10
−
9
<
10
−
8
.
{\displaystyle |r_{2k+2}(0.1)|<1.388888889\cdot 10^{-9}<10^{-8}.}
Dabar galime užrašyti
cos
(
0.1
)
{\displaystyle \cos(0.1)}
Makloreno eilutę, kai n=2k=4:
cos
0.1
=
1
−
0.1
2
2
!
+
0.1
4
4
!
=
1
−
0.01
2
+
0.0001
24
=
{\displaystyle \cos 0.1=1-{\frac {0.1^{2}}{2!}}+{\frac {0.1^{4}}{4!}}=1-{\frac {0.01}{2}}+{\frac {0.0001}{24}}=}
= 0.9950041(6).
Tiksli
cos
(
0.1
)
{\displaystyle \cos(0.1)}
reikšmė yra
cos(0.1) = 0.99500416527802576609556198780387.
Atėmę apskaičiuotą
cos
(
0.1
)
{\displaystyle \cos(0.1)}
reikšmę iš tikslios
cos
(
0.1
)
{\displaystyle \cos(0.1)}
reikšmės gauname:
0.99500416527802576609556198780387 - 0.99500416666666666666666666666667 =
= -1.3886409005711046788627997051614e-9 =
=
−
1.3886409
⋅
10
−
9
.
{\displaystyle =-1.3886409\cdot 10^{-9}.}
Taigi
|
r
2
k
+
2
(
0.1
)
|
≈
|
−
1.3886409
⋅
10
−
9
|
<
1.388888889
⋅
10
−
9
<
10
−
8
.
{\displaystyle |r_{2k+2}(0.1)|\approx |-1.3886409\cdot 10^{-9}|<1.388888889\cdot 10^{-9}<10^{-8}.}
Ką ir reikėjo parodyti.
Apskaičiuosime cos(1.5) su paklaida mažesne nei
10
−
8
.
{\displaystyle 10^{-8}.}
Pasinaudoję pirmu pavyzdžiu, turime
|
r
2
k
+
2
(
x
)
|
=
|
x
2
k
+
2
(
2
k
+
2
)
!
cos
c
|
<
x
2
k
+
2
(
2
k
+
2
)
!
,
(
0
<
c
<
x
)
{\displaystyle |r_{2k+2}(x)|=|{\frac {x^{2k+2}}{(2k+2)!}}\cos c|<{\frac {x^{2k+2}}{(2k+2)!}},\;\;(0<c<x)}
|
r
2
k
+
2
(
1.5
)
|
=
|
1.5
2
k
+
2
(
2
k
+
2
)
!
cos
c
|
<
1.5
2
k
+
2
(
2
k
+
2
)
!
,
(
0
<
c
<
1.5
)
{\displaystyle |r_{2k+2}(1.5)|=|{\frac {1.5^{2k+2}}{(2k+2)!}}\cos c|<{\frac {1.5^{2k+2}}{(2k+2)!}},\;\;(0<c<1.5)}
|
r
2
k
+
2
(
1.5
)
|
<
1.5
2
k
+
2
(
2
k
+
2
)
!
<
10
−
8
.
{\displaystyle |r_{2k+2}(1.5)|<{\frac {1.5^{2k+2}}{(2k+2)!}}<10^{-8}.}
Paskutinė nelygybė tenkinama, kai
k
=
6
,
{\displaystyle k=6,}
nes
|
r
2
k
+
2
(
1.5
)
|
<
1.5
2
⋅
6
+
2
(
2
⋅
6
+
2
)
!
<
10
−
8
.
{\displaystyle |r_{2k+2}(1.5)|<{\frac {1.5^{2\cdot 6+2}}{(2\cdot 6+2)!}}<10^{-8}.}
|
r
14
(
1.5
)
|
<
1.5
14
14
!
<
10
−
8
.
{\displaystyle |r_{14}(1.5)|<{\frac {1.5^{14}}{14!}}<10^{-8}.}
|
r
14
(
1.5
)
|
<
291.92926025390625
87178291200
<
10
−
8
.
{\displaystyle |r_{14}(1.5)|<{\frac {291.92926025390625}{87178291200}}<10^{-8}.}
|
r
14
(
1.5
)
|
<
3.3486462769
⋅
10
−
9
<
10
−
8
.
{\displaystyle |r_{14}(1.5)|<3.3486462769\cdot 10^{-9}<10^{-8}.}
Dabar užrašysime
cos
(
1.5
)
{\displaystyle \cos(1.5)}
Makloreno eilutę, kai n=2k=12:
cos
1.5
=
1
−
1.5
2
2
!
+
1.5
4
4
!
−
1.5
6
6
!
+
1.5
8
8
!
−
1.5
10
10
!
+
1.5
12
12
!
=
{\displaystyle \cos 1.5=1-{\frac {1.5^{2}}{2!}}+{\frac {1.5^{4}}{4!}}-{\frac {1.5^{6}}{6!}}+{\frac {1.5^{8}}{8!}}-{\frac {1.5^{10}}{10!}}+{\frac {1.5^{12}}{12!}}=}
=
1
−
2.25
2
+
5.0625
24
−
11.390625
720
+
25.62890625
40320
−
57.6650390625
3628800
+
129.746337890625
479001600
=
{\displaystyle =1-{\frac {2.25}{2}}+{\frac {5.0625}{24}}-{\frac {11.390625}{720}}+{\frac {25.62890625}{40320}}-{\frac {57.6650390625}{3628800}}+{\frac {129.746337890625}{479001600}}=}
= 1 - 2.25/2 + 5.0625/24 - 11.390625/720 + 25.62890625/40320 - 57.6650390625/3628800 + 129.746337890625/479001600 =
(įstačius šią išraišką nuo "1" iki "=" į Windows'ų kalkuliatorių gaunamas iškart apskaičiuotas atsakymas)
= 0.07073720498518510298295454545455.
Tiksli
cos
(
1.5
)
{\displaystyle \cos(1.5)}
(1.5 radiano) reikšmė iš Windows kalkuliatoriaus yra
cos(1.5) = 0.07073720166770291008818985143427.
Atėmę apskaičiuotą nevisiškai tikslią cos(1.5) reikšmę iš tikslios cos(1.5) reikšmės, gauname paklaidą:
0.07073720166770291008818985143427 - 0.07073720498518510298295454545455 =
= -3.3174821928947646940202767454604e-9.
Matome, kad
|
r
14
(
1.5
)
|
≈
|
−
3.31748219
⋅
10
−
9
|
<
3.3486462769
⋅
10
−
9
<
10
−
8
.
{\displaystyle |r_{14}(1.5)|\approx |-3.31748219\cdot 10^{-9}|<3.3486462769\cdot 10^{-9}<10^{-8}.}
Natūrinio logaritmo liekamojo nario įvertinimas[ keisti ]
Natūrinio logaritmo reikšmės greitas skaičiavimas: https://en.wikipedia.org/wiki/Natural_logarithm#Efficient_computation
f
(
x
)
=
ln
(
1
+
x
)
.
{\displaystyle f(x)=\ln(1+x).}
Apskaičiuosime ln(1+0.5)=ln(1.5) su paklaida mažesne nei 0.0001, kai
x
=
0.5.
{\displaystyle x=0.5.}
Randame išvestines:
f
′
(
x
)
=
1
1
+
x
,
f
″
(
x
)
=
−
1
(
1
+
x
)
2
,
f
‴
(
x
)
=
(
−
1
)
2
⋅
2
(
1
+
x
)
3
,
f
(
4
)
(
x
)
=
(
−
1
)
3
⋅
2
⋅
3
(
1
+
x
)
4
,
.
.
.
,
{\displaystyle f'(x)={\frac {1}{1+x}},\;\;f''(x)=-{\frac {1}{(1+x)^{2}}},\;\;f'''(x)={\frac {(-1)^{2}\cdot 2}{(1+x)^{3}}},\;\;f^{(4)}(x)={\frac {(-1)^{3}\cdot 2\cdot 3}{(1+x)^{4}}},\;...,}
f
(
n
)
(
x
)
=
(
−
1
)
n
−
1
(
n
−
1
)
!
(
1
+
x
)
n
,
n
=
1
,
2
,
3
,
.
.
.
{\displaystyle f^{(n)}(x)={\frac {(-1)^{n-1}(n-1)!}{(1+x)^{n}}},\;\;n=1,\;2,\;3,\;...}
Apskaičiuosime jų reikšmes taške
x
=
0
{\displaystyle x=0}
:
f
(
0
)
=
ln
(
1
+
0
)
=
0
,
f
′
(
0
)
=
1
,
f
″
(
0
)
=
−
1
,
f
‴
(
0
)
=
(
−
1
)
2
⋅
2
=
2
,
f
(
4
)
(
0
)
=
(
−
1
)
3
⋅
2
⋅
3
=
−
3
!
,
.
.
.
,
{\displaystyle f(0)=\ln(1+0)=0,\;\;f'(0)=1,\;\;f''(0)=-1,\;\;f'''(0)=(-1)^{2}\cdot 2=2,\;\;f^{(4)}(0)=(-1)^{3}\cdot 2\cdot 3=-3!,\;...,}
f
(
n
)
(
0
)
=
(
−
1
)
n
−
1
(
n
−
1
)
!
{\displaystyle f^{(n)}(0)=(-1)^{n-1}(n-1)!}
Vadinasi,
ln
(
1
+
x
)
=
f
(
0
)
+
f
′
(
0
)
1
!
x
+
f
″
(
0
)
2
!
x
2
+
f
‴
(
0
)
3
!
x
3
+
f
(
4
)
(
0
)
4
!
x
4
+
.
.
.
+
f
(
n
)
(
0
)
n
!
x
n
+
f
(
n
+
1
)
(
c
)
(
n
+
1
)
!
x
n
+
1
=
{\displaystyle \ln(1+x)=f(0)+{\frac {f'(0)}{1!}}x+{\frac {f''(0)}{2!}}x^{2}+{\frac {f'''(0)}{3!}}x^{3}+{\frac {f^{(4)}(0)}{4!}}x^{4}+...+{\frac {f^{(n)}(0)}{n!}}x^{n}+{\frac {f^{(n+1)}(c)}{(n+1)!}}x^{n+1}=}
=
x
−
x
2
2
+
x
3
3
−
x
4
4
.
.
.
+
(
−
1
)
n
−
1
x
n
n
+
r
n
+
1
(
x
)
;
(
13
)
{\displaystyle =x-{\frac {x^{2}}{2}}+{\frac {x^{3}}{3}}-{\frac {x^{4}}{4}}...+(-1)^{n-1}{\frac {x^{n}}{n}}+r_{n+1}(x);\quad (13)}
čia
|
r
n
+
1
(
x
)
|
=
|
x
n
+
1
(
1
+
c
)
n
+
1
(
n
+
1
)
|
,
0
<
c
<
0.5.
{\displaystyle |r_{n+1}(x)|={\Big |}{\frac {x^{n+1}}{(1+c)^{n+1}(n+1)}}{\Big |}\;,\;\;0<c<0.5.}
Matome, kad
|
r
n
+
1
(
x
)
|
=
|
x
n
+
1
(
1
+
c
)
n
+
1
(
n
+
1
)
|
<
|
x
n
+
1
(
n
+
1
)
|
.
{\displaystyle |r_{n+1}(x)|={\Big |}{\frac {x^{n+1}}{(1+c)^{n+1}(n+1)}}{\Big |}<{\Big |}{\frac {x^{n+1}}{(n+1)}}{\Big |}.}
Kai
n
=
9
,
{\displaystyle n=9,}
o
x
=
0.5
,
{\displaystyle x=0.5,}
gausime, kad
|
r
n
+
1
(
x
)
|
<
0.0001
,
{\displaystyle |r_{n+1}(x)|<0.0001,}
nes
|
0.5
9
+
1
(
9
+
1
)
|
=
0.5
10
10
=
0.0009765625
10
=
0.00009765625
{\displaystyle {\Big |}{\frac {0.5^{9+1}}{(9+1)}}{\Big |}={\frac {0.5^{10}}{10}}={\frac {0.0009765625}{10}}=0.00009765625}
ir 0.00009765625 < 0.0001. Apskaičiuosime kam lygi ši eilutė, kai
n
=
9
,
{\displaystyle n=9,}
o
x
=
0.5
{\displaystyle x=0.5}
:
ln
(
1
+
0.5
)
=
0.5
−
0.5
2
2
+
0.5
3
3
−
0.5
4
4
+
0.5
5
5
−
0.5
6
6
+
0.5
7
7
−
0.5
8
8
+
0.5
9
9
=
{\displaystyle \ln(1+0.5)=0.5-{\frac {0.5^{2}}{2}}+{\frac {0.5^{3}}{3}}-{\frac {0.5^{4}}{4}}+{\frac {0.5^{5}}{5}}-{\frac {0.5^{6}}{6}}+{\frac {0.5^{7}}{7}}-{\frac {0.5^{8}}{8}}+{\frac {0.5^{9}}{9}}=}
=0.5-0.25/2+0.125/3-0.0625/4+0.03125/5-0.015625/6+0.0078125/7-0.00390625/8+0.001953125/9=
(įdėjus (padarius "Copy"-"Paste") šią eilutę nuo "0.5" iki "=" į Windows kalkuliatorių iškart gauname atsakymą)
=0.40553230406746031746031746031746.
Kalukiatoriaus ln(1.5) reikšmė yra tokia: ln(1.5)=
=0.40546510810816438197801311546435.
Atėmę mūsų apskaičiuotą eilutės reikšmę iš kalkuliatoriaus ln(1.5) reikšmės, gauname
0.40546510810816438197801311546435 - 0.40553230406746031746031746031746 = -6.7195959295935482304344853111181e-5.
Matome, kad
|
r
9
+
1
(
0.5
)
|
=
|
−
6.71959592959
⋅
10
−
5
|
<
0.00009765625
<
0.0001.
{\displaystyle |r_{9+1}(0.5)|=|-6.71959592959\cdot 10^{-5}|<0.00009765625<0.0001.}
f
(
x
)
=
ln
(
1
+
x
)
.
{\displaystyle f(x)=\ln(1+x).}
Apskaičiuosime ln(1+0.9)=ln(1.9) su paklaida mažesne nei 0.01, kai
x
=
0.9.
{\displaystyle x=0.9.}
ln
(
1
+
x
)
=
x
−
x
2
2
+
x
3
3
−
x
4
4
.
.
.
+
(
−
1
)
n
−
1
x
n
n
+
r
n
+
1
(
x
)
;
(
13
)
{\displaystyle \ln(1+x)=x-{\frac {x^{2}}{2}}+{\frac {x^{3}}{3}}-{\frac {x^{4}}{4}}...+(-1)^{n-1}{\frac {x^{n}}{n}}+r_{n+1}(x);\quad (13)}
čia
|
r
n
+
1
(
x
)
|
=
|
x
n
+
1
(
1
+
c
)
n
+
1
(
n
+
1
)
|
,
0
<
c
<
0.9.
{\displaystyle |r_{n+1}(x)|={\Big |}{\frac {x^{n+1}}{(1+c)^{n+1}(n+1)}}{\Big |}\;,\;\;0<c<0.9.}
Matome, kad
|
r
n
+
1
(
x
)
|
=
|
x
n
+
1
(
1
+
c
)
n
+
1
(
n
+
1
)
|
<
|
x
n
+
1
n
+
1
|
.
{\displaystyle |r_{n+1}(x)|={\Big |}{\frac {x^{n+1}}{(1+c)^{n+1}(n+1)}}{\Big |}<{\Big |}{\frac {x^{n+1}}{n+1}}{\Big |}.}
Kai
n
=
19
,
{\displaystyle n=19,}
o
x
=
0.9
,
{\displaystyle x=0.9,}
gausime, kad
|
r
n
+
1
(
x
)
|
<
0.01
,
{\displaystyle |r_{n+1}(x)|<0.01,}
nes
0.9
19
+
1
19
+
1
=
0.9
20
20
=
0.12157665459056928801
20
=
0.0060788327295284644005
{\displaystyle {\frac {0.9^{19+1}}{19+1}}={\frac {0.9^{20}}{20}}={\frac {0.12157665459056928801}{20}}=0.0060788327295284644005}
ir 0.0060788327295284644005 < 0.01. Apskaičiuosime kam lygi ši eilutė, kai
n
=
19
,
{\displaystyle n=19,}
o
x
=
0.9
{\displaystyle x=0.9}
:
ln
(
1
+
0.9
)
=
0.9
−
0.9
2
2
+
0.9
3
3
−
0.9
4
4
+
0.9
5
5
−
0.9
6
6
+
0.9
7
7
−
0.9
8
8
+
0.9
9
9
−
0.9
10
10
+
{\displaystyle \ln(1+0.9)=0.9-{\frac {0.9^{2}}{2}}+{\frac {0.9^{3}}{3}}-{\frac {0.9^{4}}{4}}+{\frac {0.9^{5}}{5}}-{\frac {0.9^{6}}{6}}+{\frac {0.9^{7}}{7}}-{\frac {0.9^{8}}{8}}+{\frac {0.9^{9}}{9}}-{\frac {0.9^{10}}{10}}+}
+
0.9
11
11
−
0.9
12
12
+
0.9
13
13
−
0.9
14
14
+
0.9
15
15
−
0.9
16
16
+
0.9
17
17
−
0.9
18
18
+
0.9
19
19
=
{\displaystyle +{\frac {0.9^{11}}{11}}-{\frac {0.9^{12}}{12}}+{\frac {0.9^{13}}{13}}-{\frac {0.9^{14}}{14}}+{\frac {0.9^{15}}{15}}-{\frac {0.9^{16}}{16}}+{\frac {0.9^{17}}{17}}-{\frac {0.9^{18}}{18}}+{\frac {0.9^{19}}{19}}=}
= 0.62619810431142857142857142857143 + 0.01893065053370873839967787630326 = 0.64512875484513730982824930487469.
Windows kalkuliatoriaus tiksli ln(1.9) reikšmė yra tokia: ln(1.9) = 0.64185388617239477599103597720349.
Atėmę apskaičiuotą netikslią ln(1.9) reikšmę iš tikslios Windows kalkuliatoriaus ln(1.9) reikšmės, gauname:
0.64185388617239477599103597720349 - 0.64512875484513730982824930487469 = -0.0032748686727425338372133276712.
Taigi
|
r
20
(
0.9
)
|
≈
|
−
0.00327486867274
|
<
0.0060788327295284644005
<
0.01.
{\displaystyle |r_{20}(0.9)|\approx |-0.00327486867274|<0.0060788327295284644005<0.01.}
Liekamojo nario įvertinimą gavome teisingai.
Pastebėsime, kad kai x reikšmė arti 1 arba lygi 1, tai
ln
(
1
+
x
)
{\displaystyle \ln(1+x)}
eilutė gaunasi labai ilga ir atsakymas labai netikslus. Vienas būdas atsakymo skaičiavimą pagreitinti yra užrašymas
ln
(
1
+
1
)
=
ln
(
0.2
⋅
10
)
=
ln
0.2
+
ln
10
=
ln
(
1
−
0.8
)
+
ln
10
{\displaystyle \ln(1+1)=\ln(0.2\cdot 10)=\ln 0.2+\ln 10=\ln(1-0.8)+\ln 10}
arba, pavyzdžiui, kai x=0.99, gautume
ln
(
1
+
0.99
)
=
ln
(
1.99
)
=
ln
(
0.199
⋅
10
)
=
ln
0.199
+
ln
10
=
ln
(
1
−
0.801
)
+
ln
10
{\displaystyle \ln(1+0.99)=\ln(1.99)=\ln(0.199\cdot 10)=\ln 0.199+\ln 10=\ln(1-0.801)+\ln 10}
ir galime apskaičiuoti
ln
(
1
+
x
)
{\displaystyle \ln(1+x)}
su
x
=
−
0.8
{\displaystyle x=-0.8}
arba
x
=
−
0.801.
{\displaystyle x=-0.801.}
Tada Makloreno eilutės skaičiavimai gerokai sutrumpėja, bet vistiek gana ilgi.
ln
10
{\displaystyle \ln 10}
galima apskaičiuoti taip:
ln
10
=
ln
(
1.25
⋅
8
)
=
ln
1.25
+
ln
8
=
ln
(
1
+
0.25
)
+
3
ln
2.
{\displaystyle \ln 10=\ln(1.25\cdot 8)=\ln 1.25+\ln 8=\ln(1+0.25)+3\ln 2.}
O
ln
2
{\displaystyle \ln 2}
galima apskaičiuoti taip:
ln
2
=
ln
(
2
⋅
2
)
=
ln
2
+
ln
2
≈
2
ln
(
1.414213562373
)
=
2
ln
(
1
+
0.414213562373
)
.
{\displaystyle \ln 2=\ln({\sqrt {2}}\cdot {\sqrt {2}})=\ln {\sqrt {2}}+\ln {\sqrt {2}}\approx 2\ln(1.414213562373)=2\ln(1+0.414213562373).}
Daug kartų traukiant šaknį kaip ką tik darėme su ln(2) galima gana greitai apskaičiuoti
ln
(
1
+
x
)
{\displaystyle \ln(1+x)}
su bet kokia x reikšme nuo -1 iki 1 (
−
1
<
x
≤
1
{\displaystyle -1<x\leq 1}
).
Pavyzdžiui, ištraukus 4 kartus kvadratinę šaknį iš 2 gausime
ln
2
=
2
⋅
2
⋅
2
⋅
2
ln
(
2
1
2
⋅
1
2
⋅
1
2
⋅
1
2
)
≈
16
ln
(
1.04427378242741384
)
=
16
ln
(
1
+
0.04427378242741384
)
.
{\displaystyle \ln 2=2\cdot 2\cdot 2\cdot 2\ln(2^{{\frac {1}{2}}\cdot {\frac {1}{2}}\cdot {\frac {1}{2}}\cdot {\frac {1}{2}}})\approx 16\ln(1.04427378242741384)=16\ln(1+0.04427378242741384).}
Jei užrašysime
ln
(
1
+
x
)
{\displaystyle \ln(1+x)}
eilutę su
x
=
0.04427378242741384
{\displaystyle x=0.04427378242741384}
ir
n
=
9
,
{\displaystyle n=9,}
tai
|
r
9
+
1
(
0.04427378242741384
)
|
<
|
x
n
+
1
n
+
1
|
≈
0.04427378242741384
9
+
1
9
+
1
=
{\displaystyle |r_{9+1}(0.04427378242741384)|<{\Big |}{\frac {x^{n+1}}{n+1}}{\Big |}\approx {\frac {0.04427378242741384^{9+1}}{9+1}}=}
=
2.89378502579267661242
⋅
10
−
14
10
=
2.89378502579267661242
⋅
10
−
15
<
10
−
14
.
{\displaystyle ={\frac {2.89378502579267661242\cdot 10^{-14}}{10}}=2.89378502579267661242\cdot 10^{-15}<10^{-14}.}
Gavome
ln
2
{\displaystyle \ln 2}
su paklaida mažesne nei
10
−
14
{\displaystyle 10^{-14}}
(gali būti, kad padauginus ln(1.04427378242741384) iš 16 paklaida pasidarys truputi didesnė, gal šiuo atveju pasidarys apie
10
−
13
{\displaystyle 10^{-13}}
ar
10
−
12
{\displaystyle 10^{-12}}
).
Pastebėsime, kad pavyzdžiui ln(0.00003) galima apskaičiuoti taip:
ln
(
0.00003
)
=
ln
(
3
⋅
10
−
5
)
=
ln
(
0.3
⋅
10
−
4
)
=
ln
0.3
+
ln
10
−
4
=
ln
(
1
−
0.7
)
−
4
ln
10.
{\displaystyle \ln(0.00003)=\ln(3\cdot 10^{-5})=\ln(0.3\cdot 10^{-4})=\ln 0.3+\ln 10^{-4}=\ln(1-0.7)-4\ln 10.}
Apskaičiuosime ln(0.3) su paklaida mažesne nei 0.01. Pasinaudosime pirmu pavyzdžiu.
Vadinasi,
ln
(
1
+
x
)
=
f
(
0
)
+
f
′
(
0
)
1
!
x
+
f
″
(
0
)
2
!
x
2
+
f
‴
(
0
)
3
!
x
3
+
f
(
4
)
(
0
)
4
!
x
4
+
.
.
.
+
f
(
n
)
(
0
)
n
!
x
n
+
f
(
n
+
1
)
(
c
)
(
n
+
1
)
!
x
n
+
1
=
{\displaystyle \ln(1+x)=f(0)+{\frac {f'(0)}{1!}}x+{\frac {f''(0)}{2!}}x^{2}+{\frac {f'''(0)}{3!}}x^{3}+{\frac {f^{(4)}(0)}{4!}}x^{4}+...+{\frac {f^{(n)}(0)}{n!}}x^{n}+{\frac {f^{(n+1)}(c)}{(n+1)!}}x^{n+1}=}
=
x
−
x
2
2
+
x
3
3
−
x
4
4
.
.
.
+
(
−
1
)
n
−
1
x
n
n
+
r
n
+
1
(
x
)
;
(
13
)
{\displaystyle =x-{\frac {x^{2}}{2}}+{\frac {x^{3}}{3}}-{\frac {x^{4}}{4}}...+(-1)^{n-1}{\frac {x^{n}}{n}}+r_{n+1}(x);\quad (13)}
čia
|
r
n
+
1
(
x
)
|
=
|
x
n
+
1
(
1
+
c
)
n
+
1
(
n
+
1
)
|
,
0
>
c
>
−
0.7.
{\displaystyle |r_{n+1}(x)|={\Big |}{\frac {x^{n+1}}{(1+c)^{n+1}(n+1)}}{\Big |}\;,\;\;0>c>-0.7.}
Nes
ln
0.3
=
ln
(
1
+
(
−
0.7
)
)
.
{\displaystyle \ln 0.3=\ln(1+(-0.7)).}
Turime
|
r
n
+
1
(
x
)
|
=
|
x
n
+
1
(
1
+
c
)
n
+
1
(
n
+
1
)
|
<
|
x
n
+
1
(
1
−
0.7
)
n
+
1
(
n
+
1
)
|
=
|
x
n
+
1
0.3
n
+
1
(
n
+
1
)
|
.
{\displaystyle |r_{n+1}(x)|={\Big |}{\frac {x^{n+1}}{(1+c)^{n+1}(n+1)}}{\Big |}<{\Big |}{\frac {x^{n+1}}{(1-0.7)^{n+1}(n+1)}}{\Big |}={\Big |}{\frac {x^{n+1}}{0.3^{n+1}(n+1)}}{\Big |}.}
Kai
n
=
19
,
{\displaystyle n=19,}
o
x
=
−
0.7
,
{\displaystyle x=-0.7,}
gausime:
|
(
−
0.7
)
19
+
1
0.3
19
+
1
(
19
+
1
)
|
=
(
−
0.7
)
20
0.3
20
⋅
20
=
{\displaystyle {\Big |}{\frac {(-0.7)^{19+1}}{0.3^{19+1}(19+1)}}{\Big |}={\frac {(-0.7)^{20}}{0.3^{20}\cdot 20}}=}
=
0.00079792266297612001
0.00000000003486784401
⋅
20
=
{\displaystyle ={\frac {0.00079792266297612001}{0.00000000003486784401\cdot 20}}=}
=1144209.9241170145552684546382425.
Matome, kad tokiu budu ln(0.3) apskaičiuoti negalima (tiksliau, negalima sužinoti paklaidos).
Galima iš 0.3 ištraukti, pavyzdžiui, 4 kartus kvadratinę šaknį. Tada turėsime:
ln
(
0.3
)
=
16
ln
(
0.3
1
16
)
≈
16
ln
(
0.9275131559667915
)
=
16
ln
(
1
−
0.07248684403320849
)
.
{\displaystyle \ln(0.3)=16\ln(0.3^{1 \over 16})\approx 16\ln(0.9275131559667915)=16\ln(1-0.07248684403320849).}
Tada
|
r
n
+
1
(
x
)
|
=
16
|
x
n
+
1
(
1
+
c
)
n
+
1
(
n
+
1
)
|
,
0
>
c
>
−
0.07248684403320849.
{\displaystyle |r_{n+1}(x)|=16{\Big |}{\frac {x^{n+1}}{(1+c)^{n+1}(n+1)}}{\Big |}\;,\;\;0>c>-0.07248684403320849.}
Turime
|
r
n
+
1
(
x
)
|
=
16
|
x
n
+
1
(
1
+
c
)
n
+
1
(
n
+
1
)
|
<
16
|
x
n
+
1
(
1
−
0.07248684403320849
)
n
+
1
(
n
+
1
)
|
=
16
|
x
n
+
1
0.9275131559667915
n
+
1
(
n
+
1
)
|
.
{\displaystyle |r_{n+1}(x)|=16{\Big |}{\frac {x^{n+1}}{(1+c)^{n+1}(n+1)}}{\Big |}<16{\Big |}{\frac {x^{n+1}}{(1-0.07248684403320849)^{n+1}(n+1)}}{\Big |}=16{\Big |}{\frac {x^{n+1}}{0.9275131559667915^{n+1}(n+1)}}{\Big |}.}
Kai
n
=
19
,
{\displaystyle n=19,}
o
x
=
−
0.07248684403320849
,
{\displaystyle x=-0.07248684403320849,}
gausime:
|
(
−
0.07248684403320849
)
19
+
1
0.9275131559667915
19
+
1
(
19
+
1
)
|
=
(
−
0.07248684403320849
)
20
0.9275131559667915
20
⋅
20
=
{\displaystyle {\Big |}{\frac {(-0.07248684403320849)^{19+1}}{0.9275131559667915^{19+1}(19+1)}}{\Big |}={\frac {(-0.07248684403320849)^{20}}{0.9275131559667915^{20}\cdot 20}}=}
=
1.603924173409687
⋅
10
−
23
0.222024841347685575
⋅
20
=
{\displaystyle ={\frac {1.603924173409687\cdot 10^{-23}}{0.222024841347685575\cdot 20}}=}
=3.6120376523498566762096049279603e-24=
≈
3.6120376523498566762
⋅
10
−
24
.
{\displaystyle \approx 3.6120376523498566762\cdot 10^{-24}.}
|
r
n
+
1
(
x
)
|
=
|
r
20
(
−
0.07248684403320849
)
|
<
16
⋅
3.6120376523498566762
⋅
10
−
24
=
5.77926024375977
⋅
10
−
23
.
{\displaystyle |r_{n+1}(x)|=|r_{20}(-0.07248684403320849)|<16\cdot 3.6120376523498566762\cdot 10^{-24}=5.77926024375977\cdot 10^{-23}.}
ln
(
1
−
0.07248684403320849
)
=
{\displaystyle \ln(1-0.07248684403320849)=}
=
−
0.0724
−
(
−
0.0724
)
2
2
+
(
−
0.0724
)
3
3
−
(
−
0.0724
)
4
4
+
(
−
0.0724
)
5
5
−
(
−
0.0724
)
6
6
+
(
−
0.0724
)
7
7
−
(
−
0.0724
)
8
8
+
(
−
0.0724
)
9
9
−
(
−
0.0724
)
10
10
+
{\displaystyle =-0.0724-{\frac {(-0.0724)^{2}}{2}}+{\frac {(-0.0724)^{3}}{3}}-{\frac {(-0.0724)^{4}}{4}}+{\frac {(-0.0724)^{5}}{5}}-{\frac {(-0.0724)^{6}}{6}}+{\frac {(-0.0724)^{7}}{7}}-{\frac {(-0.0724)^{8}}{8}}+{\frac {(-0.0724)^{9}}{9}}-{\frac {(-0.0724)^{10}}{10}}+}
+
(
−
0.0724
)
11
11
−
(
−
0.0724
)
12
12
+
(
−
0.0724
)
13
13
−
(
−
0.0724
)
14
14
+
(
−
0.0724
)
15
15
−
(
−
0.0724
)
16
16
+
(
−
0.0724
)
17
17
−
(
−
0.0724
)
18
18
+
(
−
0.0724
)
19
19
=
{\displaystyle +{\frac {(-0.0724)^{11}}{11}}-{\frac {(-0.0724)^{12}}{12}}+{\frac {(-0.0724)^{13}}{13}}-{\frac {(-0.0724)^{14}}{14}}+{\frac {(-0.0724)^{15}}{15}}-{\frac {(-0.0724)^{16}}{16}}+{\frac {(-0.0724)^{17}}{17}}-{\frac {(-0.0724)^{18}}{18}}+{\frac {(-0.0724)^{19}}{19}}=}
[vietoje (-0.0724) imama -0.07248684403320849089929261472692 reikšmė]
= -0.07524830027034272898276362268037 + (-2.8270556157154487988345737336471e-14) =
= -0.07524830027037099953892077716836.
-0.07524830027037099953892077716836 * 16 = -1.2039728043259359926227324346937.
Atėmę gautą ln(0.3) reikšmę iš tikslios kalkuliatoriaus reikšmės (-1.2039728043259359926227462177618), gauname:
-1.2039728043259359926227462177618 - (-1.2039728043259359926227324346937) = -1.3783068138502953610930772512816e-23.
Taigi gavome paklaidą |-1.3783068138502953610930772512816e-23| (tai reiškia
≈
|
−
1.37830681385
⋅
10
−
23
|
{\displaystyle \approx |-1.37830681385\cdot 10^{-23}|}
). Ir
|
r
n
+
1
(
x
)
|
=
|
r
20
(
−
0.07248684403320849
)
|
≈
|
−
1.37830681385
⋅
10
−
23
|
<
5.77926024375977
⋅
10
−
23
.
{\displaystyle |r_{n+1}(x)|=|r_{20}(-0.07248684403320849)|\approx |-1.37830681385\cdot 10^{-23}|<5.77926024375977\cdot 10^{-23}.}
Kas atitinka teoriją.
Pastebėsime, kad jeigu vietoje c=-0.07248684403320849, parinksime c=0, tai gausime, kad paklaida turėtų būti mažesnė už
5.77926024375977
⋅
10
−
23
⋅
0.222024841347685575
=
1.2831393387277
⋅
10
−
23
.
{\displaystyle 5.77926024375977\cdot 10^{-23}\cdot 0.222024841347685575=1.2831393387277\cdot 10^{-23}.}
Bet
1.2831393387277
⋅
10
−
23
<
|
−
1.37830681385
⋅
10
−
23
|
.
{\displaystyle 1.2831393387277\cdot 10^{-23}<|-1.37830681385\cdot 10^{-23}|.}
Ir gaunasi, kad su c=0, gautume truputi melagingą paklaidą.
Apskaičiuosime ln(0.11) ir įvertinsime paklaidą.
Iš 0.11 ištrauksime 4 kartus kvadratinę šaknį. Tada turėsime:
ln
(
0.11
)
=
2
⋅
2
⋅
2
⋅
2
ln
(
0.11
1
2
⋅
1
2
⋅
1
2
⋅
1
2
)
=
16
ln
(
0.11
1
16
)
≈
16
ln
(
0.871138169026
)
=
16
ln
(
1
−
0.12886183
)
.
{\displaystyle \ln(0.11)=2\cdot 2\cdot 2\cdot 2\ln(0.11^{{\frac {1}{2}}\cdot {\frac {1}{2}}\cdot {\frac {1}{2}}\cdot {\frac {1}{2}}})=16\ln(0.11^{1 \over 16})\approx 16\ln(0.871138169026)=16\ln(1-0.12886183).}
Tai yra, x=-0.12886183097395441374956757206472.
Tada
|
r
n
+
1
(
x
)
|
=
16
|
x
n
+
1
(
1
+
c
)
n
+
1
(
n
+
1
)
|
,
0
>
c
>
−
0.12886183.
{\displaystyle |r_{n+1}(x)|=16{\Big |}{\frac {x^{n+1}}{(1+c)^{n+1}(n+1)}}{\Big |}\;,\;\;0>c>-0.12886183.}
Turime
|
r
n
+
1
(
x
)
|
=
16
|
x
n
+
1
(
1
+
c
)
n
+
1
(
n
+
1
)
|
<
16
|
x
n
+
1
(
1
−
0.1288618309739544
)
n
+
1
(
n
+
1
)
|
=
16
|
x
n
+
1
0.871138169026
n
+
1
(
n
+
1
)
|
.
{\displaystyle |r_{n+1}(x)|=16{\Big |}{\frac {x^{n+1}}{(1+c)^{n+1}(n+1)}}{\Big |}<16{\Big |}{\frac {x^{n+1}}{(1-0.1288618309739544)^{n+1}(n+1)}}{\Big |}=16{\Big |}{\frac {x^{n+1}}{0.871138169026^{n+1}(n+1)}}{\Big |}.}
Kai
n
=
19
,
{\displaystyle n=19,}
o
x
=
−
0.12886183097395
,
{\displaystyle x=-0.12886183097395,}
gausime:
|
(
−
0.12886183097395
)
19
+
1
0.871138169026
19
+
1
(
19
+
1
)
|
=
(
−
0.12886183097395
)
20
0.871138169026
20
⋅
20
=
1.5939913388918
⋅
10
−
18
0.063349159397
⋅
20
=
{\displaystyle {\Big |}{\frac {(-0.12886183097395)^{19+1}}{0.871138169026^{19+1}(19+1)}}{\Big |}={\frac {(-0.12886183097395)^{20}}{0.871138169026^{20}\cdot 20}}={\frac {1.5939913388918\cdot 10^{-18}}{0.063349159397\cdot 20}}=}
= 1.2580998343623026293204200398239e-18 =
≈
1.2580998343623
⋅
10
−
18
.
{\displaystyle \approx 1.2580998343623\cdot 10^{-18}.}
|
r
n
+
1
(
x
)
|
=
|
r
20
(
−
0.12886183
)
|
<
16
⋅
1.2580998343623
⋅
10
−
18
=
2.0129597349796842
⋅
10
−
17
.
{\displaystyle |r_{n+1}(x)|=|r_{20}(-0.12886183)|<16\cdot 1.2580998343623\cdot 10^{-18}=2.0129597349796842\cdot 10^{-17}.}
ln
(
1
−
0.12886183097395
)
=
{\displaystyle \ln(1-0.12886183097395)=}
=
−
0.1288
−
(
−
0.1288
)
2
2
+
(
−
0.1288
)
3
3
−
(
−
0.1288
)
4
4
+
(
−
0.1288
)
5
5
−
(
−
0.1288
)
6
6
+
(
−
0.1288
)
7
7
−
(
−
0.1288
)
8
8
+
(
−
0.1288
)
9
9
−
(
−
0.1288
)
10
10
+
{\displaystyle =-0.1288-{\frac {(-0.1288)^{2}}{2}}+{\frac {(-0.1288)^{3}}{3}}-{\frac {(-0.1288)^{4}}{4}}+{\frac {(-0.1288)^{5}}{5}}-{\frac {(-0.1288)^{6}}{6}}+{\frac {(-0.1288)^{7}}{7}}-{\frac {(-0.1288)^{8}}{8}}+{\frac {(-0.1288)^{9}}{9}}-{\frac {(-0.1288)^{10}}{10}}+}
+
(
−
0.1288
)
11
11
−
(
−
0.1288
)
12
12
+
(
−
0.1288
)
13
13
−
(
−
0.1288
)
14
14
+
(
−
0.1288
)
15
15
−
(
−
0.1288
)
16
16
+
(
−
0.1288
)
17
17
−
(
−
0.1288
)
18
18
+
(
−
0.1288
)
19
19
=
{\displaystyle +{\frac {(-0.1288)^{11}}{11}}-{\frac {(-0.1288)^{12}}{12}}+{\frac {(-0.1288)^{13}}{13}}-{\frac {(-0.1288)^{14}}{14}}+{\frac {(-0.1288)^{15}}{15}}-{\frac {(-0.1288)^{16}}{16}}+{\frac {(-0.1288)^{17}}{17}}-{\frac {(-0.1288)^{18}}{18}}+{\frac {(-0.1288)^{19}}{19}}=}
[vietoje (-0.1288) imama -0.12886183097395441374956757206472 reikšmė]
= -0.13795468205758418170298735700763 -1.6773369704537036636530891506237e-11 =
= -0.13795468207435755140752439364416.
ln(0.11) = -0.13795468207435755140752439364416 * 16 = -2.2072749131897208225203902983066.
Atėmę šią gautą ln(0.11) reikšmę iš tikslios (ln(0.11)=-2.2072749131897208239740393314036) kalkuliatoriaus reikšmės, gauname:
-2.2072749131897208239740393314036 - (-2.2072749131897208225203902983066) =
= -2.2072749131897208239740393314036 + 2.2072749131897208225203902983066 =
= -1.4536490330969991153804961232531e-18.
Tada
|
r
n
+
1
(
x
)
|
=
|
r
20
(
−
0.12886183
)
|
≈
|
−
1.453649033096999
⋅
10
−
18
|
<
2.0129597349796842
⋅
10
−
17
.
{\displaystyle |r_{n+1}(x)|=|r_{20}(-0.12886183)|\approx |-1.453649033096999\cdot 10^{-18}|<2.0129597349796842\cdot 10^{-17}.}
Paklaidos įvertinimas gavosi pagal teoriją. Apskaičiavome ln(0.11) su paklaida mažesne nei
10
−
16
{\displaystyle 10^{-16}}
(nors paklaida mažesnė nei
10
−
17
,
{\displaystyle 10^{-17},}
bet to nuspėti negalėjome).
Pastebėsime, kad
2.0129597349796842
⋅
10
−
17
⋅
0.871138169026
20
=
2.0129597349796842
⋅
10
−
17
⋅
0.063349159397
=
1.2751930711097
⋅
10
−
18
.
{\displaystyle 2.0129597349796842\cdot 10^{-17}\cdot 0.871138169026^{20}=2.0129597349796842\cdot 10^{-17}\cdot 0.063349159397=1.2751930711097\cdot 10^{-18}.}
Tai yra,
1.2751930711097
⋅
10
−
18
<
|
−
1.453649033096999
⋅
10
−
18
|
.
{\displaystyle 1.2751930711097\cdot 10^{-18}<|-1.453649033096999\cdot 10^{-18}|.}
Gaunasi truputi neteisingas paklaidos ivertinimas, jei čia
|
r
n
+
1
(
x
)
|
=
16
|
x
n
+
1
(
1
+
c
)
n
+
1
(
n
+
1
)
|
,
{\displaystyle |r_{n+1}(x)|=16{\Big |}{\frac {x^{n+1}}{(1+c)^{n+1}(n+1)}}{\Big |},}
vietoje c=-0.12886183, parinkti c=0.
Pastebėsime, kad ln(0.11) galima užrašyti ir apskaičiuoti taip:
ln
0.11
=
ln
(
1.1
⋅
10
−
1
)
=
ln
(
1.1
)
+
ln
10
−
1
=
ln
(
1
+
0.1
)
−
ln
10.
{\displaystyle \ln 0.11=\ln(1.1\cdot 10^{-1})=\ln(1.1)+\ln 10^{-1}=\ln(1+0.1)-\ln 10.}
O ln(0.3) galima užrašyti ir apskaičiuoti taip:
ln
0.3
=
ln
(
3
⋅
10
−
1
)
=
ln
3
+
ln
10
−
1
=
ln
(
1.5
⋅
2
)
−
ln
10
=
ln
(
1
+
0.5
)
+
ln
2
−
ln
10.
{\displaystyle \ln 0.3=\ln(3\cdot 10^{-1})=\ln 3+\ln 10^{-1}=\ln(1.5\cdot 2)-\ln 10=\ln(1+0.5)+\ln 2-\ln 10.}
Kadangi skaičiuojant ln(x) gali prireikti traukti kvadratinę šaknį, tai pateiksime paprastą algoritmą kaip ištraukti kvadratinę šaknį iš bet kokio skaičiaus.
Kad gauti
x
:
{\displaystyle {\sqrt {x}}:}
Žingsnis 1: Spėjimas G = 1.
Zingsnis 2: Naujas Spėjimas = (G + x/G)/2
Pakartoti Žingsnį 2 kiek norima kartų, kad gauti kiek norima tikslų resultatą.
Pavyzdžiui,
2
{\displaystyle {\sqrt {2}}}
skaičiavimai:
G = 1
G = (1+2/1)/2 = 3/2 = 1.5
G = (3/2 + 4/3)/2 = 17/12 = 1.4166666667
G = (17/12 + 24/17)/2 = 577/408 = 1.414215686
G = (577/408 + 816/577)/2 = 665857/470832 = 1.4142135623746899106262955788901.
Atėmę gautą
2
{\displaystyle {\sqrt {2}}}
reikšmę iš tikslios
2
{\displaystyle {\sqrt {2}}}
reikšmės, gauname paklaidą:
1.4142135623730950488016887242097 - 1.4142135623746899106262955788901 = -1.5948618246068546804368315468877e-12 =
≈
−
1.5948618246
⋅
10
−
12
.
{\displaystyle \approx -1.5948618246\cdot 10^{-12}.}
Tačiau yra daug greitesnis šaknies traukimo būdas apie kurį galima paskaityti čia https://lt.wikibooks.org/wiki/Sekos_riba#Greitas_šaknies_iš_skaičiaus_a_traukimo_būdas
Dar pastebėsime, kad jeigu skaičiuojamas ln(x) ir x>1.4, tai yra protinga užrašyti, pvz. ln(1.8) taip:
ln
1.8
=
ln
(
2
⋅
0.9
)
=
ln
2
+
ln
0.9
=
ln
2
+
ln
(
1
−
0.1
)
.
{\displaystyle \ln 1.8=\ln(2\cdot 0.9)=\ln 2+\ln 0.9=\ln 2+\ln(1-0.1).}
[
ln
1.4
=
ln
(
2
⋅
0.7
)
=
ln
2
+
ln
0.7
=
ln
2
+
ln
(
1
−
0.3
)
.
{\displaystyle \ln 1.4=\ln(2\cdot 0.7)=\ln 2+\ln 0.7=\ln 2+\ln(1-0.3).}
]
Matome, kad tokiu budu ln(0.9)=ln(1-0.1) galima labai greitai apskaičiuoti.
e pakelta x liekamojo nario įvertinimas[ keisti ]
Apskaičiuosime
e
1
2
{\displaystyle e^{1 \over 2}}
su paklaida mažesne nei
0.000001
=
10
−
6
.
{\displaystyle 0.000001=10^{-6}.}
f
(
x
)
=
e
x
.
{\displaystyle f(x)=e^{x}.}
Kadangi
f
(
n
)
(
x
)
=
e
x
,
f
(
n
)
(
0
)
=
e
0
=
1
{\displaystyle f^{(n)}(x)=e^{x},\,f^{(n)}(0)=e^{0}=1\;}
su visais n , priklausantiems natūraliesiems skaičiams, tai
e
x
=
1
+
x
+
x
2
2
!
+
x
3
3
!
+
x
4
4
!
+
.
.
.
+
x
n
n
!
+
r
n
+
1
(
x
)
;
(
10
)
{\displaystyle e^{x}=1+x+{\frac {x^{2}}{2!}}+{\frac {x^{3}}{3!}}+{\frac {x^{4}}{4!}}+...+{\frac {x^{n}}{n!}}+r_{n+1}(x);\quad (10)}
čia
r
n
+
1
(
x
)
=
f
(
n
+
1
)
(
c
)
(
n
+
1
)
!
x
n
+
1
=
e
c
(
n
+
1
)
!
x
n
+
1
,
0
<
c
<
x
.
{\displaystyle r_{n+1}(x)={\frac {f^{(n+1)}(c)}{(n+1)!}}x^{n+1}={\frac {e^{c}}{(n+1)!}}x^{n+1},\;\;0<c<x.}
Įrašę į (10) formulę vietoje x skaičių
1
2
,
{\displaystyle {1 \over 2},}
gauname
e
=
e
1
2
=
1
+
1
2
+
(
1
2
)
2
2
!
+
(
1
2
)
3
3
!
+
(
1
2
)
4
4
!
+
.
.
.
+
(
1
2
)
n
n
!
+
r
n
+
1
(
0.5
)
;
(
15
)
{\displaystyle {\sqrt {e}}=e^{1 \over 2}=1+{1 \over 2}+{\frac {({1 \over 2})^{2}}{2!}}+{\frac {({1 \over 2})^{3}}{3!}}+{\frac {({1 \over 2})^{4}}{4!}}+...+{\frac {({1 \over 2})^{n}}{n!}}+r_{n+1}(0.5);\quad (15)}
čia
r
n
+
1
(
0.5
)
=
e
c
(
n
+
1
)
!
1
2
n
+
1
,
0
<
c
<
1
2
.
{\displaystyle r_{n+1}(0.5)={\frac {e^{c}}{(n+1)!}}{1 \over 2^{n+1}},\;\;0<c<{1 \over 2}.}
Kadangi
e
c
<
e
1
2
<
2
{\displaystyle e^{c}<e^{1 \over 2}<2}
(nes
3
<
1.8
{\displaystyle {\sqrt {3}}<1.8}
), tai
r
n
+
1
(
0.5
)
<
e
1
2
(
n
+
1
)
!
1
2
n
+
1
<
2
(
n
+
1
)
!
1
2
n
+
1
=
1
(
n
+
1
)
!
1
2
n
.
{\displaystyle r_{n+1}(0.5)<{\frac {e^{1 \over 2}}{(n+1)!}}{1 \over 2^{n+1}}<{\frac {2}{(n+1)!}}{1 \over 2^{n+1}}={\frac {1}{(n+1)!}}{1 \over 2^{n}}.}
Mums reikia, kad
1
(
n
+
1
)
!
1
2
n
<
10
−
6
.
{\displaystyle {\frac {1}{(n+1)!}}{1 \over 2^{n}}<10^{-6}.}
Ši nelygybė jau teisinga, kai
n
=
7
,
{\displaystyle n=7,}
nes tuomet
1
(
7
+
1
)
!
1
2
7
=
1
8
!
⋅
2
7
=
1
40320
⋅
128
≈
1.9376240079365
⋅
10
−
7
<
10
−
6
.
{\displaystyle {\frac {1}{(7+1)!}}{1 \over 2^{7}}={\frac {1}{8!\cdot 2^{7}}}={\frac {1}{40320\cdot 128}}\approx 1.9376240079365\cdot 10^{-7}<10^{-6}.}
Taigi
e
≈
1
+
1
2
+
1
2
2
⋅
2
!
+
1
2
3
⋅
3
!
+
1
2
4
⋅
4
!
+
1
2
5
⋅
5
!
+
1
2
6
⋅
6
!
+
1
2
7
⋅
7
!
{\displaystyle {\sqrt {e}}\approx 1+{1 \over 2}+{\frac {1}{2^{2}\cdot 2!}}+{\frac {1}{2^{3}\cdot 3!}}+{\frac {1}{2^{4}\cdot 4!}}+{\frac {1}{2^{5}\cdot 5!}}+{\frac {1}{2^{6}\cdot 6!}}+{\frac {1}{2^{7}\cdot 7!}}}
= 1 + 1/2 + 1/8 + 1/48 + 1/384 + 1/3840 + 1/46080 + 1/645120 =
(galima įdėt šitą eilutę nuo "1" iki "1/645120" į kalkuliatorių ir paspaust "=" ir tada bus iškart apskaičiuota šitos eilutės reikšmė)
=1.6487211681547619047619047619048=
≈
1.648721.
{\displaystyle \approx 1.648721.}
Tiksli
e
{\displaystyle {\sqrt {e}}}
reikšmė yra tokia:
1.6487212707001281468486507878142.
Atėmę netikslią (gautą)
e
{\displaystyle {\sqrt {e}}}
reikšmę iš tikslios
e
{\displaystyle {\sqrt {e}}}
reikšmės, gauname paklaidą:
1.6487212707001281468486507878142 - 1.6487211681547619047619047619048 = 1.0254536624208674602590940166689e-7 =
≈
1.02545366
⋅
10
−
7
.
{\displaystyle \approx 1.02545366\cdot 10^{-7}.}
Apskaičiuosime
e
5
=
e
1
5
=
e
0.2
{\displaystyle {\sqrt[{5}]{e}}=e^{1 \over 5}=e^{0.2}}
su paklaida mažesne nei
10
−
10
.
{\displaystyle 10^{-10}.}
Įrašę į (10) formulę vietoje x skaičių
1
5
,
{\displaystyle {1 \over 5},}
gauname
e
5
=
e
1
5
=
1
+
1
5
+
(
1
5
)
2
2
!
+
(
1
5
)
3
3
!
+
(
1
5
)
4
4
!
+
.
.
.
+
(
1
5
)
n
n
!
+
r
n
+
1
(
0.2
)
;
{\displaystyle {\sqrt[{5}]{e}}=e^{1 \over 5}=1+{1 \over 5}+{\frac {({1 \over 5})^{2}}{2!}}+{\frac {({1 \over 5})^{3}}{3!}}+{\frac {({1 \over 5})^{4}}{4!}}+...+{\frac {({1 \over 5})^{n}}{n!}}+r_{n+1}(0.2);}
čia
r
n
+
1
(
0.2
)
=
e
c
(
n
+
1
)
!
1
5
n
+
1
,
0
<
c
<
1
5
.
{\displaystyle r_{n+1}(0.2)={\frac {e^{c}}{(n+1)!}}{1 \over 5^{n+1}},\;\;0<c<{1 \over 5}.}
Kadangi
e
c
<
e
1
5
<
1.3
{\displaystyle e^{c}<e^{1 \over 5}<1.3}
(nes
3
0.2
<
1.3
{\displaystyle 3^{0.2}<1.3}
), tai
r
n
+
1
(
0.2
)
<
e
1
5
(
n
+
1
)
!
1
5
n
+
1
<
1.3
(
n
+
1
)
!
1
5
n
+
1
=
1.3
(
n
+
1
)
!
⋅
5
n
+
1
.
{\displaystyle r_{n+1}(0.2)<{\frac {e^{1 \over 5}}{(n+1)!}}{1 \over 5^{n+1}}<{\frac {1.3}{(n+1)!}}{1 \over 5^{n+1}}={\frac {1.3}{(n+1)!\cdot 5^{n+1}}}.}
Mums reikia, kad
1.3
(
n
+
1
)
!
⋅
5
n
+
1
<
10
−
10
.
{\displaystyle {\frac {1.3}{(n+1)!\cdot 5^{n+1}}}<10^{-10}.}
Ši nelygybė jau teisinga, kai
n
=
7
,
{\displaystyle n=7,}
nes tuomet
1.3
(
7
+
1
)
!
1
5
7
+
1
=
1.3
8
!
⋅
5
8
=
1.3
40320
⋅
390625
=
1.3
15750000000
≈
8.253968253968
⋅
10
−
11
<
10
−
10
.
{\displaystyle {\frac {1.3}{(7+1)!}}{1 \over 5^{7+1}}={\frac {1.3}{8!\cdot 5^{8}}}={\frac {1.3}{40320\cdot 390625}}={\frac {1.3}{15750000000}}\approx 8.253968253968\cdot 10^{-11}<10^{-10}.}
Taigi
e
1
/
5
≈
1
+
1
5
+
1
5
2
⋅
2
!
+
1
5
3
⋅
3
!
+
1
5
4
⋅
4
!
+
1
5
5
⋅
5
!
+
1
5
6
⋅
6
!
+
1
5
7
⋅
7
!
=
{\displaystyle e^{1/5}\approx 1+{1 \over 5}+{\frac {1}{5^{2}\cdot 2!}}+{\frac {1}{5^{3}\cdot 3!}}+{\frac {1}{5^{4}\cdot 4!}}+{\frac {1}{5^{5}\cdot 5!}}+{\frac {1}{5^{6}\cdot 6!}}+{\frac {1}{5^{7}\cdot 7!}}=}
= 1 + 1/5 + 1/50 + 1/750 + 1/15000 + 1/375000 + 1/11250000 + 1/393750000 =
(galima nukopijuot šitą eilutę nuo "1" iki "1/393750000" ir padaryt "Paste" į "Windows" kalkuliatorių ir paspaust "=" ir tada bus iškart apskaičiuota šitos eilutės reikšmė)
=1.2214027580952380952380952380952=
≈
1.2214027581.
{\displaystyle \approx 1.2214027581.}
Tiksli
e
5
=
e
0.2
{\displaystyle {\sqrt[{5}]{e}}=e^{0.2}}
reikšmė yra tokia:
1.2214027581601698339210719946397.
Atėmę netikslią (gautą)
e
5
{\displaystyle {\sqrt[{5}]{e}}}
reikšmę iš tikslios
e
5
{\displaystyle {\sqrt[{5}]{e}}}
reikšmės, gauname paklaidą:
1.2214027581601698339210719946397 - 1.2214027580952380952380952380952 = 0.0000000000649317386829767565445 =
≈
6.49317386829767565445
⋅
10
−
11
.
{\displaystyle \approx 6.49317386829767565445\cdot 10^{-11}.}
Pastebėsime, kad
1
8
!
⋅
5
8
=
1
15750000000
≈
6.3492063492
⋅
10
−
11
{\displaystyle {\frac {1}{8!\cdot 5^{8}}}={\frac {1}{15750000000}}\approx 6.3492063492\cdot 10^{-11}}
jau būtų neteisingas paklaidos įvertinimas, nes
6.3492063492
⋅
10
−
11
<
6.49317386829767565445
⋅
10
−
11
.
{\displaystyle 6.3492063492\cdot 10^{-11}<6.49317386829767565445\cdot 10^{-11}.}
Apskaičiuosime
e
=
e
1
{\displaystyle e=e^{1}}
su paklaida mažesne nei
0.0001
=
10
−
4
.
{\displaystyle 0.0001=10^{-4}.}
Įrašę į (10) formulę vietoje x skaičių
1
{\displaystyle 1}
gauname
e
1
=
1
+
1
+
1
2
2
!
+
1
3
3
!
+
1
4
4
!
+
.
.
.
+
1
n
n
!
+
r
n
+
1
(
1
)
;
{\displaystyle e^{1}=1+1+{\frac {1^{2}}{2!}}+{\frac {1^{3}}{3!}}+{\frac {1^{4}}{4!}}+...+{\frac {1^{n}}{n!}}+r_{n+1}(1);}
čia
r
n
+
1
(
1
)
=
e
c
(
n
+
1
)
!
⋅
1
n
+
1
,
0
<
c
<
1.
{\displaystyle r_{n+1}(1)={\frac {e^{c}}{(n+1)!}}\cdot 1^{n+1},\;\;0<c<1.}
Kadangi
e
c
<
e
1
<
3
,
{\displaystyle e^{c}<e^{1}<3,}
tai
r
n
+
1
(
1
)
<
e
1
(
n
+
1
)
!
⋅
1
n
+
1
<
3
(
n
+
1
)
!
.
{\displaystyle r_{n+1}(1)<{\frac {e^{1}}{(n+1)!}}\cdot 1^{n+1}<{\frac {3}{(n+1)!}}.}
Mums reikia, kad
3
(
n
+
1
)
!
<
10
−
4
.
{\displaystyle {\frac {3}{(n+1)!}}<10^{-4}.}
Ši nelygybė jau teisinga, kai
n
=
7
,
{\displaystyle n=7,}
nes tuomet
3
(
7
+
1
)
!
=
3
8
!
=
3
40320
≈
7.44047619
⋅
10
−
5
<
10
−
4
.
{\displaystyle {\frac {3}{(7+1)!}}={\frac {3}{8!}}={\frac {3}{40320}}\approx 7.44047619\cdot 10^{-5}<10^{-4}.}
Taigi
e
1
≈
1
+
1
+
1
2
!
+
1
3
!
+
1
4
!
+
1
5
!
+
1
6
!
+
1
7
!
=
{\displaystyle e^{1}\approx 1+1+{\frac {1}{2!}}+{\frac {1}{3!}}+{\frac {1}{4!}}+{\frac {1}{5!}}+{\frac {1}{6!}}+{\frac {1}{7!}}=}
= 1 + 1 + 1/2 + 1/6 + 1/24 + 1/120 + 1/720 + 1/5040 =
(galima nukopijuot šitą eilutę nuo "1" iki "1/5040" ir padaryt "Paste" į "Windows" kalkuliatorių ir paspaust "=" ir tada bus iškart apskaičiuota šitos eilutės reikšmė)
=2.718253968253968253968253968254=
≈
2.7183.
{\displaystyle \approx 2.7183.}
Atėmę netikslią (gautą) e reikšmę iš tikslios e reikšmės, gauname paklaidą:
2.7182818284590452353602874713527 - 2.718253968253968253968253968254 = 2.7860205076981392033503098694244e-5 =
≈
2.786020507698
⋅
10
−
5
.
{\displaystyle \approx 2.786020507698\cdot 10^{-5}.}
Pastebėsime, kad
1
8
!
=
1
40320
≈
2.48015873015873
⋅
10
−
5
.
{\displaystyle {\frac {1}{8!}}={\frac {1}{40320}}\approx 2.48015873015873\cdot 10^{-5}.}
Parodysime kaip ištraukti bet kokio laipsnio šaknį iš bet kokio skaičiaus a. Kadangi
a
y
=
e
ln
a
y
=
e
y
ln
a
,
{\displaystyle a^{y}=e^{\ln a^{y}}=e^{y\ln a},}
tai, pavyzdžiui,
3
1
5
=
e
ln
3
1
/
5
=
e
1
5
ln
3
=
e
x
;
{\displaystyle 3^{1 \over 5}=e^{\ln 3^{1/5}}=e^{{\frac {1}{5}}\ln 3}=e^{x};}
x
=
1
5
ln
3
≈
0.2
⋅
1.0986122886681
=
{\displaystyle x={\frac {1}{5}}\ln 3\approx 0.2\cdot 1.0986122886681=}
=0.21972245773362193827904904738451.
Tada
e
x
=
e
0.21972245773362
=
{\displaystyle e^{x}=e^{0.21972245773362}=}
1.2457309396155173259666803366403.
O iš kalkuliatoriaus
3
0.2
=
{\displaystyle 3^{0.2}=}
1.2457309396155173259666803366403.
Kai skaičius x didesnis tai Makloreno eilutė, skaičiuojant tokiu budu, darosi ilgesnė. Tai yra, jeigu, pavyzdžiui, a=300, o y=1/5, tai
300
1
5
=
a
y
=
e
ln
a
y
=
e
1
5
ln
300
=
e
x
;
{\displaystyle 300^{1 \over 5}=a^{y}=e^{\ln a^{y}}=e^{{1 \over 5}\ln 300}=e^{x};}
x
=
1
5
ln
300
≈
0.2
⋅
5.7037824746562
=
{\displaystyle x={\frac {1}{5}}\ln 300\approx 0.2\cdot 5.7037824746562=}
1.1407564949312402118862456292583.
Tada
e
x
=
e
1.14075649493124
=
{\displaystyle e^{x}=e^{1.14075649493124}=}
3.1291346445318980387324449897269.
O iš kalkuliatoriaus
300
0.2
=
{\displaystyle 300^{0.2}=}
3.1291346445318980387324449897269.
Kai skaičius a iš kurio traukiame šaknį yra labai didelis, o y nėra labai mažas, tai tokiu budu skaičiuojant Makloreno eilutė gaunasi labai ilga, jei reikia didelio tikslumo. Pavyzdžiui, kai a=50000, o y=1/3, tai
50000
1
3
=
a
y
=
e
y
ln
a
=
e
1
3
ln
50000
=
e
x
;
{\displaystyle 50000^{1 \over 3}=a^{y}=e^{y\ln a}=e^{{1 \over 3}\ln 50000}=e^{x};}
x
=
1
3
ln
50000
≈
10.81977828441
/
3
=
{\displaystyle x={\frac {1}{3}}\ln 50000\approx 10.81977828441/3=}
3.6065927614700943702242417173212.
Tada
e
x
=
e
3.60659276147
=
{\displaystyle e^{x}=e^{3.60659276147}=}
36.840314986403866057798228335798.
O iš kalkuliatoriaus
50000
1
/
3
=
{\displaystyle 50000^{1/3}=}
36.840314986403866057798228335798.
Parodysime kaip greitai ištraukti bet kokio laipsnio šaknį iš bet kokio didelio skaičiaus a. Kaip žinome,
a
y
=
e
ln
a
y
=
e
y
ln
a
.
{\displaystyle a^{y}=e^{\ln a^{y}}=e^{y\ln a}.}
Tarkime reikia ištraukti kūbinę šaknį iš skaičiaus a=50000. Tada galime užrašyti
50000
1
3
=
a
y
=
e
y
ln
a
=
e
1
3
ln
50000
=
e
x
;
(
10.1
)
{\displaystyle 50000^{1 \over 3}=a^{y}=e^{y\ln a}=e^{{1 \over 3}\ln 50000}=e^{x};\quad (10.1)}
x
=
1
3
ln
50000
=
1
3
ln
(
5
⋅
10
4
)
=
1
3
(
ln
5
+
ln
10
4
)
=
1
3
(
ln
5
+
4
ln
10
)
.
{\displaystyle x={\frac {1}{3}}\ln 50000={\frac {1}{3}}\ln(5\cdot 10^{4})={\frac {1}{3}}(\ln 5+\ln 10^{4})={\frac {1}{3}}(\ln 5+4\ln 10).}
Įstatome gautą x reikšmę į (10.1) eilutę:
50000
1
3
=
e
x
=
e
1
3
(
ln
5
+
4
ln
10
)
=
e
1
3
ln
5
⋅
e
4
3
ln
10
=
(
e
ln
5
)
1
/
3
⋅
(
e
ln
10
)
4
/
3
=
5
1
/
3
⋅
10
4
/
3
.
{\displaystyle 50000^{1 \over 3}=e^{x}=e^{{\frac {1}{3}}(\ln 5+4\ln 10)}=e^{{\frac {1}{3}}\ln 5}\cdot e^{{\frac {4}{3}}\ln 10}={\Big (}e^{\ln 5}{\Big )}^{1/3}\cdot {\Big (}e^{\ln 10}{\Big )}^{4/3}=5^{1/3}\cdot 10^{4/3}.}
Matome, kad visgi šituo budu negalima pagreitinti Makloreno eilutės skaičiavimų. Pastebėsime tik, kad
1
3
ln
5
≈
1.6094379124341
/
3
=
{\displaystyle {\frac {1}{3}}\ln 5\approx 1.6094379124341/3=}
0.53647930414470012486691977774206,
4
3
ln
10
≈
4
⋅
2.302585092994
/
3
=
{\displaystyle {\frac {4}{3}}\ln 10\approx 4\cdot 2.302585092994/3=}
3.0701134573253942453573219395792.
Bet
4
3
ln
10
{\displaystyle {\frac {4}{3}}\ln 10}
galima užrašyti taip:
4
3
ln
10
=
4
3
(
ln
1.25
+
ln
2
+
ln
2
+
ln
2
)
.
{\displaystyle {\frac {4}{3}}\ln 10={\frac {4}{3}}(\ln 1.25+\ln 2+\ln 2+\ln 2).}
Ir tada
e
4
3
ln
10
=
e
4
3
ln
1.25
⋅
(
e
4
3
ln
2
)
3
=
(
e
1
3
ln
1.25
)
4
⋅
(
e
1
3
ln
2
)
12
.
{\displaystyle e^{{\frac {4}{3}}\ln 10}=e^{{\frac {4}{3}}\ln 1.25}\cdot (e^{{\frac {4}{3}}\ln 2})^{3}=(e^{{\frac {1}{3}}\ln 1.25})^{4}\cdot (e^{{\frac {1}{3}}\ln 2})^{12}.}
Mums tereikia apskaičiuoti
x
1
=
1
3
ln
1.25
,
{\displaystyle x_{1}={\frac {1}{3}}\ln 1.25,}
paskui
e
x
1
{\displaystyle e^{x_{1}}}
ir gautą atsakymą (
e
x
1
{\displaystyle e^{x_{1}}}
) pakelti 4 laipsniu. Ir tereikia apskaičiuoti
x
2
=
1
3
ln
2
,
{\displaystyle x_{2}={\frac {1}{3}}\ln 2,}
paskui apskaičiuoti
e
x
2
{\displaystyle e^{x_{2}}}
ir gautą atsakymą (
e
x
2
{\displaystyle e^{x_{2}}}
) pakelti 12 laipsniu. Taip Makloreno eilutės (
e
x
1
{\displaystyle e^{x_{1}}}
ir
e
x
2
{\displaystyle e^{x_{2}}}
) labai sutrumpės.
Grįžkime, be didesnių išsidirbinėjimų, prie (10.1) eilutės. Tada
x
=
1
3
ln
50000
=
1
3
ln
(
5
⋅
10
4
)
=
1
3
(
ln
5
+
ln
10
4
)
=
1
3
(
ln
5
+
4
ln
10
)
;
{\displaystyle x={\frac {1}{3}}\ln 50000={\frac {1}{3}}\ln(5\cdot 10^{4})={\frac {1}{3}}(\ln 5+\ln 10^{4})={\frac {1}{3}}(\ln 5+4\ln 10);}
50000
1
3
=
e
x
=
e
1
3
(
ln
5
+
4
ln
10
)
=
e
1
3
ln
5
⋅
e
4
3
ln
10
=
e
1
3
ln
5
⋅
(
e
1
3
ln
10
)
4
.
{\displaystyle 50000^{1 \over 3}=e^{x}=e^{{\frac {1}{3}}(\ln 5+4\ln 10)}=e^{{\frac {1}{3}}\ln 5}\cdot e^{{\frac {4}{3}}\ln 10}=e^{{\frac {1}{3}}\ln 5}\cdot (e^{{\frac {1}{3}}\ln 10})^{4}.}
Toliau mums reikia apskaičiuoti
x
1
=
1
3
ln
5
≈
1.6094379124341
/
3
=
{\displaystyle x_{1}={\frac {1}{3}}\ln 5\approx 1.6094379124341/3=}
0.53647930414470012486691977774206,
x
2
=
1
3
ln
10
≈
2.302585092994
/
3
=
{\displaystyle x_{2}={\frac {1}{3}}\ln 10\approx 2.302585092994/3=}
0.76752836433134856133933048489479.
Dar toliau reikia apskaičiuoti
e
x
1
{\displaystyle e^{x_{1}}}
ir
e
x
2
{\displaystyle e^{x_{2}}}
(su
x
1
{\displaystyle x_{1}}
ir
x
2
{\displaystyle x_{2}}
Makloreno eilutės gaunasi trumpos ir su dideliu tikslumu):
e
x
1
=
e
0.5364793041447
=
{\displaystyle e^{x_{1}}=e^{0.5364793041447}=}
1.7099759466766969893531088725439,
e
x
2
=
e
0.76752836433
=
{\displaystyle e^{x_{2}}=e^{0.76752836433}=}
2.1544346900318837217592935665194.
Gautą
e
x
2
{\displaystyle e^{x_{2}}}
reikšmę reikia pakelti ketvirtu laipsniu,
p
=
(
e
x
2
)
4
=
2.15443469
4
=
{\displaystyle p=(e^{x_{2}})^{4}=2.15443469^{4}=}
21.544346900318837217592935665194.
Taigi,
50000
1
3
=
e
x
=
e
x
1
⋅
p
=
{\displaystyle 50000^{1 \over 3}=e^{x}=e^{x_{1}}\cdot p=}
1.7099759466766969893531088725439 * 21.544346900318837217592935665194 =
=36.8403149864038660577982283358.
Iš "Windows" kalkuliatoriaus
50000
1
3
=
{\displaystyle 50000^{1 \over 3}=}
36.840314986403866057798228335798.
Taigi, suradome būdą kaip labai pagreitinti šaknies traukimą iš labai didelių skaičių.
Pateiksime dar vieną pavyzdį kaip greitai ištrauktį šaknį iš didelio skaičiaus. Tarkime, reikia ištraukti penkto laipsnio šaknį iš skaičiaus a=7358000. Kaip žinome,
a
y
=
e
ln
a
y
=
e
y
ln
a
.
{\displaystyle a^{y}=e^{\ln a^{y}}=e^{y\ln a}.}
7358000
1
5
=
a
y
=
e
y
ln
a
=
e
1
5
ln
7358000
=
e
x
;
(
10.2
)
{\displaystyle 7358000^{1 \over 5}=a^{y}=e^{y\ln a}=e^{{1 \over 5}\ln 7358000}=e^{x};\quad (10.2)}
x
=
1
5
ln
7358000
=
1
5
ln
(
7.358
⋅
10
6
)
=
1
5
(
ln
7.358
+
ln
10
6
)
=
1
5
(
ln
7.358
+
6
ln
10
)
;
{\displaystyle x={\frac {1}{5}}\ln 7358000={\frac {1}{5}}\ln(7.358\cdot 10^{6})={\frac {1}{5}}(\ln 7.358+\ln 10^{6})={\frac {1}{5}}(\ln 7.358+6\ln 10);}
7358000
1
5
=
e
x
=
e
1
5
(
ln
7.358
+
6
ln
10
)
=
e
1
5
ln
7.358
⋅
e
6
5
ln
10
=
e
1
5
ln
7.358
⋅
(
e
1
5
ln
10
)
6
.
{\displaystyle 7358000^{1 \over 5}=e^{x}=e^{{\frac {1}{5}}(\ln 7.358+6\ln 10)}=e^{{\frac {1}{5}}\ln 7.358}\cdot e^{{\frac {6}{5}}\ln 10}=e^{{\frac {1}{5}}\ln 7.358}\cdot (e^{{\frac {1}{5}}\ln 10})^{6}.}
Toliau mums reikia apskaičiuoti
x
1
=
1
5
ln
7.358
≈
1.99578815668
/
5
=
{\displaystyle x_{1}={\frac {1}{5}}\ln 7.358\approx 1.99578815668/5=}
0.39915763133651652361254646915311,
x
2
=
1
5
ln
10
≈
2.302585092994
/
5
=
{\displaystyle x_{2}={\frac {1}{5}}\ln 10\approx 2.302585092994/5=}
0.46051701859880913680359829093687.
Dar toliau reikia apskaičiuoti
e
x
1
{\displaystyle e^{x_{1}}}
ir
e
x
2
{\displaystyle e^{x_{2}}}
(su
x
1
{\displaystyle x_{1}}
ir
x
2
{\displaystyle x_{2}}
Makloreno eilutės gaunasi trumpos ir su dideliu tikslumu):
e
x
1
=
e
0.3991576313365
=
{\displaystyle e^{x_{1}}=e^{0.3991576313365}=}
1.4905685604041673920504265746024,
e
x
2
=
e
0.4605170185988
=
{\displaystyle e^{x_{2}}=e^{0.4605170185988}=}
1.5848931924611134852021013733915.
Gautą
e
x
2
{\displaystyle e^{x_{2}}}
reikšmę reikia pakelti 6-tu laipsniu,
p
=
(
e
x
2
)
6
=
1.58489319246
6
=
{\displaystyle p=(e^{x_{2}})^{6}=1.58489319246^{6}=}
15.848931924611134852021013733915.
Taigi,
7358000
1
/
5
=
e
x
=
e
x
1
⋅
p
=
{\displaystyle 7358000^{1/5}=e^{x}=e^{x_{1}}\cdot p=}
1.4905685604041673920504265746024 * 15.848931924611134852021013733915 =
=23.623919642811269319097605866468.
Iš "Windows" kalkuliatoriaus
7358000
0.2
=
{\displaystyle 7358000^{0.2}=}
23.623919642811269319097605866468.
Atsakymai sutampa.
Pastebėsime, kad jeigu, pavyzdžiui, reikia apskaičiuoti
7358000
1234.567
,
{\displaystyle 7358000^{1234.567},}
tai tokį reiškinį galima užrašyti taip:
7358000
1234.567
=
7358000
1234567
1000
=
7358000
1234567
/
1000
=
(
7358000
1
/
1000
)
1234567
.
{\displaystyle 7358000^{1234.567}=7358000^{1234567 \over 1000}=7358000^{1234567/1000}=(7358000^{1/1000})^{1234567}.}
Tada toliau tereikia apskaičiuoti
7358000
1
/
1000
{\displaystyle 7358000^{1/1000}}
ir gautą rezultatą pakelti 1234567 laipsniu.
Dar
7358000
1234.567
{\displaystyle 7358000^{1234.567}}
galima užrašyti taip:
7358000
1234.567
=
7358000
0.1234567
⋅
10000
=
(
7358000
0.1234567
)
10000
.
{\displaystyle 7358000^{1234.567}=7358000^{0.1234567\cdot 10000}=(7358000^{0.1234567})^{10000}.}
Tada tereikia apskaičiuoti
7358000
0.1234567
{\displaystyle 7358000^{0.1234567}}
ir gautą rezultatą pakelti 10000 laipsniu.
Dar pastebėsime, kad jeigu skaičiuosime
7358000
0.9876
,
{\displaystyle 7358000^{0.9876},}
tai reikės skaičiuoti
e
x
1
{\displaystyle e^{x_{1}}}
ir
e
x
2
{\displaystyle e^{x_{2}}}
su tokiais
x
1
{\displaystyle x_{1}}
ir
x
2
{\displaystyle x_{2}}
:
x
1
=
0.9876
ln
7.358
≈
0.9876
⋅
1.99578815668
=
{\displaystyle x_{1}=0.9876\ln 7.358\approx 0.9876\cdot 1.99578815668=}
1.9710403835397185935987544646781,
x
2
=
0.9876
ln
10
≈
0.9876
⋅
2.302585092994
=
{\displaystyle x_{2}=0.9876\ln 10\approx 0.9876\cdot 2.302585092994=}
2.2740330378409195175361683606463.
Su tokiom
x
1
{\displaystyle x_{1}}
ir
x
2
{\displaystyle x_{2}}
reikšmėm
e
x
1
{\displaystyle e^{x_{1}}}
ir
e
x
2
{\displaystyle e^{x_{2}}}
Makloreno eilutės gausis ilgos. Kad jas labai patrumpinti, galima
7358000
0.9876
{\displaystyle 7358000^{0.9876}}
užrašyti taip:
7358000
0.9876
=
(
7358000
0.09876
)
10
.
{\displaystyle 7358000^{0.9876}=(7358000^{0.09876})^{10}.}
Toliau
7358000
0.09876
{\displaystyle 7358000^{0.09876}}
galima apskaičiuoti aukščiau aprašytu budu (
a
y
=
e
y
ln
a
{\displaystyle a^{y}=e^{y\ln a}}
). Tada
x
1
=
0.09876
ln
7.358
≈
0.09876
⋅
0.199578815668
=
{\displaystyle x_{1}=0.09876\ln 7.358\approx 0.09876\cdot 0.199578815668=}
0.19710403835397185935987544646781,
x
2
=
0.09876
ln
10
≈
0.09876
⋅
0.2302585092994
=
{\displaystyle x_{2}=0.09876\ln 10\approx 0.09876\cdot 0.2302585092994=}
0.22740330378409195175361683606463.
Su tokiom
x
1
{\displaystyle x_{1}}
ir
x
2
{\displaystyle x_{2}}
reikšmėm
e
x
1
{\displaystyle e^{x_{1}}}
ir
e
x
2
{\displaystyle e^{x_{2}}}
Makloreno eilutės gausis daug trumpesnės. Toliau tereikės
e
x
2
{\displaystyle e^{x_{2}}}
pakelti 6 laipsniu,
p
=
(
e
x
2
)
6
,
{\displaystyle p=(e^{x_{2}})^{6},}
paskui sudauginti
e
x
1
{\displaystyle e^{x_{1}}}
su p ir rezultatą pakelti 10 laipsniu. Ir tada gausime:
7358000
0.9876
=
(
e
x
1
⋅
p
)
10
=
{\displaystyle 7358000^{0.9876}=(e^{x_{1}}\cdot p)^{10}=}
6048002.5023225950089917200618921.
Parodysime dar gudresnį būdą apskaičiuoti
a
y
,
{\displaystyle a^{y},}
kai a yra labai didelis skaičius. "Windows 10" kalkuliatoriaus didžiausias įmanomas skaičius yra 9.9999999999999999999999999999999e+9999 (tai reiškia
9.999999...
⋅
10
9999
{\displaystyle 9.999999...\cdot 10^{9999}}
). Čia yra 32 devynetai prieš "e+9999", bet kai kurie skaitmenys nesimato, nes skaičiuojant pasitaikydavo, kad atėmus iš tikslios reikšmės, mažiau tikslią gaudavosi vis tiek 32 skaitmenys. Kaip suprantu, Extended Precision (80 bit) turi irgi
9.999999...
⋅
10
9999
{\displaystyle 9.999999...\cdot 10^{9999}}
didžiausią įmanoma skaičių, tik su mažiau skaitmenų po kablelio. Nors gali būti, kad truputi mažiau nei 10 pakelta rodikliu 9999, gal 10 peklta 4932, kaip rašo Vikipedijoj :
"The 80-bit floating-point format has a range (including subnormals) from approximately 3.65×10−4951 to 1.18×104932 . Although log10 (264 ) ≅ 19.266, this format is usually described as giving approximately eighteen significant digits of precision (the floor of log10 (263 ), the minimum guaranteed precision)."
Taigi, Extended Precision (80 bit) turi apie 18 ar 19 skaitmenų (log10 (263 ) = log10 (9,223,372,036,854,775,808) = 18.96488972683) ir apie 4 skaitmenis eksponentės. Tuo tarpu Double Precision (64 bit) turi apie 3 eksponentės skaitmenis (t. y. 999): "Exponents range from −1022 to +1023 because exponents of −1023 (all 0s) and +1024 (all 1s) are reserved for special numbers."
Taigi, iš kalkuliatoriaus
ln(9.9999999999999999999999999999999e+9999) = 23025.850929940456840179914546844.
Ne toks jau didelis skaičius. Tarkim, norime apskaičiuoti
(
9.99
⋅
10
9999
)
0.9876
=
a
y
;
y
=
0.9876.
{\displaystyle (9.99\cdot 10^{9999})^{0.9876}=a^{y};\;\;y=0.9876.}
Tada
(
9.99
⋅
10
9999
)
0.9876
=
a
y
=
e
y
ln
a
=
e
x
;
{\displaystyle (9.99\cdot 10^{9999})^{0.9876}=a^{y}=e^{y\ln a}=e^{x};}
x
=
y
ln
a
=
0.9876
ln
(
9.99
⋅
10
9999
)
=
0.9876
(
ln
(
9.99
)
+
9999
ln
10
)
;
{\displaystyle x=y\ln a=0.9876\ln(9.99\cdot 10^{9999})=0.9876(\ln(9.99)+9999\ln 10);}
x
1
=
0.9876
ln
(
9.99
)
=
{\displaystyle x_{1}=0.9876\ln(9.99)=}
2.2730449437114724198514271513722,
x
2
=
0.9876
⋅
9999
ln
10
=
{\displaystyle x_{2}=0.9876\cdot 9999\ln 10=}
22738.056345371354255844147438102.
Toliau darome taip. Padauginame x iš
0.00001
=
10
−
5
{\displaystyle 0.00001=10^{-5}}
(galima padauginti ir iš, pavyzdžiui,
10
−
7
{\displaystyle 10^{-7}}
kad dar labiau sutrumpinti Makloreno eilutės skaičiavimą) ir tada gauname
x
0
=
x
⋅
10
−
5
=
(
x
1
+
x
2
)
⋅
10
−
5
=
{\displaystyle x_{0}=x\cdot 10^{-5}=(x_{1}+x_{2})\cdot 10^{-5}=}
0.22740329390315065728263998865254;
x
01
=
x
1
⋅
10
−
5
≈
2.2730449437
⋅
10
−
5
=
{\displaystyle x_{01}=x_{1}\cdot 10^{-5}\approx 2.2730449437\cdot 10^{-5}=}
2.2730449437114724198514271513722e-5,
x
02
=
x
2
⋅
10
−
5
≈
22738.05634537
⋅
10
−
5
=
{\displaystyle x_{02}=x_{2}\cdot 10^{-5}\approx 22738.05634537\cdot 10^{-5}=}
0.22738056345371354255844147438102.
Toliau, pagal Makloreno eilutę, apskaičiuojame
e
x
01
=
e
0.000022730449437
=
{\displaystyle e^{x_{01}}=e^{0.000022730449437}=}
1.0000227307077757379114427014178,
e
x
02
=
e
0.2273805634537
=
{\displaystyle e^{x_{02}}=e^{0.2273805634537}=}
1.2553075012077639197733369606026.
Ir galiausiai
e
x
0
=
e
x
1
+
x
2
=
e
x
1
⋅
e
x
2
{\displaystyle e^{x_{0}}=e^{x_{1}+x_{2}}=e^{x_{1}}\cdot e^{x_{2}}}
pakeliame
10
5
=
100000
{\displaystyle 10^{5}=100000}
-tuoju laipsniu (arba pakeliame 10000000-tuoju laipsniu, jei x dauginome iš
10
−
7
{\displaystyle 10^{-7}}
). Tada
(
9.99
⋅
10
9999
)
0.9876
=
(
e
x
0
)
100000
=
(
e
x
01
⋅
e
x
02
)
100000
=
{\displaystyle (9.99\cdot 10^{9999})^{0.9876}=(e^{x_{0}})^{100000}=(e^{x_{01}}\cdot e^{x_{02}})^{100000}=}
=
(
1.0000227307
⋅
1.2553075012
)
100000
=
{\displaystyle =(1.0000227307\cdot 1.2553075012)^{100000}=}
(1.0000227307077757379114427014178 * 1.2553075012077639197733369606026)^100000 =
= 9.990123938748126108971250386732e+9875.
Kalkuliatoriaus reikšmė yra tokia
(
9.99
⋅
10
9999
)
0.9876
=
{\displaystyle (9.99\cdot 10^{9999})^{0.9876}=}
= 9.9901239387481261089712504055752e+9875 =
≈
9.990123938748
⋅
10
9875
.
{\displaystyle \approx 9.990123938748\cdot 10^{9875}.}
Iš tikro, galima buvo padaryt greičiau (tiesiog truputi susipainiojęs buvau (kėliau 5 laipsniu, o ne
10
5
,
{\displaystyle 10^{5},}
todėl nesigaudinėjo...)). Štai kaip.
x
=
y
ln
a
=
0.9876
ln
(
9.99
⋅
10
9999
)
=
{\displaystyle x=y\ln a=0.9876\ln(9.99\cdot 10^{9999})=}
22740.329390315065728263998865254;
x
0
=
x
⋅
10
−
5
=
{\displaystyle x_{0}=x\cdot 10^{-5}=}
0.22740329390315065728263998865254.
Toliau, pagal Makloreno eilutę, apskaičiuojame
e
x
0
=
e
0.227403293
=
{\displaystyle e^{x_{0}}=e^{0.227403293}=}
1.2553360352357425652203277670022.
Ir toliau tiesiog
e
x
0
{\displaystyle e^{x_{0}}}
pakeliam
10
5
{\displaystyle 10^{5}}
laipsniu:
(
9.99
⋅
10
9999
)
0.9876
=
(
e
x
0
)
100000
=
(
e
0.22740329390315
)
100000
=
1.25533603523574
100000
=
{\displaystyle (9.99\cdot 10^{9999})^{0.9876}=(e^{x_{0}})^{100000}=(e^{0.22740329390315})^{100000}=1.25533603523574^{100000}=}
= 1.2553360352357425652203277670022^100000 =
= 9.9901239387481261089712504105024e+9875.
Bet kokio skaičiaus pakelimas bet kokiu laipsniu (universalus algoritmas)
Jei pakelsime
2
{\displaystyle 2}
kvadratu, tai gausime
2
2
=
4.
{\displaystyle 2^{2}=4.}
Jei toliau
4
{\displaystyle 4}
pakelsim kvadratu, gausime
(
2
2
)
2
=
2
2
⋅
2
=
4
2
=
16.
{\displaystyle (2^{2})^{2}=2^{2\cdot 2}=4^{2}=16.}
Jeigu dar toliau pakelsim 16 kvadratu, tai gausime
2
2
⋅
2
⋅
2
=
16
2
=
256.
{\displaystyle 2^{2\cdot 2\cdot 2}=16^{2}=256.}
Jei dar toliau pakelsime 256 kvadratu, tai gausime
2
16
=
2
2
⋅
2
⋅
2
⋅
2
=
256
2
=
65536.
{\displaystyle 2^{16}=2^{2\cdot 2\cdot 2\cdot 2}=256^{2}=65536.}
Kad gauti skaičių 65536, reikia ant "Windows 10" kalkuliatoriaus paspasuti 2, o paskui 4 kartus paspausti mygtuką x2 .
Parodysime kaip galima pakelti bet kokį skaičių bet kokiu laipsniu, naudojant tuos pačius veiksmus (nauduojant tą patį algoritmą). Bet šitas algoritmas labiau akcentuotas į pakelimą y laipsniu, skaičių a , kuris yra didesnis už 1.
Tarkim, norime apskaičiuoti
(
9.99
⋅
10
9999
)
0.9876
=
a
y
;
y
=
0.9876.
{\displaystyle (9.99\cdot 10^{9999})^{0.9876}=a^{y};\;\;y=0.9876.}
Tada
(
9.99
⋅
10
9999
)
0.9876
=
a
y
=
e
y
ln
a
=
e
x
;
{\displaystyle (9.99\cdot 10^{9999})^{0.9876}=a^{y}=e^{y\ln a}=e^{x};}
x
=
y
ln
a
=
0.9876
ln
(
9.99
⋅
10
9999
)
=
{\displaystyle x=y\ln a=0.9876\ln(9.99\cdot 10^{9999})=}
22740.329390315065728263998865254.
Žinome, kad
e
x
=
(
e
x
/
65536
)
65536
=
(
e
0.0000152587890625
⋅
x
)
65536
.
{\displaystyle e^{x}=(e^{x/65536})^{65536}=(e^{0.0000152587890625\cdot x})^{65536}.}
Tada pažymėkime
x
0
=
0.0000152587890625
⋅
x
=
{\displaystyle x_{0}=0.0000152587890625\cdot x=}
0.0000152587890625 * 22740.329390315065728263998865254 =
= 0.34698988937858681836340330299764.
Toliau apskaičiuojame Makloreno eilutę
e
x
0
,
{\displaystyle e^{x_{0}},}
kuri nėra ilga, nes
x
0
<
1.
{\displaystyle x_{0}<1.}
Taigi
e
x
0
=
e
0.3469898893785868
=
{\displaystyle e^{x_{0}}=e^{0.3469898893785868}=}
1.414802420766463739969945373195.
Toliau
e
x
0
{\displaystyle e^{x_{0}}}
reikia pakelti 65536 laipsniu. Tačiau
65536
=
2
16
.
{\displaystyle 65536=2^{16}.}
Tiksliai negaliu pasakyt kodėl, bet
e
x
0
{\displaystyle e^{x_{0}}}
reikia pakelti kvadratu 16 kartų (tai galima padaryti pasapaudus mygtuką x2 ant kalkuliatoriaus 16 kartų). Tada gausime
(
9.99
⋅
10
9999
)
0.9876
=
a
y
=
e
y
ln
a
=
e
x
=
(
e
x
0
)
65536
=
(
e
x
0
)
2
16
=
1.41480242
65536
=
{\displaystyle (9.99\cdot 10^{9999})^{0.9876}=a^{y}=e^{y\ln a}=e^{x}=(e^{x_{0}})^{65536}=(e^{x_{0}})^{2^{16}}=1.41480242^{65536}=}
= 1.414802420766463739969945373195^65536 = 9.9901239387481261089712504055752e+9875.
Atėmę gautą ay reikšmę iš tikslios "Windows 10" kalkuliatoriaus reikšmės, gauname:
9.9901239387481261089712504055752e+9875 - 9.9901239387481261089712504055752e+9875 =
= 3.8064298062079638161811295770571e+9833.
Kaip sakyta anksčiau, "Windows 10" kalkuliatoriaus tikslumas yra daugiau nei 32 skaitmenys (tie skaitmenys nerodomi). Apytiksli paklaida yra 1.0e+9875 / 1.0e+9833 = 1.e+42, t. y. apie
10
−
42
.
{\displaystyle 10^{-42}.}
Todėl "Windows 10" kalkuliatorius turi mažiausiai apie 42 skaitmenų tikslumą (kai skaičiavau, dėjau reikšmes į kalkuliatoriaus atmintį, paspaudus "M+" įrašymui ir "MR" skaitymui iš atminties). Pasitaikydavo atrodo ir apie
10
−
46
{\displaystyle 10^{-46}}
paklaida, atėmus mažiau tikslią reikšmę iš tikslios reikšmės su "Windows 10" kalkuliatorium.
Kitas pavyzdys . Apskaičiuosime
a
y
=
3
5000
{\displaystyle a^{y}=3^{5000}}
naudojant universalų, ką tik pateiktą algoritmą. Kalkuliatoriaus šito skaičiaus reikšmė yra tokia:
a
y
=
3
5000
=
{\displaystyle a^{y}=3^{5000}=}
4.0389976297871553397008634098151e+2385 =
≈
4.0389976297871553397
⋅
10
2385
.
{\displaystyle \approx 4.0389976297871553397\cdot 10^{2385}.}
3
5000
=
a
y
=
e
y
ln
a
=
e
x
;
{\displaystyle 3^{5000}=a^{y}=e^{y\ln a}=e^{x};}
x
=
y
ln
a
=
5000
ln
3
=
5000
⋅
1.0986122886681
=
{\displaystyle x=y\ln a=5000\ln 3=5000\cdot 1.0986122886681=}
5493.0614433405484569762261846126.
x
0
=
x
/
65536
=
0.0000152587890625
⋅
x
=
0.0000152587890625
⋅
5493.06144334
=
{\displaystyle x_{0}=x/65536=0.0000152587890625\cdot x=0.0000152587890625\cdot 5493.06144334=}
= 0.08381746587128522425806009192829.
Toliau apskaičiuojama Makloreno eilutė
e
x
0
,
{\displaystyle e^{x_{0}},}
kuri yra trumpa, bet bendrumo dėlei galima skaičiuoti tokio pat ilgio eilutę kaip praeitame pavyzdyje (kad nekeisti algoritmo kiekvienam skaičiui). Taigi
e
x
0
=
e
0.08381746587
=
{\displaystyle e^{x_{0}}=e^{0.08381746587}=}
1.0874303825344221813244859411118.
Toliau
e
x
0
{\displaystyle e^{x_{0}}}
reikia pakelti 65536 laipsniu. Tai padarysime 16 kartų pakėlę kvadratu skaičių 1.0874303825344221813244859411118 (skaičių
e
x
0
{\displaystyle e^{x_{0}}}
). Tada gauname:
3
5000
=
a
y
=
e
y
ln
a
=
e
x
=
(
e
x
0
)
65536
=
(
e
x
0
)
2
16
=
1.0874303825344
65536
=
{\displaystyle 3^{5000}=a^{y}=e^{y\ln a}=e^{x}=(e^{x_{0}})^{65536}=(e^{x_{0}})^{2^{16}}=1.0874303825344^{65536}=}
= 4.0389976297871553397008634098151e+2385.
Atėmę gautą
3
5000
{\displaystyle 3^{5000}}
reikšmę iš tikslios
3
5000
{\displaystyle 3^{5000}}
"Windows 10" kalkuliatoriaus reikšmės, gauname paklaidą:
8.4648638092084170075729647383904e+2342.
Vadinasi apytiksliai 2385-2342=43 pirmi skaitmenys yra teisingi.
Apskaičiuosime
7358000
1234.567
{\displaystyle 7358000^{1234.567}}
šituo universaliu algoritmu. Kalkuliatoriaus šito skaičiaus reikšmė yra tokia:
7358000
1234.567
=
{\displaystyle 7358000^{1234.567}=}
2.9855588086470807664732431219819e+8477 =
≈
2.985558808647
⋅
10
8477
.
{\displaystyle \approx 2.985558808647\cdot 10^{8477}.}
7358000
1234.567
=
a
y
=
e
y
ln
a
=
e
x
;
{\displaystyle 7358000^{1234.567}=a^{y}=e^{y\ln a}=e^{x};}
x
=
y
ln
a
=
1234.567
⋅
ln
7358000
=
1234.567
⋅
15.8112987146468567
=
{\displaystyle x=y\ln a=1234.567\cdot \ln 7358000=1234.567\cdot 15.8112987146468567=}
19520.107620245425962920091221327.
x
0
=
x
/
65536
=
0.0000152587890625
⋅
x
=
0.0000152587890625
⋅
19520.1076202454
=
{\displaystyle x_{0}=x/65536=0.0000152587890625\cdot x=0.0000152587890625\cdot 19520.1076202454=}
= 0.29785320465462380924865861848948.
Toliau apskaičiuojama Makloreno eilutė
e
x
0
,
{\displaystyle e^{x_{0}},}
kuri suprantama nėra ilga. Gautume:
e
x
0
=
e
0.2978532046546
=
{\displaystyle e^{x_{0}}=e^{0.2978532046546}=}
1.3469640453138238767100251046857.
Toliau
e
x
0
{\displaystyle e^{x_{0}}}
reikia pakelti 65536 laipsniu. Tai padarysime 16 kartų pakėlę kvadratu skaičių
e
x
0
{\displaystyle e^{x_{0}}}
:
7358000
1234.567
=
a
y
=
e
y
ln
a
=
e
x
=
(
e
x
0
)
65536
=
(
e
x
0
)
2
16
=
1.34696404531382387671
65536
=
{\displaystyle 7358000^{1234.567}=a^{y}=e^{y\ln a}=e^{x}=(e^{x_{0}})^{65536}=(e^{x_{0}})^{2^{16}}=1.34696404531382387671^{65536}=}
= 2.9855588086470807664732431219819e+8477.
Toks pat atsakymas kaip iš kalkuliatoriaus. Atėmę gautą reikšmę, apskaičiuotą šiuo universaliu algoritmu, iš tikslios
7358000
1234.567
{\displaystyle 7358000^{1234.567}}
reikšmės, gauname paklaidą:
9.764728067703454777066384239029e+8434.
Paklaida yra 8477-8434=43 tokia, kad apytiksliai 43 pirmi skaitmenys yra teisingi.
Pasirodo galima naudoti ne tik skaičių
2
16
=
65536
{\displaystyle 2^{16}=65536}
ar jo kvadratą, bet ir, pavyzdžiui, skaičių
2
17
=
131072.
{\displaystyle 2^{17}=131072.}
Apskaičiuosime
0.3
8000
{\displaystyle 0.3^{8000}}
taikydami Makloreno eilutę ir greitą universalų algoritmą. Iš kalkuliatoriaus:
0.3
8000
=
{\displaystyle 0.3^{8000}=}
9.3333544088834579475132722410259e-4184 =
≈
9.3333544088834579475
⋅
10
−
4184
.
{\displaystyle \approx 9.3333544088834579475\cdot 10^{-4184}.}
Pradedame skaičiavimus.
0.3
8000
=
a
y
=
e
y
ln
a
=
e
8000
ln
0.3
=
e
x
;
{\displaystyle 0.3^{8000}=a^{y}=e^{y\ln a}=e^{8000\ln 0.3}=e^{x};}
x
=
y
ln
a
=
8000
⋅
ln
0.3
=
8000
⋅
(
−
1.2039728043
)
=
{\displaystyle x=y\ln a=8000\cdot \ln 0.3=8000\cdot (-1.2039728043)=}
-9631.7824346074879409819697420947.
x
0
=
x
/
131072
=
0.00000762939453125
⋅
x
=
0.00000762939453125
⋅
(
−
9631.7824346
)
=
{\displaystyle x_{0}=x/131072=0.00000762939453125\cdot x=0.00000762939453125\cdot (-9631.7824346)=}
= -0.07348466823278417923722816270519.
Toliau apskaičiuojama Makloreno eilutė
e
x
0
,
{\displaystyle e^{x_{0}},}
kuri nėra ilga (nebūtina skaičiuoti su tokia neigiama
x
0
{\displaystyle x_{0}}
reikšme; galima apskaičiuoti
e
|
x
0
|
,
{\displaystyle e^{|x_{0}|},}
o paskui gautą rezultatą pakelti -1 laipsniu, bet su
x
0
{\displaystyle x_{0}}
turėtų net truputi greičiaus skaičiuotis Makloreno eilutė nei su
|
x
0
|
{\displaystyle |x_{0}|}
). Apskaičiavus Makloreno eilute gautume:
e
x
0
=
e
−
0.073484668232784
=
{\displaystyle e^{x_{0}}=e^{-0.073484668232784}=}
0.92915039119982175027449213911686.
Toliau
e
x
0
{\displaystyle e^{x_{0}}}
reikia pakelti
2
17
=
131072
{\displaystyle 2^{17}=131072}
laipsniu. Tai padarysime 17 kartų pakėlę kvadratu skaičių
e
x
0
{\displaystyle e^{x_{0}}}
(ant kalkuliatoriaus reikia 17 kartų paspausti mygtuką x2 ):
0.3
8000
=
a
y
=
e
y
ln
a
=
e
x
=
(
e
x
0
)
131072
=
(
e
x
0
)
2
17
=
0.92915039119982175
131072
=
{\displaystyle 0.3^{8000}=a^{y}=e^{y\ln a}=e^{x}=(e^{x_{0}})^{131072}=(e^{x_{0}})^{2^{17}}=0.92915039119982175^{131072}=}
= 9.3333544088834579475132722410259e-4184.
Toks pat atsakymas kaip iš kalkuliatoriaus. Atėmę gautą reikšmę, apskaičiuotą šiuo universaliu algoritmu, iš tikslios
0.3
8000
{\displaystyle 0.3^{8000}}
reikšmės, gauname paklaidą (Windows 10 kalkuliatorius turi daugiau skaitmenų tikslumą nei rodo):
-3.1898963077025813192937851493148e-4226.
Paklaida yra 4184-4226=-42 tokia, kad apytiksliai 42 pirmi skaitmenys yra teisingi.
Toks Free Pascal kodas apskaičiuoja
0.3
100
{\displaystyle 0.3^{100}}
:
var a:longint; c:real;
begin
c:=1;
for a:=1 to 100 do
c:=c*0.3;
writeln(c);
Readln;
End.
ir [akimirksniu] duodą rezultatą "5.1537752073201157E-053" (tai reiškia
5.1537752073201157
⋅
10
−
53
{\displaystyle 5.1537752073201157\cdot 10^{-53}}
).
Iš "Windows 10" kalkuliatoriaus: 5.1537752073201133103646112976562e-53 (tai reiškia
0.3
100
≈
5.15377520732011331
⋅
10
−
53
{\displaystyle 0.3^{100}\approx 5.15377520732011331\cdot 10^{-53}}
). Gavome 15 pirmų teisingų skaitmenų, kas atitinka Double Precision (64 bit) garantuotą tikslumą.
O toks Free Pascal kodas apskaičiuoja
0.3
600
{\displaystyle 0.3^{600}}
:
var a:longint; c:real;
begin
c:=1;
for a:=1 to 600 do
c:=c*0.3;
writeln(c);
Readln;
End.
ir [akimirksniu] duodą rezultatą "1.8739277038784846E-314" (tai reiškia
1.8739277038784846
⋅
10
−
314
{\displaystyle 1.8739277038784846\cdot 10^{-314}}
).
Iš "Windows 10" kalkuliatoriaus: 1.8739277038847939886754019920358e-314 (tai reiškia
0.3
600
≈
1.87392770388479
⋅
10
−
314
{\displaystyle 0.3^{600}\approx 1.87392770388479\cdot 10^{-314}}
). Gavome tik 11 pirmų teisingų skaitmenų, nors kodas skaičiavo su Double Precision (64 bit) tikslumu, kuris duoda nuo 15 iki 17 skaitmenų tikslumą.
Tačiau, jei panaudosime eilutę "for a:=1 to 585 do" vietoje "for a:=1 to 600 do", tai gausime "1.3059724367053167E-306". Kalkuliatoriaus reikšmė yra tokia
0.3
585
≈
1.30597243670531420175446
⋅
10
−
306
.
{\displaystyle 0.3^{585}\approx 1.30597243670531420175446\cdot 10^{-306}.}
Gavome 15 pirmų teisingų skaitmenų su FP kodu.
Jei šis FP kodas pasiliks toks pat tik bus pakeista eilutė "for a:=1 to 600 do" į eilutę "for a:=1 to 610 do", tai gaunamas FP kodo atsakymas yra "1.1065094204260558E-319". Tiksli kalkuliatoriaus reikšmė yra:
0.3
610
=
{\displaystyle 0.3^{610}=}
1.1065355698669320023729381222772e-319. Su Free Pascal kodu gavome tik 5 pirmus teisingus skaitmenis.
O jeigu panaudosime tokią FP kodo eilutę "for a:=1 to 620 do", tai FP duos tokį atsakymą: "0.0000000000000000E+000". Tuo tarpu kalkuliatoriaus reikšmė yra tokia:
0.3
620
=
{\displaystyle 0.3^{620}=}
6.5339818865072467808119623182348e-325.
Panašu, kad skaičiuojant su Free Pascal, atliekant daug daugybos veiksmų tikslumas pradeda mažėt.
Iš kitos pusės, toks Free Pascal kodas (kuris skaičiuoja
3
646
{\displaystyle 3^{646}}
):
var a:longint; c:real;
begin
c:=1;
for a:=1 to 646 do
c:=c*3;
writeln(c);
Readln;
End.
duoda akimirksniu atsakymą "1.6608505280233451E+308". Kalkuliatoriaus atsakymas:
3
646
=
{\displaystyle 3^{646}=}
1.6608505280233424907169817301232e+308. Su FP gavome 15 pirmų teisingu skaitmenų.
Bet jeigu įrašysime "for a:=1 to 647 do" vietoje "for a:=1 to 646 do", tai jau Free Pascal kodas neskaičiuoja ir duoda klaidą "exited with exitcode = 205".
Toks Free Pascal kodas (kuris skaičiuoja
10
308
{\displaystyle 10^{308}}
):
var a:longint; c:real;
begin
c:=1;
for a:=1 to 308 do
c:=c*10;
writeln(c);
Readln;
End.
duoda akimirksniu atsakymą "9.9999999999999981E+307". Ir panašu, kad
≈
10
308
{\displaystyle \approx 10^{308}}
yra maksimalus skaičius, kurį supranta "Free Pascal", nes su kodo eilute "for a:=1 to 309 do" šitas kodas duoda klaidą "exited with exitcode = 205".
Pasirodo, kad apytiksliai
10
308
{\displaystyle 10^{308}}
ir yra didžiausias skaičius Double Precision formate. Va čia https://www.ragestorm.net/downloads/387intel.txt
Skyrelyje "2.2.2.3 Real Numbers" pasukus truputi žemiau yra "Table 2-3. Summary of Format Parameters":
Parameter_________________ZDDDDDDDD Format DDDDDDDD?
__________________________Single_ _Double_ _Extended
Format width in bits__________32_______64_________80
p (bits of precision)_________24_______53_________64
Exponent width in bits_________8_______11_________15
Emax________________________+127____+1023_____+16383
Emin________________________-126____-1022_____-16382
Exponent bias_______________+127____+1023_____+16383
Taigi, Double Precision didžiausias skaičius yra
2
1023
≈
8.98846567431157953
⋅
10
307
=
{\displaystyle 2^{1023}\approx 8.98846567431157953\cdot 10^{307}=}
8.9884656743115795386465259539451e+307 (dar turbūt reikia šitą skaičių padauginti iš 9.99999999999999 ar panašiai). (
2
11
=
2048
,
{\displaystyle 2^{11}=2048,\;}
2
10
=
1024
{\displaystyle 2^{10}=1024}
).
Beje, Double Extended Precision
2
16383
=
{\displaystyle 2^{16383}=}
5.94865747678615882542879663314e+4931. (
2
15
=
32768
,
{\displaystyle 2^{15}=32768,\;}
2
14
=
16384
{\displaystyle 2^{14}=16384}
).
Be to,
2
−
1022
=
{\displaystyle 2^{-1022}=}
2.2250738585072013830902327173324e-308. Todėl, tikriausiai, dėl to tikslumas ir prarandamas kai eksponentė yra mažiau nei -308 (pavyzdžiui, -314 ar -319), nes toks absoliučiu didžiu mažas skaičius net nepalaikomas Double Precision (64 bit) formate.