לדלג לתוכן

אינפי 1/פולינום טיילור

מתוך Math-Wiki

פולינום טיילור

הגדרה

תהי [math]\displaystyle{ f:(a,b)\rightarrow\mathbb{R} }[/math] פונקציה הגזירה [math]\displaystyle{ n }[/math] פעמים, ותהי [math]\displaystyle{ x_0\in(a,b) }[/math]. פולינום טיילור של [math]\displaystyle{ f }[/math] סביב [math]\displaystyle{ x_0 }[/math] מסדר [math]\displaystyle{ n }[/math] הוא הפולינום

\begin{displaymjx}P_n(x,x_0)=\sum_{k=0}^n\frac{f^{(k)}(x_0)}{k!}(x-x_0)^k=f(x_0)+f'(x_0)(x-x_0)+\frac{f''(x_0)}{2}(x-x_0)^2+\cdots+\frac{f^{(n)}(x_0)}{n!}(x-x_0)^n\end{displaymjx}

אם [math]\displaystyle{ x_0=0 }[/math], לפעמים קוראים לפולינום זה פולינום טיילור-מקלורן או פולינום מקלורן.

מסמנים את השארית בתור [math]\displaystyle{ R_n(x,x_0)=f(x)-P_n(x,x_0) }[/math]

הערה

פולינום טיילור הוא הפולינום היחיד ממעלה [math]\displaystyle{ n }[/math] כך ש-[math]\displaystyle{ n+1 }[/math] הנגזרות שלו מזדהות עם הנגזרות של [math]\displaystyle{ f }[/math], ולכן הוא מקרב את [math]\displaystyle{ f }[/math] בסביבה של [math]\displaystyle{ x_0 }[/math].

דוגמה

ניתן כמה דוגמאות לפולינומי טיילור של פונקציות מוכרות:

  1. פולינום טיילור של [math]\displaystyle{ e^x }[/math] סביב [math]\displaystyle{ x_0=0 }[/math] מסדר [math]\displaystyle{ n }[/math] הוא [math]\displaystyle{ \displaystyle{\sum_{k=0}^n\frac{1}{k!}x^k} }[/math].
  2. פולינום טיילור של [math]\displaystyle{ \ln(1+x) }[/math] סביב [math]\displaystyle{ x_0=0 }[/math] מסדר [math]\displaystyle{ n }[/math] הוא [math]\displaystyle{ \displaystyle{\sum_{k=1}^n\frac{(-1)^{k-1}}{k}x^k} }[/math].
  3. פולינום טיילור של [math]\displaystyle{ \sin(x) }[/math] סביב [math]\displaystyle{ x_0=0 }[/math] מסדר [math]\displaystyle{ 2n+1 }[/math] הוא [math]\displaystyle{ \displaystyle{\sum_{k=0}^n\frac{(-1)^k}{(2k+1)!}x^{2k+1}} }[/math].
  4. פולינום טיילור של [math]\displaystyle{ \cos(x) }[/math] סביב [math]\displaystyle{ x_0=0 }[/math] מסדר [math]\displaystyle{ 2n }[/math] הוא [math]\displaystyle{ \displaystyle{\sum_{k=0}^n\frac{(-1)^k}{(2k)!}x^{2k}} }[/math].

רוצים להבין כמה פולינום טיילור קרוב לפונקציה. יש שני משפטים הנותנים לנו את היכולת למדוד את הקירוב:

משפט פיתוח טיילור עם שארית בצורת פיאנו

תהי [math]\displaystyle{ f:(a,b)\rightarrow\mathbb{R} }[/math] פונקציה הגזירה [math]\displaystyle{ n }[/math] פעמים, ותהי [math]\displaystyle{ x_0\in(a,b) }[/math]. נניח ש-[math]\displaystyle{ P_n(x,x_0) }[/math] פולינום טיילור של [math]\displaystyle{ f }[/math] סביב [math]\displaystyle{ x_0 }[/math] מסדר [math]\displaystyle{ n }[/math]. אזי

\begin{displaymjx}\displaystyle{\lim_{x\to x_0}\frac{f(x)-P_n(x,x_0)}{(x-x_0)^n}}=0\end{displaymjx}

משפט פיתוח טיילור עם שארית בצורת לגראנז’

תהי [math]\displaystyle{ f:(a,b)\rightarrow\mathbb{R} }[/math] פונקציה הגזירה [math]\displaystyle{ n+1 }[/math] פעמים, ותהי [math]\displaystyle{ x_0\in(a,b) }[/math]. נניח ש-[math]\displaystyle{ P_n(x,x_0) }[/math] פולינום טיילור של [math]\displaystyle{ f }[/math] סביב [math]\displaystyle{ x_0 }[/math] מסדר [math]\displaystyle{ n }[/math]. אזי קיימת נקודה [math]\displaystyle{ c }[/math] בין [math]\displaystyle{ x_0 }[/math] ל-[math]\displaystyle{ x }[/math] שעבורה

\begin{displaymjx}f(x)-P_n(x,x_0)=\frac{f^{(n+1)(c)}}{(n+1)!}(x-x_0)^{n+1}\end{displaymjx}

