solution to hw4: mathematica

5
Solution to HW4: Mathematica portion Problem 2: extra credit parts Data (obtained using simple numerical 4-d integration with a 50^4 grid in the positive quadrant in k-space) Obtained with a FORTRAN program (!) Goes up to Lmax=18 Results are for the integral I(L1,L2) defined in the solutions. Notation is (L1, L2, loop value) for L1 x L2 loops This is imported from a data file The results are probably only accurate to 3 or 4 decimal places for the largest loops.

Upload: others

Post on 23-Dec-2021

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Solution to HW4: Mathematica

Solution to HW4: Mathematica

portion

Problem 2: extra credit parts

Data (obtained using simple numerical 4-d integration with a

50^4 grid in the positive quadrant in k-space)

Obtained with a FORTRAN program (!)

Goes up to Lmax=18

Results are for the integral I(L1,L2) defined in the solutions.

Notation is (L1, L2, loop value) for L1 x L2 loops

This is imported from a data file

The results are probably only accurate to 3 or 4 decimal places for the largest loops.

Page 2: Solution to HW4: Mathematica

loops

881, 1, 0.25<, 81, 2, 0.43113<, 81, 3, 0.6011<, 81, 4, 0.76881<, 81, 5, 0.93591<,81, 6, 1.1028<, 81, 7, 1.2696<, 81, 8, 1.43635<, 81, 9, 1.60308<, 81, 10, 1.76978<,81, 11, 1.93648<, 81, 12, 2.10317<, 81, 13, 2.26986<, 81, 14, 2.43654<,81, 15, 2.60321<, 81, 16, 2.76989<, 81, 17, 2.93656<, 81, 18, 3.10324<,82, 2, 0.68466<, 82, 3, 0.90568<, 82, 4, 1.11934<, 82, 5, 1.33085<, 82, 6, 1.54157<,82, 7, 1.75193<, 82, 8, 1.9621<, 82, 9, 2.17217<, 82, 10, 2.38217<, 82, 11, 2.59213<,82, 12, 2.80207<, 82, 13, 3.01198<, 82, 14, 3.22188<, 82, 15, 3.43176<,82, 16, 3.64164<, 82, 17, 3.85151<, 82, 18, 4.06138<, 83, 3, 1.1526<,83, 4, 1.38561<, 83, 5, 1.61435<, 83, 6, 1.84143<, 83, 7, 2.06775<, 83, 8, 2.29367<,83, 9, 2.51936<, 83, 10, 2.7449<, 83, 11, 2.97036<, 83, 12, 3.19574<,83, 13, 3.42108<, 83, 14, 3.64639<, 83, 15, 3.87168<, 83, 16, 4.09695<,83, 17, 4.3222<, 83, 18, 4.54745<, 84, 4, 1.63074<, 84, 5, 1.86911<, 84, 6, 2.10478<,84, 7, 2.33918<, 84, 8, 2.57289<, 84, 9, 2.80621<, 84, 10, 3.03928<,84, 11, 3.27219<, 84, 12, 3.50498<, 84, 13, 3.7377<, 84, 14, 3.97036<,84, 15, 4.20298<, 84, 16, 4.43557<, 84, 17, 4.66813<, 84, 18, 4.90067<,85, 5, 2.11441<, 85, 6, 2.35585<, 85, 7, 2.59543<, 85, 8, 2.83399<, 85, 9, 3.07195<,85, 10, 3.30955<, 85, 11, 3.54689<, 85, 12, 3.78407<, 85, 13, 4.02112<,85, 14, 4.25809<, 85, 15, 4.495<, 85, 16, 4.73185<, 85, 17, 4.96867<,85, 18, 5.20545<, 86, 6, 2.6018<, 86, 7, 2.84524<, 86, 8, 3.0873<, 86, 9, 3.32855<,86, 10, 3.56927<, 86, 11, 3.80965<, 86, 12, 4.04979<, 86, 13, 4.28976<,86, 14, 4.52961<, 86, 15, 4.76936<, 86, 16, 5.00905<, 86, 17, 5.24868<,86, 18, 5.48827<, 87, 7, 3.09186<, 87, 8, 3.33671<, 87, 9, 3.58049<, 87, 10, 3.8236<,87, 11, 4.06625<, 87, 12, 4.30859<, 87, 13, 4.5507<, 87, 14, 4.79265<,87, 15, 5.03448<, 87, 16, 5.27621<, 87, 17, 5.51787<, 87, 18, 5.75947<,88, 8, 3.58393<, 88, 9, 3.82982<, 88, 10, 4.07486<, 88, 11, 4.31933<, 88, 12, 4.5634<,88, 13, 4.80719<, 88, 14, 5.05077<, 88, 15, 5.29419<, 88, 16, 5.53749<,88, 17, 5.7807<, 88, 18, 6.02383<, 89, 9, 4.07755<, 89, 10, 4.32424<, 89, 11, 4.57023<,89, 12, 4.81574<, 89, 13, 5.0609<, 89, 14, 5.30581<, 89, 15, 5.55051<,89, 16, 5.79507<, 89, 17, 6.03952<, 89, 18, 6.28387<, 810, 10, 4.57239<,810, 11, 4.81972<, 810, 12, 5.06647<, 810, 13, 5.3128<, 810, 14, 5.55881<,810, 15, 5.8046<, 810, 16, 6.0502<, 810, 17, 6.29566<, 810, 18, 6.54102<,811, 11, 5.06824<, 811, 12, 5.31609<, 811, 13, 5.56344<, 811, 14, 5.81042<,811, 15, 6.05713<, 811, 16, 6.30363<, 811, 17, 6.54996<, 811, 18, 6.79616<,812, 12, 5.56492<, 812, 13, 5.81319<, 812, 14, 6.06104<, 812, 15, 6.30857<,812, 16, 6.55585<, 812, 17, 6.80293<, 812, 18, 7.04986<, 813, 13, 6.0623<,813, 14, 6.31093<, 813, 15, 6.55919<, 813, 16, 6.80717<, 813, 17, 7.05493<,813, 18, 7.3025<, 814, 14, 6.56028<, 814, 15, 6.80921<, 814, 16, 7.05782<,814, 17, 7.30618<, 814, 18, 7.55434<, 815, 15, 7.05877<, 815, 16, 7.30797<,815, 17, 7.55688<, 815, 18, 7.80557<, 816, 16, 7.55771<, 816, 17, 7.80713<,816, 18, 8.05631<, 817, 17, 8.05704<, 817, 18, 8.30667<, 818, 18, 8.55673<<

