Plotting graphs using numerical/mathematica method

900 Views Asked by At

From the author's equation 13, 14 We can write by inserting V''(A)=0, Solving for R we get, $$R= \frac{6^{D/4} \sqrt{D}}{\sqrt{-2^{1+\frac{D}{2}} 3^{D/2}+3 2^{1+D} A-3^{1+\frac{D}{2}} A^2}}$$ Now inserting the V into the article equation (11)$$E= \left(\frac{\pi }{2}\right)^{D/2} R^D V,$$ we get, $$E= \left(\frac{\pi }{2}\right)^{D/2} \left(-\left(\frac{2}{3}\right)^{D/2} A^3+2^{\frac{1}{2} (-4-D)} A^4+A^2 \left(1+\frac{D}{2 R^2}\right)\right) R^D$$ Now inserting the value of R, we get, $$E= \left(-\left(\frac{2}{3}\right)^{D/2} A^3+2^{\frac{1}{2} (-4-D)} A^4+A^2 \left(1+2^{-1-\frac{D}{2}} 3^{-D/2} \left(-2^{1+\frac{D}{2}} 3^{D/2}+3 2^{1+D} A-3^{1+\frac{D}{2}} A^2\right)\right)\right) \left(\frac{6^{D/4} \sqrt{D}}{\sqrt{-2^{1+\frac{D}{2}} 3^{D/2}+3 2^{1+D} A-3^{1+\frac{D}{2}} A^2}}\right)^D \left(\frac{\pi }{2}\right)^{D/2}$$

For $D= 3$ we finally get, $$E= \frac{27 6^{3/4} \left(-\frac{2}{3} \sqrt{\frac{2}{3}} A^3+\frac{A^4}{8 \sqrt{2}}+A^2 \left(1+\frac{-12 \sqrt{6}+48 A-9 \sqrt{3} A^2}{12 \sqrt{6}}\right)\right) \pi ^{3/2}}{\left(-12 \sqrt{6}+48 A-9 \sqrt{3} A^2\right)^{3/2}} \tag{1}$$ the graph for equation (1) must satisfy the article graph (FIG 2)

My graph:

Plot[(27 6^(3/4) (-(2/3) Sqrt[2/3] A^3 + A^4/(8 Sqrt[2]) +A^2 (1 + (-12 Sqrt[6] + 48 A - 9 Sqrt[3] A^2)/( 12 Sqrt[6]))) \[Pi]^(3/2))/(-12 Sqrt[6] + 48 A - 9 Sqrt[3] A^2)^(3/2), {A, 0.5, 2.5}]

enter image description here

But the author got,

Output : enter image description here

Am I doing wrong in simulation?

Then The author got like this in Fig 3 enter image description here

`

2

There are 2 best solutions below

8
On BEST ANSWER

Mathematica is more powerful that you give it credit for. You don't have to define any quantities explicitly. It is much more efficient to keep things in symbolic terms and numerically substitute values only when you need them. The below works for $d=3$ and gives results consistent with the paper.

Briefly:

  1. Define the function $V(A)=\frac{A^4}{2^{\frac{d+4}{2}}}-A^3 \left(\frac{2}{3}\right)^{d/2}+A^2 \left(\frac{d}{2 R^2}+1\right);$
  2. Calculate the solution to $V''(A)=0$, take the second $R$ solution
  3. Plug that $R$ into $E(A)=\left(\frac{\pi }{2}\right)^{d/2} V(A) R^d$ and plot
  4. Solve $E'(A)=0$, pick the third solution and call the minimum value $E_\infty$
  5. Solve $\left(\frac{\pi }{2}\right)^{d/2} V(A) R^d=E_\infty$ for $R$ as a function of $A$ (taking the third solution); this is the locus of points that attain the energy $E_\infty$

To get the right answers you have to simply select the "right" solution that Mathematica spits out when solving the various equations. The code for $d=3$ appears below and recreates the paper results.

(*Change this to 2 or 3*)
d = 3;
(*Define the potential*)
V[A_] := (1 + d/(2 R^2)) A^2 - (2/3)^(d/2) A^3 + A^4/2^((d + 4)/2);
(*Find the energy*)
Energy[A_] := 
  Evaluate[(\[Pi]/2)^(d/2) R^d V[A] /. Solve[V''[A] == 0, R][[2]]];
Plot[Energy[A], {A, 0, 2.5}, PlotRange -> {0, 100}]
(*This is the minimum energy, matches article for d=2 and d=3*)
NSolve[D[Energy[A], A] == 0, A][[3]]
Einf = Energy[A] /. NSolve[D[Energy[A], A] == 0, A][[3]]
Plot[R /. NSolve[(\[Pi]/2)^(d/2) R^d V[A] == Einf, R][[3]], {A, 0, 
  2.5}, PlotRange -> {0, 6}]

And the plots are

Energy as function of amplitude R and amplitude points that attain the minimum energy

2
On

Look at your function in a much more simple way:

$$R(A) = \frac{\sqrt{12}}{\sqrt{24 A - 9 A^2-12}}$$

for $D=2$. The function should have a horizontal tangent when the derivative of the radicand is zero:

$$\frac{d}{dA} (24 A - 9 A^2-12) = 0 \implies A = \frac{4}{3}$$

which seems to agree with your result. Also, $R$ blows up when the denominator goes to zero, or when $A=2$ and $A=2/3$, which also agrees with your plot. So far, I'd say your plot looks good.