Error in plot of equation solution?

Again: Why you cannot explain your problem?

What seems to be shure: You have a complex expression, named T above. It is dependent on two Variables Va and En (which I assume to be real). Hence you have the function
f(Va, En) = T.

In Mathematica this is

f[Va_,En_] := Module[{...},
    (* Do all the calculations until T *)
    (* I have given the coding in my post dated 28.02.2021 under "Point 3" *)
    (* Return T *)
]

Do you agree so far?

Now: Which problem, i.e. which equations do you want to solve? I assumed that you want to solve

Re[f[va0,En]] == h0

for any given {va0, h0}-pair of real values and I gave you the complete numerical solution and programm. See “Point 4” in my post dated 28.02.2021.

Obviously this is not your problem.

You now came up with some “reference plot” and a table with some values. Both contain some integer value n which can be even or odd. This n never appeared before and I have no idea what it is, what it has to do with your T and which problem is showed in your reference plot and table.

Is it really such difficult to explain, what you want to do?

@Affaa Nam, posting a question with unclear details and/or purpose can make others confused and will result in unwanted responses. Please take time to think through the answers and suggestions offered by other members here. If you are still in need of an assistance, then make sure you pinpoint your problem and state it as clearly as possible so that others will have a decent chance to assist.

I have said that

I consider the definition of T to be a function of f[En_], because
the value I want to find is the value of En

The initial condition is

f [ En, Va ] = Re [ f [ En, Va ] ] + Im [ f [ En, Va ] ] = 0

As it turned out, after the plot was formed, only the plot of the “Real” section was similar to the plot in my reading source. So, I think the condition changed to

Re [ f [ En, Va ] ] = 0.

n in my table means the energy level, because the En variable I meant from the start is actually the eigen / energy value. However, I also do not understand how to generate it from a Wolfram Mathematica encoding result. I had thought that maybe the results obtained from the Wolfram Mathematica coding were only in the form of a plot, while the table was created manually by entering the specified coordinate values.

Maybe I need to tell you that I encountered this problem when I read an article / journal, then I tried to study it and found the incomprehension that I asked about. What if I tell / send the journal / article that I am studying so you can understand what I mean and my problem becomes clear? :frowning:

I’m really sorry that my question got confused.

This is the text / resource I am currently studying and I am having trouble with it. The equation I mean is in Chapter II, Section B, more precisely equation (24) and its components are in equations (12) to (17). While the results to be obtained are in chapter III, in plots and tables.

https://arxiv.org/pdf/1309.0308.pdf

T=0 is the equation for the bound states. You use this equation to you solve for En. When you solve for En, you will have multiple solutions because of the periodic nature of sin waves. So you’re solution will be an expression in integer values of n. You can use this solution to build that table. Werner Geiger’s original contour plot is correct. It is most likely the plot where n=0.

How do I get an expression with the integer value n in the solution or plot? Will it be the same or close to the plot in the source of my journal?

I have got this picture, how do I mark the point of intersection between the blue and black lines as the green mark / point on the chart shown by Werner Geiger?

I’m sorry for my limited knowledge of programming / coding so I keep asking questions.

If you have the coordinates ps = {{va, En}, …} of the points and their labels lbls you can can mark them with “Point” and label them with “Inset” within the plot’ s Epilog . As an example :

Block[{f1, f2, x, y, cnt, ps, lbls},
  (* Define two functions(x) *)
  f1[x_] := x^2;
  f2[x_] := 1/2 + x/4;
  (* Calculate the cross section points *)
  sol = Solve[y == f1[x] == f2[x], {x, y}, Reals];
  Echo[sol];
  ps = {x, y} /. sol;
  cnt = Length[ps];
  (* Build labels for those points *)
  lbls = Row[{"P", #}] & /@ Range[cnt];
  Print["Solution points and labels {ps,lbls} = ", 
   Column[{N[ps], lbls}]];
  (* Plot it *)
  Print[
   Plot[{f1[x], f2[x]}, {x, -1, 1},
    Epilog -> {
      (* The points *)
      PointSize[Large], Point[ps],
      (* The labels *)
      Table[
       Inset[Style[lbls[[i]], Bold, Larger], ps[[i]], {2, 2}], {i, 
        cnt}]
      }
    ]
   ];
  ];

However, I only have one function with two variables, namely f[En_, Va_].

OMG!
Of course my mini-example has nothing to do with your problem. You asked how to mark and label points in some plot, and I told you.

I asked how to mark and label points in the plots that I indicate, not in other plots :slight_smile:

Hence you did not ask for marking points, but for finding them, i.e. solving your problem. See my post dated 01.03.2021, “Point 4: Your actual problem”. There I gave you complete answer and coding.

BTW: Meanwhile I read your original paper and found that:

  1. Your function definition seems to be wrong.
  2. Your problem posing is definetly wrong.

I have resumed work on your problem and collected everything in a notebook. I will soon come up with a post that includes this notebook. It will solve your problem completely and correctly.

I think as well that the problem posing is wrong.

In the paper it is explicitly asked for T11 = 0 . T11 is a complex number, so it must simultaneously be Re[ T11 ] = Im[ T11 ] = 0.

As far as I see the function f[ En, Va ] does not contain this condition.

And I think there is a bug in the paper. An expression for T11 is given, but I think it is T22 in fact.

DiracKasten1.nb (218 KB)

Very interesting post and notebook DiracKasten1.nb. Of course you are right concerning the problem posing. We search for solutions of the complex equations of T11 == 0, not Re[T11] == 0 as Affaa told us originally.

I did not check whether T11 should be T22. I believe you are right. But its just naming in our context.

Seriously ??

I will study problem solving which you will show you later.

I am very grateful in advance, Werner Geiger.

So, according to Hans, the expression T11 in the paper is actually T22?

However, I have tried to multiply the matrix manually (by hand) to find T11 and the result is the same as T11 in the paper.

Really? Ok. What is wrong in my notebook DiracKasten1.nb? But as Werner said, that is not really important. The task is to find Re[ T11 ] = 0 (T11 being actually T22 - or not?) and simultaneously Im[ T11 ] = 0, and I don’t see that this problem is solved.

I also feel confused about whether this problem can be solved or not :frowning: However, the results have been shown in the journal. And, Werner also said that he had work on this problem and collected everything in a notebook. Then he will soon come up with a post that includes this notebook.

However, the results have been shown in the journal

But they don’t say how they got their results. With the help of Mathematica. Wow. They should have described what they did (or publish a code).

I think you should contact the author(s) and ask them (and direct their attention to this thread).

Yes, you are right, Hans. They just say “The transcendental complex equation (28) has been solved with the use of MATHEMATICA”. But they don’t publish the code they use to get the results.

I have also tried to contact the author to ask about this through the email address listed in the journal, but to no avail, there has not been an email reply from the author.

And, by the way, @Werner Geiger are you going to make a post about solving this problem like you said a few days ago?