משתמש:אור שחף/133 - הרצאה/3.4.11

מתוך Math-Wiki

מבוא לאינטגרציה נומרית (המשך)[עריכה]

בהרצאה הקודמת הצגנו את כלל סימפסון לקירוב האינטגרל המסויים והראנו שהטעות בחישוב בקטע [math]\displaystyle{ [a,b] }[/math] חסומה ע"י [math]\displaystyle{ \max_{x\in[a,b]}\left|f^{(4)}(x)\right|\frac{h^4(b-a)}{45} }[/math] כאשר h המרחק בין שתי נקודות סמוכות בחלוקה שבחרנו. ניתן גישה אחרת למציאת הטעות, שהיא יותר קצרה ונותנת ערך יותר קטן לחסם של הטעות, אבל היא פחות אינטואיטיבית:

הראנו שמספיק לחשב בקירוב [math]\displaystyle{ \int\limits_{-h}^h f\approx\frac h3\Big(f(-h)+4f(0)+f(h)\Big) }[/math] כאשר f גזירה 4 פעמים בסביבת 0. נגדיר פונקציה חדשה [math]\displaystyle{ G(h):=\int\limits_{-h}^h f-\frac h3\Big(f(-h)+4f(0)+f(h)\Big) }[/math]. G מוגדרת ורציפה בסביבה של 0 וגם (לפי הצבה) [math]\displaystyle{ G(0)=0 }[/math]. עבור F קדומה ל-f מתקיים (לפי המשפט היסודי)

[math]\displaystyle{ \begin{align}\frac\mathrm d{\mathrm dh}G(h)&=\frac\mathrm d{\mathrm dh}\left(F(h)-F(-h)-\frac h3\Big(f(-h)+4f(0)+f(h)\Big)\right)\\&=f(h)+f(-h)-\frac13\Big(f(-h)+4f(0)+f(h)\Big)-\frac h3\Big(-f'(-h)+f'(h)\Big)\end{align} }[/math]

לכן [math]\displaystyle{ \lim_{h\to0}G'(h)=f(0)+f(0)-\frac13\Big(f(0)+4f(0)+f(0)\Big)-0=2f(0)-\frac63f(0)=0 }[/math]. ע"פ הלמה השנייה בהרצאה הקודמת [math]\displaystyle{ G'(0) }[/math] קיים ושווה ל-0. נגזור שוב את G ונקבל [math]\displaystyle{ \lim_{h\to0}G''(h)=0=G''(0) }[/math]. נמשיך לגזור פעמיים נוספות ונקבל [math]\displaystyle{ G'''(0)=G^{(4)}(0)=0 }[/math] וגם [math]\displaystyle{ G^{(4)}(h)=-\frac13\Big(-f'''(-h)+f'''(h)\Big)-\frac h3\Big(f^{(4)}(-h)+f^{(4)}(h)\Big) }[/math]. עתה:

[math]\displaystyle{ }[/math] [math]\displaystyle{ \frac{G(h)-G(0)}{h^5-0^5} }[/math] [math]\displaystyle{ = }[/math] [math]\displaystyle{ \frac{G(h)}{h^5} }[/math] [math]\displaystyle{ }[/math]
לפי משפט קושי קיים [math]\displaystyle{ h_1\in(0,h) }[/math] עבורו: [math]\displaystyle{ }[/math] [math]\displaystyle{ \frac{G'(h_1)}{5h_1^4} }[/math] [math]\displaystyle{ = }[/math] [math]\displaystyle{ }[/math] [math]\displaystyle{ }[/math]
[math]\displaystyle{ }[/math] [math]\displaystyle{ \frac{G'(h_1)-G'(0)}{5h_1^4-5\cdot0^4} }[/math] [math]\displaystyle{ = }[/math] [math]\displaystyle{ }[/math] [math]\displaystyle{ }[/math]
קיים [math]\displaystyle{ h_2\in(0,h_1) }[/math] עבורו: [math]\displaystyle{ }[/math] [math]\displaystyle{ \frac{G''(h_2)}{20h_2^3} }[/math] [math]\displaystyle{ = }[/math] [math]\displaystyle{ }[/math] [math]\displaystyle{ }[/math]
קיים [math]\displaystyle{ h_3\in(0,h_2) }[/math] עבורו: [math]\displaystyle{ }[/math] [math]\displaystyle{ \frac{G'''(h_3)}{60h_3^2} }[/math] [math]\displaystyle{ = }[/math] [math]\displaystyle{ }[/math] [math]\displaystyle{ }[/math]
קיים [math]\displaystyle{ h_4\in(0,h_3) }[/math] עבורו: [math]\displaystyle{ }[/math] [math]\displaystyle{ \frac{G^{(4)}(h_4)}{120h_4} }[/math] [math]\displaystyle{ = }[/math] [math]\displaystyle{ }[/math] [math]\displaystyle{ }[/math]

