문제 은행 · 미적분 · 대학 미적분 · 급수 심화

테일러 다항식과 오차

먼저 혼자 풀어 보고, 풀이로 확인한 다음, 아래 「한 번 더」 문제로 이어서 연습하세요.

CLP-1 · 3.4절 · 7번대학 수준우리말 번역

6arctan⁡x6\arctan x 의 5차 매클로린 다항식을 이용하여 π\pi 를 어림하세요.

영어 원문 보기

Use a 5th order Maclaurin polynomial for 6arctan⁡x6\arctan x to approximate π\pi.

답 쓰고 채점
정답·풀이 보기

6arctan⁡(13)=6(π6)=π6\arctan\left(\dfrac{1}{\sqrt3}\right)=6\left(\dfrac{\pi}{6}\right)=\pi 임에 주목한다. f(x)=6arctan⁡xf(x)=6\arctan x 의 5차 매클로린 다항식 T5(x)T_5(x) 를 구하자. 그러면 π=f(13)≈T5(13)\pi=f\left(\dfrac{1}{\sqrt{3}}\right) \approx T_5\left(\dfrac{1}{\sqrt{3}}\right) 이다. 먼저 f(x)=6arctan⁡xf(x)=6\arctan x 의 처음 다섯 개의 도함수를 구하자.

f(x)=6arctan⁡xf(0)=0f′(x)=6(11+x2)f′(0)=6f′′(x)=6(0−2x(1+x2)2)=−12(x(1+x2)2)f′′(0)=0f′′′(x)=−12((1+x2)2−x⋅2(1+x2)(2x)(1+x2)4)=−12((1+x2)−4x2(1+x2)3)=−12(1−3x2(1+x2)3)f′′′(0)=−12f(4)(x)=−12((1+x2)3(−6x)−(1−3x2)⋅3(1+x2)2(2x)(1+x2)6)=−12(−6x(1+x2)−6x(1−3x2)(1+x2)4)=144(x−x3(1+x2)4)f(4)(0)=0f(5)(x)=144((1+x2)4(1−3x2)−(x−x3)⋅4(1+x2)3(2x)(1+x2)8)=144((1+x2)(1−3x2)−8x(x−x3)(1+x2)5)=1445x4−10x2+1(1+x2)5f(5)(0)=144\begin{aligned} f(x)&=6\arctan x&f(0)&=0\\ f'(x)&=6\left(\frac{1}{1+x^2}\right)&f'(0)&=6\\ f''(x)&=6\left(\frac{0-2x}{(1+x^2)^2}\right)=-12\left(\frac{x}{(1+x^2)^2}\right)&f''(0)&=0\\ f'''(x)&=-12\left(\frac{(1+x^2)^2-x\cdot 2(1+x^2)(2x)}{(1+x^2)^4}\right)\\ &=-12\left(\frac{(1+x^2)-4x^2}{(1+x^2)^3}\right)\\ &=-12\left(\frac{1-3x^2}{(1+x^2)^3}\right)&f'''(0)&=-12\\ f^{(4)}(x)&=-12\left(\frac{(1+x^2)^3(-6x)-(1-3x^2)\cdot3(1+x^2)^2(2x)}{(1+x^2)^6}\right)\\ &=-12\left(\frac{-6x(1+x^2)-6x(1-3x^2)}{(1+x^2)^4}\right)\\ &=144\left(\frac{x-x^3}{(1+x^2)^4}\right)&f^{(4)}(0)&=0\\ f^{(5)}(x)&=144\left(\frac{(1+x^2)^4(1-3x^2)-(x-x^3)\cdot4(1+x^2)^3(2x)}{(1+x^2)^{8}}\right)\\ &=144\left(\frac{(1+x^2)(1-3x^2)-8x(x-x^3)}{(1+x^2)^{5}}\right)\\ &=144\frac{5x^4-10x^2+1}{(1+x^2)^5}&f^{(5)}(0)&=144 \end{aligned}

이제 이 값들을 이용하여 f(x)f(x) 의 5차 매클로린 다항식을 계산한다.

