Problem 14.5d1.2.2

A First Course in String Theory

.

The generating function is an infinite product:

\displaystyle{ \begin{aligned} \alpha' M_L^2: \end{aligned}}

\displaystyle{\begin{aligned} &f_{L, NS+}(x) \\ &= a_{NS+} (r) x^r \\ &= \frac{1}{x} \prod_{r=1}^\infty \frac{(1 + x^{r-\frac{1}{2}})^{32}}{(1 - x^r)^8} \\ \end{aligned}}

.

To evaluate the infinite product, you can use Mathematica (or its official free version Wolfram Engine) with the following commands:

TeXForm[
    HoldForm[
        (1/x)*Product[
                 (1+x^(r-1/2))^32/(1-x^r)^8,
                 {r, 1, Infinity}]]]

f[x_] := (1/x)*Product[
                 (1+x^(r-1/2))^32/(1-x^r)^8,
                 {r, 1, Infinity}]

Print[f[x]]

TeXForm[f[x]]

TeXForm[Series[f[x], {x,0,3}]]
\displaystyle{\frac{1}{x}\prod _{r=1}^{\infty } \frac{\left(1+x^{r-\frac{1}{2}}\right)^{32}}{\left(1-x^r\right)^8}}


                     1        32
    QPochhammer[-(-------), x]
                  Sqrt[x]
------------------------------------
        1    32                    8
(1 + -------)   x QPochhammer[x, x]
     Sqrt[x]


\displaystyle{\frac{\left(-\frac{1}{\sqrt{x}};x\right)_{\infty }^{32}}{\left(\frac{1}{\sqrt{x}}+1\right)^{32} x (x;x)_{\infty }^8}}


\displaystyle{\frac{1}{x}+\frac{32}{\sqrt{x}}+504+5248 \sqrt{x}+40996 x+258624 x^{3/2}+1384320 x^2+O\left(x^{5/2}\right)}

\displaystyle{ \begin{aligned}  &f_{L, NS+}(x) \\  \end{aligned}}

\displaystyle{  \approx \frac{1}{x}+\frac{32}{\sqrt{x}}+504+5248 \, \sqrt{x}+40996 \, x+258624 \, x^{\frac{3}{2}}+1384320 \, x^{2}+6512384 \, x^{\frac{5}{2}} + ...}

— Me@2022-11-23 04:40:28 PM

.

.

2022.11.23 Wednesday (c) All rights reserved by ACHK

Jupyter Notebook

SICMUtils, 3

.

The goal of this post to setup Jupyter Notebook.

.

1. Read and follow the exact steps of my post titled “SICMUtils“.

.

2. To install the Jupyter Notebook software in Ubuntu, use this command:

sudo apt-get install sagemath-jupyter 

3. Try to open the SageMath program.

4. It will open a Jupyter notebook page.

5. Click the “New” button at the top right corner and then select “SageMath“.

.

6. Type

1 + 1

onto the input line.

7. Hit the keys shift-enter to get the output

2

.

8. Input

Integrate(x^3, x)

9. Hit shift-enter:

NameError: name 'Integrate' is not defined

.

10. Input

from sage.symbolic.integration.integral import *

indefinite_integral(x^3, x)

11. Hit shift-enter:

1/4*x^4

.

12. Input

%display latex

13. Hit shift-enter.

.

14. Input

indefinite_integral(x^3, x)

15. Hit shift-enter:

\displaystyle{\frac{1}{4} \, x^{4}}

— Me@2022-07-30 12:18:50 PM

.

.

2022.08.01 Monday (c) All rights reserved by ACHK

Problem 14.5d1.2 | SageMath

The generating function is an infinite product:

\displaystyle{ \begin{aligned} \alpha' M_L^2: \end{aligned}}

\displaystyle{\begin{aligned} &f_{L, NS+}(x) \\ &= a_{NS+} (r) x^r \\ &= \frac{1}{x} \prod_{r=1}^\infty \frac{(1 + x^{r-\frac{1}{2}})^{32}}{(1 - x^r)^8} \\ \end{aligned}}

To evaluate the infinite product, you can use SageMath with the following commands:

typeset_mode(True)

(1/x)*prod(((1+x^(n-1/2))^(32)/(1-x^n)^8) for n in (1..oo))

a = (1/x)*prod(((1+x^(n-1/2))^(32)/(1-x^n)^8) for n in (1..200))

F = a.taylor(x,0,6)

g = "+".join(map(latex, sorted([f for f in F.operands()], key=lambda exp:exp.degree(x))))

g

\displaystyle{ \begin{aligned}  &f_{L, NS+}(x) \\  \end{aligned}}

\displaystyle{  \approx \frac{1}{x}+\frac{32}{\sqrt{x}}+504+5248 \, \sqrt{x}+40996 \, x+258624 \, x^{\frac{3}{2}}+1384320 \, x^{2}+6512384 \, x^{\frac{5}{2}} + ...}

— Me@2019-01-11 11:52:33 AM

.

.

2019.01.11 Friday (c) All rights reserved by ACHK

Sage (mathematics software)

Design Philosophy of Sage

.

William Stein realized several important facts when designing Sage.

* To create viable alternatives to Magma, Maple, Mathematica, and MATLAB, would take hundreds, or thousands of man-years if one started from the beginning.
* There was a large collection of open-source mathematics software already written, but which was written in different languages (C, C++, Fortran and Python being the most common).

So rather than start from the beginning, Sage which is written in Python and Cython integrates all their specialized mathematics software into a common interface. A user needs to know only Python.

Where no open-source option exists for a particular class of problem, then this would be written in Sage. But Sage does not reinvent the wheel. The same design philosophy is used in commercial mathematics program such as Mathematica, but Sage can use a much wider range of open source software solutions than nonfree software, since some open source licensing imposes restrictions on commercial use of code.

— Wikipedia on Sage (mathematics software)

.

.

2010.03.14 Sunday ACHK