0
$\begingroup$

I am fairly new to mathematica so I need a little bit of help. I need to plot the zeros of an equation containing confluent hypergeometric functions. The equation i need to solve is given by the following equation:

eq[j_, δ_, ϵ_, α_, Z_] = 
Exp[I*Sqrt[ϵ^2 - δ^2]]*((j - \
(Z*α*δ)/(I*Sqrt[ϵ^2 - δ^2]))*
 Hypergeometric1F1[
  Sqrt[j^2 - (Z*α)^2] + (Z*α*ϵ)/(I*
      Sqrt[ϵ^2 - δ^2]), 
  1 + 2*Sqrt[j^2 - (Z*α)^2], -2*I*
   Sqrt[ϵ^2 - δ^2]] + (Sqrt[
    j^2 - Z^2 α^2] + (Z*α*ϵ)/(I*
      Sqrt[ϵ^2 - δ^2]))*
 Hypergeometric1F1[
  1 + Sqrt[
    j^2 - (Z*α)^2] + (Z*α*ϵ)/(I*
      Sqrt[ϵ^2 - δ^2]), 
  1 + 2*Sqrt[j^2 - (Z*α)^2], -2*I*
   Sqrt[ϵ^2 - δ^2]]) 

It's a rather complex function. The key is that i need to plot the zeros of this function (zeros in epsilon domain) and that for different values of delta.

So I tried this code:

Plot[(ϵ /. 
Part[Solve[
  eq[1/2, δ, ϵ, 0.25, 1] == 0 && 
   0 < Abs@ϵ < 10, ϵ, Complexes], 
 3])/δ, {δ, 0, 10}]

I have to take the third piece of the list because I only need positive values op epsilon. The problem with this is that it is taking forever to run. I first tried Findroot but the fact that it needs a start value is a huge problem.

$\endgroup$
  • $\begingroup$ Welcome! 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour and check the faqs! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$ – user9660 Sep 12 '15 at 14:53
1
$\begingroup$

If I understand you correctly. You are looking for a function epsilon[delta] where epsilon are the roots of the equation eq.

eq[j_, δ_, ϵ_, α_, Z_] = 
  Exp[I*Sqrt[ϵ^2 - δ^2]]*((j -  \
(Z*α*δ)/(I*Sqrt[ϵ^2 - δ^2]))*
      Hypergeometric1F1[
       Sqrt[j^2 - (Z*α)^2] + (Z*α*ϵ)/(I*
           Sqrt[ϵ^2 - δ^2]), 
       1 + 2*Sqrt[j^2 - (Z*α)^2], -2*I*
        Sqrt[ϵ^2 - δ^2]] + (Sqrt[
         j^2 - Z^2 α^2] + (Z*α*ϵ)/(I*
           Sqrt[ϵ^2 - δ^2]))*
      Hypergeometric1F1[
       1 + Sqrt[
         j^2 - (Z*α)^2] + (Z*α*ϵ)/(I*
           Sqrt[ϵ^2 - δ^2]), 
       1 + 2*Sqrt[j^2 - (Z*α)^2], -2*I*
        Sqrt[ϵ^2 - δ^2]]);

x1 = Range[0, 0.9, 0.1];
sol1 = ϵ /. 
     FindRoot[eq[1/2, #, ϵ, 0.25, 1] == 0, {ϵ, 1}] & /@ x1//Chop

{1.72952, 1.71889, 1.71227, 1.7097, 1.71117, 1.71665, 1.72612, 1.7395, 1.75672, 1.77768}

x2 = Range[1, 10, 0.1];
sol2 = ϵ /.FindRoot[eq[1/2, #, ϵ, 0.25, 1] == 0, {ϵ, 0}] & /@ x2 //Chop

{1.80227, 1.83038, 1.86186, 1.89658, 1.93441, 1.97518, 2.01877, \ 2.06501, 2.11376, 2.16489, 2.21826, 2.27373, 2.33118, 2.39048, \ 2.45153, 2.5142, 2.57841, 2.64404, 2.71101, 2.77924, 2.84864, \ 2.91913, 2.99065, 3.06313, 3.13651, 3.21073, 3.28573, 3.36147, \ 3.4379, 3.51497, 3.59265, 3.67089, 3.74966, 3.82892, 3.90866, \ 3.98882, 4.0694, 4.15035, 4.23167, 4.31332, 4.39529, 4.47756, 4.5601, \ 4.6429, 4.72595, 4.80922, 4.89271, 4.9764, 5.06028, 5.14434, 5.22856, \ 5.31294, 5.39746, 5.48212, 5.56691, 5.65182, 5.73684, 5.82197, \ 5.9072, 5.99252, 6.07792, 6.16341, 6.24897, 6.3346, 6.4203, 6.50606, \ 6.59188, 6.67775, 6.76368, 6.84965, 6.93566, 7.02172, 7.10782, \ 7.19395, 7.28011, 7.36631, 7.45253, 7.53878, 7.62506, 7.71136, \ 7.79768, 7.88402, 7.97039, 8.05676, 8.14316, 8.22957, 8.316, 8.40243, \ 8.48888, 8.57535, 8.66182}

data = Thread@{x1, sol1}~Union~Thread@{x2, sol2};
ListLinePlot[data, AxesLabel -> {delta, epsilon}]

enter image description here

$\endgroup$
  • $\begingroup$ @Robbe I have re-edit my answer. I hope it is clear. $\endgroup$ – user31001 Sep 14 '15 at 12:24

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.