# Thread: Numerical Analysis Midpoint Rule Help

1. ## Numerical Analysis Midpoint Rule Help

Could someone check if this is the correct way to solve this problem.

For what n will the approximation f(x) be accurate to within .0000001 using

$E_{f} = \frac{(b-a)h^2}{6} f''(\mu)$, for some $\mu$ between a and b is.

$h= \frac{b-a}{n+2}$

I think $f''(\mu)$ for some $\mu$ between a and b means the absolute value of the max between a and b.

$f(x) = \int_0^1(\frac{1}{12}x^4 - \frac{1}{6}x^3)dx$

$.0000001 \leq \frac{(1-0)}{6} (\frac{1-0}{n+2})^2 f''(\mu)$

$f''(\mu) = \mu^2 - \mu$

$.0000001 \leq \frac{1}{6} (\frac{1}{n+2})^2 * (\mu^2 - \mu)$

From this part on am I suppose to maximize $\mid f''(\mu)\mid$ on [0,1] and put that in place of $f''(\mu)$ and then solve for n?

If I do that I get

$.0000001 \leq \frac{1}{6} (\frac{1}{n+2})^2 * 5$, where 5 is the max of $\mid f''(\mu)\mid$ on [0,1]

Solving this for n gives 2886.75 and rounding it to 2887. So n would have to be 2887.

2. Originally Posted by TshingY
Could someone check if this is the correct way to solve this problem.

For what n will the approximation f(x) be accurate to within .0000001 using

$E_{f} = \frac{(b-a)h^2}{6} f''(\mu)$, for some $\mu$ between a and b is.

$h= \frac{b-a}{n+2}$

I think $f''(\mu)$ for some $\mu$ between a and b means the absolute value of the max between a and b.

$f(x) = \int_0^1(\frac{1}{12}x^4 - \frac{1}{6}x^3)dx$

$.0000001 \leq \frac{(1-0)}{6} (\frac{1-0}{n+2})^2 f''(\mu)$

$f''(\mu) = \mu^2 - \mu$

$.0000001 \leq \frac{1}{6} (\frac{1}{n+2})^2 * (\mu^2 - \mu)$

From this part on am I suppose to maximize $\mid f''(\mu)\mid$ on [0,1] and put that in place of $f''(\mu)$ and then solve for n?

If I do that I get

$.0000001 \leq \frac{1}{6} (\frac{1}{n+2})^2 * 5$, where 5 is the max of $\mid f''(\mu)\mid$ on [0,1]

Solving this for n gives 2886.75 and rounding it to 2887. So n would have to be 2887.
You have jumbled things up, please post the original question

CB

3. Originally Posted by TshingY
Could someone check if this is the correct way to solve this problem.

For what n will the approximation f(x) be accurate to within .0000001 using

$E_{f} = \frac{(b-a)h^2}{6} f''(\mu)$, for some $\mu$ between a and b is.

$h= \frac{b-a}{n+2}$

I think $f''(\mu)$ for some $\mu$ between a and b means the absolute value of the max between a and b.

$f(x) = \int_0^1(\frac{1}{12}x^4 - \frac{1}{6}x^3)dx$

$.0000001 \leq \frac{(1-0)}{6} (\frac{1-0}{n+2})^2 f''(\mu)$

$f''(\mu) = \mu^2 - \mu$

$.0000001 \leq \frac{1}{6} (\frac{1}{n+2})^2 * (\mu^2 - \mu)$

From this part on am I suppose to maximize $\mid f''(\mu)\mid$ on [0,1] and put that in place of $f''(\mu)$ and then solve for n?

If I do that I get

$.0000001 \leq \frac{1}{6} (\frac{1}{n+2})^2 * 5$, where 5 is the max of $\mid f''(\mu)\mid$ on [0,1]

Solving this for n gives 2886.75 and rounding it to 2887. So n would have to be 2887.
The maximum of $g(x)=|f''(x)|=|x^2-x|$ on $[0,1]$ occurs at $x=1/2$ and so the maximum is: $g(1/2)=1/4$.

CB