T5(x)=f(0)+f′(0)x+12f′′(0)x2+13!f′′′(0)x3+14!f(4)(0)x4+15!f(5)(0)x5=6x−126x3+144120x5=6x−2x3+65x5이제 f(13)=6arctan⁡(13)=π 를 어림하면:π=f(13)≈T5(13)=63−233+6535=23(1−13⋅3+15⋅9)≈3.156\begin{aligned} T_5(x)&=f(0)+f'(0)x+\frac{1}{2}f''(0)x^2+\frac{1}{3!}f'''(0)x^3+\frac{1}{4!}f^{(4)}(0)x^4 +\frac{1}{5!}f^{(5)}(0)x^5\\ &=6x-\frac{12}{6}x^3+\frac{144}{120}x^5\\ &=6x-2x^3+\frac{6}{5}x^5 \\ \text{이제 $f\left(\dfrac{1}{\sqrt{3}}\right)=6\arctan\left(\dfrac{1}{\sqrt{3}}\right)=\pi$ 를 어림하면:} \\ \pi&=f\left(\dfrac{1}{\sqrt{3}}\right) \approx T_5\left(\dfrac{1}{\sqrt{3}}\right)= \frac{6}{\sqrt{3}}-\frac{2}{\sqrt{3}^3}+\frac{6}{5\sqrt{3}^5}\\ &=2\sqrt{3}\left(1-\frac{1}{3\cdot3}+\frac{1}{5\cdot 9}\right)\approx 3.156 \end{aligned}

참고: π\pi 를 원하는 정확도까지 계산하는 방법은 매우 많다. 그중 많은 방법이 arctan⁡x\arctan x 의 매클로린 전개를 이용한다. 1706년 존 머신은 매클로린 전개와 π=16arctan⁡15−4arctan⁡1239\pi = 16 \arctan\frac{1}{5} -4\arctan\frac{1}{239} 을 함께 이용하여 π\pi 를 소수 100자리까지 계산하였다.

원본 교재 풀이(영어)

We note that 6arctan⁡(13)=6(π6)=π6\arctan\left(\dfrac{1}{\sqrt3}\right)=6\left(\dfrac{\pi}{6}\right)=\pi. We will find the 5th order Maclaurin polynomial T5(x)T_5(x) for f(x)=6arctan⁡xf(x)=6\arctan x. Then π=f(13)≈T5(13)\pi=f\left(\dfrac{1}{\sqrt{3}}\right) \approx T_5\left(\dfrac{1}{\sqrt{3}}\right). Let's begin by finding the first five derivatives of f(x)=6arctan⁡xf(x)=6\arctan x.

f(x)=6arctan⁡xf(0)=0f′(x)=6(11+x2)f′(0)=6f′′(x)=6(0−2x(1+x2)2)=−12(x(1+x2)2)f′′(0)=0f′′′(x)=−12((1+x2)2−x⋅2(1+x2)(2x)(1+x2)4)=−12((1+x2)−4x2(1+x2)3)=−12(1−3x2(1+x2)3)f′′′(0)=−12f(4)(x)=−12((1+x2)3(−6x)−(1−3x2)⋅3(1+x2)2(2x)(1+x2)6)=−12(−6x(1+x2)−6x(1−3x2)(1+x2)4)=144(x−x3(1+x2)4)f(4)(0)=0f(5)(x)=144((1+x2)4(1−3x2)−(x−x3)⋅4(1+x2)3(2x)(1+x2)8)=144((1+x2)(1−3x2)−8x(x−x3)(1+x2)5)=1445x4−10x2+1(1+x2)5f(5)(0)=144\begin{aligned} f(x)&=6\arctan x&f(0)&=0\\ f'(x)&=6\left(\frac{1}{1+x^2}\right)&f'(0)&=6\\ f''(x)&=6\left(\frac{0-2x}{(1+x^2)^2}\right)=-12\left(\frac{x}{(1+x^2)^2}\right)&f''(0)&=0\\ f'''(x)&=-12\left(\frac{(1+x^2)^2-x\cdot 2(1+x^2)(2x)}{(1+x^2)^4}\right)\\ &=-12\left(\frac{(1+x^2)-4x^2}{(1+x^2)^3}\right)\\ &=-12\left(\frac{1-3x^2}{(1+x^2)^3}\right)&f'''(0)&=-12\\ f^{(4)}(x)&=-12\left(\frac{(1+x^2)^3(-6x)-(1-3x^2)\cdot3(1+x^2)^2(2x)}{(1+x^2)^6}\right)\\ &=-12\left(\frac{-6x(1+x^2)-6x(1-3x^2)}{(1+x^2)^4}\right)\\ &=144\left(\frac{x-x^3}{(1+x^2)^4}\right)&f^{(4)}(0)&=0\\ f^{(5)}(x)&=144\left(\frac{(1+x^2)^4(1-3x^2)-(x-x^3)\cdot4(1+x^2)^3(2x)}{(1+x^2)^{8}}\right)\\ &=144\left(\frac{(1+x^2)(1-3x^2)-8x(x-x^3)}{(1+x^2)^{5}}\right)\\ &=144\frac{5x^4-10x^2+1}{(1+x^2)^5}&f^{(5)}(0)&=144 \end{aligned}

