# Simpson's Rule

Show 40 post(s) from this thread on one page
Page 1 of 2 12 Last
• Feb 28th 2010, 07:45 AM
harold
Simpson's Rule
...
• Feb 28th 2010, 08:18 AM
CaptainBlack
Quote:

Originally Posted by harold
Consider the parametric curve $c(t) = (t cos(t), t sin(t)), 0 \le t \le 2\pi$ (a spiral). Recall from calculus that the arclength formula of a parametric curve $c(t) = (x(t), y(t))$ with $a\le t\le b$ is given by $l(c)=\int_a^b\sqrt{x'(t)^2 + y'(t)^2} \, dt$.

Use Simpson's Rule to approximate the integral. Find the error bound using the appropriate error formula, and compare it to the actual error.

How can I solve this?

You have pretty explicit instructions, what exactly are you having difficulties with.

CB
• Feb 28th 2010, 01:25 PM
chisigma
From my point of view there are two points that need to be better specified...

a) on how many points of the interval $[0,2\pi]$ the Simpson's formula has to be used?...

b) what does exactly mean 'actual error'?...

Kind regards

$\chi$ $\sigma$
• Feb 28th 2010, 03:43 PM
harold
...
• Feb 28th 2010, 08:04 PM
CaptainBlack
Quote:

Originally Posted by harold
Consider the parametric curve $c(t) = (t cos(t), t sin(t)), 0 \le t \le 2\pi$ (a spiral).

The parametric equation tell you that:

$x(t)=t \cos(t)$

$y(t)=t \sin(t)$

Quote:

Recall from calculus that the arclength formula of a parametric curve $c(t) = (x(t), y(t))$ with $a\le t\le b$ is given by $l(c)=\int_a^b\sqrt{x'(t)^2 + y'(t)^2} \, dt$.
$x'(t)=\cos(t) - t\sin(t)$

$y'(t)=\sin(t) + t \cos(t)$

So the curve length is:

$l(c)=\int_a^b\sqrt{[\cos(t) - t\sin(t)]^2 + [\sin(t) + t \cos(t)]^2} \, dt$

Now simplify the integrand

Quote:

Use Simpson's Rule to approximate the integral. Find the error bound using the appropriate error formula, and compare it to the actual error.

How can I solve this?
So now you are left just with Simpson's rule to apply.

CB
• Feb 28th 2010, 11:23 PM
harold
...
• Feb 28th 2010, 11:29 PM
General
Quote:

Originally Posted by harold
Hi CB, that's what I'm still having trouble with--when using maple to evaluate the integral, it doesn't integrate by traditional means apparently. The integral to evaluate would be $\int_0^{2\pi} \sqrt{1 + t^2} ~dt$ right? But now using Simpson's Rule and the error bounds is where I'm still stuck.

Substitute $t=tan(\theta)$.
• Feb 28th 2010, 11:57 PM
CaptainBlack
Quote:

Originally Posted by General
Substitute $t=tan(\theta)$.

No don't do that, this is an excercise in Simpson's rule not systemstic integration.

CB
• Mar 1st 2010, 12:09 AM
CaptainBlack
Quote:

Originally Posted by harold
Hi CB, that's what I'm still having trouble with--when using maple to evaluate the integral, it doesn't integrate by traditional means apparently. The integral to evaluate would be $\int_0^{2\pi} \sqrt{1 + t^2} ~dt$ right? But now using Simpson's Rule and the error bounds is where I'm still stuck.

Put $f(x)=\sqrt{1+x^2}$, then:

$
\int_0^{2\pi}\sqrt{1+x^2}\;dx \approx \frac{h}{3}[f(0)+2f(h)+4f(2h)+...+4f((n-2)h)+2f((n-1)h)+f(nh)]
$

where $h=2\pi/n$ where $n$ (even) is the number of steps.

The absolute value of the error in this approximation is less than:

$
\frac{h^4}{180} \max_{\xi \in [0, 2\pi]}|f''''(\xi)|
$

Now where is the problem exactly?

CB
• Mar 1st 2010, 12:10 AM
General
Quote:

Originally Posted by CaptainBlack
No don't do that, this is an excercise in Simpson's rule not systemstic integration.

CB

See:
Quote:

Originally Posted by harold
it doesn't integrate by traditional means apparently

• Mar 1st 2010, 01:51 AM
chisigma
Quote:

Originally Posted by CaptainBlack
Put $f(x)=\sqrt{1+x^2}$, then:

$
\int_0^{2\pi}\sqrt{1+x^2}\;dx \approx \frac{h}{3}[f(0)+2f(h)+4f(2h)+...+4f((n-2)h)+2f((n-1)h)+f(nh)]
$

where $h=2\pi/n$ where $n$ (even) is the number of steps.

The absolute value of the error in this approximation is less than:

$
\frac{h^4}{180} \max_{\xi \in [0, 2\pi]}|f''''(\xi)|
$

Now where is the problem exactly?

CB

In my opinion the probelem 'exactly' is the follows...

a) we know the exact value of the integral...

$\int_{0}^{2\pi} \sqrt{1 + t^{2}}\cdot dt$ (1)

... because the integrand function has an elementar trascendent primitive...

b) we compute an approximate value of (1) using Simpson rule...

$
\int_0^{2\pi}\sqrt{1+t^2}\;dt \approx \frac{h}{3}[f(0)+2f(h)+4f(2h)+...+4f((n-2)h)+2f((n-1)h)+f(nh)]
$
(2)

... where $h=2\pi/n$...

c) the approximate value obtained with (2) is of course function of $h$ [or equivalently of $n$...] and the 'effective error' [the difference between the 'exact value' and the value obtained with (2)...] has to compared with the 'bound'...

$
\frac{h^4}{180} \max_{\xi \in [0, 2\pi]}|f''''(\xi)|
$
(3)

... all that for different value of $n$ in order to valuate the 'accuracy' as function of $h$... very little and pleasant job (Wink) !...

Kind regards

$\chi$ $\sigma$
• Mar 1st 2010, 01:59 AM
CaptainBlack
Quote:

Originally Posted by General
See:

Also my mistake as I did not see the last clause in the problem statement where the error bound is to be compared with the actual error.

But still everything is just book work from the point of arriving at the integral of $\sqrt{1+x^2}$ onward (the integral can be looked up in a table of integrals if need be).

CB
• Mar 1st 2010, 02:41 AM
harold
...
• Mar 1st 2010, 03:09 AM
CaptainBlack
Quote:

Originally Posted by harold
I think I'm getting it guys--so to evaluate this using simpson's rule, the value of h is the value you all supplied above. And to find the numerical answer you just substitute in the value? But now, how do I concretely evaluate the error bound and find the actual error then? Basically everything said above and all the formulas generated I have been trying to work with but the actual computation is what is giving me a hard time especially the error bound (and the appropriate derivative). This integral just doesn't seem to be the normal kind of integrals one encounters with these problems.

EDIT: In addition to the above, I'm try to work through the following part as well and can't seem to match the examples given in my book.
Determine the number of subintervals n required to approximate the integral to within $10^{-6}$ by using the composite trapezoidal rule.

It is a standard type involving a hyperbolic function substitution.

(Something like $t=\sinh(u)$)

but you should just look it up.

CB
• Mar 1st 2010, 03:29 AM
harold
...
Show 40 post(s) from this thread on one page
Page 1 of 2 12 Last