Różnica pomiędzy stronami "Wzór Eulera-Maclaurina" i "Całkowanie numeryczne. Metoda Simpsona"
Linia 1: | Linia 1: | ||
− | <div style="text-align:right; font-size: 130%; font-style: italic; font-weight: bold;"> | + | <div style="text-align:right; font-size: 130%; font-style: italic; font-weight: bold;">22.07.2022</div> |
__FORCETOC__ | __FORCETOC__ | ||
Linia 5: | Linia 5: | ||
− | == | + | == Funkcje kawałkami klasy <math>C^n</math> == |
− | <span style="font-size: 110%; font-weight: bold;"> | + | <span style="font-size: 110%; font-weight: bold;">Uwaga F1</span><br/> |
− | + | Czytelnik może pominąć ten temat przy pierwszym czytaniu i powrócić do niego, gdy uzna, że potrzebuje bardziej precyzyjnego ujęcia omawianych tu problemów. Z pojęcia funkcji kawałkami klasy <math>C^n</math> będziemy korzystali bardzo rzadko i jeśli Czytelnik chciałby jedynie poznać metodę Simpsona przybliżonego obliczania całek, to nie musi tracić czasu na zapoznawanie się z tym tematem. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | <span style="font-size: 110%; font-weight: bold;">Definicja F2</span><br/> | ||
+ | Funkcja <math>f(x)</math> jest kawałkami klasy <math>C^0</math> (lub kawałkami ciągła<ref name="PiecewiseContFun"/>) w przedziale <math>[a, b]</math>, jeżeli jest ona zdefiniowana i ciągła wszędzie poza skończoną liczbą punktów <math>x_k \in \left[ a, b \right].</math> Przy czym w każdym z punktów <math>x_k</math> istnieją skończone granice jednostronne <math>\lim_{x \to x^-_k} f (x)</math> oraz <math>\lim_{x \to x^+_k} f (x)</math>. W przypadku, gdy <math>x_k = a</math> musi istnieć skończona granica prawostronna, a w przypadku, gdy <math>x_k = b</math> musi istnieć granica lewostronna. | ||
− | |||
− | |||
− | ::< | + | <span style="font-size: 110%; font-weight: bold;">Zadanie F3</span><br/> |
+ | Niech | ||
+ | ::<math>f(x) = \left\{ \begin{array}{rcc} | ||
+ | a & & x = - 5\\ | ||
+ | - x & & - 5 < x < 0\\ | ||
+ | b & & x = 0\\ | ||
+ | x & & 0 < x < 5\\ | ||
+ | c & & x = 5 | ||
+ | \end{array} \right.</math> | ||
+ | Zbadać, dla jakich wartości liczb <math>a, b, c</math> | ||
− | < | + | :* funkcja <math>f(x)</math> jest klasy <math>C^0 ([- 5, 5])</math> |
− | + | :* funkcja <math>f(x)</math> jest kawałkami klasy <math>C^0 ([- 5, 5])</math> | |
− | + | {{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Rozwiązanie|Hide=Ukryj rozwiązanie}} | |
− | + | Ponieważ | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | {{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show= | ||
− | :: | + | ::<math>\lim_{x \to - 5^+} f (x) = - 5</math> |
− | :: | + | ::<math>\lim_{x \to 0^-} f (x) = 0</math> |
− | :: | + | ::<math>\lim_{x \to 0^+} f (x) = 0</math> |
− | :: | + | ::<math>\lim_{x \to 5^-} f (x) = 5</math> |
− | <br/> | + | to tylko dla wartości <math>a = - 5</math>, <math>b = 0</math>, <math>c = 5</math> funkcja <math>f(x)</math> jest ciągła w przedziale <math>[a, b]</math>. Ale wybór liczb <math>a, b, c</math> nie ma żadnego wpływu na to, czy funkcja <math>f(x)</math> jest kawałkami ciągła w przedziale <math>[a, b]</math>. W przypadku, gdy <math>b = 0</math> i <math>a \neq - 5</math> funkcja <math>f(x)</math> będzie (w jednym kawałku) kawałkami ciągła, ale nie będzie funkcją ciągłą. W przypadku, gdy <math>b \neq 0</math> funkcja <math>f(x)</math> będzie (w dwóch kawałkach) kawałkami klasy <math>C^0 ([a, b])</math>. Nawet gdyby wartości funkcji <math>f(x)</math> były nieokreślone w punktach <math>a, b, c</math>, to i tak funkcja <math>f(x)</math> byłaby kawałkami klasy <math>C^0 ([a, b])</math>.<br/> |
□ | □ | ||
{{\Spoiler}} | {{\Spoiler}} | ||
Linia 85: | Linia 50: | ||
− | <span style="font-size: 110%; font-weight: bold;"> | + | <span style="font-size: 110%; font-weight: bold;">Zadanie F4</span><br/> |
− | + | Pokazać, że funkcje <math>{\small\frac{1}{x}}</math> oraz <math>\sin \! \left( {\small\frac{1}{x}} \right)</math> nie są kawałkami klasy <math>C^0 ([- 5, 5])</math>. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | <span style="font-size: 110%; font-weight: bold;">Definicja F5</span><br/> | |
+ | Funkcja <math>f(x)</math> jest kawałkami klasy <math>C^1</math><ref name="PiecewiseSmoothFun"/> w przedziale <math>[a, b]</math>, jeżeli jest ona kawałkami ciągła w <math>[a, b]</math>, a jej pochodna <math>f' (x)</math> istnieje i jest kawałkami ciągła w <math>[a, b]</math>. | ||
− | + | Oznacza to, że musi istnieć skończona liczba punktów <math>a = x_1 < x_2 < \ldots < x_n = b</math> wyznaczających podział przedziału <math>[a, b]</math> w taki sposób, że | |
− | + | :* funkcja <math>f(x)</math> jest zdefiniowana i ciągła w każdym przedziale <math>(x_k, x_{k + 1})</math> | |
+ | :* pochodna <math>f' (x)</math> istnieje i jest ciągła w każdym przedziale <math>(x_k, x_{k + 1})</math> | ||
+ | :* istnieją skończone granice jednostronne funkcji <math>f(x)</math> i <math>f' (x)</math> na krańcach każdego z przedziałów <math>(x_k, x_{k + 1})</math> | ||
− | |||
− | |||
− | + | <span style="font-size: 110%; font-weight: bold;">Definicja F6</span><br/> | |
+ | Niech <math>r \in \mathbb{Z}_+</math>. Funkcja <math>f(x)</math> jest kawałkami klasy <math>C^r</math> w przedziale <math>[a, b]</math>, jeżeli jest ona kawałkami ciągła w <math>[a, b]</math>, a jej pochodne <math>f^{(i)} (x)</math>, gdzie <math>i = 1, \ldots, r</math> istnieją i są kawałkami ciągłe w <math>[a, b]</math>. | ||
− | + | Oznacza to, że musi istnieć skończona liczba punktów <math>a = x_1 < x_2 < \ldots < x_n = b</math> wyznaczających podział przedziału <math>[a, b]</math> w taki sposób, że | |
− | : | + | :* funkcja <math>f(x)</math> jest zdefiniowana i ciągła w każdym przedziale <math>(x_k, x_{k + 1})</math> |
+ | :* pochodne <math>f^{(i)} (x)</math>, gdzie <math>i = 1, \ldots, r</math>, istnieją i są ciągłe w każdym przedziale <math>(x_k, x_{k + 1})</math> | ||
+ | :* istnieją skończone granice jednostronne funkcji <math>f^{(i)} (x)</math>, gdzie <math>i = 0, 1, \ldots, r</math>, na krańcach każdego z przedziałów <math>(x_k, x_{k + 1})</math> | ||
− | |||
− | |||
− | + | <span style="font-size: 110%; font-weight: bold;">Definicja F7</span><br/> | |
+ | Funkcja <math>f(x)</math> jest kawałkami klasy <math>C^r</math> w <math>\mathbb{R}</math>, jeśli jest ona kawałkami klasy <math>C^r</math> w każdym ograniczonym przedziale <math>[a, b] \subset \mathbb{R}</math>. | ||
− | |||
− | |||
− | + | <span style="font-size: 110%; font-weight: bold;">Przykład F8</span><br/> | |
+ | Rozważmy funkcję | ||
− | + | ::<math>f(x) = \left\{ \begin{array}{ccc} | |
+ | 0 & & - 5 \leqslant x < 0\\ | ||
+ | 1 & & 0 < x \leqslant 5 | ||
+ | \end{array} \right.</math> | ||
− | + | Celowo nie określiliśmy wartości funkcji <math>f(x)</math> w punkcie <math>x = 0</math>. Ponieważ | |
− | + | ::<math>\lim_{x \to - 5^+} f (x) = \lim_{x \to 0^-} f (x) = 0</math> | |
− | + | ::<math>\lim_{x \to 0^+} f (x) = \lim_{x \to 5^-} f (x) = 1</math> | |
− | + | zatem spełnione są warunki definicji F1 i funkcja <math>f(x)</math> jest kawałkami ciągła (kawałkami klasy <math>C^0</math>). Zauważmy, że funkcja ta jest funkcją skokową Heaviside'a<ref name="HeavisideStepFun"/> <math>H(x)</math> obciętą do przedziału <math>[- 5, 5]</math>. | |
− | + | ::<math>H(x) = \left\{ \begin{array}{ccc} | |
+ | 0 & & x < 0\\ | ||
+ | 1 & & x \geqslant 1 | ||
+ | \end{array} \right.</math> | ||
− | '' | + | Warto zauważyć, że wartość funkcji Heaviside'a w <math>x = 0</math> nie jest ustalona. Niekiedy podaje się <math>H(0) = 0</math>, a czasami <math>H(0) = {\small\frac{1}{2}}</math>. Oczywiście funkcja Heaviside'a jest kawałkami klasy <math>C^0(\mathbb{R})</math>. Przyjmując <math>H(0) = 1</math>, policzmy pochodne jednostronne funkcji <math>H(x)</math> w <math>x = 0</math> |
− | + | ::<math>\lim_{h \to 0^-} {\small\frac{H (0 + h) - H (0)}{h}} = \lim_{h \to 0^-} {\small\frac{0 - 1}{h}} = - \lim_{h \to 0^-} {\small\frac{1}{h}} = + \infty</math> | |
− | ::<math> | + | ::<math>\lim_{h \to 0^+} {\small\frac{H (0 + h) - H (0)}{h}} = \lim_{h \to 0^+} {\small\frac{1 - 1}{h}} = 0</math> |
− | + | Czyli pochodna <math>H' (0)</math> nie istnieje, ale granice jednostronne pochodnej w punkcie <math>x = 0</math> istnieją. Istotnie, dla <math>x \neq 0</math> mamy <math>H' (x) = 0</math>, zatem | |
− | ::<math>\ | + | ::<math>\lim_{x \to 0^-} H' (x) = \lim_{x \to 0^+} H' (x) = 0</math> |
− | + | Wynika stąd, że funkcja Heaviside'a jest kawałkami klasy <math>C^1 (\mathbb{R})</math>. | |
− | |||
− | |||
− | :: | + | <span style="font-size: 110%; font-weight: bold;">Zadanie F9</span><br/> |
+ | Pokazać, że funkcja | ||
+ | ::<math>f(x) = \left\{ \begin{array}{ccc} | ||
+ | x^2 \sin \! \left( \frac{1}{x} \right) & & 0 < | x | \leqslant 5\\ | ||
+ | 0 & & x = 0 | ||
+ | \end{array} \right.</math> | ||
− | + | :* jest klasy <math>C^0 ([- 5, 5])</math> | |
+ | :* jest różniczkowalna w całym przedziale <math>[- 5, 5]</math> | ||
+ | :* nie jest klasy <math>C^1 ([- 5, 5])</math> | ||
+ | :* nie jest kawałkami klasy <math>C^1 ([- 5, 5])</math> | ||
− | + | {{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Rozwiązanie|Hide=Ukryj rozwiązanie}} | |
+ | Ponieważ | ||
− | + | ::<math>\lim_{x \to 0} f (x) = 0</math> | |
− | + | to funkcja <math>f(x)</math> jest ciągła w <math>[- 5, 5]</math>, czyli jest klasy <math>C^0 ([- 5, 5])</math>. | |
− | + | Zauważmy też, że funkcja <math>f(x)</math> jest różniczkowalna w punkcie <math>x = 0</math> | |
− | ::<math>\ | + | ::<math>f' (0) = \lim_{h \to 0} {\small\frac{f (h) - f (0)}{h}} = \lim_{h \to 0} \frac{h^2 \cdot \sin \! \left( \frac{1}{h} \right)}{h} = \lim_{h \to 0} h \cdot \sin \! \left( {\small\frac{1}{h}} \right) = 0</math> |
− | + | Ostatnia granica wynika z układu nierówności | |
− | + | ::<math> - h \leqslant h \cdot \sin \! \left( {\small\frac{1}{h}} \right) \leqslant h</math> | |
− | |||
− | + | Czyli pochodna funkcji <math>f(x)</math> jest równa | |
− | + | ::<math>f' (x) = \left\{ \begin{array}{ccc} | |
+ | 2 x \sin \! \left( \frac{1}{x} \right) - \cos \! \left( \frac{1}{x} \right) & & 0 < | x | \leqslant 5\\ | ||
+ | 0 & & x = 0 | ||
+ | \end{array} \right.</math> | ||
− | + | i istnieje dla każdego punktu <math>x \in [- 5, 5]</math>. | |
− | + | Ale granice funkcji <math>f' (x)</math> w punkcie <math>x = 0</math> nie istnieją | |
− | ::<math> | + | ::<math>\lim_{x \to 0} f' (x) = \lim_{h \to 0} f' (0 + h) = \lim_{h \to 0} \left[ 2 h \sin \! \left( {\small\frac{1}{h}} \right) - \cos \! \left( {\small\frac{1}{h}} \right) \right] = - \lim_{h \to 0} \cos \left( {\small\frac{1}{h}} \right)</math> |
− | + | Zatem pochodna funkcji <math>f(x)</math> nie jest ciągła w punkcie <math>x = 0</math>, czyli <math>f(x)</math> nie jest funkcją klasy <math>C^1</math>. Co więcej, funkcja <math>f(x)</math> nie jest nawet funkcją kawałkami klasy <math>C^1</math>, bo granice jednostronne pochodnej <math>f' (x)</math> nie istnieją w punkcie <math>x = 0</math>.<br/> | |
+ | □ | ||
+ | {{\Spoiler}} | ||
− | |||
− | |||
− | + | <span style="font-size: 110%; font-weight: bold;">Zadanie F10</span><br/> | |
+ | Pokazać, że funkcja | ||
− | ::<math> | + | ::<math>f(x) = \left\{ \begin{array}{ccc} |
+ | x^2 \sin \! \left( \frac{1}{x} \right) & & 0 < | x | \leqslant 5\\ | ||
+ | 1 & & x = 0 | ||
+ | \end{array} \right.</math> | ||
− | + | :* nie jest klasy <math>C^0 ([- 5, 5])</math> | |
+ | :* jest kawałkami klasy <math>C^0 ([- 5, 5])</math> | ||
+ | :* nie jest kawałkami klasy <math>C^1 ([- 5, 5])</math> | ||
− | |||
− | |||
− | |||
− | |||
− | + | == Metoda Simpsona (parabol) == | |
− | + | <span style="font-size: 110%; font-weight: bold;">Twierdzenie F11</span><br/> | |
+ | Jeżeli punkty <math>(- h, y_0)</math>, <math>(0, y_1)</math> oraz <math>(h, y_2)</math> leżą na pewnej paraboli <math>g(x)</math>, to | ||
− | ::<math> | + | ::<math>\int^h_{- h} g (x) d x = {\small\frac{h}{3}} (y_0 + 4 y_1 + y_2)</math> |
− | + | {{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}} | |
− | + | Nim przejdziemy do dowodu, zilustrujemy problem rysunkiem | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | : | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | :: | ||
− | |||
− | |||
− | |||
− | : | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | :: | + | ::[[File: F_Parabola.png|none]] |
− | |||
− | + | Z założenia funkcja <math>g(x)</math> jest parabolą, co oznacza, że może być zapisana w postaci | |
− | ::<math> | + | ::<math>g(x) = A x^2 + B x + C</math> |
Zatem | Zatem | ||
− | ::<math> | + | ::<math>\int^h_{- h} g (x) d x = \int^h_{- h} (A x^2 + B x + C) d x</math> |
− | |||
− | |||
− | |||
− | |||
+ | :::::<math>\;\;\, = {\small\frac{A x^3}{3}} + {\small\frac{B x^2}{2}} + C x \biggr\rvert_{- h}^{h}</math> | ||
− | + | :::::<math>\;\;\, = {\small\frac{2 A h^3}{3}} + 2 C h</math> | |
− | |||
− | :: | + | :::::<math>\;\;\, = {\small\frac{h}{3}} (2 A h^2 + 6 C)</math> |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Z drugiej strony parabola <math>g(x) = A x^2 + B x + C</math> przechodzi przez punkty <math>(- h, y_0)</math>, <math>(0, y_1)</math> oraz <math>(h, y_2)</math>. Wynika stąd, że współczynniki <math>A, B, C</math> muszą spełniać układ równań | |
+ | ::<math>y_0 = A h^2 - B h + C</math> | ||
+ | ::<math>y_1 = C</math> | ||
− | + | ::<math>y_2 = A h^2 + B h + C</math> | |
− | |||
− | + | Dodając do siebie pierwsze i trzecie równanie, otrzymujemy | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | ::<math>y_0 + y_2 = 2 A h^2 + 2 C</math> | ||
− | + | Stąd już łatwo znajdujemy, że | |
− | + | ::<math>2 A h^2 + 6 C = (2 A h^2 + 2 C) + 4 C = y_0 + y_2 + 4 y_1</math> | |
− | |||
− | + | Co kończy dowód.<br/> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | <br/> | ||
□ | □ | ||
{{\Spoiler}} | {{\Spoiler}} | ||
Linia 377: | Linia 230: | ||
− | <span style="font-size: 110%; font-weight: bold;"> | + | <span style="font-size: 110%; font-weight: bold;">Twierdzenie F12</span><br/> |
− | + | Jeżeli punkty <math>(a, y_0)</math>, <math>(c, y_1)</math> oraz <math>(b, y_2)</math> leżą na pewnej paraboli <math>g(x)</math>, gdzie <math>c = a + h</math>, <math>b = a + 2 h</math> i <math>h > 0</math>, to | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | ::<math>\int^b_a g (x) d x = {\small\frac{h}{3}} (y_0 + 4 y_1 + y_2) = {\small\frac{b - a}{6}} (y_0 + 4 y_1 + y_2)</math> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}} | {{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}} | ||
− | + | Nim przejdziemy do dowodu, zauważmy, że w rzeczywistości twierdzenie F12 wynika z twierdzenia F11. | |
− | |||
− | |||
− | + | Istotnie, przesunięcie paraboli wzdłuż osi <math>O X</math> nie zmienia pola pod parabolą, zatem udowodnione wyżej twierdzenie możemy natychmiast uogólnić dla dowolnych punktów na osi <math>O X</math>. Dla dowolnie wybranych <math>a</math> oraz <math>h > 0</math> mamy <math>c = a + h</math> oraz <math>b = a + 2 h</math>. Jeżeli punkty <math>(a, y_0)</math>, <math>(c, y_1)</math> oraz <math>(b, y_2)</math> leżą na pewnej paraboli <math>g(x)</math>, to musi być | |
− | + | ::<math>\int^b_a g (x) d x = {\small\frac{h}{3}} (y_0 + 4 y_1 + y_2)</math> | |
− | + | W twierdzeniu F11 wybraliśmy na osi <math>O X</math> punkty <math>- h, 0, h</math>, aby uprościć obliczenia, które w przypadku ogólnym są znacznie bardziej skomplikowane i oczywiście dają ten sam rezultat. | |
− | |||
+ | Dla zainteresowanego Czytelnika przedstawimy główne kroki dowodu w przypadku ogólnym. Niech <math>g(x) = A x^2 + B x + C</math> będzie poszukiwanym równaniem paraboli. Współczynniki <math>A, B, C</math> wynikają z układu równań | ||
− | ::<math>\ | + | ::<math>\left\{ \begin{array}{l} |
+ | y_0 = A a^2 + B a + C\\ | ||
+ | y_1 = A c^2 + B c + C\\ | ||
+ | y_2 = A b^2 + B b + C | ||
+ | \end{array} \right.</math> | ||
− | |||
− | + | Rozwiązując i uwzględniając, że <math>c = \tfrac{1}{2} (a + b)</math>, otrzymujemy | |
− | + | ::<math>A = {\small\frac{2 (y_0 - 2 y_1 + y_2)}{(b - a)^2}}</math> | |
− | + | ::<math>B = - {\small\frac{y_0 (a + 3 b) - 4 y_1 (a + b) + y_2 (3 a + b)}{(b - a)^2}}</math> | |
− | + | ::<math>C = {\small\frac{(b y_0 + a y_2) (a + b) - 4 a b y_1}{(b - a)^2}}</math> | |
− | + | Zamiast uciążliwego wyliczania współczynników z układu równań, możemy funkcję <math>g(x)</math> zapisać od razu w takiej postaci, aby spełniała warunki <math>g(a) = y_0</math>, <math>g(c) = y_1</math> oraz <math>g(b) = y_2</math>. | |
− | ::<math> | + | ::<math>g(x) = y_0 \cdot {\small\frac{(x - b) (x - c)}{(a - b) (a - c)}} + y_1 \cdot {\small\frac{(x - a) (x - b)}{(c - a) (c - b)}} + y_2 \cdot {\small\frac{(x - a) (x - c)}{(b - a) (b - c)}}</math> |
− | + | Jeżeli położymy <math>c = \tfrac{1}{2} (a + b)</math>, to otrzymamy równanie identyczne z <math>g(x) = A x^2 + B x + C</math>. | |
− | |||
− | + | Przechodząc w wypisanym wyżej wzorze do nowej zmiennej <math>t = x - c</math> oraz zauważając, że <math>b - a = 2 h \;</math> i <math>\; b - c = c - a = h</math>, dostajemy | |
+ | ::<math>g(t) = {\small\frac{1}{2 h^2}} [(y_0 - 2 y_1 + y_2) t^2 + h (y_2 - y_0) t + 2 h^2 y_1]</math> | ||
− | |||
− | |||
− | + | Konsekwentnie w całce również musimy dokonać zamiany zmiennych. Kładąc <math>t = x - c</math>, dostajemy | |
− | + | ::<math>\int^b_a g (x) d x = \int^h_{- h} g (t) d t</math> | |
− | ::::<math>\;\ | + | :::::<math>\;\: = {\small\frac{1}{2 h^2}} \int^h_{- h} [(y_0 - 2 y_1 + y_2) t^2 + h (y_2 - y_0) t + 2 h^2 y_1] d t =</math> |
+ | :::::<math>\;\: = {\small\frac{1}{2 h^2}} \left[ {\small\frac{2 h^3}{3}} (y_0 - 2 y_1 + y_2) + 2 h^2 y_1 \cdot 2 h \right]</math> | ||
− | + | :::::<math>\;\: = {\small\frac{h}{3}} (y_0 + 4 y_1 + y_2)</math> | |
− | + | Co kończy dowód.<br/> | |
+ | □ | ||
+ | {{\Spoiler}} | ||
− | |||
− | |||
− | + | <span style="font-size: 110%; font-weight: bold;">Twierdzenie F13 (całkowanie przybliżone metodą Simpsona)</span><br/> | |
+ | Jeżeli funkcja <math>f(x)</math> jest ciągła w przedziale <math>[a, b]</math>, to przybliżoną wartość całki <math>\int_a^b f (x) d x</math> możemy obliczyć ze wzoru | ||
− | ::<math>\ | + | ::<math>\int_a^b f (x) d x \approx {\small\frac{(b - a)}{3 n}} [f (x_0) + 4 f (x_1) + 2 f (x_2) + 4 f (x_3) + 2 f (x_4) + \ldots + 2 f (x_{n - 2}) + 4 f (x_{n - 1}) + f (x_n)]</math> |
− | |||
+ | Wzór ten możemy zapisać w zwartej postaci | ||
− | + | ::<math>\int_a^b f (x) d x \approx {\small\frac{(b - a)}{3 n}} \left[ f (x_0) + 4 \sum_{k = 1}^{n / 2} f (x_{2 k - 1}) + 2 \sum_{k = 1}^{n / 2 - 1} f (x_{2 k}) + f (x_n) \right]</math> | |
− | |||
− | + | gdzie <math>n</math> jest liczbą parzystą, a <math>n + 1</math> punktów <math>x_k</math> zostało wybranych w przedziale <math>[a, b]</math> tak, aby | |
− | ::<math>\ | + | ::<math>a = x_0 < x_1 < x_2 < \ldots < x_{n - 2} < x_{n - 1} < x_n = b</math> |
− | + | Punkty te tworzą parzystą liczbę przedziałów <math>[x_k, x_{k + 1}]</math>, gdzie <math>k = 0, 1, \ldots, n - 1</math> o takich samych szerokościach <math>h = {\small\frac{b - a}{n}}</math>. | |
− | ::<math> | + | {{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}} |
+ | Niech funkcja <math>f(x)</math> będzie ciągła w przedziale <math>[a, b]</math>. Aby znaleźć przybliżoną wartość całki <math>\int_a^b f (x) d x</math>, dzielimy przedział <math>[a, b]</math> na parzystą liczbę przedziałów <math>[x_k, x_{k + 1}]</math>, gdzie <math>k = 0, 1, \ldots, n - 1</math>. Każdy z tych utworzonych przedziałów ma jednakową szerokość <math>h = x_{k + 1} - x_k = {\small\frac{b - a}{n}}</math>. | ||
− | + | ::[[File: F_Simpson.png|none]] | |
− | + | Liczba przedziałów musi być parzysta, bo będziemy rozpatrywali pary przedziałów <math>[x_0, x_2]</math>, <math>[x_2, x_4]</math>, ... , <math>[x_{2 k - 2}, x_{2 k}]</math>, ... <math>[x_{n - 2}, x_{n}]</math>. Dla każdej takiej pary przedziałów istnieją trzy punkty charakterystyczne, odpowiadające wartości funkcji <math>f(x)</math> na początku, na końcu i w środku przedziału. Żądanie, aby parabola przechodziła przez te trzy punkty, określa jednoznacznie współczynniki paraboli i jest ona przybliżeniem funkcji <math>f(x)</math>. | |
+ | Na podstawie twierdzenia F12 całka <math>I_{2 k} = \int_{x_{2 k - 2}}^{x_{2 k}} g (x) d x</math>, gdzie <math>g (x)</math> jest parabolą przechodzącą przez punkty <math>(x_{2 k - 2}, f (x_{2 k - 2}))</math>, <math>(x_{2 k - 1}, f (x_{2 k - 1}))</math> oraz <math>(x_{2 k}, f (x_{2 k}))</math> jest równa | ||
− | + | ::<math>I_{2 k} = \int_{x_{2 k - 2}}^{x_{2 k}} g (x) d x = {\small\frac{h}{3}} [f (x_{2 k - 2}) + 4 f (x_{2 k - 1}) + f (x_{2 k})]</math> | |
− | |||
− | + | Sumując całki <math>I_{2 k} = \int_{x_{2 k - 2}}^{x_{2 k}} g (x) d x</math> dla kolejnych par przedziałów, otrzymujemy przybliżenie całki oznaczonej <math>\int_a^b f (x) d x</math> | |
− | + | ::<math>\int^b_a f (x) d x \approx {\small\frac{h}{3}} [f (x_0) + 4 f (x_1) + f (x_2)] + {\small\frac{h}{3}} [f (x_2) + 4 f (x_3) + f (x_4)] + \ldots + {\small\frac{h}{3}} [f (x_{2 k - 2}) + 4 f (x_{2 k - 1}) + f (x_{2 k})] + \ldots + {\small\frac{h}{3}} [f (x_{n - 2}) + 4 f (x_{n - 1}) + f (x_n)]</math> | |
− | :::::<math>\;\;\ | + | :::::<math>\;\; = {\small\frac{(b - a)}{3 n}} \left[ f (x_0) + 4 f (x_1) + 2 f (x_2) + 4 f (x_3) + 2 f (x_4) + \ldots + 4 f (x_{2 k - 1}) + f (x_{2 k}) + \ldots + 2 f (x_{n - 2}) + 4 f (x_{n - 1}) + f (x_n) \right]</math> |
− | |||
− | + | Współczynnik <math>4</math> występuje przy wszystkich wyrazach <math>f(x_{2 k - 1})</math>, czyli dla argumentów o indeksie nieparzystym. Współczynnik <math>2</math> występuje przy wszystkich wyrazach <math>f(x_{2 k})</math>, czyli dla argumentów o indeksie parzystym, ale nie dotyczy to indeksów <math>0</math> oraz <math>n</math>. Dlatego liczba wyrazów ze współczynnikiem <math>4</math> jest o jeden większa od liczby wyrazów ze współczynnikiem <math>2</math>. Używając symboli sumy, możemy powyższy wzór zapisać w postaci | |
− | + | ::<math>\int^b_a f (x) d x \approx {\small\frac{(b - a)}{3 n}} \left[ f (x_0) + 4 \sum^{n / 2}_{k = 1} f (x_{2 k - 1}) + 2 \sum_{k = 1}^{n / 2 - 1} f (x_{2 k}) + f (x_n) \right]</math> | |
− | + | Co należało pokazać.<br/> | |
− | |||
− | |||
− | <br/> | ||
□ | □ | ||
{{\Spoiler}} | {{\Spoiler}} | ||
Linia 519: | Linia 338: | ||
− | <span style="font-size: 110%; font-weight: bold;"> | + | <span style="font-size: 110%; font-weight: bold;">Twierdzenie F14</span><br/> |
− | + | Jeżeli funkcja <math>f(x)</math> jest klasy <math>C^4 ([a, b])</math>, a funkcja <math>W(x)</math> jest równa | |
− | {{ | + | ::<math>W(x) = \left\{ \begin{array}{lll} |
+ | {\large\frac{1}{12}} (x - a)^3 (3 x - a - 2 b) & & a \leqslant x \leqslant c\\ | ||
+ | {\large\frac{1}{12}} (x - b)^3 (3 x - 2 a - b) & & c < x \leqslant b | ||
+ | \end{array} \right.</math> | ||
− | + | gdzie <math>c = {\small\frac{1}{2}} (a + b)</math>, to | |
− | ::[ | + | ::<math>\int^b_a f (x) d x = {\small\frac{b - a}{6}} \cdot [f (a) + 4 f (c) + f (b)] + {\small\frac{1}{6}} \int^b_a f^{(4)} (x) W (x) d x</math> |
− | :: | + | {{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}} |
+ | Dowód oparliśmy na pomyśle Talvili i Wiersmy<ref name="TalvilaWiersma"/>. Dla wygody wprowadźmy oznaczenia | ||
− | :: | + | ::<math>W(x) = \left\{ \begin{array}{lll} |
+ | U (x) & & a \leqslant x \leqslant c\\ | ||
+ | V (x) & & c < x \leqslant b | ||
+ | \end{array} \right.</math> | ||
− | + | gdzie | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | < | + | ::<math>U(x) = {\small\frac{1}{12}} (x - a)^3 (3 x - a - 2 b)</math> |
− | |||
− | {{ | ||
+ | ::<math>V(x) = {\small\frac{1}{12}} (x - b)^3 (3 x - 2 a - b)</math> | ||
+ | Wyliczając wartości <math>U^{(n)} (a)</math>, <math>U^{(n)} (c)</math>, <math>V^{(n)} (c)</math> oraz <math>V^{(n)} (b)</math>, gdzie <math>n = 0, 1, \ldots, 4</math> sporządziliśmy tabelę wartości funkcji <math>W(x)</math> i jej pochodnych w punktach <math>x = a</math>, <math>x = c</math> i <math>x = b</math>. | ||
+ | ::{| class="wikitable plainlinks" style="font-size: 100%; text-align: center; margin-right: auto;" | ||
+ | |- | ||
+ | | <math>\quad n \quad</math> || <math>U^{(n)} (a)</math> || <math>U^{(n)} (c)</math> || <math>V^{(n)} (c)</math> || <math>V^{(n)} (b)</math> | ||
+ | |- | ||
+ | | <math>\quad 0 \quad</math> || <math>0</math> || <math>- {\small\frac{(b - a)^4}{192}}</math> || <math>- {\small\frac{(b - a)^4}{192}}</math> || <math>0</math> | ||
+ | |- style=height:2.5em | ||
+ | | <math>\quad 1 \quad</math> || <math>0</math> || <math>0</math> || <math>0</math> || <math>0</math> | ||
+ | |- | ||
+ | | <math>\quad 2 \quad</math> || <math>0</math> || <math>{\small\frac{(b - a)^2}{4}}</math> || <math>{\small\frac{(b - a)^2}{4}}</math> || <math>0</math> | ||
+ | |- style=height:2.5em | ||
+ | | <math>\quad 3 \quad</math> || <math>- (b - a)</math> || <math>2 (b - a)</math> || <math>- 2 (b - a)</math> || <math>b - a</math> | ||
+ | |- style=height:2.5em | ||
+ | | <math>\quad 4 \quad</math> || <math>6</math> || <math>6</math> || <math>6</math> || <math>6</math> | ||
+ | |} | ||
− | = | + | Zauważmy: trzecia pochodna funkcji <math>W(x)</math> jest funkcją nieciągłą w punkcie <math>x = c</math>, zatem funkcja <math>W(x)</math> jest klasy <math>C^2 ([a, b])</math>. Natomiast czwarte pochodne funkcji <math>U(x)</math> i <math>V(x)</math> są funkcjami stałymi i są sobie równe. |
− | |||
− | |||
+ | Dowód przeprowadzimy całkując wielokrotnie przez części całkę <math>\int^b_a f^{(4)} (x) W (x) d x</math>. Ponieważ dla <math>n = 0, 1, 2</math> funkcje <math>W^{(n)} (x)</math> są ciągłe oraz spełniony jest warunek | ||
+ | ::<math>W^{(n)} (a) = W^{(n)} (b) = 0</math> | ||
− | + | to otrzymujemy kolejno | |
− | |||
− | |||
+ | ::<math>\int^b_a f^{(4)} (x) W (x) d x = f^{(3)} (x) W (x) \biggr\rvert_{a}^{b} - \int^b_a f^{(3)} (x) W^{(1)} (x) d x</math> | ||
+ | :::::::<math>\;\;\;\,\, = - \int^b_a f^{(3)} (x) W^{(1)} (x) d x</math> | ||
− | + | :::::::<math>\;\;\;\,\, = - f^{(2)} (x) W^{(1)} (x) \biggr\rvert_{a}^{b} + \int^b_a f^{(2)} (x) W^{(2)} (x) d x</math> | |
− | |||
− | ::<math> | + | :::::::<math>\;\;\;\,\, = \int^b_a f^{(2)} (x) W^{(2)} (x) d x</math> |
− | |||
− | |||
− | |||
− | + | :::::::<math>\;\;\;\,\, = f^{(1)} (x) W^{(2)} (x) \biggr\rvert_{a}^{b} - \int^b_a f^{(1)} (x) W^{(3)} (x) d x</math> | |
+ | :::::::<math>\;\;\;\,\, = - \int^b_a f^{(1)} (x) W^{(3)} (x) d x</math> | ||
− | |||
− | + | Ponieważ funkcja <math>W^{(3)} (x)</math> jest nieciągła w punkcie <math>x = c = {\small\frac{a + b}{2}}</math>, to musimy całkować osobno dla <math>x \in [a, c]</math> i dla <math>x \in [c, b]</math> | |
− | + | ::<math>\int^b_a f^{(4)} (x) W (x) d x = - \int^c_a f^{(1)} (x) U^{(3)} (x) d x - \int^b_c f^{(1)} (x) V^{(3)} (x) d x</math> | |
− | + | Mamy | |
− | + | ::<math>- \int_a^c f^{(1)} (x) U^{(3)} (x) d x = - f (x) U^{(3)} (x) \biggr\rvert_{a}^{c} + \int^c_a f (x) U^{(4)} (x) d x</math> | |
− | ::<math> | + | :::::::::<math>\:\! = - f (c) U^{(3)} (c) + f (a) U^{(3)} (a) + 6 \int^c_a f (x) d x</math> |
− | + | :::::::::<math>\:\! = - 2 (b - a) f (c) - (b - a) f (a) + 6 \int^c_a f (x) d x</math> | |
− | ::<math>\ | + | :::::::::<math>\:\! = - (b - a) [f (a) + 2 f (c)] + 6 \int^c_a f (x) d x</math> |
− | |||
− | |||
− | + | ::<math>- \int_c^b f^{(1)} (x) V^{(3)} (x) d x = - f (x) V^{(3)} (x) \biggr\rvert_{c}^{b} + \int^b_c f (x) V^{(4)} (x) d x</math> | |
− | ::<math> | + | :::::::::<math>= - f (b) V^{(3)} (b) + f (c) V^{(3)} (c) + 6 \int^b_c f (x) d x</math> |
− | + | :::::::::<math>= - (b - a) f (b) - 2 (b - a) f (c) + 6 \int^b_c f (x) d x</math> | |
− | ::<math>\ | + | :::::::::<math>= - (b - a) [f (b) + 2 f (c)] + 6 \int^b_c f (x) d x</math> |
+ | Zatem | ||
+ | ::<math>\int^b_a f^{(4)} (x) W (x) d x = - (b - a) [f (a) + 4 f (c) + f (b)] + 6 \int^b_a f (x) d x</math> | ||
− | + | Skąd otrzymujemy natychmiast | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | ::<math>\int^b_a f (x) d x = {\small\frac{b - a}{6}} \cdot [f (a) + 4 f (c) + f (b)] + {\small\frac{1}{6}} \int^b_a f^{(4)} (x) W (x) d x</math> | |
− | Co | + | Co kończy dowód.<br/> |
□ | □ | ||
{{\Spoiler}} | {{\Spoiler}} | ||
Linia 634: | Linia 442: | ||
− | <span style="font-size: 110%; font-weight: bold;"> | + | <span style="font-size: 110%; font-weight: bold;">Twierdzenie F15</span><br/> |
− | + | Niech <math>f(x)</math> będzie funkcją klasy <math>C^4 ([a, b])</math> i <math>c = {\small\frac{1}{2}} (a + b)</math>. Jeżeli wartość całki <math>\int^b_a f (x) d x</math> przybliżymy wartością całki <math>\int^b_a g (x) d x</math>, gdzie <math>g(x)</math> jest parabolą przechodzącą przez punkty <math>P_a = (a, f (a))</math>, <math>P_c = (c, f (c))</math> oraz <math>P_b = (b, f (b))</math>, to błąd takiego przybliżenia jest nie większy niż <math>{\small\frac{M (b - a)^5}{2880}}</math>, gdzie <math>M \geqslant \max_{a \leqslant x \leqslant b} | f^{(4)} (x) |</math>. | |
− | ::<math> | + | {{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}} |
+ | Zauważmy, że z definicji punkty <math>P_a</math>, <math>P_b</math> i <math>P_c</math> są punktami wspólnymi funkcji <math>f(x)</math> i paraboli <math>g(x)</math>. | ||
− | + | Z twierdzenia F14 wiemy, że | |
− | |||
− | ::<math>\int^ | + | ::<math>\int^b_a f (x) d x = {\small\frac{b - a}{6}} \cdot [f (a) + 4 f (c) + f (b)] + {\small\frac{1}{6}} \int^b_a f^{(4)} (x) W (x) d x</math> |
− | + | Uwzględniając twierdzenie F12, możemy napisać | |
− | + | ::<math>\int^b_a f (x) d x = \int^b_a g (x) d x + {\small\frac{1}{6}} \int^b_a f^{(4)} (x) W (x) d x</math> | |
− | |||
− | + | Zatem błąd, jaki popełniamy, przybliżając funkcję <math>f (x)</math> parabolą <math>g (x)</math> przechodzącą przez punkty <math>P_a</math>, <math>P_b</math> i <math>P_c</math>, wynosi | |
− | + | ::<math>\left| \int^b_a f (x) d x - \int^b_a g (x) d x \right| = {\small\frac{1}{6}} \left| \int^b_a f^{(4)} (x) W (x) d x \right|</math> | |
− | + | ::::::::::<math>\leqslant {\small\frac{1}{6}} \int^b_a | f^{(4)} (x) W (x) | d x</math> | |
− | |||
− | {{\ | ||
+ | ::::::::::<math>\leqslant {\small\frac{M}{6}} \int^b_a | W (x) | d x</math> | ||
+ | gdzie <math>M \geqslant \max_{a \leqslant x \leqslant b} | f^{(4)} (x) |</math>. Pozostaje policzyć całkę | ||
− | + | ::<math>\int^b_a | W (x) | d x = {\small\frac{1}{12}} \int^c_a | (x - a)^3 (3 x - a - 2 b) | d x + {\small\frac{1}{12}} \int^b_c | (x - b)^3 (3 x - 2 a - b) | d x</math> | |
− | |||
− | |||
− | + | Ponieważ prawdziwy jest następujący ciąg nierówności | |
− | ::{ | + | ::<math>a < {\small\frac{2 a + b}{3}} < {\small\frac{a + b}{2}} < {\small\frac{a + 2 b}{3}} < b</math> |
− | |||
− | + | a funkcje podcałkowe są iloczynami liniowych funkcji rosnących to, po znalezieniu miejsc zerowych tych funkcji, otrzymujemy natychmiast informację o znaku funkcji podcałkowych w interesujących nas przedziałach | |
+ | {| class="wikitable plainlinks" style="display: inline-table; margin-left: 60px; margin-right: 200px; background:transparent; font-size: 90%; text-align: center; margin-right: auto;" | ||
+ | |- | ||
+ | | <math>x</math> || <math>a</math> || <math>c</math> || <math>{\small\frac{a + 2 b}{3}}</math> | ||
+ | |- | ||
+ | | <math>x - a</math> || <math>0</math> || <math>+</math> || <math>+</math> | ||
+ | |- | ||
+ | | <math>3 x - a - 2 b</math> || <math>-</math> || <math>-</math> || <math>0</math> | ||
+ | |} | ||
+ | {| class="wikitable plainlinks" style="display: inline-table; margin-left: 200px; margin-right: 5px; background:transparent; font-size: 90%; text-align: center; margin-right: auto;" | ||
+ | |- | ||
+ | | <math>x</math> || <math>{\small\frac{2 a + b}{3}}</math> || <math>c</math> || <math>b</math> | ||
+ | |- | ||
+ | | <math>x - b</math> || <math>-</math> || <math>-</math> || <math>0</math> | ||
+ | |- | ||
+ | | <math>3 x - 2 a - b</math> || <math>0</math> || <math>+</math> || <math>+</math> | ||
|} | |} | ||
− | |||
− | + | Widzimy, że funkcje <math>(x - a)^3 (3 x - a - 2 b)</math> oraz <math>(x - b)^3 (3 x - 2 a - b)</math> są ujemne w swoich przedziałach całkowania, zatem (zobacz [https://www.wolframalpha.com/input?i=integral+-1%2F12*%28x-a%29%5E3+*+%283*x-a-2*b%29+from+a+to+%28a%2Bb%29%2F2 WolframAlpha1], [https://www.wolframalpha.com/input?i=integral+-1%2F12*%28x-b%29%5E3+*+%283*x-2*a-b%29+from+%28a%2Bb%29%2F2+to+b WolframAlpha2]) | |
− | |||
− | ::<math>\ | + | ::<math>\int^b_a | W (x) | d x = - {\small\frac{1}{12}} \int^c_a (x - a)^3 (3 x - a - 2 b) d x - {\small\frac{1}{12}} \int^b_c (x - b)^3 (3 x - 2 a - b) d x</math> |
− | + | ::::::<math>\: = {\small\frac{(b - a)^5}{960}} + {\small\frac{(b - a)^5}{960}}</math> | |
− | ::<math>\ | + | ::::::<math>\: = {\small\frac{(b - a)^5}{480}}</math> |
− | + | Podstawiając, otrzymujemy ostatecznie | |
− | |||
− | |||
+ | ::<math>\left| \int^b_a f (x) d x - \int^b_a g (x) d x \right| \leqslant {\small\frac{M}{6}} \cdot {\small\frac{(b - a)^5}{480}} = {\small\frac{M (b - a)^5}{2880}}</math> | ||
− | + | Co należało pokazać.<br/> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | Co należało | ||
□ | □ | ||
{{\Spoiler}} | {{\Spoiler}} | ||
Linia 727: | Linia 512: | ||
− | <span style="font-size: 110%; font-weight: bold;">Twierdzenie | + | <span style="font-size: 110%; font-weight: bold;">Twierdzenie F16 (błąd przybliżonego całkowania metodą Simpsona)</span><br/> |
− | Niech <math> | + | Niech <math>f(x)</math> będzie funkcją klasy <math>C^4 ([a, b])</math>. Jeżeli policzymy przybliżoną wartość całki <math>\int^b_a f (x) d x</math> metodą Simpsona (twierdzenie F13), to błąd takiego przybliżenia jest nie większy niż <math>{\small\frac{M (b - a)^5}{180 n^4}}</math>, gdzie <math>M \geqslant \max_{a \leqslant x \leqslant b} | f^{(4)} (x) |</math>. |
− | |||
− | |||
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}} | {{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}} | ||
− | + | Maksymalny błąd, jaki możemy popełnić, stosując metodę Simpsona, jest sumą błędów, jakie zostają popełnione, gdy dla wybranej pary przedziałów <math>[x_{2 k - 2}, x_{2 k}]</math> przybliżamy funkcję <math>f(x)</math> parabolą. Zatem całkowity błąd metody Simpsona jest równy | |
− | ::<math>\ | + | ::<math>E_n = \sum_{k = 1}^{n / 2} \left| \int^{x_{2 k}}_{x_{2 k - 2}} f (x) d x - \int^{x_{2 k}}_{x_{2 k - 2}} g_k (x) d x \right|</math> |
− | + | gdzie <math>g_k (x)</math> jest parabolą, jaką funkcja <math>f(x)</math> została przybliżona w <math>k</math>-tej parze przedziałów <math>[x_{2 k - 2}, x_{2 k}]</math>. Z twierdzenia F15 wynika natychmiast, że | |
− | ::<math>\ | + | ::<math>E_n = \sum_{k = 1}^{n / 2} \frac{M_k \cdot (x_{2 k} - x_{2 k - 2})^5}{2880}</math> |
+ | gdzie | ||
− | + | ::<math>M_k \geqslant \max_{x_{2 k - 2} \leqslant x \leqslant x_{2 k}} | f^{(4)} (x) |</math> | |
− | |||
− | + | Zatem | |
− | + | ::<math>E_n = {\small\frac{1}{2880}} \sum_{k = 1}^{n / 2} M_k \cdot (2 h)^5 </math> | |
− | + | :::<math>\;\! = {\small\frac{(2 h)^5}{2880}} \sum_{k = 1}^{n / 2} M_k</math> | |
+ | :::<math>\;\! \leqslant {\small\frac{32 \cdot h^5}{2880}} \sum_{k = 1}^{n / 2} M</math> | ||
− | + | :::<math>\;\! = {\small\frac{M (b - a)^5}{90 n^5}} \cdot {\small\frac{n}{2}}</math> | |
− | |||
− | {{\ | ||
+ | :::<math>\;\! = {\small\frac{M (b - a)^5}{180 n^4}}</math> | ||
+ | gdzie oznaczyliśmy | ||
− | + | ::<math>M = \max (M_1, \ldots, M_{n / 2}) \geqslant \max_{a \leqslant x \leqslant b} | f^{(4)} (x) |</math> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | Co | + | Co kończy dowód.<br/> |
□ | □ | ||
{{\Spoiler}} | {{\Spoiler}} | ||
Linia 800: | Linia 551: | ||
− | <span style="font-size: 110%; font-weight: bold;">Uwaga | + | <span style="font-size: 110%; font-weight: bold;">Uwaga F17</span><br/> |
− | + | Niech będzie dana funkcja <math>f(x)</math> klasy <math>C^4 ([a, b])</math>. Jeżeli obierzemy pewien stały skok <math>h</math> to, stosując metodę Simpsona, możemy policzyć przybliżenie <math>I</math> całki <math>\int^b_a f (x) d x</math>. Wiemy, że błąd, z jakim wyliczymy wartość całki nie przekracza liczby | |
− | |||
− | |||
− | |||
− | |||
− | <math>\ | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | ::{ | + | ::<math>E = {\small\frac{M (b - a)^5}{180 n^4}} = {\small\frac{M \cdot h^4}{180}} \cdot (b - a) = {\small\frac{M \cdot h^4}{180}} \cdot L</math> |
− | |||
− | <math>\ | + | gdzie <math>M \geqslant \max_{a \leqslant x \leqslant b} | f^{(4)} (x) |</math>, a przez <math>L = b - a</math> oznaczyliśmy długość przedziału <math>[a, b]</math>. |
− | + | Co się stanie, jeżeli (zachowując stały skok <math>h</math>) podzielimy przedział <math>[a, b]</math> na dowolną liczbę mniejszych przedziałów, każdy o długości <math>l_k</math>, policzymy całki <math>I_k</math> oraz błędy <math>E_k</math> w każdym z tych mniejszych przedziałów, a następnie je zsumujemy? | |
+ | '''Całka <math>I</math> będzie oczywiście sumą wyliczonych całek <math>I_k</math>, a całkowity błąd <math>E'</math> będący sumą błędów <math>E_k</math> nie wzrośnie!''' | ||
− | + | Istotnie błąd, jaki popełniamy w <math>k</math>-tym przedziale o długości <math>l_k</math>, wynosi | |
− | ::<math> | + | ::<math>E_k = {\small\frac{M_k h^4}{180}} \cdot l_k</math> |
− | ( | + | gdzie <math>M_k</math> jest ograniczeniem od góry funkcji <math>| f^{(4)} (x) |</math> w <math>k</math>-tym przedziale. Suma tych błędów jest równa |
+ | ::<math>E' = \sum_k {\small\frac{M_k h^4}{180}} \cdot l_k = {\small\frac{h^4}{180}} \sum_k M_k l_k \leqslant {\small\frac{M' \cdot h^4}{180}} \sum_k l_k = {\small\frac{M' \cdot h^4}{180}} \cdot L</math> | ||
+ | gdzie <math>M' = \max (M_1, M_2, \ldots, M_k, \ldots)</math> jest ograniczeniem od góry funkcji <math>f(x)</math> w przedziale <math>[a, b]</math>. Jeśli tylko dokonywaliśmy wyboru liczb <math>M_k</math> ograniczających od góry funkcję <math>| f^{(4)} (x) |</math> na odcinkach o długości <math>l_k</math> na tyle starannie, że prawdziwa jest nierówność | ||
− | + | ::<math>M' = \max (M_1, M_2, \ldots, M_k, \ldots) \leqslant M</math> | |
− | |||
− | + | (co nie jest trudne, bo wystarczy przyjąć <math>M_1 = M_2 = \ldots = M_k = \ldots = M</math>), to otrzymujemy | |
− | + | ::<math>E' = {\small\frac{M' \cdot h^4}{180}} \cdot L \leqslant {\small\frac{M \cdot h^4}{180}} \cdot L = E</math> | |
− | |||
− | :: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | '''Powyższe rozważania od razu udzielają odpowiedzi na ważne pytanie:'''<br/> | ||
+ | Co należy zrobić, jeżeli funkcja <math>f(x)</math> nie jest klasy <math>C^4</math>, a jedynie jest kawałkami klasy <math>C^4</math>? Oczywiście należy całkę zapisać jako sumę | ||
+ | całek, z których każda jest obliczana w takim przedziale, że funkcja <math>f(x)</math> jest w nim klasy <math>C^4</math>. Stosując metodę Simpsona, obliczyć całki <math>I_k</math> i błędy <math>E_k</math> w tych przedziałach, a następnie zsumować wartości całek i błędów. | ||
− | |||
+ | <span style="font-size: 110%; font-weight: bold;">Uwaga F18</span><br/> | ||
+ | Podsumowując, metoda parabol prowadzi do natępującego wzoru na przybliżoną wartość całki | ||
+ | ::<math>\int^b_a f (x) d x \approx {\small\frac{(b - a)}{3 n}} \left[ f (x_0) + 4 \sum^{n / 2}_{k = 1} f (x_{2 k - 1}) + 2 \sum_{k = 1}^{n / 2 - 1} f (x_{2 k}) + f (x_n) \right]</math> | ||
+ | Przedział całkowania <math>[a, b]</math> dzielimy na parzystą liczbę <math>n</math> przedziałów <math>[x_{k - 1}, x_k]</math> o jednakowej szerokości <math>h = {\small\frac{b - a}{n}}</math>. | ||
− | + | Wzór można przedstawić w postaci | |
− | + | ::<math>\int^b_a f (x) d x \approx {\small\frac{(b - a)}{3 n}} \left[ f (a) + 4 \sum^{n / 2}_{k = 1} f (a + (2 k - 1) \cdot h) + 2 \sum_{k = 1}^{n / 2 - 1} f (a + 2 k \cdot h) + f (b) \right]</math> | |
− | |||
− | + | Jeżeli funkcja <math>f(x)</math> jest klasy <math>C^4 ([a, b])</math>, to błąd wartości liczbowej całki oznaczonej <math>\int^b_a f (x) d x</math>, jaki popełniamy, stosując metodę Simpsona, nie przekracza | |
− | + | ::<math>{\small\frac{M (b - a)^5}{180 n^4}}</math> | |
− | + | gdzie <math>M \geqslant \underset{a \leqslant x \leqslant b}{\max} | f^{(4)} (x) |</math>. | |
− | |||
+ | <span style="font-size: 110%; font-weight: bold;">Uwaga F19</span><br/> | ||
+ | Wykorzystując przedstawioną metodę parabol, możemy bez trudu napisać w PARI/GP prosty i zaskakująco dokładny program do liczenia całek oznaczonych. Parametr <code>M</code> jest parametrem opcjonalnym. Jeżeli jest obecny, to zostanie wyliczony błąd <math>{\small\frac{M (b - a)^5}{180 n^4}}</math>, gdzie <math>\max_{a \leqslant x \leqslant b} | f^{(4)} (x) | \leqslant M</math>. Jeżeli zostanie pominięty, to zostanie wyliczona jedynie wartość <math>{\small\frac{(b - a)^5}{180 n^4}}</math>, a w wyniku pojawi się czynnik <math>M</math>, który ma przypominać, że liczba musi zostać pomnożona przez <math>M \geqslant \max_{a \leqslant x \leqslant b} | f^{(4)} (x) |</math>, aby uzyskać wartość błędu. | ||
− | + | Simpson(a, b, n, M = -1) = | |
− | + | \\ n musi być liczbą parzystą | |
+ | { | ||
+ | local(err, h, k, S, V); | ||
+ | h = 1.0*(b - a)/n; | ||
+ | S = f(a) + 4 * sum(k = 1, n/2, f(a + (2*k-1)*h)) + 2 * sum(k = 1, n/2 - 1, f(a + 2*k*h)) + f(b); | ||
+ | S = (b - a)/(3*n) * S; | ||
+ | err = 1.0*(b - a)^5/(180*n^4) * if(M<0, 1, M); | ||
+ | V = [ S, if( M < 0, Str( "M * ", err), err ) ]; | ||
+ | return(V); | ||
+ | } | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | <span style="font-size: 110%; font-weight: bold;">Przykład F20</span><br/> | |
− | + | Przedstawimy kilka przykładowych wyników obliczeń całek nieoznaczonych przy pomocy programu Simpson(a, b, n, M) | |
− | |||
− | ::<math> | + | ::<math>f(x) = x^2</math>, <math>\qquad \int^3_0 f (x) d x = 9</math> |
− | + | Simpson(0, 3, 2^10, 0) | |
+ | [9.0000000000000000000000000000000000000, 0] | ||
− | |||
− | + | ::<math>f(x) = \sin (x)</math>, <math>\qquad \int_{0}^{\pi} f (x) d x = 2</math> | |
− | + | Simpson(0, Pi, 2^10, 1) | |
+ | [2.0000000000009843683496726710086289358, 1.5462404552801947792469203606107819849 E-12] | ||
− | |||
− | ::<math> | + | ::<math>f(x) = {\small\frac{4}{1 + x^2}}</math>, <math>\qquad \int^1_0 f (x) d x = \pi</math>, <math>\qquad \pi = 3.1415926535897932384626433832795028841971693993751</math> |
− | + | Simpson(0, 1, 2^15, 96) | |
+ | [<span style="color: Red">3.141592653589793238</span>4626433832474475839, 4.6259292692714855850984652837117513021 E-19] | ||
− | + | Po uwzględnieniu wyliczonego błędu kolorem czerwonym zaznaczono tylko te cyfry, których wartość jest pewna. W rzeczywistości jeszcze kolejnych <math>10</math> cyfr jest poprawnych. | |
− | |||
+ | ::<math>f(x) = {\small\frac{\sin (x)}{x}}</math>, <math>\qquad \int_{2 \pi}^{10^4} f (x) d x = 0.1527399692533334654765895125096821824796221626790438771977250903 \qquad</math> ([https://www.wolframalpha.com/input?i=integral+sin%28x%29%2Fx+from+2*Pi+to+10%5E4 WolframAlpha]) | ||
− | + | Simpson(2*Pi, 10^4, 2^22, 0.13) | |
+ | [<span style="color: Red">0.152739969</span>25335764945765416969734658087, 2.3263037652077992736046178707334374747 E-10] | ||
− | :: | + | ::<math>f(x) = {\small\frac{\sin (x)}{\log (x)}}</math>, <math>\qquad \int_{2 \pi}^{10^4} f (x) d x = 0.63535086286 \ldots \qquad</math> ([https://www.wolframalpha.com/input?i=integral+sin%28x%29%2Flog%28x%29+from+2*Pi+to+10%5E4 WolframAlpha]) |
+ | Simpson(2*Pi, 10^4, 2^22, 0.46) | ||
+ | [<span style="color: Red">0.63535086</span>286330151753047973075030359191, 8.2315363999660589681394170810567787567 E-10] | ||
− | |||
+ | ::<math>f(x) = {\small\frac{P_1 (x)}{x}}</math>, <math>\qquad \int_{1}^{10} f (x) d x = - 0.072730903361964386963200944934753807929314886310179776161039616</math> | ||
− | + | gdzie <math>P_1 (x)</math> jest okresową funkcją Bernoulliego. Znamy dokładny wynik, bo można pokazać, że (zobacz przykład E43) | |
+ | ::<math>\int^n_1 {\small\frac{P_1 (x)}{x}} d x = \log (n!) - n \log n + n - {\small\frac{1}{2}} \log n - 1</math> | ||
− | + | Zauważmy, że funkcja <math>{\small\frac{P_1 (x)}{x}}</math> nie jest ciągła, ale jest kawałkami klasy <math>C^4</math>. Zapiszmy całkę w postaci sumy całek, z których każda jest określona w przedziale <math>[k, k + 1]</math> | |
− | ::<math> | + | ::<math>\int_{1}^{10} f (x) d x = \int_{1}^{10} \frac{x - \lfloor x \rfloor - {\small\frac{1}{2}}}{x} d x</math> |
+ | :::::<math>\;\;\;\,\, = \int_{1}^{10} \left( 1 - \frac{\lfloor x \rfloor + {\small\frac{1}{2}}}{x} \right) d x</math> | ||
+ | :::::<math>\;\;\;\,\, = 9 - \sum_{k = 1}^{9} \int_{k}^{k + 1} \frac{k + {\small\frac{1}{2}}}{x} d x</math> | ||
+ | :::::<math>\;\;\;\,\, = 9 - \sum_{k = 1}^{9} \left( k + {\small\frac{1}{2}} \right) \int_{k}^{k + 1} {\small\frac{d x}{x}}</math> | ||
− | + | Mamy | |
− | + | f(x) = 1 / x | |
+ | [9, 0] - sum( k = 1, 9, (k + 1/2) * Simpson(k, k + 1, 2^20, 24/k^5) ) | ||
+ | [<span style="color: Red">-0.07273090336196438696320</span>0988526802160255, -1.7650768731492669233661475404296456609 E-25] | ||
+ | Zauważmy, że całka i błąd są mnożone przez czynnik <math>\left( k + {\small\frac{1}{2}} \right)</math> – tak, jak być powinno! Ujemny znak błędu wynika z odejmowania wyliczonego błędu od zera. | ||
− | |||
− | |||
− | |||
− | |||
+ | <span style="font-size: 110%; font-weight: bold;">Uwaga F21</span><br/> | ||
+ | Czytelnik zapewne zwrócił uwagę, że we wszystkich przedstawionych przykładach wybieraliśmy liczbę podziałów tak, aby była potęgą liczby <math>2</math>. Są ku temu dwa dobre powody | ||
+ | :* ułamek <math>{\small\frac{1}{2^n}}</math> ma skończoną reprezentację binarną, co poprawia precyzję obliczeń | ||
+ | :* potrzebujemy dwukrotnego wzrostu liczby podziałów, aby zmniejszyć błąd o rząd wielkości (błąd maleje <math>16</math>-krotnie) | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | == Całkowanie przybliżone pewnych całek niewłaściwych == | |
− | + | <span style="font-size: 110%; font-weight: bold;">Twierdzenie F22</span><br/> | |
− | + | Jeżeli całka <math>\int_{a}^{\infty} f (t) d t</math> jest zbieżna i istnieje funkcja <math>g(t)</math> spełniająca warunki | |
− | {{\ | ||
+ | :* <math>| f (t) | \leqslant g (t)</math> dla <math>t \geqslant b</math> | ||
+ | :* istnieje całka nieoznaczona <math>G(t) = \int g (t) d t + C</math> | ||
+ | :* całka <math>\int_{b}^{\infty} g (t) d t</math> jest zbieżna | ||
+ | :* <math>\lim_{t \to + \infty} G (t) = 0</math> | ||
+ | gdzie <math>b > a</math> jest dowolnie wybraną liczbą, to przybliżona wartość całki niewłaściwej <math>\int_{a}^{\infty} f (t) d t</math> jest równa | ||
− | + | ::<math>\int_{a}^{\infty} f (x) d x \approx {\small\frac{(b - a)}{3 n}} \left[ f (x_0) + 4 \sum_{k = 1}^{n / 2} f (x_{2 k - 1}) + 2 \sum_{k = 1}^{n / 2 - 1} f (x_{2 k}) + f (x_n) \right]</math> | |
− | |||
− | + | z błędem nie większym niż | |
− | |||
− | ::<math> | + | ::<math>E = {\small\frac{M (b - a)^5}{180 n^4}} - G (b)</math> |
− | + | Przy czym optymalna liczba podziałów przedziału <math>[a, b]</math> (dla ustalonej wartości <math>b</math>) wynosi | |
− | |||
− | |||
+ | ::<math>n = (b - a) \cdot \sqrt[4]{{\small\frac{M}{36 g (b)}}}</math> | ||
+ | Odpowiada jej minimalny błąd równy | ||
− | + | ::<math>{\small\frac{(b - a) g (b)}{5}} - G (b)</math> | |
− | |||
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}} | {{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}} | ||
− | + | Zauważmy najpierw, że ponieważ z założenia <math>\int_{b}^{\infty} g (t) d t</math> jest zbieżna, to granica <math>\lim_{t \to + \infty} G (t)</math> jest skończona (twierdzenie E28). Wybierając odpowiednią wartość stałej całkowania, możemy sprawić, że <math>\lim_{t \to + \infty} G (t) = 0</math>. Wynika stąd, że warunek ten zawsze może być spełniony, ale powinniśmy upewnić się, że tak jest. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | Zauważmy, że | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | < | + | Zastępując całkę niewłaściwą <math>\int_{a}^{\infty} f (t) d t</math> całką oznaczoną <math>\int^b_a f (t) d t</math>, popełniamy błąd |
− | |||
− | :: | + | ::<math>\left| \int_{a}^{\infty} f (t) d t - \int^b_a f (t) d t \right| = \left| \int_{b}^{\infty} f (t) d t \right|</math> |
− | |||
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | | ||
− | |||
− | + | :::::::::<math>\;\;\:\, \leqslant \int_{b}^{\infty} | f (t) | d t</math> | |
− | :::: | + | :::::::::<math>\;\;\:\, \leqslant \int_{b}^{\infty} g (t) d t</math> |
− | + | :::::::::<math>\;\;\:\, = \lim_{t \to + \infty} G (t) - G (b)</math> | |
− | :::: | + | :::::::::<math>\;\;\:\, = - G (b)</math> |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Całkę oznaczoną <math>\int^b_a f (t) d t</math> możemy policzyć metodą parabol | |
− | + | ::<math>\int_{a}^{\infty} f (x) d x \approx \int^b_a f (x) d x \approx {\small\frac{(b - a)}{3 n}} \left[ f (x_0) + 4 \sum_{k = 1}^{n / 2} f (x_{2 k - 1}) + 2 \sum^{n / 2 - 1}_{k = 1} f (x_{2 k}) + f (x_n) \right]</math> | |
− | + | popełniając przy tym błąd | |
− | ::<math> | + | ::<math>E_n = {\small\frac{M (b - a)^5}{180 n^4}}</math> |
− | + | Zatem całkowity błąd jest nie większy niż | |
− | ::<math> | + | ::<math>E = {\small\frac{M (b - a)^5}{180 n^4}} - G (b)</math> |
− | |||
− | + | Zauważmy, że równanie | |
− | + | ::<math>{\small\frac{d}{d b}} \left( {\small\frac{M (b - a)^5}{180 n^4}} - G (b) \right) = 0</math> | |
− | + | czyli | |
− | ::<math> | + | ::<math>g(b) = {\small\frac{M (b - a)^4}{36 n^4}}</math> |
− | Wynika | + | jest warunkiem na minimalną wartość błędu. Wynika z niego optymalna wartość liczby podziałów <math>n</math> przedziału <math>[a, b]</math> dla wybranej wartości <math>b</math> |
− | ::<math>\ | + | ::<math>n^4 = {\small\frac{M (b - a)^4}{36 g (b)}}</math> |
− | + | Ostatecznie dostajemy | |
− | + | ::<math>n = (b - a) \cdot \sqrt[4]{{\small\frac{M}{36 g (b)}}}</math> | |
− | + | Błąd dla optymalnej wartości <math>n</math> wynosi | |
− | ::<math>\ | + | ::<math>{\small\frac{M (b - a)^5}{180 n^4}} - G (b) = {\small\frac{M (b - a)^5}{180}} \cdot {\small\frac{36 g (b)}{M (b - a)^4}} - G (b) = {\small\frac{(b - a) g (b)}{5}} - G (b)</math> |
Co należało pokazać.<br/> | Co należało pokazać.<br/> | ||
Linia 1084: | Linia 773: | ||
− | <span style="font-size: 110%; font-weight: bold;"> | + | <span style="font-size: 110%; font-weight: bold;">Uwaga F23</span><br/> |
− | + | Na podstawie twierdzenia F22, możemy napisać w PARI/GP program do przybliżonego liczenia całek niewłaściwych. Jeżeli parametrowi <code>num</code> przypiszemy wartość -1 (wartość domyślna), to zostanie wyliczona optymalna liczba podziałów | |
− | ::<math>\ | + | ::<math>n = (b - a) \cdot \sqrt[4]{{\small\frac{M}{36 g (b)}}}</math> |
− | + | (czyli taka, aby błąd był najmniejszy). Jeżeli parametr <code>num</code> przyjmie wartość -2, to optymalna liczba podziałów <math>n</math> zostanie zapisana w postaci potęgi liczby 2 (o wartości najbliższej optymalnej liczbie podziałów). W przypadku, gdy parametr <code>num</code> jest liczbą większą od zera, będzie on użyty do obliczeń jako liczba przedziałów <math>n</math>. | |
− | |||
− | |||
− | + | Program jest prosty, ale wymaga (zgodnie z twierdzeniem F22) nie tylko definicji funkcji podcałkowej, ale znacznie więcej. Przed uruchomieniem programu musimy | |
− | |||
− | |||
− | |||
− | |||
− | + | :1. zdefiniować funkcję podcałkową <math>f(t)</math> | |
− | : | + | :2. zdefiniować liczbę <math>M</math> będącą oszacowaniem od góry funkcji <math>| f^{(4)} (t) |</math> w przedziale <math>[a, b]</math> |
− | + | :3. zdefiniować funkcję <math>g(t)</math> taką, że <math>| f (t) | \leqslant g (t)</math> dla <math>t \geqslant b</math> | |
− | |||
− | |||
+ | :4. zdefiniować całkę nieoznaczoną <math>G(t)</math> funkcji <math>g(t)</math> | ||
+ | :5. upewnić się, że całka <math>\int_{b}^{\infty} g (t) d t</math> jest zbieżna | ||
− | + | :6. sprawdzić, czy <math>\lim_{t \to + \infty} G (t) = 0</math>, a gdyby tak nie było, to zmienić definicję funkcji <math>G(t)</math> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Dopiero po wykonaniu tych czynności możemy uruchomić program Simproper(a, b, num) | |
− | + | Simproper(a, b, num = -1) = | |
+ | { | ||
+ | local(err, h, k, n, S); | ||
+ | n = if( num <= 0, floor( (b - a) * ( M/36/g(b) )^(1/4) ), num ); | ||
+ | n = 2 * floor( (n+1)/2 ); | ||
+ | if( num == -2, n = 2^floor( log(n)/log(2) + 1/2 ) ); | ||
+ | h = 1.0*(b - a)/n; | ||
+ | S = f(a) + 4 * sum(k = 1, n/2, f(a + (2*k-1)*h)) + 2 * sum(k = 1, n/2 - 1, f(a + 2*k*h)) + f(b); | ||
+ | S = (b - a)/(3*n) * S; | ||
+ | err = 1.0 * M * (b - a)^5 / (180 * n^4) - G(b); | ||
+ | return( [S, err] ); | ||
+ | } | ||
− | + | Jeżeli funkcja <math>g(t)</math> jest szybko zbieżna, to nie należy prowadzić obliczeń w zbyt szerokim przedziale. Program będzie usiłował zapewnić odpowiednio mały błąd wyliczanej całki i liczba podziałów przedziału <math>[a, b]</math> może osiągnąć ogromne wartości, a obliczenia będą bardzo czasochłonne. | |
− | |||
− | |||
− | |||
+ | <span style="font-size: 110%; font-weight: bold;">Przykład F24</span><br/> | ||
+ | Rozważmy całkę <math>\int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t^3}} d t</math>. | ||
− | + | ::<math>\int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t^3}} d t = 0.0032550962148135833916711170162561745391641476739599050514576388 \qquad</math> ([https://www.wolframalpha.com/input?i=integral+sin%28x%29%2Fx%5E3+from+2*Pi+to+infinity WolframAlpha]) | |
− | |||
− | + | Tak dokładny rezultat jest możliwy, ponieważ | |
− | + | ::<math>\int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t^3}} d t = {\small\frac{1}{2}} \mathop{\textnormal{Si}}(2 \pi) - {\small\frac{\pi}{4}} + {\small\frac{1}{4 \pi}}</math> | |
− | {{ | + | gdzie funkcja <math>\mathop{\textnormal{Si}}(x) = \int^x_0 {\small\frac{\sin (t)}{t}} d t</math> (sinus całkowy<ref name="SinusCalkowy1"/><ref name="SinusCalkowy2"/><ref name="SinusCalkowy3"/>) jest funkcją specjalną i wiemy, jak obliczać jej wartości z wysoką dokładnością. |
− | |||
− | |||
− | + | Aby skorzystać z programu Simproper(a, b, num), musimy przygotować | |
− | |||
− | |||
+ | ::<math>f(t) = {\small\frac{\sin (t)}{t^3}}</math> | ||
+ | ::<math>g(t) = {\small\frac{1}{t^3}}</math> | ||
− | + | ::<math>G(t) = - {\small\frac{1}{2 t^2}}</math> | |
− | |||
− | ::<math>\ | + | ::<math>\lim_{t \to + \infty} G (t) = 0</math> |
− | + | ::<math>M \geqslant \underset{t \geqslant 2 \pi}{\max} | f^{(4)} (t) |</math> dla <math>M = 0.004</math> | |
− | |||
− | |||
− | + | Dla różnych wartości <math>b</math> otrzymujemy | |
− | + | Simproper(2*Pi, 10^5) | |
+ | [<span style="color: Red">0.003255096</span>2148146005117256508966635416723, 6.9998742421027342073324279855934715203 E-11] | ||
− | + | Simproper(2*Pi, 3*10^5) | |
+ | [<span style="color: Red">0.0032550962</span>148136208735774540186061237864, 7.7777312525236569255722454074806518694 E-12] | ||
− | |||
− | |||
− | |||
+ | <span style="font-size: 110%; font-weight: bold;">Przykład F25</span><br/> | ||
+ | Rozważmy całkę oznaczoną | ||
− | + | ::<math>\int_{0}^{\infty} {\small\frac{d t}{e^t + t}} = 0.8063956162073262251 \ldots \qquad</math> ([https://www.wolframalpha.com/input?i=integral+1%2F%28x%2Bexp%28x%29%29+from+0+to+inf WolframAlpha]) | |
− | |||
− | + | Aby skorzystać z programu Simproper(a, b, num), musimy przygotować | |
− | + | ::<math>f(t) = {\small\frac{1}{e^t + t}}</math> | |
− | ::<math> | + | ::<math>g(t) = {\small\frac{1}{e^t}}</math> |
− | + | ::<math>G(t) = - {\small\frac{1}{e^t}}</math> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | ::<math>\lim_{t \to + \infty} G (t) = 0</math> | |
− | ::<math> | + | ::<math>M \geqslant \underset{t \geqslant 0}{\max} | f^{(4)} (t) |</math> dla <math>M = 261</math> |
− | |||
− | |||
− | |||
+ | Dla różnych wartości <math>b</math> otrzymujemy | ||
+ | Simproper(0, 40) | ||
+ | [<span style="color: Red">0.806395616207326</span>22105189277802198625914, 3.8235099324937067671907345290643700420 E-17] | ||
− | + | Simproper(0, 50) | |
− | + | [<span style="color: Red">0.8063956162073262251</span>7960851949178238112, 2.1216247131181941474567287282139719553 E-21] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | <span style="font-size: 110%; font-weight: bold;">Zadanie F26</span><br/> | ||
+ | Policzyć wartość całki | ||
− | + | ::<math>\int_{0}^{\infty} {\small\frac{d t}{e^t + t^2}} = 0.818759031812863 \ldots \qquad</math> ([https://www.wolframalpha.com/input?i=integral+1%2F%28exp%28x%29+%2B+x%5E2%29+from+0+to+infinity WolframAlpha]) | |
− | |||
− | |||
− | |||
− | + | <span style="font-size: 110%; font-weight: bold;">Uwaga F27</span><br/> | |
+ | Czytelnik zapewne zwrócił uwagę na ograniczony zakres stosowania twierdzenia F22. Nawet prostej całki <math>\int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t}} d t</math> nie jesteśmy w stanie w ten sposób policzyć, bo <math>\int_{2 \pi}^{\infty} {\small\frac{d t}{t}}</math> jest rozbieżna. Poniżej pokażemy, jak można zwiększyć zakres stosowania tego twierdzenia. Rozpoczniemy od udowodnienia analogicznych wzorów do wzoru z twierdzenia E23. Funkcje Bernoulliego zostały zastąpione funkcjami <math>\sin (x)</math> i <math>\cos (x)</math>. | ||
− | |||
− | |||
− | |||
− | ::<math> | + | <span style="font-size: 110%; font-weight: bold;">Twierdzenie F28</span><br/> |
+ | Jeżeli funkcja <math>f(t)</math> jest klasy <math>C^n</math>, to | ||
− | + | ::<math>\int f (t) \sin (t) d t = - \sum_{k = 0}^{n - 1} f^{(k)} (t) \cos \! \left( t + {\small\frac{k \pi}{2}} \right) + \int f^{(n)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) d t</math> | |
− | + | ::<math>\int f (t) \cos (t) d t = \sum_{k = 0}^{n - 1} f^{(k)} (t) \sin \! \left( t + {\small\frac{k \pi}{2}} \right) - \int f^{(n)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) d t</math> | |
− | + | {{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}} | |
− | + | '''Punkt 1.''' | |
− | + | Indukcja matematyczna. Sprawdzamy prawdziwość wzoru dla <math>n = 1</math>. | |
− | + | ::<math>\int f (t) \sin (t) d t = - f^{(0)} (t) \cos (t) + \int f^{(1)} (t) \cos (t) d t</math> | |
− | ::<math>\ | + | ::::::<math>\;\;\; = - f (t) \cos (t) + \int f' (t) \cos (t) d t</math> |
− | |||
− | + | Zauważmy, że | |
− | + | ::<math>\frac{d}{d t} \left [ f^{(n)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) \right ] = f^{(n + 1)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) + f^{(n)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right)</math> | |
Zatem | Zatem | ||
− | ::<math> | + | ::<math>f^{(n)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) = \frac{d}{d t} \left [ f^{(n)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) \right ] - f^{(n + 1)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right)</math> |
− | + | ::<math>\int f^{(n)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) d t = f^{(n)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) - \int f^{(n + 1)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) d t</math> | |
− | |||
− | |||
− | |||
+ | Zakładając, że wzór jest prawdziwy dla liczby naturalnej <math>n</math> i korzystając z pokazanego przed chwilą związku, otrzymujemy dla <math>n + 1</math>. | ||
+ | |||
+ | ::<math>\int f (t) \sin (t) d t = - \sum_{k = 0}^{n - 1} f^{(k)} (t) \cos \! \left( t + {\small\frac{k \pi}{2}} \right) + \int f^{(n)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) d t</math> | ||
+ | ::::::<math>\;\;\,\, = - \sum_{k = 0}^{n - 1} f^{(k)} (t) \cos \! \left( t + {\small\frac{k \pi}{2}} \right) + f^{(n)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) - \int f^{(n + 1)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) d t</math> | ||
+ | ::::::<math>\;\;\,\, = - \sum_{k = 0}^{n - 1} f^{(k)} (t) \cos \! \left( t + {\small\frac{k \pi}{2}} \right) - f^{(n)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} + {\small\frac{\pi}{2}} \right) + \int f^{(n + 1)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} + {\small\frac{\pi}{2}} \right) d t</math> | ||
+ | ::::::<math>\;\;\,\, = - \sum_{k = 0}^{n} f^{(k)} (t) \cos \! \left( t + {\small\frac{k \pi}{2}} \right) + \int f^{(n + 1)} (t) \cos \! \left( t + {\small\frac{n \pi}{2}} \right) d t</math> | ||
− | + | Co kończy dowód indukcyjny. | |
− | |||
− | |||
− | + | '''Punkt 2.''' | |
− | + | Indukcja matematyczna. Sprawdzamy prawdziwość wzoru dla <math>n = 1</math>. | |
− | |||
− | ::<math>\ | + | ::<math>\int f (t) \cos (t) d t = f^{(0)} (t) \sin (t) - \int f^{(1)} (t) \sin (t) d t</math> |
+ | ::::::<math>\;\;\; = f (t) \sin (t) - \int f' (t) \sin (t) d t</math> | ||
− | + | Zauważmy, że | |
− | |||
− | ::<math>\ | + | ::<math>\frac{d}{d t} \left [ f^{(n)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) \right ] = f^{(n + 1)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) - f^{(n)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right)</math> |
− | + | Zatem | |
− | ::<math>\ | + | ::<math>f^{(n)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) = - \frac{d}{d t} \left [ f^{(n)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) \right ] + f^{(n + 1)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right)</math> |
− | + | ::<math>\int f^{(n)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) d t = - f^{(n)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) + \int f^{(n + 1)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) d t</math> | |
− | + | Zakładając, że wzór jest prawdziwy dla liczby naturalnej <math>n</math> i korzystając z pokazanego przed chwilą związku, otrzymujemy dla <math>n + 1</math>. | |
− | ::<math>\sum_{k = | + | ::<math>\int f (t) \cos (t) d t = \sum_{k = 0}^{n - 1} f^{(k)} (t) \sin \! \left( t + {\small\frac{k \pi}{2}} \right) - \int f^{(n)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) d t</math> |
− | + | ::::::<math>\;\;\,\, = \sum_{k = 0}^{n - 1} f^{(k)} (t) \sin \! \left( t + {\small\frac{k \pi}{2}} \right) + f^{(n)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) - \int f^{(n + 1)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) d t</math> | |
− | ::<math>\sum_{k = 1}^{\ | + | ::::::<math>\;\;\,\, = \sum_{k = 0}^{n - 1} f^{(k)} (t) \sin \! \left( t + {\small\frac{k \pi}{2}} \right) + f^{(n)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} + {\small\frac{\pi}{2}} \right) - \int f^{(n + 1)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} + {\small\frac{\pi}{2}} \right) d t</math> |
− | + | ::::::<math>\;\;\,\, = \sum_{k = 0}^{n} f^{(k)} (t) \sin \! \left( t + {\small\frac{k \pi}{2}} \right) - \int f^{(n + 1)} (t) \sin \! \left( t + {\small\frac{n \pi}{2}} \right) d t</math> | |
− | + | Co kończy dowód indukcyjny.<br/> | |
+ | □ | ||
+ | {{\Spoiler}} | ||
− | |||
− | |||
+ | <span style="font-size: 110%; font-weight: bold;">Uwaga F29</span><br/> | ||
+ | Z twierdzenia F27 wynika natychmiast, że prawdziwe są następujące wzory | ||
− | + | ::<math>\int f (t) \sin (t) d t = - f (t) \cos (t) + \int f^{(1)} (t) \cos (t) d t</math> | |
− | ::<math>- | + | ::<math>\int f (t) \sin (t) d t = - f (t) \cos (t) + f^{(1)} (t) \sin (t) - \int f^{(2)} (t) \sin (t) d t</math> |
− | + | ::<math>\int f (t) \sin (t) d t = - f (t) \cos (t) + f^{(1)} (t) \sin (t) + f^{(2)} (t) \cos (t) - \int f^{(3)} (t) \cos (t) d t</math> | |
− | ::<math>\ | + | ::<math>\int f (t) \sin (t) d t = - f (t) \cos (t) + f^{(1)} (t) \sin (t) + f^{(2)} (t) \cos (t) - f^{(3)} (t) \sin (t) + \int f^{(4)} (t) \sin (t) d t</math> |
− | |||
− | |||
+ | <span style="font-size: 110%; font-weight: bold;">Uwaga F30</span><br/> | ||
+ | Z twierdzenia F27 wynika natychmiast, że prawdziwe są następujące wzory | ||
+ | ::<math>\int f (t) \cos (t) d t = f (t) \sin (t) - \int f^{(1)} (t) \sin (t) d t</math> | ||
− | + | ::<math>\int f (t) \cos (t) d t = f (t) \sin (t) + f^{(1)} (t) \cos (t) - \int f^{(2)} (t) \cos (t) d t</math> | |
− | |||
− | ::<math>\ | + | ::<math>\int f (t) \cos (t) d t = f (t) \sin (t) + f^{(1)} (t) \cos (t) - f^{(2)} (t) \sin (t) + \int f^{(3)} (t) \sin (t) d t</math> |
− | + | ::<math>\int f (t) \cos (t) d t = f (t) \sin (t) + f^{(1)} (t) \cos (t) - f^{(2)} (t) \sin (t) - f^{(3)} (t) \cos (t) + \int f^{(4)} (t) \cos (t) d t</math> | |
− | |||
− | |||
− | + | <span style="font-size: 110%; font-weight: bold;">Przykład F31</span><br/> | |
+ | Rozważmy całkę | ||
+ | ::<math>\int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t}} d t = 0.152644750662268168985541529340002012956131350392536638644752066 \ldots \qquad</math> ([https://www.wolframalpha.com/input?i=integral+sin%28x%29%2Fx+from+2*Pi+to+inf WolframAlpha]) | ||
− | + | Nie możemy wprost zastosować twierdzenia F22, ale korzystając ze wzoru podanego w uwadze F29, otrzymujemy | |
− | ::<math>\ | + | ::<math>\int f (t) \sin (t) d t = - f (t) \cos (t) + f^{(1)} (t) \sin (t) - \int f^{(2)} (t) \sin (t) d t</math> |
− | + | Zatem | |
− | ::<math>\ | + | ::<math>\int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t}} d t = - {\small\frac{\cos (t)}{t}} \biggr\rvert_{2 \pi}^{\infty} - {\small\frac{\sin (t)}{t^2}} \biggr\rvert_{2 \pi}^{\infty} - 2 \int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t^3}} d t</math> |
− | + | ::::::<math>\, = {\small\frac{1}{2 \pi}} - 2 \int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t^3}} d t</math> | |
− | + | Całkę <math>\int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t^3}} d t</math> umiemy już obliczyć (przykład F24), zatem bez trudu policzymy całkę <math>\int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t}} d t</math>. Skoro poszło nam tak dobrze, to spróbujmy wykorzystać wzór | |
− | ::<math>\ | + | ::<math>\int f (t) \sin (t) d t = - f (t) \cos (t) + f^{(1)} (t) \sin (t) + f^{(2)} (t) \cos (t) - f^{(3)} (t) \sin (t) + \int f^{(4)} (t) \sin (t) d t</math> |
− | + | Otrzymujemy | |
− | + | ::<math>\int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t}} d t = - {\small\frac{\cos (t)}{t}} \biggr\rvert_{2 \pi}^{\infty} - {\small\frac{\sin (t)}{t^2}} \biggr\rvert_{2 \pi}^{\infty} + 2 {\small\frac{\cos (t)}{t^3}} \biggr\rvert_{2 \pi}^{\infty} + 6 {\small\frac{\sin (t)}{t^4}} \biggr\rvert_{2 \pi}^{\infty} + 24 \int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t^5}} d t</math> | |
− | ::<math>{\small\frac{ | + | ::::::<math>\, = {\small\frac{1}{2 \pi}} - {\small\frac{1}{4 \pi^3}} + 24 \int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t^5}} d t</math> |
− | |||
− | : | + | Aby policzyć numerycznie całkę po prawej stronie, musimy przygotować: |
+ | ::<math>f(t) = {\small\frac{\sin (t)}{t^5}}</math> | ||
− | + | ::<math>g(t) = {\small\frac{1}{t^5}}</math> | |
− | ::<math> | + | ::<math>G(t) = - {\small\frac{1}{4 t^4}}</math> |
− | to | + | ::<math>\lim_{t \to + \infty} G (t) = 0</math> |
− | ::<math> | + | ::<math>M \geqslant \underset{t \geqslant 2 \pi}{\max} | f^{(4)} (x) |</math> dla <math>M = 6 \cdot 10^{- 5}</math> |
− | |||
− | + | Dla różnych wartości <math>b</math> otrzymujemy | |
− | + | Simproper(2*Pi, 10^3) | |
+ | [<span style="color: Red">6.469546</span>5777027289767180972728663860875 E-5, 4.4874345453688215509527110951904781824 E-13] | ||
− | + | Simproper(2*Pi, 10^4) | |
+ | [<span style="color: Red">6.469546577</span>8029401532128088001319549975 E-5, 4.4987432411781955704707501103003654673 E-17] | ||
− | |||
+ | Uzyskaliśmy wynik | ||
+ | ::<math>\int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t^5}} d t = {\color{Red} 6.469546577}8029 \cdot 10^{- 5}</math> | ||
− | + | Dla porównania | |
− | |||
− | ::<math>\ | + | ::<math>\int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t^5}} d t = 6.46954657780293963651366308178572112473974453729045450304230 \cdot 10^{- 5} \qquad</math> ([https://www.wolframalpha.com/input?i=integrate+sin%28x%29%2Fx%5E5+from+2*Pi+to+infinity WolframAlpha]) |
− | |||
− | + | I ostatecznie dostajemy | |
− | + | ::<math>\int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t}} d t = {\small\frac{1}{2 \pi}} - {\small\frac{1}{4 \pi^3}} + 24 \int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t^5}} d t = {\color{Red} 0.15264475066226}8169</math> | |
− | + | Korzystając z przykładu F24, uzyskalibyśmy mniej dokładny wynik. | |
− | |||
− | ::< | + | <span style="font-size: 110%; font-weight: bold;">Przykład F32</span><br/> |
+ | Pokażemy, że | ||
− | + | ::<math>\int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{\log (t)}} d t = 0.5319715471471 \ldots</math> | |
− | + | W tym przypadku również nie możemy wprost zastosować twierdzenia F22, ale korzystając ze wzoru na całkowanie przez części | |
− | + | ::<math>\int f (t) \sin (t) d t = - f (t) \cos (t) + f^{(1)} (t) \sin (t) + f^{(2)} (t) \cos (t) - f^{(3)} (t) \sin (t) + \int f^{(4)} (t) \sin (t) d t</math> | |
− | + | dostajemy | |
+ | ::<math>\int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{\log (t)}} d t = - {\small\frac{\cos (t)}{\log (t)}} \biggr\rvert_{2 \pi}^{\infty} - {\small\frac{\sin (t)}{t \cdot \log^2 (t)}} \biggr\rvert_{2 \pi}^{\infty} + {\small\frac{(\log (t) + 2) \cos (t)}{t^2 \cdot \log^3 (t)}} \biggr\rvert_{2 \pi}^{\infty} - f^{(3)} (t) \sin (t) \biggr\rvert_{2 \pi}^{\infty} + \int_{2 \pi}^{\infty} {\small\frac{(6 \log^3 (t) + 22 \log^2 (t) + 36 \log (t) + 24) \cdot \sin (t)}{t^4 \cdot \log^5 (t)}} d t</math> | ||
− | + | ::::::<math>\: = {\small\frac{1}{\log (2 \pi)}} - {\small\frac{\log (2 \pi) + 2}{(2 \pi)^2 \cdot \log^3 (2 \pi)}} + \int_{2 \pi}^{\infty} {\small\frac{(6 \log^3 (t) + 22 \log^2 (t) + 36 \log (t) + 24) \cdot \sin (t)}{t^4 \cdot \log^5 (t)}} d t</math> | |
− | |||
− | + | Aby skorzystać z programu Simproper(a, b, num), musimy przygotować | |
− | ::<math> | + | ::<math>f(t) = {\small\frac{(6 \log^3 (t) + 22 \log^2 (t) + 36 \log (t) + 24) \cdot \sin (t)}{t^4 \cdot \log^5 (t)}}</math> |
− | + | ::<math>g(t) = {\small\frac{6 \log^3 (t) + 22 \log^2 (t) + 36 \log (t) + 24}{t^4 \cdot \log^5 (t)}}</math> | |
− | ::<math> | + | ::<math>G(t) = - {\small\frac{2 \log^2 (t) + 6 \log (t) + 6}{t^3 \cdot \log^4 (t)}}</math> |
− | + | ::<math>\lim_{t \to + \infty} G (t) = 0</math> | |
− | ::<math>\ | + | ::<math>M \geqslant \underset{t \geqslant 2 \pi}{\max} | f^{(4)} (t) |</math> dla <math>M = 0.011</math> |
− | + | Dla różnych wartości <math>b</math> otrzymujemy | |
− | : | + | Simproper(2*Pi, 10^4) |
+ | [<span style="color: Red">0.003525160257</span>2557803759192121691047755503, 5.2926827357763320615993244790723469003 E-14] | ||
− | + | Simproper(2*Pi, 2*10^4) | |
+ | [<span style="color: Red">0.0035251602572</span>557723629683384320660178268, 5.5938553808328833862080836586551636221 E-15] | ||
− | |||
− | + | Uzyskujemy wynik | |
− | ::<math> | + | ::<math>\int_{2 \pi}^{\infty} {\small\frac{(6 \log^3 (t) + 22 \log^2 (t) + 36 \log (t) + 24) \cdot \sin (t)}{t^4 \cdot \log^5 (t)}} d t = {\color{Red} 0.0035251602572}5577</math> |
− | + | I ostatecznie dostajemy | |
− | ::<math>\ | + | ::<math>\int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{\log (t)}} d t = {\small\frac{1}{\log (2 \pi)}} - {\small\frac{\log (2 \pi) + 2}{(2 \pi)^2 \cdot \log^3 (2 \pi)}} + \int^{\infty}_{2 \pi} {\small\frac{(6 \log^3 (t) + 22 \log^2 (t) + 36 \log (t) + 24) \sin (t)}{t^4 \cdot \log^5 (t)}} d t = {\color{Red} 0.5319715471471}5371</math> |
− | |||
− | |||
+ | <span style="font-size: 110%; font-weight: bold;">Zadanie F33</span><br/> | ||
+ | Pokazać, że | ||
+ | ::<math>\int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{\log (\log (t))}} d t = 1.56477817589 \ldots</math> | ||
− | + | {{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Rozwiązanie|Hide=Ukryj rozwiązanie}} | |
− | + | Zadanie tylko dla wytrwałych. Bez Maximy lub innego systemu wspomagającego obliczenia symboliczne nie ma sensu tracić czasu. Postępując analogicznie jak w przykładzie F32, otrzymujemy | |
− | ::<math>\ | + | ::<math>\int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{\log (\log (t))}} d t = - {\small\frac{\cos (t)}{\log (\log (t))}} \biggr\rvert_{2 \pi}^{\infty} - {\small\frac{\sin (t)}{t \cdot \log (t) \cdot \log^2 (\log (t))}} \biggr\rvert_{2 \pi}^{\infty} + {\small\frac{(\log (t) \cdot \log (\log (t)) + \log (\log (t)) + 2) \cos (t)}{t^2 \cdot \log^2 (t) \cdot \log^3 (\log (t))}} \biggr\rvert_{2 \pi}^{\infty} - f^{(3)} (t) \sin (t) \biggr\rvert_{2 \pi}^{\infty} +</math> |
− | |||
− | ::<math>\ | + | ::::::::::<math>+ \int_{2 \pi}^{\infty} {\small\frac{\log^3 (\log (t)) \cdot (6 \log^3 (t) + 11 \log^2 (t) + 12 \log (t) + 6) + \log^2 (\log (t)) \cdot (22 \log^2 (t) + 36 \log (t) + 22) + 36 \log (\log (t)) \cdot (\log (t) + 1) + 24}{t^4 \cdot \log^4 (t) \cdot \log^5 (\log (t))}} \cdot \sin (t) d t</math> |
− | |||
− | ::<math>\ | + | :::::::<math>\; = {\small\frac{1}{\log (\log (2 \pi))}} - {\small\frac{\log (2 \pi) \cdot \log (\log (2 \pi)) + \log (\log (2 \pi)) + 2}{(2 \pi)^2 \cdot \log^2 (2 \pi) \cdot \log^3 (\log (2 \pi))}} +</math> |
− | + | ::::::::::<math>+ \int_{2 \pi}^{\infty} {\small\frac{\log^3 (\log (t)) \cdot (6 \log^3 (t) + 11 \log^2 (t) + 12 \log (t) + 6) + \log^2 (\log (t)) \cdot (22 \log^2 (t) + 36 \log (t) + 22) + 36 \log (\log (t)) \cdot (\log (t) + 1) + 24}{t^4 \cdot \log^4 (t) \cdot \log^5 (\log (t))}} \cdot \sin (t) d t</math> | |
− | |||
− | + | Znajdujemy wartość całki | |
− | ::<math>\ | + | ::<math>\int_{2 \pi}^{\infty} {\small\frac{\log^3 (\log (t)) \cdot (6 \log^3 (t) + 11 \log^2 (t) + 12 \log (t) + 6) + \log^2 (\log (t)) \cdot (22 \log^2 (t) + 36 \log (t) + 22) + 36 \log (\log (t)) \cdot (\log (t) + 1) + 24}{t^4 \cdot \log^4 (t) \cdot \log^5 (\log (t))}} \cdot \sin (t) d t = {\color{Red} 0.045677031827}2121</math> |
− | + | Simproper(2*Pi, 10^4) | |
+ | [<span style="color: Red">0.045677031827</span>212178675227765630555037139, 9.7610450502314738753491941212628080885 E-14] | ||
− | + | <br/> | |
+ | □ | ||
+ | {{\Spoiler}} | ||
− | |||
− | |||
− | + | <span style="font-size: 110%; font-weight: bold;">Przykład F34</span><br/> | |
+ | Rozważmy całkę (zobacz przykład E43) | ||
− | ::<math> | + | ::<math>\int_{1}^{\infty} {\small\frac{P_1 (t)}{t}} d t = {\small\frac{1}{2}} \log (2 \pi) - 1 = - 0.081061466795327258219670263594382360138602526362216587 \ldots</math> |
+ | Nie możemy wprost zastosować twierdzenia F22, ale korzystając z twierdzenia E23, dostajemy | ||
− | + | ::<math>\int_1^{\infty} {\small\frac{P_1 (t)}{t}} d t = - {\small\frac{41}{504}} + {\small\frac{1}{6}} \int_{1}^{\infty} {\small\frac{P_6 (t)}{t^6}} d t</math> | |
− | + | Funkcja <math>P_6 (t)</math> jest klasy <math>C^4 ( \mathbb{R} )</math>, a całka <math>\int_{1}^{\infty} {\small\frac{B_6}{t^6}} d t</math> jest zbieżna. Teraz już możemy zastosować twierdzenie F22. | |
− | |||
− | + | Aby skorzystać z programu Simproper(a, b), musimy przygotować | |
− | ::<math> | + | ::<math>f(t) = {\small\frac{P_6 (t)}{6 t^6}}</math> |
+ | ::<math>g(t) = {\small\frac{B_6}{6 t^6}} = {\small\frac{1}{252 t^6}}</math> | ||
+ | ::<math>G(t) = - {\small\frac{1}{1260 t^5}}</math> | ||
− | + | ::<math>\lim_{t \to + \infty} G (t) = 0</math> | |
− | |||
− | ::<math>\ | + | ::<math>M \geqslant \underset{t \geqslant 1}{\max} | f^{(4)} (t) |</math> dla <math>M = 20</math> |
− | |||
− | + | Dla różnych wartości <math>b</math> otrzymujemy | |
− | + | Simproper(1, 10^2) | |
+ | [<span style="color: Red">0.00028773955</span>387901889817011277755076495293, 1.5793583624619615295181246127899383386 E-13] | ||
− | + | Simproper(1, 5*10^2) | |
+ | [<span style="color: Red">0.000287739553879</span>09098236994835644747087376, 5.0742857958929735807438325674790730659 E-17] | ||
− | |||
− | + | Uzyskaliśmy wynik | |
− | + | ::<math>\int_{1}^{\infty} {\small\frac{P_6 (t)}{6 t^6}} d t = {\color{Red} 0.000287739553879}0909</math> | |
− | + | Skąd wynika natychmiast wartość obliczanej przez nas całki | |
− | ::<math>\ | + | ::<math>\int_1^{\infty} {\small\frac{P_1 (t)}{t}} d t = - {\small\frac{41}{504}} + {\small\frac{1}{6}} \int_{1}^{\infty} {\small\frac{P_6 (t)}{t^6}} d t = {\color{Red} - 0.081061466795327}2582</math> |
− | |||
− | |||
− | |||
− | |||
− | + | == Uzupełnienia == | |
− | + | | |
− | : | + | === <span style="border-bottom:1px solid #000;">Jeszcze o funkcjach kawałkami klasy <math>C^n</math></span> === |
+ | <span style="font-size: 110%; font-weight: bold;">Uwaga F35</span><br/> | ||
+ | Niekiedy, dla uproszczenia zapisu, będziemy używali następujących oznaczeń dla wartości granic w wybranym punkcie | ||
+ | ::<math>f(a^+) = \lim_{x \to a^+} f (x)</math> | ||
− | + | ::<math>f(a^-) = \lim_{x \to a^-} f (x)</math> | |
− | |||
− | + | Takie oznaczenie ma nawet pewien sens, ponieważ granice możemy zapisywać w różny sposób, natomiast efekt jest jeden i ujmują go powyższe symbole. Przykładowo | |
− | ::<math>\ | + | ::<math>f(a^+) = \lim_{x \to a^+} f (x) = \lim_{h \to 0^+} f (a + h)</math> |
− | + | Pozwoli to łatwo odróżnić wartości granic od wartości funkcji <math>f(a)</math> i prosto zapisać własności funkcji. Przykładowo funkcja <math>f(x)</math> jest ciągła w punkcie <math>a</math>, gdy | |
+ | :* istnieją skończone granice <math>f(a^-)</math> i <math>f (a^+)</math> | ||
+ | :* <math>f(a^-) = f (a^+) = f (a)</math> | ||
− | |||
− | + | W przypadku pochodnych wprowadzimy oznaczenie pozwalające odróżnić wartość pochodnej prawostronnej od pochodnej lewostronnej. | |
− | ( | + | ::<math>\partial_+ f (a) = \lim_{h \to 0^+} {\small\frac{f (a + h) - f (a)}{h}}</math> |
+ | ::<math>\partial_- f (a) = \lim_{h \to 0^-} {\small\frac{f (a + h) - f (a)}{h}}</math> | ||
− | + | Podobnie i w tym przypadku różny zapis granic daje ten sam efekt | |
− | ::<math>\ | + | ::<math>\partial_+ f (a) = \lim_{x \to a^+} {\small\frac{f (x) - f (a)}{x - a}} = \lim_{h \to 0^+} {\small\frac{f (a + h) - f (a)}{h}}</math> |
− | + | Przykładowo pochodna <math>f' (x)</math> istnieje w punkcie <math>a</math>, gdy | |
− | : | + | :* istnieją skończone granice <math>\partial_+ f (a)</math> i <math>\partial_- f (a)</math> |
+ | :* <math>\partial_+ f (a) = \partial_- f (a) = f' (a)</math> | ||
+ | Pochodna <math>f' (x)</math> jest ciągła w punkcie <math>a</math>, gdy | ||
+ | :* istnieją skończone granice <math>f' (a^-)</math> i <math>f' (a^+)</math> | ||
+ | :* <math>f' (a^-) = f' (a^+) = f' (a)</math> | ||
− | = | + | <span style="font-size: 110%; font-weight: bold;">Uwaga F36</span><br/> |
+ | Podkreślmy, że granica funkcji w punkcie (powiedzmy <math>x = a</math>) nie jest wartością funkcji w tym punkcie. Jest tak tylko wtedy, gdy funkcja jest ciągła w punkcie <math>x = a</math>. Analogicznie granica pochodnej w punkcie nie jest wartością pochodnej w tym punkcie. Jest tak tylko wtedy, gdy spełnione są pewne warunki. Twierdzenia F37 i F38 określają te warunki i dlatego są bardzo istotne. | ||
− | < | + | Traktowanie granicy funkcji <math>f' (x)</math> w punkcie <math>x = 0</math> jako wartości pochodnej w tym punkcie, bez odwołania się do wspomnianych twierdzeń, jest błędem. Dobrym przykładem jest funkcja |
− | |||
+ | ::<math>f(x) = \left\{ \begin{array}{lll} | ||
+ | x^2 \sin \left( {\small\frac{1}{x}} \right) & & x \neq 0\\ | ||
+ | 0 & & x = 0 | ||
+ | \end{array} \right.</math> | ||
+ | Funkcja ta ma pochodną w punkcie <math>x = 0</math>, ale granice pochodnej w tym punkcie nie istnieją (zobacz zadanie F9). | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | to | + | <span style="font-size: 110%; font-weight: bold;">Twierdzenie F37</span><br/> |
+ | Niech <math>\varepsilon > 0</math>. Jeżeli funkcja <math>f(x)</math> jest ciągła w <math>[a, a + \varepsilon)</math> i różniczkowalna<ref name="DifferentiableFun1"/> w <math>(a, a + \varepsilon)</math> oraz istnieje granica (skończona lub nieskończona) <math>\lim_{x \to a^+} f' (x)</math>, to pochodna prawostronna w punkcie <math>a</math> jest równa tej granicy: <math>\partial_+ f (a) = f' (a^+)</math>. | ||
− | :: | + | {{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}} |
+ | Z definicji pochodna prawostronna jest równa | ||
− | + | ::<math>\partial_+ f (a) = \lim_{h \to 0^+} {\small\frac{f (a + h) - f (a)}{h}}</math> | |
− | + | Zauważmy, że dla <math>h < \varepsilon</math> funkcja <math>f(x)</math> jest ciągła w <math>[a, a + h]</math>, a <math>f' (x)</math> istnieje i jest różniczkowalna <math>(a, a + h)</math>. Ponieważ spełnione są tym samym założenia twierdzenia Lagrange'a, to istnieje taki punkt <math>c \in (a, a + h)</math>, że | |
− | ::<math> | + | ::<math>f(a + h) - f (a) = f' (c) \cdot h</math> |
− | + | Położenie punktu <math>c</math> w ogólności zależy od wyboru wartości <math>h</math>, zatem wprowadźmy oznaczenie | |
− | |||
− | ::<math> | + | ::<math>c = a + \delta (h)</math> |
− | + | gdzie <math>\delta (h) > 0</math>. Układ nierówności <math>a < c < a + h</math> możemy teraz zapisać w postaci | |
− | + | ::<math>a < a + \delta (h) < a + h</math> | |
− | + | Skąd wynika natychmiast, że | |
− | + | ::<math>\lim_{h \to 0^+} \delta (h) = 0</math> | |
− | + | Zbierając mamy | |
− | ::<math> | + | ::<math>\partial_+ f (a) = \lim_{h \to 0^+} {\small\frac{f (a + h) - f (a)}{h}} = \lim_{h \to 0^+} f' (c) = \lim_{h \to 0^+} f' (a + \delta (h)) = \lim_{x \to a^+} f' (x) = f' (a^+)</math> |
Co należało pokazać.<br/> | Co należało pokazać.<br/> | ||
Linia 1616: | Linia 1284: | ||
− | + | Analogiczne twierdzenie można sformułować i udowodnić dla lewostronnego otoczenia punktu <math>a</math>. | |
− | |||
− | ::<math>\ | + | <span style="font-size: 110%; font-weight: bold;">Twierdzenie F38</span><br/> |
+ | Niech <math>\varepsilon > 0</math>. Jeżeli funkcja <math>f(x)</math> jest ciągła w <math>[a - \varepsilon, a)</math> i różniczkowalna w <math>(a, a + \varepsilon)</math> oraz istnieje granica (skończona lub nieskończona) <math>\lim_{x \to a^-} f' (x)</math>, to pochodna lewostronna w punkcie <math>a</math> jest równa tej granicy: <math>\partial_- f (a) = f' (a^-)</math>. | ||
− | |||
− | |||
− | + | <span style="font-size: 110%; font-weight: bold;">Twierdzenie F39</span><br/> | |
+ | Funkcja ciągła w przedziale <math>(a, b)</math> przyjmuje w tym przedziale jedynie wartości skończone. | ||
− | ::<math> | + | {{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}} |
+ | Niech <math>f(x)</math> oznacza funkcję ciągłą w przedziale <math>(a, b)</math>. Przypuśćmy, że istnieje taki punkt <math>c \in (a, b)</math>, że wartość funkcji <math>f(c)</math>, nie jest skończona. Zatem dla <math>\varepsilon >0</math> | ||
− | + | ::<math>\varepsilon = \min \left( {\small\frac{c - a}{2}}, {\small\frac{b - c}{2}} \right)</math> | |
+ | funkcja <math>f(x)</math> byłaby ciągła w przedziale <math>[c - \varepsilon, c + \varepsilon]</math>, ale nie byłaby w tym przedziale ograniczona, co przeczyłoby twierdzeniu Weierstrassa<ref name="Weierstrass1"/>.<br/> | ||
+ | □ | ||
+ | {{\Spoiler}} | ||
− | |||
− | |||
− | ::<math> | + | <span style="font-size: 110%; font-weight: bold;">Wniosek F40</span><br/> |
+ | Z twierdzenia F39 wynika natychmiast, że jeżeli funkcja <math>f(x)</math> ma ciągłą pochodną w przedziale <math>(a, b)</math>, to funkcja <math>f(x)</math> jest w tym przedziale różniczkowalna. | ||
− | |||
− | |||
− | ::< | + | <span style="font-size: 110%; font-weight: bold;">Zadanie F41</span><br/> |
+ | Niech | ||
− | ::<math>f | + | ::<math>f(x) = \left\{ \begin{array}{rrr} |
+ | - (- x)^{1 / 3} & & x < 0\\ | ||
+ | x^{1 / 3} & & x \geqslant 0 | ||
+ | \end{array} \right.</math> | ||
− | + | Korzystając z twierdzeń F37 i F38 znaleźć wartości pochodnej <math>f(x)</math> w <math>x = 0</math>. | |
− | + | {{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Rozwiązanie|Hide=Ukryj rozwiązanie}} | |
+ | Spójrzmy na wykres funkcji <math>f(x)</math> | ||
− | + | ::[[File: F_Styczna_pionowa.png|none]] | |
− | |||
− | + | Od razu dostrzegamy, że <math>f(x)</math> ma styczną pionową w punkcie <math>x = 0</math>. Obliczając pochodną, dostajemy | |
− | + | ::<math>f' (x) = \left\{ \begin{array}{rrr} | |
+ | \frac{1}{3} (- x)^{- 2 / 3} & & x < 0\\ | ||
+ | \frac{1}{3} x^{- 2 / 3} & & x \geqslant 0 | ||
+ | \end{array} \right.</math> | ||
− | + | Funkcja <math>f(x)</math> jest ciągła w przedziale <math>[0, \varepsilon)</math> i ma ciągłą pochodną w przedziale <math>(0, \varepsilon)</math> oraz <math>f' (0^+) = + \infty</math>, zatem w punkcie <math>x = 0</math> mamy <math>\partial_+ f (0) = + \infty</math> (twierdzenie F37). Podobnie pokazujemy, że <math>\partial_- f (0) = + \infty</math>. Obliczając pochodne jednostronne z definicji, otrzymujemy | |
− | ::<math> | + | ::<math>\partial_+ f (0) = \lim_{h \to 0^+} {\small\frac{f (0 + h) - f (0)}{h}} = \lim_{h \to 0^+} {\small\frac{h^{1 / 3} - 0}{h}} = \lim_{h \to 0^+} {\small\frac{1}{h^{2 / 3}}} = + \infty</math> |
− | + | ::<math>\partial_- f (0) = \lim_{h \to 0^-} {\small\frac{f (0 + h) - f (0)}{h}} = \lim_{h \to 0^-} {\small\frac{- (- h)^{1 / 3} - 0}{h}} = \lim_{h \to 0^-} {\small\frac{1}{(- h)^{2 / 3}}} = + \infty</math> | |
− | |||
− | + | Możemy powiedzieć, że funkcja <math>f(x)</math> ma pochodną niewłaściwą w punkcie <math>x = 0</math> równą <math>+ \infty</math>. Ale nie powiemy, że <math>f(x)</math> ma pochodną (w zwykłym sensie) lub że jest różniczkowalna w tym punkcie. Zauważmy, że z istnienia nieskończonej pochodnej nie wynika ciągłość funkcji. Rozważmy | |
− | + | ::<math>\mathop{\textnormal{sgn}}(x) = \left\{ \begin{array}{rrr} | |
− | + | - 1 & & x < 0\\ | |
− | + | 0 & & x = 0\\ | |
+ | 1 & & x > 0 | ||
+ | \end{array} \right.</math> | ||
− | + | Łatwo znajdujemy, że | |
− | :: | + | ::<math>\partial_+ \mathop{\textnormal{sgn}}(0) = \lim_{h \to 0^+} {\small\frac{\mathop{\textnormal{sgn}}(0 + h) - \mathop{\textnormal{sgn}}(0)}{h}} = \lim_{h \to 0^+} {\small\frac{1 - 0}{h}} = \lim_{h \to 0^+} {\small\frac{1}{h}} = + \infty</math> |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | ::<math>\partial_- \mathop{\textnormal{sgn}}(0) = \lim_{h \to 0^-} {\small\frac{\mathop{\textnormal{sgn}}(0 + h) - \mathop{\textnormal{sgn}}(0)}{h}} = \lim_{h \to 0^-} {\small\frac{- 1 - 0}{h}} = - \lim_{h \to 0^-} {\small\frac{1}{h}} = + \infty</math> | ||
− | + | Gdybyśmy uznali, że <math>\mathop{\textnormal{sgn}}(x)</math> jest różniczkowalna w <math>x = 0</math>, to mielibyśmy funkcję różniczkowalną i nieciągłą w <math>x = 0</math>.<br/> | |
− | + | □ | |
− | + | {{\Spoiler}} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | <span style="font-size: 110%; font-weight: bold;">Twierdzenie F42</span><br/> | |
+ | Niech <math>c \in (a, b)</math>. Jeżeli funkcja <math>f(x)</math> jest ciągła w przedziale <math>(a, b)</math> i ma ciągłą pochodną w każdym z przedziałów <math>(a, c)</math> i <math>(c, b)</math> oraz istnieją skończone i równe sobie granice <math>\lim_{x \to c^-} f' (x)</math> i <math>\lim_{x \to c^+} f' (x)</math>, to pochodna <math>f' (x)</math> jest ciągła w punkcie <math>x = c</math>, czyli jest ciągła w <math>(a, b)</math>. | ||
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}} | {{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}} | ||
− | + | Pochodna prawostronna z definicji jest równa | |
− | ::<math>\ | + | ::<math>\partial_+ f (c) = \lim_{h \to 0^+} {\small\frac{f (c + h) - f (c)}{h}}</math> |
− | + | O ile tylko <math>h < b - c</math>, to funkcja <math>f(x)</math> jest ciągła w przedziale <math>[c, c + h)</math> i różniczkowalna w przedziale <math>(c, c + h)</math>, czyli spełnione są założenia twierdzenia F37, zatem pochodna prawostronna w punkcie <math>c</math> jest równa | |
− | ::<math> | + | ::<math>\partial_+ f (c) = \lim_{x \to c^+} f' (x)</math> |
− | + | Ponieważ założyliśmy, że granica <math>\lim_{x \to c^+} f' (x)</math> jest skończona, to <math>f' (x)</math> jest prawostronnie ciągła w punkcie <math>c</math>. Podobnie pokazujemy, że <math>f' (x)</math> jest lewostronnie ciągła w <math>c</math>. Z założenia granice <math>\lim_{x \to c^-} f' (x)</math> i <math>\lim_{x \to c^+} f' (x)</math> są równe, zatem <math>f' (x)</math> jest ciągła w punkcie <math>c</math>. Co należało pokazać.<br/> | |
+ | □ | ||
+ | {{\Spoiler}} | ||
− | |||
− | |||
+ | Z twierdzenia F42 wynika natychmiast | ||
− | + | <span style="font-size: 110%; font-weight: bold;">Twierdzenie F43</span><br/> | |
+ | Niech funkcja <math>f(x)</math> będzie kawałkami klasy <math>C^1 ([a, b])</math>. Funkcja <math>f(x)</math> jest klasy <math>C^1 ([a, b])</math> wtedy i tylko wtedy, gdy jest ciągła w przedziale <math>[a, b]</math> i w każdym punkcie <math>x_k</math> (wyznaczającym podział przedziału <math>[a, b]</math>) granice lewostronna i granica prawostronna pochodnej <math>f' (x)</math> są sobie równe. | ||
− | |||
− | + | <span style="font-size: 110%; font-weight: bold;">Zadanie F44</span><br/> | |
+ | Niech | ||
+ | :* funkcja <math>f(x)</math> będzie klasy <math>C^0 ([a, b])</math> | ||
+ | :* <math>c \in (a, b)</math> | ||
+ | :* pochodna funkcji <math>f(x)</math> będzie funkcją ciągłą w przedziałach <math>[a, c)</math> i <math>(c, b]</math> | ||
− | + | Pokazać, że | |
+ | # jeżeli co najmniej jedna z granic <math>f' (c^-)</math> i <math>f' (c^+)</math> jest nieskończona, to funkcja <math>f(x)</math> nie jest różniczkowalna w punkcie <math>x = c</math> i oczywiście nie jest nawet kawałkami klasy <math>C^1 ([a, b])</math> | ||
+ | # jeżeli istnieją skończone granice <math>f' (c^-)</math> i <math>f' (c^+)</math> i nie są sobie równe, to <math>f(x)</math> jest kawałkami klasy <math>C^1 ([a, b])</math> | ||
+ | # jeżeli istnieją skończone granice <math>f' (c^-)</math> i <math>f' (c^+)</math> i są sobie równe, to funkcja <math>f(x)</math> jest klasy <math>C^1 ([a, b])</math> | ||
+ | # jeżeli funkcja <math>f(x)</math> jest różniczkowalna w punkcie <math>x = c</math> oraz funkcja <math>f' (x)</math> jest nieciągła w punkcie <math>x = c</math>, to co najmniej jedna z granic <math>f' (c^-)</math> i <math>f' (c^+)</math> nie istnieje; w efekcie funkcja <math>f(x)</math> nie jest nawet kawałkami klasy <math>C^1 ([a, b])</math> | ||
− | + | {{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Rozwiązanie|Hide=Ukryj rozwiązanie}} | |
− | + | '''Punkt 1.''' | |
− | + | Dla ustalenia uwagi załóżmy, że <math>f' (c^+) = + \infty</math>. Ponieważ funkcja <math>f(x)</math> jest ciągła w <math>[a, b]</math>, pochodna funkcji <math>f(x)</math> jest ciągła w <math>(c, b]</math> oraz istnieje (nieskończona) granica <math>f' (c^+)</math>, to z twierdzenia F37 wiemy, że pochodna prawostronna w punkcie <math>a</math> jest równa tej granicy, czyli <math>\partial_+ f (c) = f' (c^+) = + \infty</math> . Wynika stąd, że funkcja <math>f(x)</math> nie jest różniczkowalna w punkcie <math>x = c</math>. Oczywiście funkcja <math>f(x)</math> nie nie jest nawet kawałkami klasy <math>C^1 ([a, b])</math>, już ze względu na uczynione założenie, że co najmniej jedna z granic <math>f' (c^-)</math> i <math>f' (c^+)</math> nie jest skończona. | |
− | + | <span style="border-bottom-style: double;">Przykład</span><br/> | |
+ | Rozważmy funkcję | ||
− | + | ::<math>f(x) = \left\{ \begin{array}{lll} | |
+ | 0 & & x < 0\\ | ||
+ | x^{2 / 3} & & x \geqslant 0 | ||
+ | \end{array} \right.</math> | ||
+ | Funkcja jest klasy <math>C^0 ([- 5, 5])</math>. Wartość pochodnej lewostronnej i prawostronnej w punkcie <math>x = 0</math> policzymy z definicji | ||
− | + | ::<math>\partial_- f (0) = \lim_{h \to 0^-} {\small\frac{f (0 + h) - 0}{h}} = {\small\frac{0 - 0}{h}} = 0</math> | |
− | ::<math> | + | ::<math>\partial_+ f (0) = \lim_{h \to 0^+} {\small\frac{f (0 + h) - 0}{h}} = {\small\frac{h^{2 / 3} - 0}{h}} = {\small\frac{1}{h^{1 / 3}}} = + \infty</math> |
− | + | Obliczając pochodną funkcji <math>f(x)</math> dostajemy | |
− | ::<math> | + | ::<math>f' (x) = \left\{ \begin{array}{lll} |
+ | 0 & & x < 0\\ | ||
+ | {\small\frac{2}{3}} x^{- 1 / 3} & & x \geqslant 0 | ||
+ | \end{array} \right.</math> | ||
− | + | Odpowiednie granice są równe | |
− | + | ::<math>f' (0^-) = \lim_{x \to 0^-} f (x) = 0</math> | |
− | ::<math>\ | + | ::<math>f' (0^+) = \lim_{x \to 0^+} f (x) = + \infty</math> |
− | + | Zatem funkcja <math>f(x)</math> nie jest nawet kawałkami klasy <math>C^1 ([- 5, 5])</math>. | |
− | + | '''Punkt 2.''' | |
− | to | + | Ponieważ funkcja <math>f(x)</math> jest ciągła w <math>[a, b]</math>, pochodna funkcji <math>f(x)</math> |
+ | jest ciągła w <math>(c, b]</math> oraz istnieje skończona granica <math>f' (c^+)</math>, to z twierdzenia F37 wynika, że pochodna <math>f' (x)</math> jest prawostronnie ciągła w <math>c</math>, czyli | ||
− | ::<math> | + | ::<math>f' (c^+) = \partial_+ f (c)</math> |
− | + | Analogiczna analiza w przedziale <math>[a, c)</math> prowadzi do wniosku, że | |
− | |||
− | |||
+ | ::<math>f' (c^-) = \partial_- f (c)</math> | ||
+ | Z założenia | ||
− | + | ::<math>\partial_- f (c) = f' (c^-) \neq f' (c^+) = \partial_+ f (c)</math> | |
− | |||
− | + | zatem <math>f(x)</math> nie jest różniczkowalna w punkcie <math>c</math>, czyli <math>f' (x)</math> jest funkcją nieciągłą. Ponieważ istnieją granice <math>f' (c^-)</math> i <math>f' (c^+)</math>, to <math>f(x)</math> jest kawałkami klasy <math>C^1 ([a, b])</math>. | |
− | + | <span style="border-bottom-style: double;">Przykład</span><br/> | |
+ | Rozważmy funkcję | ||
− | ::<math>f(x) = {\ | + | ::<math>f(x) = \left\{ \begin{array}{lll} |
+ | 0 & & x < 0\\ | ||
+ | x^2 + x & & x \geqslant 0 | ||
+ | \end{array} \right.</math> | ||
− | + | Funkcja jest klasy <math>C^0 ([- 5, 5])</math>. Wartość pochodnej lewostronnej i prawostronnej w punkcie <math>x = 0</math> policzymy z definicji | |
− | ::<math>f | + | ::<math>\partial_- f (0) = \lim_{h \to 0^-} {\small\frac{f (0 + h) - 0}{h}} = {\small\frac{0 - 0}{h}} = 0</math> |
− | to | + | ::<math>\partial_+ f (0) = \lim_{h \to 0^+} {\small\frac{f (0 + h) - 0}{h}} = {\small\frac{h^2 + h - 0}{h}} = 1</math> |
− | + | Obliczając pochodną funkcji <math>f(x)</math> dostajemy | |
− | ::<math> | + | ::<math>f' (x) = \left\{ \begin{array}{lll} |
+ | 0 & & x < 0\\ | ||
+ | 2 x + 1 & & x \geqslant 0 | ||
+ | \end{array} \right.</math> | ||
+ | Odpowiednie granice są równe | ||
− | + | ::<math>f' (0^-) = \lim_{x \to 0^-} f (x) = 0</math> | |
− | ::<math>\ | + | ::<math>f' (0^+) = \lim_{x \to 0^+} f (x) = 1</math> |
− | + | Zatem funkcja <math>f(x)</math> jest kawałkami klasy <math>C^1 ([- 5, 5])</math>. | |
− | + | '''Punkt 3.''' | |
− | + | Analizując tak samo, jak w punkcie 2. otrzymujemy ciąg równości | |
− | ::<math> | + | ::<math>\partial_- f (c) = f' (c^-) = f' (c^+) = \partial_+ f (c)</math> |
− | + | Zatem pochodna istnieje w punkcie <math>x = c</math> i jest ciągła w tym punkcie. Wynika stąd natychmiast, że funkcja <math>f(x)</math> jest klasy <math>C^1 ([a, b])</math>. | |
− | : | + | <span style="border-bottom-style: double;">Przykład</span><br/> |
+ | Rozważmy funkcję | ||
− | + | ::<math>f(x) = \left\{ \begin{array}{lll} | |
+ | 0 & & x < 0\\ | ||
+ | x^2 & & x \geqslant 0 | ||
+ | \end{array} \right.</math> | ||
+ | Funkcja jest klasy <math>C^0 ([- 5, 5])</math>. Wartość pochodnej lewostronnej i prawostronnej w punkcie <math>x = 0</math> policzymy z definicji | ||
+ | ::<math>\partial_- f (0) = \lim_{h \to 0^-} {\small\frac{f (0 + h) - 0}{h}} = {\small\frac{0 - 0}{h}} = 0</math> | ||
− | + | ::<math>\partial_+ f (0) = \lim_{h \to 0^+} {\small\frac{f (0 + h) - 0}{h}} = {\small\frac{h^2 - 0}{h}} = 0</math> | |
− | |||
+ | Czyli <math>f(x)</math> jest różniczkowalna w punkcie <math>x = 0</math> i <math>f' (0) = 0</math>. Obliczając pochodną funkcji <math>f(x)</math> dostajemy | ||
+ | ::<math>f' (x) = \left\{ \begin{array}{lll} | ||
+ | 0 & & x < 0\\ | ||
+ | 2 x & & x \geqslant 0 | ||
+ | \end{array} \right.</math> | ||
− | + | Odpowiednie granice są równe | |
− | |||
− | ::<math> | + | ::<math>f' (0^-) = \lim_{x \to 0^-} f (x) = 0</math> |
− | + | ::<math>f' (0^+) = \lim_{x \to 0^+} f (x) = 0</math> | |
− | + | Zatem funkcja <math>f(x)</math> jest klasy <math>C^1 ([- 5, 5])</math>. | |
− | + | '''Punkt 4.''' | |
+ | Z założenia funkcja <math>f(x)</math> jest różniczkowalna w punkcie <math>c</math>, czyli istnieją skończone granice | ||
− | + | ::<math>\partial_+ f (c) = \lim_{x \to c^+} {\small\frac{f (x) - f (c)}{x - c}}</math> | |
− | ::<math>f( | + | ::<math>\partial_- f (c) = \lim_{x \to c^-} {\small\frac{f (x) - f (c)}{x - c}}</math> |
− | + | i są sobie równe: <math>\partial_+ f (c) = \partial_- f (c) = f' (c)</math>. | |
− | + | Ponieważ <math>c</math> jest również punktem nieciągłości pochodnej, to | |
− | + | ::<math>\lim_{x \to c^+} f' (x) \neq f' (c)</math> | |
− | + | lub | |
− | + | ::<math>\lim_{x \to c^-} f' (x) \neq f' (c)</math> | |
− | |||
− | + | Przypuśćmy, że istnieją skończone granice <math>\lim_{x \to c^+} f' (x)</math> i <math>\lim_{x \to c^-} f' (x)</math>, zatem z twierdzeń F37 i F38 wynika, że pochodna jest prawostronnie i lewostronnie ciągła w <math>c</math>. Mamy | |
− | ::<math> | + | ::<math>\lim_{x \to c^+} f' (x) = \partial_+ f (c)</math> |
− | + | oraz | |
+ | ::<math>\lim_{x \to c^-} f' (x) = \partial_- f (c)</math> | ||
− | + | Co oznacza, że | |
− | ::<math>\ | + | ::<math>\lim_{x \to c^+} f' (x) = \partial_+ f (c) = f' (c) = \partial_- f (c) = \lim_{x \to c^-} f' (x)</math> |
− | + | Zatem pochodna <math>f' (x)</math> jest ciągła w punkcie <math>c</math> wbrew założeniu o nieciągłości. Czyli nasze przypuszczenie, że istnieją skończone granice <math>\lim_{x \to c^+} f' (x)</math> i <math>\lim_{x \to c^-} f' (x)</math> jest błędne. Przypadek, gdy jedna z tych granic jest nieskończona, również nie jest możliwy, bo wtedy (wbrew założeniu) funkcja <math>f(x)</math> nie byłaby różniczkowalna w punkcie <math>x = c</math> (zobacz punkt 1). Zatem przynajmniej jedna z tych granic nie może istnieć. Co oznacza, że funkcja <math>f(x)</math> nie jest nawet klasy <math>C^1 ([a, b])</math>. | |
+ | Przykładową funkcję | ||
+ | ::<math>f(x) = \left\{ \begin{array}{lll} | ||
+ | 0 & & x < 0\\ | ||
+ | x^2 \cdot \sin \left( {\small\frac{1}{x}} \right) & & x \geqslant 0 | ||
+ | \end{array} \right.</math> | ||
− | + | Czytelnik bez trudu sam przeanalizuje, korzystając z rozwiązania zadania F9.<br/> | |
+ | □ | ||
+ | {{\Spoiler}} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | <span style="font-size: 110%; font-weight: bold;">Zadanie F45</span><br/> | |
+ | Zbadać dla jakich wartości parametrów <math>a, b, c</math> funkcja | ||
− | <math> | + | ::<math>f(x) = \left\{ \begin{array}{lll} |
+ | a x^2 + b x + c & & x < 0\\ | ||
+ | \cos (x) & & x \geqslant 0 | ||
+ | \end{array} \right.</math> | ||
− | <math> | + | jest klasy <math>C^2 (\mathbb{R})</math>. |
+ | {{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Rozwiązanie|Hide=Ukryj rozwiązanie}} | ||
+ | Funkcja <math>f(x)</math> jest klasy <math>C^0 (\mathbb{R})</math>, gdy <math>c = 1</math>. Mamy zatem | ||
− | + | ::<math>f(x) = \left\{ \begin{array}{lll} | |
+ | a x^2 + b x + 1 & & x < 0\\ | ||
+ | \cos (x) & & x \geqslant 0 | ||
+ | \end{array} \right.</math> | ||
− | <math> | + | Funkcja <math>f(x)</math> jest teraz ciągła, funkcje <math>a x^2 + b x + 1</math> i <math>\cos (x)</math> są różniczkowalne w przedziałach <math>(- \varepsilon, 0)</math> i <math>(0, \varepsilon)</math>. Granice pochodnych wynoszą |
+ | ::<math>\lim_{x \to 0^-} f' (x) = \lim_{x \to 0^-} 2 a x + b = b</math> | ||
+ | ::<math>\lim_{x \to 0^+} f' (x) = \lim_{x \to 0^+} (- \sin (x)) = 0</math> | ||
− | + | Z twierdzenia F42 wiemy, że jeżeli granice te są skończone i sobie równe, to pochodna jest ciągła, zatem musi być <math>b = 0</math>. Otrzymujemy | |
− | |||
− | ::<math>\ | + | ::<math>f(x) = \left\{ \begin{array}{lll} |
+ | a x^2 + 1 & & x < 0\\ | ||
+ | \cos (x) & & x \geqslant 0 | ||
+ | \end{array} \right.</math> | ||
− | + | oraz | |
− | ::<math> | + | ::<math>f' (x) = \left\{ \begin{array}{lll} |
+ | 2 a x & & x < 0\\ | ||
+ | - \sin (x) & & x \geqslant 0 | ||
+ | \end{array} \right.</math> | ||
− | |||
− | + | Teraz funkcja <math>f' (x)</math> jest funkcją ciągłą, a funkcje <math>2 a x</math> i <math>- \sin (x)</math> są różniczkowalne w przedziałach <math>(- \varepsilon, 0)</math> i <math>(0, \varepsilon)</math>. Granice następnej pochodnej wynoszą | |
− | + | ::<math>\lim_{x \to 0^-} f'' (x) = \lim_{x \to 0^-} 2 a = 2 a</math> | |
+ | ::<math>\lim_{x \to 0^+} f'' (x) = \lim_{x \to 0^+} (- \cos (x)) = - 1</math> | ||
− | + | Z twierdzenia F42 zastosowanego do funkcji <math>f' (x)</math> i <math>f'' (x)</math> wynika, że istnienie i równość wypisanych granic zapewni nam ciągłość drugiej pochodnej, zatem musi być <math>a = - {\small\frac{1}{2}}</math>. Ostatecznie dostajemy | |
− | ::<math> | + | ::<math>f(x) = \left\{ \begin{array}{lll} |
+ | - {\large\frac{x^2}{2}} + 1 & & x < 0\\ | ||
+ | \cos (x) & & x \geqslant 0 | ||
+ | \end{array} \right.</math> | ||
− | + | Funkcja <math>f(x)</math> jest klasy <math>C^2 (\mathbb{R})</math>.<br/> | |
+ | □ | ||
+ | {{\Spoiler}} | ||
− | |||
− | ::<math> | + | <span style="font-size: 110%; font-weight: bold;">Uwaga F46</span><br/> |
+ | Nim przejdziemy do dalszych twierdzeń, zauważmy, że jeżeli <math>f(x)</math> jest funkcją ciągłą w przedziale <math>[a, b]</math>, to zmiana wartości funkcji <math>f(x)</math> w pewnym punkcie <math>c \in [a, b]</math> nie wpływa na wartość lewo- i prawostronnych granic funkcji w tym punkcie. Liczba <math>f(c)</math> to zdefiniowana wartość funkcji <math>f(x)</math> w punkcie <math>c</math>. Granice (lewa i prawa) funkcji <math>f(x)</math> w punkcie <math>x = c</math> nie zależą od wartości funkcji <math>f(c)</math>, a jedynie informują nas, jaka powinna być wartość funkcji w punkcie <math>x = c</math>, aby funkcja <math>f(x)</math> była lewostronnie ciągła lub prawostronnie ciągła, lub ciągła (gdy granice te są równe) w punkcie <math>x = c</math>. Ujmując dokładniej: wartość granicy funkcji <math>f(x)</math> w punkcie <math>x = c</math> wynika z przebiegu funkcji w sąsiedztwie punktu <math>c</math>. | ||
− | |||
− | |||
− | + | <span style="font-size: 110%; font-weight: bold;">Twierdzenie F47</span><br/> | |
+ | Niech <math>f(x)</math> będzie funkcją ciągłą w przedziale <math>(a, b)</math>. Funkcja <math>f(x)</math> może być przedłużona do funkcji ciągłej w przedziale <math>[a, b]</math> wtedy i tylko wtedy, gdy istnieją skończone granice funkcji <math>f(x)</math> na krańcach przedziału <math>(a, b)</math>. | ||
+ | {{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}} | ||
+ | <math>\Large{\Longrightarrow}</math> | ||
− | < | + | Niech funkcja <math>\tilde{f} (x)</math> będzie przedłużeniem funkcji <math>f(x)</math> do funkcji ciągłej w przedziale <math>[a, b]</math>, zatem istnieją skończone granice <math>\tilde{f} (a^+)</math> i <math>\tilde{f} (b^-)</math>. Ale funkcja <math>\tilde{f} (x)</math> różni się od funkcji <math>f(x)</math> co najwyżej wartością w punktach <math>a</math> i <math>b</math>, co oznacza, że istnieją skończone granice <math>f(a^+)</math> i <math>f(b^-)</math>. |
− | |||
− | + | <math>\Large{\Longleftarrow}</math> | |
− | + | Z założenia istnieją skończone granice <math>f(a^+)</math> i <math>f(b^-)</math>. Zatem funkcja | |
− | ::<math>f(x) = | + | ::<math>\tilde{f} (x) = \left\{ \begin{array}{lll} |
+ | f (a^+) & & x = a\\ | ||
+ | f (x) & & a < x < b\\ | ||
+ | f (b^-) & & x = b | ||
+ | \end{array} \right.</math> | ||
− | + | jest ciągła w <math>[a, b]</math> i jest poszukiwanym przedłużeniem funkcji <math>f(x)</math> do funkcji ciągłej w przedziale <math>[a, b]</math>.<br/> | |
+ | □ | ||
+ | {{\Spoiler}} | ||
− | |||
− | |||
− | ::<math> | + | <span style="font-size: 110%; font-weight: bold;">Twierdzenie F48</span><br/> |
+ | Niech <math>f(x)</math> będzie funkcją ciągłą w przedziale <math>[a, b]</math>, a jej pochodna będzie ciągła w <math>(a, b)</math>. Pochodna funkcji <math>f(x)</math> jest ciągła w przedziale <math>[a, b]</math> wtedy i tylko wtedy, gdy istnieją skończone granice jednostronne pochodnej <math>f(x)</math> na krańcach przedziału <math>(a, b)</math>. | ||
− | + | {{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}} | |
− | + | <math>\Large{\Longrightarrow}</math> | |
+ | Z założenia pochodna funkcji <math>f(x)</math> jest ciągła w przedziale <math>[a, b]</math>, zatem istnieją skończone granice jednostronne <math>f' (a^+)</math> i <math>f' (b^-)</math>. | ||
− | + | <math>\Large{\Longleftarrow}</math> | |
− | + | Z założenia pochodna funkcji <math>f(x)</math> jest ciągła w przedziale <math>(a, b)</math>, zatem funkcja <math>f(x)</math> jest różniczkowalna w <math>(a, b)</math> (zobacz F40). Niech <math>\varepsilon < b - a</math>. Ponieważ funkcja <math>f(x)</math> jest ciągła w <math>[a, a + \varepsilon)</math> i różniczkowalna w <math>(a, a + \varepsilon)</math> oraz istnieje granica skończona <math>f' (a^+)</math>, to z twierdzenia F37 wiemy, że pochodna prawostronna w punkcie <math>a</math> jest równa tej granicy | |
− | + | ::<math>\partial_+ f (a) = f' (a^+)</math> | |
− | + | Ponieważ z założenia granica <math>f' (a^+)</math> jest skończona, to pochodna <math>f' (x)</math> jest prawostronnie ciągła w punkcie <math>a</math>. Podobnie dowodzimy, że pochodna <math>f' (x)</math> jest lewostronnie ciągła w punkcie <math>a</math>. | |
+ | Pokazaliśmy tym samym, że w przypadku, gdy istnieją skończone granice jednostronne pochodnej na krańcach przedziału <math>(a, b)</math>, to pochodne jednostronne funkcji <math>f(x)</math> na krańcach przedziału <math>(a, b)</math> istnieją, a sama pochodna jest na krańcach przedziału jednostronnie ciągła.<br/> | ||
+ | □ | ||
+ | {{\Spoiler}} | ||
− | |||
− | |||
+ | <span style="font-size: 110%; font-weight: bold;">Twierdzenie F49</span><br/> | ||
+ | Niech <math>f(x)</math> będzie funkcją klasy <math>C^0</math> w przedziale <math>[a, b]</math> i klasy <math>C^r</math> (gdzie <math>r \geqslant 1</math>) w przedziale <math>(a, b)</math>. Funkcja <math>f(x)</math> jest klasy <math>C^r</math> w przedziale <math>[a, b]</math> wtedy i tylko wtedy, gdy istnieją skończone granice jednostronne pochodnych <math>f^{(i)} (x)</math>, dla <math>i = 1, \ldots r</math>, na krańcach przedziału <math>(a, b)</math>. | ||
− | + | {{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}} | |
− | + | <math>\Large{\Longrightarrow}</math> | |
− | + | Z założenia funkcja <math>f(x)</math> jest klasy <math>C^r</math> w przedziale <math>[a, b]</math>, zatem funkcje <math>f^{(i)} (x)</math>, gdzie <math>i = 0, 1, \ldots r</math>, są ciągłe w przedziale <math>[a, b]</math>. Wynika stąd natychmiast, że istnieją skończone granice jednostronne funkcji <math>f^{(i)} (x)</math>, dla <math>i = 1, \ldots r</math>, na krańcach przedziału <math>(a, b)</math>. | |
+ | <math>\Large{\Longleftarrow}</math> | ||
− | + | Indukcja matematyczna. Z twierdzenia F48 wiemy, że twierdzenie jest prawdziwe dla <math>r = 1</math>. Pokażemy, że z założenia prawdziwości twierdzenia dla <math>r - 1</math> wynika prawdziwość twierdzenia dla <math>r</math>. | |
− | + | Wypiszmy jawnie założenie indukcyjne i tezę indukcyjną, co ułatwi nam uchwycenie problemu. | |
+ | Założenie indukcyjne: | ||
− | + | Jeżeli <math>f(x)</math> jest funkcją klasy <math>C^{r - 1}</math> w przedziale <math>(a, b)</math> i klasy <math>C^0</math> w przedziale <math>[a, b]</math> oraz istnieją skończone granice jednostronne pochodnych <math>f^{(i)} (x)</math>, dla <math>i = 1, \ldots r - 1</math>, na krańcach przedziału <math>(a, b)</math>, to funkcja <math>f(x)</math> jest klasy <math>C^{r - 1}</math> w przedziale <math>[a, b]</math>. | |
− | : | + | Teza indukcyjna: |
+ | Jeżeli <math>g(x)</math> jest funkcją klasy <math>C^r</math> w przedziale <math>(a, b)</math> i klasy <math>C^0</math> | ||
+ | w przedziale <math>[a, b]</math> oraz istnieją skończone granice jednostronne pochodnych <math>g^{(i)} (x)</math>, dla <math>i = 1, \ldots r</math>, na krańcach przedziału <math>(a, b)</math>, to funkcja <math>g(x)</math> jest klasy <math>C^r</math> w przedziale <math>[a, b]</math>. | ||
− | + | Dowód indukcyjny: | |
− | + | Z założeń uczynionych w tezie indukcyjnej wynika, że funkcja <math>g(x)</math> spełnia wszystkie warunki założenia indukcyjnego. Zatem na mocy założenia indukcyjnego funkcja <math>g(x)</math> jest klasy <math>C^{r - 1}</math> w przedziale <math>[a, b]</math>. | |
+ | Jeśli tak, to <math>g^{(r - 1)} (x)</math> jest funkcją ciągłą w przedziale <math>[a, b]</math>. Jednocześnie z tezy indukcyjnej wiemy, że <math>g^{(r)} (x)</math> jest funkcją ciągłą w przedziale <math>(a, b)</math> oraz istnieją skończone granice jednostronne <math>g^{(r)} (a^+)</math> i <math>g^{(r)} (b^-)</math>. | ||
− | + | Zatem z twierdzenia F48 zastosowanego do funkcji <math>g^{(r - 1)} (x)</math> i <math>g^{(r)} (x)</math> wynika, że funkcja <math>g^{(r)} (x)</math> jest funkcją ciągłą w przedziale <math>[a, b]</math>. Co oznacza, że funkcja <math>g(x)</math> jest klasy <math>C^r</math> w przedziale <math>[a, b]</math>. | |
− | + | Co kończy dowód indukcyjny.<br/> | |
+ | □ | ||
+ | {{\Spoiler}} | ||
− | |||
+ | <span style="font-size: 110%; font-weight: bold;">Twierdzenie F50</span><br/> | ||
+ | Funkcja <math>f(x)</math> jest kawałkami ciągła w przedziale <math>[a, b]</math> wtedy i tylko wtedy, gdy istnieje skończona liczba punktów <math>a = x_1 < x_2 < \ldots < x_n = b</math> takich, że | ||
+ | :* funkcja <math>f(x)</math> jest ciągła w każdym przedziale <math>(x_k, x_{k + 1})</math> | ||
+ | :* funkcja <math>f(x)</math> może być przedłużona do funkcji ciągłej w <math>[x_k, x_{k + 1}]</math>. | ||
+ | {{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}} | ||
+ | <math>\Large{\Longrightarrow}</math> | ||
+ | Z założenia funkcja <math>f(x)</math> jest kawałkami ciągła w <math>[a, b]</math>, zatem istnieje skończona liczba punktów <math>a = x_1 < x_2 < \ldots < x_n = b</math> takich, że funkcja <math>f(x)</math> jest ciągła w każdym przedziale <math>(x_k, x_{k + 1})</math> oraz istnieją skończone granice na krańcach każdego z przedziałów <math>(x_k, x_{k + 1})</math>. Z twierdzenia F47 wynika natychmiast, że <math>f(x)</math> może być przedłużona do funkcji ciągłej w każdym przedziale <math>[x_k, x_{k + 1}]</math>. | ||
− | + | <math>\Large{\Longleftarrow}</math> | |
− | < | + | Z założenia istnieje skończona liczba punktów <math>a = x_1 < x_2 < \ldots < x_n = b</math> takich, że funkcja <math>f(x)</math> jest ciągła w każdym przedziale <math>(x_k, x_{k + 1})</math> oraz istnieje przedłużenie funkcji <math>f(x)</math> do funkcji ciągłej w przedziale <math>[x_k, x_{k + 1}]</math>. Z twierdzenia F47 wynika natychmiast, że istnieją skończone granice funkcji <math>f(x)</math> na krańcach każdego przedziału <math>(x_k, x_{k + 1})</math>.<br/> |
− | + | □ | |
− | + | {{\Spoiler}} | |
− | |||
− | |||
− | |||
− | ::<math> | + | <span style="font-size: 110%; font-weight: bold;">Twierdzenie F51</span><br/> |
+ | Niech <math>r \in \mathbb{N}_0</math>. Funkcja <math>f(x)</math> jest kawałkami klasy <math>C^r</math> w przedziale <math>[a, b]</math> wtedy i tylko wtedy, gdy istnieje skończona liczba punktów <math>a = x_1 < x_2 < \ldots < x_n = b</math> takich, że | ||
− | : | + | :* funkcja <math>f(x)</math> jest klasy <math>C^r</math> w każdym przedziale <math>(x_k, x_{k + 1})</math> |
− | + | :* funkcja <math>f(x)</math> może być przedłużona do funkcji klasy <math>C^r</math> w każdym przedziale <math>[x_k, x_{k + 1}]</math>. | |
− | |||
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}} | {{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | Przypadek <math>r = 0</math> już udowodniliśmy (zobacz twierdzenie F50). Zatem będziemy dowodzili to twierdzenie dla <math>r \geqslant 1</math>. | ||
− | + | <math>\Large{\Longrightarrow}</math> | |
− | + | Z założenia funkcja <math>f(x)</math> jest kawałkami klasy <math>C^r</math> w <math>[a, b]</math>, zatem istnieje skończona liczba punktów <math>a = x_1 < x_2 < \ldots < x_n = b</math> wyznaczających podział przedziału <math>[a, b]</math> w taki sposób, że funkcje <math>f^{(i)} (x)</math>, dla <math>i = 0, 1, \ldots r</math>, są ciągłe w każdym przedziale <math>(x_k, x_{k + 1})</math>. Oznacza to, że funkcja <math>f(x)</math> jest klasy <math>C^r</math> w każdym przedziale <math>(x_k, x_{k + 1})</math>. Ponadto istnieją skończone granice jednostronne funkcji <math>f^{(i)} (x)</math>, dla <math>i = 0, 1, \ldots r</math>, na krańcach każdego z przedziałów <math>(x_k, x_{k + 1})</math>. | |
− | + | Niech <math>(x_k, x_{k + 1})</math> będzie dowolnie wybranym przedziałem. Z twierdzenia F47 wynika natychmiast, że funkcja <math>f(x)</math>, z założenia ciągła w przedziale <math>(x_k, x_{k + 1})</math>, może być przedłużona do funkcji <math>\tilde{f} | |
+ | (x)</math> ciągłej w przedziale <math>[x_k, x_{k + 1}]</math>. Konsekwentnie będą istniały kolejne pochodne funkcji <math>\tilde{f} (x)</math>, czyli funkcje <math>\tilde{f}^{(i)} (x)</math>, dla <math>i = 1, \ldots r</math>. Spełniony jest przy tym oczywisty związek | ||
− | + | ::<math>\tilde{f}^{(i)} (x) = f^{(i)} (x)</math> | |
+ | dla <math>x \in (x_k, x_{k + 1})</math> oraz <math>i = 0, 1, \ldots r</math>. | ||
− | + | Wynika stąd, że funkcja <math>\tilde{f} (x)</math> jest klasy <math>C^0</math> w przedziale <math>[x_k, x_{k + 1}]</math> i klasy <math>C^r</math> w przedziale <math>(x_k, x_{k + 1})</math> oraz istnieją skończone granice jednostronne funkcji <math>\tilde{f}^{(i)} (x)</math>, dla <math>i = 0, 1, \ldots r</math>, na krańcach przedziału <math>(x_k, x_{k + 1})</math>. Z twierdzenia F49 otrzymujemy, że <math>\tilde{f} (x)</math> jest klasy <math>C^r</math> w przedziale <math>[x_k, x_{k + 1}]</math>. Zatem funkcja <math>\tilde{f} (x)</math> jest poszukiwanym przedłużeniem funkcji <math>f(x)</math>. | |
− | + | <math>\Large{\Longleftarrow}</math> | |
− | + | Z założenia istnieje skończona liczba punktów <math>a = x_1 < x_2 < \ldots < x_n = b</math> takich, że funkcja <math>f(x)</math> jest klasy <math>C^r</math> w każdym przedziale <math>(x_k, x_{k + 1})</math>, zatem | |
− | + | ● funkcja <math>f(x)</math> jest zdefiniowana i ciągła w każdym przedziale <math>(x_k, x_{k + 1})</math> | |
− | + | ● pochodne <math>f^{(i)} (x)</math>, dla <math>i = 1, \ldots r</math>, istnieją i są ciągłe w każdym przedziale <math>(x_k, x_{k + 1})</math> | |
− | + | Niech <math>(x_k, x_{k + 1})</math> będzie dowolnie wybranym przedziałem. Z założenia istnieje przedłużenie funkcji <math>f(x)</math> klasy <math>C^r</math> w przedziale <math>(x_k, x_{k + 1})</math> do funkcji <math>\tilde{f} (x)</math> klasy <math>C^r</math> w przedziale <math>[x_k, x_{k + 1}]</math>. Wynika stąd, że istnieją skończone granice jednostronne <math>\tilde{f}^{(i)} (x^+_k)</math> oraz <math>\tilde{f}^{(i)} (x^-_{k + 1})</math>. Ponieważ spełniony jest przy tym oczywisty związek | |
− | ::<math> | + | ::<math>\tilde{f}^{(i)} (x) = f^{(i)} (x)</math> |
− | + | dla <math>x \in (x_k, x_{k + 1})</math> oraz <math>i = 0, 1, \ldots r</math>, to granice te są identyczne z granicami <math>f^{(i)} (x^+_k)</math> oraz <math>f^{(i)} (x^-_{k + 1})</math>. Zatem | |
− | + | ● granice <math>f^{(i)} (x^+_k)</math> oraz <math>f^{(i)} (x^-_{k + 1})</math> istnieją i są skończone | |
− | + | Z zaznaczonych punktów wynika natychmiast, że funkcja <math>f(x)</math> jest kawałkami klasy <math>C^r</math> w <math>[a, b]</math>. Co należało pokazać.<br/> | |
□ | □ | ||
{{\Spoiler}} | {{\Spoiler}} | ||
Linia 2091: | Linia 1777: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | === <span style="border-bottom:1px solid #000;">Jeszcze o błędzie metody Simpsona</span> === | |
− | + | | |
− | + | <span style="font-size: 110%; font-weight: bold;">Uwaga F52</span><br/> | |
+ | Chcemy wyjaśnić, dlaczego dowodząc twierdzenie F14, wybraliśmy funkcję postaci | ||
− | ::<math> | + | ::<math>W(x) = \left\{ \begin{array}{lll} |
+ | {\large\frac{1}{12}} (x - a)^3 (3 x - a - 2 b) & & a \leqslant x \leqslant c\\ | ||
+ | {\large\frac{1}{12}} (x - b)^3 (3 x - 2 a - b) & & c \leqslant x \leqslant b | ||
+ | \end{array} \right.</math> | ||
− | + | gdzie <math>c = {\small\frac{1}{2}} (a + b)</math>. | |
− | + | Znając postać funkcji, mogliśmy pozwolić sobie na wykonanie kolejnych kroków przez różniczkowanie. Pozwoliło to skrócić i uprościć cały dowód. Chcąc zrozumieć metodę i zbadać, czy istnieje możliwość uogólnienia, będziemy tym razem postępowali odwrotnie i kolejno wyliczali całki. | |
− | |||
− | |||
− | + | <span style="font-size: 110%; font-weight: bold;">Uwaga F53</span><br/> | |
− | + | Dla uproszczenia zapisu parę funkcji: <math>g_1 (x)</math> określoną w przedziale <math>[a, c]</math> oraz <math>g_2 (x)</math> określoną w przedziale <math>[c, b]</math>, gdzie <math>c = {\small\frac{1}{2}} (a + b)</math>, będziemy oznaczali jako <math>f(x) = \{ g_1 (x) |g_2 (x) \}</math>. Czytelnika nie powinien niepokoić fakt, że funkcja <math>f(x)</math> nie jest określona w punkcie <math>x = c</math>, bo zawsze możemy przyjąć <math>f(c) = {\small\frac{1}{2}} (g_1 (c) + g_2 (c))</math>. Lepiej traktować <math>\{ g_1 (x) |g_2 (x) \}</math> jako parę funkcji, której ciągłość w punkcie <math>x = c</math> ma dla nas istotne znaczenie, a jedynie dla wygody zapisu oznaczamy ją jako <math>f(x) = \{ g_1 (x) |g_2 (x) \}</math>. | |
− | |||
− | |||
− | ::< | + | <span style="font-size: 110%; font-weight: bold;">Twierdzenie F54</span><br/> |
+ | Niżej wypisany ciąg funkcji | ||
− | + | ::{| class="wikitable plainlinks" style="font-size: 100%; text-align: center; margin-right: auto;" | |
+ | |- style=height:3em | ||
+ | ! <math>n</math> || <math>W_n (x) = \{ U_n (x) \big\rvert V_n (x) \}</math> || <math>U_n (a)</math> || <math>U_n (c)</math> || <math>V_n (c)</math> || <math>V_n (b)</math> | ||
+ | |- style=height:3em | ||
+ | | <math>1</math> || <math>\{ 6 x - 5 a - b \big\rvert 6 x - a - 5 b \}</math> || <math>- (b - a)</math> || <math>2 (b - a)</math> || <math>- 2 (b - a)</math> || <math>b - a</math> | ||
+ | |- style=height:3em | ||
+ | | <math>2</math> || <math>\{ (x - a) (3 x - 2 a - b) \big\rvert (x - b) (3 x - a - 2 b) \}</math> || <math>0</math> || <math>{\small\frac{(b - a)^2}{4}}</math> || <math>{\small\frac{(b - a)^2}{4}}</math> || <math>0</math> | ||
+ | |- style=height:3em | ||
+ | | <math>3</math> || <math>\left\{ {\small\frac{1}{2}} (x - a)^2 (2 x - a - b) \biggr\rvert {\small\frac{1}{2}} (x - b)^2 (2 x - a - b) \right\}</math> || <math>0</math> || <math>0</math> || <math>0</math> || <math>0</math> | ||
+ | |- style=height:3em | ||
+ | | <math>4</math> || <math>\left\{ {\small\frac{1}{12}} (x - a)^3 (3 x - a - 2 b) \biggr\rvert {\small\frac{1}{12}} (x - b)^3 (3 x - 2 a - b) \right\}</math> || <math>0</math> || <math>- {\small\frac{(b - a)^4}{192}}</math> || <math>- {\small\frac{(b - a)^4}{192}}</math> || <math>0</math> | ||
+ | |- style=height:3em | ||
+ | | <math>5</math> || <math>\left\{ {\small\frac{1}{120}} (x - a)^4 (6 x - a - 5 b) \biggr\rvert {\small\frac{1}{120}} (x - b)^4 (6 x - 5 a - b) \right\}</math> || <math>0</math> || <math>- {\small\frac{(b - a)^5}{960}}</math> || <math>{\small\frac{(b - a)^5}{960}}</math> || <math>0</math> | ||
+ | |} | ||
− | |||
− | + | uzyskaliśmy, stosując następujące zasady: | |
− | + | 1) każda kolejna funkcja jest całką poprzedniej, czyli dla <math>n \geqslant 2</math> jest | |
− | + | ::<math>U_{n} (x) = \int U_{n-1} (x) d x + K</math> | |
− | ::<math> | + | ::<math>V_{n} (x) = \int V_{n-1} (x) d x + L</math> |
− | + | 2) stałe całkowania <math>K, L</math> zostały wybrane tak, aby dla <math>n \geqslant 2</math> spełniony był warunek | |
− | ::<math> | + | ::<math>U_{n} (a) = V_{n} (b) = 0</math> |
− | |||
− | |||
− | + | <span style="font-size: 110%; font-weight: bold;">Twierdzenie F55</span><br/> | |
+ | Jeżeli funkcja <math>f(x)</math> jest klasy <math>C^1([a, b])</math>, to | ||
− | ::<math> | + | ::<math>\int^b_a f (x) d x = {\small\frac{b - a}{6}} \cdot [f (a) + 4 f (c) + f (b)] - {\small\frac{1}{6}} \int^b_a f' (x) W_1 (x) d x</math> |
+ | gdzie <math>c = {\small\frac{1}{2}} (a + b)</math>. | ||
+ | {{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}} | ||
+ | Ponieważ funkcja | ||
− | + | ::<math>W_1 (x) = \{ 6 x - 5 a - b| 6 x - a - 5 b \}</math> | |
− | + | jest nieciągła w punkcie <math>x = c = {\small\frac{1}{2}} (a + b)</math>, to musimy całkować osobno dla <math>x \in [a, c]</math> i dla <math>x \in [c, b]</math> | |
− | + | ::<math>\int^b_a f' (x) W_1 (x) d x = \int^c_a f' (x) U_1 (x) d x + \int^b_c f' (x) V_1 (x) d x</math> | |
− | + | Mamy | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | ::<math> | + | ::<math>\int^c_a f' (x) U_1 (x) d x = f (x) \cdot U_1 (x) \biggr\rvert_{a}^{c} - \int^c_a f (x) U_1' (x) d x</math> |
+ | :::::::<math>\;\; = f (c) \cdot U_1 (c) - f (a) U_1 (a) - 6 \int^c_a f (x) d x</math> | ||
+ | :::::::<math>\;\; = 2 (b - a) f (c) + (b - a) f (a) - 6 \int^c_a f (x) d x</math> | ||
− | + | :::::::<math>\;\; = (b - a) [2 f (c) + f (a)] - 6 \int^c_a f (x) d x</math> | |
− | |||
− | |||
− | ::<math> | + | ::<math>\int^b_c f' (x) V_1 (x) d x = f (x) \cdot V_1 (x) \biggr\rvert_{c}^{b} - \int^b_c f (x) V_1' (x) d x</math> |
− | + | :::::::<math>\;\: = f (b) \cdot V_1 (b) - f (c) V_1 (c) - 6 \int^b_c f (x) d x</math> | |
− | ::<math> | + | :::::::<math>\;\: = (b - a) f (b) + 2 (b - a) f (c) - 6 \int^b_c f (x) d x</math> |
− | + | :::::::<math>\;\: = (b - a) [f (b) + 2 f (c)] - 6 \int^b_c f (x) d x</math> | |
− | |||
Zatem | Zatem | ||
− | ::<math> | + | ::<math>\int^b_a f' (x) W_1 (x) d x = (b - a) [f (a) + 4 f (c) + f (b)] - 6 \int^b_a f (x) d x</math> |
− | + | Skąd otrzymujemy natychmiast | |
− | ::<math> | + | ::<math>\int^b_a f (x) d x = {\small\frac{b - a}{6}} \cdot [f (a) + 4 f (c) + f (b)] - {\small\frac{1}{6}} \int^b_a f' (x) W_1 (x) d x</math> |
− | + | Co należało pokazać.<br/> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
□ | □ | ||
{{\Spoiler}} | {{\Spoiler}} | ||
Linia 2223: | Linia 1889: | ||
− | <span style="font-size: 110%; font-weight: bold;">Uwaga | + | <span style="font-size: 110%; font-weight: bold;">Uwaga F56</span><br/> |
− | + | Postać funkcji <math>W_1 (x) = \{ 6 x - 5 a - b| 6 x - a - 5 b \}</math> wynika z nałożenia na postać ogólną | |
− | ::<math> | + | ::<math>W_1 (x) = \{ U_1 (x) |V_1 (x) \} = \{ r x + s|t x + u \}</math> |
− | + | następujących warunków: | |
− | + | * funkcja <math>W_2 (x) = \int W_1 (x) d x + C</math> ma być równa zero w punktach <math>x = a</math> oraz <math>x = b</math>, skąd otrzymujemy | |
− | + | ::<math>W_2 (x) = \left\{ {\small\frac{1}{2}} (x - a) (r x + a r + 2 s) \biggr\rvert {\small\frac{1}{2}} (x - b)(t x + b t + 2 u) \right\}</math> | |
− | + | * funkcja <math>W_2 (x)</math> musi być ciągła w punkcie <math>x = c = {\small\frac{a + b}{2}}</math>, skąd dostajemy równanie <math>U_2 (c) = V_2 (c)</math>, z którego, po podstawieniu <math>c = {\small\frac{a + b}{2}}</math> i łatwym uproszczeniu, mamy | |
− | ::<math> | + | ::<math>3 r a + 3 t b + r b + t a + 4 s + 4 u = 0</math> |
+ | * w twierdzeniu F55 musi pojawić się wyraz <math>{\small\frac{b - a}{6}} \cdot [f (a) + 4 f (c) + f (b)]</math>, skąd otrzymujemy równania | ||
− | + | ::<math>U_1 (a) = - (b - a)</math> | |
− | + | ::<math>V_1 (b) = b - a</math> | |
− | + | ::<math>U_1 (c) - V_1 (c) = 4 (b - a)</math> | |
− | + | Zbierając: liczby <math>r, s, t, u</math> muszą spełniać układ równań | |
− | |||
− | |||
+ | ::<math>\left\{ \begin{array}{l} | ||
+ | r a + s = - (b - a)\\ | ||
+ | t b + u = b - a\\ | ||
+ | r c + s - (t c + u) = 4 (b - a)\\ | ||
+ | 3 r a + 3 t b + r b + t a + 4 s + 4 u = 0 | ||
+ | \end{array} \right.</math> | ||
− | |||
− | + | Mnożąc pierwsze i drugie równanie przez <math>(- 4)</math>, dodając je do siebie, a następnie dodając sumę do równania czwartego, otrzymujemy | |
+ | ::<math>(- 4 r a - 4 s - 4 t b - 4 u) + (3 r a + 3 t b + b r + a t + 4 s + 4 u) = 0</math> | ||
− | + | czyli | |
− | + | ::<math>(b - a) (r - t) = 0</math> | |
− | + | Z założenia jest <math>b \neq a</math>, zatem musi być <math>r = t</math>. | |
+ | Odejmując od drugiego równania pierwsze i dodając różnicę do trzeciego, mamy | ||
+ | ::<math>(r b + u - r a - s) + (s - u) = 6 (b - a)</math> | ||
+ | Skąd otrzymujemy <math>r = t = 6</math>. Teraz już łatwo znajdujemy <math>s = - 5 a - b</math> oraz <math>u = - a - 5 b</math>. | ||
+ | Widzimy, że przez odpowiedni dobór wartości liczb <math>r, s, t, u</math> mogliśmy zapewnić ciągłość funkcji <math>W_2 (x)</math>. Fakt, że ciągłe są również funkcje <math>W_3 (x)</math> i <math>W_4 (x)</math> jest szczęśliwym przypadkiem. Ponieważ funkcja <math>W_5 (x)</math> nie jest ciągła, to nie mogliśmy jej wykorzystać w twierdzeniu F14. Wybór funkcji | ||
+ | ::<math>W_4 (x) = \left\{ {\small\frac{1}{12}} (x - a)^3 (3 x - a - 2 b) \biggr\rvert {\small\frac{1}{12}} (x - b)^3 (3 x - 2 a - b) \right\}</math> | ||
+ | zapewnił uzyskanie najdokładniejszego oszacowania błędu. | ||
Linia 2277: | Linia 1954: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | == Przypisy == | |
+ | <references> | ||
− | <ref name=" | + | <ref name="PiecewiseContFun">ang. ''piecewise continuous function''</ref> |
− | <ref name=" | + | <ref name="PiecewiseSmoothFun">ang. ''piecewise <math>C^1</math> function'' lub ''piecewise smooth function''</ref> |
− | <ref name=" | + | <ref name="HeavisideStepFun">Wikipedia, ''Funkcja skokowa Heaviside’a'', ([https://pl.wikipedia.org/wiki/Funkcja_skokowa_Heaviside%E2%80%99a Wiki-pl]), ([https://en.wikipedia.org/wiki/Heaviside_step_function Wiki-en])</ref> |
− | <ref name=" | + | <ref name="TalvilaWiersma">E. Talvila and M. Wiersma, ''Simple Derivation of Basic Quadrature Formulas'', Atlantic Electronic Journal of Mathematics, Volume 5, Number 1, Winter 2012, ([https://arxiv.org/abs/1202.0249 LINK])</ref> |
− | <ref name=" | + | <ref name="SinusCalkowy1">Wikipedia, ''Sinus i cosinus całkowy'', ([https://pl.wikipedia.org/wiki/Sinus_i_cosinus_ca%C5%82kowy Wiki-pl]), ([https://en.wikipedia.org/wiki/Trigonometric_integral Wiki-en])</ref> |
− | <ref name=" | + | <ref name="SinusCalkowy2">MathWorld, ''Sine Integral'', ([https://mathworld.wolfram.com/SineIntegral.html MathWorld])</ref> |
− | <ref name=" | + | <ref name="SinusCalkowy3">WolframAlpha, ''Sine integral function'', ([https://www.wolframalpha.com/input?i=Sine+integral+function WolframAlpha])</ref> |
− | <ref name=" | + | <ref name="DifferentiableFun1">Wikipedia, ''Funkcja różniczkowalna'', ([https://pl.wikipedia.org/wiki/Funkcja_r%C3%B3%C5%BCniczkowalna Wiki-pl]), ([https://en.wikipedia.org/wiki/Differentiable_function Wiki-en])</ref> |
− | <ref name=" | + | <ref name="Weierstrass1">Twierdzenie Weierstrassa: Jeżeli funkcja <math>f(x)</math> określona w przedziale domkniętym jest ciągła, to jest w nim ograniczona. ([https://pl.wikipedia.org/wiki/Twierdzenie_Bolzana-Weierstrassa#Wniosek:_twierdzenie_Weierstrassa Wiki-pl]), ([https://en.wikipedia.org/wiki/Extreme_value_theorem Wiki-en])</ref> |
− | |||
− | |||
</references> | </references> |
Aktualna wersja na dzień 12:25, 26 mar 2023
Funkcje kawałkami klasy [math]\displaystyle{ C^n }[/math]
Uwaga F1
Czytelnik może pominąć ten temat przy pierwszym czytaniu i powrócić do niego, gdy uzna, że potrzebuje bardziej precyzyjnego ujęcia omawianych tu problemów. Z pojęcia funkcji kawałkami klasy [math]\displaystyle{ C^n }[/math] będziemy korzystali bardzo rzadko i jeśli Czytelnik chciałby jedynie poznać metodę Simpsona przybliżonego obliczania całek, to nie musi tracić czasu na zapoznawanie się z tym tematem.
Definicja F2
Funkcja [math]\displaystyle{ f(x) }[/math] jest kawałkami klasy [math]\displaystyle{ C^0 }[/math] (lub kawałkami ciągła[1]) w przedziale [math]\displaystyle{ [a, b] }[/math], jeżeli jest ona zdefiniowana i ciągła wszędzie poza skończoną liczbą punktów [math]\displaystyle{ x_k \in \left[ a, b \right]. }[/math] Przy czym w każdym z punktów [math]\displaystyle{ x_k }[/math] istnieją skończone granice jednostronne [math]\displaystyle{ \lim_{x \to x^-_k} f (x) }[/math] oraz [math]\displaystyle{ \lim_{x \to x^+_k} f (x) }[/math]. W przypadku, gdy [math]\displaystyle{ x_k = a }[/math] musi istnieć skończona granica prawostronna, a w przypadku, gdy [math]\displaystyle{ x_k = b }[/math] musi istnieć granica lewostronna.
Zadanie F3
Niech
- [math]\displaystyle{ f(x) = \left\{ \begin{array}{rcc} a & & x = - 5\\ - x & & - 5 \lt x \lt 0\\ b & & x = 0\\ x & & 0 \lt x \lt 5\\ c & & x = 5 \end{array} \right. }[/math]
Zbadać, dla jakich wartości liczb [math]\displaystyle{ a, b, c }[/math]
- funkcja [math]\displaystyle{ f(x) }[/math] jest klasy [math]\displaystyle{ C^0 ([- 5, 5]) }[/math]
- funkcja [math]\displaystyle{ f(x) }[/math] jest kawałkami klasy [math]\displaystyle{ C^0 ([- 5, 5]) }[/math]
Ponieważ
- [math]\displaystyle{ \lim_{x \to - 5^+} f (x) = - 5 }[/math]
- [math]\displaystyle{ \lim_{x \to 0^-} f (x) = 0 }[/math]
- [math]\displaystyle{ \lim_{x \to 0^+} f (x) = 0 }[/math]
- [math]\displaystyle{ \lim_{x \to 5^-} f (x) = 5 }[/math]
to tylko dla wartości [math]\displaystyle{ a = - 5 }[/math], [math]\displaystyle{ b = 0 }[/math], [math]\displaystyle{ c = 5 }[/math] funkcja [math]\displaystyle{ f(x) }[/math] jest ciągła w przedziale [math]\displaystyle{ [a, b] }[/math]. Ale wybór liczb [math]\displaystyle{ a, b, c }[/math] nie ma żadnego wpływu na to, czy funkcja [math]\displaystyle{ f(x) }[/math] jest kawałkami ciągła w przedziale [math]\displaystyle{ [a, b] }[/math]. W przypadku, gdy [math]\displaystyle{ b = 0 }[/math] i [math]\displaystyle{ a \neq - 5 }[/math] funkcja [math]\displaystyle{ f(x) }[/math] będzie (w jednym kawałku) kawałkami ciągła, ale nie będzie funkcją ciągłą. W przypadku, gdy [math]\displaystyle{ b \neq 0 }[/math] funkcja [math]\displaystyle{ f(x) }[/math] będzie (w dwóch kawałkach) kawałkami klasy [math]\displaystyle{ C^0 ([a, b]) }[/math]. Nawet gdyby wartości funkcji [math]\displaystyle{ f(x) }[/math] były nieokreślone w punktach [math]\displaystyle{ a, b, c }[/math], to i tak funkcja [math]\displaystyle{ f(x) }[/math] byłaby kawałkami klasy [math]\displaystyle{ C^0 ([a, b]) }[/math].
□
Zadanie F4
Pokazać, że funkcje [math]\displaystyle{ {\small\frac{1}{x}} }[/math] oraz [math]\displaystyle{ \sin \! \left( {\small\frac{1}{x}} \right) }[/math] nie są kawałkami klasy [math]\displaystyle{ C^0 ([- 5, 5]) }[/math].
Definicja F5
Funkcja [math]\displaystyle{ f(x) }[/math] jest kawałkami klasy [math]\displaystyle{ C^1 }[/math][2] w przedziale [math]\displaystyle{ [a, b] }[/math], jeżeli jest ona kawałkami ciągła w [math]\displaystyle{ [a, b] }[/math], a jej pochodna [math]\displaystyle{ f' (x) }[/math] istnieje i jest kawałkami ciągła w [math]\displaystyle{ [a, b] }[/math].
Oznacza to, że musi istnieć skończona liczba punktów [math]\displaystyle{ a = x_1 \lt x_2 \lt \ldots \lt x_n = b }[/math] wyznaczających podział przedziału [math]\displaystyle{ [a, b] }[/math] w taki sposób, że
- funkcja [math]\displaystyle{ f(x) }[/math] jest zdefiniowana i ciągła w każdym przedziale [math]\displaystyle{ (x_k, x_{k + 1}) }[/math]
- pochodna [math]\displaystyle{ f' (x) }[/math] istnieje i jest ciągła w każdym przedziale [math]\displaystyle{ (x_k, x_{k + 1}) }[/math]
- istnieją skończone granice jednostronne funkcji [math]\displaystyle{ f(x) }[/math] i [math]\displaystyle{ f' (x) }[/math] na krańcach każdego z przedziałów [math]\displaystyle{ (x_k, x_{k + 1}) }[/math]
Definicja F6
Niech [math]\displaystyle{ r \in \mathbb{Z}_+ }[/math]. Funkcja [math]\displaystyle{ f(x) }[/math] jest kawałkami klasy [math]\displaystyle{ C^r }[/math] w przedziale [math]\displaystyle{ [a, b] }[/math], jeżeli jest ona kawałkami ciągła w [math]\displaystyle{ [a, b] }[/math], a jej pochodne [math]\displaystyle{ f^{(i)} (x) }[/math], gdzie [math]\displaystyle{ i = 1, \ldots, r }[/math] istnieją i są kawałkami ciągłe w [math]\displaystyle{ [a, b] }[/math].
Oznacza to, że musi istnieć skończona liczba punktów [math]\displaystyle{ a = x_1 \lt x_2 \lt \ldots \lt x_n = b }[/math] wyznaczających podział przedziału [math]\displaystyle{ [a, b] }[/math] w taki sposób, że
- funkcja [math]\displaystyle{ f(x) }[/math] jest zdefiniowana i ciągła w każdym przedziale [math]\displaystyle{ (x_k, x_{k + 1}) }[/math]
- pochodne [math]\displaystyle{ f^{(i)} (x) }[/math], gdzie [math]\displaystyle{ i = 1, \ldots, r }[/math], istnieją i są ciągłe w każdym przedziale [math]\displaystyle{ (x_k, x_{k + 1}) }[/math]
- istnieją skończone granice jednostronne funkcji [math]\displaystyle{ f^{(i)} (x) }[/math], gdzie [math]\displaystyle{ i = 0, 1, \ldots, r }[/math], na krańcach każdego z przedziałów [math]\displaystyle{ (x_k, x_{k + 1}) }[/math]
Definicja F7
Funkcja [math]\displaystyle{ f(x) }[/math] jest kawałkami klasy [math]\displaystyle{ C^r }[/math] w [math]\displaystyle{ \mathbb{R} }[/math], jeśli jest ona kawałkami klasy [math]\displaystyle{ C^r }[/math] w każdym ograniczonym przedziale [math]\displaystyle{ [a, b] \subset \mathbb{R} }[/math].
Przykład F8
Rozważmy funkcję
- [math]\displaystyle{ f(x) = \left\{ \begin{array}{ccc} 0 & & - 5 \leqslant x \lt 0\\ 1 & & 0 \lt x \leqslant 5 \end{array} \right. }[/math]
Celowo nie określiliśmy wartości funkcji [math]\displaystyle{ f(x) }[/math] w punkcie [math]\displaystyle{ x = 0 }[/math]. Ponieważ
- [math]\displaystyle{ \lim_{x \to - 5^+} f (x) = \lim_{x \to 0^-} f (x) = 0 }[/math]
- [math]\displaystyle{ \lim_{x \to 0^+} f (x) = \lim_{x \to 5^-} f (x) = 1 }[/math]
zatem spełnione są warunki definicji F1 i funkcja [math]\displaystyle{ f(x) }[/math] jest kawałkami ciągła (kawałkami klasy [math]\displaystyle{ C^0 }[/math]). Zauważmy, że funkcja ta jest funkcją skokową Heaviside'a[3] [math]\displaystyle{ H(x) }[/math] obciętą do przedziału [math]\displaystyle{ [- 5, 5] }[/math].
- [math]\displaystyle{ H(x) = \left\{ \begin{array}{ccc} 0 & & x \lt 0\\ 1 & & x \geqslant 1 \end{array} \right. }[/math]
Warto zauważyć, że wartość funkcji Heaviside'a w [math]\displaystyle{ x = 0 }[/math] nie jest ustalona. Niekiedy podaje się [math]\displaystyle{ H(0) = 0 }[/math], a czasami [math]\displaystyle{ H(0) = {\small\frac{1}{2}} }[/math]. Oczywiście funkcja Heaviside'a jest kawałkami klasy [math]\displaystyle{ C^0(\mathbb{R}) }[/math]. Przyjmując [math]\displaystyle{ H(0) = 1 }[/math], policzmy pochodne jednostronne funkcji [math]\displaystyle{ H(x) }[/math] w [math]\displaystyle{ x = 0 }[/math]
- [math]\displaystyle{ \lim_{h \to 0^-} {\small\frac{H (0 + h) - H (0)}{h}} = \lim_{h \to 0^-} {\small\frac{0 - 1}{h}} = - \lim_{h \to 0^-} {\small\frac{1}{h}} = + \infty }[/math]
- [math]\displaystyle{ \lim_{h \to 0^+} {\small\frac{H (0 + h) - H (0)}{h}} = \lim_{h \to 0^+} {\small\frac{1 - 1}{h}} = 0 }[/math]
Czyli pochodna [math]\displaystyle{ H' (0) }[/math] nie istnieje, ale granice jednostronne pochodnej w punkcie [math]\displaystyle{ x = 0 }[/math] istnieją. Istotnie, dla [math]\displaystyle{ x \neq 0 }[/math] mamy [math]\displaystyle{ H' (x) = 0 }[/math], zatem
- [math]\displaystyle{ \lim_{x \to 0^-} H' (x) = \lim_{x \to 0^+} H' (x) = 0 }[/math]
Wynika stąd, że funkcja Heaviside'a jest kawałkami klasy [math]\displaystyle{ C^1 (\mathbb{R}) }[/math].
Zadanie F9
Pokazać, że funkcja
- [math]\displaystyle{ f(x) = \left\{ \begin{array}{ccc} x^2 \sin \! \left( \frac{1}{x} \right) & & 0 \lt | x | \leqslant 5\\ 0 & & x = 0 \end{array} \right. }[/math]
- jest klasy [math]\displaystyle{ C^0 ([- 5, 5]) }[/math]
- jest różniczkowalna w całym przedziale [math]\displaystyle{ [- 5, 5] }[/math]
- nie jest klasy [math]\displaystyle{ C^1 ([- 5, 5]) }[/math]
- nie jest kawałkami klasy [math]\displaystyle{ C^1 ([- 5, 5]) }[/math]
Ponieważ
- [math]\displaystyle{ \lim_{x \to 0} f (x) = 0 }[/math]
to funkcja [math]\displaystyle{ f(x) }[/math] jest ciągła w [math]\displaystyle{ [- 5, 5] }[/math], czyli jest klasy [math]\displaystyle{ C^0 ([- 5, 5]) }[/math].
Zauważmy też, że funkcja [math]\displaystyle{ f(x) }[/math] jest różniczkowalna w punkcie [math]\displaystyle{ x = 0 }[/math]
- [math]\displaystyle{ f' (0) = \lim_{h \to 0} {\small\frac{f (h) - f (0)}{h}} = \lim_{h \to 0} \frac{h^2 \cdot \sin \! \left( \frac{1}{h} \right)}{h} = \lim_{h \to 0} h \cdot \sin \! \left( {\small\frac{1}{h}} \right) = 0 }[/math]
Ostatnia granica wynika z układu nierówności
- [math]\displaystyle{ - h \leqslant h \cdot \sin \! \left( {\small\frac{1}{h}} \right) \leqslant h }[/math]
Czyli pochodna funkcji [math]\displaystyle{ f(x) }[/math] jest równa
- [math]\displaystyle{ f' (x) = \left\{ \begin{array}{ccc} 2 x \sin \! \left( \frac{1}{x} \right) - \cos \! \left( \frac{1}{x} \right) & & 0 \lt | x | \leqslant 5\\ 0 & & x = 0 \end{array} \right. }[/math]
i istnieje dla każdego punktu [math]\displaystyle{ x \in [- 5, 5] }[/math].
Ale granice funkcji [math]\displaystyle{ f' (x) }[/math] w punkcie [math]\displaystyle{ x = 0 }[/math] nie istnieją
- [math]\displaystyle{ \lim_{x \to 0} f' (x) = \lim_{h \to 0} f' (0 + h) = \lim_{h \to 0} \left[ 2 h \sin \! \left( {\small\frac{1}{h}} \right) - \cos \! \left( {\small\frac{1}{h}} \right) \right] = - \lim_{h \to 0} \cos \left( {\small\frac{1}{h}} \right) }[/math]
Zatem pochodna funkcji [math]\displaystyle{ f(x) }[/math] nie jest ciągła w punkcie [math]\displaystyle{ x = 0 }[/math], czyli [math]\displaystyle{ f(x) }[/math] nie jest funkcją klasy [math]\displaystyle{ C^1 }[/math]. Co więcej, funkcja [math]\displaystyle{ f(x) }[/math] nie jest nawet funkcją kawałkami klasy [math]\displaystyle{ C^1 }[/math], bo granice jednostronne pochodnej [math]\displaystyle{ f' (x) }[/math] nie istnieją w punkcie [math]\displaystyle{ x = 0 }[/math].
□
Zadanie F10
Pokazać, że funkcja
- [math]\displaystyle{ f(x) = \left\{ \begin{array}{ccc} x^2 \sin \! \left( \frac{1}{x} \right) & & 0 \lt | x | \leqslant 5\\ 1 & & x = 0 \end{array} \right. }[/math]
- nie jest klasy [math]\displaystyle{ C^0 ([- 5, 5]) }[/math]
- jest kawałkami klasy [math]\displaystyle{ C^0 ([- 5, 5]) }[/math]
- nie jest kawałkami klasy [math]\displaystyle{ C^1 ([- 5, 5]) }[/math]
Metoda Simpsona (parabol)
Twierdzenie F11
Jeżeli punkty [math]\displaystyle{ (- h, y_0) }[/math], [math]\displaystyle{ (0, y_1) }[/math] oraz [math]\displaystyle{ (h, y_2) }[/math] leżą na pewnej paraboli [math]\displaystyle{ g(x) }[/math], to
- [math]\displaystyle{ \int^h_{- h} g (x) d x = {\small\frac{h}{3}} (y_0 + 4 y_1 + y_2) }[/math]
Nim przejdziemy do dowodu, zilustrujemy problem rysunkiem
Z założenia funkcja [math]\displaystyle{ g(x) }[/math] jest parabolą, co oznacza, że może być zapisana w postaci
- [math]\displaystyle{ g(x) = A x^2 + B x + C }[/math]
Zatem
- [math]\displaystyle{ \int^h_{- h} g (x) d x = \int^h_{- h} (A x^2 + B x + C) d x }[/math]
- [math]\displaystyle{ \;\;\, = {\small\frac{A x^3}{3}} + {\small\frac{B x^2}{2}} + C x \biggr\rvert_{- h}^{h} }[/math]
- [math]\displaystyle{ \;\;\, = {\small\frac{2 A h^3}{3}} + 2 C h }[/math]
- [math]\displaystyle{ \;\;\, = {\small\frac{h}{3}} (2 A h^2 + 6 C) }[/math]
Z drugiej strony parabola [math]\displaystyle{ g(x) = A x^2 + B x + C }[/math] przechodzi przez punkty [math]\displaystyle{ (- h, y_0) }[/math], [math]\displaystyle{ (0, y_1) }[/math] oraz [math]\displaystyle{ (h, y_2) }[/math]. Wynika stąd, że współczynniki [math]\displaystyle{ A, B, C }[/math] muszą spełniać układ równań
- [math]\displaystyle{ y_0 = A h^2 - B h + C }[/math]
- [math]\displaystyle{ y_1 = C }[/math]
- [math]\displaystyle{ y_2 = A h^2 + B h + C }[/math]
Dodając do siebie pierwsze i trzecie równanie, otrzymujemy
- [math]\displaystyle{ y_0 + y_2 = 2 A h^2 + 2 C }[/math]
Stąd już łatwo znajdujemy, że
- [math]\displaystyle{ 2 A h^2 + 6 C = (2 A h^2 + 2 C) + 4 C = y_0 + y_2 + 4 y_1 }[/math]
Co kończy dowód.
□
Twierdzenie F12
Jeżeli punkty [math]\displaystyle{ (a, y_0) }[/math], [math]\displaystyle{ (c, y_1) }[/math] oraz [math]\displaystyle{ (b, y_2) }[/math] leżą na pewnej paraboli [math]\displaystyle{ g(x) }[/math], gdzie [math]\displaystyle{ c = a + h }[/math], [math]\displaystyle{ b = a + 2 h }[/math] i [math]\displaystyle{ h \gt 0 }[/math], to
- [math]\displaystyle{ \int^b_a g (x) d x = {\small\frac{h}{3}} (y_0 + 4 y_1 + y_2) = {\small\frac{b - a}{6}} (y_0 + 4 y_1 + y_2) }[/math]
Nim przejdziemy do dowodu, zauważmy, że w rzeczywistości twierdzenie F12 wynika z twierdzenia F11.
Istotnie, przesunięcie paraboli wzdłuż osi [math]\displaystyle{ O X }[/math] nie zmienia pola pod parabolą, zatem udowodnione wyżej twierdzenie możemy natychmiast uogólnić dla dowolnych punktów na osi [math]\displaystyle{ O X }[/math]. Dla dowolnie wybranych [math]\displaystyle{ a }[/math] oraz [math]\displaystyle{ h \gt 0 }[/math] mamy [math]\displaystyle{ c = a + h }[/math] oraz [math]\displaystyle{ b = a + 2 h }[/math]. Jeżeli punkty [math]\displaystyle{ (a, y_0) }[/math], [math]\displaystyle{ (c, y_1) }[/math] oraz [math]\displaystyle{ (b, y_2) }[/math] leżą na pewnej paraboli [math]\displaystyle{ g(x) }[/math], to musi być
- [math]\displaystyle{ \int^b_a g (x) d x = {\small\frac{h}{3}} (y_0 + 4 y_1 + y_2) }[/math]
W twierdzeniu F11 wybraliśmy na osi [math]\displaystyle{ O X }[/math] punkty [math]\displaystyle{ - h, 0, h }[/math], aby uprościć obliczenia, które w przypadku ogólnym są znacznie bardziej skomplikowane i oczywiście dają ten sam rezultat.
Dla zainteresowanego Czytelnika przedstawimy główne kroki dowodu w przypadku ogólnym. Niech [math]\displaystyle{ g(x) = A x^2 + B x + C }[/math] będzie poszukiwanym równaniem paraboli. Współczynniki [math]\displaystyle{ A, B, C }[/math] wynikają z układu równań
- [math]\displaystyle{ \left\{ \begin{array}{l} y_0 = A a^2 + B a + C\\ y_1 = A c^2 + B c + C\\ y_2 = A b^2 + B b + C \end{array} \right. }[/math]
Rozwiązując i uwzględniając, że [math]\displaystyle{ c = \tfrac{1}{2} (a + b) }[/math], otrzymujemy
- [math]\displaystyle{ A = {\small\frac{2 (y_0 - 2 y_1 + y_2)}{(b - a)^2}} }[/math]
- [math]\displaystyle{ B = - {\small\frac{y_0 (a + 3 b) - 4 y_1 (a + b) + y_2 (3 a + b)}{(b - a)^2}} }[/math]
- [math]\displaystyle{ C = {\small\frac{(b y_0 + a y_2) (a + b) - 4 a b y_1}{(b - a)^2}} }[/math]
Zamiast uciążliwego wyliczania współczynników z układu równań, możemy funkcję [math]\displaystyle{ g(x) }[/math] zapisać od razu w takiej postaci, aby spełniała warunki [math]\displaystyle{ g(a) = y_0 }[/math], [math]\displaystyle{ g(c) = y_1 }[/math] oraz [math]\displaystyle{ g(b) = y_2 }[/math].
- [math]\displaystyle{ g(x) = y_0 \cdot {\small\frac{(x - b) (x - c)}{(a - b) (a - c)}} + y_1 \cdot {\small\frac{(x - a) (x - b)}{(c - a) (c - b)}} + y_2 \cdot {\small\frac{(x - a) (x - c)}{(b - a) (b - c)}} }[/math]
Jeżeli położymy [math]\displaystyle{ c = \tfrac{1}{2} (a + b) }[/math], to otrzymamy równanie identyczne z [math]\displaystyle{ g(x) = A x^2 + B x + C }[/math].
Przechodząc w wypisanym wyżej wzorze do nowej zmiennej [math]\displaystyle{ t = x - c }[/math] oraz zauważając, że [math]\displaystyle{ b - a = 2 h \; }[/math] i [math]\displaystyle{ \; b - c = c - a = h }[/math], dostajemy
- [math]\displaystyle{ g(t) = {\small\frac{1}{2 h^2}} [(y_0 - 2 y_1 + y_2) t^2 + h (y_2 - y_0) t + 2 h^2 y_1] }[/math]
Konsekwentnie w całce również musimy dokonać zamiany zmiennych. Kładąc [math]\displaystyle{ t = x - c }[/math], dostajemy
- [math]\displaystyle{ \int^b_a g (x) d x = \int^h_{- h} g (t) d t }[/math]
- [math]\displaystyle{ \;\: = {\small\frac{1}{2 h^2}} \int^h_{- h} [(y_0 - 2 y_1 + y_2) t^2 + h (y_2 - y_0) t + 2 h^2 y_1] d t = }[/math]
- [math]\displaystyle{ \;\: = {\small\frac{1}{2 h^2}} \left[ {\small\frac{2 h^3}{3}} (y_0 - 2 y_1 + y_2) + 2 h^2 y_1 \cdot 2 h \right] }[/math]
- [math]\displaystyle{ \;\: = {\small\frac{h}{3}} (y_0 + 4 y_1 + y_2) }[/math]
Co kończy dowód.
□
Twierdzenie F13 (całkowanie przybliżone metodą Simpsona)
Jeżeli funkcja [math]\displaystyle{ f(x) }[/math] jest ciągła w przedziale [math]\displaystyle{ [a, b] }[/math], to przybliżoną wartość całki [math]\displaystyle{ \int_a^b f (x) d x }[/math] możemy obliczyć ze wzoru
- [math]\displaystyle{ \int_a^b f (x) d x \approx {\small\frac{(b - a)}{3 n}} [f (x_0) + 4 f (x_1) + 2 f (x_2) + 4 f (x_3) + 2 f (x_4) + \ldots + 2 f (x_{n - 2}) + 4 f (x_{n - 1}) + f (x_n)] }[/math]
Wzór ten możemy zapisać w zwartej postaci
- [math]\displaystyle{ \int_a^b f (x) d x \approx {\small\frac{(b - a)}{3 n}} \left[ f (x_0) + 4 \sum_{k = 1}^{n / 2} f (x_{2 k - 1}) + 2 \sum_{k = 1}^{n / 2 - 1} f (x_{2 k}) + f (x_n) \right] }[/math]
gdzie [math]\displaystyle{ n }[/math] jest liczbą parzystą, a [math]\displaystyle{ n + 1 }[/math] punktów [math]\displaystyle{ x_k }[/math] zostało wybranych w przedziale [math]\displaystyle{ [a, b] }[/math] tak, aby
- [math]\displaystyle{ a = x_0 \lt x_1 \lt x_2 \lt \ldots \lt x_{n - 2} \lt x_{n - 1} \lt x_n = b }[/math]
Punkty te tworzą parzystą liczbę przedziałów [math]\displaystyle{ [x_k, x_{k + 1}] }[/math], gdzie [math]\displaystyle{ k = 0, 1, \ldots, n - 1 }[/math] o takich samych szerokościach [math]\displaystyle{ h = {\small\frac{b - a}{n}} }[/math].
Niech funkcja [math]\displaystyle{ f(x) }[/math] będzie ciągła w przedziale [math]\displaystyle{ [a, b] }[/math]. Aby znaleźć przybliżoną wartość całki [math]\displaystyle{ \int_a^b f (x) d x }[/math], dzielimy przedział [math]\displaystyle{ [a, b] }[/math] na parzystą liczbę przedziałów [math]\displaystyle{ [x_k, x_{k + 1}] }[/math], gdzie [math]\displaystyle{ k = 0, 1, \ldots, n - 1 }[/math]. Każdy z tych utworzonych przedziałów ma jednakową szerokość [math]\displaystyle{ h = x_{k + 1} - x_k = {\small\frac{b - a}{n}} }[/math].
Liczba przedziałów musi być parzysta, bo będziemy rozpatrywali pary przedziałów [math]\displaystyle{ [x_0, x_2] }[/math], [math]\displaystyle{ [x_2, x_4] }[/math], ... , [math]\displaystyle{ [x_{2 k - 2}, x_{2 k}] }[/math], ... [math]\displaystyle{ [x_{n - 2}, x_{n}] }[/math]. Dla każdej takiej pary przedziałów istnieją trzy punkty charakterystyczne, odpowiadające wartości funkcji [math]\displaystyle{ f(x) }[/math] na początku, na końcu i w środku przedziału. Żądanie, aby parabola przechodziła przez te trzy punkty, określa jednoznacznie współczynniki paraboli i jest ona przybliżeniem funkcji [math]\displaystyle{ f(x) }[/math].
Na podstawie twierdzenia F12 całka [math]\displaystyle{ I_{2 k} = \int_{x_{2 k - 2}}^{x_{2 k}} g (x) d x }[/math], gdzie [math]\displaystyle{ g (x) }[/math] jest parabolą przechodzącą przez punkty [math]\displaystyle{ (x_{2 k - 2}, f (x_{2 k - 2})) }[/math], [math]\displaystyle{ (x_{2 k - 1}, f (x_{2 k - 1})) }[/math] oraz [math]\displaystyle{ (x_{2 k}, f (x_{2 k})) }[/math] jest równa
- [math]\displaystyle{ I_{2 k} = \int_{x_{2 k - 2}}^{x_{2 k}} g (x) d x = {\small\frac{h}{3}} [f (x_{2 k - 2}) + 4 f (x_{2 k - 1}) + f (x_{2 k})] }[/math]
Sumując całki [math]\displaystyle{ I_{2 k} = \int_{x_{2 k - 2}}^{x_{2 k}} g (x) d x }[/math] dla kolejnych par przedziałów, otrzymujemy przybliżenie całki oznaczonej [math]\displaystyle{ \int_a^b f (x) d x }[/math]
- [math]\displaystyle{ \int^b_a f (x) d x \approx {\small\frac{h}{3}} [f (x_0) + 4 f (x_1) + f (x_2)] + {\small\frac{h}{3}} [f (x_2) + 4 f (x_3) + f (x_4)] + \ldots + {\small\frac{h}{3}} [f (x_{2 k - 2}) + 4 f (x_{2 k - 1}) + f (x_{2 k})] + \ldots + {\small\frac{h}{3}} [f (x_{n - 2}) + 4 f (x_{n - 1}) + f (x_n)] }[/math]
- [math]\displaystyle{ \;\; = {\small\frac{(b - a)}{3 n}} \left[ f (x_0) + 4 f (x_1) + 2 f (x_2) + 4 f (x_3) + 2 f (x_4) + \ldots + 4 f (x_{2 k - 1}) + f (x_{2 k}) + \ldots + 2 f (x_{n - 2}) + 4 f (x_{n - 1}) + f (x_n) \right] }[/math]
Współczynnik [math]\displaystyle{ 4 }[/math] występuje przy wszystkich wyrazach [math]\displaystyle{ f(x_{2 k - 1}) }[/math], czyli dla argumentów o indeksie nieparzystym. Współczynnik [math]\displaystyle{ 2 }[/math] występuje przy wszystkich wyrazach [math]\displaystyle{ f(x_{2 k}) }[/math], czyli dla argumentów o indeksie parzystym, ale nie dotyczy to indeksów [math]\displaystyle{ 0 }[/math] oraz [math]\displaystyle{ n }[/math]. Dlatego liczba wyrazów ze współczynnikiem [math]\displaystyle{ 4 }[/math] jest o jeden większa od liczby wyrazów ze współczynnikiem [math]\displaystyle{ 2 }[/math]. Używając symboli sumy, możemy powyższy wzór zapisać w postaci
- [math]\displaystyle{ \int^b_a f (x) d x \approx {\small\frac{(b - a)}{3 n}} \left[ f (x_0) + 4 \sum^{n / 2}_{k = 1} f (x_{2 k - 1}) + 2 \sum_{k = 1}^{n / 2 - 1} f (x_{2 k}) + f (x_n) \right] }[/math]
Co należało pokazać.
□
Twierdzenie F14
Jeżeli funkcja [math]\displaystyle{ f(x) }[/math] jest klasy [math]\displaystyle{ C^4 ([a, b]) }[/math], a funkcja [math]\displaystyle{ W(x) }[/math] jest równa
- [math]\displaystyle{ W(x) = \left\{ \begin{array}{lll} {\large\frac{1}{12}} (x - a)^3 (3 x - a - 2 b) & & a \leqslant x \leqslant c\\ {\large\frac{1}{12}} (x - b)^3 (3 x - 2 a - b) & & c \lt x \leqslant b \end{array} \right. }[/math]
gdzie [math]\displaystyle{ c = {\small\frac{1}{2}} (a + b) }[/math], to
- [math]\displaystyle{ \int^b_a f (x) d x = {\small\frac{b - a}{6}} \cdot [f (a) + 4 f (c) + f (b)] + {\small\frac{1}{6}} \int^b_a f^{(4)} (x) W (x) d x }[/math]
Dowód oparliśmy na pomyśle Talvili i Wiersmy[4]. Dla wygody wprowadźmy oznaczenia
- [math]\displaystyle{ W(x) = \left\{ \begin{array}{lll} U (x) & & a \leqslant x \leqslant c\\ V (x) & & c \lt x \leqslant b \end{array} \right. }[/math]
gdzie
- [math]\displaystyle{ U(x) = {\small\frac{1}{12}} (x - a)^3 (3 x - a - 2 b) }[/math]
- [math]\displaystyle{ V(x) = {\small\frac{1}{12}} (x - b)^3 (3 x - 2 a - b) }[/math]
Wyliczając wartości [math]\displaystyle{ U^{(n)} (a) }[/math], [math]\displaystyle{ U^{(n)} (c) }[/math], [math]\displaystyle{ V^{(n)} (c) }[/math] oraz [math]\displaystyle{ V^{(n)} (b) }[/math], gdzie [math]\displaystyle{ n = 0, 1, \ldots, 4 }[/math] sporządziliśmy tabelę wartości funkcji [math]\displaystyle{ W(x) }[/math] i jej pochodnych w punktach [math]\displaystyle{ x = a }[/math], [math]\displaystyle{ x = c }[/math] i [math]\displaystyle{ x = b }[/math].
[math]\displaystyle{ \quad n \quad }[/math] [math]\displaystyle{ U^{(n)} (a) }[/math] [math]\displaystyle{ U^{(n)} (c) }[/math] [math]\displaystyle{ V^{(n)} (c) }[/math] [math]\displaystyle{ V^{(n)} (b) }[/math] [math]\displaystyle{ \quad 0 \quad }[/math] [math]\displaystyle{ 0 }[/math] [math]\displaystyle{ - {\small\frac{(b - a)^4}{192}} }[/math] [math]\displaystyle{ - {\small\frac{(b - a)^4}{192}} }[/math] [math]\displaystyle{ 0 }[/math] [math]\displaystyle{ \quad 1 \quad }[/math] [math]\displaystyle{ 0 }[/math] [math]\displaystyle{ 0 }[/math] [math]\displaystyle{ 0 }[/math] [math]\displaystyle{ 0 }[/math] [math]\displaystyle{ \quad 2 \quad }[/math] [math]\displaystyle{ 0 }[/math] [math]\displaystyle{ {\small\frac{(b - a)^2}{4}} }[/math] [math]\displaystyle{ {\small\frac{(b - a)^2}{4}} }[/math] [math]\displaystyle{ 0 }[/math] [math]\displaystyle{ \quad 3 \quad }[/math] [math]\displaystyle{ - (b - a) }[/math] [math]\displaystyle{ 2 (b - a) }[/math] [math]\displaystyle{ - 2 (b - a) }[/math] [math]\displaystyle{ b - a }[/math] [math]\displaystyle{ \quad 4 \quad }[/math] [math]\displaystyle{ 6 }[/math] [math]\displaystyle{ 6 }[/math] [math]\displaystyle{ 6 }[/math] [math]\displaystyle{ 6 }[/math]
Zauważmy: trzecia pochodna funkcji [math]\displaystyle{ W(x) }[/math] jest funkcją nieciągłą w punkcie [math]\displaystyle{ x = c }[/math], zatem funkcja [math]\displaystyle{ W(x) }[/math] jest klasy [math]\displaystyle{ C^2 ([a, b]) }[/math]. Natomiast czwarte pochodne funkcji [math]\displaystyle{ U(x) }[/math] i [math]\displaystyle{ V(x) }[/math] są funkcjami stałymi i są sobie równe.
Dowód przeprowadzimy całkując wielokrotnie przez części całkę [math]\displaystyle{ \int^b_a f^{(4)} (x) W (x) d x }[/math]. Ponieważ dla [math]\displaystyle{ n = 0, 1, 2 }[/math] funkcje [math]\displaystyle{ W^{(n)} (x) }[/math] są ciągłe oraz spełniony jest warunek
- [math]\displaystyle{ W^{(n)} (a) = W^{(n)} (b) = 0 }[/math]
to otrzymujemy kolejno
- [math]\displaystyle{ \int^b_a f^{(4)} (x) W (x) d x = f^{(3)} (x) W (x) \biggr\rvert_{a}^{b} - \int^b_a f^{(3)} (x) W^{(1)} (x) d x }[/math]
- [math]\displaystyle{ \;\;\;\,\, = - \int^b_a f^{(3)} (x) W^{(1)} (x) d x }[/math]
- [math]\displaystyle{ \;\;\;\,\, = - f^{(2)} (x) W^{(1)} (x) \biggr\rvert_{a}^{b} + \int^b_a f^{(2)} (x) W^{(2)} (x) d x }[/math]
- [math]\displaystyle{ \;\;\;\,\, = \int^b_a f^{(2)} (x) W^{(2)} (x) d x }[/math]
- [math]\displaystyle{ \;\;\;\,\, = f^{(1)} (x) W^{(2)} (x) \biggr\rvert_{a}^{b} - \int^b_a f^{(1)} (x) W^{(3)} (x) d x }[/math]
- [math]\displaystyle{ \;\;\;\,\, = - \int^b_a f^{(1)} (x) W^{(3)} (x) d x }[/math]
Ponieważ funkcja [math]\displaystyle{ W^{(3)} (x) }[/math] jest nieciągła w punkcie [math]\displaystyle{ x = c = {\small\frac{a + b}{2}} }[/math], to musimy całkować osobno dla [math]\displaystyle{ x \in [a, c] }[/math] i dla [math]\displaystyle{ x \in [c, b] }[/math]
- [math]\displaystyle{ \int^b_a f^{(4)} (x) W (x) d x = - \int^c_a f^{(1)} (x) U^{(3)} (x) d x - \int^b_c f^{(1)} (x) V^{(3)} (x) d x }[/math]
Mamy
- [math]\displaystyle{ - \int_a^c f^{(1)} (x) U^{(3)} (x) d x = - f (x) U^{(3)} (x) \biggr\rvert_{a}^{c} + \int^c_a f (x) U^{(4)} (x) d x }[/math]
- [math]\displaystyle{ \:\! = - f (c) U^{(3)} (c) + f (a) U^{(3)} (a) + 6 \int^c_a f (x) d x }[/math]
- [math]\displaystyle{ \:\! = - 2 (b - a) f (c) - (b - a) f (a) + 6 \int^c_a f (x) d x }[/math]
- [math]\displaystyle{ \:\! = - (b - a) [f (a) + 2 f (c)] + 6 \int^c_a f (x) d x }[/math]
- [math]\displaystyle{ - \int_c^b f^{(1)} (x) V^{(3)} (x) d x = - f (x) V^{(3)} (x) \biggr\rvert_{c}^{b} + \int^b_c f (x) V^{(4)} (x) d x }[/math]
- [math]\displaystyle{ = - f (b) V^{(3)} (b) + f (c) V^{(3)} (c) + 6 \int^b_c f (x) d x }[/math]
- [math]\displaystyle{ = - (b - a) f (b) - 2 (b - a) f (c) + 6 \int^b_c f (x) d x }[/math]
- [math]\displaystyle{ = - (b - a) [f (b) + 2 f (c)] + 6 \int^b_c f (x) d x }[/math]
Zatem
- [math]\displaystyle{ \int^b_a f^{(4)} (x) W (x) d x = - (b - a) [f (a) + 4 f (c) + f (b)] + 6 \int^b_a f (x) d x }[/math]
Skąd otrzymujemy natychmiast
- [math]\displaystyle{ \int^b_a f (x) d x = {\small\frac{b - a}{6}} \cdot [f (a) + 4 f (c) + f (b)] + {\small\frac{1}{6}} \int^b_a f^{(4)} (x) W (x) d x }[/math]
Co kończy dowód.
□
Twierdzenie F15
Niech [math]\displaystyle{ f(x) }[/math] będzie funkcją klasy [math]\displaystyle{ C^4 ([a, b]) }[/math] i [math]\displaystyle{ c = {\small\frac{1}{2}} (a + b) }[/math]. Jeżeli wartość całki [math]\displaystyle{ \int^b_a f (x) d x }[/math] przybliżymy wartością całki [math]\displaystyle{ \int^b_a g (x) d x }[/math], gdzie [math]\displaystyle{ g(x) }[/math] jest parabolą przechodzącą przez punkty [math]\displaystyle{ P_a = (a, f (a)) }[/math], [math]\displaystyle{ P_c = (c, f (c)) }[/math] oraz [math]\displaystyle{ P_b = (b, f (b)) }[/math], to błąd takiego przybliżenia jest nie większy niż [math]\displaystyle{ {\small\frac{M (b - a)^5}{2880}} }[/math], gdzie [math]\displaystyle{ M \geqslant \max_{a \leqslant x \leqslant b} | f^{(4)} (x) | }[/math].
Zauważmy, że z definicji punkty [math]\displaystyle{ P_a }[/math], [math]\displaystyle{ P_b }[/math] i [math]\displaystyle{ P_c }[/math] są punktami wspólnymi funkcji [math]\displaystyle{ f(x) }[/math] i paraboli [math]\displaystyle{ g(x) }[/math].
Z twierdzenia F14 wiemy, że
- [math]\displaystyle{ \int^b_a f (x) d x = {\small\frac{b - a}{6}} \cdot [f (a) + 4 f (c) + f (b)] + {\small\frac{1}{6}} \int^b_a f^{(4)} (x) W (x) d x }[/math]
Uwzględniając twierdzenie F12, możemy napisać
- [math]\displaystyle{ \int^b_a f (x) d x = \int^b_a g (x) d x + {\small\frac{1}{6}} \int^b_a f^{(4)} (x) W (x) d x }[/math]
Zatem błąd, jaki popełniamy, przybliżając funkcję [math]\displaystyle{ f (x) }[/math] parabolą [math]\displaystyle{ g (x) }[/math] przechodzącą przez punkty [math]\displaystyle{ P_a }[/math], [math]\displaystyle{ P_b }[/math] i [math]\displaystyle{ P_c }[/math], wynosi
- [math]\displaystyle{ \left| \int^b_a f (x) d x - \int^b_a g (x) d x \right| = {\small\frac{1}{6}} \left| \int^b_a f^{(4)} (x) W (x) d x \right| }[/math]
- [math]\displaystyle{ \leqslant {\small\frac{1}{6}} \int^b_a | f^{(4)} (x) W (x) | d x }[/math]
- [math]\displaystyle{ \leqslant {\small\frac{M}{6}} \int^b_a | W (x) | d x }[/math]
gdzie [math]\displaystyle{ M \geqslant \max_{a \leqslant x \leqslant b} | f^{(4)} (x) | }[/math]. Pozostaje policzyć całkę
- [math]\displaystyle{ \int^b_a | W (x) | d x = {\small\frac{1}{12}} \int^c_a | (x - a)^3 (3 x - a - 2 b) | d x + {\small\frac{1}{12}} \int^b_c | (x - b)^3 (3 x - 2 a - b) | d x }[/math]
Ponieważ prawdziwy jest następujący ciąg nierówności
- [math]\displaystyle{ a \lt {\small\frac{2 a + b}{3}} \lt {\small\frac{a + b}{2}} \lt {\small\frac{a + 2 b}{3}} \lt b }[/math]
a funkcje podcałkowe są iloczynami liniowych funkcji rosnących to, po znalezieniu miejsc zerowych tych funkcji, otrzymujemy natychmiast informację o znaku funkcji podcałkowych w interesujących nas przedziałach
[math]\displaystyle{ x }[/math] | [math]\displaystyle{ a }[/math] | [math]\displaystyle{ c }[/math] | [math]\displaystyle{ {\small\frac{a + 2 b}{3}} }[/math] |
[math]\displaystyle{ x - a }[/math] | [math]\displaystyle{ 0 }[/math] | [math]\displaystyle{ + }[/math] | [math]\displaystyle{ + }[/math] |
[math]\displaystyle{ 3 x - a - 2 b }[/math] | [math]\displaystyle{ - }[/math] | [math]\displaystyle{ - }[/math] | [math]\displaystyle{ 0 }[/math] |
[math]\displaystyle{ x }[/math] | [math]\displaystyle{ {\small\frac{2 a + b}{3}} }[/math] | [math]\displaystyle{ c }[/math] | [math]\displaystyle{ b }[/math] |
[math]\displaystyle{ x - b }[/math] | [math]\displaystyle{ - }[/math] | [math]\displaystyle{ - }[/math] | [math]\displaystyle{ 0 }[/math] |
[math]\displaystyle{ 3 x - 2 a - b }[/math] | [math]\displaystyle{ 0 }[/math] | [math]\displaystyle{ + }[/math] | [math]\displaystyle{ + }[/math] |
Widzimy, że funkcje [math]\displaystyle{ (x - a)^3 (3 x - a - 2 b) }[/math] oraz [math]\displaystyle{ (x - b)^3 (3 x - 2 a - b) }[/math] są ujemne w swoich przedziałach całkowania, zatem (zobacz WolframAlpha1, WolframAlpha2)
- [math]\displaystyle{ \int^b_a | W (x) | d x = - {\small\frac{1}{12}} \int^c_a (x - a)^3 (3 x - a - 2 b) d x - {\small\frac{1}{12}} \int^b_c (x - b)^3 (3 x - 2 a - b) d x }[/math]
- [math]\displaystyle{ \: = {\small\frac{(b - a)^5}{960}} + {\small\frac{(b - a)^5}{960}} }[/math]
- [math]\displaystyle{ \: = {\small\frac{(b - a)^5}{480}} }[/math]
Podstawiając, otrzymujemy ostatecznie
- [math]\displaystyle{ \left| \int^b_a f (x) d x - \int^b_a g (x) d x \right| \leqslant {\small\frac{M}{6}} \cdot {\small\frac{(b - a)^5}{480}} = {\small\frac{M (b - a)^5}{2880}} }[/math]
Co należało pokazać.
□
Twierdzenie F16 (błąd przybliżonego całkowania metodą Simpsona)
Niech [math]\displaystyle{ f(x) }[/math] będzie funkcją klasy [math]\displaystyle{ C^4 ([a, b]) }[/math]. Jeżeli policzymy przybliżoną wartość całki [math]\displaystyle{ \int^b_a f (x) d x }[/math] metodą Simpsona (twierdzenie F13), to błąd takiego przybliżenia jest nie większy niż [math]\displaystyle{ {\small\frac{M (b - a)^5}{180 n^4}} }[/math], gdzie [math]\displaystyle{ M \geqslant \max_{a \leqslant x \leqslant b} | f^{(4)} (x) | }[/math].
Maksymalny błąd, jaki możemy popełnić, stosując metodę Simpsona, jest sumą błędów, jakie zostają popełnione, gdy dla wybranej pary przedziałów [math]\displaystyle{ [x_{2 k - 2}, x_{2 k}] }[/math] przybliżamy funkcję [math]\displaystyle{ f(x) }[/math] parabolą. Zatem całkowity błąd metody Simpsona jest równy
- [math]\displaystyle{ E_n = \sum_{k = 1}^{n / 2} \left| \int^{x_{2 k}}_{x_{2 k - 2}} f (x) d x - \int^{x_{2 k}}_{x_{2 k - 2}} g_k (x) d x \right| }[/math]
gdzie [math]\displaystyle{ g_k (x) }[/math] jest parabolą, jaką funkcja [math]\displaystyle{ f(x) }[/math] została przybliżona w [math]\displaystyle{ k }[/math]-tej parze przedziałów [math]\displaystyle{ [x_{2 k - 2}, x_{2 k}] }[/math]. Z twierdzenia F15 wynika natychmiast, że
- [math]\displaystyle{ E_n = \sum_{k = 1}^{n / 2} \frac{M_k \cdot (x_{2 k} - x_{2 k - 2})^5}{2880} }[/math]
gdzie
- [math]\displaystyle{ M_k \geqslant \max_{x_{2 k - 2} \leqslant x \leqslant x_{2 k}} | f^{(4)} (x) | }[/math]
Zatem
- [math]\displaystyle{ E_n = {\small\frac{1}{2880}} \sum_{k = 1}^{n / 2} M_k \cdot (2 h)^5 }[/math]
- [math]\displaystyle{ \;\! = {\small\frac{(2 h)^5}{2880}} \sum_{k = 1}^{n / 2} M_k }[/math]
- [math]\displaystyle{ \;\! \leqslant {\small\frac{32 \cdot h^5}{2880}} \sum_{k = 1}^{n / 2} M }[/math]
- [math]\displaystyle{ \;\! = {\small\frac{M (b - a)^5}{90 n^5}} \cdot {\small\frac{n}{2}} }[/math]
- [math]\displaystyle{ \;\! = {\small\frac{M (b - a)^5}{180 n^4}} }[/math]
gdzie oznaczyliśmy
- [math]\displaystyle{ M = \max (M_1, \ldots, M_{n / 2}) \geqslant \max_{a \leqslant x \leqslant b} | f^{(4)} (x) | }[/math]
Co kończy dowód.
□
Uwaga F17
Niech będzie dana funkcja [math]\displaystyle{ f(x) }[/math] klasy [math]\displaystyle{ C^4 ([a, b]) }[/math]. Jeżeli obierzemy pewien stały skok [math]\displaystyle{ h }[/math] to, stosując metodę Simpsona, możemy policzyć przybliżenie [math]\displaystyle{ I }[/math] całki [math]\displaystyle{ \int^b_a f (x) d x }[/math]. Wiemy, że błąd, z jakim wyliczymy wartość całki nie przekracza liczby
- [math]\displaystyle{ E = {\small\frac{M (b - a)^5}{180 n^4}} = {\small\frac{M \cdot h^4}{180}} \cdot (b - a) = {\small\frac{M \cdot h^4}{180}} \cdot L }[/math]
gdzie [math]\displaystyle{ M \geqslant \max_{a \leqslant x \leqslant b} | f^{(4)} (x) | }[/math], a przez [math]\displaystyle{ L = b - a }[/math] oznaczyliśmy długość przedziału [math]\displaystyle{ [a, b] }[/math].
Co się stanie, jeżeli (zachowując stały skok [math]\displaystyle{ h }[/math]) podzielimy przedział [math]\displaystyle{ [a, b] }[/math] na dowolną liczbę mniejszych przedziałów, każdy o długości [math]\displaystyle{ l_k }[/math], policzymy całki [math]\displaystyle{ I_k }[/math] oraz błędy [math]\displaystyle{ E_k }[/math] w każdym z tych mniejszych przedziałów, a następnie je zsumujemy?
Całka [math]\displaystyle{ I }[/math] będzie oczywiście sumą wyliczonych całek [math]\displaystyle{ I_k }[/math], a całkowity błąd [math]\displaystyle{ E' }[/math] będący sumą błędów [math]\displaystyle{ E_k }[/math] nie wzrośnie!
Istotnie błąd, jaki popełniamy w [math]\displaystyle{ k }[/math]-tym przedziale o długości [math]\displaystyle{ l_k }[/math], wynosi
- [math]\displaystyle{ E_k = {\small\frac{M_k h^4}{180}} \cdot l_k }[/math]
gdzie [math]\displaystyle{ M_k }[/math] jest ograniczeniem od góry funkcji [math]\displaystyle{ | f^{(4)} (x) | }[/math] w [math]\displaystyle{ k }[/math]-tym przedziale. Suma tych błędów jest równa
- [math]\displaystyle{ E' = \sum_k {\small\frac{M_k h^4}{180}} \cdot l_k = {\small\frac{h^4}{180}} \sum_k M_k l_k \leqslant {\small\frac{M' \cdot h^4}{180}} \sum_k l_k = {\small\frac{M' \cdot h^4}{180}} \cdot L }[/math]
gdzie [math]\displaystyle{ M' = \max (M_1, M_2, \ldots, M_k, \ldots) }[/math] jest ograniczeniem od góry funkcji [math]\displaystyle{ f(x) }[/math] w przedziale [math]\displaystyle{ [a, b] }[/math]. Jeśli tylko dokonywaliśmy wyboru liczb [math]\displaystyle{ M_k }[/math] ograniczających od góry funkcję [math]\displaystyle{ | f^{(4)} (x) | }[/math] na odcinkach o długości [math]\displaystyle{ l_k }[/math] na tyle starannie, że prawdziwa jest nierówność
- [math]\displaystyle{ M' = \max (M_1, M_2, \ldots, M_k, \ldots) \leqslant M }[/math]
(co nie jest trudne, bo wystarczy przyjąć [math]\displaystyle{ M_1 = M_2 = \ldots = M_k = \ldots = M }[/math]), to otrzymujemy
- [math]\displaystyle{ E' = {\small\frac{M' \cdot h^4}{180}} \cdot L \leqslant {\small\frac{M \cdot h^4}{180}} \cdot L = E }[/math]
Powyższe rozważania od razu udzielają odpowiedzi na ważne pytanie:
Co należy zrobić, jeżeli funkcja [math]\displaystyle{ f(x) }[/math] nie jest klasy [math]\displaystyle{ C^4 }[/math], a jedynie jest kawałkami klasy [math]\displaystyle{ C^4 }[/math]? Oczywiście należy całkę zapisać jako sumę
całek, z których każda jest obliczana w takim przedziale, że funkcja [math]\displaystyle{ f(x) }[/math] jest w nim klasy [math]\displaystyle{ C^4 }[/math]. Stosując metodę Simpsona, obliczyć całki [math]\displaystyle{ I_k }[/math] i błędy [math]\displaystyle{ E_k }[/math] w tych przedziałach, a następnie zsumować wartości całek i błędów.
Uwaga F18
Podsumowując, metoda parabol prowadzi do natępującego wzoru na przybliżoną wartość całki
- [math]\displaystyle{ \int^b_a f (x) d x \approx {\small\frac{(b - a)}{3 n}} \left[ f (x_0) + 4 \sum^{n / 2}_{k = 1} f (x_{2 k - 1}) + 2 \sum_{k = 1}^{n / 2 - 1} f (x_{2 k}) + f (x_n) \right] }[/math]
Przedział całkowania [math]\displaystyle{ [a, b] }[/math] dzielimy na parzystą liczbę [math]\displaystyle{ n }[/math] przedziałów [math]\displaystyle{ [x_{k - 1}, x_k] }[/math] o jednakowej szerokości [math]\displaystyle{ h = {\small\frac{b - a}{n}} }[/math].
Wzór można przedstawić w postaci
- [math]\displaystyle{ \int^b_a f (x) d x \approx {\small\frac{(b - a)}{3 n}} \left[ f (a) + 4 \sum^{n / 2}_{k = 1} f (a + (2 k - 1) \cdot h) + 2 \sum_{k = 1}^{n / 2 - 1} f (a + 2 k \cdot h) + f (b) \right] }[/math]
Jeżeli funkcja [math]\displaystyle{ f(x) }[/math] jest klasy [math]\displaystyle{ C^4 ([a, b]) }[/math], to błąd wartości liczbowej całki oznaczonej [math]\displaystyle{ \int^b_a f (x) d x }[/math], jaki popełniamy, stosując metodę Simpsona, nie przekracza
- [math]\displaystyle{ {\small\frac{M (b - a)^5}{180 n^4}} }[/math]
gdzie [math]\displaystyle{ M \geqslant \underset{a \leqslant x \leqslant b}{\max} | f^{(4)} (x) | }[/math].
Uwaga F19
Wykorzystując przedstawioną metodę parabol, możemy bez trudu napisać w PARI/GP prosty i zaskakująco dokładny program do liczenia całek oznaczonych. Parametr M
jest parametrem opcjonalnym. Jeżeli jest obecny, to zostanie wyliczony błąd [math]\displaystyle{ {\small\frac{M (b - a)^5}{180 n^4}} }[/math], gdzie [math]\displaystyle{ \max_{a \leqslant x \leqslant b} | f^{(4)} (x) | \leqslant M }[/math]. Jeżeli zostanie pominięty, to zostanie wyliczona jedynie wartość [math]\displaystyle{ {\small\frac{(b - a)^5}{180 n^4}} }[/math], a w wyniku pojawi się czynnik [math]\displaystyle{ M }[/math], który ma przypominać, że liczba musi zostać pomnożona przez [math]\displaystyle{ M \geqslant \max_{a \leqslant x \leqslant b} | f^{(4)} (x) | }[/math], aby uzyskać wartość błędu.
Simpson(a, b, n, M = -1) = \\ n musi być liczbą parzystą { local(err, h, k, S, V); h = 1.0*(b - a)/n; S = f(a) + 4 * sum(k = 1, n/2, f(a + (2*k-1)*h)) + 2 * sum(k = 1, n/2 - 1, f(a + 2*k*h)) + f(b); S = (b - a)/(3*n) * S; err = 1.0*(b - a)^5/(180*n^4) * if(M<0, 1, M); V = [ S, if( M < 0, Str( "M * ", err), err ) ]; return(V); }
Przykład F20
Przedstawimy kilka przykładowych wyników obliczeń całek nieoznaczonych przy pomocy programu Simpson(a, b, n, M)
- [math]\displaystyle{ f(x) = x^2 }[/math], [math]\displaystyle{ \qquad \int^3_0 f (x) d x = 9 }[/math]
Simpson(0, 3, 2^10, 0) [9.0000000000000000000000000000000000000, 0]
- [math]\displaystyle{ f(x) = \sin (x) }[/math], [math]\displaystyle{ \qquad \int_{0}^{\pi} f (x) d x = 2 }[/math]
Simpson(0, Pi, 2^10, 1) [2.0000000000009843683496726710086289358, 1.5462404552801947792469203606107819849 E-12]
- [math]\displaystyle{ f(x) = {\small\frac{4}{1 + x^2}} }[/math], [math]\displaystyle{ \qquad \int^1_0 f (x) d x = \pi }[/math], [math]\displaystyle{ \qquad \pi = 3.1415926535897932384626433832795028841971693993751 }[/math]
Simpson(0, 1, 2^15, 96)
[3.1415926535897932384626433832474475839, 4.6259292692714855850984652837117513021 E-19]
Po uwzględnieniu wyliczonego błędu kolorem czerwonym zaznaczono tylko te cyfry, których wartość jest pewna. W rzeczywistości jeszcze kolejnych [math]\displaystyle{ 10 }[/math] cyfr jest poprawnych.
- [math]\displaystyle{ f(x) = {\small\frac{\sin (x)}{x}} }[/math], [math]\displaystyle{ \qquad \int_{2 \pi}^{10^4} f (x) d x = 0.1527399692533334654765895125096821824796221626790438771977250903 \qquad }[/math] (WolframAlpha)
Simpson(2*Pi, 10^4, 2^22, 0.13)
[0.15273996925335764945765416969734658087, 2.3263037652077992736046178707334374747 E-10]
- [math]\displaystyle{ f(x) = {\small\frac{\sin (x)}{\log (x)}} }[/math], [math]\displaystyle{ \qquad \int_{2 \pi}^{10^4} f (x) d x = 0.63535086286 \ldots \qquad }[/math] (WolframAlpha)
Simpson(2*Pi, 10^4, 2^22, 0.46)
[0.63535086286330151753047973075030359191, 8.2315363999660589681394170810567787567 E-10]
- [math]\displaystyle{ f(x) = {\small\frac{P_1 (x)}{x}} }[/math], [math]\displaystyle{ \qquad \int_{1}^{10} f (x) d x = - 0.072730903361964386963200944934753807929314886310179776161039616 }[/math]
gdzie [math]\displaystyle{ P_1 (x) }[/math] jest okresową funkcją Bernoulliego. Znamy dokładny wynik, bo można pokazać, że (zobacz przykład E43)
- [math]\displaystyle{ \int^n_1 {\small\frac{P_1 (x)}{x}} d x = \log (n!) - n \log n + n - {\small\frac{1}{2}} \log n - 1 }[/math]
Zauważmy, że funkcja [math]\displaystyle{ {\small\frac{P_1 (x)}{x}} }[/math] nie jest ciągła, ale jest kawałkami klasy [math]\displaystyle{ C^4 }[/math]. Zapiszmy całkę w postaci sumy całek, z których każda jest określona w przedziale [math]\displaystyle{ [k, k + 1] }[/math]
- [math]\displaystyle{ \int_{1}^{10} f (x) d x = \int_{1}^{10} \frac{x - \lfloor x \rfloor - {\small\frac{1}{2}}}{x} d x }[/math]
- [math]\displaystyle{ \;\;\;\,\, = \int_{1}^{10} \left( 1 - \frac{\lfloor x \rfloor + {\small\frac{1}{2}}}{x} \right) d x }[/math]
- [math]\displaystyle{ \;\;\;\,\, = 9 - \sum_{k = 1}^{9} \int_{k}^{k + 1} \frac{k + {\small\frac{1}{2}}}{x} d x }[/math]
- [math]\displaystyle{ \;\;\;\,\, = 9 - \sum_{k = 1}^{9} \left( k + {\small\frac{1}{2}} \right) \int_{k}^{k + 1} {\small\frac{d x}{x}} }[/math]
- [math]\displaystyle{ \int_{1}^{10} f (x) d x = \int_{1}^{10} \frac{x - \lfloor x \rfloor - {\small\frac{1}{2}}}{x} d x }[/math]
Mamy
f(x) = 1 / x
[9, 0] - sum( k = 1, 9, (k + 1/2) * Simpson(k, k + 1, 2^20, 24/k^5) )
[-0.072730903361964386963200988526802160255, -1.7650768731492669233661475404296456609 E-25]
Zauważmy, że całka i błąd są mnożone przez czynnik [math]\displaystyle{ \left( k + {\small\frac{1}{2}} \right) }[/math] – tak, jak być powinno! Ujemny znak błędu wynika z odejmowania wyliczonego błędu od zera.
Uwaga F21
Czytelnik zapewne zwrócił uwagę, że we wszystkich przedstawionych przykładach wybieraliśmy liczbę podziałów tak, aby była potęgą liczby [math]\displaystyle{ 2 }[/math]. Są ku temu dwa dobre powody
- ułamek [math]\displaystyle{ {\small\frac{1}{2^n}} }[/math] ma skończoną reprezentację binarną, co poprawia precyzję obliczeń
- potrzebujemy dwukrotnego wzrostu liczby podziałów, aby zmniejszyć błąd o rząd wielkości (błąd maleje [math]\displaystyle{ 16 }[/math]-krotnie)
Całkowanie przybliżone pewnych całek niewłaściwych
Twierdzenie F22
Jeżeli całka [math]\displaystyle{ \int_{a}^{\infty} f (t) d t }[/math] jest zbieżna i istnieje funkcja [math]\displaystyle{ g(t) }[/math] spełniająca warunki
- [math]\displaystyle{ | f (t) | \leqslant g (t) }[/math] dla [math]\displaystyle{ t \geqslant b }[/math]
- istnieje całka nieoznaczona [math]\displaystyle{ G(t) = \int g (t) d t + C }[/math]
- całka [math]\displaystyle{ \int_{b}^{\infty} g (t) d t }[/math] jest zbieżna
- [math]\displaystyle{ \lim_{t \to + \infty} G (t) = 0 }[/math]
gdzie [math]\displaystyle{ b \gt a }[/math] jest dowolnie wybraną liczbą, to przybliżona wartość całki niewłaściwej [math]\displaystyle{ \int_{a}^{\infty} f (t) d t }[/math] jest równa
- [math]\displaystyle{ \int_{a}^{\infty} f (x) d x \approx {\small\frac{(b - a)}{3 n}} \left[ f (x_0) + 4 \sum_{k = 1}^{n / 2} f (x_{2 k - 1}) + 2 \sum_{k = 1}^{n / 2 - 1} f (x_{2 k}) + f (x_n) \right] }[/math]
z błędem nie większym niż
- [math]\displaystyle{ E = {\small\frac{M (b - a)^5}{180 n^4}} - G (b) }[/math]
Przy czym optymalna liczba podziałów przedziału [math]\displaystyle{ [a, b] }[/math] (dla ustalonej wartości [math]\displaystyle{ b }[/math]) wynosi
- [math]\displaystyle{ n = (b - a) \cdot \sqrt[4]{{\small\frac{M}{36 g (b)}}} }[/math]
Odpowiada jej minimalny błąd równy
- [math]\displaystyle{ {\small\frac{(b - a) g (b)}{5}} - G (b) }[/math]
Zauważmy najpierw, że ponieważ z założenia [math]\displaystyle{ \int_{b}^{\infty} g (t) d t }[/math] jest zbieżna, to granica [math]\displaystyle{ \lim_{t \to + \infty} G (t) }[/math] jest skończona (twierdzenie E28). Wybierając odpowiednią wartość stałej całkowania, możemy sprawić, że [math]\displaystyle{ \lim_{t \to + \infty} G (t) = 0 }[/math]. Wynika stąd, że warunek ten zawsze może być spełniony, ale powinniśmy upewnić się, że tak jest.
Zastępując całkę niewłaściwą [math]\displaystyle{ \int_{a}^{\infty} f (t) d t }[/math] całką oznaczoną [math]\displaystyle{ \int^b_a f (t) d t }[/math], popełniamy błąd
- [math]\displaystyle{ \left| \int_{a}^{\infty} f (t) d t - \int^b_a f (t) d t \right| = \left| \int_{b}^{\infty} f (t) d t \right| }[/math]
- [math]\displaystyle{ \;\;\:\, \leqslant \int_{b}^{\infty} | f (t) | d t }[/math]
- [math]\displaystyle{ \;\;\:\, \leqslant \int_{b}^{\infty} g (t) d t }[/math]
- [math]\displaystyle{ \;\;\:\, = \lim_{t \to + \infty} G (t) - G (b) }[/math]
- [math]\displaystyle{ \;\;\:\, = - G (b) }[/math]
Całkę oznaczoną [math]\displaystyle{ \int^b_a f (t) d t }[/math] możemy policzyć metodą parabol
- [math]\displaystyle{ \int_{a}^{\infty} f (x) d x \approx \int^b_a f (x) d x \approx {\small\frac{(b - a)}{3 n}} \left[ f (x_0) + 4 \sum_{k = 1}^{n / 2} f (x_{2 k - 1}) + 2 \sum^{n / 2 - 1}_{k = 1} f (x_{2 k}) + f (x_n) \right] }[/math]
popełniając przy tym błąd
- [math]\displaystyle{ E_n = {\small\frac{M (b - a)^5}{180 n^4}} }[/math]
Zatem całkowity błąd jest nie większy niż
- [math]\displaystyle{ E = {\small\frac{M (b - a)^5}{180 n^4}} - G (b) }[/math]
Zauważmy, że równanie
- [math]\displaystyle{ {\small\frac{d}{d b}} \left( {\small\frac{M (b - a)^5}{180 n^4}} - G (b) \right) = 0 }[/math]
czyli
- [math]\displaystyle{ g(b) = {\small\frac{M (b - a)^4}{36 n^4}} }[/math]
jest warunkiem na minimalną wartość błędu. Wynika z niego optymalna wartość liczby podziałów [math]\displaystyle{ n }[/math] przedziału [math]\displaystyle{ [a, b] }[/math] dla wybranej wartości [math]\displaystyle{ b }[/math]
- [math]\displaystyle{ n^4 = {\small\frac{M (b - a)^4}{36 g (b)}} }[/math]
Ostatecznie dostajemy
- [math]\displaystyle{ n = (b - a) \cdot \sqrt[4]{{\small\frac{M}{36 g (b)}}} }[/math]
Błąd dla optymalnej wartości [math]\displaystyle{ n }[/math] wynosi
- [math]\displaystyle{ {\small\frac{M (b - a)^5}{180 n^4}} - G (b) = {\small\frac{M (b - a)^5}{180}} \cdot {\small\frac{36 g (b)}{M (b - a)^4}} - G (b) = {\small\frac{(b - a) g (b)}{5}} - G (b) }[/math]
Co należało pokazać.
□
Uwaga F23
Na podstawie twierdzenia F22, możemy napisać w PARI/GP program do przybliżonego liczenia całek niewłaściwych. Jeżeli parametrowi num
przypiszemy wartość -1 (wartość domyślna), to zostanie wyliczona optymalna liczba podziałów
- [math]\displaystyle{ n = (b - a) \cdot \sqrt[4]{{\small\frac{M}{36 g (b)}}} }[/math]
(czyli taka, aby błąd był najmniejszy). Jeżeli parametr num
przyjmie wartość -2, to optymalna liczba podziałów [math]\displaystyle{ n }[/math] zostanie zapisana w postaci potęgi liczby 2 (o wartości najbliższej optymalnej liczbie podziałów). W przypadku, gdy parametr num
jest liczbą większą od zera, będzie on użyty do obliczeń jako liczba przedziałów [math]\displaystyle{ n }[/math].
Program jest prosty, ale wymaga (zgodnie z twierdzeniem F22) nie tylko definicji funkcji podcałkowej, ale znacznie więcej. Przed uruchomieniem programu musimy
- 1. zdefiniować funkcję podcałkową [math]\displaystyle{ f(t) }[/math]
- 2. zdefiniować liczbę [math]\displaystyle{ M }[/math] będącą oszacowaniem od góry funkcji [math]\displaystyle{ | f^{(4)} (t) | }[/math] w przedziale [math]\displaystyle{ [a, b] }[/math]
- 3. zdefiniować funkcję [math]\displaystyle{ g(t) }[/math] taką, że [math]\displaystyle{ | f (t) | \leqslant g (t) }[/math] dla [math]\displaystyle{ t \geqslant b }[/math]
- 4. zdefiniować całkę nieoznaczoną [math]\displaystyle{ G(t) }[/math] funkcji [math]\displaystyle{ g(t) }[/math]
- 5. upewnić się, że całka [math]\displaystyle{ \int_{b}^{\infty} g (t) d t }[/math] jest zbieżna
- 6. sprawdzić, czy [math]\displaystyle{ \lim_{t \to + \infty} G (t) = 0 }[/math], a gdyby tak nie było, to zmienić definicję funkcji [math]\displaystyle{ G(t) }[/math]
Dopiero po wykonaniu tych czynności możemy uruchomić program Simproper(a, b, num)
Simproper(a, b, num = -1) = { local(err, h, k, n, S); n = if( num <= 0, floor( (b - a) * ( M/36/g(b) )^(1/4) ), num ); n = 2 * floor( (n+1)/2 ); if( num == -2, n = 2^floor( log(n)/log(2) + 1/2 ) ); h = 1.0*(b - a)/n; S = f(a) + 4 * sum(k = 1, n/2, f(a + (2*k-1)*h)) + 2 * sum(k = 1, n/2 - 1, f(a + 2*k*h)) + f(b); S = (b - a)/(3*n) * S; err = 1.0 * M * (b - a)^5 / (180 * n^4) - G(b); return( [S, err] ); }
Jeżeli funkcja [math]\displaystyle{ g(t) }[/math] jest szybko zbieżna, to nie należy prowadzić obliczeń w zbyt szerokim przedziale. Program będzie usiłował zapewnić odpowiednio mały błąd wyliczanej całki i liczba podziałów przedziału [math]\displaystyle{ [a, b] }[/math] może osiągnąć ogromne wartości, a obliczenia będą bardzo czasochłonne.
Przykład F24
Rozważmy całkę [math]\displaystyle{ \int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t^3}} d t }[/math].
- [math]\displaystyle{ \int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t^3}} d t = 0.0032550962148135833916711170162561745391641476739599050514576388 \qquad }[/math] (WolframAlpha)
Tak dokładny rezultat jest możliwy, ponieważ
- [math]\displaystyle{ \int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t^3}} d t = {\small\frac{1}{2}} \mathop{\textnormal{Si}}(2 \pi) - {\small\frac{\pi}{4}} + {\small\frac{1}{4 \pi}} }[/math]
gdzie funkcja [math]\displaystyle{ \mathop{\textnormal{Si}}(x) = \int^x_0 {\small\frac{\sin (t)}{t}} d t }[/math] (sinus całkowy[5][6][7]) jest funkcją specjalną i wiemy, jak obliczać jej wartości z wysoką dokładnością.
Aby skorzystać z programu Simproper(a, b, num), musimy przygotować
- [math]\displaystyle{ f(t) = {\small\frac{\sin (t)}{t^3}} }[/math]
- [math]\displaystyle{ g(t) = {\small\frac{1}{t^3}} }[/math]
- [math]\displaystyle{ G(t) = - {\small\frac{1}{2 t^2}} }[/math]
- [math]\displaystyle{ \lim_{t \to + \infty} G (t) = 0 }[/math]
- [math]\displaystyle{ M \geqslant \underset{t \geqslant 2 \pi}{\max} | f^{(4)} (t) | }[/math] dla [math]\displaystyle{ M = 0.004 }[/math]
Dla różnych wartości [math]\displaystyle{ b }[/math] otrzymujemy
Simproper(2*Pi, 10^5)
[0.0032550962148146005117256508966635416723, 6.9998742421027342073324279855934715203 E-11]
Simproper(2*Pi, 3*10^5)
[0.0032550962148136208735774540186061237864, 7.7777312525236569255722454074806518694 E-12]
Przykład F25
Rozważmy całkę oznaczoną
- [math]\displaystyle{ \int_{0}^{\infty} {\small\frac{d t}{e^t + t}} = 0.8063956162073262251 \ldots \qquad }[/math] (WolframAlpha)
Aby skorzystać z programu Simproper(a, b, num), musimy przygotować
- [math]\displaystyle{ f(t) = {\small\frac{1}{e^t + t}} }[/math]
- [math]\displaystyle{ g(t) = {\small\frac{1}{e^t}} }[/math]
- [math]\displaystyle{ G(t) = - {\small\frac{1}{e^t}} }[/math]
- [math]\displaystyle{ \lim_{t \to + \infty} G (t) = 0 }[/math]
- [math]\displaystyle{ M \geqslant \underset{t \geqslant 0}{\max} | f^{(4)} (t) | }[/math] dla [math]\displaystyle{ M = 261 }[/math]
Dla różnych wartości [math]\displaystyle{ b }[/math] otrzymujemy
Simproper(0, 40)
[0.80639561620732622105189277802198625914, 3.8235099324937067671907345290643700420 E-17]
Simproper(0, 50)
[0.80639561620732622517960851949178238112, 2.1216247131181941474567287282139719553 E-21]
Zadanie F26
Policzyć wartość całki
- [math]\displaystyle{ \int_{0}^{\infty} {\small\frac{d t}{e^t + t^2}} = 0.818759031812863 \ldots \qquad }[/math] (WolframAlpha)
Uwaga F27
Czytelnik zapewne zwrócił uwagę na ograniczony zakres stosowania twierdzenia F22. Nawet prostej całki [math]\displaystyle{ \int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t}} d t }[/math] nie jesteśmy w stanie w ten sposób policzyć, bo [math]\displaystyle{ \int_{2 \pi}^{\infty} {\small\frac{d t}{t}} }[/math] jest rozbieżna. Poniżej pokażemy, jak można zwiększyć zakres stosowania tego twierdzenia. Rozpoczniemy od udowodnienia analogicznych wzorów do wzoru z twierdzenia E23. Funkcje Bernoulliego zostały zastąpione funkcjami [math]\displaystyle{ \sin (x) }[/math] i [math]\displaystyle{ \cos (x) }[/math].
Twierdzenie F28
Jeżeli funkcja [math]\displaystyle{ f(t) }[/math] jest klasy [math]\displaystyle{ C^n }[/math], to
- [math]\displaystyle{ \int f (t) \sin (t) d t = - \sum_{k = 0}^{n - 1} f^{(k)} (t) \cos \! \left( t + {\small\frac{k \pi}{2}} \right) + \int f^{(n)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) d t }[/math]
- [math]\displaystyle{ \int f (t) \cos (t) d t = \sum_{k = 0}^{n - 1} f^{(k)} (t) \sin \! \left( t + {\small\frac{k \pi}{2}} \right) - \int f^{(n)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) d t }[/math]
Punkt 1.
Indukcja matematyczna. Sprawdzamy prawdziwość wzoru dla [math]\displaystyle{ n = 1 }[/math].
- [math]\displaystyle{ \int f (t) \sin (t) d t = - f^{(0)} (t) \cos (t) + \int f^{(1)} (t) \cos (t) d t }[/math]
- [math]\displaystyle{ \;\;\; = - f (t) \cos (t) + \int f' (t) \cos (t) d t }[/math]
Zauważmy, że
- [math]\displaystyle{ \frac{d}{d t} \left [ f^{(n)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) \right ] = f^{(n + 1)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) + f^{(n)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) }[/math]
Zatem
- [math]\displaystyle{ f^{(n)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) = \frac{d}{d t} \left [ f^{(n)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) \right ] - f^{(n + 1)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) }[/math]
- [math]\displaystyle{ \int f^{(n)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) d t = f^{(n)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) - \int f^{(n + 1)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) d t }[/math]
Zakładając, że wzór jest prawdziwy dla liczby naturalnej [math]\displaystyle{ n }[/math] i korzystając z pokazanego przed chwilą związku, otrzymujemy dla [math]\displaystyle{ n + 1 }[/math].
- [math]\displaystyle{ \int f (t) \sin (t) d t = - \sum_{k = 0}^{n - 1} f^{(k)} (t) \cos \! \left( t + {\small\frac{k \pi}{2}} \right) + \int f^{(n)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) d t }[/math]
- [math]\displaystyle{ \;\;\,\, = - \sum_{k = 0}^{n - 1} f^{(k)} (t) \cos \! \left( t + {\small\frac{k \pi}{2}} \right) + f^{(n)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) - \int f^{(n + 1)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) d t }[/math]
- [math]\displaystyle{ \;\;\,\, = - \sum_{k = 0}^{n - 1} f^{(k)} (t) \cos \! \left( t + {\small\frac{k \pi}{2}} \right) - f^{(n)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} + {\small\frac{\pi}{2}} \right) + \int f^{(n + 1)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} + {\small\frac{\pi}{2}} \right) d t }[/math]
- [math]\displaystyle{ \;\;\,\, = - \sum_{k = 0}^{n} f^{(k)} (t) \cos \! \left( t + {\small\frac{k \pi}{2}} \right) + \int f^{(n + 1)} (t) \cos \! \left( t + {\small\frac{n \pi}{2}} \right) d t }[/math]
Co kończy dowód indukcyjny.
Punkt 2.
Indukcja matematyczna. Sprawdzamy prawdziwość wzoru dla [math]\displaystyle{ n = 1 }[/math].
- [math]\displaystyle{ \int f (t) \cos (t) d t = f^{(0)} (t) \sin (t) - \int f^{(1)} (t) \sin (t) d t }[/math]
- [math]\displaystyle{ \;\;\; = f (t) \sin (t) - \int f' (t) \sin (t) d t }[/math]
Zauważmy, że
- [math]\displaystyle{ \frac{d}{d t} \left [ f^{(n)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) \right ] = f^{(n + 1)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) - f^{(n)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) }[/math]
Zatem
- [math]\displaystyle{ f^{(n)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) = - \frac{d}{d t} \left [ f^{(n)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) \right ] + f^{(n + 1)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) }[/math]
- [math]\displaystyle{ \int f^{(n)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) d t = - f^{(n)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) + \int f^{(n + 1)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) d t }[/math]
Zakładając, że wzór jest prawdziwy dla liczby naturalnej [math]\displaystyle{ n }[/math] i korzystając z pokazanego przed chwilą związku, otrzymujemy dla [math]\displaystyle{ n + 1 }[/math].
- [math]\displaystyle{ \int f (t) \cos (t) d t = \sum_{k = 0}^{n - 1} f^{(k)} (t) \sin \! \left( t + {\small\frac{k \pi}{2}} \right) - \int f^{(n)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) d t }[/math]
- [math]\displaystyle{ \;\;\,\, = \sum_{k = 0}^{n - 1} f^{(k)} (t) \sin \! \left( t + {\small\frac{k \pi}{2}} \right) + f^{(n)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) - \int f^{(n + 1)} (t) \cos \! \left( t + {\small\frac{(n - 1) \pi}{2}} \right) d t }[/math]
- [math]\displaystyle{ \;\;\,\, = \sum_{k = 0}^{n - 1} f^{(k)} (t) \sin \! \left( t + {\small\frac{k \pi}{2}} \right) + f^{(n)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} + {\small\frac{\pi}{2}} \right) - \int f^{(n + 1)} (t) \sin \! \left( t + {\small\frac{(n - 1) \pi}{2}} + {\small\frac{\pi}{2}} \right) d t }[/math]
- [math]\displaystyle{ \;\;\,\, = \sum_{k = 0}^{n} f^{(k)} (t) \sin \! \left( t + {\small\frac{k \pi}{2}} \right) - \int f^{(n + 1)} (t) \sin \! \left( t + {\small\frac{n \pi}{2}} \right) d t }[/math]
Co kończy dowód indukcyjny.
□
Uwaga F29
Z twierdzenia F27 wynika natychmiast, że prawdziwe są następujące wzory
- [math]\displaystyle{ \int f (t) \sin (t) d t = - f (t) \cos (t) + \int f^{(1)} (t) \cos (t) d t }[/math]
- [math]\displaystyle{ \int f (t) \sin (t) d t = - f (t) \cos (t) + f^{(1)} (t) \sin (t) - \int f^{(2)} (t) \sin (t) d t }[/math]
- [math]\displaystyle{ \int f (t) \sin (t) d t = - f (t) \cos (t) + f^{(1)} (t) \sin (t) + f^{(2)} (t) \cos (t) - \int f^{(3)} (t) \cos (t) d t }[/math]
- [math]\displaystyle{ \int f (t) \sin (t) d t = - f (t) \cos (t) + f^{(1)} (t) \sin (t) + f^{(2)} (t) \cos (t) - f^{(3)} (t) \sin (t) + \int f^{(4)} (t) \sin (t) d t }[/math]
Uwaga F30
Z twierdzenia F27 wynika natychmiast, że prawdziwe są następujące wzory
- [math]\displaystyle{ \int f (t) \cos (t) d t = f (t) \sin (t) - \int f^{(1)} (t) \sin (t) d t }[/math]
- [math]\displaystyle{ \int f (t) \cos (t) d t = f (t) \sin (t) + f^{(1)} (t) \cos (t) - \int f^{(2)} (t) \cos (t) d t }[/math]
- [math]\displaystyle{ \int f (t) \cos (t) d t = f (t) \sin (t) + f^{(1)} (t) \cos (t) - f^{(2)} (t) \sin (t) + \int f^{(3)} (t) \sin (t) d t }[/math]
- [math]\displaystyle{ \int f (t) \cos (t) d t = f (t) \sin (t) + f^{(1)} (t) \cos (t) - f^{(2)} (t) \sin (t) - f^{(3)} (t) \cos (t) + \int f^{(4)} (t) \cos (t) d t }[/math]
Przykład F31
Rozważmy całkę
- [math]\displaystyle{ \int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t}} d t = 0.152644750662268168985541529340002012956131350392536638644752066 \ldots \qquad }[/math] (WolframAlpha)
Nie możemy wprost zastosować twierdzenia F22, ale korzystając ze wzoru podanego w uwadze F29, otrzymujemy
- [math]\displaystyle{ \int f (t) \sin (t) d t = - f (t) \cos (t) + f^{(1)} (t) \sin (t) - \int f^{(2)} (t) \sin (t) d t }[/math]
Zatem
- [math]\displaystyle{ \int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t}} d t = - {\small\frac{\cos (t)}{t}} \biggr\rvert_{2 \pi}^{\infty} - {\small\frac{\sin (t)}{t^2}} \biggr\rvert_{2 \pi}^{\infty} - 2 \int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t^3}} d t }[/math]
- [math]\displaystyle{ \, = {\small\frac{1}{2 \pi}} - 2 \int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t^3}} d t }[/math]
Całkę [math]\displaystyle{ \int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t^3}} d t }[/math] umiemy już obliczyć (przykład F24), zatem bez trudu policzymy całkę [math]\displaystyle{ \int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t}} d t }[/math]. Skoro poszło nam tak dobrze, to spróbujmy wykorzystać wzór
- [math]\displaystyle{ \int f (t) \sin (t) d t = - f (t) \cos (t) + f^{(1)} (t) \sin (t) + f^{(2)} (t) \cos (t) - f^{(3)} (t) \sin (t) + \int f^{(4)} (t) \sin (t) d t }[/math]
Otrzymujemy
- [math]\displaystyle{ \int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t}} d t = - {\small\frac{\cos (t)}{t}} \biggr\rvert_{2 \pi}^{\infty} - {\small\frac{\sin (t)}{t^2}} \biggr\rvert_{2 \pi}^{\infty} + 2 {\small\frac{\cos (t)}{t^3}} \biggr\rvert_{2 \pi}^{\infty} + 6 {\small\frac{\sin (t)}{t^4}} \biggr\rvert_{2 \pi}^{\infty} + 24 \int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t^5}} d t }[/math]
- [math]\displaystyle{ \, = {\small\frac{1}{2 \pi}} - {\small\frac{1}{4 \pi^3}} + 24 \int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t^5}} d t }[/math]
Aby policzyć numerycznie całkę po prawej stronie, musimy przygotować:
- [math]\displaystyle{ f(t) = {\small\frac{\sin (t)}{t^5}} }[/math]
- [math]\displaystyle{ g(t) = {\small\frac{1}{t^5}} }[/math]
- [math]\displaystyle{ G(t) = - {\small\frac{1}{4 t^4}} }[/math]
- [math]\displaystyle{ \lim_{t \to + \infty} G (t) = 0 }[/math]
- [math]\displaystyle{ M \geqslant \underset{t \geqslant 2 \pi}{\max} | f^{(4)} (x) | }[/math] dla [math]\displaystyle{ M = 6 \cdot 10^{- 5} }[/math]
Dla różnych wartości [math]\displaystyle{ b }[/math] otrzymujemy
Simproper(2*Pi, 10^3)
[6.4695465777027289767180972728663860875 E-5, 4.4874345453688215509527110951904781824 E-13]
Simproper(2*Pi, 10^4)
[6.4695465778029401532128088001319549975 E-5, 4.4987432411781955704707501103003654673 E-17]
Uzyskaliśmy wynik
- [math]\displaystyle{ \int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t^5}} d t = {\color{Red} 6.469546577}8029 \cdot 10^{- 5} }[/math]
Dla porównania
- [math]\displaystyle{ \int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t^5}} d t = 6.46954657780293963651366308178572112473974453729045450304230 \cdot 10^{- 5} \qquad }[/math] (WolframAlpha)
I ostatecznie dostajemy
- [math]\displaystyle{ \int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t}} d t = {\small\frac{1}{2 \pi}} - {\small\frac{1}{4 \pi^3}} + 24 \int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{t^5}} d t = {\color{Red} 0.15264475066226}8169 }[/math]
Korzystając z przykładu F24, uzyskalibyśmy mniej dokładny wynik.
Przykład F32
Pokażemy, że
- [math]\displaystyle{ \int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{\log (t)}} d t = 0.5319715471471 \ldots }[/math]
W tym przypadku również nie możemy wprost zastosować twierdzenia F22, ale korzystając ze wzoru na całkowanie przez części
- [math]\displaystyle{ \int f (t) \sin (t) d t = - f (t) \cos (t) + f^{(1)} (t) \sin (t) + f^{(2)} (t) \cos (t) - f^{(3)} (t) \sin (t) + \int f^{(4)} (t) \sin (t) d t }[/math]
dostajemy
- [math]\displaystyle{ \int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{\log (t)}} d t = - {\small\frac{\cos (t)}{\log (t)}} \biggr\rvert_{2 \pi}^{\infty} - {\small\frac{\sin (t)}{t \cdot \log^2 (t)}} \biggr\rvert_{2 \pi}^{\infty} + {\small\frac{(\log (t) + 2) \cos (t)}{t^2 \cdot \log^3 (t)}} \biggr\rvert_{2 \pi}^{\infty} - f^{(3)} (t) \sin (t) \biggr\rvert_{2 \pi}^{\infty} + \int_{2 \pi}^{\infty} {\small\frac{(6 \log^3 (t) + 22 \log^2 (t) + 36 \log (t) + 24) \cdot \sin (t)}{t^4 \cdot \log^5 (t)}} d t }[/math]
- [math]\displaystyle{ \: = {\small\frac{1}{\log (2 \pi)}} - {\small\frac{\log (2 \pi) + 2}{(2 \pi)^2 \cdot \log^3 (2 \pi)}} + \int_{2 \pi}^{\infty} {\small\frac{(6 \log^3 (t) + 22 \log^2 (t) + 36 \log (t) + 24) \cdot \sin (t)}{t^4 \cdot \log^5 (t)}} d t }[/math]
Aby skorzystać z programu Simproper(a, b, num), musimy przygotować
- [math]\displaystyle{ f(t) = {\small\frac{(6 \log^3 (t) + 22 \log^2 (t) + 36 \log (t) + 24) \cdot \sin (t)}{t^4 \cdot \log^5 (t)}} }[/math]
- [math]\displaystyle{ g(t) = {\small\frac{6 \log^3 (t) + 22 \log^2 (t) + 36 \log (t) + 24}{t^4 \cdot \log^5 (t)}} }[/math]
- [math]\displaystyle{ G(t) = - {\small\frac{2 \log^2 (t) + 6 \log (t) + 6}{t^3 \cdot \log^4 (t)}} }[/math]
- [math]\displaystyle{ \lim_{t \to + \infty} G (t) = 0 }[/math]
- [math]\displaystyle{ M \geqslant \underset{t \geqslant 2 \pi}{\max} | f^{(4)} (t) | }[/math] dla [math]\displaystyle{ M = 0.011 }[/math]
Dla różnych wartości [math]\displaystyle{ b }[/math] otrzymujemy
Simproper(2*Pi, 10^4)
[0.0035251602572557803759192121691047755503, 5.2926827357763320615993244790723469003 E-14]
Simproper(2*Pi, 2*10^4)
[0.0035251602572557723629683384320660178268, 5.5938553808328833862080836586551636221 E-15]
Uzyskujemy wynik
- [math]\displaystyle{ \int_{2 \pi}^{\infty} {\small\frac{(6 \log^3 (t) + 22 \log^2 (t) + 36 \log (t) + 24) \cdot \sin (t)}{t^4 \cdot \log^5 (t)}} d t = {\color{Red} 0.0035251602572}5577 }[/math]
I ostatecznie dostajemy
- [math]\displaystyle{ \int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{\log (t)}} d t = {\small\frac{1}{\log (2 \pi)}} - {\small\frac{\log (2 \pi) + 2}{(2 \pi)^2 \cdot \log^3 (2 \pi)}} + \int^{\infty}_{2 \pi} {\small\frac{(6 \log^3 (t) + 22 \log^2 (t) + 36 \log (t) + 24) \sin (t)}{t^4 \cdot \log^5 (t)}} d t = {\color{Red} 0.5319715471471}5371 }[/math]
Zadanie F33
Pokazać, że
- [math]\displaystyle{ \int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{\log (\log (t))}} d t = 1.56477817589 \ldots }[/math]
Zadanie tylko dla wytrwałych. Bez Maximy lub innego systemu wspomagającego obliczenia symboliczne nie ma sensu tracić czasu. Postępując analogicznie jak w przykładzie F32, otrzymujemy
- [math]\displaystyle{ \int_{2 \pi}^{\infty} {\small\frac{\sin (t)}{\log (\log (t))}} d t = - {\small\frac{\cos (t)}{\log (\log (t))}} \biggr\rvert_{2 \pi}^{\infty} - {\small\frac{\sin (t)}{t \cdot \log (t) \cdot \log^2 (\log (t))}} \biggr\rvert_{2 \pi}^{\infty} + {\small\frac{(\log (t) \cdot \log (\log (t)) + \log (\log (t)) + 2) \cos (t)}{t^2 \cdot \log^2 (t) \cdot \log^3 (\log (t))}} \biggr\rvert_{2 \pi}^{\infty} - f^{(3)} (t) \sin (t) \biggr\rvert_{2 \pi}^{\infty} + }[/math]
- [math]\displaystyle{ + \int_{2 \pi}^{\infty} {\small\frac{\log^3 (\log (t)) \cdot (6 \log^3 (t) + 11 \log^2 (t) + 12 \log (t) + 6) + \log^2 (\log (t)) \cdot (22 \log^2 (t) + 36 \log (t) + 22) + 36 \log (\log (t)) \cdot (\log (t) + 1) + 24}{t^4 \cdot \log^4 (t) \cdot \log^5 (\log (t))}} \cdot \sin (t) d t }[/math]
- [math]\displaystyle{ \; = {\small\frac{1}{\log (\log (2 \pi))}} - {\small\frac{\log (2 \pi) \cdot \log (\log (2 \pi)) + \log (\log (2 \pi)) + 2}{(2 \pi)^2 \cdot \log^2 (2 \pi) \cdot \log^3 (\log (2 \pi))}} + }[/math]
- [math]\displaystyle{ + \int_{2 \pi}^{\infty} {\small\frac{\log^3 (\log (t)) \cdot (6 \log^3 (t) + 11 \log^2 (t) + 12 \log (t) + 6) + \log^2 (\log (t)) \cdot (22 \log^2 (t) + 36 \log (t) + 22) + 36 \log (\log (t)) \cdot (\log (t) + 1) + 24}{t^4 \cdot \log^4 (t) \cdot \log^5 (\log (t))}} \cdot \sin (t) d t }[/math]
Znajdujemy wartość całki
- [math]\displaystyle{ \int_{2 \pi}^{\infty} {\small\frac{\log^3 (\log (t)) \cdot (6 \log^3 (t) + 11 \log^2 (t) + 12 \log (t) + 6) + \log^2 (\log (t)) \cdot (22 \log^2 (t) + 36 \log (t) + 22) + 36 \log (\log (t)) \cdot (\log (t) + 1) + 24}{t^4 \cdot \log^4 (t) \cdot \log^5 (\log (t))}} \cdot \sin (t) d t = {\color{Red} 0.045677031827}2121 }[/math]
Simproper(2*Pi, 10^4)
[0.045677031827212178675227765630555037139, 9.7610450502314738753491941212628080885 E-14]
□
Przykład F34
Rozważmy całkę (zobacz przykład E43)
- [math]\displaystyle{ \int_{1}^{\infty} {\small\frac{P_1 (t)}{t}} d t = {\small\frac{1}{2}} \log (2 \pi) - 1 = - 0.081061466795327258219670263594382360138602526362216587 \ldots }[/math]
Nie możemy wprost zastosować twierdzenia F22, ale korzystając z twierdzenia E23, dostajemy
- [math]\displaystyle{ \int_1^{\infty} {\small\frac{P_1 (t)}{t}} d t = - {\small\frac{41}{504}} + {\small\frac{1}{6}} \int_{1}^{\infty} {\small\frac{P_6 (t)}{t^6}} d t }[/math]
Funkcja [math]\displaystyle{ P_6 (t) }[/math] jest klasy [math]\displaystyle{ C^4 ( \mathbb{R} ) }[/math], a całka [math]\displaystyle{ \int_{1}^{\infty} {\small\frac{B_6}{t^6}} d t }[/math] jest zbieżna. Teraz już możemy zastosować twierdzenie F22.
Aby skorzystać z programu Simproper(a, b), musimy przygotować
- [math]\displaystyle{ f(t) = {\small\frac{P_6 (t)}{6 t^6}} }[/math]
- [math]\displaystyle{ g(t) = {\small\frac{B_6}{6 t^6}} = {\small\frac{1}{252 t^6}} }[/math]
- [math]\displaystyle{ G(t) = - {\small\frac{1}{1260 t^5}} }[/math]
- [math]\displaystyle{ \lim_{t \to + \infty} G (t) = 0 }[/math]
- [math]\displaystyle{ M \geqslant \underset{t \geqslant 1}{\max} | f^{(4)} (t) | }[/math] dla [math]\displaystyle{ M = 20 }[/math]
Dla różnych wartości [math]\displaystyle{ b }[/math] otrzymujemy
Simproper(1, 10^2)
[0.00028773955387901889817011277755076495293, 1.5793583624619615295181246127899383386 E-13]
Simproper(1, 5*10^2)
[0.00028773955387909098236994835644747087376, 5.0742857958929735807438325674790730659 E-17]
Uzyskaliśmy wynik
- [math]\displaystyle{ \int_{1}^{\infty} {\small\frac{P_6 (t)}{6 t^6}} d t = {\color{Red} 0.000287739553879}0909 }[/math]
Skąd wynika natychmiast wartość obliczanej przez nas całki
- [math]\displaystyle{ \int_1^{\infty} {\small\frac{P_1 (t)}{t}} d t = - {\small\frac{41}{504}} + {\small\frac{1}{6}} \int_{1}^{\infty} {\small\frac{P_6 (t)}{t^6}} d t = {\color{Red} - 0.081061466795327}2582 }[/math]
Uzupełnienia
Jeszcze o funkcjach kawałkami klasy [math]\displaystyle{ C^n }[/math]
Uwaga F35
Niekiedy, dla uproszczenia zapisu, będziemy używali następujących oznaczeń dla wartości granic w wybranym punkcie
- [math]\displaystyle{ f(a^+) = \lim_{x \to a^+} f (x) }[/math]
- [math]\displaystyle{ f(a^-) = \lim_{x \to a^-} f (x) }[/math]
Takie oznaczenie ma nawet pewien sens, ponieważ granice możemy zapisywać w różny sposób, natomiast efekt jest jeden i ujmują go powyższe symbole. Przykładowo
- [math]\displaystyle{ f(a^+) = \lim_{x \to a^+} f (x) = \lim_{h \to 0^+} f (a + h) }[/math]
Pozwoli to łatwo odróżnić wartości granic od wartości funkcji [math]\displaystyle{ f(a) }[/math] i prosto zapisać własności funkcji. Przykładowo funkcja [math]\displaystyle{ f(x) }[/math] jest ciągła w punkcie [math]\displaystyle{ a }[/math], gdy
- istnieją skończone granice [math]\displaystyle{ f(a^-) }[/math] i [math]\displaystyle{ f (a^+) }[/math]
- [math]\displaystyle{ f(a^-) = f (a^+) = f (a) }[/math]
W przypadku pochodnych wprowadzimy oznaczenie pozwalające odróżnić wartość pochodnej prawostronnej od pochodnej lewostronnej.
- [math]\displaystyle{ \partial_+ f (a) = \lim_{h \to 0^+} {\small\frac{f (a + h) - f (a)}{h}} }[/math]
- [math]\displaystyle{ \partial_- f (a) = \lim_{h \to 0^-} {\small\frac{f (a + h) - f (a)}{h}} }[/math]
Podobnie i w tym przypadku różny zapis granic daje ten sam efekt
- [math]\displaystyle{ \partial_+ f (a) = \lim_{x \to a^+} {\small\frac{f (x) - f (a)}{x - a}} = \lim_{h \to 0^+} {\small\frac{f (a + h) - f (a)}{h}} }[/math]
Przykładowo pochodna [math]\displaystyle{ f' (x) }[/math] istnieje w punkcie [math]\displaystyle{ a }[/math], gdy
- istnieją skończone granice [math]\displaystyle{ \partial_+ f (a) }[/math] i [math]\displaystyle{ \partial_- f (a) }[/math]
- [math]\displaystyle{ \partial_+ f (a) = \partial_- f (a) = f' (a) }[/math]
Pochodna [math]\displaystyle{ f' (x) }[/math] jest ciągła w punkcie [math]\displaystyle{ a }[/math], gdy
- istnieją skończone granice [math]\displaystyle{ f' (a^-) }[/math] i [math]\displaystyle{ f' (a^+) }[/math]
- [math]\displaystyle{ f' (a^-) = f' (a^+) = f' (a) }[/math]
Uwaga F36
Podkreślmy, że granica funkcji w punkcie (powiedzmy [math]\displaystyle{ x = a }[/math]) nie jest wartością funkcji w tym punkcie. Jest tak tylko wtedy, gdy funkcja jest ciągła w punkcie [math]\displaystyle{ x = a }[/math]. Analogicznie granica pochodnej w punkcie nie jest wartością pochodnej w tym punkcie. Jest tak tylko wtedy, gdy spełnione są pewne warunki. Twierdzenia F37 i F38 określają te warunki i dlatego są bardzo istotne.
Traktowanie granicy funkcji [math]\displaystyle{ f' (x) }[/math] w punkcie [math]\displaystyle{ x = 0 }[/math] jako wartości pochodnej w tym punkcie, bez odwołania się do wspomnianych twierdzeń, jest błędem. Dobrym przykładem jest funkcja
- [math]\displaystyle{ f(x) = \left\{ \begin{array}{lll} x^2 \sin \left( {\small\frac{1}{x}} \right) & & x \neq 0\\ 0 & & x = 0 \end{array} \right. }[/math]
Funkcja ta ma pochodną w punkcie [math]\displaystyle{ x = 0 }[/math], ale granice pochodnej w tym punkcie nie istnieją (zobacz zadanie F9).
Twierdzenie F37
Niech [math]\displaystyle{ \varepsilon \gt 0 }[/math]. Jeżeli funkcja [math]\displaystyle{ f(x) }[/math] jest ciągła w [math]\displaystyle{ [a, a + \varepsilon) }[/math] i różniczkowalna[8] w [math]\displaystyle{ (a, a + \varepsilon) }[/math] oraz istnieje granica (skończona lub nieskończona) [math]\displaystyle{ \lim_{x \to a^+} f' (x) }[/math], to pochodna prawostronna w punkcie [math]\displaystyle{ a }[/math] jest równa tej granicy: [math]\displaystyle{ \partial_+ f (a) = f' (a^+) }[/math].
Z definicji pochodna prawostronna jest równa
- [math]\displaystyle{ \partial_+ f (a) = \lim_{h \to 0^+} {\small\frac{f (a + h) - f (a)}{h}} }[/math]
Zauważmy, że dla [math]\displaystyle{ h \lt \varepsilon }[/math] funkcja [math]\displaystyle{ f(x) }[/math] jest ciągła w [math]\displaystyle{ [a, a + h] }[/math], a [math]\displaystyle{ f' (x) }[/math] istnieje i jest różniczkowalna [math]\displaystyle{ (a, a + h) }[/math]. Ponieważ spełnione są tym samym założenia twierdzenia Lagrange'a, to istnieje taki punkt [math]\displaystyle{ c \in (a, a + h) }[/math], że
- [math]\displaystyle{ f(a + h) - f (a) = f' (c) \cdot h }[/math]
Położenie punktu [math]\displaystyle{ c }[/math] w ogólności zależy od wyboru wartości [math]\displaystyle{ h }[/math], zatem wprowadźmy oznaczenie
- [math]\displaystyle{ c = a + \delta (h) }[/math]
gdzie [math]\displaystyle{ \delta (h) \gt 0 }[/math]. Układ nierówności [math]\displaystyle{ a \lt c \lt a + h }[/math] możemy teraz zapisać w postaci
- [math]\displaystyle{ a \lt a + \delta (h) \lt a + h }[/math]
Skąd wynika natychmiast, że
- [math]\displaystyle{ \lim_{h \to 0^+} \delta (h) = 0 }[/math]
Zbierając mamy
- [math]\displaystyle{ \partial_+ f (a) = \lim_{h \to 0^+} {\small\frac{f (a + h) - f (a)}{h}} = \lim_{h \to 0^+} f' (c) = \lim_{h \to 0^+} f' (a + \delta (h)) = \lim_{x \to a^+} f' (x) = f' (a^+) }[/math]
Co należało pokazać.
□
Analogiczne twierdzenie można sformułować i udowodnić dla lewostronnego otoczenia punktu [math]\displaystyle{ a }[/math].
Twierdzenie F38
Niech [math]\displaystyle{ \varepsilon \gt 0 }[/math]. Jeżeli funkcja [math]\displaystyle{ f(x) }[/math] jest ciągła w [math]\displaystyle{ [a - \varepsilon, a) }[/math] i różniczkowalna w [math]\displaystyle{ (a, a + \varepsilon) }[/math] oraz istnieje granica (skończona lub nieskończona) [math]\displaystyle{ \lim_{x \to a^-} f' (x) }[/math], to pochodna lewostronna w punkcie [math]\displaystyle{ a }[/math] jest równa tej granicy: [math]\displaystyle{ \partial_- f (a) = f' (a^-) }[/math].
Twierdzenie F39
Funkcja ciągła w przedziale [math]\displaystyle{ (a, b) }[/math] przyjmuje w tym przedziale jedynie wartości skończone.
Niech [math]\displaystyle{ f(x) }[/math] oznacza funkcję ciągłą w przedziale [math]\displaystyle{ (a, b) }[/math]. Przypuśćmy, że istnieje taki punkt [math]\displaystyle{ c \in (a, b) }[/math], że wartość funkcji [math]\displaystyle{ f(c) }[/math], nie jest skończona. Zatem dla [math]\displaystyle{ \varepsilon \gt 0 }[/math]
- [math]\displaystyle{ \varepsilon = \min \left( {\small\frac{c - a}{2}}, {\small\frac{b - c}{2}} \right) }[/math]
funkcja [math]\displaystyle{ f(x) }[/math] byłaby ciągła w przedziale [math]\displaystyle{ [c - \varepsilon, c + \varepsilon] }[/math], ale nie byłaby w tym przedziale ograniczona, co przeczyłoby twierdzeniu Weierstrassa[9].
□
Wniosek F40
Z twierdzenia F39 wynika natychmiast, że jeżeli funkcja [math]\displaystyle{ f(x) }[/math] ma ciągłą pochodną w przedziale [math]\displaystyle{ (a, b) }[/math], to funkcja [math]\displaystyle{ f(x) }[/math] jest w tym przedziale różniczkowalna.
Zadanie F41
Niech
- [math]\displaystyle{ f(x) = \left\{ \begin{array}{rrr} - (- x)^{1 / 3} & & x \lt 0\\ x^{1 / 3} & & x \geqslant 0 \end{array} \right. }[/math]
Korzystając z twierdzeń F37 i F38 znaleźć wartości pochodnej [math]\displaystyle{ f(x) }[/math] w [math]\displaystyle{ x = 0 }[/math].
Spójrzmy na wykres funkcji [math]\displaystyle{ f(x) }[/math]
Od razu dostrzegamy, że [math]\displaystyle{ f(x) }[/math] ma styczną pionową w punkcie [math]\displaystyle{ x = 0 }[/math]. Obliczając pochodną, dostajemy
- [math]\displaystyle{ f' (x) = \left\{ \begin{array}{rrr} \frac{1}{3} (- x)^{- 2 / 3} & & x \lt 0\\ \frac{1}{3} x^{- 2 / 3} & & x \geqslant 0 \end{array} \right. }[/math]
Funkcja [math]\displaystyle{ f(x) }[/math] jest ciągła w przedziale [math]\displaystyle{ [0, \varepsilon) }[/math] i ma ciągłą pochodną w przedziale [math]\displaystyle{ (0, \varepsilon) }[/math] oraz [math]\displaystyle{ f' (0^+) = + \infty }[/math], zatem w punkcie [math]\displaystyle{ x = 0 }[/math] mamy [math]\displaystyle{ \partial_+ f (0) = + \infty }[/math] (twierdzenie F37). Podobnie pokazujemy, że [math]\displaystyle{ \partial_- f (0) = + \infty }[/math]. Obliczając pochodne jednostronne z definicji, otrzymujemy
- [math]\displaystyle{ \partial_+ f (0) = \lim_{h \to 0^+} {\small\frac{f (0 + h) - f (0)}{h}} = \lim_{h \to 0^+} {\small\frac{h^{1 / 3} - 0}{h}} = \lim_{h \to 0^+} {\small\frac{1}{h^{2 / 3}}} = + \infty }[/math]
- [math]\displaystyle{ \partial_- f (0) = \lim_{h \to 0^-} {\small\frac{f (0 + h) - f (0)}{h}} = \lim_{h \to 0^-} {\small\frac{- (- h)^{1 / 3} - 0}{h}} = \lim_{h \to 0^-} {\small\frac{1}{(- h)^{2 / 3}}} = + \infty }[/math]
Możemy powiedzieć, że funkcja [math]\displaystyle{ f(x) }[/math] ma pochodną niewłaściwą w punkcie [math]\displaystyle{ x = 0 }[/math] równą [math]\displaystyle{ + \infty }[/math]. Ale nie powiemy, że [math]\displaystyle{ f(x) }[/math] ma pochodną (w zwykłym sensie) lub że jest różniczkowalna w tym punkcie. Zauważmy, że z istnienia nieskończonej pochodnej nie wynika ciągłość funkcji. Rozważmy
- [math]\displaystyle{ \mathop{\textnormal{sgn}}(x) = \left\{ \begin{array}{rrr} - 1 & & x \lt 0\\ 0 & & x = 0\\ 1 & & x \gt 0 \end{array} \right. }[/math]
Łatwo znajdujemy, że
- [math]\displaystyle{ \partial_+ \mathop{\textnormal{sgn}}(0) = \lim_{h \to 0^+} {\small\frac{\mathop{\textnormal{sgn}}(0 + h) - \mathop{\textnormal{sgn}}(0)}{h}} = \lim_{h \to 0^+} {\small\frac{1 - 0}{h}} = \lim_{h \to 0^+} {\small\frac{1}{h}} = + \infty }[/math]
- [math]\displaystyle{ \partial_- \mathop{\textnormal{sgn}}(0) = \lim_{h \to 0^-} {\small\frac{\mathop{\textnormal{sgn}}(0 + h) - \mathop{\textnormal{sgn}}(0)}{h}} = \lim_{h \to 0^-} {\small\frac{- 1 - 0}{h}} = - \lim_{h \to 0^-} {\small\frac{1}{h}} = + \infty }[/math]
Gdybyśmy uznali, że [math]\displaystyle{ \mathop{\textnormal{sgn}}(x) }[/math] jest różniczkowalna w [math]\displaystyle{ x = 0 }[/math], to mielibyśmy funkcję różniczkowalną i nieciągłą w [math]\displaystyle{ x = 0 }[/math].
□
Twierdzenie F42
Niech [math]\displaystyle{ c \in (a, b) }[/math]. Jeżeli funkcja [math]\displaystyle{ f(x) }[/math] jest ciągła w przedziale [math]\displaystyle{ (a, b) }[/math] i ma ciągłą pochodną w każdym z przedziałów [math]\displaystyle{ (a, c) }[/math] i [math]\displaystyle{ (c, b) }[/math] oraz istnieją skończone i równe sobie granice [math]\displaystyle{ \lim_{x \to c^-} f' (x) }[/math] i [math]\displaystyle{ \lim_{x \to c^+} f' (x) }[/math], to pochodna [math]\displaystyle{ f' (x) }[/math] jest ciągła w punkcie [math]\displaystyle{ x = c }[/math], czyli jest ciągła w [math]\displaystyle{ (a, b) }[/math].
Pochodna prawostronna z definicji jest równa
- [math]\displaystyle{ \partial_+ f (c) = \lim_{h \to 0^+} {\small\frac{f (c + h) - f (c)}{h}} }[/math]
O ile tylko [math]\displaystyle{ h \lt b - c }[/math], to funkcja [math]\displaystyle{ f(x) }[/math] jest ciągła w przedziale [math]\displaystyle{ [c, c + h) }[/math] i różniczkowalna w przedziale [math]\displaystyle{ (c, c + h) }[/math], czyli spełnione są założenia twierdzenia F37, zatem pochodna prawostronna w punkcie [math]\displaystyle{ c }[/math] jest równa
- [math]\displaystyle{ \partial_+ f (c) = \lim_{x \to c^+} f' (x) }[/math]
Ponieważ założyliśmy, że granica [math]\displaystyle{ \lim_{x \to c^+} f' (x) }[/math] jest skończona, to [math]\displaystyle{ f' (x) }[/math] jest prawostronnie ciągła w punkcie [math]\displaystyle{ c }[/math]. Podobnie pokazujemy, że [math]\displaystyle{ f' (x) }[/math] jest lewostronnie ciągła w [math]\displaystyle{ c }[/math]. Z założenia granice [math]\displaystyle{ \lim_{x \to c^-} f' (x) }[/math] i [math]\displaystyle{ \lim_{x \to c^+} f' (x) }[/math] są równe, zatem [math]\displaystyle{ f' (x) }[/math] jest ciągła w punkcie [math]\displaystyle{ c }[/math]. Co należało pokazać.
□
Z twierdzenia F42 wynika natychmiast
Twierdzenie F43
Niech funkcja [math]\displaystyle{ f(x) }[/math] będzie kawałkami klasy [math]\displaystyle{ C^1 ([a, b]) }[/math]. Funkcja [math]\displaystyle{ f(x) }[/math] jest klasy [math]\displaystyle{ C^1 ([a, b]) }[/math] wtedy i tylko wtedy, gdy jest ciągła w przedziale [math]\displaystyle{ [a, b] }[/math] i w każdym punkcie [math]\displaystyle{ x_k }[/math] (wyznaczającym podział przedziału [math]\displaystyle{ [a, b] }[/math]) granice lewostronna i granica prawostronna pochodnej [math]\displaystyle{ f' (x) }[/math] są sobie równe.
Zadanie F44
Niech
- funkcja [math]\displaystyle{ f(x) }[/math] będzie klasy [math]\displaystyle{ C^0 ([a, b]) }[/math]
- [math]\displaystyle{ c \in (a, b) }[/math]
- pochodna funkcji [math]\displaystyle{ f(x) }[/math] będzie funkcją ciągłą w przedziałach [math]\displaystyle{ [a, c) }[/math] i [math]\displaystyle{ (c, b] }[/math]
Pokazać, że
- jeżeli co najmniej jedna z granic [math]\displaystyle{ f' (c^-) }[/math] i [math]\displaystyle{ f' (c^+) }[/math] jest nieskończona, to funkcja [math]\displaystyle{ f(x) }[/math] nie jest różniczkowalna w punkcie [math]\displaystyle{ x = c }[/math] i oczywiście nie jest nawet kawałkami klasy [math]\displaystyle{ C^1 ([a, b]) }[/math]
- jeżeli istnieją skończone granice [math]\displaystyle{ f' (c^-) }[/math] i [math]\displaystyle{ f' (c^+) }[/math] i nie są sobie równe, to [math]\displaystyle{ f(x) }[/math] jest kawałkami klasy [math]\displaystyle{ C^1 ([a, b]) }[/math]
- jeżeli istnieją skończone granice [math]\displaystyle{ f' (c^-) }[/math] i [math]\displaystyle{ f' (c^+) }[/math] i są sobie równe, to funkcja [math]\displaystyle{ f(x) }[/math] jest klasy [math]\displaystyle{ C^1 ([a, b]) }[/math]
- jeżeli funkcja [math]\displaystyle{ f(x) }[/math] jest różniczkowalna w punkcie [math]\displaystyle{ x = c }[/math] oraz funkcja [math]\displaystyle{ f' (x) }[/math] jest nieciągła w punkcie [math]\displaystyle{ x = c }[/math], to co najmniej jedna z granic [math]\displaystyle{ f' (c^-) }[/math] i [math]\displaystyle{ f' (c^+) }[/math] nie istnieje; w efekcie funkcja [math]\displaystyle{ f(x) }[/math] nie jest nawet kawałkami klasy [math]\displaystyle{ C^1 ([a, b]) }[/math]
Punkt 1.
Dla ustalenia uwagi załóżmy, że [math]\displaystyle{ f' (c^+) = + \infty }[/math]. Ponieważ funkcja [math]\displaystyle{ f(x) }[/math] jest ciągła w [math]\displaystyle{ [a, b] }[/math], pochodna funkcji [math]\displaystyle{ f(x) }[/math] jest ciągła w [math]\displaystyle{ (c, b] }[/math] oraz istnieje (nieskończona) granica [math]\displaystyle{ f' (c^+) }[/math], to z twierdzenia F37 wiemy, że pochodna prawostronna w punkcie [math]\displaystyle{ a }[/math] jest równa tej granicy, czyli [math]\displaystyle{ \partial_+ f (c) = f' (c^+) = + \infty }[/math] . Wynika stąd, że funkcja [math]\displaystyle{ f(x) }[/math] nie jest różniczkowalna w punkcie [math]\displaystyle{ x = c }[/math]. Oczywiście funkcja [math]\displaystyle{ f(x) }[/math] nie nie jest nawet kawałkami klasy [math]\displaystyle{ C^1 ([a, b]) }[/math], już ze względu na uczynione założenie, że co najmniej jedna z granic [math]\displaystyle{ f' (c^-) }[/math] i [math]\displaystyle{ f' (c^+) }[/math] nie jest skończona.
Przykład
Rozważmy funkcję
- [math]\displaystyle{ f(x) = \left\{ \begin{array}{lll} 0 & & x \lt 0\\ x^{2 / 3} & & x \geqslant 0 \end{array} \right. }[/math]
Funkcja jest klasy [math]\displaystyle{ C^0 ([- 5, 5]) }[/math]. Wartość pochodnej lewostronnej i prawostronnej w punkcie [math]\displaystyle{ x = 0 }[/math] policzymy z definicji
- [math]\displaystyle{ \partial_- f (0) = \lim_{h \to 0^-} {\small\frac{f (0 + h) - 0}{h}} = {\small\frac{0 - 0}{h}} = 0 }[/math]
- [math]\displaystyle{ \partial_+ f (0) = \lim_{h \to 0^+} {\small\frac{f (0 + h) - 0}{h}} = {\small\frac{h^{2 / 3} - 0}{h}} = {\small\frac{1}{h^{1 / 3}}} = + \infty }[/math]
Obliczając pochodną funkcji [math]\displaystyle{ f(x) }[/math] dostajemy
- [math]\displaystyle{ f' (x) = \left\{ \begin{array}{lll} 0 & & x \lt 0\\ {\small\frac{2}{3}} x^{- 1 / 3} & & x \geqslant 0 \end{array} \right. }[/math]
Odpowiednie granice są równe
- [math]\displaystyle{ f' (0^-) = \lim_{x \to 0^-} f (x) = 0 }[/math]
- [math]\displaystyle{ f' (0^+) = \lim_{x \to 0^+} f (x) = + \infty }[/math]
Zatem funkcja [math]\displaystyle{ f(x) }[/math] nie jest nawet kawałkami klasy [math]\displaystyle{ C^1 ([- 5, 5]) }[/math].
Punkt 2.
Ponieważ funkcja [math]\displaystyle{ f(x) }[/math] jest ciągła w [math]\displaystyle{ [a, b] }[/math], pochodna funkcji [math]\displaystyle{ f(x) }[/math] jest ciągła w [math]\displaystyle{ (c, b] }[/math] oraz istnieje skończona granica [math]\displaystyle{ f' (c^+) }[/math], to z twierdzenia F37 wynika, że pochodna [math]\displaystyle{ f' (x) }[/math] jest prawostronnie ciągła w [math]\displaystyle{ c }[/math], czyli
- [math]\displaystyle{ f' (c^+) = \partial_+ f (c) }[/math]
Analogiczna analiza w przedziale [math]\displaystyle{ [a, c) }[/math] prowadzi do wniosku, że
- [math]\displaystyle{ f' (c^-) = \partial_- f (c) }[/math]
Z założenia
- [math]\displaystyle{ \partial_- f (c) = f' (c^-) \neq f' (c^+) = \partial_+ f (c) }[/math]
zatem [math]\displaystyle{ f(x) }[/math] nie jest różniczkowalna w punkcie [math]\displaystyle{ c }[/math], czyli [math]\displaystyle{ f' (x) }[/math] jest funkcją nieciągłą. Ponieważ istnieją granice [math]\displaystyle{ f' (c^-) }[/math] i [math]\displaystyle{ f' (c^+) }[/math], to [math]\displaystyle{ f(x) }[/math] jest kawałkami klasy [math]\displaystyle{ C^1 ([a, b]) }[/math].
Przykład
Rozważmy funkcję
- [math]\displaystyle{ f(x) = \left\{ \begin{array}{lll} 0 & & x \lt 0\\ x^2 + x & & x \geqslant 0 \end{array} \right. }[/math]
Funkcja jest klasy [math]\displaystyle{ C^0 ([- 5, 5]) }[/math]. Wartość pochodnej lewostronnej i prawostronnej w punkcie [math]\displaystyle{ x = 0 }[/math] policzymy z definicji
- [math]\displaystyle{ \partial_- f (0) = \lim_{h \to 0^-} {\small\frac{f (0 + h) - 0}{h}} = {\small\frac{0 - 0}{h}} = 0 }[/math]
- [math]\displaystyle{ \partial_+ f (0) = \lim_{h \to 0^+} {\small\frac{f (0 + h) - 0}{h}} = {\small\frac{h^2 + h - 0}{h}} = 1 }[/math]
Obliczając pochodną funkcji [math]\displaystyle{ f(x) }[/math] dostajemy
- [math]\displaystyle{ f' (x) = \left\{ \begin{array}{lll} 0 & & x \lt 0\\ 2 x + 1 & & x \geqslant 0 \end{array} \right. }[/math]
Odpowiednie granice są równe
- [math]\displaystyle{ f' (0^-) = \lim_{x \to 0^-} f (x) = 0 }[/math]
- [math]\displaystyle{ f' (0^+) = \lim_{x \to 0^+} f (x) = 1 }[/math]
Zatem funkcja [math]\displaystyle{ f(x) }[/math] jest kawałkami klasy [math]\displaystyle{ C^1 ([- 5, 5]) }[/math].
Punkt 3.
Analizując tak samo, jak w punkcie 2. otrzymujemy ciąg równości
- [math]\displaystyle{ \partial_- f (c) = f' (c^-) = f' (c^+) = \partial_+ f (c) }[/math]
Zatem pochodna istnieje w punkcie [math]\displaystyle{ x = c }[/math] i jest ciągła w tym punkcie. Wynika stąd natychmiast, że funkcja [math]\displaystyle{ f(x) }[/math] jest klasy [math]\displaystyle{ C^1 ([a, b]) }[/math].
Przykład
Rozważmy funkcję
- [math]\displaystyle{ f(x) = \left\{ \begin{array}{lll} 0 & & x \lt 0\\ x^2 & & x \geqslant 0 \end{array} \right. }[/math]
Funkcja jest klasy [math]\displaystyle{ C^0 ([- 5, 5]) }[/math]. Wartość pochodnej lewostronnej i prawostronnej w punkcie [math]\displaystyle{ x = 0 }[/math] policzymy z definicji
- [math]\displaystyle{ \partial_- f (0) = \lim_{h \to 0^-} {\small\frac{f (0 + h) - 0}{h}} = {\small\frac{0 - 0}{h}} = 0 }[/math]
- [math]\displaystyle{ \partial_+ f (0) = \lim_{h \to 0^+} {\small\frac{f (0 + h) - 0}{h}} = {\small\frac{h^2 - 0}{h}} = 0 }[/math]
Czyli [math]\displaystyle{ f(x) }[/math] jest różniczkowalna w punkcie [math]\displaystyle{ x = 0 }[/math] i [math]\displaystyle{ f' (0) = 0 }[/math]. Obliczając pochodną funkcji [math]\displaystyle{ f(x) }[/math] dostajemy
- [math]\displaystyle{ f' (x) = \left\{ \begin{array}{lll} 0 & & x \lt 0\\ 2 x & & x \geqslant 0 \end{array} \right. }[/math]
Odpowiednie granice są równe
- [math]\displaystyle{ f' (0^-) = \lim_{x \to 0^-} f (x) = 0 }[/math]
- [math]\displaystyle{ f' (0^+) = \lim_{x \to 0^+} f (x) = 0 }[/math]
Zatem funkcja [math]\displaystyle{ f(x) }[/math] jest klasy [math]\displaystyle{ C^1 ([- 5, 5]) }[/math].
Punkt 4.
Z założenia funkcja [math]\displaystyle{ f(x) }[/math] jest różniczkowalna w punkcie [math]\displaystyle{ c }[/math], czyli istnieją skończone granice
- [math]\displaystyle{ \partial_+ f (c) = \lim_{x \to c^+} {\small\frac{f (x) - f (c)}{x - c}} }[/math]
- [math]\displaystyle{ \partial_- f (c) = \lim_{x \to c^-} {\small\frac{f (x) - f (c)}{x - c}} }[/math]
i są sobie równe: [math]\displaystyle{ \partial_+ f (c) = \partial_- f (c) = f' (c) }[/math].
Ponieważ [math]\displaystyle{ c }[/math] jest również punktem nieciągłości pochodnej, to
- [math]\displaystyle{ \lim_{x \to c^+} f' (x) \neq f' (c) }[/math]
lub
- [math]\displaystyle{ \lim_{x \to c^-} f' (x) \neq f' (c) }[/math]
Przypuśćmy, że istnieją skończone granice [math]\displaystyle{ \lim_{x \to c^+} f' (x) }[/math] i [math]\displaystyle{ \lim_{x \to c^-} f' (x) }[/math], zatem z twierdzeń F37 i F38 wynika, że pochodna jest prawostronnie i lewostronnie ciągła w [math]\displaystyle{ c }[/math]. Mamy
- [math]\displaystyle{ \lim_{x \to c^+} f' (x) = \partial_+ f (c) }[/math]
oraz
- [math]\displaystyle{ \lim_{x \to c^-} f' (x) = \partial_- f (c) }[/math]
Co oznacza, że
- [math]\displaystyle{ \lim_{x \to c^+} f' (x) = \partial_+ f (c) = f' (c) = \partial_- f (c) = \lim_{x \to c^-} f' (x) }[/math]
Zatem pochodna [math]\displaystyle{ f' (x) }[/math] jest ciągła w punkcie [math]\displaystyle{ c }[/math] wbrew założeniu o nieciągłości. Czyli nasze przypuszczenie, że istnieją skończone granice [math]\displaystyle{ \lim_{x \to c^+} f' (x) }[/math] i [math]\displaystyle{ \lim_{x \to c^-} f' (x) }[/math] jest błędne. Przypadek, gdy jedna z tych granic jest nieskończona, również nie jest możliwy, bo wtedy (wbrew założeniu) funkcja [math]\displaystyle{ f(x) }[/math] nie byłaby różniczkowalna w punkcie [math]\displaystyle{ x = c }[/math] (zobacz punkt 1). Zatem przynajmniej jedna z tych granic nie może istnieć. Co oznacza, że funkcja [math]\displaystyle{ f(x) }[/math] nie jest nawet klasy [math]\displaystyle{ C^1 ([a, b]) }[/math].
Przykładową funkcję
- [math]\displaystyle{ f(x) = \left\{ \begin{array}{lll} 0 & & x \lt 0\\ x^2 \cdot \sin \left( {\small\frac{1}{x}} \right) & & x \geqslant 0 \end{array} \right. }[/math]
Czytelnik bez trudu sam przeanalizuje, korzystając z rozwiązania zadania F9.
□
Zadanie F45
Zbadać dla jakich wartości parametrów [math]\displaystyle{ a, b, c }[/math] funkcja
- [math]\displaystyle{ f(x) = \left\{ \begin{array}{lll} a x^2 + b x + c & & x \lt 0\\ \cos (x) & & x \geqslant 0 \end{array} \right. }[/math]
jest klasy [math]\displaystyle{ C^2 (\mathbb{R}) }[/math].
Funkcja [math]\displaystyle{ f(x) }[/math] jest klasy [math]\displaystyle{ C^0 (\mathbb{R}) }[/math], gdy [math]\displaystyle{ c = 1 }[/math]. Mamy zatem
- [math]\displaystyle{ f(x) = \left\{ \begin{array}{lll} a x^2 + b x + 1 & & x \lt 0\\ \cos (x) & & x \geqslant 0 \end{array} \right. }[/math]
Funkcja [math]\displaystyle{ f(x) }[/math] jest teraz ciągła, funkcje [math]\displaystyle{ a x^2 + b x + 1 }[/math] i [math]\displaystyle{ \cos (x) }[/math] są różniczkowalne w przedziałach [math]\displaystyle{ (- \varepsilon, 0) }[/math] i [math]\displaystyle{ (0, \varepsilon) }[/math]. Granice pochodnych wynoszą
- [math]\displaystyle{ \lim_{x \to 0^-} f' (x) = \lim_{x \to 0^-} 2 a x + b = b }[/math]
- [math]\displaystyle{ \lim_{x \to 0^+} f' (x) = \lim_{x \to 0^+} (- \sin (x)) = 0 }[/math]
Z twierdzenia F42 wiemy, że jeżeli granice te są skończone i sobie równe, to pochodna jest ciągła, zatem musi być [math]\displaystyle{ b = 0 }[/math]. Otrzymujemy
- [math]\displaystyle{ f(x) = \left\{ \begin{array}{lll} a x^2 + 1 & & x \lt 0\\ \cos (x) & & x \geqslant 0 \end{array} \right. }[/math]
oraz
- [math]\displaystyle{ f' (x) = \left\{ \begin{array}{lll} 2 a x & & x \lt 0\\ - \sin (x) & & x \geqslant 0 \end{array} \right. }[/math]
Teraz funkcja [math]\displaystyle{ f' (x) }[/math] jest funkcją ciągłą, a funkcje [math]\displaystyle{ 2 a x }[/math] i [math]\displaystyle{ - \sin (x) }[/math] są różniczkowalne w przedziałach [math]\displaystyle{ (- \varepsilon, 0) }[/math] i [math]\displaystyle{ (0, \varepsilon) }[/math]. Granice następnej pochodnej wynoszą
- [math]\displaystyle{ \lim_{x \to 0^-} f'' (x) = \lim_{x \to 0^-} 2 a = 2 a }[/math]
- [math]\displaystyle{ \lim_{x \to 0^+} f'' (x) = \lim_{x \to 0^+} (- \cos (x)) = - 1 }[/math]
Z twierdzenia F42 zastosowanego do funkcji [math]\displaystyle{ f' (x) }[/math] i [math]\displaystyle{ f'' (x) }[/math] wynika, że istnienie i równość wypisanych granic zapewni nam ciągłość drugiej pochodnej, zatem musi być [math]\displaystyle{ a = - {\small\frac{1}{2}} }[/math]. Ostatecznie dostajemy
- [math]\displaystyle{ f(x) = \left\{ \begin{array}{lll} - {\large\frac{x^2}{2}} + 1 & & x \lt 0\\ \cos (x) & & x \geqslant 0 \end{array} \right. }[/math]
Funkcja [math]\displaystyle{ f(x) }[/math] jest klasy [math]\displaystyle{ C^2 (\mathbb{R}) }[/math].
□
Uwaga F46
Nim przejdziemy do dalszych twierdzeń, zauważmy, że jeżeli [math]\displaystyle{ f(x) }[/math] jest funkcją ciągłą w przedziale [math]\displaystyle{ [a, b] }[/math], to zmiana wartości funkcji [math]\displaystyle{ f(x) }[/math] w pewnym punkcie [math]\displaystyle{ c \in [a, b] }[/math] nie wpływa na wartość lewo- i prawostronnych granic funkcji w tym punkcie. Liczba [math]\displaystyle{ f(c) }[/math] to zdefiniowana wartość funkcji [math]\displaystyle{ f(x) }[/math] w punkcie [math]\displaystyle{ c }[/math]. Granice (lewa i prawa) funkcji [math]\displaystyle{ f(x) }[/math] w punkcie [math]\displaystyle{ x = c }[/math] nie zależą od wartości funkcji [math]\displaystyle{ f(c) }[/math], a jedynie informują nas, jaka powinna być wartość funkcji w punkcie [math]\displaystyle{ x = c }[/math], aby funkcja [math]\displaystyle{ f(x) }[/math] była lewostronnie ciągła lub prawostronnie ciągła, lub ciągła (gdy granice te są równe) w punkcie [math]\displaystyle{ x = c }[/math]. Ujmując dokładniej: wartość granicy funkcji [math]\displaystyle{ f(x) }[/math] w punkcie [math]\displaystyle{ x = c }[/math] wynika z przebiegu funkcji w sąsiedztwie punktu [math]\displaystyle{ c }[/math].
Twierdzenie F47
Niech [math]\displaystyle{ f(x) }[/math] będzie funkcją ciągłą w przedziale [math]\displaystyle{ (a, b) }[/math]. Funkcja [math]\displaystyle{ f(x) }[/math] może być przedłużona do funkcji ciągłej w przedziale [math]\displaystyle{ [a, b] }[/math] wtedy i tylko wtedy, gdy istnieją skończone granice funkcji [math]\displaystyle{ f(x) }[/math] na krańcach przedziału [math]\displaystyle{ (a, b) }[/math].
[math]\displaystyle{ \Large{\Longrightarrow} }[/math]
Niech funkcja [math]\displaystyle{ \tilde{f} (x) }[/math] będzie przedłużeniem funkcji [math]\displaystyle{ f(x) }[/math] do funkcji ciągłej w przedziale [math]\displaystyle{ [a, b] }[/math], zatem istnieją skończone granice [math]\displaystyle{ \tilde{f} (a^+) }[/math] i [math]\displaystyle{ \tilde{f} (b^-) }[/math]. Ale funkcja [math]\displaystyle{ \tilde{f} (x) }[/math] różni się od funkcji [math]\displaystyle{ f(x) }[/math] co najwyżej wartością w punktach [math]\displaystyle{ a }[/math] i [math]\displaystyle{ b }[/math], co oznacza, że istnieją skończone granice [math]\displaystyle{ f(a^+) }[/math] i [math]\displaystyle{ f(b^-) }[/math].
[math]\displaystyle{ \Large{\Longleftarrow} }[/math]
Z założenia istnieją skończone granice [math]\displaystyle{ f(a^+) }[/math] i [math]\displaystyle{ f(b^-) }[/math]. Zatem funkcja
- [math]\displaystyle{ \tilde{f} (x) = \left\{ \begin{array}{lll} f (a^+) & & x = a\\ f (x) & & a \lt x \lt b\\ f (b^-) & & x = b \end{array} \right. }[/math]
jest ciągła w [math]\displaystyle{ [a, b] }[/math] i jest poszukiwanym przedłużeniem funkcji [math]\displaystyle{ f(x) }[/math] do funkcji ciągłej w przedziale [math]\displaystyle{ [a, b] }[/math].
□
Twierdzenie F48
Niech [math]\displaystyle{ f(x) }[/math] będzie funkcją ciągłą w przedziale [math]\displaystyle{ [a, b] }[/math], a jej pochodna będzie ciągła w [math]\displaystyle{ (a, b) }[/math]. Pochodna funkcji [math]\displaystyle{ f(x) }[/math] jest ciągła w przedziale [math]\displaystyle{ [a, b] }[/math] wtedy i tylko wtedy, gdy istnieją skończone granice jednostronne pochodnej [math]\displaystyle{ f(x) }[/math] na krańcach przedziału [math]\displaystyle{ (a, b) }[/math].
[math]\displaystyle{ \Large{\Longrightarrow} }[/math]
Z założenia pochodna funkcji [math]\displaystyle{ f(x) }[/math] jest ciągła w przedziale [math]\displaystyle{ [a, b] }[/math], zatem istnieją skończone granice jednostronne [math]\displaystyle{ f' (a^+) }[/math] i [math]\displaystyle{ f' (b^-) }[/math].
[math]\displaystyle{ \Large{\Longleftarrow} }[/math]
Z założenia pochodna funkcji [math]\displaystyle{ f(x) }[/math] jest ciągła w przedziale [math]\displaystyle{ (a, b) }[/math], zatem funkcja [math]\displaystyle{ f(x) }[/math] jest różniczkowalna w [math]\displaystyle{ (a, b) }[/math] (zobacz F40). Niech [math]\displaystyle{ \varepsilon \lt b - a }[/math]. Ponieważ funkcja [math]\displaystyle{ f(x) }[/math] jest ciągła w [math]\displaystyle{ [a, a + \varepsilon) }[/math] i różniczkowalna w [math]\displaystyle{ (a, a + \varepsilon) }[/math] oraz istnieje granica skończona [math]\displaystyle{ f' (a^+) }[/math], to z twierdzenia F37 wiemy, że pochodna prawostronna w punkcie [math]\displaystyle{ a }[/math] jest równa tej granicy
- [math]\displaystyle{ \partial_+ f (a) = f' (a^+) }[/math]
Ponieważ z założenia granica [math]\displaystyle{ f' (a^+) }[/math] jest skończona, to pochodna [math]\displaystyle{ f' (x) }[/math] jest prawostronnie ciągła w punkcie [math]\displaystyle{ a }[/math]. Podobnie dowodzimy, że pochodna [math]\displaystyle{ f' (x) }[/math] jest lewostronnie ciągła w punkcie [math]\displaystyle{ a }[/math].
Pokazaliśmy tym samym, że w przypadku, gdy istnieją skończone granice jednostronne pochodnej na krańcach przedziału [math]\displaystyle{ (a, b) }[/math], to pochodne jednostronne funkcji [math]\displaystyle{ f(x) }[/math] na krańcach przedziału [math]\displaystyle{ (a, b) }[/math] istnieją, a sama pochodna jest na krańcach przedziału jednostronnie ciągła.
□
Twierdzenie F49
Niech [math]\displaystyle{ f(x) }[/math] będzie funkcją klasy [math]\displaystyle{ C^0 }[/math] w przedziale [math]\displaystyle{ [a, b] }[/math] i klasy [math]\displaystyle{ C^r }[/math] (gdzie [math]\displaystyle{ r \geqslant 1 }[/math]) w przedziale [math]\displaystyle{ (a, b) }[/math]. Funkcja [math]\displaystyle{ f(x) }[/math] jest klasy [math]\displaystyle{ C^r }[/math] w przedziale [math]\displaystyle{ [a, b] }[/math] wtedy i tylko wtedy, gdy istnieją skończone granice jednostronne pochodnych [math]\displaystyle{ f^{(i)} (x) }[/math], dla [math]\displaystyle{ i = 1, \ldots r }[/math], na krańcach przedziału [math]\displaystyle{ (a, b) }[/math].
[math]\displaystyle{ \Large{\Longrightarrow} }[/math]
Z założenia funkcja [math]\displaystyle{ f(x) }[/math] jest klasy [math]\displaystyle{ C^r }[/math] w przedziale [math]\displaystyle{ [a, b] }[/math], zatem funkcje [math]\displaystyle{ f^{(i)} (x) }[/math], gdzie [math]\displaystyle{ i = 0, 1, \ldots r }[/math], są ciągłe w przedziale [math]\displaystyle{ [a, b] }[/math]. Wynika stąd natychmiast, że istnieją skończone granice jednostronne funkcji [math]\displaystyle{ f^{(i)} (x) }[/math], dla [math]\displaystyle{ i = 1, \ldots r }[/math], na krańcach przedziału [math]\displaystyle{ (a, b) }[/math].
[math]\displaystyle{ \Large{\Longleftarrow} }[/math]
Indukcja matematyczna. Z twierdzenia F48 wiemy, że twierdzenie jest prawdziwe dla [math]\displaystyle{ r = 1 }[/math]. Pokażemy, że z założenia prawdziwości twierdzenia dla [math]\displaystyle{ r - 1 }[/math] wynika prawdziwość twierdzenia dla [math]\displaystyle{ r }[/math].
Wypiszmy jawnie założenie indukcyjne i tezę indukcyjną, co ułatwi nam uchwycenie problemu.
Założenie indukcyjne:
Jeżeli [math]\displaystyle{ f(x) }[/math] jest funkcją klasy [math]\displaystyle{ C^{r - 1} }[/math] w przedziale [math]\displaystyle{ (a, b) }[/math] i klasy [math]\displaystyle{ C^0 }[/math] w przedziale [math]\displaystyle{ [a, b] }[/math] oraz istnieją skończone granice jednostronne pochodnych [math]\displaystyle{ f^{(i)} (x) }[/math], dla [math]\displaystyle{ i = 1, \ldots r - 1 }[/math], na krańcach przedziału [math]\displaystyle{ (a, b) }[/math], to funkcja [math]\displaystyle{ f(x) }[/math] jest klasy [math]\displaystyle{ C^{r - 1} }[/math] w przedziale [math]\displaystyle{ [a, b] }[/math].
Teza indukcyjna:
Jeżeli [math]\displaystyle{ g(x) }[/math] jest funkcją klasy [math]\displaystyle{ C^r }[/math] w przedziale [math]\displaystyle{ (a, b) }[/math] i klasy [math]\displaystyle{ C^0 }[/math] w przedziale [math]\displaystyle{ [a, b] }[/math] oraz istnieją skończone granice jednostronne pochodnych [math]\displaystyle{ g^{(i)} (x) }[/math], dla [math]\displaystyle{ i = 1, \ldots r }[/math], na krańcach przedziału [math]\displaystyle{ (a, b) }[/math], to funkcja [math]\displaystyle{ g(x) }[/math] jest klasy [math]\displaystyle{ C^r }[/math] w przedziale [math]\displaystyle{ [a, b] }[/math].
Dowód indukcyjny:
Z założeń uczynionych w tezie indukcyjnej wynika, że funkcja [math]\displaystyle{ g(x) }[/math] spełnia wszystkie warunki założenia indukcyjnego. Zatem na mocy założenia indukcyjnego funkcja [math]\displaystyle{ g(x) }[/math] jest klasy [math]\displaystyle{ C^{r - 1} }[/math] w przedziale [math]\displaystyle{ [a, b] }[/math].
Jeśli tak, to [math]\displaystyle{ g^{(r - 1)} (x) }[/math] jest funkcją ciągłą w przedziale [math]\displaystyle{ [a, b] }[/math]. Jednocześnie z tezy indukcyjnej wiemy, że [math]\displaystyle{ g^{(r)} (x) }[/math] jest funkcją ciągłą w przedziale [math]\displaystyle{ (a, b) }[/math] oraz istnieją skończone granice jednostronne [math]\displaystyle{ g^{(r)} (a^+) }[/math] i [math]\displaystyle{ g^{(r)} (b^-) }[/math].
Zatem z twierdzenia F48 zastosowanego do funkcji [math]\displaystyle{ g^{(r - 1)} (x) }[/math] i [math]\displaystyle{ g^{(r)} (x) }[/math] wynika, że funkcja [math]\displaystyle{ g^{(r)} (x) }[/math] jest funkcją ciągłą w przedziale [math]\displaystyle{ [a, b] }[/math]. Co oznacza, że funkcja [math]\displaystyle{ g(x) }[/math] jest klasy [math]\displaystyle{ C^r }[/math] w przedziale [math]\displaystyle{ [a, b] }[/math].
Co kończy dowód indukcyjny.
□
Twierdzenie F50
Funkcja [math]\displaystyle{ f(x) }[/math] jest kawałkami ciągła w przedziale [math]\displaystyle{ [a, b] }[/math] wtedy i tylko wtedy, gdy istnieje skończona liczba punktów [math]\displaystyle{ a = x_1 \lt x_2 \lt \ldots \lt x_n = b }[/math] takich, że
- funkcja [math]\displaystyle{ f(x) }[/math] jest ciągła w każdym przedziale [math]\displaystyle{ (x_k, x_{k + 1}) }[/math]
- funkcja [math]\displaystyle{ f(x) }[/math] może być przedłużona do funkcji ciągłej w [math]\displaystyle{ [x_k, x_{k + 1}] }[/math].
[math]\displaystyle{ \Large{\Longrightarrow} }[/math]
Z założenia funkcja [math]\displaystyle{ f(x) }[/math] jest kawałkami ciągła w [math]\displaystyle{ [a, b] }[/math], zatem istnieje skończona liczba punktów [math]\displaystyle{ a = x_1 \lt x_2 \lt \ldots \lt x_n = b }[/math] takich, że funkcja [math]\displaystyle{ f(x) }[/math] jest ciągła w każdym przedziale [math]\displaystyle{ (x_k, x_{k + 1}) }[/math] oraz istnieją skończone granice na krańcach każdego z przedziałów [math]\displaystyle{ (x_k, x_{k + 1}) }[/math]. Z twierdzenia F47 wynika natychmiast, że [math]\displaystyle{ f(x) }[/math] może być przedłużona do funkcji ciągłej w każdym przedziale [math]\displaystyle{ [x_k, x_{k + 1}] }[/math].
[math]\displaystyle{ \Large{\Longleftarrow} }[/math]
Z założenia istnieje skończona liczba punktów [math]\displaystyle{ a = x_1 \lt x_2 \lt \ldots \lt x_n = b }[/math] takich, że funkcja [math]\displaystyle{ f(x) }[/math] jest ciągła w każdym przedziale [math]\displaystyle{ (x_k, x_{k + 1}) }[/math] oraz istnieje przedłużenie funkcji [math]\displaystyle{ f(x) }[/math] do funkcji ciągłej w przedziale [math]\displaystyle{ [x_k, x_{k + 1}] }[/math]. Z twierdzenia F47 wynika natychmiast, że istnieją skończone granice funkcji [math]\displaystyle{ f(x) }[/math] na krańcach każdego przedziału [math]\displaystyle{ (x_k, x_{k + 1}) }[/math].
□
Twierdzenie F51
Niech [math]\displaystyle{ r \in \mathbb{N}_0 }[/math]. Funkcja [math]\displaystyle{ f(x) }[/math] jest kawałkami klasy [math]\displaystyle{ C^r }[/math] w przedziale [math]\displaystyle{ [a, b] }[/math] wtedy i tylko wtedy, gdy istnieje skończona liczba punktów [math]\displaystyle{ a = x_1 \lt x_2 \lt \ldots \lt x_n = b }[/math] takich, że
- funkcja [math]\displaystyle{ f(x) }[/math] jest klasy [math]\displaystyle{ C^r }[/math] w każdym przedziale [math]\displaystyle{ (x_k, x_{k + 1}) }[/math]
- funkcja [math]\displaystyle{ f(x) }[/math] może być przedłużona do funkcji klasy [math]\displaystyle{ C^r }[/math] w każdym przedziale [math]\displaystyle{ [x_k, x_{k + 1}] }[/math].
Przypadek [math]\displaystyle{ r = 0 }[/math] już udowodniliśmy (zobacz twierdzenie F50). Zatem będziemy dowodzili to twierdzenie dla [math]\displaystyle{ r \geqslant 1 }[/math].
[math]\displaystyle{ \Large{\Longrightarrow} }[/math]
Z założenia funkcja [math]\displaystyle{ f(x) }[/math] jest kawałkami klasy [math]\displaystyle{ C^r }[/math] w [math]\displaystyle{ [a, b] }[/math], zatem istnieje skończona liczba punktów [math]\displaystyle{ a = x_1 \lt x_2 \lt \ldots \lt x_n = b }[/math] wyznaczających podział przedziału [math]\displaystyle{ [a, b] }[/math] w taki sposób, że funkcje [math]\displaystyle{ f^{(i)} (x) }[/math], dla [math]\displaystyle{ i = 0, 1, \ldots r }[/math], są ciągłe w każdym przedziale [math]\displaystyle{ (x_k, x_{k + 1}) }[/math]. Oznacza to, że funkcja [math]\displaystyle{ f(x) }[/math] jest klasy [math]\displaystyle{ C^r }[/math] w każdym przedziale [math]\displaystyle{ (x_k, x_{k + 1}) }[/math]. Ponadto istnieją skończone granice jednostronne funkcji [math]\displaystyle{ f^{(i)} (x) }[/math], dla [math]\displaystyle{ i = 0, 1, \ldots r }[/math], na krańcach każdego z przedziałów [math]\displaystyle{ (x_k, x_{k + 1}) }[/math].
Niech [math]\displaystyle{ (x_k, x_{k + 1}) }[/math] będzie dowolnie wybranym przedziałem. Z twierdzenia F47 wynika natychmiast, że funkcja [math]\displaystyle{ f(x) }[/math], z założenia ciągła w przedziale [math]\displaystyle{ (x_k, x_{k + 1}) }[/math], może być przedłużona do funkcji [math]\displaystyle{ \tilde{f} (x) }[/math] ciągłej w przedziale [math]\displaystyle{ [x_k, x_{k + 1}] }[/math]. Konsekwentnie będą istniały kolejne pochodne funkcji [math]\displaystyle{ \tilde{f} (x) }[/math], czyli funkcje [math]\displaystyle{ \tilde{f}^{(i)} (x) }[/math], dla [math]\displaystyle{ i = 1, \ldots r }[/math]. Spełniony jest przy tym oczywisty związek
- [math]\displaystyle{ \tilde{f}^{(i)} (x) = f^{(i)} (x) }[/math]
dla [math]\displaystyle{ x \in (x_k, x_{k + 1}) }[/math] oraz [math]\displaystyle{ i = 0, 1, \ldots r }[/math].
Wynika stąd, że funkcja [math]\displaystyle{ \tilde{f} (x) }[/math] jest klasy [math]\displaystyle{ C^0 }[/math] w przedziale [math]\displaystyle{ [x_k, x_{k + 1}] }[/math] i klasy [math]\displaystyle{ C^r }[/math] w przedziale [math]\displaystyle{ (x_k, x_{k + 1}) }[/math] oraz istnieją skończone granice jednostronne funkcji [math]\displaystyle{ \tilde{f}^{(i)} (x) }[/math], dla [math]\displaystyle{ i = 0, 1, \ldots r }[/math], na krańcach przedziału [math]\displaystyle{ (x_k, x_{k + 1}) }[/math]. Z twierdzenia F49 otrzymujemy, że [math]\displaystyle{ \tilde{f} (x) }[/math] jest klasy [math]\displaystyle{ C^r }[/math] w przedziale [math]\displaystyle{ [x_k, x_{k + 1}] }[/math]. Zatem funkcja [math]\displaystyle{ \tilde{f} (x) }[/math] jest poszukiwanym przedłużeniem funkcji [math]\displaystyle{ f(x) }[/math].
[math]\displaystyle{ \Large{\Longleftarrow} }[/math]
Z założenia istnieje skończona liczba punktów [math]\displaystyle{ a = x_1 \lt x_2 \lt \ldots \lt x_n = b }[/math] takich, że funkcja [math]\displaystyle{ f(x) }[/math] jest klasy [math]\displaystyle{ C^r }[/math] w każdym przedziale [math]\displaystyle{ (x_k, x_{k + 1}) }[/math], zatem
● funkcja [math]\displaystyle{ f(x) }[/math] jest zdefiniowana i ciągła w każdym przedziale [math]\displaystyle{ (x_k, x_{k + 1}) }[/math]
● pochodne [math]\displaystyle{ f^{(i)} (x) }[/math], dla [math]\displaystyle{ i = 1, \ldots r }[/math], istnieją i są ciągłe w każdym przedziale [math]\displaystyle{ (x_k, x_{k + 1}) }[/math]
Niech [math]\displaystyle{ (x_k, x_{k + 1}) }[/math] będzie dowolnie wybranym przedziałem. Z założenia istnieje przedłużenie funkcji [math]\displaystyle{ f(x) }[/math] klasy [math]\displaystyle{ C^r }[/math] w przedziale [math]\displaystyle{ (x_k, x_{k + 1}) }[/math] do funkcji [math]\displaystyle{ \tilde{f} (x) }[/math] klasy [math]\displaystyle{ C^r }[/math] w przedziale [math]\displaystyle{ [x_k, x_{k + 1}] }[/math]. Wynika stąd, że istnieją skończone granice jednostronne [math]\displaystyle{ \tilde{f}^{(i)} (x^+_k) }[/math] oraz [math]\displaystyle{ \tilde{f}^{(i)} (x^-_{k + 1}) }[/math]. Ponieważ spełniony jest przy tym oczywisty związek
- [math]\displaystyle{ \tilde{f}^{(i)} (x) = f^{(i)} (x) }[/math]
dla [math]\displaystyle{ x \in (x_k, x_{k + 1}) }[/math] oraz [math]\displaystyle{ i = 0, 1, \ldots r }[/math], to granice te są identyczne z granicami [math]\displaystyle{ f^{(i)} (x^+_k) }[/math] oraz [math]\displaystyle{ f^{(i)} (x^-_{k + 1}) }[/math]. Zatem
● granice [math]\displaystyle{ f^{(i)} (x^+_k) }[/math] oraz [math]\displaystyle{ f^{(i)} (x^-_{k + 1}) }[/math] istnieją i są skończone
Z zaznaczonych punktów wynika natychmiast, że funkcja [math]\displaystyle{ f(x) }[/math] jest kawałkami klasy [math]\displaystyle{ C^r }[/math] w [math]\displaystyle{ [a, b] }[/math]. Co należało pokazać.
□
Jeszcze o błędzie metody Simpsona
Uwaga F52
Chcemy wyjaśnić, dlaczego dowodząc twierdzenie F14, wybraliśmy funkcję postaci
- [math]\displaystyle{ W(x) = \left\{ \begin{array}{lll} {\large\frac{1}{12}} (x - a)^3 (3 x - a - 2 b) & & a \leqslant x \leqslant c\\ {\large\frac{1}{12}} (x - b)^3 (3 x - 2 a - b) & & c \leqslant x \leqslant b \end{array} \right. }[/math]
gdzie [math]\displaystyle{ c = {\small\frac{1}{2}} (a + b) }[/math].
Znając postać funkcji, mogliśmy pozwolić sobie na wykonanie kolejnych kroków przez różniczkowanie. Pozwoliło to skrócić i uprościć cały dowód. Chcąc zrozumieć metodę i zbadać, czy istnieje możliwość uogólnienia, będziemy tym razem postępowali odwrotnie i kolejno wyliczali całki.
Uwaga F53
Dla uproszczenia zapisu parę funkcji: [math]\displaystyle{ g_1 (x) }[/math] określoną w przedziale [math]\displaystyle{ [a, c] }[/math] oraz [math]\displaystyle{ g_2 (x) }[/math] określoną w przedziale [math]\displaystyle{ [c, b] }[/math], gdzie [math]\displaystyle{ c = {\small\frac{1}{2}} (a + b) }[/math], będziemy oznaczali jako [math]\displaystyle{ f(x) = \{ g_1 (x) |g_2 (x) \} }[/math]. Czytelnika nie powinien niepokoić fakt, że funkcja [math]\displaystyle{ f(x) }[/math] nie jest określona w punkcie [math]\displaystyle{ x = c }[/math], bo zawsze możemy przyjąć [math]\displaystyle{ f(c) = {\small\frac{1}{2}} (g_1 (c) + g_2 (c)) }[/math]. Lepiej traktować [math]\displaystyle{ \{ g_1 (x) |g_2 (x) \} }[/math] jako parę funkcji, której ciągłość w punkcie [math]\displaystyle{ x = c }[/math] ma dla nas istotne znaczenie, a jedynie dla wygody zapisu oznaczamy ją jako [math]\displaystyle{ f(x) = \{ g_1 (x) |g_2 (x) \} }[/math].
Twierdzenie F54
Niżej wypisany ciąg funkcji
[math]\displaystyle{ n }[/math] [math]\displaystyle{ W_n (x) = \{ U_n (x) \big\rvert V_n (x) \} }[/math] [math]\displaystyle{ U_n (a) }[/math] [math]\displaystyle{ U_n (c) }[/math] [math]\displaystyle{ V_n (c) }[/math] [math]\displaystyle{ V_n (b) }[/math] [math]\displaystyle{ 1 }[/math] [math]\displaystyle{ \{ 6 x - 5 a - b \big\rvert 6 x - a - 5 b \} }[/math] [math]\displaystyle{ - (b - a) }[/math] [math]\displaystyle{ 2 (b - a) }[/math] [math]\displaystyle{ - 2 (b - a) }[/math] [math]\displaystyle{ b - a }[/math] [math]\displaystyle{ 2 }[/math] [math]\displaystyle{ \{ (x - a) (3 x - 2 a - b) \big\rvert (x - b) (3 x - a - 2 b) \} }[/math] [math]\displaystyle{ 0 }[/math] [math]\displaystyle{ {\small\frac{(b - a)^2}{4}} }[/math] [math]\displaystyle{ {\small\frac{(b - a)^2}{4}} }[/math] [math]\displaystyle{ 0 }[/math] [math]\displaystyle{ 3 }[/math] [math]\displaystyle{ \left\{ {\small\frac{1}{2}} (x - a)^2 (2 x - a - b) \biggr\rvert {\small\frac{1}{2}} (x - b)^2 (2 x - a - b) \right\} }[/math] [math]\displaystyle{ 0 }[/math] [math]\displaystyle{ 0 }[/math] [math]\displaystyle{ 0 }[/math] [math]\displaystyle{ 0 }[/math] [math]\displaystyle{ 4 }[/math] [math]\displaystyle{ \left\{ {\small\frac{1}{12}} (x - a)^3 (3 x - a - 2 b) \biggr\rvert {\small\frac{1}{12}} (x - b)^3 (3 x - 2 a - b) \right\} }[/math] [math]\displaystyle{ 0 }[/math] [math]\displaystyle{ - {\small\frac{(b - a)^4}{192}} }[/math] [math]\displaystyle{ - {\small\frac{(b - a)^4}{192}} }[/math] [math]\displaystyle{ 0 }[/math] [math]\displaystyle{ 5 }[/math] [math]\displaystyle{ \left\{ {\small\frac{1}{120}} (x - a)^4 (6 x - a - 5 b) \biggr\rvert {\small\frac{1}{120}} (x - b)^4 (6 x - 5 a - b) \right\} }[/math] [math]\displaystyle{ 0 }[/math] [math]\displaystyle{ - {\small\frac{(b - a)^5}{960}} }[/math] [math]\displaystyle{ {\small\frac{(b - a)^5}{960}} }[/math] [math]\displaystyle{ 0 }[/math]
uzyskaliśmy, stosując następujące zasady:
1) każda kolejna funkcja jest całką poprzedniej, czyli dla [math]\displaystyle{ n \geqslant 2 }[/math] jest
- [math]\displaystyle{ U_{n} (x) = \int U_{n-1} (x) d x + K }[/math]
- [math]\displaystyle{ V_{n} (x) = \int V_{n-1} (x) d x + L }[/math]
2) stałe całkowania [math]\displaystyle{ K, L }[/math] zostały wybrane tak, aby dla [math]\displaystyle{ n \geqslant 2 }[/math] spełniony był warunek
- [math]\displaystyle{ U_{n} (a) = V_{n} (b) = 0 }[/math]
Twierdzenie F55
Jeżeli funkcja [math]\displaystyle{ f(x) }[/math] jest klasy [math]\displaystyle{ C^1([a, b]) }[/math], to
- [math]\displaystyle{ \int^b_a f (x) d x = {\small\frac{b - a}{6}} \cdot [f (a) + 4 f (c) + f (b)] - {\small\frac{1}{6}} \int^b_a f' (x) W_1 (x) d x }[/math]
gdzie [math]\displaystyle{ c = {\small\frac{1}{2}} (a + b) }[/math].
Ponieważ funkcja
- [math]\displaystyle{ W_1 (x) = \{ 6 x - 5 a - b| 6 x - a - 5 b \} }[/math]
jest nieciągła w punkcie [math]\displaystyle{ x = c = {\small\frac{1}{2}} (a + b) }[/math], to musimy całkować osobno dla [math]\displaystyle{ x \in [a, c] }[/math] i dla [math]\displaystyle{ x \in [c, b] }[/math]
- [math]\displaystyle{ \int^b_a f' (x) W_1 (x) d x = \int^c_a f' (x) U_1 (x) d x + \int^b_c f' (x) V_1 (x) d x }[/math]
Mamy
- [math]\displaystyle{ \int^c_a f' (x) U_1 (x) d x = f (x) \cdot U_1 (x) \biggr\rvert_{a}^{c} - \int^c_a f (x) U_1' (x) d x }[/math]
- [math]\displaystyle{ \;\; = f (c) \cdot U_1 (c) - f (a) U_1 (a) - 6 \int^c_a f (x) d x }[/math]
- [math]\displaystyle{ \;\; = 2 (b - a) f (c) + (b - a) f (a) - 6 \int^c_a f (x) d x }[/math]
- [math]\displaystyle{ \;\; = (b - a) [2 f (c) + f (a)] - 6 \int^c_a f (x) d x }[/math]
- [math]\displaystyle{ \int^b_c f' (x) V_1 (x) d x = f (x) \cdot V_1 (x) \biggr\rvert_{c}^{b} - \int^b_c f (x) V_1' (x) d x }[/math]
- [math]\displaystyle{ \;\: = f (b) \cdot V_1 (b) - f (c) V_1 (c) - 6 \int^b_c f (x) d x }[/math]
- [math]\displaystyle{ \;\: = (b - a) f (b) + 2 (b - a) f (c) - 6 \int^b_c f (x) d x }[/math]
- [math]\displaystyle{ \;\: = (b - a) [f (b) + 2 f (c)] - 6 \int^b_c f (x) d x }[/math]
Zatem
- [math]\displaystyle{ \int^b_a f' (x) W_1 (x) d x = (b - a) [f (a) + 4 f (c) + f (b)] - 6 \int^b_a f (x) d x }[/math]
Skąd otrzymujemy natychmiast
- [math]\displaystyle{ \int^b_a f (x) d x = {\small\frac{b - a}{6}} \cdot [f (a) + 4 f (c) + f (b)] - {\small\frac{1}{6}} \int^b_a f' (x) W_1 (x) d x }[/math]
Co należało pokazać.
□
Uwaga F56
Postać funkcji [math]\displaystyle{ W_1 (x) = \{ 6 x - 5 a - b| 6 x - a - 5 b \} }[/math] wynika z nałożenia na postać ogólną
- [math]\displaystyle{ W_1 (x) = \{ U_1 (x) |V_1 (x) \} = \{ r x + s|t x + u \} }[/math]
następujących warunków:
- funkcja [math]\displaystyle{ W_2 (x) = \int W_1 (x) d x + C }[/math] ma być równa zero w punktach [math]\displaystyle{ x = a }[/math] oraz [math]\displaystyle{ x = b }[/math], skąd otrzymujemy
- [math]\displaystyle{ W_2 (x) = \left\{ {\small\frac{1}{2}} (x - a) (r x + a r + 2 s) \biggr\rvert {\small\frac{1}{2}} (x - b)(t x + b t + 2 u) \right\} }[/math]
- funkcja [math]\displaystyle{ W_2 (x) }[/math] musi być ciągła w punkcie [math]\displaystyle{ x = c = {\small\frac{a + b}{2}} }[/math], skąd dostajemy równanie [math]\displaystyle{ U_2 (c) = V_2 (c) }[/math], z którego, po podstawieniu [math]\displaystyle{ c = {\small\frac{a + b}{2}} }[/math] i łatwym uproszczeniu, mamy
- [math]\displaystyle{ 3 r a + 3 t b + r b + t a + 4 s + 4 u = 0 }[/math]
- w twierdzeniu F55 musi pojawić się wyraz [math]\displaystyle{ {\small\frac{b - a}{6}} \cdot [f (a) + 4 f (c) + f (b)] }[/math], skąd otrzymujemy równania
- [math]\displaystyle{ U_1 (a) = - (b - a) }[/math]
- [math]\displaystyle{ V_1 (b) = b - a }[/math]
- [math]\displaystyle{ U_1 (c) - V_1 (c) = 4 (b - a) }[/math]
Zbierając: liczby [math]\displaystyle{ r, s, t, u }[/math] muszą spełniać układ równań
- [math]\displaystyle{ \left\{ \begin{array}{l} r a + s = - (b - a)\\ t b + u = b - a\\ r c + s - (t c + u) = 4 (b - a)\\ 3 r a + 3 t b + r b + t a + 4 s + 4 u = 0 \end{array} \right. }[/math]
Mnożąc pierwsze i drugie równanie przez [math]\displaystyle{ (- 4) }[/math], dodając je do siebie, a następnie dodając sumę do równania czwartego, otrzymujemy
- [math]\displaystyle{ (- 4 r a - 4 s - 4 t b - 4 u) + (3 r a + 3 t b + b r + a t + 4 s + 4 u) = 0 }[/math]
czyli
- [math]\displaystyle{ (b - a) (r - t) = 0 }[/math]
Z założenia jest [math]\displaystyle{ b \neq a }[/math], zatem musi być [math]\displaystyle{ r = t }[/math].
Odejmując od drugiego równania pierwsze i dodając różnicę do trzeciego, mamy
- [math]\displaystyle{ (r b + u - r a - s) + (s - u) = 6 (b - a) }[/math]
Skąd otrzymujemy [math]\displaystyle{ r = t = 6 }[/math]. Teraz już łatwo znajdujemy [math]\displaystyle{ s = - 5 a - b }[/math] oraz [math]\displaystyle{ u = - a - 5 b }[/math].
Widzimy, że przez odpowiedni dobór wartości liczb [math]\displaystyle{ r, s, t, u }[/math] mogliśmy zapewnić ciągłość funkcji [math]\displaystyle{ W_2 (x) }[/math]. Fakt, że ciągłe są również funkcje [math]\displaystyle{ W_3 (x) }[/math] i [math]\displaystyle{ W_4 (x) }[/math] jest szczęśliwym przypadkiem. Ponieważ funkcja [math]\displaystyle{ W_5 (x) }[/math] nie jest ciągła, to nie mogliśmy jej wykorzystać w twierdzeniu F14. Wybór funkcji
- [math]\displaystyle{ W_4 (x) = \left\{ {\small\frac{1}{12}} (x - a)^3 (3 x - a - 2 b) \biggr\rvert {\small\frac{1}{12}} (x - b)^3 (3 x - 2 a - b) \right\} }[/math]
zapewnił uzyskanie najdokładniejszego oszacowania błędu.
Przypisy
- ↑ ang. piecewise continuous function
- ↑ ang. piecewise [math]\displaystyle{ C^1 }[/math] function lub piecewise smooth function
- ↑ Wikipedia, Funkcja skokowa Heaviside’a, (Wiki-pl), (Wiki-en)
- ↑ E. Talvila and M. Wiersma, Simple Derivation of Basic Quadrature Formulas, Atlantic Electronic Journal of Mathematics, Volume 5, Number 1, Winter 2012, (LINK)
- ↑ Wikipedia, Sinus i cosinus całkowy, (Wiki-pl), (Wiki-en)
- ↑ MathWorld, Sine Integral, (MathWorld)
- ↑ WolframAlpha, Sine integral function, (WolframAlpha)
- ↑ Wikipedia, Funkcja różniczkowalna, (Wiki-pl), (Wiki-en)
- ↑ Twierdzenie Weierstrassa: Jeżeli funkcja [math]\displaystyle{ f(x) }[/math] określona w przedziale domkniętym jest ciągła, to jest w nim ograniczona. (Wiki-pl), (Wiki-en)