We now use these values to compute the 5th order Maclaurin polynomial for f(x)f(x).

T5(x)=f(0)+f′(0)x+12f′′(0)x2+13!f′′′(0)x3+14!f(4)(0)x4+15!f(5)(0)x5=6x−126x3+144120x5=6x−2x3+65x5Now, if we want to approximate f(13)=6arctan⁡(13)=π:π=f(13)≈T5(13)=63−233+6535=23(1−13⋅3+15⋅9)≈3.156\begin{aligned} T_5(x)&=f(0)+f'(0)x+\frac{1}{2}f''(0)x^2+\frac{1}{3!}f'''(0)x^3+\frac{1}{4!}f^{(4)}(0)x^4 +\frac{1}{5!}f^{(5)}(0)x^5\\ &=6x-\frac{12}{6}x^3+\frac{144}{120}x^5\\ &=6x-2x^3+\frac{6}{5}x^5 \\ \text{Now, if we want to approximate $f\left(\dfrac{1}{\sqrt{3}}\right)=6\arctan\left(\dfrac{1}{\sqrt{3}}\right)=\pi$:} \\ \pi&=f\left(\dfrac{1}{\sqrt{3}}\right) \approx T_5\left(\dfrac{1}{\sqrt{3}}\right)= \frac{6}{\sqrt{3}}-\frac{2}{\sqrt{3}^3}+\frac{6}{5\sqrt{3}^5}\\ &=2\sqrt{3}\left(1-\frac{1}{3\cdot3}+\frac{1}{5\cdot 9}\right)\approx 3.156 \end{aligned}

Remark: There are numerous methods for computing π\pi to any desired degree of accuracy. Many of them use the Maclaurin expansion of arctan⁡x\arctan x. In 1706 John Machin computed π\pi to 100 decimal digits by using the Maclaurin expansion together with π=16arctan⁡15−4arctan⁡1239\pi = 16 \arctan\frac{1}{5} -4\arctan\frac{1}{239}.

한 번 더 — 비슷한 문제CLP-1 · 3.4절 · 9번우리말 번역

x=π4x=\dfrac{\pi}{4} 에서 f(x)=sin⁡xf(x)=\sin x 의 (2n)(2n)차 테일러 다항식을 시그마 기호로 나타내세요.

다 풀었으면 정답 확인

다음을 떠올리자.

T2n(x)=∑k=02nf(k)(π4)k!(x−π4)kT_{2n}(x)=\sum_{k=0}^{2n} \frac{f^{(k)}\left(\frac{\pi}{4}\right)}{k!}\left(x-\frac{\pi}{4}\right)^k

먼저 도함수를 몇 개 구해 보자. 물론 사인 함수를 미분하므로 도함수는 네 번마다 반복된다.

