MathGroup Archive 2010

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

Search the Archive

Defining constants causes integration to hang

  • To: mathgroup at smc.vnet.net
  • Subject: [mg114215] Defining constants causes integration to hang
  • From: amannuc <amannuc at yahoo.com>
  • Date: Sat, 27 Nov 2010 03:37:37 -0500 (EST)

Dear Mathematica group,

I have found a situation where using the Constants option in Dt causes
an indefinite integration to hang. This is unexpected behavior because
when I don't provide the Constants information, the integration
finishes quickly. I am surprised that in this case providing more
information causes the problem. I am using Mathematica 7.0.

The following works:
n12[r_] := n1 - r dni/lD12 (* n1, dni and lD12 are actually constants
*)

g2[a_] := 2*a*Integrate[ Dt[n12[r], r] (n12[r]* Sqrt[n12[r]^2*r^2 -
a^2]),
       {r, h2, h1}]

and the resulting definite integral seems correct but contains a
number of spurious derivatives such as: Dt[dni, r], Dt[lD12, r], etc.
These derivatives are zero because n1, dni and lD12 are actually
constants, not dependent on r. When I specify such in the Dt[n12[r],
r] expression, the integral never finishes executing. That is, in the
above expression I replace
Dt[n12[r], r] with
Dt[n12[r], r, Constants -> {n1, dni, lD12}  ]. The integral now does
not finish.

So, if I do not use the Constants option in Dt, I have the spurious
derivatives in the calculated expression  (e.g. Dt[dni,r]) which I
seek to remove. One way to do this is to use the transformation rule:
Dt[dni, r] -> 0 (for example). It turns out that I can apply this type
of rule one at a time, and once only.

For example, the following works fine:

g3[a] = g2[a] /. Dt[dni, r] -> 0

which removes the spurious derivatives of dni. If I try to remove
another spurious derivative, the integral hangs. Thus, the following
hangs (trying to remove Dt[dn1, r]:

g4[a] = g3[a] /. Dt[dn1, r] -> 0

It turns out the key fact is that I apply the transformation twice.
For example, I could switch the order of the above two transformation
statements. In that case, the first one completes but the second one
hangs.

Any help/advice is appreciated.

-Tony


  • Prev by Date: Re: disappointing CUDA speed
  • Next by Date: Re: Rendering transparent objects changed in M8
  • Previous by thread: How does one get the current values for ViewPoint et al?
  • Next by thread: Re: Defining constants causes integration to hang