1
$\begingroup$

Trying to study but am unsure what i am doing/do not think I'm doing this correctly if someone can please help.

The question is:

Determine the values of $n$ and $h$ required to approximate $\int_0^2 e^{2x} \sin^2(3x)\,dx$ to within $10^{-4}$ using Composite Trapezoidal rule'

What i've done is: $$\frac{b-a}{2}[f(x_0)+f(x_1)]=\frac{2}{2} [f(0)+f(2)]\ =\frac{2}{2} [0+4.26264] = 4.262642$$

Now i know i haven't answered the question/found $n$ or $h$ but I don't have worked solutions to this question so i was just hoping for some guidance and explanation to what I'm doing wrong. (the question then asked to do the same thing but with Simpson's Rule, but i don't know how to do that either).

$\endgroup$
  • $\begingroup$ You have up to now not employed the "composite" in "composite trapezoidal method". Do some experiments with the numbers of sub-intervals. $\endgroup$ – LutzL Jun 1 '17 at 8:01
1
$\begingroup$

Hint:

The error of trapezoidal rule for the integral $$\int_a^b f(x)dx$$ is $$\epsilon \approx \frac{h^2}{12}\left[f'(a)-f'(b)\right]=\frac{1}{12}\frac{(b-a)^2}{n^2}\left[f'(a)-f'(b)\right]$$

$\endgroup$
  • $\begingroup$ How do i figure out what n is? $\endgroup$ – H4-math Jun 1 '17 at 4:43
  • $\begingroup$ Find $h$ first. $\endgroup$ – velut luna Jun 1 '17 at 4:45
  • $\begingroup$ if $h = \frac{b-a}{n}$ wouldn't I need to know $n$ to find $h$? $\endgroup$ – H4-math Jun 1 '17 at 4:47
  • $\begingroup$ Find $h$ by the error formula first. $\endgroup$ – velut luna Jun 1 '17 at 4:52
  • $\begingroup$ by making it equal to epsilon instead of approximately equal to epsilon? $\endgroup$ – H4-math Jun 1 '17 at 5:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.