f(x)=sin⁡xf(π4)=12f′(x)=cos⁡xf′(π4)=12f′′(x)=−sin⁡xf′′(π4)=−12f′′′(x)=−cos⁡xf′′′(π4)=−12\begin{aligned} f(x)&=\sin x & f\left(\frac{\pi}{4}\right)&=\frac{1}{\sqrt 2}\\ f'(x)&=\cos x & f'\left(\frac{\pi}{4}\right)&=\frac{1}{\sqrt{2}}\\ f''(x)&=-\sin x & f''\left(\frac{\pi}{4}\right)&=-\frac{1}{\sqrt 2}\\ f'''(x)&=-\cos x & f'''\left(\frac{\pi}{4}\right)&=-\frac{1}{\sqrt{2}}\\ \end{aligned}

따라서 미분계수의 규칙은 12\dfrac{1}{\sqrt{2}}, 12\dfrac{1}{\sqrt{2}}, −12-\dfrac{1}{\sqrt{2}}, −12-\dfrac{1}{\sqrt{2}}, 12\dfrac{1}{\sqrt{2}}, 12\dfrac{1}{\sqrt{2}}, −12-\dfrac{1}{\sqrt{2}}, −12-\dfrac{1}{\sqrt{2}}, … 이다. 이것을 시그마 기호로 나타내기는 조금 까다롭다. 짝수 거듭제곱과 홀수 거듭제곱을 나누면 같은 값이 두 번씩 나오는 부분을 처리할 수 있다. (x−π4)\left(x-\frac{\pi}{4}\right) 의 짝수 거듭제곱을 포함하는 T2nT_{2n} 의 처음 몇 개의 항은 다음과 같다.

12⏟k=0−12!2(x−π4)2⏟k=2+14!2(x−π4)4⏟k=4\begin{aligned} \underbrace{\frac{1}{\sqrt{2}}}_{k=0} -\underbrace{\frac{1}{2!\sqrt{2}}\left(x-\frac{\pi}{4}\right)^{2}}_{k=2} +\underbrace{\frac{1}{4!\sqrt{2}}\left(x-\frac{\pi}{4}\right)^{4}}_{k=4} \end{aligned}

이웃한 항끼리 부호가 번갈아 나타남을 알 수 있다. 따라서 kk 를 2ℓ2\ell 로 바꿔 쓰면 이 항들은 다음과 같다.

12⏟ℓ=0−12!2(x−π4)2⏟ℓ=1+14!2(x−π4)4⏟ℓ=2\begin{aligned} \underbrace{\frac{1}{\sqrt{2}}}_{\ell=0} -\underbrace{\frac{1}{2!\sqrt{2}}\left(x-\frac{\pi}{4}\right)^{2}}_{\ell=1} +\underbrace{\frac{1}{4!\sqrt{2}}\left(x-\frac{\pi}{4}\right)^{4}}_{\ell=2} \end{aligned}

여기서 ℓth\ell^{\rm th} 번째 항은 (−1)ℓ(2ℓ)!2(x−π4)2ℓ\frac{(-1)^\ell}{(2\ell)!\sqrt{2}}\left(x-\frac{\pi}{4}\right)^{2\ell} 이다. 이것이 정말 ℓth\ell^{\rm th} 번째 항인지 확인하려면 ℓ=0,1,2\ell=0,1,2 에 대해 직접 계산해 보면 된다. k=2nk=2n 일 때 ℓ=n\ell=n 이므로

∑0≤k≤2nk evenf(k)(π4)k!(x−π4)k=∑ℓ=0n(−1)ℓ(2ℓ)!2(x−π4)2ℓ\begin{aligned} \sum_{\genfrac{}{}{0in}{}{0\le k\le 2n}{k{\rm\ even}}} \frac{f^{(k)}\left(\frac{\pi}{4}\right)}{k!}\left(x-\frac{\pi}{4}\right)^k =\sum_{\ell=0}^{n}\frac{(-1)^\ell}{(2\ell)!\sqrt{2}}\left(x-\frac{\pi}{4}\right)^{2\ell} \end{aligned}

