문제 은행 · 미적분 · 대학 미적분 · 적분 기법

수치적분

중점·사다리꼴·심프슨 공식으로 정적분을 근사하고 오차를 어림한다

유형·난이도는 우리말 풀이가 붙은 문제는 선생님이 정했고, 나머지는 자동 분류라 다를 수 있어요. 난이도가 정해지지 않은 문제는 난이도로 거를 때 빠집니다.

2문제 · 1 / 1쪽

1.CLP-2 · 1.11절 · 31번대학 수준우리말 번역

f(x)f(x) 를 f′′(x)=x2x+1f''(x) = \dfrac{x^2}{x+1} 을 만족하는 함수라고 하세요. (예를 들어 f(x)=16x3−12x2+(1+x)log⁡∣x+1∣f(x)=\frac{1}{6}x^3-\frac{1}{2}x^2+(1+x)\log|x+1| 이면 되지만, 이 문제에서는 f(x)f(x) 가 무엇인지 알 필요가 없습니다.)

(a) xx 가 구간 [0,1][0,1] 에 있을 때마다 ∣f′′(x)∣≤1|f''(x)| \leq 1 임을 보이세요. (b) 구간 [0,1][0,1] 에서 ∣f′′(x)∣|f''(x)| 의 최댓값을 구하세요. (c) M=1M=1 이라고 가정할 때, ∫01f(x) dx\displaystyle\int_{0}^{1}f(x)~\mathrm{d}x 를 오차 10−510^{-5} 이내로 어림하려면 구간을 몇 개 사용해야 하는지 구하세요. (d) (b)에서 구한 MM 의 값을 사용할 때, ∫01f(x) dx\displaystyle\int_0^1 f(x)~\mathrm{d}x 를 오차 10−510^{-5} 이내로 어림하려면 구간을 몇 개 사용해야 하는지 구하세요.

영어 원문 보기

