Calculating a three variable complex integral with Cauchy Teorem

I'm trying to evaluate this complex three variable integral:
@(qx,qy,qz)(0.9383/((2*pi)^3*2*sqrt(qx^2+qy^2+qz^2+0.938^2)*sqrt(0.938^2+(qx^2+qy^2+qz^2)*(s-sqrt(qx^2+qy^2+qz^2+0.9383^2)-sqrt(0.9383^2+(qx^2+qy^2+qz^2)+000000.1*i)))))
This is the function I have created, which I have called "propagator_cauchy"
syms qx
syms qy
syms qz
syms s
C = [1+1i -1+1i -1-1i 1-1i]; %This is the integration curve
f=input('write the function you want to integrate: ') ;
q1=input('input first differencial: ');
i1=integral(f,q1,1,1,'Waypoints',C);
t=i1;
q2=input('input second differencial: ');
i2=integral(t,q2,1,1,'Waypoints',C);
p=i2;
q3=input('input third differencial: ');
i3=integral(p,q3,1,1,'Waypoints',C);
But when running this function, this is what appears:
>> propagator_cauchy
write the function you want to integrate: @(qx,qy,qz)(0.9383/((2*pi)^3*2*sqrt(qx^2+qy^2+qz^2+0.938^2)*sqrt(0.938^2+(qx^2+qy^2+qz^2)*(s-sqrt(qx^2+qy^2+qz^2+0.9383^2)-sqrt(0.9383^2+(qx^2+qy^2+qz^2)+000000.1*i)))))
input first differencial: qx
Error using integral (line 85)
A and B must be floating-point scalars.
Error in propagator_cauchy (line 12)
i1=integral(f,q1,1,1,'Waypoints',C);
May anyone know how can I solve this problem?
Thanks in advance

1 件のコメント

David Goodmanson
David Goodmanson 2020 年 1 月 11 日
編集済み: David Goodmanson 2020 年 1 月 11 日
Hi Lara,
could you post the expressions that the code is based on, preferably with some information on the context? Rather than three separate contour integrals, it could be more likely that the integral is a single contour in the complex q^2 plane. Either way, terms like sqrt(q^2 + something) or sqrt(q1^2 + something) mean that the path of integration will run into branch cuts and mess up direct use of Cauchy's theorem. p.s. looks like the expression for i3 should say integral instead of int.

サインインしてコメントする。

回答 (2 件)

LARA VELASCO DAVOISE
LARA VELASCO DAVOISE 2020 年 1 月 12 日
編集済み: LARA VELASCO DAVOISE 2020 年 1 月 12 日

0 投票

Hi David,
The code I am using is the following:
"Specify a square contour that completely encloses the pole at the origin, and then integrate. "
C = [1+i -1+i -1-i 1-i];
q2 = integral(fun,1,1,'Waypoints',C)
Integral 'Waypoints' In MATLAB uses the option to define a sequence of straight-line paths from the first integration limit to the first waypoint, from the first waypoint to the second, and so on, and finally from the last waypoint to the second integration limit.
Furthermore, I had to construct 'fun' as a function handle because for some reason that was what the function asked when being run. That's why I added qi in the input of each integral.
I am going to try to integrate q^2 in a single q^2 complex plane as you have suggested.
This function that I am trying to integrate is a propagator of a Quantum Field proccess, and s is the energy of the two incoming particles. I want to plot the integral respect to s, that's why I ask s to be symbolic.
LARA VELASCO DAVOISE
LARA VELASCO DAVOISE 2020 年 1 月 13 日
編集済み: LARA VELASCO DAVOISE 2020 年 1 月 13 日

0 投票

Just like David suggested I integrated in the q^2 plane
function [in] = cauchy(f)
C = [1000+1000i -1000+1000i -1000-1000i 1000-1000i];
in=integral(f,1,1,'Waypoints',C);
end
And when running the function
syms s
f=@(q)(1./(2.*sqrt(q.^2+0.938^2).*(0.938^2+q.^2).*(s-sqrt(q.^2+0.9383^2)-0.938^2-(q.^2)+000000.1*i)));
It shows the following errors
Error using integralCalc/finalInputChecks (line 522)
Input function must return 'double' or 'single' values. Found 'sym'.
Error in integralCalc/iterateScalarValued (line 315)
finalInputChecks(x,fx);
Error in integralCalc/vadapt (line 132)
[q,errbnd] = iterateScalarValued(u,tinterval,pathlen);
Error in integralCalc (line 38)
[q,errbnd] = vadapt(@identityTransform,tinterval);
Error in integral (line 88)
Q = integralCalc(fun,a,b,opstruct);
Error in cauchy (line 7)
in=integral(f,1,1,'Waypoints',C);
When I remove the s I get this result
>> cauchy(f)
ans =
3.5948e-18 + 1.7347e-18i
Which is too near to zero, hence I think that even when I solved the s problem ("Input function must return 'double' or 'single' values. Found 'sym'"), I would still have a problem with this function.
I need help!

カテゴリ

質問済み:

2020 年 1 月 11 日

編集済み:

2020 年 1 月 13 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by