-
Notifications
You must be signed in to change notification settings - Fork 0
/
two-3-d-cyclic-integrals-by-mathematica.html
276 lines (247 loc) · 29.9 KB
/
two-3-d-cyclic-integrals-by-mathematica.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Two 3-d cyclic integrals by Mathematica - You don't need to prove this</title>
<link href="https://newptcai.github.io/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="You don't need to prove this Full Atom Feed" />
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="https://newptcai.github.io/theme/css/w3.css">
<link rel="stylesheet" type="text/css" href="https://newptcai.github.io/theme/css/style.css">
<link rel="stylesheet" type="text/css" href="https://newptcai.github.io/theme/css/jqcloud.css">
<link rel="stylesheet" type="text/css" href="https://newptcai.github.io/theme/css/all.min.css">
<link rel="stylesheet" type="text/css" href="https://newptcai.github.io/theme/css/shariff.min.css">
<link rel="stylesheet" type="text/css" href="https://newptcai.github.io/theme/css/pygments-highlight-github.css">
<!-- JavaScript -->
<script src="https://newptcai.github.io/theme/js/jquery-3.5.1.min.js"></script>
<script src="https://newptcai.github.io/theme/js/jqcloud.min.js"></script>
<!-- Meta -->
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="HandheldFriendly" content="True" />
<meta name="author" content="Xing Shi Cai" />
<meta name="description" content="This post is converted to Markdown from this Mathematica notebook thanks to the M2MD package by Kuba Podkalicki. I came …" />
<meta name="keywords" content="analysis, Mathematica, CAS">
<!-- Facebook OpenGraph -->
<meta property="og:site_name" content="You don't need to prove this">
<meta property="og:title" content="Two 3-d cyclic integrals by Mathematica - You don't need to prove this" />
<meta property="og:description" content="This post is converted to Markdown from this Mathematica notebook thanks to the M2MD package by Kuba Podkalicki. I came …" />
<meta property="og:image" content="https://newptcai.github.io">
<meta property="og:type" content="article" />
<meta property="og:url" content="https://newptcai.github.io/two-3-d-cyclic-integrals-by-mathematica.html" />
<meta property="og:locale" content="de_DE" />
<meta property="og:locale:alternate" content="en_US" />
<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Two 3-d cyclic integrals by Mathematica - You don't need to prove this">
<meta name="twitter:description" content="This post is converted to Markdown from this Mathematica notebook thanks to the M2MD package by Kuba Podkalicki. I came …">
<meta name="twitter:image" content="https://newptcai.github.io">
</head>
<body>
<div class="w3-row w3-card w3-white">
<header id=banner>
<!-- AUTHOR INITIALS-->
<a href="https://newptcai.github.io" id=logo title="Home">XS</a>
<nav id="menu">
<ul>
<li><a href="https://newptcai.github.io/pages/research.html">Research</a></li>
<li><a href="https://newptcai.github.io/pages/teaching.html">Teaching</a></li>
<li class="active"><a href="https://newptcai.github.io/category/math.html">math</a></li>
<li ><a href="https://newptcai.github.io/category/mumble.html">mumble</a></li>
<li ><a href="https://newptcai.github.io/category/photo.html">photo</a></li>
</ul>
</nav>
</header>
</div>
<br>
<article>
<header class="w3-container col-main">
<h1>Two 3-d cyclic integrals by Mathematica</h1>
<div class="post-info">
<div class="w3-opacity w3-margin-right w3-margin-bottom" style="flex-grow: 1;">
<span> Posted on Sun 12 April 2020 in <a href="https://newptcai.github.io/category/math.html" style="font-style: italic">math</a>
</span>
</div>
<div id="article-tags">
<span class="w3-tag w3-light-grey w3-text-red w3-hover-red">
<a href="https://newptcai.github.io/tag/analysis.html" title=" All posts about Analysis
">#analysis</a>
</span>
<span class="w3-tag w3-light-grey w3-text-red w3-hover-red">
<a href="https://newptcai.github.io/tag/mathematica.html" title=" All posts about Mathematica
">#Mathematica</a>
</span>
<span class="w3-tag w3-light-grey w3-text-red w3-hover-red">
<a href="https://newptcai.github.io/tag/cas.html" title=" All posts about Cas
">#CAS</a>
</span>
</div>
</div>
</header>
<br>
<div class="col-main w3-container">
<main id="article-content">
<p><em>This post is converted to Markdown from <a href="https://newptcai.github.io/notebook/2020-04-12-triangle.nb">this Mathematica notebook</a> thanks to the <a href="https://github.com/kubaPod/M2MD">M2MD</a> package by
<a href="https://github.com/kubaPod">Kuba Podkalicki</a>.</em></p>
<hr>
<p>I came across in a paper <a href="https://arxiv.org/abs/1812.04289v1">Counting triangles in power-law uniform random graphs</a><em> </em>by <em>Pu Gao, Remco van der Hofstad, Angus Southwell, Clara Stegehuis </em>on ArXiv today. Then I spotted two integrals, equation (2.1) and (2.2). These two are left as unevaluated integrals. But they don’t look too intimidating so I gave them a try and voila they have closed form as below:</p>
<p><img alt="1wagzewezpxds" src="https://newptcai.github.io/images/2020-04-12-triangle/1wagzewezpxds.png"></p>
<p>for <span class="math">\(2\leq t\leq 3\)</span>.</p>
<p>There is probably a book somewhere that has these formulas. But here I will show you how to use Mathematica to get them.</p>
<h2>The first integral</h2>
<p>The first one is actually quite easy. You can do it with directly in Mathematica 12.1 without any effort. Let</p>
<div class="highlight"><pre><span></span><code><span class="n">int</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Inactive</span><span class="p">[</span><span class="n">Integrate</span><span class="p">][(</span><span class="n">x</span><span class="o">*</span><span class="n">y</span><span class="o">*</span><span class="n">z</span><span class="p">)</span><span class="o">^</span><span class="p">(</span><span class="mi">2</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">t</span><span class="p">)</span><span class="o">/</span><span class="p">((</span><span class="mi">1</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">x</span><span class="o">*</span><span class="n">y</span><span class="p">)</span><span class="o">*</span><span class="p">(</span><span class="mi">1</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">y</span><span class="o">*</span><span class="n">z</span><span class="p">)</span><span class="o">*</span><span class="w"></span>
<span class="w"> </span><span class="p">(</span><span class="mi">1</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">x</span><span class="o">*</span><span class="n">z</span><span class="p">)),</span><span class="w"> </span><span class="p">{</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">Infinity</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">Infinity</span><span class="p">},</span><span class="w"> </span>
<span class="w"> </span><span class="p">{</span><span class="n">z</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">Infinity</span><span class="p">}]</span><span class="w"></span>
</code></pre></div>
<p><img alt="1xsifd80yq55x" src="https://newptcai.github.io/images/2020-04-12-triangle/1xsifd80yq55x.png"></p>
<p>With the assumption</p>
<div class="highlight"><pre><span></span><code><span class="n">assume</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">2</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="n">t</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="mi">3</span><span class="p">;</span><span class="w"></span>
</code></pre></div>
<p>we can compute this integral symbolically </p>
<div class="highlight"><pre><span></span><code><span class="n">intSym</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Assuming</span><span class="p">[</span><span class="n">assume</span><span class="p">,</span><span class="w"> </span><span class="n">int</span><span class="w"> </span><span class="o">//</span><span class="w"> </span><span class="n">Activate</span><span class="w"> </span><span class="o">//</span><span class="w"> </span><span class="n">FullSimplify</span><span class="p">]</span><span class="w"></span>
</code></pre></div>
<p><img alt="1kks0ws4cmmqe" src="https://newptcai.github.io/images/2020-04-12-triangle/1kks0ws4cmmqe.png"></p>
<p>To be sure let’s do some numeric verification.</p>
<div class="highlight"><pre><span></span><code><span class="n">intN</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">int</span><span class="w"> </span><span class="o">/.</span><span class="w"> </span><span class="p">{</span><span class="n">Integrate</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">NIntegrate</span><span class="p">}</span><span class="w"></span>
</code></pre></div>
<p><img alt="0u75bz5atgxpe" src="https://newptcai.github.io/images/2020-04-12-triangle/0u75bz5atgxpe.png"></p>
<div class="highlight"><pre><span></span><code><span class="n">Table</span><span class="p">[</span><span class="mi">1</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">intN</span><span class="o">/</span><span class="n">intSym</span><span class="w"> </span><span class="o">//</span><span class="w"> </span><span class="n">Activate</span><span class="w"> </span><span class="o">//</span><span class="w"> </span><span class="n">Quiet</span><span class="p">,</span><span class="w"> </span><span class="p">{</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">11</span><span class="o">/</span><span class="mi">4</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="o">/</span><span class="mi">4</span><span class="p">}]</span><span class="w"></span>
<span class="c">(*{-9.28939*10^-10, 5.05751*10^-8, 1.48692*10^-7, 0.000287941}*)</span><span class="w"></span>
</code></pre></div>
<p>As, you can see the relative differences between numeric and symbolic integral are quite small. This increases our confidence that we got the right answer.</p>
<h2>The second integral</h2>
<p>Let </p>
<div class="highlight"><pre><span></span><code><span class="n">f</span><span class="p">[</span><span class="nv">x_</span><span class="p">,</span><span class="w"> </span><span class="nv">y_</span><span class="p">,</span><span class="w"> </span>
<span class="w"> </span><span class="nv">z_</span><span class="p">]</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="p">(</span><span class="n">x</span><span class="w"> </span><span class="n">y</span><span class="w"> </span><span class="n">z</span><span class="p">)</span><span class="o">^-</span><span class="n">t</span><span class="w"> </span><span class="p">(</span><span class="mi">1</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">E</span><span class="o">^</span><span class="p">(</span><span class="o">-</span><span class="n">x</span><span class="w"> </span><span class="n">y</span><span class="p">))</span><span class="w"> </span><span class="p">(</span><span class="mi">1</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">E</span><span class="o">^</span><span class="p">(</span><span class="o">-</span><span class="n">z</span><span class="w"> </span><span class="n">y</span><span class="p">))</span><span class="w"> </span><span class="p">(</span><span class="mi">1</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">E</span><span class="o">^</span><span class="p">(</span><span class="o">-</span><span class="n">z</span><span class="w"> </span><span class="n">x</span><span class="p">))</span><span class="w"></span>
</code></pre></div>
<p>We want to compute</p>
<div class="highlight"><pre><span></span><code><span class="n">int2</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Inactive</span><span class="p">[</span><span class="n">Integrate</span><span class="p">][</span><span class="n">f</span><span class="p">[</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="n">z</span><span class="p">],</span><span class="w"> </span><span class="p">{</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">Infinity</span><span class="p">},</span><span class="w"> </span>
<span class="w"> </span><span class="p">{</span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">Infinity</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="n">z</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">Infinity</span><span class="p">}]</span><span class="w"></span>
</code></pre></div>
<p><img alt="11biy0j76yav1" src="https://newptcai.github.io/images/2020-04-12-triangle/11biy0j76yav1.png"></p>
<p>Mathematica cannot do this directly. But we can do a change of variable by integrating <span class="math">\(f(g(a,b,c))\)</span> with</p>
<div class="highlight"><pre><span></span><code><span class="n">g</span><span class="p">[</span><span class="nv">a_</span><span class="p">,</span><span class="w"> </span><span class="nv">b_</span><span class="p">,</span><span class="w"> </span><span class="nv">c_</span><span class="p">]</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="p">{(</span><span class="n">Sqrt</span><span class="p">[</span><span class="n">a</span><span class="p">]</span><span class="o">*</span><span class="n">Sqrt</span><span class="p">[</span><span class="n">c</span><span class="p">])</span><span class="o">/</span><span class="n">Sqrt</span><span class="p">[</span><span class="n">b</span><span class="p">],</span><span class="w"> </span>
<span class="w"> </span><span class="p">(</span><span class="n">Sqrt</span><span class="p">[</span><span class="n">a</span><span class="p">]</span><span class="o">*</span><span class="n">Sqrt</span><span class="p">[</span><span class="n">b</span><span class="p">])</span><span class="o">/</span><span class="n">Sqrt</span><span class="p">[</span><span class="n">c</span><span class="p">],</span><span class="w"> </span><span class="p">(</span><span class="n">Sqrt</span><span class="p">[</span><span class="n">b</span><span class="p">]</span><span class="o">*</span><span class="n">Sqrt</span><span class="p">[</span><span class="n">c</span><span class="p">])</span><span class="o">/</span><span class="n">Sqrt</span><span class="p">[</span><span class="n">a</span><span class="p">]}</span><span class="w"></span>
</code></pre></div>
<p>In other words </p>
<div class="highlight"><pre><span></span><code><span class="n">HoldForm</span><span class="p">[</span><span class="n">g</span><span class="p">[</span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="n">b</span><span class="p">,</span><span class="w"> </span><span class="n">c</span><span class="p">]]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">g</span><span class="p">[</span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="n">b</span><span class="p">,</span><span class="w"> </span><span class="n">c</span><span class="p">]</span><span class="w"></span>
</code></pre></div>
<p><img alt="0b381hwjsspqh" src="https://newptcai.github.io/images/2020-04-12-triangle/0b381hwjsspqh.png"></p>
<p>We can use the chain rule. First let’s get the Jacobian.</p>
<div class="highlight"><pre><span></span><code><span class="n">jacob</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">D</span><span class="p">[</span><span class="n">g</span><span class="p">[</span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="n">b</span><span class="p">,</span><span class="w"> </span><span class="n">c</span><span class="p">],</span><span class="w"> </span><span class="p">{{</span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="n">b</span><span class="p">,</span><span class="w"> </span><span class="n">c</span><span class="p">}}]</span><span class="w"> </span><span class="o">//</span><span class="w"> </span><span class="n">Simplify</span><span class="w"> </span><span class="o">//</span><span class="w"> </span><span class="n">Det</span><span class="w"></span>
</code></pre></div>
<p><img alt="0ynxkrwonsm8d" src="https://newptcai.github.io/images/2020-04-12-triangle/0ynxkrwonsm8d.png"></p>
<p>So we can instead integrate.</p>
<div class="highlight"><pre><span></span><code><span class="n">int2</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>
<span class="w"> </span><span class="n">int2</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="w"> </span><span class="o">/.</span><span class="w"> </span><span class="n">f</span><span class="p">[</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="n">z</span><span class="p">]</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="p">(</span><span class="n">f</span><span class="w"> </span><span class="o">@@</span><span class="w"> </span><span class="n">g</span><span class="p">[</span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="n">b</span><span class="p">,</span><span class="w"> </span><span class="n">c</span><span class="p">])</span><span class="o">*</span><span class="n">jacob</span><span class="w"> </span><span class="o">/.</span><span class="w"> </span><span class="p">{</span><span class="n">x</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">b</span><span class="p">,</span><span class="w"> </span>
<span class="w"> </span><span class="n">z</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">c</span><span class="p">}</span><span class="w"></span>
</code></pre></div>
<p><img alt="1juhwz0w4mruv" src="https://newptcai.github.io/images/2020-04-12-triangle/1juhwz0w4mruv.png"></p>
<p>This Mathematica knows how to do</p>
<div class="highlight"><pre><span></span><code><span class="n">int2Sym</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Assuming</span><span class="p">[</span><span class="n">assume</span><span class="p">,</span><span class="w"> </span><span class="n">int2</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span><span class="w"> </span><span class="o">//</span><span class="w"> </span><span class="n">Activate</span><span class="w"> </span><span class="o">//</span><span class="w"> </span><span class="n">FullSimplify</span><span class="p">]</span><span class="w"></span>
</code></pre></div>
<p><img alt="1jojn10ymknx9" src="https://newptcai.github.io/images/2020-04-12-triangle/1jojn10ymknx9.png"></p>
<p>Again let’s check numerically. This time it’s a bit bit challenging and you have to play a bit with the strategy of the integration.</p>
<p>Before change of variable.</p>
<div class="highlight"><pre><span></span><code><span class="n">int2N</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Inactive</span><span class="p">[</span><span class="n">NIntegrate</span><span class="p">][</span><span class="n">f</span><span class="p">[</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="n">z</span><span class="p">],</span><span class="w"> </span><span class="p">{</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">Infinity</span><span class="p">},</span><span class="w"> </span>
<span class="w"> </span><span class="p">{</span><span class="n">y</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">Infinity</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="n">z</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">Infinity</span><span class="p">}]</span><span class="w"></span>
</code></pre></div>
<p><img alt="0m6oy6vafgz4w" src="https://newptcai.github.io/images/2020-04-12-triangle/0m6oy6vafgz4w.png"></p>
<p>After change of variable.</p>
<div class="highlight"><pre><span></span><code><span class="n">int2N</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Inactive</span><span class="p">[</span><span class="n">NIntegrate</span><span class="p">][</span><span class="n">f</span><span class="w"> </span><span class="o">@@</span><span class="w"> </span><span class="n">g</span><span class="p">[</span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="n">b</span><span class="p">,</span><span class="w"> </span><span class="n">c</span><span class="p">]</span><span class="o">*</span><span class="n">jacob</span><span class="p">,</span><span class="w"> </span>
<span class="w"> </span><span class="p">{</span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">Infinity</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="n">b</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">Infinity</span><span class="p">},</span><span class="w"> </span><span class="p">{</span><span class="n">c</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="n">Infinity</span><span class="p">}]</span><span class="w"></span>
</code></pre></div>
<p><img alt="12z7i6ur87u1w" src="https://newptcai.github.io/images/2020-04-12-triangle/12z7i6ur87u1w.png"></p>
<p>The differences comparing to the closed form are</p>
<div class="highlight"><pre><span></span><code><span class="n">Table</span><span class="p">[</span><span class="mi">1</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="p">{</span><span class="n">int2N</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span><span class="w"> </span><span class="n">int2N</span><span class="p">[</span><span class="mi">2</span><span class="p">]}</span><span class="o">/</span><span class="n">int2Sym</span><span class="w"> </span><span class="o">/.</span><span class="w"> </span><span class="n">t</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="mi">2</span><span class="w"> </span><span class="o">//</span><span class="w"> </span><span class="n">Activate</span><span class="w"> </span><span class="o">//</span><span class="w"> </span>
<span class="w"> </span><span class="n">Quiet</span><span class="p">,</span><span class="w"> </span><span class="p">{</span><span class="n">t</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">11</span><span class="o">/</span><span class="mi">4</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="o">/</span><span class="mi">4</span><span class="p">}]</span><span class="w"></span>
<span class="c">(*{{1.20381*10^-7, 2.77161*10^-8}, {2.35678*10^-6, </span>
<span class="c"> 2.21698*10^-6}, {0.000204701, 0.000260132}, {0.0251801, 0.0283442}}*)</span><span class="w"></span>
</code></pre></div>
<p>So again, we can be quite sure that we got the right answer.</p>
<h2>Reference</h2>
<p>Gao, P., van der Hofstad, R., Southwell, A., & Stegehuis, C.(2018).Counting triangles in power -- law
uniform random graphs. <a href="http://arxiv.org/abs/1812.04289">ArXiv:1812.04289</a> [Math]. </p>
<script type="text/javascript">if (!document.getElementById('mathjaxscript_pelican_#%@#$@#')) {
var align = "center",
indent = "0em",
linebreak = "false";
if (false) {
align = (screen.width < 768) ? "left" : align;
indent = (screen.width < 768) ? "0em" : indent;
linebreak = (screen.width < 768) ? 'true' : linebreak;
}
var mathjaxscript = document.createElement('script');
mathjaxscript.id = 'mathjaxscript_pelican_#%@#$@#';
mathjaxscript.type = 'text/javascript';
mathjaxscript.src = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/latest.js?config=TeX-AMS-MML_HTMLorMML';
var configscript = document.createElement('script');
configscript.type = 'text/x-mathjax-config';
configscript[(window.opera ? "innerHTML" : "text")] =
"MathJax.Hub.Config({" +
" config: ['MMLorHTML.js']," +
" TeX: { extensions: ['AMSmath.js','AMSsymbols.js','noErrors.js','noUndefined.js'], equationNumbers: { autoNumber: 'none' } }," +
" jax: ['input/TeX','input/MathML','output/HTML-CSS']," +
" extensions: ['tex2jax.js','mml2jax.js','MathMenu.js','MathZoom.js']," +
" displayAlign: '"+ align +"'," +
" displayIndent: '"+ indent +"'," +
" showMathMenu: true," +
" messageStyle: 'normal'," +
" tex2jax: { " +
" inlineMath: [ ['\\\\(','\\\\)'] ], " +
" displayMath: [ ['$$','$$'] ]," +
" processEscapes: true," +
" preview: 'TeX'," +
" }, " +
" 'HTML-CSS': { " +
" availableFonts: ['STIX', 'TeX']," +
" preferredFont: 'STIX'," +
" styles: { '.MathJax_Display, .MathJax .mo, .MathJax .mi, .MathJax .mn': {color: 'inherit ! important'} }," +
" linebreaks: { automatic: "+ linebreak +", width: '90% container' }," +
" }, " +
"}); " +
"if ('default' !== 'default') {" +
"MathJax.Hub.Register.StartupHook('HTML-CSS Jax Ready',function () {" +
"var VARIANT = MathJax.OutputJax['HTML-CSS'].FONTDATA.VARIANT;" +
"VARIANT['normal'].fonts.unshift('MathJax_default');" +
"VARIANT['bold'].fonts.unshift('MathJax_default-bold');" +
"VARIANT['italic'].fonts.unshift('MathJax_default-italic');" +
"VARIANT['-tex-mathit'].fonts.unshift('MathJax_default-italic');" +
"});" +
"MathJax.Hub.Register.StartupHook('SVG Jax Ready',function () {" +
"var VARIANT = MathJax.OutputJax.SVG.FONTDATA.VARIANT;" +
"VARIANT['normal'].fonts.unshift('MathJax_default');" +
"VARIANT['bold'].fonts.unshift('MathJax_default-bold');" +
"VARIANT['italic'].fonts.unshift('MathJax_default-italic');" +
"VARIANT['-tex-mathit'].fonts.unshift('MathJax_default-italic');" +
"});" +
"}";
(document.body || document.getElementsByTagName('head')[0]).appendChild(configscript);
(document.body || document.getElementsByTagName('head')[0]).appendChild(mathjaxscript);
}
</script>
</main>
<br>
<footer>
<div class="adjust-width">
<div id="author-block" class="w3-light-grey w3-border">
<img style="width: 35px; height: 56px; margin-left:50px;" src="https://newptcai.github.io/theme/images/bookmark-red.png" alt="bookmark"></img>
<div id="author-info">
<a href="https://newptcai.github.io/authors.html#xing-shi-cai"><img
style="width: 60px; height: 60px;" src="https://newptcai.github.io/authors/xing-shi-cai.png" onerror="this.src='https://newptcai.github.io/theme/images/avatar.png'"></img>
</a>
<div style="margin-left: 20px; margin-top: 15px;">
<a href="https://newptcai.github.io/authors.html#xing-shi-cai"><span id="author-name" class="w3-hover-text-dark-grey">Xing Shi Cai</span></a>
<p id="author-story" style="max-width: 500px;"></p>
</div>
</div>
</div>
</div>
<br>
</footer>
</div>
</article>
<br>
<script src="https://newptcai.github.io/theme/js/shariff.min.js"></script>
</body>
</html>