כעת נגדיר [math]\displaystyle{ M:=\max_{x\in[a,b]}\left|f^{(4)}(x)\right| }[/math]. לפי משפט לגראנז' קיים [math]\displaystyle{ c\in(-h,h) }[/math] כך ש-[math]\displaystyle{ \frac{f^{(3)}(h)-f^{(3)}(-h)}{2h}=f^{(4)}(c) }[/math] ולכן [math]\displaystyle{ \left|f^{(3)}(h)-f^{(3)}(-h)\right|\le2hM }[/math]. מכל זה נובע

[math]\displaystyle{ \begin{align}\left|G^{(4)}(h_4)\right|&\le\left|-\frac13\Big(f^{(3)}(-h_4)+f^{(3)}(h_4)\Big)\right|+\left|\frac{h_4}3\Big(f^{(4)}(-h_4)+f^{(4)}(h_4)\Big)\right|\\&\le\frac{2h_4}3M+\frac{h_4}32M\\&=\frac43Mh_4\end{align} }[/math]

עתה [math]\displaystyle{ \left|\frac{G(h)}{h^5}\right|=\left|\frac{G^{(4)}(h_4)}{120h_4}\right|\le\frac1{120h_4}\frac43Mh_4=\frac M{90} }[/math] וקיבלנו ש-[math]\displaystyle{ |G(h)|\le\frac{Mh^5}{90} }[/math], כלומר הטעות בכל קטע מהסוג [math]\displaystyle{ [x_{k-1},x_{k+1}] }[/math] חסומה ע"י [math]\displaystyle{ \frac{Mh^5}{90} }[/math]. ב-[math]\displaystyle{ [a,b] }[/math] יש [math]\displaystyle{ \frac n2=\frac{(b-a)}{2h} }[/math] ולפיכך הטעות חסומה ע"י [math]\displaystyle{ \frac{b-a}{2h}\cdot\frac{Mh^5}{90}=\frac{Mh^4}{180}(b-a) }[/math]. [math]\displaystyle{ \blacksquare }[/math]

דוגמה[עריכה]

נקרב [math]\displaystyle{ \int\limits_1^2\frac{\mathrm dx}x=\ln(2)\approx0.69314718 }[/math]. נבחר [math]\displaystyle{ h=\frac14 }[/math]. נציב:

