问:
From x-X, y-Y and z-Z axes angles to Euler angles
I'm trying to find values of stress (2nd rank tensor, here shown as principal stress matrix - eigenvalues along x,y,z eigenvectors):

$$
\pmb{\sigma}= \begin{bmatrix}
\sigma_{x} & 0 & 0\\0 & \sigma_{y} & 0\\ 0 & 0 & \sigma_{z}
\end{bmatrix}
$$

along axes of a given coordinate system X,Y,Z (hence, $\sigma_{X}, \sigma_{Y}$ and $\sigma_{Z}$).

$$
\pmb{\sigma}= \begin{bmatrix}
\sigma_{X} & \sigma_{XY} & \sigma_{XZ}\\\sigma_{YX} & \sigma_{Y} & \sigma_{YZ}\\ \sigma_{ZX} & \sigma_{ZY} & \sigma_{Z}
\end{bmatrix}
$$

I know the angles between the eigenvectors of the stress tensor (x,y,z) and the axes of the system (X,Y,Z).

(corresponding figure: http://anorganik.uni-tuebingen.de/klaus/nmr/conventions/euler/euler.gif)

Is there any way I could use these angles to obtain Euler angles to carry out this rotation? I'm not really interested in the exact rotation angles $\alpha, \beta$ (although this one is known) and $ \gamma$, as far as I get correct diagonal elements of the rotated stress matrix for given x-X, y-Y, z-Z angles. Or maybe there is a different, better way to do it without using Euler angles?

I would really appreciate any help. Best regards!

答:
The eigenvectors of the stress tensor define the 3×3 rotation matrix for the principal axes.

How?

Consider a matrix $\boldsymbol{A}$ with three eigenvalues $\lambda_1$, $\lambda_2$ and $\lambda_3$ and the corresponding eigenvectors

$$ \begin{aligned}
  \boldsymbol{u} & = \pmatrix{u_x \\ u_y \\ u_z} &
  \boldsymbol{v} & = \pmatrix{v_x \\ v_y \\ v_z} &
  \boldsymbol{w} & = \pmatrix{w_x \\ w_y \\ w_z} &
\end{aligned} $$

Subject to the normalizations $\boldsymbol{u}^\top \boldsymbol{u}=1$, $\boldsymbol{v}^\top \boldsymbol{v}=1$ and $\boldsymbol{w}^\top \boldsymbol{w}=1$.

Now construct the rotation matrix from the columns of the eigenvectors

$$\mathbf{R}=\left[\begin{array}{c|c|c}
\vdots & \vdots & \vdots\\
\boldsymbol{u} & \boldsymbol{v} & \boldsymbol{w}\\
\vdots & \vdots & \vdots
\end{array}\right]$$

This allows for the decomposition of $\boldsymbol{A}$ by

$$ \boldsymbol{A} = \mathbf{R}^{-1} \underbrace{\begin{bmatrix}\lambda_{1}\\
 & \lambda_{2}\\
 &  & \lambda_{3}
\end{bmatrix}}_{\boldsymbol{D}} \mathbf{R} $$

or

$$ \boldsymbol{D} = \mathbf{R}\, \boldsymbol{A}\, \mathbf{R}^{-1} $$

Note that the three eigenvectors should be orthogonal such that $\boldsymbol{u}^\top \boldsymbol{v}=0$, $\boldsymbol{v}^\top \boldsymbol{w}=0$ and $\boldsymbol{w}^\top \boldsymbol{u}=0$ which means that $\mathbf{R}^{-1} = \mathbf{R}^\top$.

Note that you can go from $\mathbf{R}$ to any set of Euler angles you want using any 3D math library available to you.

You can kind of prove the above when considering the eigenvalue problem

$$  \boldsymbol{A} \boldsymbol{x} = \lambda \boldsymbol{x} $$

and the transformation of coordinates $\boldsymbol{q} = \mathbf{R} \boldsymbol{x}$ and use it above as

$$ \boldsymbol{A} \mathbf{R}^{-1} \boldsymbol{q} = \lambda \mathbf{R}^{-1} \boldsymbol{q} $$
and

$$ \left(\mathbf{R} \boldsymbol{A} \mathbf{R}^{-1} \right) \boldsymbol{q} = \lambda \left(\mathbf{R} \mathbf{R}^{-1} \right) \boldsymbol{q} = \lambda  \boldsymbol{q} $$

or

$$ \mathbf{R} \boldsymbol{A} \mathbf{R}^{-1} = \underbrace{ \lambda\; \mathbf{1}}_{\rm diag} = \boldsymbol{D}$$


问:
Compact set proof
Let $D \subseteq \mathbb{R}^2$ be a non-empty subset that is compact in the Euclidian metric space $(\mathbb{R}^2, d)$ and let $E = \{x^2 + y^2: (x, y) \in D\} \subseteq \mathbb{R}$ be another subset. Prove that $E$ is a compact subset of $(\mathbb{R}, | \cdot |)$.

Note: Such a set is called compact if it is closed and bounded.

My attempt:

Bounded:

Since $D$ is bounded, there is some $M$ so that $d(x, y) < M$ for all $x, y \in D$. Suppose $x = (a_1, a_2)$ and $y = (b_1, b_2)$ then

$$d(x, y) = d((a_1, a_2), (b_1, b_2)) = \sqrt{(a_1 - b_1)^2 + (a_2 - b_2)^2} < M$$

From this we need to show that the usual metric on $\mathbb{R}$, denoted by $d_1(x, y) = |x - y|$ is bounded too.

Not sure how to proceed from here.

(Does bounded here mean bounded above and below? Or does what I've done suffice?)

Closed:

A set is closed if either all its limit points are contained in the space or if its complement is open. Finding the limit points of $E$ doesn't seem doable. More so, looking at $E$, I can't seem to figure out its complement.

Another approach could be to show that $E$ is complete. Then, $E$ would be closed but I can't think of how to show that all Cauchy sequences converge in $E$.

Not sure how to do this one.

Any assistance is much appreciated.

答:
The easier way to do it, as others have pointed out, is to invoke the fact that $E=f(D)$ is compact if $f$ is continuous and $D$ is compact. However, it may be useful for you to try to follow your reasoning, to grapple with the concepts of boundedness and closedness.

First, I want to clarify that you can only prove that $d_1$ is bounded from above since, being a distance, it's non-negative, and $d(x,x)=0$, so it doesn't make sense to bound it from below. This being said, take two points $e_1,e_2\in E$, write them as $$e_1=x_1^2+y_1^2, \quad e_2=x_2^2+y_2^2$$ for some $(x_1,y_1),(x_2,y_2)\in D$. Now, try to compute $d_1(e_1,e_2)$ and see if you can bound it by the distance $d((x_1,y_1),(x_2,y_2))$, which you know is itself bounded. Then, you will have boundedness.

$Tip:$ Since our distance comes from a norm, we can actually avoid bounding the distance between points, and just bound the norm of each point. By the triangle inequality, having a bounded distance is equivalent to having a bounded norm.

Now, to prove closedness, pick a sequence $\{e_n\}$ in $E$ that converges to a point $e\in\mathbb{R}$. Again, write each point in the sequence as $$e_n=x_n^2+y_n^2.$$ Since $D$ is closed, the sequence $\left\{(x_n,y_n)\right\}$ has a limit point in $D$, shall we call it $(x,y)$. Since the function $$f(x,y)=x^2+y^2$$ is continuous, we have that $$e=\lim e_n=\lim f(x_n,y_n)=f(\lim(x_n,y_n))=f(x,y)=x^2+y^2.$$
So $e$ is in fact an element of $E$.

ContentLicense: CC BY-SA 4.0

Title: Compact set proof


问:
Graph layout algorithm with extra "nodes" on edges, and with non-point nodes
I'm attempting to lay out arbitrary graphs in as graphically pleasing a manner as possible while trying to minimise computation required (because the layout engine will be written in browser JavaScript). Obviously one convenient way is to use a force-directed algorithm. I have two additional constraints on my graphs which are making it difficult for me to know how to progress:

The nodes (which are circular) have reasonably large size -- in particular, they are not points -- and nodes must not overlap. I believe that this is best handled by enforcing a minimum edge length of 2*noderadius, and by putting an edge between every pair of nodes, and only displaying the edges which correspond to actual edges in my graph. However, there may be a better way.

An edge has a circular symbol at its midpoint, and these circular symbols must also not overlap. That is: edges are permitted to cross (of course; not all graphs have a planar embedding) but the midpoints of two edges must not coincide. For example, K3,3 in its compact layout (https://upload.wikimedia.org/wikipedia/commons/thumb/f/f3/Biclique_K_3_3.svg/200px-Biclique_K_3_3.svg.png) would not be suitable because many edges have their midpoints in the same place (in the centre of the diagram) and so the symbols of all but one edge would be obscured.

I did think that this constraint would be achieveable by making the "edge midpoint symbols" actually be nodes, and thus the normal way of stopping nodes overlapping would stop the edge symbols overlapping too, but if I do that then I do not know how to make the two edges from a symbol be collinear: that is, an edge A-B with a symbol in the middle should look like one line from A to B with a symbol in the centre. If I model it as A-s-B then the force-directed algorithms will not constrain A-B to be one line, and I do not want the A-B edge to "bend" in the middle.

I understand how to use a force-directed algorithm in general, and I think I can fulfil point (1) in a force-directed algorithm, but I do not know how to stop edge symbols overlapping while being force-directed. Possibly there is a way to do this, or possibly I should be using a different graph layout algorithm entirely, in which case I invite suggestions as to what that should be. I am not a mathematician by trade, so I would appreciate it if suggestions came with a little explanation :-)

The graphs are unlikely to contain more than, say, 25 nodes, so there are not huge numbers of nodes here, and therefore I am OK with (relatively) inefficient approaches :-)

答: It is an iterative process, but not all iterations have to have the same edges. I am thinking you have your graph of nodes and edges, you have springs and repulsion going on to do the basic layout. You then have a second set of edges which enforce the non-overlap of nodes and midpoint symbols - this second set includes the midpoints as nodes and doesn't worry too much about bending at the midpoints. You then alternate between the first and second set of edges, probably ending on the first set so you don't get any bends in your midpoint symbols.</p>

ContentLicense: CC BY-SA 3.0


问:
Is $\sum_{n=1}^\infty \sin(n) \cdot (x_n - x_{n+1})$ defined?
Let's consider sum:

$$L (x_n) = \sum_{n=1}^\infty \sin(n) \cdot (x_n - x_{n+1})$$

For $x_n$ such that $\sum_{n=1}^\infty|x_n| \le 1$

I want to check whether this functional is well defined i.e. to check if $\forall x_n$ this sum exists.

As already was shown here: Maximum of $\sum_{n=1}^\infty \sin(n) \cdot (x_n - x_{n+1})$ we know that $L(x_n)$ is bounded, but I'm not sure how to show that this sum exists for any $x_n$ i.e. to show that for any $x_n$ matching the condition $\sum_{n=1}^\infty|x_n|\le1$ $,L(x_n)$ converges.

I was trying to prove it (combining facts that we have $(x_n - x_{n+1})$ differences which strongly suggests to use Cauchy's theorem and condition on $x_n$ : $\sum_{n=1}^\infty |x_n| \le 1$). But I end up with nothing. Could you please give me a hand with telling if this expression converges for any $x_n$ ?

答:
For any $\epsilon>0$, just choose $N_0$ large enough such that $\sum\limits_{n=N_0}^{N_1}|x_n| <\frac1{2}\epsilon$ for all $N_1 \gt N_0$

and you get  $\sum\limits_{n=N_0}^{N_1}|\sin(n)(x_n-x_{n+1})| \le \sum\limits_{n=N_0}^{N_1}|\sin(n)x_n| +\sum\limits_{n=N_0}^{N_1}|\sin(n) x_{n+1}| < \epsilon$

so $\left|\sum\limits_{n=N_0}^{N_1}\sin(n)(x_n-x_{n+1})\right| < \epsilon$

so the partial sums are a Cauchy sequence

and thus the overall series converges.


问:
Using dimensional analysis to ‘get’ planck’s ${\lambda}$ equation with avogadro’s constant
This is for when you calculate bond energy in: ${j\cdot mol(n)^{-1}}$ and want to use planck’s equation for photon energy to calculate ${\lambda}$

Planck’s equation for photon energy:
$${\lambda=\frac{h\cdot c}{E}}$$

Planck’s equation for photon energy with avogadro’s constant:

$${\lambda=\frac{h\cdot c\cdot N_A}{E}}$$

I don’t understand how ${N_A}$ (${\frac{1}{n}}$) is at the top as:

${n=\frac{g}{g\cdot n^{-1}}\Rightarrow{n=\frac{1}{n}}}$

Energy in this case:

${E=\frac{j}{mol\ or\ n \ (1/n)}}$

I can’t rearrange ${1/n}$ to get it to the to the top in order to get rid of the ${n}$ at the bottom so that:

${E=j}$

Can someone show me verbosely with dimensional analysis how to do this?

Units:

${\lambda=m}$

${E=j}$

${h=js}$

${c=ms^{-1}}$

${N_A=n^{-1}}$

Dimensional analysis:

${\lambda=js\cdot ms^{-1}\cdot j^{-1}(1^{-1}n^{-2})}$

${\lambda=\frac{j\cdot s\cdot m}{j\cdot s(\frac{1}{n})}}\Rightarrow{\lambda=\frac{j\cdot s\cdot m}{\dfrac {j\cdot s}{n}}}\Rightarrow{\lambda=\frac{m}{\dfrac{1}{n}}}$

Then I can’t get ${\lambda=m}$

Is this correct, and if not then why?:

${\frac{j}{mol(1/n)}=\frac{j}{\dfrac{1}{n}}}$

Bonus question:

I have been using dimensional analysis to ‘get’ equations before I even knew that word, as my memory is bad and I couldn’t remember equations, I used to think it was a trick

Are there more/better ways to ‘get’ equations and cases where dimensional analysis won’t work?

I really need help here and would appreciate it very much

答:
I now know where I should have inserted [$N_A$] using dimensional analysis.

When I asked the below question I though that $\text [n]$ is just another way of saying ${[mol]}$.

My logic was sound, let me just replace $\text [n]$ with $[mol]$ this is how the original question should have been asked:

This is for when you calculate bond energy in:

$$
\text [j]\cdot [mol^{-1}]
$$

Then use planck’s equation for photon energy to calculate [${\lambda}$] in:

$$\text [m]$$

Planck’s equation for photon energy:

$$
\lambda=\frac{\text h\cdot \text c}{\text E}
$$

Planck’s equation for photon energy with avogadro’s constant:

$$
E=\text j\cdot \frac{1}{mol}
$$

$$
\lambda=\frac{\text h\cdot \text c\cdot N_A}{\text E}
$$

I now know how I could’ve known where to insert [$N_A$] using dimensional analysis only, just how I wanted.

This does not require any physics or chemistry knowledge aside from [$N_A$] which all you mathmeticians seemed to know about.

So it’s a maths question, onto the dimensional analysis part in my original question.

Units:

${\lambda=\text m}$

$\text E=\text j\cdot mol^{-1}$

$\text h= \text j\cdot \text s$

$\text c= \text m\cdot \text s^{-1}$

$N_A=mol^{-1}$

Dimensional analysis:

$$
\lambda=\frac{\text j\cdot \text s\cdot \text m}{\text j\cdot \text s(\frac{1}{mol})}\Rightarrow\lambda=\frac{\text j\cdot \text s\cdot \text m}{\dfrac {\text j\cdot \text s}{mol}}\Rightarrow\lambda=\frac{\text m}{\dfrac{1}{mol}}
$$

Then I can’t get:

$$
[\lambda=m]
$$

This was the dimensional analysis of planck’s [$\lambda$] equation without [$N_A$]:

$$
E=j\cdot \frac{1}{mol}
$$

$$
\lambda=\frac{\text h\cdot \text c}{\text E}
$$

So of course the dimensional analysis gave me:

$$
\lambda=\frac{\text m}{\dfrac{1}{mol}}
$$

But it told me I need to put [$N_A$] at the top which I should have seen.

The whole reason for me wanting to add [$N_A$] was to get rid of [$mol$] from [$j$] in the [$E$] term, I just didn’t know where to put it, but it was made clear...

Now if I had noticed this and put [$N_A$] at the top then new dimensional analysis:

$$
\lambda=\frac{\text j\cdot \text s\cdot \text m\cdot (\frac{1}{mol})}{\text j\cdot \text s\cdot (\frac{1}{mol})}\Rightarrow\lambda=\frac{\text j\cdot \text s\cdot \text m}{\dfrac {\text j\cdot \text s\cdot mol}{mol}}\Rightarrow\lambda=\frac{\text m}{\dfrac{mol}{mol}}\Rightarrow\lambda=\text m
$$

So:

$$
\lambda=\frac{\text h\cdot \text c}{\text E}=\frac{\text h\cdot \text c\cdot N_A}{\text E}
$$

As:

$$
\lambda=\frac{\text h\cdot \text c}{j}=\frac{\text h\cdot \text c\cdot \frac{1}{mol}}{\text j\cdot \frac{1}{mol}}=\frac{\text h\cdot \text c\cdot 1}{\text j\cdot 1}
$$


问:
Recurrence Relation with factorial term
I was solving some practice problems on recurrence relation for my upcoming exam and came across the following question.

Solve the recurrence relation T(n) = (n-1) T(n-1) + (n+1)! with the initial condition T(1) = 1.

I tried several techniques to solve it but it was of no use. Your help is very much appreciated.

答:
One thing you can do is to consider the Sequence $$U(n)=\frac{T(n)}{(n-1)!}$$
Hence you can show
$$
U(n+1)=U(n)+(n+1)(n+2)
$$
You can then, sum this relation to find $U(n)$ (telescopic sums)

Title: Recurrence Relation with factorial term


答:
Yes, this series converges absolutely. This is because $|\sin(n) (x_{n + 1} - x_n)| \leq |x_{n + 1} - x_n| \leq |x_{n + 1}| + |x_n|$, and

$\sum\limits_{n = 1}^\infty |x_{n + 1}| + |x_n|$

converges.

Title: Is $\sum_{n=1}^\infty \sin(n) \cdot (x_n - x_{n+1})$ defined?

Body:
Let's consider sum:

$$L (x_n) = \sum_{n=1}^\infty \sin(n) \cdot (x_n - x_{n+1})$$

For $x_n$ such that $\sum_{n=1}^\infty|x_n| \le 1$

I want to check whether this functional is well defined i.e. to check if $\forall x_n$ this sum exists.

As already was shown here: Maximum of $\sum_{n=1}^\infty \sin(n) \cdot (x_n - x_{n+1})$ we know that $L(x_n)$ is bounded, but I'm not sure how to show that this sum exists for any $x_n$ i.e. to show that for any $x_n$ matching the condition $\sum_{n=1}^\infty|x_n|\le1$ $,L(x_n)$ converges.

I was trying to prove it (combining facts that we have $(x_n - x_{n+1})$ differences which strongly suggests to use Cauchy's theorem and condition on $x_n$ : $\sum_{n=1}^\infty |x_n| \le 1$). But I end up with nothing. Could you please give me a hand with telling if this expression converges for any $x_n$ ?


问:
Why does the function $\frac{1}{x^{2222}}$ seem to have *two* asymptotes at around $\pm0.744$?
When screwing around with the Dirac-delta function in Desmos i noticed that when i multiply it by a really low-degree rational function

$$f(x)=\frac{1}{x^i}$$

, the resulting function has the domain

$$D\supset\mathbb{R}\setminus[-\varepsilon,\varepsilon]$$ where $\varepsilon$ is a positive real number.

Now of course this has to be false because $f(x)$ only has roots at $0$, so having only one asymptote.

Is this a computational/floating point error?I checked it and Geogebra has the same kind of error.

Why does the function $\frac{1}{x^{2222}}$ seem to have two asymptotes at around $\pm0.744$?

答:
You can see the answer in any standard programming language. Here is what we see in Python, which uses 64-bit floats (sys.getsizeof(1.0) returns 24 == 16 (Python bloat) + 8 (bytes to represent float)):

```<code>In[1]: 1/(.73 ** 2222)
Out[1]: 4.972843735306971e+303
In[2]: 1/(.72 ** 2222)
Out[2]: inf
</code>```

Somewhere between .73 and .72 is exactly the point at which $\frac{1}{x^{2222}}$ exceeds the largest representable floating point number, triggering it to be "inf" (infinity).

Body:
You can see the answer in any standard programming language. Here is what we see in Python, which uses 64-bit floats (sys.getsizeof(1.0) returns 24 == 16 (Python bloat) + 8 (bytes to represent float)):

In[1]: 1/(.73 ** 2222)
Out[1]: 4.972843735306971e+303
In[2]: 1/(.72 ** 2222)
Out[2]: inf

Somewhere between .73 and .72 is exactly the point at which $\frac{1}{x^{2222}}$ exceeds the largest representable floating point number, triggering it to be "inf" (infinity).


问:
Calculate cosh 1 correct to 6 decimal places.
Can anyone help me with this problem?

Calculate $\cosh 1$ correct to 6 decimal places.

答:
You can simplify cosh 1 to
$$
cosh(1) = 1/2 (1/e+e^1)
$$
And use the following approximation of e (good for 9 decimal digits):
$$
\frac{271\,801}{99\,990}
$$
Alternatively you can approximate e yourself using the series:
$$
e=1+\frac{1}{2!}+\frac{1}{3!}+\frac{1}{4!}+\dots
$$
You will only have to develop the series for a few steps until the first significant digits will not change any more.</p>


问:
An interesting observation on the roots of certain polynomials
Consider the following polynomial:
$$\sum_{k=1}^{n}\text{prime}(k)x^{k-1}$$
where $n\in\mathbb{N}$ and $\text{prime}(n)$ is the $n$th prime. The first few polynomials are:

\begin{align}
n=1&:\quad 2\\
n=2&:\quad 2+3x\\
n=3&:\quad 2+3x+5x^2\\
n=4&:\quad 2+3x+5x^2+7x^3
\end{align}
Consider the number of real roots of these polynomials. The first few number of real roots of these polynomials form the sequence $0,1,0,1,0,1,0,1,0,1,0,1,0,1,...$. This alternating zeros and $1$'s pattern holds for all primes less than $1000$ (verified by @Quimey) I have two questions:

Does this pattern always hold? Said in another way, is the number of real roots of the polynomial $\sum_{k=1}^{n}\text{prime}(k)x^{k-1}$ always equal to $(1 + (-1)^{n})/2$?

Is yes, how can we prove it?

Note: Sorry if I missed something "trivial", I don't have much experience in mathematics.

答:
The pattern breaks down at $n = 2437$, where the polynomial has two real roots according to the following code in SageMath (which outputs 2).

```<code>R.<x> = PolynomialRing(ZZ)
primes = primes_first_n(2437)
p = sum(np.array(primes)*np.array([x**i for i in range(len(primes))]))
print(pari(p).polsturm())
</code>```

I think this is the smallest such $n$. I'm not sure why the sequence breaks there in particular; the prime gaps around $\text{prime}(2437)=21727$ don't look particularly special.

We can exclude an error in the software by checking the exact value of the polynomial at rational points near the two roots (thanks to Ivan Neretin for the suggestion). I used SymPy's Rational class, but this could also be done using Python's int type and multiplying by the largest denominator power in the polynomial to avoid fractions. The output of the code

```<code>import sympy
n = 2437
sympy.sieve.extend_to_no(n)
for numerator in [-9967, -9966, -9965]:
    x = sympy.Rational(numerator, 10000)
    print(sympy.functions.sign(sum([sympy.sieve[i+1]*x**i for i in range(n)])))
</code>```

is 1, -1, 1, which proves that the polynomial has at least two real roots (by continuity).

Body:
The pattern breaks down at $n = 2437$, where the polynomial has two real roots according to the following code in SageMath (which outputs 2).

R.<x> = PolynomialRing(ZZ)
primes = primes_first_n(2437)
p = sum(np.array(primes)*np.array([x**i for i in range(len(primes))]))
print(pari(p).polsturm())

I think this is the smallest such $n$. I'm not sure why the sequence breaks there in particular; the prime gaps around $\text{prime}(2437)=21727$ don't look particularly special.

We can exclude an error in the software by checking the exact value of the polynomial at rational points near the two roots (thanks to Ivan Neretin for the suggestion). I used SymPy's Rational class, but this could also be done using Python's int type and multiplying by the largest denominator power in the polynomial to avoid fractions. The output of the code

import sympy
n = 2437
sympy.sieve.extend_to_no(n)
for numerator in [-9967, -9966, -9965]:
    x = sympy.Rational(numerator, 10000)
    print(sympy.functions.sign(sum([sympy.sieve[i+1]*x**i for i in range(n)])))

is 1, -1, 1, which proves that the polynomial has at least two real roots (by continuity).


问:
Finding Automorphisms and Fixed Fields
So I'm working through Galois Theory by Ian Stewart, and I'm on on chapters 10/11, which discuss automorphisms, galois groups, etc. There is an example 10.7 that I'm trying to work through:

"Let $K = \mathbb{Q}(\xi)$ where $\xi = e^{2\pi i / 5} \in \mathbb{C}$. Now $\xi^5 = 1$ and $\mathbb{Q}(\xi)$ consists of all elements $p + q\xi + r\xi^2 + s\xi^3 + t\xi^4$ where $p, q, r, s, t \in \mathbb{Q}$. The Galois group of $\mathbb{Q}(\xi) : \mathbb{Q}$ is easy to find, for if $\alpha$ is a $\mathbb{Q}$-automorphism of $\mathbb{Q}(\xi)$ then $(\alpha (\xi))^5 = \alpha (\xi^5) = \alpha(1) = 1$, so that $\alpha (\xi) = \xi, \xi^2, \xi^3, \xi^4$. This gives four candidates for $\mathbb{Q}$-automorphisms:

$\alpha_1 : p + q\xi + r\xi^2 + s\xi^3 + t\xi^4 \rightarrow p + q\xi + r\xi^2 + s\xi^3 + t\xi^4$

$\alpha_2 : p + q\xi + r\xi^2 + s\xi^3 + t\xi^4 \rightarrow p + s\xi + q\xi^2 + t\xi^3 + r\xi^4$

$\alpha_3 : p + q\xi + r\xi^2 + s\xi^3 + t\xi^4 \rightarrow p + r\xi + t\xi^2 + q\xi^3 + s\xi^4$

$\alpha_4 : p + q\xi + r\xi^2 + s\xi^3 + t\xi^4 \rightarrow p + t\xi + s\xi^2 + r\xi^3 + q\xi^4$

It is easy to check that all of these are $\mathbb{Q}$-automorphisms..."

I started working through this example because problem 10.3 says to work through this example with $\xi = e^{2\pi i / 7}$, and I think I understand everything up until the actual automorphisms. It seems like the automorphisms are just moving coefficients around, but I can't tell how, since it's not every possible permutation of the coefficients. How exactly are these four automorphisms found?

答:
Since $\alpha$ is an automorphism, we have $\alpha (\xi^k)= \alpha(\xi)^k$, so given $\alpha(\xi)$, the other follows.

In your example $\alpha_2$ sends $\xi$ to $\xi^2$ and you can see then $\xi^2$ is sent to $\xi^4$, $\xi^3$ to $\xi^6=\xi$ and $\xi^4$ to $\xi^8=\xi^3$

Title: Finding Automorphisms and Fixed Fields


问:
What about the roots of $P+Q$ can be gleaned from $P,Q$?
Let $P,Q$ be polynomials (with whatever coefficients you desire.) In general, the roots of $P+Q$ are not immediately calculable (except by direct computation) even if we have full information of $P$ and $Q$, including their roots.

My question: what are some non-trivial* theorems that give information on the roots of $P+Q$ given information on $P$ and $Q$, probably with certain restrictions? Ie. their location, sum, exact value(s)...anything!

Example: One theorem which fits the bill is Rouché's theorem, which can be applied to polynomials.

*By non-trivial, I mean $P \neq-Q$, or things of that nature.

答:
the polynomial $P(x)$ and another polynomial $Q(y)$ are distinct, but they but have roots $P_{n}$ and roots $q_{m}$ respectively, where $n$ and $m$ are their degrees and $x,y$ are their corresponding variables

if roots $p$ and $q$ are summed, this algebraic number $p+q$ is also the root of another polynomial, without knowing the roots themselves we can calculate the polynomial of $p+q$ by resultants, say that the polynomial we are looking for is in variable $z$, then $z=x+y$
$$\text{resultant( P(x) , Q( $z$-x) , x )} = \mathbb{z}$$
so we would make the substitution $y=z+x$, to put one of the polynomial in the new variable, then extract the polynomial away to retain $z$

Now is roots $p$ combines with $q$, every root of $P(x)$ would sum to all roots of $Q(y)

$$p = p_{1}, p_{2},\dots \dots, p_{n}$$
$$q = q_{1}, q_{2},\dots \dots, q_{m}$$
So that the new polynomial $z$ would have $n × m$ degrees
$$p \to \text{complex}$$
$$q \to \text{real}$$
$$p \to \text{real}$$
$$q \to \text{complex}$$
Also if $P(x)$ has all roots to be complex, $n$ is even and $Q(y)$ has all roots real,or vice versa,  then the polynomial $z$ would have complex roots, except if both $p$ and $q$ are real
$$P(x) \to \text{unsolvable group} $$
$$Q(y) \to \text{unsolvable group}$$
Also if the roots of any of the polynomial $P(x)$ or $Q(y)$ has roots that are beyond radical, then polynomial $z$ would also be unsolvable


问:
Set of linearly independent $n$-tuples in infinite dimensional Banach space is open
is the following result true?

Let $X$ be an infinite dimensional Banach space, and
$$U=\{(x_1, \cdots, x_n) \in X^n: \{x_1, \cdots, x_n\} \text{ is linearly independent}\}$$
then $U$ is open in $X^n$ with the product topology.

I think it is true, at least if $X$ is separable because I've encountered this result being used in a paper I'm reading but I cannot prove it.

Any ideas?

答:
If $\{x_1, x_2,  \ldots , x_n\}\subseteq X$ is linearly independent, one can use  Hahn Banach to produce  continuous linear functionals $f_1,
f_2,  \ldots , f_n$  such that $f_i(x_j)=\delta _{i, j}$.   Therefore the matrix-valued linear transformation
$$
  T:(u_1,u_2,\ldots ,u_n)\in X^n \mapsto  \big (f_i(u_j)\big )_{i, j}\in  M_{n}({\mathbb R})
  $$
sends the $n$-tuple $(x_1, x_2,  \ldots , x_n)$ to the identity matrix.  Since $T$ is continuous and $GL_n({\mathbb R})$ is open,
there is a neighborhood of
$$
  \mathbb x:= (x_1, x_2,  \ldots , x_n)
  $$
in $X^n$, such that every
$$
  \mathbb u := (u_1, u_2,  \ldots , u_n)
  $$
in that neighborhood is
sent to an invertible matrix via $T$.  This implies  that the columns of $T(\mathbb u)$ are linearly independent, and
this is easily seen to imply that $\{u_1, u_2,  \ldots , u_n\}$ is linearly independent.


问:
How do I find the interior, closure and boundary of an arbitrary set?
I'd like to find the interior, boundary, closure, etc. of an arbitrary set. I mean, if I'm working on a subset of $\mathbb{R}, \mathbb{R}^2,$ or $\mathbb{R}^3$ it could be quite easy using Geogebra, but in other cases or sets that are complex to graph, it turns out to be very difficult.

So I'm asking about an algebraic method (most specifically, an example to understand) to find those sets.

Like $A=\{(x,y)\in \mathbb{R}^2:0<(x-2)^2+y^2<1\}\cup\left\{\left(\dfrac{1}{n}+2,0\right):n\in\mathbb{N}\right\}$

答:
In general, there is no procedure for finding the interior, boundary, and closure of a set, even in $\mathbb{R}^2$. As an example of some weirdness you could encounter, consider the set
$$
S= \Big\{ \Big(x,\sin\Big(\frac{1}{x}\Big) \Big) \colon x > 0 \Big\} \subseteq \mathbb{R}^2.
$$
Then for each value $z \in [-1,1]$ we can find infinitely many distinct terms $0 < x_n < 1$ such that $\sin(\frac{1}{x_n}) = z$. It follows that the sequence $(x_n, \sin(\frac{1}{x_n}))$ converges to $(0,z) \in \mathbb{R}^2$. Since $(0,z)$ is a limit point of $S$, by definition $(0,z)$ is in the boundary of $S$ for all $z \in [-1,1]$. You wouldn't necessarily guess that by looking at the formula for $S$.

Of course it's possible to construct even more pathological examples where the boundary is even harder to determine. See for example the Mandelbrot set.

Edit: Just to throw in another weird example the Sierpiński Triangle is a closed set with empty interior. It is therefore equal to its own boundary.


问:
Reworking an equation to overcome arithmetic overflow
I am implementing the Maximum Entropy Markov Model (MEMM) algorithm by following Collins' notes: http://www.cs.columbia.edu/~mcollins/loglinear.pdf

The problematic term (see p. 18): $\ln\sum_y\exp(\vec v \cdot f(x^{(i)},y))$ (Although not explicitly mentioned, I'm assuming the natural logarithm is used, since Collins uses $e$ everywhere.)

I'm having problems because the dot product returns a high number which, when exponentiated, causes an arithmetic overflow. I would need to somehow rework the equation so that the numbers wouldn't be too high.

Any suggestions? Does this kind of thing has a name?

EDIT: The reasoning behind exponentiating the dot product is to produce positive numbers.

答:
The paper has a bunch of formulas that look like
$$\frac{\exp(a)}{\sum \exp(a_i)}$$
These can be rewritten as
$$\frac{1}{\sum \exp(a_i-a)}$$
Since all the terms are positive, if one of them overflows, you know that the fraction (conditional probability) is practically zero.

Also, you can try to put $\exp(0.01 x)$ instead of $\exp(x)$  and $100\ln$ instead of $\ln$. This has the effect of changing the base from $e$ to $e^{0.01}$ everywhere. The formulas should remain valid as long as they don't depend on the calculus properties of $e$ such as $(e^x)'=e^x$. Naturally, $0.01$ could be another small number.


问:
Intuition for $\int_{-\infty}^\infty f(x) f'(x) \,dx=0$ where $f(x) \to 0$ when $x \to \pm \infty$
Assume $$\lim_{x\rightarrow \pm\infty}f(x) = 0,\:\:\: f(x)\in C^{1}(\mathbb{R})$$

For this case, I saw a theorem that says that: $$\int_{-\infty}^{{\infty}}f(x)\cdot \frac{d}{dx}f(x)\:dx = 0$$ (not hard to prove with integration by parts)

Is there any intuition for this result? I can see the intuition only in the case where f(x) is symmetric. We have: $$df \approx \frac{d}{dx}f(x)\:dx,$$ so the integrand is the product of f(x) and the infinitesimal addition to f at x's neighborhood, df(x). Thanks to the symmetry we have: $$df(-x)f(-x)=df(-x)f(x)=-df(x)f(x)$$ so the values of the integrand at x,-x cancel out and we have a total sum of 0.
Thanks!

答:
The conditions imply that $f$ is smooth enough to use integration by parts, for which we find that

$$
\int_{-\infty}^\infty f(x)f'(x)dx = [f^2(x)]_{x=-\infty}^{x=\infty} - \int_{-\infty}^\infty f'(x)f(x)dx = -\int_{-\infty}^\infty f(x)f'(x)dx
$$
so the integral is equal to the negative of itself, and hence it is zero. Note here that you really need to replace all the $\pm \infty$ with finite limits and then take the limit at the end.


问:
Locally compact vector spaces over non-Archimedean field
I'm in a $p$-adic analysis class right now and we were tasked with proving the following:

Suppose $(F,\|\cdot\|_F)$ is a non-Archimedean field, say $\mathbb{Q}_p$. By this I mean a field with a norm such that the induced distance satisfies a stronger form of the triangle inequality, namely:

$$\|x-y\|\leq\max\{\|x\|, \|y\|\}$$

Let $(V,\|\cdot\|_V)$ be a normed vector space over $F$. I want to show that $V$ is locally compact if and only if the unit ball in $V$ is compact. Now my question is pretty simple, does the fact that $F$ is non-archimedean change anything here as opposed to an Archimedean field?

The proof of this exercise I had in mind is just using the additive structure of the vector space to transfer the balls around. For instance if the closed unit ball is compact, then you can just translate it to a point $x$ to get a compact neighborhood of $x$. Is that correct or am I missing a subtlety due to the non-Archimedean underlying field? I think it should be correct because I'm not using the triangle inequality but vector spaces over non-Archimedean fields are still a bit exotic to me.

答:
Indeed, let $(F, \lvert \cdot \rvert)$ be any field with an absolute value, and $(V, \|\cdot\|)$ be a normed $K$-vector space with respect to the that absolute value (whether that norm and/or absolute value satisfy the strong triangle inequality or not). Then w.r.t. the metric induced by the norm, we have that

$\bar B_1(0) :=\{v \in V: \| v \| \le 1\}$ is compact $\Rightarrow  V$ is locally compact.

Because as you suggest, using that for any $v_0 \in V$ the translation map $x \mapsto v_0+x$ is a homeomorphism (which can be proved right away, or follows just from the fact that the underlying additive group of $V$ is a topological group w.r.t. the considered structure), we get that $v_0 + \bar B_1(0)$ is a compact neighbourhood of $v_0$.

For the converse direction

$V$ is locally compact $\Rightarrow \bar B_1(0) :=\{v \in V: \| v \| \le 1\}$ is compact

we need only one little extra restriction, namely we have to assume that the absolute value $\lvert \cdot \vert$ is not trivial, i.e. there is some $c \in F$ such that $\lvert c \rvert \neq 0,1$.

Namely, even without that assumption, from local compactness we can readily find some closed ball of radius $r > 0$, $\bar B_{r}(0) :=\{v \in V: \| v \| \le r\}$ around $0 \in V$ which is compact; now we need that assumption to further say w.l.o.g. that $r = \lvert a^{-1} \rvert$ for some scalar $a \in F$; and again, quite generally scaling $x \mapsto ax$ is a homeomorphism for any $a \in F^\times$, and will map that closed ball into and onto the closed unit ball.

(And in that trivial case that the absolute value and hence the norm is trivial, say $\lvert v \rvert = \begin{cases} c \text{ if } v \neq 0 \\ 0 \text{ if } v=0 \end{cases}$ for some $c > 0$, just notice that such a $V$ is always locally compact, whereas closed balls $\bar B_{r}(0)$ are singletons (hence compact) for $c > r$, but the entire $V$ for $c \le r$; the last one is compact iff it is finite iff either $V=0$ or ($F$ is finite and $\dim_F(V)$ is finite).)

Note now that the equivalence hold in great generality, but obviously neither of the statements is true in many settings. E.g. if $F$ itself is not locally compact, like $\mathbb Q$ with either the standard archimedean or any $p$-adic value, both statements are wrong e.g. if $\dim_F(V) \in \mathbb N_{\ge 1}$ (and for many infinite-dimensional $V$ as well).


问:
Proving that $(X-1,Y^2-4Y-XY+Y+4)=(X-1,Y-2) $
We consider the ideal $I=(X-1,Y^2-4Y-XY+Y+4)$ of the polynomial ring $k[X,Y]$. I need to prove that $(X-1,Y^2-4Y-XY+Y+4)=(X-1,Y-2) $. Since $Y^2-4Y-XY+Y+4=(Y-2)^2-Y(X-1)$, it is easy to see that $I \subseteq (X-1,Y-2) $, but I can't prove that $(X-1,Y-2) \subseteq I$.
Any help would be appreciated.

Body:
The claim is false since

$$\begin{align}
(x-1,f(x)) &= (x-1,\,f(x)\bmod x-1)\\
           &= (x-1,\,f(1))\\
           &= (x-1,\,y^2-4y+4)\ \ {\rm in\ OP}\\
           &= (x-1,\,(y-2)^2)
\end{align}\qquad$$

but $\,(x\!-\!1,(y\!-\!2)^2)\neq (x\!-\!1,y\!-\!2),\,$ else $\,y\!-\!2 = (x\!-\!1)f + (y\!-\!2)^2g,\,$ so $\,y\!-\!2\mid f,\,$ so cancelling $y\!-\!2$ yields $\,1 = (x\!-\!1)f'+(y\!-\!2)g,\,$ so $\,1 = 0\,$ by eval at $\,x=1,y=2$.


问:
Minimize the standard deviation in list of numbers by subtracting from each value
Suppose we have a list of values, $L = (x_1, x_2, ..., x_n)$, and another list of numbers, $Q = (q_1, q_2, ..., q_n), q_i$ being the maximum value we can subtract from $x_i$ (so from $x_i$ we can subtract any number in $[0; q_i]$. I want to find a combination of subtractions such that the standard deviation of the resulting list will be minimal. (In other words, I want to find a set of values, $R = (r_1, r_2, ..., r_n)$, $r_i \in [0; q_i]$ such that the standard deviation of $L' = (x_1-r_1, x_2-r_2, ..., x_n-r_n)$ is minimal.)

A graphical example (the blue points are the plotted $x_i$):

Any help would be appreciated. Thanks.

答:
Suppose the data are

```<code> i  x   q
 1  9   4
 2  2.4 0.8
 3  1.8 1.6
 4  8   1.2
 5  6.5 2.5
 6  2.4 1.4
 7  5   3.3
 8  8.6 2.6
 9  8.7 0.6
10  8.6 0.7
11  8.7 0.5
</code>```

@JohnBentin's proposal (which appears to be gradient descent, relying on convexity for convergence) yields
$$x'=(5.4, 2.4, 1.8, 6.8, 5.4, 2.4, 5, 6, 8.1, 7.9, 8.2)$$ with $m'=5.4$ and $\sigma = 2.341367122$.

And minimizing the standard deviation of $x'$ subject to $x_i-q_i \le x'_i \le x_i$ yields the same solution.

Body:
Suppose the data are

 i  x   q
 1  9   4
 2  2.4 0.8
 3  1.8 1.6
 4  8   1.2
 5  6.5 2.5
 6  2.4 1.4
 7  5   3.3
 8  8.6 2.6
 9  8.7 0.6
10  8.6 0.7
11  8.7 0.5

@JohnBentin's proposal (which appears to be gradient descent, relying on convexity for convergence) yields
$$x'=(5.4, 2.4, 1.8, 6.8, 5.4, 2.4, 5, 6, 8.1, 7.9, 8.2)$$ with $m'=5.4$ and $\sigma = 2.341367122$.

And minimizing the standard deviation of $x'$ subject to $x_i-q_i \le x'_i \le x_i$ yields the same solution.


问:
$\mathbb{R}^{n}$ is a strongly locally homogeneous space.
I am new to the study of CDH topological spaces, I wanted to study basic examples of this type of spaces for example for the fact that $\mathbb{R}^{n}$ is CDH some authors introduce the notion of Strongly Locally Homogeneous spaces.

A space $X$ is SLH if it has a basis of open subsets $\mathcal{U}$ such that if $p$ and $q$ are two point of $U \in \mathcal{U}$ then there is an homeomorphism $h:X\to X$ such that $h(p) = q$ and such that $h(x) = x$ for every $x$ not in $U$.

Unfortunately I have also failed to demonstrate that $\mathbb{R}^{n}$ is strongly locally homogeneous, does anyone have any ideas?

Thanks a lot

答:
Denote by $\mathcal{H}(X)$ the group of autohomeomorphism of the topological space $X$.

In particular $\mathbb{R}^{n}$ is SLH.


问:
Find line orthogonal to another line passing through point p in R³
So in R³, given a line $G$ in parameter form and a point Q, how do I compute the line passing through Q that is orthogonal to $G$?

In order for two vectors to be orthogonal, the dot product has to be zero. Also, for a point to be located on a line, inserting the point into the line equation must result in equality, right? Not quite sure how to use this for the task.

A hint to get me on the right track would suffice

答:
Let $G: \mathbf{a}+\alpha \mathbf{b}$ and let $\mathbf{q}$ be the vector from the origin to the point $Q$. Then determine the point on $G$ which is closest to $Q$ by minimizing the distance:

$$d=(\mathbf{q}-\mathbf{a}-\alpha\mathbf{b})^T(\mathbf{q}-\mathbf{a}-\alpha\mathbf{b})$$

This gives you a quadratic equation in $\alpha$ which can be easily minimized by taking the derivative w.r.t. $\alpha$ and setting it to zero. The result is

$$\alpha_0=\frac{ \mathbf{b}^T(\mathbf{q}-\mathbf{a})}{ \mathbf{b}^T\mathbf{b} }$$

So we have a point on $G$ and on the desired line $H$:

$$\mathbf{c}=\mathbf{a}+\alpha_0\mathbf{b}$$

Then the line $H$ can be parametrized by

$$H: \mathbf{c}+\beta(\mathbf{q}-\mathbf{c})$$


问:
Expected Value of a person to find own seat as on ticket

Given 50 people who bought airplane tickets. There are seats listed on those tickets, but all passengers except the last one sit in a random seat. The last one decides to take the place on the ticket. How many people will change their seat? Find the expected value if the disturbed person has to find their own seat on the ticket

My approach to the above formulation is taking a random variable X which denotes whether the person finds the listed seat on the ticket which is 1 else 0. The last person chooses from remaining 49 seats, thus probability is $\frac{1}{49}$. Now this will displace the person sitting on the random seat so the probability he can choose his correct seat is $\frac{1}{48}$. Now this process can be repeated as it will displace another person and we get $\frac{1}{47}$ which will displace another person and we get $\frac{1}{46}$ and so on. Thus expected value is the summation of all of them = $\frac{1}{49}+\frac{1}{48}+\frac{1}{47}+\frac{1}{46}+...$. This is done so as to find people changing their seat.

Can you please let me know if the approach to the above formulation is correct?

答:
I like solving these kinds of problem as follows.

There are 49 people who sit on 49 seats. Consider the random variables $S_1, \dots, S_{49}$, where $S_i$ equals either 1, if the $i$-th passenger is sitting on his ticket seat, or 0, if he is sitting on another seat.

Unfortunately, these random variables are not independent and working with them is usually a mess.

But what the problem is asking is the expected value of $\sum_{i=1}^{49} S_i$. And the linearity of the expected value doesn't need the independence! So, noting that the probability that a single passenger sits on its own seat is $\frac{1}{49}$ and thus $\mathbb{E}(S_i) = \frac{1}{49} \ \forall i $, we can easily compute

$$ \mathbb{E} \left[ \sum_{i=1}^{49} S_i \right] = \sum_{i=1}^{49} \mathbb{E}[S_i] = \sum_{i=1}^{49} \frac{1}{49} = 1 . $$

Thus, the average number of people who will sit on the right seat is 1 and on average 48 people will need to move.


问:
The asymptotics of the following expression
I wonder the asymptotics of the expression $$\sum_{k=1}^{n} \frac{n!}{kn^k(n-k)!}$$ when $n$ tends to be infinity and don't know how to do it. I have tried Stirling approximation but I think it doens't work. I can figure out that it's in $ O(\log n)$ scale but can't figure out its relation with $ \Theta(\log n / \log\log n)$. Can anybody give a guide on how to get its asymptotics? I conjecture that it doesn't exceed $ \Theta(\log n / \log\log n)$. Thanks a lot for any help!

答:
Rewriting your sum as :
\begin{align}
\tag{1}S(n)&:=\frac {n!}{n^n}\sum_{k=1}^{n} \frac{n^{n-k}}{k\,(n-k)!}\\
&=\frac {n!}{n^n}\sum_{i=0}^{n-1} \frac{n^{i}}{(n-i)\,i!}\\
&=\frac {n!}{n^n}\sum_{i=0}^{n-1} \frac{i^{i}}{(n-i)\,i!}\left(\frac {n}{i}\right)^i\\
&\approx\sqrt{2\pi\,n}\sum_{i=1}^{n-1} \frac{e^{\,i-n}}{(n-i)\,\sqrt{2\pi i}}\left(\frac {n}{i}\right)^i\\
\tag{2}&\approx\sum_{i=1}^{n-1} \frac{e^{\,i-n}}{(n-i)}\left(\frac {n}{i}\right)^{i+1/2}\,=:A(n)\\
\end{align}
Stirling's approximation with the error term $\displaystyle\;  n!\approx\sqrt{2 \pi\,n}\, \left(\frac{n}{e} \right)^n \left( 1 + O \left( \frac{1}{n} \right) \right)$ was used.

Observe that the last term of $A(n)$ is nearly $\dfrac 11$, the previous nearly $\dfrac 12$ and then $\dfrac 13$ and so on so that we obtain 'nearly' a sum of terms $\dfrac 1k$ with an error coefficient of order $\left(1+ O \left( \frac{1}{n-k} \right)\right)\left(1+ O \left( \frac{1}{n} \right)\right)$.

This allows to obtain $\;S(n)-A(n)=O \left( \frac{\log n}{n} \right)$ and thus to study $A(n)$ instead of $S(n)$.

We can't conclude that $\,A(n)\sim H(n)\,$ because the values of the sum is decreasing much faster than $\dfrac 1k$ after "a while". More exactly for $\,k:=n-i\,$ and $\,n\gg 1\,$ the first $k$ terms become :
\begin{align}
b_k&:= \frac{e^{\,-k}}{k}\left(\frac {n}{n-k}\right)^{n-k+1/2}\\
&= \frac{e^{\,-k}}{k}\left(1-\frac kn\right)^{\large{-n\left(1-\frac{k-1/2}n\right)}},\quad\text{expanding }\;\left(1-\frac kn\right)^{-n}\;\text{to second order :}\\
&\approx  \frac{e^{\,-k}}{k}e^{\large{\left(k+\frac{k^2}{2n}\right)\left(1-\frac{k-1/2}n\right)}},\quad\text{neglecting the $\frac 1{n^2}$ terms after simplification :}\\
&\approx  \frac{e^{\large-{\frac{k\,(k-1)}{2\,n}}}}{k}\\
\end{align}

Notice that the exponential will become smaller than $\dfrac 12$ for $\,k\,$ somewhere between $\,\left[\sqrt{n}\right]\,$ and $\,\left[\sqrt{2\,n}\right]\,$ so that  the main term of the asymptotic should rather be $\,\dfrac {\log(n)}2\,$ than $\,\log(n)$.

With some black magic used to get the additional corrective term we will write our new approximation as a series (since $b_k$ is very small for $\,k\ge n\gg 1$) :
$$\tag{3}B(n):=\sum_{k=1}^{\infty}  \frac{e^{\large-{\frac{k\,(k-1)}{2\,n}}}}{k}-\frac 16\sqrt{\frac{\pi}{2\,n}}$$

The interest of the approximations $(2)$ and $(3)$ is that numerical evaluation is much faster with these two sums (as you may see in the table at the end). Further $(3)$ allows to get the asymptotic term with any precision (I got $\dfrac{\gamma+\log(2)}2$) and thus my "final conjecture" with $\gamma$ the Euler–Mascheroni constant :
$$\tag{4} S(n)= \frac{\log(2\,n)+\gamma}2+O\left(\frac 1{\sqrt{n}}\right)$$

Table of values for $\ \displaystyle S(n)-\frac 12 \log(n)\ $ and the corresponding approximations $(2)$ and $(3)$ :
\begin{array} {c|c|c|c}
n&\text{Exact}\;S(n)-\log(n)/2&A(n)-\log(n)/2&B(n)-\log(n)/2\\
\hline
1000& 0.648336893251805&  0.648340255305227& 0.648310001946645\\
10000& 0.639353578731186& 0.639353683741043& 0.639350829257599\\
100000&  0.636501976201853 &  0.636501979510217& 0.636501699321884\\
1000000&-&  0.635599138656474& 0.635599110802617\\
10000000&-& 0.635313528088334& 0.635313525308151\\
100000000&-&  0.635223199313196& 0.635223199035342\\
1000000000&-&  0.635194633766179& 0.635194633738398\\
\infty&-&-& 0.635181422730739\\
\end{array}

(the limits as $\,n\to \infty\,$ should all be equal!)


问:
Integer programming: Minimize objective $\bmod q$
Assume we have the following objective: $$\min \sum_{i=1}^N (a_i x_i \bmod q)$$ subject to a set of constraints, where the $a_i$ are known and we want to solve for the $x_i$. Is it possible to formulate this via integer programming? Or would this not work because $\bmod q$ is a non-linear objective?

答:
Let's start with the first problem -- working modulo $q$, you have infinitely many answers and this set of answers has no minimum.

Consider $2 \pmod{7}$ this is the residue class containing $\{\dots, -19, -12, -5, 2, 9, 16, \dots \}$  Every residue class contains infinitely many members and these collections do not have a minimum.

The usual way to address this is to make a function that takes a residue class and maps it to one of its members.  For instance, define
$$  \left[ a \pmod{b} \right] = \min \left( (a \pmod{b}) \cap \Bbb{Z}_{\geq 0} \right)  \text{,}  $$
the least nonnegative member of the residue class.  Many people think that this is what happens when working "modulo $b$" anyway, so this is a less surprising choice.

However, it is not the only choice.  Sometimes it is preferable to pick the member of the residue class that is closest to $0$, so we would take $5 \pmod{7}$ to $-2$.  Which rule one should pick to go from each residue classes to a representative member of that class depends on what you actually want to compute.

W've made progress, now we are trying to minimze a value instead of select a minimum element of a set.  Do you want to reduce the residue for each summand then add all those representative up, or add up all the residue classes to get a new residue class, then reduce?  (The former can give results much larger than the latter.  Both values are in the same residue class.)
$$  \min \left[ \sum_i (a_i x_i \pmod{q}) \right]  $$
or
$$  \min \sum_i \left[ a_i x_i \pmod{q} \right]  \text{?}  $$
These are not the same thing and the minimum of one is not automatically the minimum of the other.

Having made the above choices, there is now a definite process that produces a definite number that we are trying to minimize.  Now we come to part of your Question: Can we apply integer programming?

Yes, we can.  You seem to have identified "integer programming" with "integer linear programming".  They are not the same thing.  (Although, integer linear programming is already NP-hard, so allowing more complicated objectives or more complicated constraints does not produce systems that are solvable in reasonable time.)  The nonlinear objective ensures this is not an instance of an integer linear programming problem, but it is an integer programming problem.


问:
Probability Cumulative distribution function for exponential distribution?
what is the probability Cumulative distribution function for exponential distribution?

I searched the web a lot but it was strange that no answers were found.

I know that F(t) is the integral of f(t) which means $F(t)=-e^{ \lambda  *t}/{ \lambda}$ is this right?

答:
This can be found in any elementary probability textbook, but anyway:

$$F(x)=\int_{-\infty}^x f(t) dt = \begin{cases} 0 & x \leq 0 \\ \int_0^x \lambda e^{-\lambda t} dt = 1-e^{-\lambda x} & x>0 \end{cases}.$$

Note that there is the $\lambda$ factor on the outside of the PDF. This is a normalization factor, since just $e^{-\lambda x}$ on $[0,\infty)$ isn't normalized unless $\lambda=1$.


问:
Rearranging Cauchy Riemann equations
I've used the Cauchy-Riemann equations to find the analytic function:

$$y^2−x^2−2y+2+i(2x(1−y))$$

But I'm having a slight rearranging problem and need to write it in terms of $z$, where $z=x+iy$.

Any suggestions would be much appreciated

答: Hint:It helps noticing that $z^2=x^2-y^2+2ixy$.

Title: Rearranging Cauchy Riemann equations


问:
How to know if the differential equation have constant solutions when the function vanishes
Suppose the following differential equation: $y'=2y+1$, i know that i can find the constant solutions using the fact that $y=c \iff y' =0, c \in \mathbb{R}$.

But when I use this, there are many cases when replacing by $y' = 0$(or some other higher derivative) the function $y$ is canceled, per example:

$y\cdot y'' = 0$

$y'' \cdot e^y=2$.

In general, $y$ will be canceled if its coefficient is one of its derivatives.

So, in these cases, how can I find the constant solutions?

答:
Well, if the function $y(x)$ is canceled by some derivative, then in the differential equation only constant values and the independent variable will remain.

and it will depend only on whether the equation reduces to an identity. If reduces to identity then there are infinite constant solutions, otherwise there will be zero constant solutions.


问:
Tangential polygons: Conditions on edge lengths?
Given any $L = (\ell_1,\ell_2,\ldots,\ell_n)$ edge lengths, it is possible to
construct a cyclic (inscribed) convex polygon. This can be seen by viewing the
edges are rigid bars and the vertices as universal joints. Then place a polygonal
chain with those lengths in a large-radius circle, and shrink the radius until the
chain closes to a polygon:

However, the same proof idea does not work for tangential polygons.
A tangential polygon (circumscribed)
has each edge tangent to a circle:

(Image by Claudio Rocchini in Wikipedia.)

My question is:

Q. Which length sequences $L = (\ell_1,\ell_2,\ldots,\ell_n)$ can be realized
as the edge lengths of a tangential polygon of $n$ vertices?
In other words, characterize the realizable $L$.

For tangential quadrilaterals, $\ell_1+\ell_3 = \ell_2+\ell_4$, and
this generalizes for all even $n$.
But I am not sure that this necessary condition is also sufficient.
It is for $n=4$, but what is known for even $n$ greater than $4$?
Nor do I know of conditions for odd $n$.

答:
This problem is discussed in Djukić, Janković, Matić, Petrović, The IMO Compendium, pg 561, extracted below.

If the edge lengths satisfy a certain necessary and sufficient condition (basically a sanity check), then (much as for the cyclic polygons described in the question) the corresponding polygon can be found by wrapping the sequence of edges tangentially along an arc of a large circle and then shrinking the circle until the first and last edges meet up.


问:
One sided derivative of the moment generating function
Let $Z$ be a random variable with one-sided heavy tailed distribution, that it, the moment generating function of $Z$ is infinite for every $t<0$, but is finite on interval $[0,z)$ for some $z>0$. In this case, does the moment generating function have one-sided derivative at $0$? If yes, does this derivative is equal to (possibly negative infinite) expectation of $Z$? If yes, reference to a book where this is rigorously proved would be appreciated.

答:
In this case, does the moment generating function have one-sided derivative at 0?

The moment-generating function is convex on its domain of definition (just differentiate twice in the expectation). Its derivative is well-defined on $(0,z)$ and nondecreasing, and thus has a right-limit at $0$. This limit can be finite or infinite.

If yes, does this derivative is equal to (possibly negative infinite) expectation of Z?

Yes. Writing $\psi(t) := \mathbb{E} (e^{tZ})$, for all $t \in (0,z)$,

$$\psi'(t) = \mathbb{E} (Ze^{tZ}) = \mathbb{E} (Z e^{tZ} \mathbf{1}_{Z \leq 0}) + \mathbb{E} (Z e^{tZ} \mathbf{1}_{Z > 0}).$$

Then $\lim_{t \to 0^+} \mathbb{E} (Z e^{tZ} \mathbf{1}_{Z \leq 0}) = \mathbb{E} (Z \mathbf{1}_{Z \leq 0})$ and  $\lim_{t \to 0^+} \mathbb{E} (Z e^{tZ} \mathbf{1}_{Z > 0}) = \mathbb{E} (Z \mathbf{1}_{Z > 0})$, both by the monotone convergence theorem. Finally, their sum is well-defined (potentially $-\infty$) since $Z \mathbf{1}_{Z > 0}$ is integrable, so that

$$\lim_{t \to 0^+} \psi'(t) = \mathbb{E} (Z).$$


问:
Newton's Binomial Theorem with $n<0$
I was watching this video from Veritasium (https://www.youtube.com/watch?v=gMlf1ELvRzc) where one of the points he brings is applying the Binomial Theorem with $n<0$. To clarify:

$$
(1+x)^n = \frac{1}{0!} + \frac{n}{1!}x + \frac{n(n-1)}{2!}x^2 + \frac{n(n-1)(n-2)}{3!}x^3 + \cdots
$$

There is another notation, $(a+b)^n = \sum_{k=0}^n \frac{n!}{k!(n-k)!} a^{n-k}b^k$, but it would only complicate things here.

The argument is that for positive integers $n \in \mathbb{Z}^+$, the sum actually goes on (so it's an infinite series), but at one point, you'd get one term on the numerator that is $(n-n)$ and make every term thereafter equal $0$. However, with negative integer values $n \in \mathbb{Z}_*^-$, you would get an actual infinite series. For instance, for $n=-1$:

$$
(1+x)^{-1} = \frac{1}{0!} + \frac{-1}{1!}x + \frac{-1(-1-1)}{2!}x^2 + \frac{-1(-1-1)(-1-2)}{3!}x^3 + \cdots = 1+(-1)x+1x^2+(-1)x^3+\cdots
$$

Here's my question: But what if, in the example above, $x=1$? Then, my sentence would just look like $1-1+1-1+1-1+1-1+1-1+1-1+\cdots$, which alternates back and forth between 0 and 1. And yet, if you look at the original sentence, $(1+x)^n$, then this should be:

$$
(1+x)^n = (1+1)^{-1} = \frac{1}{2}
$$

So how is this true? Or am I missing something here?

$$
\sum_{a=0}^\infty (-1)^a = \frac{1}{2}
$$

答:
This is known as Grandi's series. It diverges in the usual sense of convergence (limit of partial sums). However, there are other notions of convergence for infinite series that are more forgiving. For example, using Cesàro summation (limit of arithmetic means), it converges to $\tfrac{1}{2}$.

If this bothers you, you're not alone! But rather than fret, consider this: the fact that your intuition about finite things doesn't extend well to infinite things is not the fault of the infinite things.

Divergent series are weird and wonderful! Remember, that despite speaking of the "sum" of an infinite series, there is no such thing. We can only sum a pair of numbers $a_1+a_2$, then by induction and associativity, we can extend that to a sum of a finite series of numbers $a_1 + \cdots + a_n$. But any notion that extends to an infinite series necessarily involves some sort of limiting process, so it's not really a sum. So, we have choices about how we wish to make such a generalization.

Title: Newton's Binomial Theorem with $n<0$


问:
Period of the $p$-adic expansion of a rational number
I have a problem I have been very stuck on.

Show that if $p \nmid n$, then the length of the period [of the expansion of $\frac{a}{n} \in \mathbb Q$] divides $e$, where $e$ is the least positive integer such that $p^e \equiv 1 \pmod n$.

I went to my professor for a hint, and his hint was to write $\frac{a}{n}$ as
$$\frac{a k}{p^e - 1},$$
for some $k \in \mathbb Z$, then multiply both sides of the $p$-adic expansion
$$\frac{a}{n} = \sum_{i = 0}^\infty q_i p^i$$
by $p^e - 1$ and group common powers of $p$. Thus, if $a k < 0$ (I imagine there is a similar argument for $a k \geq 0$ if I can make this one work),
$$-a k = \sum_{i = 0}^{e - 1}q_i p^i + \sum_{i = e}^\infty (q_i - q_{i - e}) p^i,$$
and so if $q_i \geq q_{i - e}$ for all $i \geq e$, then this is the $p$-adic expansion of the non-negative integer $-a k$, which we know to be finite. Thus, $q_i = q_{i - e}$ for sufficiently large $i$, and I'm pretty sure I can show that the period divides $e$ from there. However, I can't figure out the details if there are any $i \geq e$ such that $q_i < q_{i - e}$.

答:
Maybe I am overlooking something, but:

Let's say in your expansion $\displaystyle \sum_{i=0}^\infty q_i p^i$ you choose all $q_i \in \{0,1, ..., p-1\}$. If I understand you correctly, you assume that $-ak \in \mathbb Z_{\ge 0}$, so it has a finite $p$-adic expansion $\sum_{i=0}^m r_i p^i$ ($r_i \in \{0,1, ..., p-1\}$), w.l.o.g. $m \ge e$. Then

$$0 = \sum_{i = 0}^{e - 1}(q_i-r_i) p^i + \sum_{i = e}^m(q_i - q_{i - e}-r_i) p^i + \sum_{i = m+1}^\infty(q_i - q_{i - e})p^i$$

Admittedly the "finite part" $\sum_{i = 0}^{e - 1}(q_i-r_i) p^i + \sum_{i = e}^m(q_i - q_{i - e}-r_i) p^i$ is not in "standard" $p$-adic expansion, and the coefficents might introduce some "carries". I.e. I assume you are worried that this might be something like $\sum_{i=0}^\infty a_i p^i$ with $a_0= p$, $a_1=a_2=... =p-1$ and you cannot conclude about the $q_i - q_{i-e}$ -- correct?

If so, good point. But let's look more closely. Because all $q_i$ and $r_i$ were taken out of $\{0,1, ..., p-1\}$, we actually have  $ p \vert (q_i - r_{i}) \Leftrightarrow q_i = r_i$, and also $ p \vert (q_i - q_{i-e}) \Leftrightarrow q_i = q_{i-e}$. The first relation tells us (by induction) that up to index $e-1$, there are no "carries", and all $q_i-r_i$ are zero.

Now $q_e-q_0-r_e \in \{-2p+2, -2p+3, ...,-p-1, -p, -p+1, ..., 0, ..., p-1\}$.

So for $q_e-q_0-r_e$ to be divisible by $p$ (which it must be so the sum is $0$), it can happen (beside $q_e-q_0-r_e =0$) that $q_e-q_0-r_e = -p$, in which case we would get an extra carry of $-1$. In both cases, note that the term we get at $i=e+1$ after clearing the term at index $e$ is either $q_e-q_0-r_e$ or $q_e-q_0-r_e-1$, which "at worst" is in $\{-2p+\color{red}{1}, -2p+2, ..., p-1\}$, and again the worst that can happen is a carry of $-1$. This iterates all the way to $i=m$.

So at $i=m+1$ we have to look at either $q_i - q_{i-e}$ or $q_i -q_{i-e}-1$. If we're in the first case, there are no carries, and then inductively there will also be no ones ever after, meaning that indeed $q_j = q_{j-e}$ from now on.

Actually, note that as soon as for any index $j$ after $m+1$ there is no carry, then there cannot be a carry ever after, so we're done.

In the second case, we can get a carry, but if and only if $q_i = 0$ and $q_{i-e} = p-1$; and this causes another carry in the next place. Again, to get another carry there, we need $q_{i+1}=0$ and $q_{i+1-e}=p-1$. Iterating this $e$ times, we arrive at $q_{i+e}=0$ and $q_{i+e-e}=p-1$ which contradicts our established $q_i=0$.

The upshot being that "at worst", the carries "wear out" after index $m+1+e$, after which you still have infinitely to go and be periodic.

Added in response to comment: The above proof ends up showing that $q_i = r_i$ for all $i \le e-1$, and also that $q_i = q_{i-e}$ eventually, namely for $i \ge m+e+1$. I do not claim that all the "middle terms" $q_i-q_{i-e}-r_i$ are zero, nor that $q_i\stackrel{?}=q_{i-e}$ right away from $i=m+1$. Indeed, the whole point of us going through all this is that in general, those terms might not be zero. For concrete examples, look at:

Example 1: $a=1-2p, n=p-1$. With $k=1$ we have a period $e=1$, get $r_0=p-1, r_1=1$ and $m=1$, on the other hand $q_0=p-1, q_1=0, q_2=q_3=...=1$. So

$q_0-r_0=0$ but

$q_1-q_0-r_1 = \color{red}{-p}$ and

$q_2-q_1=\color{red}{1}$ (which kills the carry $\color{blue}{-1}$ from before), only then

$q_3-q_2=0$ and likewise $q_i - q_{i-1}=0$ for all $i \ge 3$.

Example 2: $a=1-2p^2, n=p^2-1$. With $k=1$ we have a period $e=2$, get $r_0=r_1=p-1, r_2=1$ and $m=2$, on the other hand $q_0=q_1=p-1, q_2=0,  q_3=q_5=q_7=...=0, q_4=q_6=q_8=q_{10}=...=1$. So

$q_0-r_0=0$ and $q_1-r_1=0$ but

$q_2-q_0-r_2 = \color{red}{-p}$ as well as

$q_3-q_1=\color{red}{1-p}$ (which with the carry $\color{blue}{-1}$ becomes $\color{red}{-p}$, making another carry) and

$q_4-q_2=\color{red}{1}$ (which now gets killed by the carry $\color{blue}{-1}$ from the previous step), only then

$q_5-q_3=0$ and likewise $q_i - q_{i-2}=0$ for all $i \ge 5$.

Exercise: Find more examples.


问:
Proof of Radau IA method being of order 3
I am trying to proof directly that the Radau IA method
\begin{align}
k_1 &= f\left(t_0, x_o+h\left(\frac14 k_1 - \frac14 k_2\right)\right) \\
k_2 &= f\left(t_0+\frac23 h, x_o+h\left(\frac14 k_1 + \frac5{12} k_2\right)\right) \\
x_1 &= x_0 + h\left(\frac14 k_1 + \frac34 k_2\right)
\end{align}
is of order 3 (so the local order of convergence is of order 4).

I think the idea is to compute the derivatives (this is where I am struggeling) of
$$\varphi(h,t,x)=x_0 + h\left(\frac14 k_1 + \frac34 k_2\right)$$
w.r.t $h$ up to order 4 and then using Taylor expansion at $h=0$ and compare it with the expansion of the flow. Is that more or less correct? How do I actually do this? Or is there a better way for a direct proof?

答:
The order conditions for
$$
\begin{array}{c|cc}
c_1 & a_{11}& a_{12}\\
c_2 & a_{21}& a_{22}\\
\hline
& b_1& b_2
\end{array}
~~=~~
\begin{array}{c|cc}
0 & \frac14& -\frac14\\
\frac23 & \frac14& \frac5{12}\\
\hline
& \frac14& \frac34
\end{array}
$$
are
\begin{align}
\text{order 1}\\
1&=b_1+b_2&&=\frac14+ \frac34\\
\hline
\text{order 2}\\
\frac12&=b_1c_1+b_2c_2&&=\frac14·0+ \frac34·\frac23\\
\hline
\text{order 3}\\
\frac13&=b_1c_1^2+b_2c_2^2&&=\frac34·\frac49\\
\frac16&=\sum b_ia_{ij}c_j&&=(b_1a_{12}+b_2a_{22})c_2&&=\left(\frac14·-\frac14+ \frac34·\frac5{12}\right)·\frac23\\
\hline
\text{order 4?}\\
\frac14&\overset{?}{=}\sum b_ic_i^3=\frac34·\frac{8}{27}&&\text{No}\\
\frac18&=\sum b_ic_ia_{ij}c_j\\
\frac1{12}&=\sum b_ia_{ij}c_j^2\\
\frac1{24}&=\sum b_ia_{ij}a_{jk}c_k
\end{align}
So indeed, order 3 holds and in order 4 the interpolation condition can not be satisfied.

So the goal is to get a match for as many terms as possible in $y'=F(y)$,
\begin{multline}
y(x+h)=y(x)+Fh+\tfrac12F'Fh^2+\tfrac16(F''[F,F]+F'F'F)h^3
\\+\tfrac1{24}(F'''[F,F,F]+3F''[F'F,F]+F'F''[F,F]+F'F'F'F)h^4+...
\end{multline}
It seems obvious that some kind of shorthand for the expressions in $F$ is needed. The order of the derivative corresponds to the number of arguments and there is only one function in play, so $F'[F''[F,F]]$ can be conveniently replaced by $[[*,*]]$ or $[[,]]$ or more graphical representations of rooted trees. Order 3 is still low enough that this is not needed, if one were to compute the order 4 error coefficients, this shorthand would substantially reduce space.

The order 1 consistency conditions should be trivial to motivate, so $c_i=\sum a_{ij}$ and $1=\sum b_i$. For the stages one gets implicit equations
\begin{align}
k_i&=F+F'[a_{ij}k_j]h+\tfrac12F''[a_{ij}k_j,a_{il}k_l]h^2+...\\
&=F+a_{ij}F'[k_j]h+\tfrac12a_{ij}a_{il}F''[k_j,k_l]h^2+...
\end{align}
This means that $k_i=F+O(h)$, inserting this gives immediately $k_i=F+c_iF'[F]h+O(h^2)$, and then inserting this
$$
k_i=F+c_iF'[F]h+a_{ij}c_jF'[F'[F]]h^2+\tfrac12c_i^2F''[F,F]h^2+O(h^3)
$$
Now put this into the assembled formula
$$
y_{+1}=y+b_ik_ih=y+Fh+b_ic_iF'Fh^2+b_ia_{ij}c_jF'[F'[F]]h^3+\tfrac12b_ic_i^2F''[F,F]h^3+O(h^4)
$$
Comparing both step-$h$ expressions results in the cited order conditions.


问:
aff S = aff cl S in $R^n$
I need to prove that the set of aff S = aff cl S in $R^n$ under the standard metric.

Definitions :

cl S is the closure of S .

Affinity hull of S is the smallest affine set that contains S. Notation: aff S is the affine hull of S.

My tentative approach:

-> aff S $\subset$ aff cl S.

We know that S is a subset of the closure of S, therefore, by the definition of affine hull, aff S is a subset of aff cl S.

<-  aff cl S $\subset$ aff S.

I am not sure how to do the converse, any help would be appreciated.

答:
This is not, in general, true. For consider the set $X = C^0([0, 1])$ under the $\sup$ norm, and consider $S \subseteq X$, the set of polynomial functions. We see that $S$ is affine, and hence its own affine hull. But the closure of $S$ includes functions which are not in $S$ (such as $f(x) = e^x$), and hence the affine hull of the closure of $S$ also includes these functions. $\DeclareMathOperator{aff}{aff} \DeclareMathOperator{cl}{cl}$

Note: the question has been edited to only concern $S \subseteq \mathbb{R}^n$. In this case, the proof is quite simple. All affine subspaces of $\mathbb{R}^n$ are closed. Therefore, $S \subseteq \cl(S) \subseteq \aff(S)$. Then $\aff(S) \subseteq \aff(\cl(S)) \subseteq \aff(\aff(S)) = \aff(S)$.

Title: aff S = aff cl S in $R^n$


问:
Can each edge of a Wythoffian polytope be flipped by a reflection?
A Wythoffian polytope $P\subset\Bbb R^d$ is an orbit polytope of a finite reflection group, that is,

$$P:=\mathrm{Orb}(\Gamma,x):=\mathrm{conv}\{Tx\mid T\in\Gamma\},$$

where $\Gamma$ is a finite reflection group, and $x\in\Bbb R^d$.

Question: Is it true, that if $e$ is an edge of $P$, then there is a reflection $T\in\Gamma$ that fixes $e$ set-wise but flips its orientation?

I am pretty sure that this is true, but I cannot find a concise proof from first principles. I would be most happy with a short self-contained argument (possibly using some well-known properties of reflection groups).

Partial proof

Suppose that the generator $x\in\Bbb R^d$ was chosen from the interior of a Weyl chamber of $\Gamma$ (the resulting polytope is sometimes called a $\Gamma$-permutahedron or omnitruncated uniform polytope). Since $\Gamma$ acts regularly on the Weyl chambers, every Weyl chamber contains a single vertex. In particular, if $e$ is an edge of $P$, its end vertices are in different chambers and the edge must cross a bounding reflection hyperplane of the chamber. Since reflection on this hyperplane is a symmetry of $P$, the edge must be perpendicular to the hyperplane and the reflcetion on it must flip its orientation.

My hope is that this can be extended to an argument for general placements of $x$.
Each Wythoffian polytope can be obtained as a "limit" (in some sense) of such $\Gamma$-permutahedra, and maybe this sufficec to prove the statement. However, I was not able to make a clear case for why the edges of the resulting polytope are "limits" of edges of the $\Gamma$-permutahedra.

答:
Suppose $W$ is a fundamental domain of $\Gamma$, and $v \in W$ is a seed vertex.

By vertex transitivity, every edge of $P$ is $\gamma e$ for some edge $e$ incident to $v$ and some $\gamma \in \Gamma$, and if $e$ is bisected by a reflection $T \in \Gamma$,
then $\gamma T \gamma^{-1}$ is a reflection bisecting $\gamma e$.
In fact, every edge is the image of an edge leaving $v$ and passing through $W$, by the nature of the fundamental domain (possibly along part of the boundary of $W$.)

The other endpoint of $e$ cannot be in $W$, not even on its boundary,
because each point of $P$ is the image of exactly one point in the fundamental region. (Wikipedia cites Hall, Brian C. (2015), Lie Groups, Lie Algebras, and Representations: An Elementary Introduction, Proposition 8.29 for this fact.)

At the point where the edge $e$ leaves $W$, it passes through a bounding reflection of $W$.
This reflection must carry $e$ onto some edge of $P$, and since it fixes one point in $e$, it must carry $e$ to itself.


问:
Present values of two perpetuities
I have two perpetuities:

Pays $1$ at the beginning of every year

Pays $1.8$ at the beginning of every odd year

I have to show which one is more profitable if $i=0.05$. I calculated present value of each of them. For the first one we have:
$$PV_1=\frac{1}{d}=21$$
For the second one:
$$PV_2=\sum_{k=0}^\infty 1.8\cdot v^{2k+1}=1.8\cdot\frac{v}{1-v^2}\approx18.45$$
I'm not sure about the second one though. Is that correct? I see this as the cash flow of $1.8$ for odd $t$ and $0$ for even $t$.

答:
The value for $PV_1$ is correct.

The beginning of an odd year coincides with the end of an even year, so the correctly discounted cash flow in the second case is, with $v = (1.05)^{-1}$,

$$PV_2 = \sum_{k=0}^\infty 1.8 \cdot v^{2k} = \frac{1.8}{1- v^2} \approx 19.36 $$

Title: Present values of two perpetuities


问:
Generalizing Stewart's theorem to timelike triangles in Lorentzian spaces of constant curvature
Stewart's theorem describes the length relations of the sides of a triangle and any one of its cevians in flat space ($n$-dimensional Euclidean space), and also in flat spacetime ($1 + n$-dimensional Minkowski space).

With names assigned as in the Wikipedia figure: $a, b, c$ (for the lengths) of triangle sides, $d$ of a cevian between side $a$ and the opposite vertex, and $n, m$ for the resulting segments of side $a$, Stewart's theorem is stated as

$$ b^2 \, m + c^2 \, n = a \, (d^2 + m \, n ),$$

of course together with

$$ a = n + m; $$

where in application to Minkowski space the squares of lengths are understood as suitably signed values of spacetime intervals $s^2$, and the "plain" lengths as correspondingly signed square roots $\text{Sgn}[ s^2 ] \, \sqrt{ s^2 \, \text{Sgn}[ s^2 ] }$.

I'm interested in corresponding relations of (suitably generalized) lengths, or in other words: in generalizations of Stewart's theorem, for triangles and their cevians in spaces and in (Lorentzian) spacetimes of constant curvature $k$; especially for their roles as model triangles in the characterization of $\text{CAT}[ \, k \, ]$ spaces by triangle comparison.
(See also M. Kunziger, C. Sämann, "Lorentzian length spaces" (math:1711.08990), sect. 4.)

In spherical geometry the generalization is readily gotten; cmp. "Stewart theorem validity on a sphere" (mse/q/3696576). Assigning names of lengths again as above, together with $\theta$ and $\theta^{\prime}$, respectively, for the complementary angles along side $a$ of cevian $d$, opposite side $c$ and opposite side $b$, we have

$$
\begin{align*}
\text{Cos}[ \, \theta \, ] \, \text{Sin} \! \! \left[ \, \frac{\sqrt{ k } \, d}{2 \, \pi} \, \right] &= \frac{\text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, d}{2 \, \pi} \ \right] \, \text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, m}{2 \, \pi} \, \right] \, - \, \text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, c}{2 \, \pi} \ \right]}{\text{Sin} \! \left[ \, \frac{\sqrt{ k } \, m}{2 \, \pi} \, \right]_{\phantom{y}}} & \\  &= \frac{\text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, b}{2 \, \pi} \ \right] \, - \, \text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, d}{2 \, \pi} \ \right] \, \text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, n}{2 \, \pi} \ \right]}{\text{Sin} \! \! \left[ \, \frac{\sqrt{ k } \, n}{2 \, \pi} \, \right]} &= -\text{Cos}[ \, \theta^{\prime} \, ] \, \text{Sin} \! \! \left[ \, \frac{\sqrt{ k } \, d}{2 \, \pi} \, \right]
\end{align*}
$$

and therefore

$$
\begin{align}
 & \text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, b}{2 \, \pi} \ \right] \, \text{Sin} \! \! \left[ \, \frac{\sqrt{ k } \, m}{2 \, \pi} \ \right] + \text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, c}{2 \, \pi} \ \right] \, \text{Sin} \! \! \left[ \, \frac{\sqrt{ k } \, n}{2 \, \pi} \ \right] = \\  & \text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, d}{2 \, \pi} \ \right] \, \left(
\text{Sin} \! \! \left[ \, \frac{\sqrt{ k } \, n}{2 \, \pi} \ \right] \, \text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, m}{2 \, \pi} \ \right] + \text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, n}{2 \, \pi} \ \right] \, \text{Sin} \! \! \left[ \, \frac{\sqrt{ k } \, m}{2 \, \pi} \ \right] \right) = \\
 & \text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, d}{2 \, \pi} \ \right] \, \text{Sin} \! \! \left[ \, \frac{\sqrt{ k } \, a}{2 \, \pi} \ \right].
\end{align}
$$

(Expanding the trigonometric functions in $\sqrt{ k } \ne 0$, terms up to second order cancel, the terms of third order sum up to being proportional to the above statement of Stewart's theorem, and remaining terms are of order five and higher.)

My question:

What are corresponding expressions, generalizing Stewart's theorem, for Lorentzian spaces of constant nonzero curvature ?

Note: Since generalized metric relations in Lorentzian spaces, a.k.a. spacetimes, $\mathcal S$, are often expressed in terms of Lorentzian distance$ \, \lambda : \mathcal S \times \mathcal S \rightarrow \{ \mathbb R_{(\ge 0)} \cup \infty \}$, which are strictly zero for all but timelike related pairs of events, the relations being sought may apply only to timelike triangles, i.e. with all sides being timelike, and their timelike or lightlike cevians.

答:
My answer relies on certain formulas gathered from a proceedings article by Mariano Santander,

"The Hyperbolic-AntiDeSitter-DeSitter triality", Pub. de la RSME, Vol. 5 (2003), 247.

(Therefore my answer is not self-contained, unfortunately.)

As far as I understand, Santander's article identifies the relevant Lorentzian spaces of constant curvature as either "AntiDeSitter sphere", $\bf \text{AdS}^{1+1}$, or as "DeSitter sphere", $\bf \text{dS}^{1+1}$, in $1+1$ dimensions.

(In passing, Santander also provides corresponding "mathematical notation" for these spaces, namely $\bf \text{H}^2_1$ and $\bf \text{S}^2_1$, resp., which in turn appears to reasonably match the notation used for the model spaces of constant nonzero curvature in section 4.2 of the article by M. Kunziger, C. Sämann, "Lorentzian length spaces", linked in the OP question above.)

For these two spaces, Santander provides general cosine theorems in sect. 4 (however, without providing any explicit derivation I could recognize and reproduce). In terms of the notation of the OP question, where $a, b$ and $c$ are the names of the sides of a triangle and also stand for the corresponding values of Lorentzian distances, such that generally

$$ a \gt b + c, $$

$m$ and $n$ stand for the names of two segments of side $a$, as well as for the corresponding values of Lorentzian distances, whereby

$$ a = m + n, $$

and $d$ stands for the name as well as the value of Lorentzian distance of the cevian onto side $a$, whose footpoint separates $a$ into segments $n$ (complementing $b$) and $m$ (complementing $c$), such that (as one of two a special cases) generally

$$ b \gt n + d $$

(along with $ m \gt d + c$), these general cosine theorems can be specificly interpreted for instance

for the "AntiDeSitter sphere":

$$ \text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, c}{2 \, \pi} \ \right] = \text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, a}{2 \, \pi} \ \right] \, \text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, b}{2 \, \pi} \ \right] - \text{Sin} \! \! \left[ \, \frac{\sqrt{ k } \, a}{2 \, \pi} \ \right] \, \text{Sin} \! \! \left[ \, \frac{\sqrt{ k } \, b}{2 \, \pi} \ \right] \, \text{Cosh}[ \, \angle^b_a \, ], \tag{1} \label{eq:1} $$

and

$$ \text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, d}{2 \, \pi} \ \right] = \text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, b}{2 \, \pi} \ \right] \, \text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, n}{2 \, \pi} \ \right] - \text{Sin} \! \! \left[ \, \frac{\sqrt{ k } \, b}{2 \, \pi} \ \right] \, \text{Sin} \! \! \left[ \, \frac{\sqrt{ k } \, n}{2 \, \pi} \ \right] \, \text{Cosh}[ \, \angle^b_n \, ], \tag{2} \label{eq:2} $$

or for the "DeSitter sphere":

$$ { \small \text{Cosh} \! \! \left[ \, \frac{\sqrt{ k } \, c}{2 \, \pi} \ \right] = \text{Cosh} \! \! \left[ \, \frac{\sqrt{ k } \, a}{2 \, \pi} \ \right] \, \text{Cosh} \! \! \left[ \, \frac{\sqrt{ k } \, b}{2 \, \pi} \ \right] + \text{Sinh} \! \! \left[ \, \frac{\sqrt{ k } \, a}{2 \, \pi} \ \right] \, \text{Sinh} \! \! \left[ \, \frac{\sqrt{ k } \, b}{2 \, \pi} \ \right] \, \text{Cosh}[ \, \angle^b_a \, ],} \tag{3} \label{eq:3} $$

and

$$ { \small \text{Cosh} \! \! \left[ \, \frac{\sqrt{ k } \, d}{2 \, \pi} \ \right] = \text{Cosh} \! \! \left[ \, \frac{\sqrt{ k } \, b}{2 \, \pi} \ \right] \, \text{Cosh} \! \! \left[ \, \frac{\sqrt{ k } \, n}{2 \, \pi} \ \right] + \text{Sinh} \! \! \left[ \, \frac{\sqrt{ k } \, b}{2 \, \pi} \ \right] \, \text{Sinh} \! \! \left[ \, \frac{\sqrt{ k } \, n}{2 \, \pi} \ \right] \, \text{Cosh}[ \, \angle^b_n \, ]. } \tag{4} \label{eq:4} $$

In any case, by construction, $\angle^b_n \equiv \angle^b_a$. Eliminating $\text{Cosh}[ \, \angle^b_n \, ] = \text{Cosh}[ \, \angle^b_a \, ]$ from equations $(\ref{eq:1})$ and $(\ref{eq:2})$ we have

$$ { \small \left( \text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, a}{2 \, \pi} \, \right] \, \text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, b}{2 \, \pi} \, \right] - \text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, c}{2 \, \pi} \, \right] \right) \, \text{Sin} \! \! \left[ \, \frac{\sqrt{ k } \, n}{2 \, \pi} \, \right] = \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad } \\
{ \small \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \left( \text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, b}{2 \, \pi} \, \right] \, \text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, n}{2 \, \pi} \, \right] - \text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, d}{2 \, \pi} \ \right] \right) \, \text{Sin} \! \! \left[ \, \frac{\sqrt{ k } \, a}{2 \, \pi} \, \right].} $$

Inserting $a = m + n$ this reduces to

$$ { \small \text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, d}{2 \, \pi} \, \right] \, \text{Sin} \! \! \left[ \, \frac{\sqrt{ k } \, a}{2 \, \pi} \ \right] = \text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, b}{2 \, \pi} \, \right] \, \text{Sin} \! \! \left[ \, \frac{\sqrt{ k } \, m}{2 \, \pi} \, \right] + \text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, c}{2 \, \pi} \, \right] \, \text{Sin} \! \! \left[ \, \frac{\sqrt{ k } \, n}{2 \, \pi} \, \right]. } \tag{5} \label{eq:5} $$

Likewise Eliminating $\text{Cosh}[ \, \angle^b_n \, ] = \text{Cosh}[ \, \angle^b_a \, ]$ from equations $(\ref{eq:3})$ and $(\ref{eq:4})$ gives

$$\small \left( \! \text{Cosh} \! \! \left[ \, \frac{\sqrt{ k } \, a}{2 \, \pi} \, \right]  \text{Cosh} \! \! \left[ \, \frac{\sqrt{ k } \, b}{2 \, \pi} \ \right] - \text{Cosh} \! \! \left[ \, \frac{\sqrt{ k } \, c}{2 \, \pi} \, \right] \right)  \text{Sinh} \! \! \left[ \, \frac{\sqrt{ k } \, n}{2 \, \pi} \, \right] = \qquad \qquad  \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \\
 \small \qquad \qquad \qquad \qquad \qquad \qquad
\left( \! \text{Cosh} \! \! \left[ \, \frac{\sqrt{ k } \, b}{2 \, \pi} \, \right] \text{Cosh} \! \! \left[ \, \frac{\sqrt{ k } \, n}{2 \, \pi} \, \right] - \text{Cosh} \! \! \left[ \, \frac{\sqrt{ k } \, d}{2 \, \pi} \, \right] \right) \text{Sinh} \! \! \left[ \, \frac{\sqrt{ k } \, a}{2 \, \pi} \, \right]. $$

Again inserting $a = m + n$ leaves

$$ { \small \text{Cosh} \! \! \left[ \, \frac{\sqrt{ k } \, d}{2 \, \pi} \ \right] \, \text{Sinh} \! \! \left[ \, \frac{\sqrt{ k } \, a}{2 \, \pi} \ \right] = \text{Cosh} \! \! \left[ \, \frac{\sqrt{ k } \, b}{2 \, \pi} \ \right] \, \text{Sinh} \! \! \left[ \, \frac{\sqrt{ k } \, m}{2 \, \pi} \ \right] + \text{Cosh} \! \! \left[ \, \frac{\sqrt{ k } \, c}{2 \, \pi} \ \right] \, \text{Sinh} \! \! \left[ \, \frac{\sqrt{ k } \, n}{2 \, \pi} \ \right]. } \tag{6} \label{eq:6} $$

Equations $(\ref{eq:5})$ and $(\ref{eq:6})$ are obviously equivalent, since
$\text{Cosh}[ \, i \, z \, ] = \text{Cos}[ \, z \, ]$ and $\text{Sinh}[ \, i \, z \, ] = i \, \text{Sin}[ \, z \, ]$ for complex numbers $z$. (Of course, such equivalence also applies to begin with between equations $(\ref{eq:1})$ and $(\ref{eq:3})$, and between equations $(\ref{eq:2})$ and $(\ref{eq:4})$, resp.)

The generalization of Stewart's theorem to Lorentzian spaces, as a formula in terms of Lorentzian distances (of timelike triangles and their timelike or lightlike caveans), is therefore formally equal to its generalization to spherical geometry, as stated in the OP question.

Note on further generalization and a special case:

The derived formula $(\ref{eq:5}, \ref{eq:6})$ may not only apply to strictly timelike triangles (and their timelike or lightlike cevians) but for instance also to triangles which have two timelike and one lightlike side, say $c = 0$, whereby $\text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, c}{2 \, \pi} \ \right] = 0$.

Moreover specifying the cevian as lightlike as well, i.e. $d = 0$, equation $(\ref{eq:5})$ simplifies to

$$ \text{Sin} \! \! \left[ \, \frac{\sqrt{ k } \, a}{2 \, \pi} \ \right] = \text{Cos} \! \! \left[ \, \frac{\sqrt{ k } \, b}{2 \, \pi} \ \right] \, \text{Sin} \! \! \left[ \, \frac{\sqrt{ k } \, m}{2 \, \pi} \ \right] + \text{Sin} \! \! \left[ \, \frac{\sqrt{ k } \, n}{2 \, \pi} \ \right]. \tag{7} \label{eq:7} $$

Again inserting $a = m + n$ and expanding the trigonometric functions in terms of $\sqrt{ k } \ne 0$, terms up to second order cancel, and the terms of third order sum up to being proportional to

$$ b^2 = a \, n, $$

i.e. corresponding to a well-known relation in flat spacetime which in some instances seems to have been misattributed to "Robb, 1936", at least a version of which has however been presented by A. A. Robb, 1911, already.


问:
General derivative of a polynomial
Is the following correct?

$$\frac{d^n}{dx^n} \sum_{k=0}^m a_k x^k = \sum_{k=0}^m \frac{\Gamma(k+1)}{\Gamma(k-n+1)} a_k x^{k-n} \quad n \in \mathbb{N}$$

Obviously this encounters $\frac{1}{\Gamma(1-n)}$ which should be zero for the formula to work and indeed

$$\lim \limits_{x \to n} \frac{1}{\Gamma (1-n)} = 0$$

but is this enough to make the formula rigorous or are there other flaws?

答:
The gamma function has poles at zero and the negative integers and $\frac{1}{\Gamma(x)}$ is an entire function with zeros at these points. This makes the representation below valid.
\begin{align*}
\frac{d^n}{dx^n} \sum_{k=0}^m a_k x^k = \sum_{k=0}^m \frac{\Gamma(k+1)}{\Gamma(k-n+1)} a_k x^{k-n} \quad m, n \in \mathbb{N}
\end{align*}

Nevertheless we can do the same job with simpler means, since we have for $m,n$ non-negative integers:
\begin{align*}
\frac{d^n}{dx^n} \sum_{k=0}^m a_k x^k&=\sum_{k=0}^ma_k\frac{d^n}{dx^n}x^k\\
&=\sum_{k=0}^ma_k \color{blue}{k^{\underline{n}}}x^{k-n}
\end{align*}
where $k^{\underline{n}}=k(k-1)\cdots (k-n+1)$ denotes the falling factorial.

Title: General derivative of a polynomial


答:
Introduce integer variables $q_i$ and $r_i$ to represent the quotient and remainder, respectively.  Now minimize $\sum_i r_i$ subject to linear constraints
\begin{align}
a_i x_i &= q \cdot q_i + r_i \\
q_i &\ge 0 \\
0 \le r_i &\le q - 1
\end{align}
and your other constraints.

For your modified objective, instead introduce integer variables $q_0$ and $r_0$ to represent the quotient and remainder, respectively.  Now minimize $r_0$ subject to linear constraints
\begin{align}
\sum_i a_i x_i &= q \cdot q_0 + r_0 \\
q_0 &\ge 0 \\
0 \le r_0 &\le q - 1
\end{align}
and your other constraints.

Title: Integer programming: Minimize objective $\bmod q$

Body: Assume we have the following objective: $$\min \sum_{i=1}^N (a_i x_i \bmod q)$$ subject to a set of constraints, where the $a_i$ are known and we want to solve for the $x_i$. Is it possible to formulate this via integer programming? Or would this not work because $\bmod q$ is a non-linear objective?


问:
find density function of Z = (X - 1)^2 when X is a exponential distribution
let X be an exponential distribution with lambda as parameter and want to find the density function of $Z = (X - 1)^2$

I tried that: $F(Z) = P(Z < z) = P((X - 1)^2 <z)= P(1 - \sqrt{z} < x < 1 + \sqrt{z})$

for the next part, do I have to assume that $\sqrt{z}$ is greater than one or we have to determine for both cases?

of $\sqrt{z} > 1$: $F(Z) = P(X < \sqrt{z}+1)$ since exponential distribution have x always greater than 0.

if $\sqrt{z} < 1$: $F(Z) = P(1 - \sqrt{z}< x < 1 + \sqrt{z})$

and then find the pdf?

thank you!

答:
For finding the PDF of Y, given PDF of X, where $Y=g(X)$, we can use the following formula:

$$f_Y(y) = f_X(g^{-1}(y))|\frac{d}{dy}g^{-1}(y)|$$

see this paper.

In this case, $g(x) = (x-1)^2$, which is decreasing for $x < 1$ and increasing for $x > 1$. $g^{-1}(x) = \sqrt{x} + 1$.  And $Z = g(X)$. The rest should be easy.


问:
Step missing in the proof of $\mathbb{R}$ being uncountable.
Today I saw the proof of the uncountability of $\mathbb{R}$, where given  a list of all elements of $\mathbb{R}$, we produce an element not in the list by requiring that its $n$-th digit is different from the $n$-th digit of the $n$-th element of the list. Since it has different decimal expansion from every element in the list, it can't be on the list. I think this last statement is actually wrong since in $\mathbb{R}$ one number can have more than one decimal expansion. So even if the decimal expansion of the newly generated element differs from those of the elements on the list, this doesn't mean that the element is not in the list.

Am I right? and if so, how can the argument be fixed?

答:
you are right, but it's not enough to invalidate the proof and it is fixable.

The only real numbers with two different decimal expansions are those that can be written with an infinite number of $9$s at the end or those that can be written with an infinite number of $0$s at the end.  (All give an argument why at the end of this post).

So creating the element that will not be on the list replace the $n$ digit of the $n$ item with a different digit.  But a different digit that is not a $9$ or a $0$.

Alternatively we could insist that when we express a number in decimal, if it has two representations we always use the one with infinite $0$s. And we replaces $0$s with  $1$s and we won't have the issue.

=======

Okay, why are infinite $0$s at the end or infinite $9$s the only two cases where a real number has two decimal extensions?

The way we figure out decimal expansions is that we have a real $x$ and we have calculated $x'$ which is $x$ up to $k$ decimal spaces.  Now there is a $d \in \{0,1,2,3,4....,9\}$ so that $d\cdot \frac 1{10^k} \le x-x' \le d+1 \cdot \frac 1{10^k}$

The idea is that we pick our $k$th decimal as $d$ and let $x" = x' + d\times 1{10^k}$ and then continue along by figuring what digit we have $d_{k+1} \cdot \frac 1{10^{k+1}} \le x-x" \le d_{k+1}\times \frac 1{10^{k+1}}$ and we do that forever....

Now if $d\cdot \frac 1{10^k} < x-x' < d+1 \cdot \frac 1{10^k}$ we have no choice but to select $d$ as our $k$ decimal digit.

But if $x-x' = m\times \frac 1{10^k}$ exactly for an integer we will have $(m-1)\cdot \frac 1{10^k} \le (m\cdot \frac 1{10^k}= x-x') \le (m+1)\cdot \frac 1{10^k}$ and we have two choices for our $k$th decimal digit: We could pick $m$ (and that's the reasonable choice) or we could pick $m-1$ (a weird choice but a legal one).

If we pick $m$ as our $k$th decimal, then  $x" = x' + m\times \frac 1{10^k} = x$ and $x-x" = 0$ and we will get $0$ for all the rest of the digits.

If we pick $m-1$ as our $k$th decimal, then $x" = x' + (m-1)\times \frac 1{10^k} = x-\frac 1{10^k}$ and $x-x" = \frac 1{10^k}$ and when we do $d_{k+1}\times 10^{k+1}\le x-x" \le (d_{k+1}+1)\times \frac 1{10^{k+1}}$ and $d_{k+1} = 0,1,2,3,...,9$ we will have no choice but $d_{k+1} =9$ and we will get $9$s for the rest of the digits.

And those are the only ambiguities and the only way we get two decimal representations.

.....

Post script:

If we start with a real number $x$ and try to construct a decimal expansion from  a real number via rounding down then every real number will only have one decimal expansion and we will never get a decimal expansion with infinite $9$s at the end.

The only reason we have to worry about decimal expansions with infinite $9$s at the end, is that if we start with a decimal expansion first, and try to calculate which real number it is from the decimal expansion we could be given an expansion with an infinite number of $9$s at the end.  We could be given that and we have to figure what then?

But if that happens we discover that this is just the same as if we had taken the very last non-$9$ and added one to it and then continued with an infinite number of $0$.


问:
Partition of sum of two bounded functions
Following my previous question about Riemann-Stieltjes integration, I'm asking this problem.

Let $f_1$ and $f_2$ be bounded on $[a,b]$ and $\alpha$ is increasing on $[a,b]$. Define $f = f_1 +f_2$. Either prove the statements or give a counterexample to show that the given statements are false:

$1.$ $U(P,f,\alpha) \le U(P,f_1,\alpha) + U(P,f_2,\alpha)$

$2.$ $L(P,f,\alpha) \le L(P,f_1,\alpha) + L(P,f_2,\alpha)$

My try: The first statement is correct. We know that $$U(P,f,\alpha) = \sum_{i =1}^{n} M_i \Delta \alpha_i , \ M_i = \sup\{f(x):x\in [x_{i-1}, x_i]\} \\ U(P,f_1,\alpha) = \sum_{i =1}^{n} N_i \Delta \alpha_i , \ N_i = \sup\{f_1(x):x\in [x_{i-1}, x_i]\} \\ U(P,f_2,\alpha) = \sum_{i =1}^{n} Q_i \Delta \alpha_i , \ Q_i = \sup\{f_2(x):x\in [x_{i-1}, x_i]\}$$ So we have $$U(P,f_1,\alpha) + U(P,f_2,\alpha) = \sum_{i =1}^{n} N_i \Delta \alpha_i + \sum_{i =1}^{n} Q_i \Delta \alpha_i = \sum_{i =1}^{n} (N_i+Q_i) \Delta \alpha_i \ge \sum_{i =1}^{n} M_i \Delta \alpha_i = U(P,f,\alpha)$$ The inequality comes from the fact $$\sup(A+B)\le \sup(A) + \sup(B)$$
The second one is false. Let $f_1 = x$ and $f_2 = -x$ and $a = 0,b=2, P = \{0,1,2\}$. Therefore $$L(P,f_1,\alpha) = 1,L(P,f_1,\alpha) = -3 \\ L(P,f,\alpha) = 0$$ Obviously $0 \not \le -2$ and this is false.

Is my answer correct? If not please explain why.

答:
Your counterexample for case (2) is correct.

More generally for any interval $I$ we have for all $x \in I$,

$$\inf_{x \in I} f_1(x) + \inf_{x \in I} f_2(x) \leqslant f_1(x) + f_2(x) = f(x),$$

which implies

$$\inf_{x \in I} f_1(x) + \inf_{x \in I} f_2(x) \leqslant \inf_{x \in I}f(x), \\L(P,f_1,\alpha) + L(P,f_2,\alpha) \leqslant L(P,f,\alpha)$$

Together the inequalities

$$L(P,f_1,\alpha) + L(P,f_2,\alpha) \leqslant L(P,f,\alpha) \leqslant  U(P,f,\alpha)\leqslant U(P,f_1,\alpha) + U(P,f_2,\alpha)$$

can be used to prove that if $f_1$ and $f_2$ are Riemann-Stieltjes integrable, then so is $f = f_1+f_2$.  The converse is not true and this is connected to the fact that the reverse of the LHS inequality is false.


问:
Proof for a triple composition chain rule
Assuming that $f,g,h$ are all differentiable throughout $\mathbb{R}$, what is the chain rule for $(h \circ g \circ f) (x)$ and the proof for it?

I know that first $(g \circ f)'(x) = g'(f(x))f'(x)$. Is it just applying this rule twice? Then how would one state a proof for such a formula?

答:
You can use associativity:

$$
(h \circ g \circ f)'(x)=(h \circ (g  \circ f))'(x)=h'((g \circ f)(x))\cdot (g\circ f)'(x)
$$
Now $(g \circ f)'(x)=g'(f(x))\cdot f'(x)$ and therefore
$$
(h \circ g \circ f)'(x)=h'((g \circ f)(x))\cdot g'(f(x))\cdot f'(x)
$$


问:
Showing that $a^{12}\equiv 1\pmod{210}$ if $a$ is coprime to $210$
I ran into this next question:

Show that if $a$ is coprime to $210$:

$a^{12}\equiv1 \pmod{210}$.

This is not a homework question.

Thank you very much in advance,

Yaron

答: Since you have to consider only $a$ modulo $210$, you is only a finite number of case to check. And since it is not a homework, everybody will trust you if you claim you used your computer.</p>


问:
Creating sets of $4$ elements such that no two sets share $3$ elements

The city of Mathlandia has $10$ politicians. Let $S$ denote the set containing all $\dbinom{10}{4}$ possible groups of $4$ of politicians.

Denote a subset, $M$, of $S$, as special if no two elements of $4$ politicians in $M$ share $3$ politicians. For example, if we label the politicians, $1, 2, 3, \cdots, 10$, then the subset: $\{ (1, 2, 3, 4), (2, 3, 5, 6) \}$ is special but the subset $\{(1, 3, 4, 10),  (1, 3, 6, 9), (2, 3, 4, 10) \}$ is not because elements $1$ and $3$ share $3, 4, 10$.

What is the maximal size of a special subset?

My Understanding

This problem is similar to this: Largest set of 4 digit codes that do not share 3 digits

However, what makes it different is that the digit $0$ is not allowed, order does not matter, and we cannot put the same number twice in a set of $4$ politicians (we need $4$ distinct politicians).

Due to these distinctions, I was unable to use Mike Earnest's solution to the linked problem. Does anyone know how to solve it?

How could we generalize for $n$ politicians? Is there some clean combinatorial method?

My Current Idea for Solution: Why Is this Wrong?

There are $\dbinom{10}{3} = 120$ sets of $3$ politicians.

Each set of $4$ politicians in $M$ contains $4$ different of $3$ politicians. So, the total number of sets of $4$ must be $\frac{120}{4} = 30$.

I checked this via a Java code and saw that the answer of $30$ is incorrect: it should actually be $18$.

Furthermore, if we try another number instead of $10$, for example $6$, this solution gives $5$ sets of $4$. However, the maximal amount of sets is $3$ : $$(1234), (1256), (3456)$$

For $n = 5$, we don't even get an integer. We get $2.5$. What incorrect assuption is this solution making?

答:
You can solve the problem via integer linear programming as follows.  For each 4-subset $A\in S$, let binary decision variable $x_A$ indicate whether $A\in M$.  The problem is to maximize $\sum_A x_A$ subject to "conflict" constraints
$$x_A + x_B \le 1 \text{ for all $A,B$ such that $|A \cap B| \ge 3$} \tag1$$
Constraint $(1)$ prevents selecting both $A$ and $B$.

A stronger formulation is to replace $(1)$ with "clique" constraints
$$\sum_{A \supset B} x_A \le 1 \text{ for all $B$ such that $|B| = 3$} \tag2$$
Constraint $(2)$ prevents selecting more than one subset that contains the same 3-subset.

In either case, the maximum turns out to be 30, as found by @MikeEarnest.


问:
Solution to $y'(x) + \frac{1}{2}y(x) = \frac{1}{2}(x -1) y^3(x)$
I am trying to solve the following differential equation:

$$y'(x)+\frac12y(x)=\frac12(x-1)y^3(x)$$

I realize it's a Bernoulli diff. equation so i used the substitution: $z = \frac{1}{y^2}$

and I come up with the equation: $-zz' + z = x -1$ , which I have tried to solve using the variation of parameters method and my homogenous solution to $-zz' + z= 0$ is $z=x + C$ with $C$ a constant. I do not know which function to use for the variation of parameters method as I have tried using $z= (x + C)u(x)$ and the whole thing becomes a mess, I want help on what step to take if I am to use the method of variation of parameters given my progress.

答:
$$-zz' + z = x -1$$
You have an extra $z$. It should be: $$-z' + z = x -1$$
Then use $\mu( x)=e^{-x}$ as an integrating factor:
$$(ze^{-x})'=(1-x)e^{-x}$$
Integrate.


问:
Why do you have to begin with the largest angle or side when using law of cosines
Explain why you should always start with the largest angle or the largest side when using law of cosines. I don't understand why but my professor says so.</p>

答:
The key word in understanding the original question is "start".

The poster isn't running the Law of Cosines to find just one value.  His professor is referring to solving a SSS triangle.

If you "start" by finding the smallest angle (across from the shortest side) you will be creating an ambiguous situation for yourself if you try to use the Law of Sines to find your second angle.

However, if you "start" by finding the largest angle (across from the longest side), you are guaranteed to not have an ambiguous situation when you run a Law of SInes for your second angle.

If you are solving a SAS triangle, you're forced to start with the angle you have.  Once you find it's opposite side, you will be faced with 1 of 3 situations as you go to run a Law of Sines for your second angle.

The new side is the largest.  You will not have an ambiguous situation.

The new side is the middle side.  Find the smallest angle next to avoid an ambiguous situation.

The new side is the shortest.  You will have an ambiguous situation.


问:
Prove area of Koch snowflake by mathematical induction
Here is an interesting construction of a geometric object known as the Koch snowflake.
Define a sequence of polygons $S_0$, $S_1$ recursively, starting with $S_0$ equal to an equilateral triangle with unit sides. We construct $S_{n+1}$ by removing the middle third of each edge of $S_n$ and replacing it with two line segments of the same length.

Let $a_n$ be the area of $S_n$. Observe that $a_0$ is just the area of the unit equilateral triangle which by elementary geometry is $\frac{\sqrt{3}}{4}$

Prove by induction that for all $n \geq 0$, the area of the nth snowflake is given by:
$$a_n = a_0\left(\frac{8}{5} - \frac{3}{5} \left(\frac{4}{9}\right)^n\right).$$

答:
I want to post the solution, since someone might need it.

Proof. by ordinary induction. Let Induction hypothesis $P(n)$ be $$a_n = a_0\left(\frac{8}{5} - \frac{3}{5}\cdot \left(\frac{4}{9}\right)^n\right).$$
Base case $(n=0):$ $a_0=a_0\left(\frac{8}{5} - \frac{3}{5}\cdot \left(\frac{4}{9}\right)^0\right) = a_0.$ holds.

Inductive step: Assume $P(n)$ holds for some $n \geq 0$. Show that $P(n) \Rightarrow P(n+1).$ We need to show $$a_{n+1} = a_0\left(\frac{8}{5} - \frac{3}{5}\cdot\left(\frac{4}{9}\right)^{n+1}\right).$$ We can write $$a_{n+1} = a_n + e_n t_{n+1}$$ where $e_n = 3\cdot4^n$ and $t_{n+1} = \frac{a_0}{9^{n+1}}.$ Replacing $e_n$ and $t_{n+1}$ in the equation of $a_{n+1}$ gives $$a_{n+1} = a_n + 3\cdot4^n\cdot\left(\frac{a_0}{9^{n+1}}\right)=$$ $$a_n + 3\cdot\left(\frac{1}{9}\right)\cdot a_0\cdot\left(\frac{4^n}{9^{n}}\right)=$$ $$a_n + \frac{1}{3}\cdot a_0\cdot\left(\frac{4}{9}\right)^n=$$ Since P(n) holds, we can replace $a_n$ with $a_0\left(\frac{8}{5} - \frac{3}{5}\cdot\left(\frac{4}{9}\right)^n\right).$ $$a_0\left(\frac{8}{5} - \frac{3}{5}\cdot\left(\frac{4}{9}\right)^n\right) + \frac{1}{3}\cdot a_0\cdot\left(\frac{4}{9}\right)^n=$$ $$a_0\cdot \left(\frac{8}{5}\right) - a_0\cdot \left(\frac{3}{5}\right)\cdot\left(\frac{4}{9}\right)^n + \frac{1}{3}\cdot a_0\cdot\left(\frac{4}{9}\right)^n=$$ $$a_0\cdot \left(\frac{8}{5}\right) - a_0\cdot\left(\frac{4}{9}\right)^n \left(\frac{3}{5} - \frac{1}{3}\right)=$$ $$a_0\cdot \left(\frac{8}{5}\right) - a_0\cdot\left(\frac{4}{9}\right)^n \cdot \left(\frac{4}{15}\right)=$$ $$a_0\cdot \left(\frac{8}{5}\right) - a_0\cdot\left(\frac{4}{9}\right)^n \cdot \left(\frac{4}{9} \cdot \frac{3}{5}\right)=$$ $$a_0\cdot \left(\frac{8}{5}\right) - a_0\cdot\left(\frac{4}{9}\right)^{n+1} \cdot \frac{3}{5}=$$ $$a_0\cdot \left(\frac{8}{5} - \frac{3}{5} \cdot \left(\frac{4}{9}\right)^{n+1}\right)$$ which proves $P(n+1).$

We can conclude, by induction principle, $\forall n \geq 0: P(n)$.