-
Notifications
You must be signed in to change notification settings - Fork 0
/
tracy_widom.nb
1829 lines (1794 loc) · 86.2 KB
/
tracy_widom.nb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(* Content-type: application/vnd.wolfram.mathematica *)
(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)
(* CreatedBy='Mathematica 12.0' *)
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[ 158, 7]
NotebookDataLength[ 86272, 1821]
NotebookOptionsPosition[ 83812, 1775]
NotebookOutlinePosition[ 84185, 1791]
CellTagsIndexPosition[ 84142, 1788]
WindowFrame->Normal*)
(* Beginning of Notebook Content *)
Notebook[{
Cell[BoxData[
RowBox[{
RowBox[{"(*", " ", "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"implements", " ", "naive", " ",
RowBox[{"Gauss", "--"}], "Legendre", " ", "quadrature", " ", "based",
" ", "on", " ",
RowBox[{"https", ":"}]}], "//",
RowBox[{
RowBox[{
RowBox[{"mathworld", ".", "wolfram", ".", "com"}], "/", "Legendre"}],
"-",
RowBox[{
RowBox[{"GaussQuadrature", ".", "html"}], " ", "\[IndentingNewLine]",
"\[IndentingNewLine]", "the", " ", "abscissas", " ", "are", " ",
"the", " ", "zeroes", " ", "of", " ", "the", " ", "n"}], "-",
RowBox[{
"th", " ", "Legendre", " ", "poly", "\[IndentingNewLine]",
"\[IndentingNewLine]",
RowBox[{"NOTE", ":", " ",
RowBox[{
RowBox[{"take", " ", "n"}], " ", "\[LessEqual]", " ",
RowBox[{
"45", " ", "to", " ", "avoid", " ", "numerical", " ", "errors",
"\[IndentingNewLine]", "\[IndentingNewLine]", "the", " ",
"weights", " ", "are", " ", "computed", " ", "according", " ",
"to", " ",
RowBox[{"eq", ".", " ",
RowBox[{"(", "13", ")"}]}], " ",
RowBox[{"here", ":", " ", "https", ":"}]}]}]}]}]}]}], "//",
RowBox[{
RowBox[{
RowBox[{"mathworld", ".", "wolfram", ".", "com"}], "/", "Legendre"}],
"-",
RowBox[{
RowBox[{"GaussQuadrature", ".", "html"}], "\[IndentingNewLine]",
"\[IndentingNewLine]", "the", " ", "quadrature", " ", "function", " ",
"returns", " ", "tuple", " ",
RowBox[{"{",
RowBox[{"x", ",", "w"}], "}"}]}]}]}], " ", "=", " ",
RowBox[{"{",
RowBox[{"abscissas", ",", " ", "weights"}], "}"}]}], " ", "*)"}],
"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"GaussLegendreQuadratureWeightsNaive", "[",
RowBox[{"a_", ",", "b_", ",", "m_"}], "]"}], ":=",
RowBox[{"Module", "[",
RowBox[{
RowBox[{"{",
RowBox[{"x", ",", "w"}], "}"}], ",", "\[IndentingNewLine]",
RowBox[{
RowBox[{"x", "=",
RowBox[{"Table", "[",
RowBox[{
RowBox[{
RowBox[{
RowBox[{
RowBox[{"NSolve", "[",
RowBox[{
RowBox[{
RowBox[{"LegendreP", "[",
RowBox[{"m", ",", "z"}], "]"}], "\[Equal]", "0"}], ",",
"z"}], "]"}], "[",
RowBox[{"[", "i", "]"}], "]"}], "[",
RowBox[{"[", "1", "]"}], "]"}], "[",
RowBox[{"[", "2", "]"}], "]"}], ",",
RowBox[{"{",
RowBox[{"i", ",", "1", ",", "m"}], "}"}]}], "]"}]}], ";",
"\[IndentingNewLine]",
RowBox[{"w", "=",
RowBox[{"Table", "[",
RowBox[{
RowBox[{"2", " ",
RowBox[{
RowBox[{"(",
RowBox[{"1", "-",
RowBox[{
RowBox[{"x", "[",
RowBox[{"[", "i", "]"}], "]"}], "^", "2"}]}], ")"}], "/",
RowBox[{"(",
RowBox[{
RowBox[{
RowBox[{"(",
RowBox[{"m", "+", "1"}], ")"}], "^", "2"}], " ",
RowBox[{
RowBox[{"LegendreP", "[",
RowBox[{
RowBox[{"m", "+", "1"}], ",",
RowBox[{"x", "[",
RowBox[{"[", "i", "]"}], "]"}]}], "]"}], "^", "2"}]}],
")"}]}]}], ",",
RowBox[{"{",
RowBox[{"i", ",", "1", ",", "m"}], "}"}]}], "]"}]}], ";",
"\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{
RowBox[{"above", " ", "are", " ",
RowBox[{"x", "'"}], "s"}], ",", " ",
RowBox[{
RowBox[{
RowBox[{"w", "'"}], "s", " ", "for", " ",
RowBox[{"interval", " ", "[",
RowBox[{
RowBox[{"-", "1"}], ",", " ", "1"}], "]"}]}], ";", " ",
RowBox[{"now", " ", "I", " ", "shift"}]}]}], " ", "*)"}],
"\[IndentingNewLine]",
RowBox[{"x", "=",
RowBox[{
RowBox[{
RowBox[{"(",
RowBox[{"b", "-", "a"}], ")"}], "*",
RowBox[{"x", "/", "2"}]}], "+",
RowBox[{
RowBox[{"(",
RowBox[{"a", "+", "b"}], ")"}], "/", "2"}]}]}], ";",
"\[IndentingNewLine]",
RowBox[{"w", "=",
RowBox[{
RowBox[{"(",
RowBox[{"b", "-", "a"}], ")"}], "*",
RowBox[{"w", "/", "2"}]}]}], ";", "\[IndentingNewLine]",
RowBox[{"Return", "[",
RowBox[{"{",
RowBox[{"x", ",", "w"}], "}"}], "]"}]}]}], "\[IndentingNewLine]",
"]"}]}], ";"}]}]], "Input",
CellChangeTimes->{{3.79364688571956*^9, 3.7936469292137213`*^9}, {
3.793647006320773*^9, 3.793647006635796*^9}, {3.793647287566041*^9,
3.793647288030077*^9}, {3.7936480126191497`*^9, 3.793648032809455*^9}, {
3.7936984077542477`*^9, 3.7936984136703625`*^9}, {3.7937007758909817`*^9,
3.793700832703658*^9}, {3.7937011399444475`*^9, 3.793701253586591*^9}, {
3.7937013213141174`*^9, 3.7937014619207754`*^9}, {3.793701503409768*^9,
3.793701589220478*^9}, {3.793701683570771*^9, 3.7937017091999626`*^9}, {
3.793701788803213*^9, 3.7937017934891243`*^9}, {3.7937024219734616`*^9,
3.793702506243074*^9}},
CellLabel->"In[6]:=",ExpressionUUID->"7ed47f12-6816-43ac-9f7e-20ede46b5161"],
Cell[BoxData[
RowBox[{
RowBox[{"(*", " ",
RowBox[{"implements", " ",
RowBox[{"Gauss", "--"}], "Legendre", " ", "weights", " ", "according",
" ", "to", " ", "the", " ", "Bornemann", " ", "paper", " ", "Appendix",
" ", "A", ".1", " ", "\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"NOTE", ":", " ",
RowBox[{
"I", " ", "am", " ", "using", " ", "this", " ", "below", " ", "for", " ",
"computing", " ", "Fredholm", " ", "dets"}]}]}], " ", "*)"}],
"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"GaussLegendreQuadratureWeights", "[",
RowBox[{"a_", ",", "b_", ",", "m_"}], "]"}], ":=",
RowBox[{"Module", "[",
RowBox[{
RowBox[{"{",
RowBox[{
"k", ",", "beta", ",", "T", ",", "w", ",", "x", ",", "evals", ",",
"evecs"}], "}"}], ",", "\[IndentingNewLine]",
RowBox[{
RowBox[{"k", "=",
RowBox[{"Table", "[",
RowBox[{"i", ",",
RowBox[{"{",
RowBox[{"i", ",", "1", ",",
RowBox[{"m", "-", "1"}]}], "}"}]}], "]"}]}], ";",
"\[IndentingNewLine]",
RowBox[{"beta", "=",
RowBox[{
RowBox[{"k", "/",
RowBox[{"Sqrt", "[",
RowBox[{
RowBox[{"(",
RowBox[{
RowBox[{"2", "*", "k"}], "-", "1"}], ")"}], " ",
RowBox[{"(",
RowBox[{
RowBox[{"2", "*", "k"}], "+", "1"}], ")"}]}], "]"}]}], "//",
"N"}]}], ";", "\[IndentingNewLine]",
RowBox[{"T", "=",
RowBox[{
RowBox[{"DiagonalMatrix", "[",
RowBox[{"beta", ",",
RowBox[{"-", "1"}]}], "]"}], "+",
RowBox[{"DiagonalMatrix", "[",
RowBox[{"beta", ",", "1"}], "]"}]}]}], ";", "\[IndentingNewLine]",
RowBox[{
RowBox[{"{",
RowBox[{"evals", ",", "evecs"}], "}"}], "=",
RowBox[{"Eigensystem", "[", "T", "]"}]}], ";", "\[IndentingNewLine]",
RowBox[{"x", "=",
RowBox[{
RowBox[{"(",
RowBox[{"evals", "+", "1"}], ")"}], "/", "2"}]}], ";",
"\[IndentingNewLine]",
RowBox[{"x", "=",
RowBox[{
RowBox[{
RowBox[{"(",
RowBox[{"1", "-", "x"}], ")"}], "*", "a"}], "+",
RowBox[{"x", "*", "b"}]}]}], ";", "\[IndentingNewLine]",
RowBox[{"w", "=",
RowBox[{
RowBox[{"(",
RowBox[{"b", "-", "a"}], ")"}], "*",
RowBox[{
RowBox[{
RowBox[{"Transpose", "[", "evecs", "]"}], "[",
RowBox[{"[", "1", "]"}], "]"}], "^", "2"}]}]}], ";",
"\[IndentingNewLine]",
RowBox[{"Return", "[",
RowBox[{"{",
RowBox[{"x", ",", "w"}], "}"}], "]"}]}]}], "\[IndentingNewLine]",
"]"}]}], ";"}]}]], "Input",
CellChangeTimes->{{3.793699503644697*^9, 3.793699518112965*^9}, {
3.79369955518208*^9, 3.7936995617934194`*^9}, {3.7937004009139194`*^9,
3.793700416578495*^9}, {3.7937008648074303`*^9, 3.7937008846478305`*^9}, {
3.79370148097281*^9, 3.793701486810734*^9}},
CellLabel->"In[1]:=",ExpressionUUID->"34c445c6-db97-41df-8d7f-2cba91998a55"],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{
RowBox[{"(*", " ",
RowBox[{
RowBox[{
"Test", " ", "the", " ", "two", " ", "methods", " ", "give", " ",
"similar", " ", "results", " ", "by", " ", "computing", " ", "the", " ",
RowBox[{"L", "^", "2"}], " ", "norms", " ", "of", " ", "xn"}], "-",
RowBox[{"xb", " ", "and", " ", "wn"}], "-", "wb"}], " ", "*)"}],
"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"{",
RowBox[{"xn", ",", "wn"}], "}"}], "=",
RowBox[{"GaussLegendreQuadratureWeightsNaive", "[",
RowBox[{"0", ",", "1", ",", "7"}], "]"}]}], ";"}],
"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"{",
RowBox[{"xb", ",", "wb"}], "}"}], "=",
RowBox[{"GaussLegendreQuadratureWeights", "[",
RowBox[{"0", ",", "1", ",", "7"}], "]"}]}], ";"}],
"\[IndentingNewLine]",
RowBox[{
RowBox[{"(",
RowBox[{
RowBox[{"Sort", "[", "xn", "]"}], "-",
RowBox[{"Sort", "[", "xb", "]"}]}], ")"}], ".",
RowBox[{"(",
RowBox[{
RowBox[{"Sort", "[", "xn", "]"}], "-",
RowBox[{"Sort", "[", "xb", "]"}]}], ")"}]}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"(",
RowBox[{
RowBox[{"Sort", "[", "wn", "]"}], "-",
RowBox[{"Sort", "[", "wb", "]"}]}], ")"}], ".",
RowBox[{"(",
RowBox[{
RowBox[{"Sort", "[", "wn", "]"}], "-",
RowBox[{"Sort", "[", "wb", "]"}]}], ")"}]}]}]}]], "Input",
CellChangeTimes->{{3.7937008917476015`*^9, 3.7937009150331044`*^9}, {
3.7937017692138405`*^9, 3.7937017704028463`*^9}, {3.793701836070073*^9,
3.793701909846286*^9}, {3.793701939955805*^9, 3.793702062222431*^9}},
CellLabel->"In[7]:=",ExpressionUUID->"cc059f7f-6e0c-4878-a8b6-ea82c4c32a45"],
Cell[BoxData["3.86418584041855`*^-30"], "Output",
CellChangeTimes->{
3.793700916632358*^9, 3.793701771350829*^9, 3.793701801483857*^9,
3.7937018409880996`*^9, 3.793701895214382*^9, 3.7937019499500265`*^9,
3.79370199231738*^9, 3.7937020637553663`*^9, 3.7937024792224994`*^9,
3.7937025136270013`*^9, 3.793709572462467*^9, 3.7937274203703957`*^9,
3.793727530789117*^9, {3.7939775230134344`*^9, 3.793977544029291*^9}},
CellLabel->"Out[9]=",ExpressionUUID->"b88ad5ce-79f7-4cc2-a127-16a85fc57a58"],
Cell[BoxData["4.455253740350993`*^-30"], "Output",
CellChangeTimes->{
3.793700916632358*^9, 3.793701771350829*^9, 3.793701801483857*^9,
3.7937018409880996`*^9, 3.793701895214382*^9, 3.7937019499500265`*^9,
3.79370199231738*^9, 3.7937020637553663`*^9, 3.7937024792224994`*^9,
3.7937025136270013`*^9, 3.793709572462467*^9, 3.7937274203703957`*^9,
3.793727530789117*^9, {3.7939775230134344`*^9, 3.793977544044292*^9}},
CellLabel->"Out[10]=",ExpressionUUID->"07331f79-6788-48eb-a086-ac7646e49f46"]
}, Open ]],
Cell[BoxData[
RowBox[{
RowBox[{"(*", " ",
RowBox[{
"defines", " ", "the", " ", "Airy", " ", "kernel", " ", "and", " ",
"additional", " ", "functions", " ", "to", " ", "change", " ", "interval",
" ",
RowBox[{"to", " ", "[",
RowBox[{"0", ",", " ", "1"}], "]"}]}], " ", "*)"}],
"\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{"Airy", " ", "2", " ", "Kernel", " ", "defined", " ", "on", " ",
RowBox[{"(",
RowBox[{"s", ",", " ", "\[Infinity]"}], ")"}]}], " ", "*)"}],
"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"Airy2Kernel", "[",
RowBox[{"x_", ",", "y_"}], "]"}], ":=",
RowBox[{"If", "[",
RowBox[{
RowBox[{"x", "\[NotEqual]", "y"}], ",",
RowBox[{
RowBox[{"(",
RowBox[{
RowBox[{
RowBox[{"AiryAi", "[", "x", "]"}], " ",
RowBox[{"AiryAiPrime", "[", "y", "]"}]}], "-",
RowBox[{
RowBox[{"AiryAiPrime", "[", "x", "]"}], " ",
RowBox[{"AiryAi", "[", "y", "]"}]}]}], ")"}], "/",
RowBox[{"(",
RowBox[{"x", "-", "y"}], ")"}]}], ",",
RowBox[{
RowBox[{
RowBox[{"AiryAiPrime", "[", "x", "]"}], "^", "2"}], "-",
RowBox[{"x", " ",
RowBox[{
RowBox[{"AiryAi", "[", "x", "]"}], "^", "2"}]}]}]}], "]"}]}], ";"}],
"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"Airy2KernelInt", "[",
RowBox[{"x_", ",", "y_"}], "]"}], ":=",
RowBox[{"NIntegrate", "[",
RowBox[{
RowBox[{
RowBox[{"AiryAi", "[",
RowBox[{"x", "+", "t"}], "]"}], " ",
RowBox[{"AiryAi", "[",
RowBox[{"y", "+", "t"}], "]"}]}], ",",
RowBox[{"{",
RowBox[{"t", ",", "0", ",", "\[Infinity]"}], "}"}]}], "]"}]}], ";"}],
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{"Airy", " ", "2", " ", "Kernel", " ", "defined", " ", "on", " ",
RowBox[{"(",
RowBox[{"s", ",", " ", "\[Infinity]"}], ")"}]}], " ", "*)"}],
"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"Airy1Kernel", "[",
RowBox[{"x_", ",", "y_"}], "]"}], ":=",
RowBox[{"AiryAi", "[",
RowBox[{"x", "+", "y"}], "]"}]}], ";"}], "\[IndentingNewLine]",
"\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{
RowBox[{
RowBox[{"function", " ", "to", " ", "map", " ",
RowBox[{"(",
RowBox[{"s", ",", " ", "\[Infinity]"}], ")"}]}], "\[Rule]",
RowBox[{"(",
RowBox[{"0", ",", " ", "1"}], ")"}]}], ",", " ",
RowBox[{"as", " ", "Bornemann", " ", "suggests"}]}], " ", "*)"}],
"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"\[Phi]", "[",
RowBox[{"s_", ",", "\[Xi]_"}], "]"}], ":=",
RowBox[{"s", "+",
RowBox[{"10", " ",
RowBox[{"Tan", "[",
RowBox[{"Pi", " ",
RowBox[{"\[Xi]", "/", "2"}]}], "]"}]}]}]}], ";"}],
"\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{
RowBox[{"d\[Phi]", "/", "d\[Xi]"}], ",", " ",
RowBox[{
"which", " ", "for", " ", "some", " ", "reason", " ", "has", " ", "to",
" ", "be", " ", "put", " ", "by", " ", "hand"}]}], " ", "*)"}],
"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"d\[Phi]", "[",
RowBox[{"s_", ",", "\[Xi]_"}], "]"}], ":=", " ",
RowBox[{"5", " ", "Pi", " ",
RowBox[{
RowBox[{"Sec", "[",
RowBox[{"Pi", " ",
RowBox[{"\[Xi]", "/", "2"}]}], "]"}], "^", "2"}]}]}], ";"}], " ",
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{
RowBox[{"Airy", " ", "kernels", " ", "modified"}], ",", " ",
RowBox[{"based", " ", "on", " ",
RowBox[{"Bornemann", "'"}], "s", " ", "idea", " ", "of", " ", "taking",
"\[IndentingNewLine]",
RowBox[{"(",
RowBox[{"s", ",", " ", "\[Infinity]"}], ")"}], " ", "to", " ",
RowBox[{"(",
RowBox[{"0", ",", " ", "1"}], ")"}]}]}], " ", "*)"}],
"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"KernelMod", "[",
RowBox[{"K_", ",", "s_", ",", "\[Xi]_", ",", "\[Eta]_"}], "]"}], ":=",
RowBox[{
RowBox[{"Sqrt", "[",
RowBox[{
RowBox[{"d\[Phi]", "[",
RowBox[{"s", ",", "\[Xi]"}], "]"}], "*",
RowBox[{"d\[Phi]", "[",
RowBox[{"s", ",", "\[Eta]"}], "]"}]}], "]"}], "*",
RowBox[{"K", "[",
RowBox[{
RowBox[{"\[Phi]", "[",
RowBox[{"s", ",", "\[Xi]"}], "]"}], ",",
RowBox[{"\[Phi]", "[",
RowBox[{"s", ",", "\[Eta]"}], "]"}]}], "]"}]}]}], ";"}]}]}]], "Input",
CellChangeTimes->{{3.7936309972304134`*^9, 3.7936310014592543`*^9}, {
3.793631855064901*^9, 3.7936318598463554`*^9}, {3.7936319497399263`*^9,
3.7936319509440217`*^9}, {3.7936319847105284`*^9, 3.793631987585935*^9}, {
3.793632931268448*^9, 3.793632969615269*^9}, {3.793646019276923*^9,
3.793646021621098*^9}, {3.793646847685305*^9, 3.7936468637295856`*^9}, {
3.793646941534206*^9, 3.7936469937828965`*^9}, {3.7936483432028446`*^9,
3.7936483579665127`*^9}, {3.7936486330693316`*^9,
3.7936486705469904`*^9}, {3.7936487154279723`*^9,
3.7936487268903685`*^9}, {3.7936487611736326`*^9,
3.7936487926256113`*^9}, {3.7936488704495153`*^9,
3.7936489825230265`*^9}, {3.793649132479734*^9, 3.7936492461173787`*^9}, {
3.7936505252230268`*^9, 3.793650531620368*^9}, {3.793651482380373*^9,
3.793651483798478*^9}, {3.793651581598735*^9, 3.793651695101531*^9},
3.793651726651766*^9, 3.7936519060070877`*^9, 3.793651978012639*^9, {
3.7936523943733397`*^9, 3.793652417027828*^9}, {3.793652517905446*^9,
3.7936525281134644`*^9}, {3.7936526343346176`*^9, 3.793652651538102*^9}, {
3.7936527113709116`*^9, 3.7936527433196373`*^9}, 3.7937004295932055`*^9, {
3.793702083082285*^9, 3.7937021443840103`*^9}, {3.793709514605668*^9,
3.79370954180385*^9}, {3.7937113547145443`*^9, 3.793711359856513*^9}, {
3.7937114688517303`*^9, 3.793711470007928*^9}, {3.793711563117085*^9,
3.7937115647182007`*^9}, {3.79371173884709*^9, 3.7937117657607803`*^9}, {
3.793711830883492*^9, 3.7937118424482317`*^9}, {3.7937118998187704`*^9,
3.7937120074793677`*^9}, {3.7937122241514096`*^9, 3.793712226982712*^9}, {
3.793712517003612*^9, 3.793712518888399*^9}, {3.793712593733855*^9,
3.793712597190648*^9}, {3.793712652060006*^9, 3.793712725780055*^9},
3.793712767474744*^9, {3.7937128121163063`*^9, 3.7937128449891853`*^9}, {
3.7937129195443163`*^9, 3.793712923661786*^9}, {3.7937273403060274`*^9,
3.793727343271799*^9}, {3.7937274694623384`*^9, 3.7937274718270683`*^9}, {
3.7939764015001187`*^9, 3.7939764940871153`*^9}, {3.7939765282475157`*^9,
3.7939765708420258`*^9}, 3.793977554669407*^9, {3.793980696053051*^9,
3.79398070890007*^9}, {3.7939830203875456`*^9, 3.7939830385757003`*^9}, {
3.793983628398238*^9,
3.7939836533118286`*^9}},ExpressionUUID->"78d75289-cc0e-4313-b567-\
0cdc93050eed"],
Cell[BoxData[
RowBox[{
RowBox[{"(*", " ",
RowBox[{"precompute", " ", "quadrature", " ", "rules", " ", "here"}], " ",
"*)"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"QuadratureRule", ":=", "GaussLegendreQuadratureWeights"}], ";"}],
"\[IndentingNewLine]",
RowBox[{
RowBox[{"Clear", "[",
RowBox[{"a", ",", "b", ",", "m"}], "]"}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"a", "=", "0"}], ";",
RowBox[{"b", "=", "1"}], ";",
RowBox[{"m", "=", "15"}], ";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"QuadratureRule", "[",
RowBox[{"a", ",", "b", ",", "m"}], "]"}], ";"}]}]}]], "Input",
CellChangeTimes->{{3.7937021843375664`*^9, 3.7937022851220756`*^9}, {
3.7937023840731535`*^9, 3.7937023951302843`*^9}, {3.793702530568041*^9,
3.7937025478914995`*^9}, {3.793727833343701*^9, 3.7937278337687297`*^9}, {
3.7939765926338377`*^9, 3.7939765931118503`*^9}, {3.793977588587967*^9,
3.7939775886439705`*^9}},
CellLabel->"In[56]:=",ExpressionUUID->"1984ca7b-8401-4ad8-86e0-94976a01c67b"],
Cell[BoxData[
RowBox[{
RowBox[{"(*", " ",
RowBox[{
"computes", " ", "the", " ", "actual", " ", "Fredholm", " ",
"determinant"}], " ", "*)"}], "\[IndentingNewLine]",
"\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{
RowBox[{"original", " ", "definition", " ", "of", " ", "Bornemann"}], ",",
" ",
RowBox[{"no", " ", "s", " ", "dependence", " ", "here"}]}], " ", "*)"}],
"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"FredholmDet", "[",
RowBox[{
"K_", ",", "z_", ",", "a_", ",", "b_", ",", "\[IndentingNewLine]", ",",
"m_"}], "]"}], ":=",
RowBox[{"Module", "[",
RowBox[{
RowBox[{"{",
RowBox[{"x", ",", "w"}], "}"}], ",",
RowBox[{
RowBox[{
RowBox[{"{",
RowBox[{"x", ",", "w"}], "}"}], "=",
RowBox[{"QuadratureRule", "[",
RowBox[{"a", ",", "b", ",", "m"}], "]"}]}], ";",
RowBox[{"w", "=",
RowBox[{"Sqrt", "[", "w", "]"}]}], ";",
RowBox[{"Det", "[",
RowBox[{
RowBox[{"IdentityMatrix", "[", "m", "]"}], "+",
RowBox[{"z", " ",
RowBox[{"(",
RowBox[{
RowBox[{"Transpose", "[",
RowBox[{"{", "w", "}"}], "]"}], ".",
RowBox[{"{", "w", "}"}]}], ")"}], " ",
RowBox[{"Outer", "[",
RowBox[{"K", ",", "x", ",", "x"}], "]"}]}]}], "]"}]}]}], "]"}]}],
";"}], "\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{
"computes", " ", "Fredholm", " ", "det", " ", "on", " ", "infinite", " ",
RowBox[{"(",
RowBox[{"s", ",", " ", "\[Infinity]"}], ")"}], " ", "by", " ",
"mapping", " ", "it", " ", "into", " ", "finite", " ",
RowBox[{"interval", " ", "[",
RowBox[{"a", ",", "b"}], "]"}], " ", "which", " ", "is", " ",
RowBox[{"often", " ", "[",
RowBox[{"0", ",", "1"}], "]"}], " ", "in", " ", "practice",
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"NOTE", ":", " ",
RowBox[{"assumes", " ", "K", " ", "depends", " ", "on", " ", "s"}]}]}],
" ", "\[IndentingNewLine]", "*)"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"FredholmDetInf", "[",
RowBox[{
"K_", ",", "z_", ",", "a_", ",", "b_", ",", "s_", "\[IndentingNewLine]",
",", "m_"}], "]"}], ":=",
RowBox[{"Module", "[",
RowBox[{
RowBox[{"{",
RowBox[{"x", ",", "w"}], "}"}], ",",
RowBox[{
RowBox[{
RowBox[{"{",
RowBox[{"x", ",", "w"}], "}"}], "=",
RowBox[{"QuadratureRule", "[",
RowBox[{"a", ",", "b", ",", "m"}], "]"}]}], ";",
RowBox[{"w", "=",
RowBox[{"Sqrt", "[", "w", "]"}]}], ";",
RowBox[{"Det", "[",
RowBox[{
RowBox[{"IdentityMatrix", "[", "m", "]"}], "+",
RowBox[{"z", " ",
RowBox[{"(",
RowBox[{
RowBox[{"Transpose", "[",
RowBox[{"{", "w", "}"}], "]"}], ".",
RowBox[{"{", "w", "}"}]}], ")"}], " ",
RowBox[{"Outer", "[",
RowBox[{
RowBox[{
RowBox[{"KernelMod", "[",
RowBox[{"K", ",", "s", ",", "#1", ",", "#2"}], "]"}], "&"}],
",", "x", ",", "x"}], "]"}]}]}], "]"}]}]}], "]"}]}],
";"}]}]}]], "Input",
CellChangeTimes->{{3.793646974417219*^9, 3.7936469895750723`*^9}, {
3.7936492730455914`*^9, 3.793649371123821*^9}, {3.793649420467541*^9,
3.793649451434979*^9}, {3.7936494814974566`*^9, 3.7936495260978518`*^9}, {
3.7936496605041847`*^9, 3.793649671283657*^9}, {3.7936505620634327`*^9,
3.7936505791613283`*^9}, 3.793650651179364*^9, {3.7936507978098965`*^9,
3.7936508247926083`*^9}, {3.7936518493417377`*^9, 3.793651885042781*^9}, {
3.7936519531245823`*^9, 3.7936519553263083`*^9}, {3.7936996128219013`*^9,
3.7936996132408886`*^9}, {3.7936996570550027`*^9,
3.7936996593459244`*^9}, {3.793699755111385*^9, 3.793699825268106*^9}, {
3.7937000875211945`*^9, 3.7937001055427246`*^9}, {3.793700165713731*^9,
3.7937002007226987`*^9}, {3.793700448201378*^9, 3.793700534740735*^9}, {
3.7937006630878167`*^9, 3.7937006632428136`*^9}, 3.7937021767784634`*^9, {
3.793702293706688*^9, 3.793702308180535*^9}, {3.793702375256115*^9,
3.793702381704213*^9}, {3.793702557958703*^9, 3.793702558127714*^9}, {
3.7937027577476683`*^9, 3.7937027622163334`*^9}, {3.793702816635111*^9,
3.7937028424058*^9}, {3.7937106215180616`*^9, 3.793710651510077*^9}, {
3.7937116801810303`*^9, 3.793711727638524*^9}, 3.7937120351480074`*^9, {
3.7939766113880415`*^9, 3.7939766191566267`*^9}},
CellLabel->"In[60]:=",ExpressionUUID->"fc27ff8f-ab90-45cf-9f9b-b7c816224f25"],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{
RowBox[{"(*", " ",
RowBox[{
RowBox[{"definining", " ", "my", " ", "own", " ", "GOE"}], ",", " ",
RowBox[{
RowBox[{"GUE", " ", "with", " ", "values", " ", "a"}], "=", "0"}], ",",
" ",
RowBox[{"b", "=", "1"}], ",", " ",
RowBox[{"m", "=",
RowBox[{"15", " ", "as", " ", "above"}]}]}], " ", "*)"}],
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{
RowBox[{"GUE", " ", "first"}], ",", " ",
RowBox[{
"three", " ", "versions", " ", "based", " ", "on", " ", "three", " ",
"different", " ", "versions", " ", "of", " ", "writing", " ", "the", " ",
"Airy", " ", "2", " ", "kernel"}]}], " ", "*)"}], "\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{
RowBox[{"based", " ", "on", " ", "the", " ",
RowBox[{"Christoffel", "--"}], "Darboux"}], "-",
RowBox[{"like", " ", "kernel"}]}], " ", "*)"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{
RowBox[{"FGUEa", "[", "s_", "]"}], ":=",
RowBox[{"FredholmDetInf", "[",
RowBox[{"Airy2Kernel", ",",
RowBox[{"-", "1.0"}], ",", "a", ",", "b", ",", "s", ",", "m"}],
"]"}]}], ";"}], "\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{"based", " ", "on", " ", "the", " ", "integral", " ", "kernel"}],
"*)"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"FGUEb", "[", "s_", "]"}], ":=",
RowBox[{"FredholmDetInf", "[",
RowBox[{"Airy2KernelInt", ",",
RowBox[{"-", "1.0"}], ",", "a", ",", "b", ",", "s", ",", "m"}],
"]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{
RowBox[{"the", " ", "case", " ", "of", " ", "GOE"}], ",", " ",
RowBox[{"Sasamoto", " ", "formula", " ", "\[IndentingNewLine]",
RowBox[{"NOTE", ":", " ",
RowBox[{"s", " ", "is", " ", "divided", " ", "by", " ", "2"}]}]}]}],
" ", "*)"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"FGOE", "[", "s_", "]"}], ":=",
RowBox[{"FredholmDetInf", "[",
RowBox[{"Airy1Kernel", ",",
RowBox[{"-", "1.0"}], ",", "a", ",", "b", ",",
RowBox[{"s", "/", "2"}], ",", "m"}], "]"}]}], ";"}],
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"(*", " ",
RowBox[{"try", " ", "some", " ", "basic", " ", "examples"}], " ", "*)"}],
"\[IndentingNewLine]",
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"FGUEa", "[",
RowBox[{"-", "3."}], "]"}], "//", "Quiet"}], ",",
RowBox[{
RowBox[{"FGUEa", "[",
RowBox[{"-", "1.77"}], "]"}], "//", "Quiet"}], ",",
RowBox[{
RowBox[{"FGUEa", "[", "3.", "]"}], "//", "Quiet"}]}], "}"}],
"\[IndentingNewLine]",
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"FGUEb", "[",
RowBox[{"-", "3."}], "]"}], "//", "Quiet"}], ",",
RowBox[{
RowBox[{"FGUEb", "[",
RowBox[{"-", "1.77"}], "]"}], "//", "Quiet"}], ",",
RowBox[{
RowBox[{"FGUEb", "[", "3.", "]"}], "//", "Quiet"}]}], "}"}],
"\[IndentingNewLine]",
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"FGOE", "[",
RowBox[{"-", "3."}], "]"}], "//", "Quiet"}], ",",
RowBox[{
RowBox[{"FGOE", "[",
RowBox[{"-", "1.2"}], "]"}], "//", "Quiet"}], ",",
RowBox[{
RowBox[{"FGOE", "[", "3.", "]"}], "//", "Quiet"}]}], "}"}]}]}]], "Input",
CellChangeTimes->{{3.79371066150368*^9, 3.793710730363787*^9}, {
3.7937109081407776`*^9, 3.793710910665948*^9}, {3.793711375602666*^9,
3.7937113860136275`*^9}, {3.793711482675623*^9, 3.793711497478402*^9}, {
3.7937115791700106`*^9, 3.7937116621775017`*^9}, {3.7937120447213783`*^9,
3.7937120659326468`*^9}, {3.7937121070324545`*^9, 3.793712128606394*^9}, {
3.793712608856029*^9, 3.7937126315792522`*^9}, {3.793713031070505*^9,
3.793713031153779*^9}, {3.793713061943853*^9, 3.7937131968220205`*^9}, {
3.7937133826296873`*^9, 3.793713422963376*^9}, {3.793713813411038*^9,
3.7937138141050715`*^9}, {3.79372745082222*^9, 3.793727450908222*^9}, {
3.7937275585155954`*^9, 3.793727559292651*^9}, {3.7939766237125936`*^9,
3.793976627156043*^9}, 3.793976660633895*^9, {3.7939776207739*^9,
3.7939776287626033`*^9}, {3.793977886660942*^9, 3.7939779147598033`*^9}, {
3.793978284819693*^9, 3.7939783362882724`*^9}, {3.793978494828865*^9,
3.793978551526312*^9}, {3.793978851694063*^9, 3.7939789245422907`*^9}, {
3.7939806149810424`*^9, 3.7939806817431126`*^9}, {3.793980744210458*^9,
3.793980744262437*^9}},
CellLabel->"In[68]:=",ExpressionUUID->"82796ed9-2583-420f-ba4a-c6de8932c393"],
Cell[BoxData[
RowBox[{"{",
RowBox[{
"0.0803204607165186`", ",", "0.5154968045542054`", ",",
"0.9999970059546639`"}], "}"}]], "Output",
CellChangeTimes->{{3.7939776221221027`*^9, 3.793977629652652*^9},
3.7939779158233504`*^9, {3.7939807265574365`*^9, 3.7939807450835176`*^9}},
CellLabel->"Out[71]=",ExpressionUUID->"76a536f6-1439-4609-80f6-38cb352c4cbd"],
Cell[BoxData[
RowBox[{"{",
RowBox[{
"0.08032046071661099`", ",", "0.5154968045548767`", ",",
"0.9999970059546639`"}], "}"}]], "Output",
CellChangeTimes->{{3.7939776221221027`*^9, 3.793977629652652*^9},
3.7939779158233504`*^9, {3.7939807265574365`*^9, 3.7939807507056437`*^9}},
CellLabel->"Out[72]=",ExpressionUUID->"6c641c73-e3b1-4c98-b24d-6c5782ac2e30"],
Cell[BoxData[
RowBox[{"{",
RowBox[{
"0.06959147266728921`", ",", "0.5217197120064544`", ",",
"0.9982934876476672`"}], "}"}]], "Output",
CellChangeTimes->{{3.7939776221221027`*^9, 3.793977629652652*^9},
3.7939779158233504`*^9, {3.7939807265574365`*^9, 3.7939807507936726`*^9}},
CellLabel->"Out[73]=",ExpressionUUID->"a88c1094-6b82-44ab-8034-fd5615c4c34f"]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{
RowBox[{"(*", " ",
RowBox[{
RowBox[{
"Testing", " ", "the", " ", "difference", " ", "between", " ", "our", " ",
"implementation", " ", "and", " ",
RowBox[{"Mathematica", "'"}], "s", " ", "built"}], "-",
RowBox[{
"in", " ", "\[IndentingNewLine]", "\[IndentingNewLine]", "in", " ",
RowBox[{"L", "^", "\[Infinity]"}], " ", "norm", " ", "for", " ", "a",
" ", "change"}]}], " ", "*)"}], "\[IndentingNewLine]",
"\[IndentingNewLine]",
RowBox[{
RowBox[{
RowBox[{"ss", "=",
RowBox[{"Table", "[",
RowBox[{"i", ",",
RowBox[{"{",
RowBox[{"i", ",",
RowBox[{"-", "3."}], ",",
RowBox[{"3.", "-",
RowBox[{"1", "/", "16."}]}], ",",
RowBox[{"1", "/", "16."}]}], "}"}]}], "]"}]}], ";", " ",
RowBox[{"(*", " ",
RowBox[{"eval", " ", "at", " ", "these", " ", "pts"}], " ", "*)"}],
"\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{"Print", "[", "\"\<FGUE max diff\>\"", "]"}]}],
"\[IndentingNewLine]",
RowBox[{
RowBox[{"myvalsGUE", "=",
RowBox[{"Table", "[",
RowBox[{
RowBox[{
RowBox[{"FGUEb", "[", "s", "]"}], "//", "Quiet"}], ",",
RowBox[{"{",
RowBox[{"s", ",", "ss"}], "}"}]}], "]"}]}], ";"}],
"\[IndentingNewLine]",
RowBox[{
RowBox[{"mathvalsGUE", "=",
RowBox[{"Table", "[",
RowBox[{
RowBox[{"CDF", "[",
RowBox[{
RowBox[{"TracyWidomDistribution", "[", "2", "]"}], ",", "s"}], "]"}],
",",
RowBox[{"{",
RowBox[{"s", ",", "ss"}], "}"}]}], "]"}]}], ";"}],
"\[IndentingNewLine]",
RowBox[{"Max", "[",
RowBox[{"Abs", "[",
RowBox[{"(",
RowBox[{"myvalsGUE", "-", "mathvalsGUE"}], ")"}], "]"}], "]"}],
"\[IndentingNewLine]",
RowBox[{"(*",
RowBox[{
RowBox[{
RowBox[{"Print", "[", "\"\<FGOE max diff\>\"", "]"}], " ",
"\[IndentingNewLine]",
RowBox[{"myvalsGOE", "=",
RowBox[{"Table", "[",
RowBox[{
RowBox[{
RowBox[{"FGOE", "[", "s", "]"}], "//", "Quiet"}], ",",
RowBox[{"{",
RowBox[{"s", ",", "ss"}], "}"}]}], "]"}]}]}], ";",
"\[IndentingNewLine]",
RowBox[{"mathvalsGOE", "=",
RowBox[{"Table", "[",
RowBox[{
RowBox[{"CDF", "[",
RowBox[{
RowBox[{"TracyWidomDistribution", "[", "1", "]"}], ",", "s"}],
"]"}], ",",
RowBox[{"{",
RowBox[{"s", ",", "ss"}], "}"}]}], "]"}]}], ";",
"\[IndentingNewLine]",
RowBox[{"Max", "[",
RowBox[{"Abs", "[",
RowBox[{"(",
RowBox[{"myvalsGOE", "-", "mathvalsGOE"}], ")"}], "]"}], "]"}]}],
"*)"}]}]}]], "Input",
CellChangeTimes->{{3.7937028828226013`*^9, 3.793703043054309*^9}, {
3.793703133030999*^9, 3.793703153153035*^9}, {3.793703239045025*^9,
3.793703385625001*^9}, 3.793709550291001*^9, {3.7937096191309867`*^9,
3.7937096255725174`*^9}, {3.7937131576642513`*^9, 3.79371315791229*^9}, {
3.79371320508521*^9, 3.7937133614208946`*^9}, {3.7937133923762074`*^9,
3.793713395554967*^9}, {3.793713778501638*^9, 3.7937138017106752`*^9}, {
3.7937275415766463`*^9, 3.793727545613062*^9}, {3.7937275810572248`*^9,
3.793727585998686*^9}, {3.7937276991318455`*^9, 3.793727709706339*^9}, {
3.793727814995196*^9, 3.793727816657938*^9}, {3.793727868327345*^9,
3.7937278942525826`*^9}, {3.7937279559468203`*^9, 3.793727973761977*^9}, {
3.7939766742055516`*^9, 3.793976678556612*^9}, {3.793976825657195*^9,
3.7939768273131933`*^9}, {3.793977662069416*^9, 3.7939776639325504`*^9}, {
3.7939783964070888`*^9, 3.793978403860503*^9}},
CellLabel->"In[44]:=",ExpressionUUID->"4f00d6f9-1fb8-4648-a03c-adca49fa8e39"],
Cell[BoxData["\<\"FGUE max diff\"\>"], "Print",
CellChangeTimes->{{3.793713353207569*^9, 3.793713362037285*^9},
3.7937133969400663`*^9, {3.793713784701285*^9, 3.793713802163889*^9}, {
3.7937273636239414`*^9, 3.793727366972337*^9}, 3.793727420597412*^9,
3.793727456533629*^9, {3.7937275310691433`*^9, 3.793727586719737*^9},
3.793727717938955*^9, 3.793727817432995*^9, {3.793727848659235*^9,
3.79372789561268*^9}, {3.793727957187912*^9, 3.793727974437766*^9},
3.793976683903824*^9, 3.7939768279976997`*^9, {3.793977649767643*^9,
3.793977664596616*^9}, 3.7939784045826283`*^9},
CellLabel->
"During evaluation of \
In[44]:=",ExpressionUUID->"38b8df2e-ceed-4873-a387-370d68b5fa0d"],
Cell[BoxData["2.4454183898958703`*^-6"], "Output",
CellChangeTimes->{{3.7937273636919518`*^9, 3.793727366984336*^9},
3.7937274206984196`*^9, 3.793727456544629*^9, {3.793727531113141*^9,
3.7937275874657965`*^9}, 3.7937277671862483`*^9, 3.7937278212604256`*^9, {
3.793727853488134*^9, 3.793727902685691*^9}, {3.793727963972004*^9,
3.7937279825370054`*^9}, 3.793976821692505*^9, 3.793977357714097*^9, {
3.7939776511967688`*^9, 3.7939776783109646`*^9}, 3.79397859507659*^9},
CellLabel->"Out[47]=",ExpressionUUID->"f1c542cb-8208-4e64-a245-7bd8ba05ac2e"]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"Plot", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{"CDF", "[",
RowBox[{
RowBox[{"TracyWidomDistribution", "[", "2", "]"}], ",", "s"}], "]"}],
",",
RowBox[{
RowBox[{"FGUEa", "[", "s", "]"}], "//", "Quiet"}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"s", ",",
RowBox[{"-", "15"}], ",",
RowBox[{"-", "10"}]}], "}"}], ",",
RowBox[{"Axes", "\[Rule]",
RowBox[{"{",
RowBox[{"False", ",", "True"}], "}"}]}]}], "]"}]], "Input",
CellChangeTimes->{{3.7939805449759626`*^9, 3.7939805579021635`*^9}},
CellLabel->"In[49]:=",ExpressionUUID->"2aea41bb-6617-409c-9eee-b73879ac6e28"],
Cell[BoxData[
GraphicsBox[{{{}, {},
TagBox[
{RGBColor[0.368417, 0.506779, 0.709798], AbsoluteThickness[1.6], Opacity[
1.], LineBox[CompressedData["
1:eJwB4QQe+yFib1JlAgAAAE0AAAACAAAA33mT/P//LcAZJ9eW0IiHJvqeRf02
/y3AYvv+IZuniSYUxPf9bf4twEhpByIs94smSA5c/9v8LcA6N7oCQZ2QJrCi
JAK4+S3ALOx1xIZzlyaCy7UHcPMtwNyJjA2SV6cmJR3YEuDmLcA5NIo/EwzH
JmvAHCnAzS3AeFlo/tgqBidC2ZFMRpctwCTsSY/hio4nBnYxm2hkLcCie6/C
eHMKKNaw5liKMi3AWrG3Kjg0gyjxvYcNcvwswKiOj7BtEwQp+U5T7fXJLMC/
MJJ/HN96KUyyCsQ/kyzAPP/V0+eP+Smrs9cJiV0swIhFwIzSUXQq9zjPem4r
LMDrjZipgxDlKo6QsuIZ9SvAzhgQcc6PXisSbMB1YcIrwO4wD08KMM0rouXj
d6iQK8AwU+BOBb03LH0x83C1WivA20ukZNmfqixFAS2VXigrwL4SQvr9/xMt
WKNSsM3xKsCptthABHiELXjjjTo8vCrA4nNSoabJ8S2Ep/PvRooqwKn93iCh
EVUu2z1FnBdUKsDxq4KibcHALh9YwXOEISrACGMzuFBTIi+uRClCt+opwDLQ
LAwImoovSs+mf+m0KcBD6fvyS4rwL9PdTui3ginAVbQxdX/ETDC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$8098485#1"]& ],
TagBox[
{RGBColor[0.880722, 0.611041, 0.142051], AbsoluteThickness[1.6], Opacity[
1.], LineBox[{{-14.724309858996884`,
8.247921951667636*^-7}, {-14.720947490255108`,
6.223061935329397*^-7}, {-14.696110582149242`, \
-8.078832710437047*^-7}, {-14.694588725489185`, -8.926291329261555*^-7}, \
{-14.693066868829128`, -9.770380485296574*^-7}, {-14.690023155509015`, \
-1.144842932306184*^-6}, {-14.68581753214147, -1.373896704463517*^-6}}],
LineBox[CompressedData["
1:eJwVlnk8Fe8Xxy1l30KyR417596iQsjyiGwJZbtZoizZ2+z7khZRikIJEVKR
sqXFTCdRlC9JSWSplFCyu7T4ze+v+3q/7jPnOedzPufMKHsesTvIxcHB8ZWT
g+P/v9/Kz3KlfmJChPmwz3uhetJvx9G5Fe+ZICHXmVHyso7023zlrlo3E4zb
vl69VF1H+is0+ju9Y0LQ/cCuqtw6MmBBYqC8iwnrBbn2BgfWkUHl9c/tXjNB
O5wnm1O0jjwqsZxT2MoE1k9Q5HevJSO/nNPVb2DCwMfnb2xkasiUaK+DoY+p
5/84PY3nrSEvr9p2oeIRE7Kyjh9um6smHxoOf5V/yASt/xKWnrypJpeu6mb8
rWPCddvVxRzp1WSMw8gIeZcJn5hhJ+/yV5PxzduzjIqZwFFUfEREsopM3ycF
UdeZ8BZ9UohZWUUWzIyPVRUx4fbP+c6/8/fIJ8o529cVMuHZe5sAk957JEf8
z3GufCYUXmGbvC66RyZp5Ro3ZTPB16OKt0bzHnmibOaXWSoTOuqF00JeV5ID
P0vUD59hQqtE3dPJukpSW5MVlpXChK6PETWZVyvJMXiw9OUUpe8bNtvYt5Lc
3Ru3MimZCTwdkVkWHJWkrDCf3ONYJozeqI08rXOHvBcsb7bpCBMipevXczwp
J/sMTPPWODBBQKTBwEDsFmmiVrzb2p4Jl5NaU8z/3iQrFTm5k+2YsBzB/8Z9
7CaZuNzgP7GHCR7O2wpqmm6S2FNN7WZrJvDqs9iTUTfJIBPsTbA5pV/ju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