Let f(x)f(x) be a function (For example, f(x)=16x3−12x2+(1+x)log⁡∣x+1∣f(x)=\frac{1}{6}x^3-\frac{1}{2}x^2+(1+x)\log|x+1| will do, but you don't need to know what f(x)f(x) is for this problem.) with f′′(x)=x2x+1f''(x) = \dfrac{x^2}{x+1}.

(a) Show that ∣f′′(x)∣≤1|f''(x)| \leq 1 whenever xx is in the interval [0,1][0,1]. (b) Find the maximum value of ∣f′′(x)∣|f''(x)| over the interval [0,1][0,1]. (c) Assuming M=1M=1, how many intervals should you use to approximate ∫01f(x) dx\displaystyle\int_{0}^{1}f(x)~\mathrm{d}x to within 10−510^{-5}? (d) Using the value of MM you found in (b), how many intervals should you use to approximate ∫01f(x) dx\displaystyle\int_0^1 f(x)~\mathrm{d}x to within 10−510^{-5}?

정답·풀이 보기

(a) 0≤x≤10 \leq x \leq1 일 때 x2≤1x^2 \leq 1 이고 x+1≥1x+1 \geq 1 이므로 ∣f′′(x)∣=x2∣x+1∣≤11=1|f''(x)| = \dfrac{x^2}{|x+1|}\leq \dfrac{1}{1}=1 이다. (b) 닫힌구간에서 함수의 최댓값을 구하려면, 구간의 양 끝점과 구간 안의 임계점에서 함수의 값을 조사한다. 임계점은 함수의 도함수가 0이거나 존재하지 않는 점이다.

최대화하려는 함수는 ∣f′′(x)∣=x2∣x+1∣=x2x+1=f′′(x)|f''(x)| = \frac{x^2}{|x+1|} = \frac{x^2}{x+1}=f''(x) 이다 (구간에 음이 아닌 수만 있기 때문이다). 따라서 임계점은 f′′′(x)=0f'''(x) = 0 이거나 존재하지 않을 때 나타난다. 몫의 미분법을 이용하여 f′′′(x)f'''(x) 를 구한다.

f′′′(x)=(x+1)(2x)−x2(x+1)2=x2+2x(x+1)20=x(x+2)x+10=x또는x=−1또는x=−2\begin{aligned} f'''(x)&=\frac{(x+1)(2x)-x^2}{(x+1)^2}=\frac{x^2+2x}{(x+1)^2}\\ 0&=\frac{x(x+2)}{x+1}\\ 0&=x \quad\text{또는}\quad x=-1\quad\text{또는}\quad x=-2 \end{aligned}

[0,1][0,1] 에 있는 임계점은 x=0x=0 뿐이다. 따라서 [0,1][0,1] 에서 f′′(x)f''(x) 의 극값은 양 끝점에서 나타난다. 실제로 [0,1][0,1] 에 속하는 모든 xx 에 대해 f′′′(x)≥0f'''(x) \geq 0 이므로 f′′(x)f''(x) 는 이 구간에서 증가하고, 따라서 최댓값은 x=1x=1 에서 나타난다. 즉, ∣f′′(x)∣≤f′′(1)=12|f''(x)|\leq f''(1)=\frac{1}{2} (c) 중점법을 사용할 때 절대 오차는 최대 M(b−a)324n2\dfrac{M(b-a)^3}{24n^2} 이다. M=1M=1 을 사용하여 이 값이 10−510^{-5} 이하가 되게 하려면, 다음 계산으로 알맞은 nn 의 값을 구한다.

M(b−a)324n2≤10−5124n2≤10−5(b−a=1, M=1)10524≤n2n≥65\begin{aligned} \dfrac{M(b-a)^3}{24n^2}&\leq 10^{-5}\\ \dfrac{1}{24n^2}&\leq 10^{-5}&(b-a=1,\,M=1)\\ \frac{10^5}{24} & \leq n^2\\ n & \geq 65 \end{aligned} (d) 중점법을 사용할 때 절대 오차는 최대 M(b−a)324n2\dfrac{M(b-a)^3}{24n^2} 이다. M=12M=\frac{1}{2} 을 사용하여 이 값이 10−510^{-5} 이하가 되게 하려면, 다음 계산으로 알맞은 nn 의 값을 구한다.

M(b−a)324n2≤10−5148n2≤10−5(b−a=1, M=12)10548≤n2n≥46\begin{aligned} \dfrac{M(b-a)^3}{24n^2}&\leq 10^{-5}\\ \dfrac{1}{48n^2}&\leq 10^{-5}&(b-a=1,\,M=\frac{1}{2})\\ \frac{10^5}{48} & \leq n^2\\ n & \geq 46 \end{aligned}

참고: 이러한 계산을 얼마나 정확하게 할지는 상황에 따라 크게 달라진다. 예를 들어 MM 을 손으로 구하고, 이를 이용해 nn 을 손으로 구한 다음, 근삿값을 계산하도록 컴퓨터를 프로그래밍한다고 하자. 이처럼 간단한 적분에서는 구간 65개와 46개의 계산 시간 차이가 아주 작을 것이다. 따라서 (b)에서 추가로 하는 수고로 얻는 이점은 많지 않다. 그러나 처음의 대충 구한 MM 으로 n=1000000n=1000000 정도가 나왔다면, 계산 시간을 줄이기 위해 MM 을 개선하는 데 시간을 들일 만하다. 또한 근삿값을 손으로 구한다면 46개의 항을 더하는 것과 65개의 항을 더하는 것의 차이는 상당할 것이므로, 가능한 한 가장 정확한 MM 을 구하는 수고를 미리 들이는 것이 좋을 것이다.

원본 교재 풀이(영어)

(a) When 0≤x≤10 \leq x \leq1, then x2≤1x^2 \leq 1 and x+1≥1x+1 \geq 1, so ∣f′′(x)∣=x2∣x+1∣≤11=1|f''(x)| = \dfrac{x^2}{|x+1|}\leq \dfrac{1}{1}=1. (b) To find the maximum value of a function over a closed interval, we test the function's values at the endpoints of the interval and at its critical points inside the interval. The critical points are where the function's derivative is zero or does not exist.

The function we're trying to maximize is ∣f′′(x)∣=x2∣x+1∣=x2x+1=f′′(x)|f''(x)| = \frac{x^2}{|x+1|} = \frac{x^2}{x+1}=f''(x) (since our interval only contains nonnegative numbers). So, the critical points occur when f′′′(x)=0f'''(x) = 0 or does not exist. We find f′′′(x)f'''(x) Using the quotient rule.

f′′′(x)=(x+1)(2x)−x2(x+1)2=x2+2x(x+1)20=x(x+2)x+10=xorx=−1orx=−2\begin{aligned} f'''(x)&=\frac{(x+1)(2x)-x^2}{(x+1)^2}=\frac{x^2+2x}{(x+1)^2}\\ 0&=\frac{x(x+2)}{x+1}\\ 0&=x \quad\text{or}\quad x=-1\quad\text{or}\quad x=-2 \end{aligned}

The only critical point in [0,1][0,1] is x=0x=0. So, the extrema of f′′(x)f''(x) over [0,1][0,1] will occur at its endpoints. Indeed, since f′′′(x)≥0f'''(x) \geq 0 for all xx in [0,1][0,1], f′′(x)f''(x) is increasing over this interval, so its maximum occurs at x=1x=1. That is, ∣f′′(x)∣≤f′′(1)=12|f''(x)|\leq f''(1)=\frac{1}{2} (c) The absolute error using the midpoint rule is at most M(b−a)324n2\dfrac{M(b-a)^3}{24n^2}. Using M=1M=1, if we want this to be no more than 10−510^{-5}, we find an acceptable value of nn with the following calculation:

M(b−a)324n2≤10−5124n2≤10−5(b−a=1, M=1)10524≤n2n≥65\begin{aligned} \dfrac{M(b-a)^3}{24n^2}&\leq 10^{-5}\\ \dfrac{1}{24n^2}&\leq 10^{-5}&(b-a=1,\,M=1)\\ \frac{10^5}{24} & \leq n^2\\ n & \geq 65 \end{aligned} (d) The absolute error using the midpoint rule is at most M(b−a)324n2\dfrac{M(b-a)^3}{24n^2}. Using M=12M=\frac{1}{2}, if we want this to be no more than 10−510^{-5}, we find an acceptable value of nn with the following calculation:

M(b−a)324n2≤10−5148n2≤10−5(b−a=1, M=12)10548≤n2n≥46\begin{aligned} \dfrac{M(b-a)^3}{24n^2}&\leq 10^{-5}\\ \dfrac{1}{48n^2}&\leq 10^{-5}&(b-a=1,\,M=\frac{1}{2})\\ \frac{10^5}{48} & \leq n^2\\ n & \geq 46 \end{aligned}

Remark: how accurate you want to be in these calculations depends a lot on your circumstances. Imagine, for instance, that you were finding MM by hand, using this to find nn by hand, then programming a computer to evaluate the approximation. For a simple integral like this, the difference between computing time for 65 intervals versus 46 is likely to be miniscule. So, there's not much to be gained by the extra work in (b). However, if your original sloppy MM gave you something like n=1000000n=1000000, you might want to put some time into improving it, to shorten computation time. Moreover, if you were finding the approximation by hand, the difference between adding 46 terms and adding 65 terms would be considerable, and you would probably want to put in the effort up front to find the most accurate MM possible.

한 번 더 — 비슷한 문제 풀기CLP-2 · 1.11절 · 32번
# 수치적분증명·논술도전자동 분류
CLP-2 Integral Calculus CC BY-NC-SA 4.0우리말 번역: 빌드라인 스쿨 — AI 번역·자동 검토(원문과 같은 조건)
2.CLP-2 · 1.11절 · 32번대학 수준우리말 번역

적분 ∫1x121t dt\displaystyle\int_1^{x\vphantom{\frac{1}{2}}} \frac{1}{t}~\mathrm{d}t 를 심프슨 공식으로 어림하여 함수 log⁡x\log x 를 유리함수로 어림하세요. 구간 [1,3][1,3] 의 모든 xx 에 대해 유리함수 f(x)f(x) 와 log⁡x\log x 의 오차가 0.1 이하가 되도록 하세요.

영어 원문 보기

Approximate the function log⁡x\log x with a rational function by approximating the integral ∫1x121t dt\displaystyle\int_1^{x\vphantom{\frac{1}{2}}} \frac{1}{t}~\mathrm{d}t using Simpson's rule. Your rational function f(x)f(x) should approximate log⁡x\log x with an error of not more than 0.1 for any xx in the interval [1,3][1,3].

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

∫1x1t dt\displaystyle\int_1^x \dfrac{1}{t}~\mathrm{d}t 를 심프슨 공식으로 어림하기 전에, 몇 개의 구간을 사용할지 알아야 한다. 그러려면 오차의 한계를 구해야 하고, 이는 d4dt4{1t}\frac{\mathrm{d}^4}{\mathrm{d}{t}^4}\left\{\frac{1}{t}\right\} 의 한계를 구해야 한다는 뜻이다.

ddt{1t}=−1t2d2dt2{1t}=2t3d3dt3{1t}=−6t4d4dt4{1t}=24t5\begin{aligned} \frac{\mathrm{d}}{\mathrm{d}t}\left\{\frac{1}{t}\right\}&=-\frac{1}{t^2}& \frac{\mathrm{d}^2}{\mathrm{d}{t}^2}\left\{\frac{1}{t}\right\}&=\frac{2}{t^3}\\ \frac{\mathrm{d}^3}{\mathrm{d}{t}^3}\left\{\frac{1}{t}\right\}&=-\frac{6}{t^4}& \frac{\mathrm{d}^4}{\mathrm{d}{t}^4}\left\{\frac{1}{t}\right\}&=\frac{24}{t^5} \end{aligned}

따라서 구간 [1,3][1,3] 에서 ∣d4dt4{1t}∣≤24\displaystyle\left|\frac{\mathrm{d}^4}{\mathrm{d}{t}^4}\left\{\frac{1}{t}\right\}\right| \leq 24 이다.

이제 [1,3][1,3] 의 모든 xx 에 대해 오차가 0.1보다 작도록 보장하는 적당한 nn 을 구할 수 있다.

L(b−a)5180n4<0.124(x−1)5180n4<110n4>24⋅(x−1)518[1,3] 의 모든 x 에 대해 x−1≤2 이므로, n4>24⋅2518 이면 허용되는 모든 x 에 대해 n4>24⋅(x−1)518 이다.n4>24⋅2518=1283n>12834≈2.6\begin{aligned} \frac{L(b-a)^5}{180 n^4}&<0 .1 \\\frac{24(x-1)^5}{180 n^4}&< \frac{1}{10} \\n^4 &> \frac{24\cdot (x-1)^5}{18} \\ \text{$[1,3]$ 의 모든 $x$ 에 대해 $x-1 \leq 2$ 이므로, $n^4 > \dfrac{24\cdot 2^5}{18}$ 이면 허용되는 모든 $x$ 에 대해 $n^4 > \dfrac{24\cdot (x-1)^5}{18}$ 이다.} \\ n^4&> \frac{24\cdot 2^5}{18}= \frac{128}{3}\\ n&>\sqrt[4]{\frac{128}{3}}\approx 2.6 \end{aligned}

nn 은 짝수여야 하므로, n=4n=4 개의 구간이면 [1,3][1,3] 의 모든 xx 에 대해 오차가 너무 크지 않도록 보장하기에 충분하다. 이제 n=4n=4, a=1a=1, b=xb=x, Δx=x−14\Delta x = \dfrac{x-1}{4} 로 심프슨 공식에 의한 어림값을 구한다. 1t\frac{1}{t} 의 값을 계산하는 점들은 다음과 같다.

x0=1x1=1+x−14x2=1+2x−14x3=1+3x−14x4=1+4x−14=x+34=x+12=3x+14=x\begin{aligned} x_0 =& 1 & x_1&=1+ \frac{x-1}{4}& x_2&=1+2\frac{x-1}{4}& x_3&=1+3\frac{x-1}{4}& x_4&=1+4\frac{x-1}{4}\\ & & &=\frac{x+3}{4}& &=\frac{x+1}{2}&&=\frac{3x+1}{4}& &=x \end{aligned}

그림

log⁡x=∫1x1t dt≈Δx3[1x0+4x1+2x2+4x3+1x4]=x−112[1+16x+3+4x+1+163x+1+1x]=f(x)\begin{aligned} \log x=\int_1^x \frac{1}{t}~\mathrm{d}t&\approx \frac{\Delta x}{3}\left[\frac{1}{x_0}+\frac{4}{x_1}+\frac{2}{x_2}+\frac{4}{x_3}+\frac{1}{x_4}\right]\\ &=\frac{x-1}{12}\left[1+\frac{16}{x+3}+\frac{4}{x+1}+\frac{16}{3x+1}+\frac{1}{x}\right]\\ &=f(x) \end{aligned}

아래는 어림한 함수 f(x)f(x) 와 자연로그 함수를 같은 좌표축에 나타낸 그래프이다. 자연로그 함수는 붉은 점선으로, 어림한 함수는 푸른 실선으로 나타냈다. 어림한 함수는 작은 양수 xx 에 대해 꽤 정확해 보인다.

그림

원본 교재 풀이(영어)

Before we can take our Simpson's rule approximation of ∫1x1t dt\displaystyle\int_1^x \dfrac{1}{t}~\mathrm{d}t, we need to know how many intervals to use. That means we need to bound our error, which means we need to bound d4dt4{1t}\frac{\mathrm{d}^4}{\mathrm{d}{t}^4}\left\{\frac{1}{t}\right\}.

ddt{1t}=−1t2d2dt2{1t}=2t3d3dt3{1t}=−6t4d4dt4{1t}=24t5\begin{aligned} \frac{\mathrm{d}}{\mathrm{d}t}\left\{\frac{1}{t}\right\}&=-\frac{1}{t^2}& \frac{\mathrm{d}^2}{\mathrm{d}{t}^2}\left\{\frac{1}{t}\right\}&=\frac{2}{t^3}\\ \frac{\mathrm{d}^3}{\mathrm{d}{t}^3}\left\{\frac{1}{t}\right\}&=-\frac{6}{t^4}& \frac{\mathrm{d}^4}{\mathrm{d}{t}^4}\left\{\frac{1}{t}\right\}&=\frac{24}{t^5} \end{aligned}

So, over the interval [1,3][1,3], ∣d4dt4{1t}∣≤24\displaystyle\left|\frac{\mathrm{d}^4}{\mathrm{d}{t}^4}\left\{\frac{1}{t}\right\}\right| \leq 24.

Now, we can find an appropriate nn to ensure our error will be be less than 0.1 for any xx in [1,3][1,3]:

L(b−a)5180n4<0.124(x−1)5180n4<110n4>24⋅(x−1)518Because x−1≤2 for every x in [1,3], if n4>24⋅2518, then n4>24⋅(x−1)518 for every allowed x.n4>24⋅2518=1283n>12834≈2.6\begin{aligned} \frac{L(b-a)^5}{180 n^4}&<0 .1 \\\frac{24(x-1)^5}{180 n^4}&< \frac{1}{10} \\n^4 &> \frac{24\cdot (x-1)^5}{18} \\ \text{Because $x-1 \leq 2$ for every $x$ in $[1,3]$, if $n^4 > \dfrac{24\cdot 2^5}{18}$, then $n^4 > \dfrac{24\cdot (x-1)^5}{18}$ for every allowed $x$.} \\ n^4&> \frac{24\cdot 2^5}{18}= \frac{128}{3}\\ n&>\sqrt[4]{\frac{128}{3}}\approx 2.6 \end{aligned}

Since nn must be even, n=4n=4 is enough intervals to guarantee our error is not too high for any xx in [1,3][1,3]. Now we find our Simpson's rule approximation with n=4n=4, a=1a=1, b=xb=x, and Δx=x−14\Delta x = \dfrac{x-1}{4}. The points where we evaluate 1t\frac{1}{t} are:

x0=1x1=1+x−14x2=1+2x−14x3=1+3x−14x4=1+4x−14=x+34=x+12=3x+14=x\begin{aligned} x_0 =& 1 & x_1&=1+ \frac{x-1}{4}& x_2&=1+2\frac{x-1}{4}& x_3&=1+3\frac{x-1}{4}& x_4&=1+4\frac{x-1}{4}\\ & & &=\frac{x+3}{4}& &=\frac{x+1}{2}&&=\frac{3x+1}{4}& &=x \end{aligned}

figure

log⁡x=∫1x1t dt≈Δx3[1x0+4x1+2x2+4x3+1x4]=x−112[1+16x+3+4x+1+163x+1+1x]=f(x)\begin{aligned} \log x=\int_1^x \frac{1}{t}~\mathrm{d}t&\approx \frac{\Delta x}{3}\left[\frac{1}{x_0}+\frac{4}{x_1}+\frac{2}{x_2}+\frac{4}{x_3}+\frac{1}{x_4}\right]\\ &=\frac{x-1}{12}\left[1+\frac{16}{x+3}+\frac{4}{x+1}+\frac{16}{3x+1}+\frac{1}{x}\right]\\ &=f(x) \end{aligned}

Below is a graph of our approximation f(x)f(x) and natural logarithm on the same axes. The natural logarithm function is shown red and dashed, while our approximating function is solid blue. Our approximation appears to be quite accurate for small, positive values of xx.

figure

한 번 더 — 비슷한 문제 풀기OpenStax 2권 · 3.6절 · 9번
# 수치적분계산도전자동 분류
CLP-2 Integral Calculus CC BY-NC-SA 4.0우리말 번역: 빌드라인 스쿨 — AI 번역·자동 검토(원문과 같은 조건)