1
$\begingroup$

I want to do the following integral

$$ \int\limits_{-\pi/2}^{\pi/2}\dfrac{(k_{up}\cos\phi)\cdot(k_{down}\cos\alpha)}{k_{up}\cos\phi+k_{down}\cos\alpha}\cos{[(k_{up}\cos\phi-k_{down}\cos\alpha)x]}d\phi $$

with the following relations $k_{up}=\sqrt{E}$

$$k_{down}=\sqrt{E-\Delta}$$

$$k_{up}\sin{\phi}=k_{down}\sin{\alpha}$$

If you want you can use arbitrary positive values for $E,\Delta,x$

How should I go about doing this complicated integration. Any insights would be helpful.

$\endgroup$
  • 1
    $\begingroup$ what have you tried until now? $\endgroup$ – Mauricio Fernández Jun 18 '18 at 20:45
  • 1
    $\begingroup$ You seem to have an implicit relationship between some of your variables. If you would like help, you will need to explain further. $\endgroup$ – mikado Jun 18 '18 at 20:45
  • $\begingroup$ I was just trying to solve it on paper and then I tried to solve it analytically on mathematica but I think that is not possible, For Nintegrate do we need to put in the values of all variables? $\endgroup$ – Indeterminate Jun 18 '18 at 20:49
  • $\begingroup$ I have mentioned all the implicit relationships. What extra information do I need to provide? $\endgroup$ – Indeterminate Jun 18 '18 at 20:50
  • 1
    $\begingroup$ People here generally like users to post code as Mathematica code instead of images or TeX, so they can copy-paste it. It makes it convenient for them and more likely you will get someone to help you. You may find this this meta Q&A helpful $\endgroup$ – Michael E2 Jun 19 '18 at 1:33
2
$\begingroup$

At first we assume parameters like: α,e,Δ,x

α = 1;
e = 2;
Δ = 1/3;
x = 1/2;
kd = Sqrt[e - Δ];
ku = kd *Sin[α]/Sin[ϕ];

(* We find a singular point ,because function is not continuous and highly oscillatory*)

point = Simplify[ϕ /. Solve[ku*Cos[ϕ] + kd Cos[α] == 0, ϕ][[1]], 
C[1] ∈ Integers] /. C[1] -> 0

(*-1 *)

Plot[{(ku*Cos[ϕ]*kd Cos[α])/(ku*Cos[ϕ] + kd Cos[α])*
Cos[(ku Cos[ϕ] - kd Cos[α])*x]}, {ϕ, -Pi/2, Pi/2},
Epilog -> {Red, Line[{{point, -2}, {point, 2}}]}]

enter image description here

NIntegrate[(ku*Cos[ϕ]*kd Cos[α])/(ku*Cos[ϕ] + kd Cos[α])*
Cos[(ku Cos[ϕ] - kd Cos[α])*x], {ϕ, -Pi/2,point, Pi/2}, Method -> "PrincipalValue"]

(*We use PrincipalValue to calculate a integral !!! *)

(* 0.404925 *)

Using another method:

NIntegrate[(ku*Cos[ϕ]*kd Cos[α])/(ku*Cos[ϕ] + kd Cos[α])*
Cos[(ku Cos[ϕ] - kd Cos[α])*x], {ϕ, -Pi/2, Pi/2}, 
Exclusions -> ku*Cos[ϕ] + kd Cos[α] == 0, 
WorkingPrecision -> 30, Method -> "DoubleExponential"]

enter image description here

Answer is not very precise.

EDIT:

ClearAll["Global`*"]; Remove["Global`*"];
e = 2;
Δ = 1/3;
x = 1/2;
kd = Sqrt[e - Δ];

point[α_] := ϕ /. FindRoot[kd*Sin[α]/Sin[ϕ]*Cos[ϕ] + kd Cos[α] == 0,
{ϕ, -1/2, 1/2}, Method -> "Secant", WorkingPrecision -> 20,MaxIterations -> 50000];

g[α_?NumericQ] := NIntegrate[
(kd*Sin[α]/Sin[ϕ]*Cos[ϕ]*kd Cos[α])/(kd*Sin[α]/Sin[ϕ]*Cos[ϕ] + kd Cos[α])*
Cos[(kd*Sin[α]/Sin[ϕ] Cos[ϕ] - kd Cos[α])*x], {ϕ, -Pi/2, point[α], Pi/2}, 
Method -> "PrincipalValue", WorkingPrecision -> 20];

n = 50;(* Increase this value for smoother plot*)

ListLinePlot[Table[{α, g[α]}, {α, -Pi/2, Pi/2, 1/n}], AxesLabel -> {"α", "g[α]"}] // Quiet 

enter image description here

$\endgroup$
  • $\begingroup$ Thanks for the answer. One thing I didn't understand was why did you have to assume value of $\alpha$, why can't we vary $\phi$ and get value of $\alpha$ for each $\phi$. $\endgroup$ – Indeterminate Jun 19 '18 at 17:30
  • $\begingroup$ @JashanSinghal. I edited my answer. $\endgroup$ – Mariusz Iwaniuk Jun 19 '18 at 19:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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