## 20 Reputation

2 years, 217 days

## integration over vector variables - how ...

Maple

What is it that's wrong with the following input in Maple?
Note that all variables are real. The sample worksheet is attached.

 >
 >
 (1)

 >
 (2)

 >
 (3)

 >
 (4)

 >
 (5)

 >

## Integration involving dot products of 3-...

Maple

I am trying to get Maple to understand, and evaluate the following integral analytically AND numerically.
The original integrand to be evaluated is given by

(w + m2)(1/4) (p2 + mu)(1/4) / ( (w2 +a2)2 (p2 +a2) (q2 + b2 2)2 ((p - q + w)2 + b12) )

which is to be integrated simultaneously with respect to dw dp dq (where w, p, q are 3-d vectors).
Limits of integration are (in cartesian co-ordinates) from -Infinity to + Infinity

All variables contained in the integrand are Real and >0.
a, m, mu, b1, b2 are constants and >0.
dp = d3p, dq = d3q, dw = d3w
p2=p2, w2=w2, q2=q2

It is of course possible to help Maple along by noting that
(p - q + w)= p2 + q2 + w2 - (2 p q Cos(\theta_pq) ) + (2 p w Cos(\theta_pw) ) - (2 q w Cos(\theta_wq) ) + b12
where \theta_pq is the angle between vectors p and q, theta_pw is the angle between vectors p and w, etc.

However, using the expanded form of (p - q + w)2 would imply that the integral would now need to be written out in tems of
Now, the integral in spherical co-ordinates would be given by the pseudocode below (note that now there are no longer any vector symbols, and the limits of integration have changed)

int ( Sin(\theta_w) d\theta_w Limits {0, pi}) int ( w2 dwradial Limits:{0, Infinity} )
int ( Sin(\theta_p) d\theta_p Limits {0, pi}) int ( p2 dpradial Limits:{0, Infinity} )
int ( Sin(\theta_q) d\theta_q Limits {0, pi}) int ( q2 dqradial Limits:{0, Infinity} )

where we have omitted the integration over \phi_w, \phi_p, \phi_q, assuming that there is no dependence on the \phi angles, resulting in all the \phi angles being integrated over, with the result being a constant multiplied to the rest of the remaining integrals. No additional information on the vectors is available, e.g. the angle between p and q, p and w, q and w, are not specified, the magnitude of the vectors is not specified.

Any ideas if Maple can understand and execute the integral with p, q, w are input as vectors in the integrand directly, as shown earlier?
If it's easier for Maple to evaluate the integral in spherical co-ordinates, any suggestions on setting up the input, i.e. set up that the variables and constants are real, setup the limits of the theta and radial components etc. would also be appreciated.

## Vector Integration in Maple 2018 (compar...

Maple 2018

Is it possible to get the following integral involving vectors done in Maple 2018, but handle the singularity when p1=p3?

Note that the output of p3 and p1 are slightly different, probably because the earlier version of the worksheet was in Maple 2017?

(Note: Earlier version - was due to help received from Dr. Edgardo Cheb-Terrab, using Maple 2017).

with(Physics[Vectors]);
r_ := _i*x+_j*y+_k*z;
r_ := _i x + _j y + _k z
p__1_ := _i*p__1x +_j*p__1y +_k*p__1z ;
p__1_ := _i p__1x  + _j p__1y  + _k p__1z
p__3_ := _i*p__3x +_j*p__3y +_k*p__3z ;
p__3_ := _i p__3x  + _j p__3y  + _k p__3z
Expression to integrate wrt p3
'exp(i*(p__1_ . r_))/((p__3_ - p__1_)^2)'
exp(I Physics:-Vectors:-.(p__1_, r_))
-------------------------------------
2
Physics:-Vectors:-+(p__3_, -p__1_)
Delaying the evaluation above, if evaluation is allowed, the integrand is
exp(I*(p__1_ . r_))/(p__3_-p__1_)^2;
(exp(I (p__1x  x + p__1y  y + p__1z  z)))/((_i (-p__1x  + p__3x )

+ _j (-p__1y  + p__3y ) + _k (-p__1z  + p__3z ))^2)
T i is the imaginary unit
interface(imaginaryunit = I);
I
Because (4), has the value of i before being the imaginary unit, input the integrand again
'exp(i*(p__1_ . r_))/((p__3_ - p__1_)^2)'
exp(I Physics:-Vectors:-.(p__1_, r_))
-------------------------------------
2
Physics:-Vectors:-+(p__3_, -p__1_)

