Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #15404 > unrolled thread

Re: Problem with change of variables in an integral

Started byAlexei Boulbitch <Alexei.Boulbitch@iee.lu>
First post2013-09-10 07:46 +0000
Last post2013-09-13 03:11 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: Problem with change of variables in an integral Alexei Boulbitch <Alexei.Boulbitch@iee.lu> - 2013-09-10 07:46 +0000
    Re: Problem with change of variables in an integral Youngjoo Chung <ychung12@gmail.com> - 2013-09-13 03:11 +0000

#15404 — Re: Problem with change of variables in an integral

FromAlexei Boulbitch <Alexei.Boulbitch@iee.lu>
Date2013-09-10 07:46 +0000
SubjectRe: Problem with change of variables in an integral
Message-ID<l0mio3$ltf$1@smc.vnet.net>
Dear Alexei,

Integrate[...] in Map[...] will be evaluated first before Map can apply ReplaceAll[...], so nothing is done by Map.

There is a typo in
Integrate[E^(i \[Phi])/(1 + (E^(i \[Phi]) r)^3), {r, 0, \[Infinity]}]
i needs to be changed to I. Then it will produce the same result.

Transforming integrals by change of variables is not straightforward in Mathematica, especially if the integral can be evaluated in closed form. One method involves wrapping the integral with Hold or HoldForm so that evaluation is not done. In addition, simple replacement of the integration variables will not work and the integrand must be divided by the Jacobian corresponding to the variable transformation.

Another method is to write a customized code based on the box language of Mathematica to interpret the 2-D form of integrals, which does not evaluate the integrals but does so only when asked. This is what is done in the SymbolicComputing package (http://symbcomp.gist.ac.kr, WTC 2011). The commands are:

<<SymbolicComputing`

SCTransInt[\[Integral]f[z] \[DifferentialD]z,
  TransVar -> {z, r, z == r E^(I \[Phi])},
  ReplVar -> {r, 0, \[Infinity]}] /. \[Phi] -> 2 \[Pi]/3

It is to be noted that once the package is loaded, integrals, products and sums in 2-D form are not evaluated. Evaluation can be done using the functions SCEvalInt, SCEvalProd, and SCEvalSum, respectively. Kernel functions Integrate, Product, and Sum are the same and can be used for immediate evaluation.

Sincerely,

Youngjoo Chung


Dear Youngjoo,

Thank you for explanations. It is very helpful. I would like to ask you to give few more details.

First of all, you write that the Integrate statement evaluates before the other ones. Since it is a very important information please give me kindly a reference to the place in the documentation, where this is written.

Second, it would be very helpful, if in the light of the above statement you explain the result of the following:

Clear[f, \[Phi]];
Map[ReplaceAll[#, {z -> r*Exp[I \[Phi]], \[Phi] -> 2 \[Pi]/3}] &,
 Integrate[f[z], {z, 0, \[Infinity]}]]

\!\(
\*SubsuperscriptBox[\(\[Integral]\), \(0\), \(\[Infinity]\)]\(f[
\*SuperscriptBox[\(E\), \(I\ \[Phi]\)]\ r] \[DifferentialD]\((
\*SuperscriptBox[\(E\), \(I\ \[Phi]\)]\ r)\)\)\)


Thank you for the pointing out my stupid mistake with i instead of I, this, indeed, explains the result I got. The reference to your package is also very helpful. Thank you.

Best regards, Alexei


Alexei BOULBITCH, Dr., habil.
IEE S.A.
ZAE Weiergewan,
11, rue Edmond Reuter,
L-5326 Contern, LUXEMBOURG

Office phone :  +352-2454-2566
Office fax:       +352-2454-3566
mobile phone:  +49 151 52 40 66 44

e-mail: alexei.boulbitch@iee.lu



[toc] | [next] | [standalone]


#15424

FromYoungjoo Chung <ychung12@gmail.com>
Date2013-09-13 03:11 +0000
Message-ID<l0tvot$b2p$1@smc.vnet.net>
In reply to#15404
Dear Alexei,

I believe the references mentioned in Alex's reply below explains the evaluation procedure well.

In your earlier message, with

f[z_] := 1/(1 + z^3); 

Integrate[...] is evaluated to (2 \[Pi])/(3 Sqrt[3]) before being passed to Map. This explains the difference that you saw. 

If f[z] is not known, Integrate cannot evaluate and is passed to Map as is as shown in your message. However, the following code

Clear[f, \[Phi]]; 
Map[ReplaceAll[#, {z -> r*Exp[I \[Phi]], \[Phi] -> 2 \[Pi]/3}] &, 
 Integrate[f[z], {z, 0, \[Infinity]}]]
% /. f[z_] -> z

issues an error message

Integrate::ilim: Invalid integration variable or limit(s) in {E^(I \[Phi]) r,0,\[Infinity]}. >>

and even though f[z_] = z is integrable, integration will not be done since E^(I \[Phi]) is not a valid integration variable.

Sincerely,
Youngjoo

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web