# ParEdit .

(autoload 'enable-paredit-mode
"paredit" "Turn on pseudo-structural editing." t)

#'enable-paredit-mode)

#'enable-paredit-mode)

#'enable-paredit-mode)

#'enable-paredit-mode)

#'enable-paredit-mode)

#'enable-paredit-mode)

(lambda () (paredit-mode +1)))

(defun override-slime-repl-bindings-with-paredit ()
(define-key slime-repl-mode-map

'override-slime-repl-bindings-with-paredit)

. — Me@2022-11-29 10:03:49 PM

.

.

# Ex 1.2-1 Stationary States

Quantum Methods with Mathematica

.

Assume a wavefunction of the form psi[x, t] == f[t] psi[x] and perform a separation of variables on the wave equation.

Show that f[t] = E^(-I w t) where h w is the separation constant. Try the built-in function DSolve.

Equate h w to the Energy by evaluating the [expected] value of hamiltonian[V] in the state psi[x, t].

~~~

Remove["Global*"]

hbar := \[HBar]

H[V_] @ psi_  := -hbar^2/(2m) D[psi,{x,2}] + V psi

psi[x_,t_] := f[t] psi[x]

I hbar D [psi[x,t],t] == H[V] @ psi[x, t]

I hbar D [psi[x,t],t] / psi[x,t] == H[V] @ psi[x,t] / psi[x,t] $\displaystyle{i \hbar \psi (x) f'(t)=V f(t) \psi (x)-\frac{\hbar ^2 f(t) \psi ''(x)}{2 m}}$ $\displaystyle{\frac{i \hbar f'(t)}{f(t)}=\frac{V f(t) \psi (x)-\frac{\hbar ^2 f(t) \psi ''(x)}{2 m}}{f(t) \psi (x)}}$

E1 := I hbar D [psi[x,t],t] / psi[x,t] == H[V] @ psi[x,t] / psi[x,t]

Simplify[E1] $\displaystyle{\frac{1}{2} \hbar \left(\frac{\hbar \psi ''(x)}{m \psi (x)}+\frac{2 i f'(t)}{f(t)}\right)=V}$

E2 := - 1/2 hbar hbar (D[D[psi[x],x],x]/(m psi[x])) == hbar omega

DSolve[E2, psi[x], x]

E3 := 1/2 hbar 2 i D[f[t],t] / f[t] == hbar omega

DSolve[E3, f[t], t] $\displaystyle{\left\{\left\{\psi (x)\to c_1 \cos \left(\frac{\sqrt{2} \sqrt{m} \sqrt{\omega } x}{\sqrt{\hbar }}\right)+c_2 \sin \left(\frac{\sqrt{2} \sqrt{m} \sqrt{\omega } x}{\sqrt{\hbar }}\right)\right\}\right\}}$ $\displaystyle{\left\{\left\{f(t)\to c_1 e^{\frac{\omega t}{i}}\right\}\right\}}$


k

psi[x_] := c E^(I k x)

psi[x]

f[t_] := E^(-I omega t)

f[t]

psi[x_,t_] := f[t] psi[x]

psi[x,t] $\displaystyle{ \left\{k,c e^{i k x},e^{-i \omega t},c e^{i k x-i \omega t}\right\} }$

E4 := Conjugate[psi[x,t]] H @ psi[x,t]

E4

E5 := Simplify[E4]

E5

k := Sqrt[2 m omega / hbar]

Refine[E5, {Element[{c, omega, m, t, hbar, k, x}, Reals]}] $\displaystyle{ \frac{c k^2 \hbar ^2 c^* \exp \left(-i \left(-(\omega t-k x)^*-k x+\omega t\right)\right)}{2 m} }$ $\displaystyle{ = c^2 \omega \hbar }$

E6 := Conjugate[psi[x,t]] psi[x,t]

Simplify[E6] $\displaystyle{ c c^* \exp \left(-i \left(-(\omega t-k x)^*-k x+\omega t\right)\right) }$ $\displaystyle{ = c^2 }$

. \displaystyle{\begin{aligned} \langle E \rangle &= \frac{\int_{-\infty}^{\infty} \psi^* H_{V=0} \psi dx}{\int_{-\infty}^{\infty} \psi^* \psi dx} \\ \\ &= \frac{c^2 \omega \hbar \int_{-\infty}^{\infty} dx}{c^2 \int_{-\infty}^{\infty} dx} \\ \\ &= \omega \hbar \\ \end{aligned}}

.

— Me@2022-11-26 07:17:29 PM

.

.

# Why does the universe exist? 7.2

“There is nothing in that region of space”

and

“there is nothing outside the universe”

have different meanings.

.

there is nothing except quantum fluctuations in that region of space

= the best detector detects nothing but quantum fluctuations

.

there is nothing outside the universe

= whatever detected, label the whole collection as “the universe”

.

“There is nothing outside the universe” does not (!!!) mean that “we go outside the universe to keep searching, but find nothing”.

— Me@2012-10-15 08:33:01 AM

— Me@2022-11-27 09:09:53 PM

.

.

.

.

.

# Euler problem 8.3 Directory[]

mString := Import["n.txt"]

nString := StringDelete[mString, "\n" | "\r"]

nList := Map[FromDigits, Characters[nString]]

take13[lst_] := Times @@ Take[lst,13]

Fmax13n[lst_, n_] := If[Length[lst] < 13,
n,
With[{t13 = take13[lst]},
If[n > t13,
Fmax13n[Rest[lst], n],
Fmax13n[Rest[lst], t13]]]]

Fmax13n[nList, 0]

Wmax13n[lst_, n_] := Which[
Length[lst] < 13, n,
t13 = take13[lst];
n > t13, Wmax13n[Rest[lst], n],
True, Wmax13n[Rest[lst], t13]]

Wmax13n[nList, 0]

Fmax13n[nList, 0] - Wmax13n[nList, 0] — colorized by palette fm

— Me@2022-11-24 05:51:56 PM

.

.

# 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

.

.

# Why does the universe exist? 7.1

Why is there something instead of nothing?

Why is there the universe?

.

The existence of the universe is not a property of the universe itself.

Instead, it is a property of the system that the universe is in.

.

However, there is no bigger system that contains the universe, because by the definition of the word “universe”, the universe contains everything.

So the question “why is there the universe” should be transformed to “why is there something instead of nothing?”

.

For example, the watch exists because the watchmaker has made it.

Similarly, if someone has created the universe, we can say that that someone is the cause of the existence of the universe.

However, there is no “someone” outside the universe, because of the definition of the word “universe”.

The universe has no outside.

— Me@2012-10-15 08:33:01 AM

— Me@2022-11-21 09:41:23 PM

.

.

# Computing Note, 2

30112002

1. A secret is not a secret if it is known by more than one person.

.

.

2022.11.21 Monday ACHK

# 還是覺得你最差

.

.

.

— Me@2010.01.29

— Me@2022-11-20 07:46:26 PM

.

.

# Importance, 2.2

Euler problem 8.2

. .

import Data.Char

max13 lst = max13n lst 0
where
max13n lst n | (length lst) < 13 = n
| n > take13        = max13n (tail lst) n
| otherwise         = max13n (tail lst) take13
where
take13 = product (take 13 lst)

max13 (map (fromIntegral . digitToInt) . concat . lines \$ str)


. — Me@2022-11-19 12:04:41 PM

.

.

# Ex 2.0

Functional Differential Geometry

.

~~~


(define R2 (make-manifold R^n 2))

(define U (patch 'origin R2))

(define R2-rect (coordinate-system 'rectangular U))

(define R2-polar (coordinate-system 'polar/cylindrical U))

(define R2-rect-chi (chart R2-rect))

(define R2-rect-chi-inverse (point R2-rect))

(define R2-polar-chi (chart R2-polar))

(define R2-polar-chi-inverse (point R2-polar))

(show-expression
((compose R2-polar-chi R2-rect-chi-inverse)
(up 'x_0 'y_0))) (show-expression
((D (compose R2-rect-chi R2-polar-chi-inverse))
(up 'r_0 'theta_0))) (define R2->R (-> (UP Real Real) Real))

(define f
(compose (literal-function 'f-rect R2->R) R2-rect-chi))

(define R2-rect-point (R2-rect-chi-inverse (up 'x_0 'y_0)))

(define corresponding-polar-point
(R2-polar-chi-inverse
(up (sqrt (+ (square 'x_0) (square 'y_0)))
(atan 'y_0 'x_0))))

(f R2-rect-point)

(f corresponding-polar-point)

(show-expression
(f R2-rect-point))

(show-expression
(f corresponding-polar-point)) — Me@2022-11-18 11:22:36 AM

.

.

Posted in FDG

# Default as Power

.

political power

~ market power

~ the power due to being the default

~ network effect

— Me@2022-11-09 04:02:00 PM

.

.

.

.

.

# Pier, 1.2

Euler problem 8.1

. .

73167176531330624919225119674426574742355349194934
96983520312774506326239578318016984801869478851843
85861560789112949495459501737958331952853208805511
12540698747158523863050715693290963295227443043557
66896648950445244523161731856403098711121722383113
62229893423380308135336276614282806444486645238749
30358907296290491560440772390713810515859307960866
70172427121883998797908792274921901699720888093776
65727333001053367881220235421809751254540594752243
52584907711670556013604839586446706324415722155397
53697817977846174064955149290862569321978468622482
83972241375657056057490261407972968652414535100474
82166370484403199890008895243450658541227588666881
16427171479924442928230863465674813919123162824586
17866458359124566529476545682848912883142607690042
24219022671055626321111109370544217506941658960408
07198403850962455444362981230987879927244284909188
84580156166097919133875499200524063689912560717606
05886116467109405077541002256983155200055935729725
71636269561882670428252483600823257530420752963450

Find the thirteen adjacent digits in the 1000-digit number that have the greatest product. What is the value of this product?

(defun file-get-contents (filename)
(with-open-file (stream filename)
(let ((contents (make-string
(file-length stream))))
contents)))

(defun file-get-lines (filename)
(with-open-file (stream filename)
(loop :for line = (read-line stream nil)
:while line
:collect line)))

(file-get-lines #P"n.txt")

(defun string-to-list (the-string)
(loop :for char :across the-string
:collect char))

(defun char-to-integer-list (char-list)
(mapcar #'digit-char-p char-list))

(let ((the-digits (char-to-integer-list
(string-to-list
(remove #\newline
(file-get-contents #P"n.txt"))))))

(loop :for i :from 0 :to (- (length the-digits) 13)
:maximize (apply #'*
(subseq
the-digits i (+ i 13)))))
`

. — colorized by palette fm

— Me@2022-11-12 04:50:19 PM

.

.

# 3.3 Electromagnetism in three dimensions, 2

A First Course in String Theory

.

(b) Repeat the analysis of three-dimensional electromagnetism starting with the Lorentz covariant formulation. Take $A^\mu = (\Phi, A^1, A^2)$, examine $F_{\mu \nu}$, the Maxwell equations (3.34), and the relativistic form of the force law derived in Problem 3.1.

~~~ $A^\mu = (\Phi, A^1, A^2)$

.

Eq. (3.20): $F_{\mu \nu} = \begin{bmatrix} 0 & -E_x & -E_y & -E_z=0 \\ E_x & 0 & B_z & -B_y =0\\ E_y & -B_z & 0 & B_x = 0\\ E_z=0 & B_y=0 & -B_x=0 & 0\\ \end{bmatrix}$

.

Eq. (3.33): $F^{\mu \nu} = \begin{bmatrix} 0 & E_x & E_y & E_z=0 \\ -E_x & 0 & B_z & -B_y =0\\ -E_y & -B_z & 0 & B_x = 0\\ -E_z=0 & B_y=0 & -B_x=0 & 0\\ \end{bmatrix}$

.

Eq. (3.34): \begin{aligned} \frac{\partial F^{\mu \nu}}{\partial x^\nu} &= \frac{1}{c} j^\mu \\ \end{aligned}

. \begin{aligned} \frac{\partial F^{0 0}}{\partial x^0} + \frac{\partial F^{0 1}}{\partial x^1} + \frac{\partial F^{0 2}}{\partial x^2} + \frac{\partial F^{0 3}}{\partial x^3} &= \frac{1}{c} j^0 \\ \frac{\partial F^{1 0}}{\partial x^0} + \frac{\partial F^{1 1}}{\partial x^1} + \frac{\partial F^{1 2}}{\partial x^2} + \frac{\partial F^{1 3}}{\partial x^3} &= \frac{1}{c} j^1 \\ \frac{\partial F^{2 0}}{\partial x^0} + \frac{\partial F^{2 1}}{\partial x^1} + \frac{\partial F^{2 2}}{\partial x^2} + \frac{\partial F^{2 3}}{\partial x^3} &= \frac{1}{c} j^2 \\ \frac{\partial F^{3 0}}{\partial x^0} + \frac{\partial F^{3 1}}{\partial x^1} + \frac{\partial F^{3 2}}{\partial x^2} + \frac{\partial F^{3 3}}{\partial x^3} &= \frac{1}{c} j^3 \\ \end{aligned}

. \begin{aligned} \frac{\partial F^{0 0}}{\partial x^0} + \frac{\partial F^{0 1}}{\partial x^1} + \frac{\partial F^{0 2}}{\partial x^2} &= \frac{1}{c} j^0 \\ \frac{\partial F^{1 0}}{\partial x^0} + \frac{\partial F^{1 1}}{\partial x^1} + \frac{\partial F^{1 2}}{\partial x^2} &= \frac{1}{c} j^1 \\ \frac{\partial F^{2 0}}{\partial x^0} + \frac{\partial F^{2 1}}{\partial x^1} + \frac{\partial F^{2 2}}{\partial x^2} &= \frac{1}{c} j^2 \\ \end{aligned}

. \begin{aligned} \frac{\partial 0}{\partial x^0} + \frac{\partial E_x}{\partial x^1} + \frac{\partial E_y}{\partial x^2} &= \frac{1}{c} j^0 \\ \frac{\partial (-E_x)}{\partial x^0} + \frac{\partial 0}{\partial x^1} + \frac{\partial B_z}{\partial x^2} &= \frac{1}{c} j^1 \\ \frac{\partial (-E_y)}{\partial x^0} + \frac{\partial (-B_z)}{\partial x^1} + \frac{\partial 0}{\partial x^2} &= \frac{1}{c} j^2 \\ \end{aligned}

. \begin{aligned} \frac{\partial E_x}{\partial x} + \frac{\partial E_y}{\partial y} &= \rho \\ - \frac{1}{c} \frac{\partial E_x}{\partial t} + \frac{\partial B_z}{\partial y} &= \frac{1}{c} j_x \\ - \frac{1}{c} \frac{\partial E_y}{\partial t} - \frac{\partial B_z}{\partial x} &= \frac{1}{c} j_y \\ \end{aligned}

. \begin{aligned} \frac{\partial E_x}{\partial x} + \frac{\partial E_y}{\partial y} &= \rho \\ \frac{\partial B_z}{\partial y} &= \frac{1}{c} j_x + \frac{1}{c} \frac{\partial E_x}{\partial t} \\ - \frac{\partial B_z}{\partial x} &= \frac{1}{c} j_y + \frac{1}{c} \frac{\partial E_y}{\partial t} \\ \end{aligned}

.

P. (3.1): \displaystyle{ \begin{aligned} \frac{d p_\mu}{ds} &= \frac{q}{c} F_{\mu \nu} \frac{d x^\nu}{ds} \\ \frac{d p_\mu}{ds} \left( \frac{ds}{dt} \right) &= \frac{q}{c} F_{\mu \nu} \frac{d x^\nu}{ds} \left( \frac{ds}{dt} \right) \\ \frac{d p_\mu}{dt} &= \frac{q}{c} F_{\mu \nu} \frac{d x^\nu}{dt} \\ \end{aligned}}

. \displaystyle{ \begin{aligned} \frac{d p_0}{dt} &= \frac{q}{c} F_{0 0} \frac{d x^0}{dt} + \frac{q}{c} F_{0 1} \frac{d x^1}{dt} + \frac{q}{c} F_{0 2} \frac{d x^2}{dt} + \frac{q}{c} F_{0 3} \frac{d x^3}{dt} \\ \frac{d p_1}{dt} &= \frac{q}{c} F_{1 0} \frac{d x^0}{dt} + \frac{q}{c} F_{1 1} \frac{d x^1}{dt} + \frac{q}{c} F_{1 2} \frac{d x^2}{dt} + \frac{q}{c} F_{1 3} \frac{d x^3}{dt} \\ \frac{d p_2}{dt} &= \frac{q}{c} F_{2 0} \frac{d x^0}{dt} + \frac{q}{c} F_{2 1} \frac{d x^1}{dt} + \frac{q}{c} F_{2 2} \frac{d x^2}{dt} + \frac{q}{c} F_{2 3} \frac{d x^3}{dt} \\ \frac{d p_3}{dt} &= \frac{q}{c} F_{3 0} \frac{d x^0}{dt} + \frac{q}{c} F_{3 1} \frac{d x^1}{dt} + \frac{q}{c} F_{3 2} \frac{d x^2}{dt} + \frac{q}{c} F_{3 3} \frac{d x^3}{dt} \\ \end{aligned}}

. \displaystyle{ \begin{aligned} \frac{d p_0}{dt} &= \frac{q}{c} F_{0 0} \frac{d x^0}{dt} + \frac{q}{c} F_{0 1} \frac{d x^1}{dt} + \frac{q}{c} F_{0 2} \frac{d x^2}{dt} \\ \frac{d p_1}{dt} &= \frac{q}{c} F_{1 0} \frac{d x^0}{dt} + \frac{q}{c} F_{1 1} \frac{d x^1}{dt} + \frac{q}{c} F_{1 2} \frac{d x^2}{dt} \\ \frac{d p_2}{dt} &= \frac{q}{c} F_{2 0} \frac{d x^0}{dt} + \frac{q}{c} F_{2 1} \frac{d x^1}{dt} + \frac{q}{c} F_{2 2} \frac{d x^2}{dt} \\ \end{aligned}}

. \displaystyle{ \begin{aligned} \frac{d p_0}{dt} &= q (0) + \frac{q}{c} \left( - E_x \frac{d x}{dt} - E_y \frac{d y}{dt} \right) \\ \frac{d p_1}{dt} &= q E_x + \frac{q}{c} \left( (0) \frac{d x}{dt} + B_z \frac{d y}{dt} \right) \\ \frac{d p_2}{dt} &= q E_y + \frac{q}{c} \left( - B_z \frac{d x}{dt} + (0) \frac{d y}{dt} \right) \\ \end{aligned}}

. \displaystyle{ \begin{aligned} \frac{d E}{dt} &= \vec v \cdot \vec F_E \\ \frac{d p_x}{dt} &= q \left( E_x + \frac{v_y}{c} B_z \right) \\ \frac{d p_y}{dt} &= q \left( E_y - \frac{v_x}{c} B_z \right) \\ \end{aligned}}

.

— Me@2022-11-08 03:46:01 PM

.

.

# Black hole mass can’t be

A singularity doesn’t have mass. Mass is a property of an object that exists in time. A (spacelike, e.g. Schwarzschild) singularity is not an object that exists in time. A singularity is a moment in time when time ends along with mass. Furthermore, a black hole does not have a center. The geometry of the Schwarzschild spacetime inside the horizon is an infinitely long 3-cylinder with a quickly shrinking circumference. Also, no black hole solution is valid inside the horizon, because all solutions assume a static metric, but it is not static inside the horizon.

— safesphere

— May 20, 2019 at 10:38

.

And if you wanted to say that the whole mass $M$ is obtained from the singularity, you won’t be able to get a good calculation because the integral over the singularity would be singular. Moreover, the space and time are really interchanged inside the black hole (the signs of the components $grr$ and $gtt$ get inverted for $r < 2GM$) so the exercise is in no way equivalent to a simple 3D volume integral of $M \delta(x) \delta(y) \delta(z)$. The Schwarzschild singularity, to pick the "simplest" black hole, is a moment in time, not a place in space. It is the final moment of life for the infalling observers. In a locally (conformally) Minkowski patch near the singularity with some causally Minkowskian coordinates $t,x,y,z$ and $r = |(x,y,z)|$, the Schwarzschild singularity looks like a $t=t_f$ hypersurface, not as $r=0$.

— Black hole mass can't be visualized as a property of the black hole interior

— Lubos Motl

.

.

2022.11.08 Tuesday ACHK

# 天助自助者，自助人恆助之

.

Don’t spend your time making other people happy. Other people being happy is their problem. It’s not your problem. If you are happy, it makes other people happy.

— @naval

.

.

.

.

— Me@2022-11-05 12:54:58 PM

.

.