Analyzing loops

Keep only L1 as an argument to allow 2-D plotting

In plot, botton “layer” corresponds to square loops (1x1, 2x2,... 18x18),

while top layer are loops with one side being 18 (1x18, 2x18,... 18x18), etc.

2 soln4.nb

Page 3: Solution to HW4: Mathematica

newloops = Table@8loops@@iDD@@1DD, loops@@iDD@@3DD<, 8i, 1, 171<D;

ListPlot@newloops, PlotStyle ® PointSize@MediumDD

5 10 15

2

4

6

8

It is apparent that nearly linear behavior sets in only for L1 > ~4

So restrict the analysis to these points (dropping first 66 in array)

loopsfrom5 = Take@loops, 867, 171<D; loopsfrom5@@1DD85, 5, 2.11441<

newloopsfrom5 = Table@8loops@@iDD@@1DD, loops@@iDD@@3DD<, 8i, 67, 171<D;

listplotloops = ListPlot@newloopsfrom5, PlotStyle ® PointSize@MediumDD

6 8 10 12 14 16 18

3

4

5

6

7

8

Fitting these points to a quadratic function of L1 and L2 finds that the “area” term (L1*L2) is small. Note

that the loops are symmetric under L1 <-> L2, and the lack of symmetry in the fit is an indication of an

incomplete fit.

Fit@loopsfrom5, 81, x, y, x^2, y^2, x y<, 8x, y<D-0.332913 + 0.253208 x - 0.0010434 x

2+ 0.234104 y + 0.00151677 x y - 0.000129973 y

2

Here we force a symmetric, linear fit:

Note that the prediction for the perimeter term for very large loops is (see handwritten solutions) 0.252,

which is quite close to the 0.249 given by the fit.

soln4.nb 3

Page 4: Solution to HW4: Mathematica

fitfrom5@x_, y_D = Fit@loopsfrom5, 81, x + y<, 8x, y<D-0.416835 + 0.248701 Hx + yL

How well does it perform? Pretty well: the various fit lines show pass through or close to most of the

corresponding data points.

Of course a more sophisticated analysis would take into account errors etc.

plotfitline = Plot@8fitline@x, xD, fitline@x, 18D<, 8x, 5, 18<, PlotStyle ® 8Red<D;plot2 = Plot@8fitline@x, 16D, fitline@x + 2, xD<, 8x, 5, 16<, PlotStyle ® 8Green<D;plot3 = Plot@8fitline@x, 14D, fitline@x + 4, xD<, 8x, 5, 14<, PlotStyle ® 8Purple<D;Show@listplotloops, plotfitline, plot2, plot3D

6 8 10 12 14 16 18

3

4

5

6

7

8

Problem 4: minimal doubling

Plots etc. for fun

Showing that 2-d case has only two solutions:

4 soln4.nb

Page 5: Solution to HW4: Mathematica

ContourPlot@8Sin@k1D + Cos@k2D � 1, Sin@k2D + Cos@k1D � 1<, 8k1, -Pi, Pi<, 8k2, -Pi, Pi<,GridLines ® 88-Pi, -Pi � 2, 0, Pi � 2, Pi<, 8-Pi, -Pi � 2, 0, Pi � 2, Pi<<,ContourStyle ® 88Thick, Blue<, 8Thick, Red<<D

Out[203]=

-3 -2 -1 0 1 2 3

-3

-2

-1

0

1

2

3

Finding solutions in 4-d case: again only two solutions up to periodic shifts.

In[204]:= Solve@8Sin@k1D + Cos@k2D � 1, Sin@k2D + Cos@k3D � 1,

Sin@k3D + Cos@k4D � 1, Sin@k4D + Cos@k1D � 1<, 8k1, k2, k3, k4<D

Out[204]= :8k1 ® ConditionalExpression@2 Π C@1D, C@1D Î IntegersD,k2 ® ConditionalExpression@2 Π C@2D, C@2D Î IntegersD,k3 ® ConditionalExpression@2 Π C@3D, C@3D Î IntegersD,k4 ® ConditionalExpression@2 Π C@4D, C@4D Î IntegersD<,

:k1 ® ConditionalExpressionBΠ

2

+ 2 Π C@1D, C@1D Î IntegersF,

k2 ® ConditionalExpressionBΠ

2

+ 2 Π C@2D, C@2D Î IntegersF,

k3 ® ConditionalExpressionBΠ

2

+ 2 Π C@3D, C@3D Î IntegersF,

k4 ® ConditionalExpressionBΠ

2

+ 2 Π C@4D, C@4D Î IntegersF>>

soln4.nb 5