[math]\displaystyle{ \begin{array}{l|l}\underline x&\underline{1/x}\\1&1\\1.25&4/5\\1.5&2/3\\1.75&4/7\\2&1/2\end{array} }[/math]
  • הקירוב לפי סכום רימן הוא [math]\displaystyle{ \sum_{k=0}^4f(x_k)h=\frac14\left(1+\frac45+\frac23+\frac47+\frac12\right)\approx\underline{0.6}34523809 }[/math].
  • כעת נעשה קירוב בשיטת הטרפזים:
    [math]\displaystyle{ \frac{f(x_0)+f(x_4)}2h+h\sum_{k=1}^3f(x_k)=\frac18\left(1+\frac12\right)+\frac14\left(\frac45+\frac23+\frac47\right)\approx\underline{0.69}7023792 }[/math]
  • ולפי סימפסון:
    [math]\displaystyle{ \begin{array}{l}\displaystyle\frac h3\left(f(x_0)+4\sum_{k=1}^{2}f(x_{2k-1})+2\sum_{k=1}^{1}f(x_{2k})+f(x_4)\right)\\=\displaystyle\frac1{12}\left(1+4\tfrac45+2\tfrac23+4\tfrac47+\frac12\right)\\\approx\underline{0.693}253968\end{array} }[/math]
    נחשב את סדר הגודל של הטעות בקירוב סימפסון:
    [math]\displaystyle{ f'(x)=-x^{-2}\implies f''(x)=2x^{-3}\implies f^{(3)}(x)=-6x^{-4}\implies f^{(4)}(x)=24x^{-5} }[/math]
    ולכן [math]\displaystyle{ M=\max_{x\in[1,2]}\left|24x^{-5}\right|=24 }[/math] והטעות R בקירוב מקיימת [math]\displaystyle{ |R|\le\frac{Mh^4}{180}(2-1)=\frac1{1920}\lt 5.21\cdot10^{-4} }[/math]

אינטגרל לא אמיתי, סוג I[עריכה]

עד עתה הגדרנו אינטגרלים מסויימים רק עבור פונקציות חסומות בקטעים סופיים. אם הפונקציה לא חסומה ו/או הקטע לא חסום עדיין ניתן להגדיר "אינטגרל לא אמיתי" (improper integral). אינטגרלים של קטעים אינסופיים מהסוג [math]\displaystyle{ \int\limits_{-\infty}^b f,\ \int\limits_a^\infty f,\ \int\limits_{-\infty}^\infty f }[/math] הם אינטגרלים לא אמיתיים מסוג 1.

הגדרה: תהי f פונקציה מוגדרת בקטע מהסוג [math]\displaystyle{ [a,\infty) }[/math]. נאמר ש-f אינטגרבילית מקומית (locally integrable) בקטע זה אם לכל [math]\displaystyle{ b\gt a }[/math] f אינטגרבילית בקטע [math]\displaystyle{ [a,b] }[/math].

למשל, אם f רציפה למקוטעין אז היא אינטגרבילית מקומית.

הגדרה: תהי f מוגדרת ואינטגרבילית מקומית ב-[math]\displaystyle{ [a,\infty) }[/math]. נגדיר [math]\displaystyle{ \int\limits_a^\infty f:=\lim_{R\to\infty}\int\limits_a^R f }[/math]. אם הגבול קיים נאמר שהאינטגרל מתכנס, אחרת הוא מתבדר.

אינטגביליות מקומית מוגדרת באופן דומה עבור קטע מהצורה [math]\displaystyle{ (-\infty,b] }[/math] ואם f אינטגרבילית מקומית שם נגדיר [math]\displaystyle{ \int\limits_{-\infty}^b f:=\lim_{R\to-\infty}\int\limits_R^b f }[/math].

עבור f מוגדרת בכל [math]\displaystyle{ \mathbb R }[/math] נאמר שהיא אינטגרבילית מקומית אם היא אינטגרבילית בכל קטע סופי, ואם כן נגדיר [math]\displaystyle{ \int\limits_{-\infty}^\infty f=\int\limits_{-\infty}^a f+\int\limits_a^\infty f }[/math] עבור [math]\displaystyle{ a\in\mathbb R }[/math] כרצוננו עבורו שני האינטגרלים באגף ימין מתכנסים.

דוגמאות[עריכה]

  1. [math]\displaystyle{ \int\limits_1^\infty\frac{\mathrm dx}{x^2} }[/math]. נחשב:
    [math]\displaystyle{ \begin{align}\int&=\lim_{R\to\infty}\int\limits_1^R\frac{\mathrm dx}{x^2}\\&=\lim_{R\to\infty}\left[-\frac1x\right]_{x=1}^R\\&=\lim_{R\to\infty}\left(-\frac1R+1\right)\\&=1\end{align} }[/math]
    ניתן גם לכתוב בקיצור: [math]\displaystyle{ \int\limits_1^\infty\frac{\mathrm dx}{x^2}=\left[-\frac1x\right]_{x=1}^\infty=0-(-1)=1 }[/math].
  2. [math]\displaystyle{ \int\limits_1^\infty\frac{\mathrm dx}x=[\ln|x|]_{x=1}^\infty=\ln(\infty)-0=\infty }[/math], כלומר האינטגרל מתבדר (אך מתכנס במובן הרחב).
  3. שאלה מארה"ב מלפני הרבה שנים: חצוצרה אינסופית תתקבל מסיבוב הגרף [math]\displaystyle{ y=\frac1x }[/math] סביב ציר ה-x ב-[math]\displaystyle{ [1,\infty) }[/math]. האם יש מספיק צבע בעולם כדי לצבוע אותה מבפנים?
    פתרון: לכאורה התשובה היא לא, כי שטח הפנים של החצוצרה הוא [math]\displaystyle{ \pi\int\limits_1^\infty\frac2x\sqrt{1+\left(-\frac1{x^2}\right)^2}\mathrm dx\gt \pi\int\limits_1^\infty\frac2x\mathrm dx=\infty }[/math], כלומר אין מספיק צבע. אך מכיוון שכמות הצבע נמדדת ביחידות נפח ולא שטח, ומכיוון שהנפח בתוך החצוצרה הוא [math]\displaystyle{ \pi\int\limits_1^\infty\frac{\mathrm dx}{x^2}=\pi }[/math], יספיקו לנו [math]\displaystyle{ \pi }[/math] יחידות מעוקבות של צבע ואפילו ישאר לנו עודף.

שאלה: האם התכנסות האינטגרל [math]\displaystyle{ \int\limits_1^\infty f }[/math] גוררת ש-[math]\displaystyle{ \lim_{x\to\infty} f(x)=0 }[/math] (בדומה לטורים)?

תשובה: לא. נגדיר פונקציה f שהגרף שלה הוא גרף פונקצית משולשים.png

אזי

[math]\displaystyle{ \int\limits_0^\infty f= }[/math] השטח שמתחת לגרף [math]\displaystyle{ =\lim_{n\to\infty}\frac12\left(1+\frac12+\frac14+\frac18+\dots+\frac1{2^n}\right)=\frac22=1 }[/math]

כלומר האינטגרל מתכנס, אבל [math]\displaystyle{ \lim_{x\to\infty} f(x) }[/math] לא קיים.