이제 홀수 거듭제곱을 살펴보자. (x−π4)\left(x-\frac{\pi}{4}\right) 의 홀수 거듭제곱을 포함하는 T2nT_{2n} 의 처음 몇 개의 항은 다음과 같다.

12(x−π4)⏟k=1−13!2(x−π4)3⏟k=3+15!2(x−π4)5⏟k=5\begin{aligned} \underbrace{\frac{1}{\sqrt{2}}\left(x-\frac{\pi}{4}\right)}_{k=1} -\underbrace{\frac{1}{3!\sqrt{2}}\left(x-\frac{\pi}{4}\right)^{3}}_{k=3} +\underbrace{\frac{1}{5!\sqrt{2}}\left(x-\frac{\pi}{4}\right)^{5}}_{k=5} \end{aligned}

이번에도 이웃한 항끼리 부호가 번갈아 나타남을 알 수 있다. 따라서 kk 를 2ℓ+12\ell+1 로 바꿔 쓰면 이 항들은 다음과 같다.

12(x−π4)⏟ℓ=0−13!2(x−π4)3⏟ℓ=1+15!2(x−π4)5⏟ℓ=2\begin{aligned} \underbrace{\frac{1}{\sqrt{2}}\left(x-\frac{\pi}{4}\right)}_{\ell=0} -\underbrace{\frac{1}{3!\sqrt{2}}\left(x-\frac{\pi}{4}\right)^{3}}_{\ell=1} +\underbrace{\frac{1}{5!\sqrt{2}}\left(x-\frac{\pi}{4}\right)^{5}}_{\ell=2} \end{aligned}

여기서 ℓth\ell^{\rm th} 번째 항은 (−1)ℓ(2ℓ+1)!2(x−π4)2ℓ+1\frac{(-1)^\ell}{(2\ell+1)!\sqrt{2}}\left(x-\frac{\pi}{4}\right)^{2\ell+1} 이다. 이것이 정말 ℓth\ell^{\rm th} 번째 항인지 확인하려면 ℓ=0,1,2\ell=0,1,2 에 대해 직접 계산해 보면 된다. 2n2n 보다 작은 가장 큰 홀수 정수는 2n−12n-1 이고, k=2n−1=2ℓ+1k=2n-1=2\ell+1 일 때 ℓ=n−1\ell=n-1 이므로

∑0≤k≤2nk oddf(k)(π4)k!(x−π4)k=∑ℓ=0n−1(−1)ℓ(2ℓ+1)!2(x−π4)2ℓ+1\begin{aligned} \sum_{\genfrac{}{}{0in}{}{0\le k\le 2n}{k{\rm\ odd}}} \frac{f^{(k)}\left(\frac{\pi}{4}\right)}{k!}\left(x-\frac{\pi}{4}\right)^k =\sum_{\ell=0}^{n-1}\frac{(-1)^\ell}{(2\ell+1)!\sqrt{2}}\left(x-\frac{\pi}{4}\right)^{2\ell+1} \end{aligned}

짝수 거듭제곱과 홀수 거듭제곱을 합치면

T2n(x)=∑ℓ=0n(−1)ℓ(2ℓ)!2(x−π4)2ℓ+∑ℓ=0n−1(−1)ℓ(2ℓ+1)!2(x−π4)2ℓ+1\begin{aligned} T_{2n}(x)&=\sum_{\ell=0}^{n}\frac{(-1)^\ell}{(2\ell)!\sqrt{2}}\left(x-\frac{\pi}{4}\right)^{2\ell} +\sum_{\ell=0}^{n-1}\frac{(-1)^\ell}{(2\ell+1)!\sqrt{2}}\left(x-\frac{\pi}{4}\right)^{2\ell+1} \end{aligned}

이 문제로 이어서 풀기
# 테일러 다항식과 오차계산도전자동 분류

「테일러 다항식과 오차」 문제 목록으로