Now on the integration
Int(exp(I*(p__1_ . r_))/(p__3_-p__1_)^2, [p__3x  = -infinity .. infinity, p__3y  = -infinity .. infinity, p__3y  = -infinity .. infinity]);
/infinity   /infinity   /infinity
|           |           |
|           |           |          (exp(I (p__1x  x + p__1y  y
|           |           |
/-infinity  /-infinity  / -infinity

+ p__1z  z)))/((_i (-p__1x  + p__3x ) + _j (-p__1y  + p__3y )

+ _k (-p__1z  + p__3z ))^2) dp__3x  dp__3y  dp__3y
value(Int(exp(I*(p__1x *x+p__1y *y+p__1z *z))/(_i*(-p__1x +p__3x )+_j*(-p__1y +p__3y )+_k*(-p__1z +p__3z ))^2, [p__3x  = -infinity .. infinity, p__3y  = -infinity .. infinity, p__3y  = -infinity .. infinity]));
/         /[
exp(I (p__1x  x + p__1y  y + p__1z  z)) |PIECEWISE|[infinity,
\         \[

Im(_i p__1x  + _j p__1y  + _k p__1z  - _k p__3z )    ]
------------------------------------------------- = 0],
_i                            ]

\\
[0, otherwise]|| infinity
//
In the above, there is the product of three Dirac delta functions, that can be represented as a single 3D Dirac delta
combine(exp(I*(p__1x *x+p__1y *y+p__1z *z))*piecewise(Im(_i*p__1x +_j*p__1y +_k*p__1z -_k*p__3z )/_i = 0, infinity, 0)*infinity);
/         /[
exp(I (p__1x  x + p__1y  y + p__1z  z)) |PIECEWISE|[infinity,
\         \[

Im(_i p__1x  + _j p__1y  + _k p__1z  - _k p__3z )    ]
------------------------------------------------- = 0],
_i                            ]

\\
[0, otherwise]|| infinity
//



## Regularize and evaluate an integral...

Maple 2017

Is there a way in Maple to evaluate the following integral - where the "w" are set to go to zero to avoid singularities? B.t.w. Maple just returns the integral unevaluated with or without the "w" with the simple "int" command.

int(ln(((p1-p3)^2+w^2)/(p1+p3)^(w^2+2))*ln(((p1-p4)^2+w^2)/((p1+p4)^2+w^2))*sin(p1)/(p1*p3*p4), p1 = 0 .. infinity);

or even

int(ln(((p1-p3)^2+w^2)/(p1+p3)^(w^2+2))*ln(((p1-p4)^2+w^2)/((p1+p4)^2+w^2))*sin(p1)/(p1*p3*p4), p1 = 0 .. 100, numeric);

## How to declare 3-d vectors and integrate...

Maple

How does one declare 3d vector in Maple, say p1, p3, and x, and integrate the following function from -Infinity to q, and q to + Infinity? Note that there is an iota in the exponential, and p1.x is the dot product of p1 and x

Integrate from -Infinity to q, q to infinity w.r.t. p1 and p3

e^( - i p1 . x ) * 1/((p3 -p1)^2)

The integration should preferably be in spherical co-ordinates, but a demonstration in Cartesian co-ordinates would also be helpful.

 1 2 Page 1 of 2
﻿