MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Integrate this how?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg116329] Re: Integrate this how?
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Fri, 11 Feb 2011 04:15:00 -0500 (EST)

I get this in version 8 (with error messages for one or more methods):

r[t_] = (1 + Sin[t]) (1 + 9/10 Cos[8 t]) (1 + 1/10 Cos[24 t]) (9/10 +
      5/100 Cos[200 t]);
arcLength[t_] = Sqrt[r[t]^2 + D[r[t], t]^2] // Simplify;

NIntegrate[arcLength@t, {t, -Pi, Pi},
    Method -> #] & /@ {"GlobalAdaptive", "LocalAdaptive", "MonteCarlo",
    "AdaptiveMonteCarlo", "QuasiMonteCarlo", "AdaptiveQuasiMonteCarlo"}

{48.37, 48.0666, 48.0852, 48.3858, 47.985, 48.0663}

but Integrate simply fails. The following plot suggests how messy this is,  
numerically:

Plot[arcLength@t, {t, -Pi, Pi}]

I think you're trying to approximate a fractal, and that fractal has  
infinite arc length... so it's not surprising you run into difficulties.

Bobby

On Thu, 10 Feb 2011 04:21:36 -0600, BoLe <bole79 at gmail.com> wrote:

> Curve is closed (t from -Pi to Pi) and in polar form
>
> r[t_]:=(1+Sin[t]) (1+9/10 Cos[8 t]) (1+1/10 Cos[24 t]) (9/10+5/100
> Cos[200 t])
>
> Would like to find out its arc length, so the integral of
>
> Sqrt[r[t]^2+D[r[t],t]^2]
>
> Version 7 complains but returns a somewhat reasonable number
> (something around 50; drew together with a circle of the same length),
> version 8 says nothing but gives just too low a number (five and
> something). How can this be? New Mathematica should have no problem
> with such high oscillatory integrands, shouldn't she?
>


-- 
DrMajorBob at yahoo.com


  • Prev by Date: Re: Bug in ParallelDo?
  • Next by Date: Re: Apply a rule to an expression only once
  • Previous by thread: Re: Integrate this how?
  • Next by thread: k-permutations enumeration