(כמובן, [math]\displaystyle{ c }[/math] תלוי ב-[math]\displaystyle{ x }[/math]).

מהמשפט האחרון אפשר להגיע למסקנה לגבי אומדן השארית בחישוב עם פולינום טיילור:

מסקנה

תהי [math]\displaystyle{ f:(a,b)\rightarrow\mathbb{R} }[/math] פונקציה הגזירה [math]\displaystyle{ n+1 }[/math] פעמים, ותהי [math]\displaystyle{ x_0\in(a,b) }[/math]. נניח ש-[math]\displaystyle{ P_n(x,x_0) }[/math] פולינום טיילור של [math]\displaystyle{ f }[/math] סביב [math]\displaystyle{ x_0 }[/math] מסדר [math]\displaystyle{ n }[/math], ונרשום [math]\displaystyle{ R_n(x,x_0)=f(x)-P_n(x,x_0) }[/math]. עוד נניח שהנגזרת ה-[math]\displaystyle{ n+1 }[/math] של [math]\displaystyle{ f }[/math] חסומה בין [math]\displaystyle{ x_0 }[/math] ל-[math]\displaystyle{ x }[/math], כלומר קיים [math]\displaystyle{ M>0 }[/math] שעבורו לכל [math]\displaystyle{ c }[/math] בין [math]\displaystyle{ x_0 }[/math] ל-[math]\displaystyle{ x }[/math], [math]\displaystyle{ \left|f^{(n+1)}(c)\right|\leq M }[/math]. אזי השגיאה מקיימת

\begin{displaymjx}|f(x)-P_n(x,x_0)|\leq\frac{M}{(n+1)!}|x-x_0|^{n+1}\end{displaymjx}

דוגמה

נחשב את [math]\displaystyle{ \log 1.5 }[/math] בקירוב של 2 ספרות אחרי הנקודה העשרונית.

נסתכל על [math]\displaystyle{ f(x)=\log(1+x) }[/math] . אנו זוכרים כי פולינום טיילור של [math]\displaystyle{ f }[/math] מסדר [math]\displaystyle{ 7 }[/math] סביב [math]\displaystyle{ x_0=0 }[/math] הוא:

\begin{displaymjx}P_7(x,0)=x-\frac{x^2}{2}+\frac{x^3}{3}-\frac{x^4}{4}+\frac{x^5}{5}-\frac{x^6}{6}+\frac{x^7}{7}\end{displaymjx}

לפי לגרנז’ השארית היא מהצורה [math]\displaystyle{ f(0.5)-P_7(0.5,0)=R_7(0.5,0)=\frac{f^{(8)}(c)}{8!} (0.5-0)^8 }[/math] עבור [math]\displaystyle{ 0<c<0.5 }[/math]; אבל

\begin{displaymjx}|f^{(8)}(c)|=\left |-\frac{5040}{(1+c)^8}\right | \leq \frac{5040}{(1+0)^5} = 5040\end{displaymjx}

(אי השוויון נכון משום ש-[math]\displaystyle{ c\in (0,0.5) }[/math]). מכאן שהשגיאה חסומה על ידי

\begin{displaymjx}|f(0.5)-P_7(0.5,0)|\leq \frac{5040}{8!} 0.5^8 < 0.001\end{displaymjx}

לכן הפולינום מסדר 7 נותן קירוב טוב מספיק, ואז אם נציב [math]\displaystyle{ x=0.5 }[/math] נקבל מספר ש-3 הספרות הראשונות שלו אחרי הנקודה הן [math]\displaystyle{ 0.405 }[/math] ולכן אם ניקח את הקירוב ל-2 ספרות אחרי הנקודה נקבל [math]\displaystyle{ 0.41 }[/math] .

נראה שימוש נוסף של פולינום טיילור, והפעם - לחישוב גבולות.

דוגמה

נרצה לחשב את \begin{displaymjx}\lim_{x\to 0} \frac{\cos x-e^{\frac{-x^2}{2}}}{x^4}\end{displaymjx}

נזכור כי פולינומי טיילור מסדר [math]\displaystyle{ 4 }[/math] של הפונקציות הם:

\begin{displaymjx}\cos x = 1-\frac{x^2}{2}+\frac{x^4}{24}+R_1(x) , e^{-\frac{x^2}{2}}=1-\frac{x^2}{2} + \frac{x^4}{8}+R_2(x)\end{displaymjx}

כאשר ידוע, לפי השארית בצורת פיאנו,

\begin{displaymjx}\lim_{x\to0}\frac{R_1(x)}{x^4}=\lim_{x\to0}\frac{R_2(x)}{x^4}=0\end{displaymjx}

נציב את הפיתוחים בגבול, ונקבל:

\begin{displaymjx}\lim_{x\to 0} \frac{\cos x-e^{\frac{x^2}{2}}}{x^4}=\lim_{x\to0}\frac{1-\frac{x^2}{2}+\frac{x^4}{24}+R_1(x)-1+\frac{x^2}{2}-\frac{x^4}{8}-R_2(x)}{x^4}=\end{displaymjx} \begin{displaymjx}=\lim_{x\to0}\frac{-\frac{x^4}{12}+R_1(x)-R_2(x)}{x^4}=-\frac{1}{12}\end{displaymjx}