1
$\begingroup$

I am getting "Merijer::hdiv:" Error while evaluating the following integral.

η = 377; 

ncore = 1.4537;

V = {6,3,2,8};

\[Lambda] = 780*10^-9;

k = (2*Pi)/\[Lambda];

ρ = {1.7000000000000001*^-7, 5.*^-7, 1/1000000, 1/
          500000};

Umode = {1.42, 2.4048255576957724, 2.404825557695773, 
         2.4048255576957724};

Wmode = {0.266935298184825`, 3.5037278171663435`, 8.15193181742716`, 
         16.827522910778207`};

β = {8.206976900524202`*^6, 1.0676766940021148`*^7, 
   1.1460493452743163`*^7, 1.1648188685481489`*^7};

a1 = {-0.9716405362194648`, -0.7513937357444692`, \
-0.8094265682069952`, -0.8767301770575249`};

a2 = {0.02835946378053522`, 0.24860626425553078`, 0.1905734317930048`,
    0.12326982294247507`};

a3 = {-1.4936158488806575`, -2.299262374012871`, \
-2.2492698177690467`, -2.144294170304806`};

a4 = {0.25319207555967127`, -0.14963118700643552`, \
-0.12463490888452333`, -0.07214708515240298`};

a5 = {-0.483411020602892`, -0.8862342831689988`, \
-0.8612380050470866`, -0.8087501813149662`};

a6 = {-0.010204828277765476`, -0.41302809084387226`, \
-0.3880318127219601`, -0.3355439889898397`};

                             (*For Even Mode*)

f1 = Cos[ϕ];
g1 = -Sin[ϕ];

                             (*For Odd Mode*)

f2 = Sin[ϕ];
g2 = Cos[ϕ];

er1 = -((a1*BesselJ[0, Umode*r] + a2*BesselJ[2, Umode*r])/
      BesselJ[1, Umode])*f1;

er2 = -(Umode/
     Wmode)*((a1*BesselK[0, Wmode*r] - a2*BesselK[2, Wmode*r])/
    BesselK[1, Wmode])*f1;

eϕ1 = -((a1*BesselJ[0, Umode*r] - a2*BesselJ[2, Umode*r])/
      BesselJ[1, Umode])*g1;

eϕ2 = -(Umode/
     Wmode)*((a1*BesselK[0, Wmode*r] + a2*BesselK[2, Wmode*r])/
    BesselK[1, Wmode])*g1;

hr1 = (1/η)*((k*ncore^2)/β)*((a3*BesselJ[0, Umode*r] - 
       a4*BesselJ[2, Umode*r])/BesselJ[1, Umode])*g1;

hr2 = (1/η)*((k*ncore^2)/β)*(Umode/
     Wmode)*((a5*BesselK[0, Wmode*r] + a6*BesselK[2, Wmode*r])/
     BesselK[1, Wmode])*g1;

hϕ1 = -(1/η)*((k*
       ncore^2)/β)*((a3*BesselJ[0, Umode*r] + 
       a4*BesselJ[2, Umode*r])/BesselJ[1, Umode])*f1;

hϕ2 = - (1/η)*((k*ncore^2)/β)*(Umode/
     Wmode)*((a5*BesselK[0, Wmode*r] - a6*BesselK[2, Wmode*r])/
     BesselK[1, Wmode])*f1;

N1 = 0.5*Table[
   Integrate[(er1[[i]]*hϕ1[[i]] - 
       eϕ1[[i]]*hr1[[i]])*ρ[[i]]^2*r, {r, 0, 1}, {ϕ, 0,
      2*Pi}], {i, 1, Length[V]}]

N2 = 0.5*Table[
   Integrate[(er2[[i]]*hϕ2[[i]] - 
       eϕ2[[i]]*hr2[[i]])*ρ[[i]]^2*r, {r, 1, 2}, {ϕ, 0,
      2*Pi}], {i, 1, Length[V]}] 

1) The N2 integral generates "MeijerG::hdiv: "MeijerG[{{1.,1.5},{1.5}},{{-1.,1.,3.},{0.5,0.}},0.266935\ IntegrateImproperDumpnewx,0.5] does not exist. Arguments are not consistent. " error. The error is present only in first and second elements of N2. Please comment how to perform this integration.

$\endgroup$

1 Answer 1

2
$\begingroup$

The following parameters are not defined: k ncore^2, Length[V]. We put Length[V] = 4 then we have

 N1 = 0.5*Table[
   Integrate[(er1[[i]]*h\[Phi]1[[i]] - 
       e\[Phi]1[[i]]*hr1[[i]])*\[Rho][[i]]^2*r, {r, 0, 1}, {\[Phi], 0,
      2*Pi}], {i, 1, 4}]
N2 = 0.5*Table[
   Integrate[(er2[[i]]*h\[Phi]2[[i]] - 
       e\[Phi]2[[i]]*hr2[[i]])*\[Rho][[i]]^2*r, {r, 1, 2}, {\[Phi], 0,
      2*Pi}], {i, 1, 4}]

As a result, we get

{4.34209*10^-23 k ncore^2, 1.67433*10^-22 k ncore^2, 
 6.5924*10^-22 k ncore^2, 2.68594*10^-21 k ncore^2}
{5.42145*10^-23 k ncore^2, 4.23481*10^-24 k ncore^2, 
 2.0164*10^-24 k ncore^2, 1.07778*10^-24 k ncore^2}
$\endgroup$
4
  • $\begingroup$ Thanks for reminding and comment. Actually its a long code and I placed only necessary lines. These two variables are. ncore = 1.4537; [Lambda] = 780*10^-9; k = (2*Pi)/[Lambda]; $\endgroup$ Jun 23, 2018 at 7:03
  • $\begingroup$ What is the parameter Length[V]? I did not see a problem in calculating integrals if we put Length[V] = 4. $\endgroup$ Jun 23, 2018 at 7:41
  • $\begingroup$ Yes Alex, V is a list of 4 elements but I am getting this error "MeijerG::hdiv: "MeijerG[{{1.,1.5},{1.5}},{{-1.,1.,3.},{0.5,0.}},0.266935\ IntegrateImproperDumpnewx,0.5] does not exist. Arguments are not consistent." while the evaluating the above code in Mathematica 9. Which version you are using? $\endgroup$ Jun 23, 2018 at 12:05
  • $\begingroup$ I'm using the version 11.3.0 for Microsoft Windows (64-bit) (March 7, 2018). I also have an old version 10.0 for Microsoft Windows (64-bit) (June 29, 2014)". It really has an error for the second integral MeijerG[{{1.,1.5},{1.5}},{{-1.,1.,3.},{0.5,0.}},3.\ 5037278171663435 IntegrateImproperDumpnewx,0.5] does not exist. \ Arguments are not consistent. >> $\endgroup$ Jun 24, 2018 at 4:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.