问:
a question about calculating eigenvectors
It has to be the silliest question, but it’s not clear to me how to calculate eigenvectors quickly. I am just talking about a very simple 2-by-2 matrix.

When I have already calculated the eigenvalues from a characteristic polynomial, I can start to solve the equations with $A\mathbf{v}_1 = e_1\mathbf{v}_1$ and A\mathbf{v}_2 = e_2\mathbf{v}_2$, but in this case it always requires writing lines of equations and solving them.

On the other hand I figured out that just by looking at the matrix you can come up with the eigenvectors very quickly. But I'm a bit confused in this part.

When you have the matrix with subtracted $e_1$ values like this:
$$\left(\begin{array}{cc}
A&B\\
C&D
\end{array}\right).$$

Then for me, it always worked to use the eigenvector.
$$\left(\begin{array}{r}-B\\A\end{array}\right)$$

But in some guides I find that they are using A C as an eigenvector.
$$\left(\begin{array}{c}A\\C
\end{array}\right).$$

And when I check it, they are indeed multiples of each other. But this other method is not clear to me, how could $A$ and $C$ mean anything about the eigenvector, when both of them are connected to $x$, without having to do anything with $y$. But it’s still working. Was it just a coincidence?

So is the recommended method for calculating them is just to subtract the eigenvalues from the matrix and look at
$$\left(\begin{array}{r}
-B\\A\end{array}\right)\qquad\text{or}\qquad\left(\begin{array}{r}
-D\\A
\end{array}\right).$$

答:
(Note that you are using $A$ for two things in your post: it is the original matrix, and then it's an entry of the matrix; that's very bad form. and likely to lead to confusion; never use the same symbol to represent two different things).

So, if I understand you: you start with a matrix $\mathscr{A}$,
$$\mathscr{A} = \left(\begin{array}{cc}
a_{11} & a_{12}\\
a_{21} & a_{22}
\end{array}\right).$$

Then, if you know that $e_1$ is an eigenvalue, then you look at the matrix you get when you subtract $e_1$ from the diagonal:
$$\left(\begin{array}{cc}
a_{11}-e_1 & a_{12}\\
a_{21} & a_{22}-e_1
\end{array}\right) = \left(\begin{array}{cc}A&B\\C&D
\end{array}\right).$$

Now, the key thing to remember is that, because $e_1$ is an eigenvalue, that means that the matrix is singular: an eigenvector corresponding to $e_1$ will necessarily map to $\mathbf{0}$. That means that the determinant of this matrix is equal to $0$, so $AD-BC=0$.

Essentially: one of the rows of the matrix is a multiple of the other; one of the columns is a multiple of the other.

What this means is that the vector $\left(\begin{array}{r}-B\\A\end{array}\right)$ is mapped to $0$: because
$$\left(\begin{array}{cc}
A&B\\C&D\end{array}\right)\left(\begin{array}{r}-B\\A\end{array}\right) = \left(\begin{array}{c}-AB+AB\\-BC+AD \end{array}\right) = \left(\begin{array}{c}0\\0\end{array}\right)$$
because $AD-BC=0$. If $A$ and $B$ are not both zero, then this gives you an eigenvector.

If both $A$ and $B$ are zero, though, this method does not work because it gives you the zero vector. In that case, the matrix you are looking at is
$$\left(\begin{array}{cc}0&0\\C&D
\end{array}\right).$$
One vector that is mapped to zero is $\left(\begin{array}{r}-D\\C\end{array}\right)$; that gives you an eigenvalue unless $C$ and $D$ are both zero as well, in which case any vector will do.

On the other hand, what about the vector $\left(\begin{array}{r}A\\C\end{array}\right)$? That vector is mapped to a multiple of itself by the matrix:
$$\left(\begin{array}{cc}
A&B\\C&D\end{array}\right)\left(\begin{array}{c}A\\C\end{array}\right) = \left(\begin{array}{c}A^2 + BC\\AC+DC\end{array}\right) = \left(\begin{array}{c}A^2+AD\\AC+DC\end{array}\right) = (A+D)\left(\begin{array}{c}A\\C\end{array}\right).$$
However, you are looking for a vector that is mapped to $\left(\begin{array}{c}0\\0\end{array}\right)$ by $\left(\begin{array}{cc}A&B\\C&D\end{array}\right)$, not for a vector that is mapped to a multiple of itself by this matrix.

Now, if your original matrix has zero determinant already, and you haven't subtracted the eigenvalue from the diagonal, then here's why this will work: the sum of the two eigenvalues of the matrix equals the trace, and the product of the two eigenvalues equals the determinant. Since the determinant is $0$ under this extra assumption, then one of the eigenvalues is $0$, so the other eigenvalue equals the trace, $a_{11}+a_{22}$. In this case, the vector $\left(\begin{array}{c}A\\C\end{array}\right)$ is an eigenvector of $\mathscr{A}$ corresponding to $a_{11}+a_{22}$, unless $A=C=0$ (in which case $\left(\begin{array}{r}a_{22}\\a_{11}\end{array}\right)$ is an eigenvector unless $\mathscr{A}$ is the zero matrix).

Added. As Robert Israel points out, though, there is another point here. Remember that $e_1+e_2 = a_{11}+a_{22}$, $A=a_{11}-e_1 = e_2-a_{22}$; and that $a_{11}a_{22}-a_{12}a_{21} = e_1e_2$; if we take the vector $\left(\begin{array}{c}A\\C\end{array}\right)$ with the original matrix $\mathscr{A}$, we have:
$$\begin{align*}
\left(\begin{array}{cc}a_{11}&a_{12}\\a_{21}&a_{22}\end{array}\right)\left(\begin{array}{c}A\\C\end{array}\right) &= \left(\begin{array}{c}
a_{11}A + a_{12}C\\a_{21}A + a_{22}C.\end{array}\right)\\
&= \left(\begin{array}{c}
a_{11}(e_2-a_{22}) + a_{12}a_{21}\\
a_{21}(e_2-a_{22}) + a_{22}a_{21}
\end{array}\right) = \left(\begin{array}{c}
e_2a_{11} + (a_{12}a_{21}-a_{11}a_{22})\\
e_2a_{21} + (a_{22}a_{21} - a_{22}a_{21}
\end{array}\right)\\
&= \left(\begin{array}{c}
e_2a_{11} - e_1e_2\\
e_2a_{21}
\end{array}\right) = \left(\begin{array}{c}
e_2(a_{11}-e_1)\\e_2a_{21}
\end{array}\right)\\
&= e_2\left(\begin{array}{c}
a_{11}-e_1\\a_{21}
\end{array}\right) = e_2\left(\begin{array}{c}A\\C
\end{array}\right).
\end{align*}$$
So if $A$ and $C$ are not both zero, then $\left(\begin{array}{c}A\\C\end{array}\right)$ is an eigenvector for the other eigenvalue of $\mathscr{A}$.

To summarize:

If you subtract the eigenvalue from the diagonal, and in the resulting matrix the first row is not equal to $0$, then your method will produce an eigenvector corresponding to the eigenvalue you subtracted.

If you subtract the eigenvalue from the diagonal, and in the resulting matrix the first column is not equal to $0$, then taking that column will produce an eigenvector corresponding to the other eigenvalue of $\mathscr{A}$ (not the one you subtracted).


问:
Prove $L=\{ 1^n| n\hspace{2mm}\text{is a prime number} \}$ is not regular.
Prove $L=\{ 1^n|  n\hspace{2mm}\text{is a prime number} \}$ is not regular.

It seems to use one Lemma: Pumping Lemma.

答:
In addition:

Instead of Pumping lemma one can use the following fact: $L$ is regular iff it is an union of $\lambda$-classes for some left congruence $\lambda$ on the free monoid $A^*$ such that  $|A^*/\lambda|<\infty$. Here $A=\{a\}$ (in your notation $a=1$) is commutative, so  $\lambda$ is two-sided. The structure of the factor-monoid  $A^*/\lambda =\langle {\bar a}\rangle$ is well-known -- it is defined by a relation ${\bar a}^{n+r}={\bar a^n}$. Therefore every $\lambda$-class is either one-element $\{a^k\}$ for $k< n$ or has the form $\{a^k,a^{k+r},a^{k+2r},\ldots\}$ for $k\ge n$. Since $L$ contains an infinite $\lambda$-class, we get a contradiction.

ContentLicense: CC BY-SA 3.0


问:
Simplify Fraction with a Square Root?
I'm trying to simplify a problem that I have the answer to but when I check it with Wolfram it seems a bit more simplified and I can't think of what steps are taking place to get that result.

Somehow this: $\frac{1}{2\sqrt{1-\frac{x^2}{4}}}$

Becomes this: $\frac{1}{\sqrt{4-x^2}}$

And I'm not sure how. I'm guessing its some simple Algebra operation that I'm totally forgetting right now. Any help breaking it down is much appreciated.

ContentLicense: CC BY-SA 4.0

Title: Simplify Fraction with a Square Root?

Body:
We have $$\frac{1}{2\sqrt{1-\frac{x^2}{4}}}=\frac{1}{2\sqrt{\frac{1}{4}(4-x^2)}}$$
$$=\frac{1}{2\sqrt{\frac{1}{4}}\sqrt{4-x^2}}=\frac{1}{\sqrt{4-x^2}}.$$


问:
Unique critical point does not imply global maximum/global minimum
I have actually two questions here, but both are very much related so I decided to put them both in this question.

From Wikipedia I found the following example of a function that has a single critical point which is a local minimum, yet is not a global minimum:

$f(x,y) = x^2 + y^2(1-x)^3$

Indeed the only critical point of $f$ is $(0,0)$ which is a local minimum by the second derivative test, but $(0,0)$ is not a global minimum because $f(4,1) = -11$. Why does this happen? I am having some trouble understanding intuitively why this is true. I know that $f$ has a minimum when restricted to a compact set. Then $(0,0)$ is a global minimum in any closed ball around $(0,0)$, and thus $(0,0)$ is a global maximum?? This is not true because $f$ is a counterexample, but I can't quite understand why.

In some cases we do have a global minimum at the unique critical point. For example, let

$f(x,y) = (-x+y)^2 + (x-1)^2 + (x+y-1)^2$

Then $f$ has a unique critical point at $(\frac{2}{3}, \frac{1}{6})$. The critical point turns out to be a global minimum (according to the graph and wolframalpha). How would I prove that the point is a global minimum? And how does one in general decide that a function has a global minimum/maximum on a critical point when the function is defined on all of $\mathbb{R}^2$, particularly when there is only one critical point?

答: A critical point can be either a minimum, a maximum, a saddle point or none of these three, i.e. undecidable. For a two-variable function f(x,y), if the determinant of its Hessian is positive at the critical point (x*,y*), and fxx(x*,y*) is positive, then the critical point(x*, y*) is a local minimum. Refer to the list of tests in: https://en.wikipedia.org/wiki/Second_partial_derivative_test</p>


问:
Show that $I=\langle x+1, x^2+1\rangle$ is maximal in $\mathbb Z[x]$.
I’m trying to show this by showing that $\mathbb Z[x]/I$ is a field. Since in this ring $x=-1$ and so $x^2=1$, but also $x^2=-1$ from which it follows that $1=-1$ and so it is probably isomorphic to $\mathbb F_2$? But I can’t find a homomorphism from $\mathbb Z[x]\ \longrightarrow\ \mathbb F_2$ with kernel $I$.

答:
I would put it this way:
\begin{align}
\mathbf Z[X]\bigm/(X+1,X^2+1)&=\mathbf Z[X]\bigm/(X+1,X^2+1\bmod X +1))\\
&=\mathbf Z[X]\bigm/(X+1,2)\simeq\mathbf Z/2\mathbf Z[X]/(X+1)\\
&\simeq\mathbf Z/2\mathbf Z.
\end{align}


答:
Very useful exercise: If $R$ is a commutative ring and $r_1,\ldots,r_n\in R$, then
$$R/\langle r_1,\ldots,r_n\rangle\cong (R/\langle r_1\rangle)/\langle\bar{r_2},\ldots,\bar{r_n}\rangle.$$

Applying this here makes the exercise very easy; we have $R=\Bbb{Z}[x]$ and $r_1=x+1$ and $r_2=x^2+1$. Then
$$\Bbb{Z}[x]/\langle x+1,x^2+1\rangle\cong(\Bbb{Z}[x]/\langle x+1\rangle)/\langle\overline{x^2+1}\rangle.$$
Of course $\Bbb{Z}[x]/\langle x+1\rangle\cong\Bbb{Z}$ by mapping $x$ to $-1$. Then $x^2+1$ is mapped to $(-1)^2+1=2$ and so
$$(\Bbb{Z}[x]/\langle x+1\rangle)/\langle\overline{x^2+1}\rangle\cong\Bbb{Z}/\langle2\rangle=\Bbb{F}_2.$$
This is a field, and so this shows that the original ideal is maximal.

Alternatively, you mention that you already suspect that the quotient is isomorphic to $\Bbb{F}_2$, but cannot find a homomorphism $\Bbb{Z}[x]\ \longrightarrow\ \Bbb{F}_2$ with kernel $I$. Note that such a homomorphism is determined entirely by where $x$ is mapped. So $x$ must map to some element of $\Bbb{F}_2$ such that $x+1$ and $x^2+1$ are mapped to $0$. There aren't many candidates; you just have to check that this does indeed work.

Title: Show that $I=\langle x+1, x^2+1\rangle$ is maximal in $\mathbb Z[x]$.

Body: I’m trying to show this by showing that $\mathbb Z[x]/I$ is a field. Since in this ring $x=-1$ and so $x^2=1$, but also $x^2=-1$ from which it follows that $1=-1$ and so it is probably isomorphic to $\mathbb F_2$? But I can’t find a homomorphism from $\mathbb Z[x]\ \longrightarrow\ \mathbb F_2$ with kernel $I$.


问:
Suppose today is Wednesday. What day of the week will it be $10^{{10}^{10}}$ days from now?
Question: Suppose today is Wednesday. What day of the week will it be $10^{{10}^{10}}$ days from now?

Answer: This is what I have tried so far. I know that you need to find $10^{{10}^{10}}\text{mod} 7$ to solve this problem. If $10^{{10}^{10}} \text{mod}7=0$, then it will be Wednesday, if $10^{{10}^{10}}\text{mod}7=1$, it will be Thursday, and so on. I tried breaking up the large exponent as follows: $10^{{10}^{10}}\text{mod}7=(10^{{10}^5} \text{mod}7\cdot 10^{{10}^5}\text{mod7})\text{mod}7$. However, I do not know how to find $10^{{10}^5} \text{mod}7$. The answer to this problem is Sunday, so that means that $10^{{10}^{10}}\text{mod}7=4$.

答: Note that $10^{6}\equiv 1\pmod{7}$. Then, to solve this problem we would like to find $10^{10}\pmod{6}$. This is equivalent to $(-2)^{10}\equiv 1024\equiv 4\pmod 6$. Thus, $10^{10^{10}}\equiv 10^{6k + 4}\pmod{7}$ for some integer $k$. Thus, $10^{10^{10}}\equiv 10000\equiv 4\pmod{7}$. Can you take it from here?


问:
Should every group be a monoid, or should no group be a monoid?
Question: What is more convenient/useful? Writing mathematics as if every group is a monoid, or as if these two classes are disjoint?

Additional discussion. Define a monoid as follows.

Defn 1. A monoid is a triple $(X,*,e)$ such that $*$ is an associative binary operation on $X$, and $e \in X$, and $e$ has the property that for all $x \in X$ it holds that $x * e = e * x = x$.

From here, there's at least two ways of defining a group.

Defn 2. A group is a monoid $(X,*,e)$ such that for all $x \in X$ there exists $y \in X$ such that $x*y=e$.

Defn 2'. A group is a quadruple $(X,*,e,i)$ such that $(X,*,e)$ is a monoid, and $i$ is a function $X \rightarrow X$, and for all $x \in X$ it holds that $x * i(x) = e$.

Now I understand that minimalism favors Defn 2, while practitioners of universal algebra favor Defn 3. However, this is not my question.

My question is not: which is preferable, Defn 2 or Defn 2'?

Rather, my question is: which is preferable, definitions like Defn 2 such that every group is a monoid, or definitions like Defn 2' such that no group is monoid? So just to clarify, I want to know: what is more convenient/useful? Writing mathematics as if every group is a monoid, or as if these two classes are disjoint?

答:
Note that Def. 2' is a standard type of universal algebraic definition, which means that it requires only equational logic.

On the other hand Def. 2 requires both types of quantification, i.e. stronger logic than Def. 2' (namely: predicate logic).

So Def. 2' appears to be more economical, it needs less of expressive power. At the same time it is not cumbersome or too long. In fact, both definitions are of quite the same length.

Therefore, imho, Def. 2' is better.


Body:
Prove by induction $2\left(n+1\right)\leq\left(n+2\right)^{2}$

Case $S(1)$ is true:

$$2((1)+2)\leq((1)+2)^{2}$$

$$6\leq9$$

Case $S(n)$ is true for all $n=1,2,...$

$$2(n+2)\leq(n+2)^{2}(i)$$

Case $S\left(n+1\right)$

$$2(n+3)\leq(n+3)^{2}(ii)$$

From (i)

$$2(n+2+1-1)\leq(n+2+1-1)^{2}$$

$$2(n+3)-2(1)\leq(n+3)^{2}-2(n+3)+1$$
$$2(n+3)\leq(n+3)^{2}-2(n+3)+3$$
$$2(n+3)\leq(n+3)^{2}-(2n+3)$$
$$2(2n+3)+3\leq(n+3)^{2}$$

Thus $(i)$ is true for all $n=1,2,...$

My question: How can I get the same expression as (ii)?
I got to $2(2n+3)+3\leq(n+3)^{2}$ but it's clearly wrong

Body: Note that$$2(n+2)-2(n+1)=2$$and that$$(n+3)^2-(n+2)^2=2n+5.$$So, if $2(n+1)\leqslant(n+2)^2$, you have\begin{align}2(n+2)&=2(n+1)+2\\&\leqslant(n+2)^2+2\\&\leqslant(n+2)^2+2n+5\\&=(n+3)^2.\end{align}


问:
Find this limit, When n to infinity
I don´t understand this problem, I need help with this

Find the next limit. Justify your procedure
$$\displaystyle \lim_{n \to \infty} \sqrt[n]{n + c} $$

I Tried do this, but I think it's wrong

$$\displaystyle \lim_{n \to \infty} \sqrt[n]{n + c} = \displaystyle \lim_{n \to \infty} {n + c}^n $$

After that, I tried use a stolz criterium $$\displaystyle \lim_{n \to \infty} \sqrt[b_{n}]{a_{n}} = \displaystyle \lim_{n \to \infty} \sqrt[b_{n+1}-b_{n}]{\dfrac{a_{n+1}}{a_{n}}}$$
where $$a_{n} = n+c , b_{n} =n , a_{n+1} = n+c+1 , b_{n+1} = n+1 , \displaystyle \lim_{n \to \infty} b_{n} = \displaystyle \lim_{n \to \infty} n = \infty$$
so $$\displaystyle \lim_{n \to \infty} \sqrt[n]{n+c} = \displaystyle \lim_{n \to \infty} \sqrt[n+1-n]{\dfrac{n+c+1}{n+c}} = \displaystyle \lim_{n \to \infty} \sqrt[1]{\dfrac{n+c+1}{n+c}} = \displaystyle \lim_{n \to \infty} \dfrac{n+c+1}{n+c} = \dfrac{\displaystyle \lim_{n \to \infty} n+c+1 }{\displaystyle \lim_{n \to \infty} n+c }$$

I got this but I don't know if this is right or not,

Title: Find this limit, When n to infinity

Body:
By Bernoulli's inequality,
if $x \ge -n$ then
$(1+x/n)^n \ge 1+x
$
so
$(1+x)^{1/n}
\le 1+x/n$.

Therefore,
for $n \ge |c|$,

$\begin{array}\\
(n+c)^{1/n}
&=n^{1/n}(1+c/n)^{1/n}\\
&\le n^{1/n}(1+c/n^2)\\
&\le n^{1/n}+cn^{1/n}/n^2\\
&= n^{1/n}+2c/n^2
\qquad\text{since } 2^n \ge n \text{ or } n^{1/n} \le 2\\
\end{array}
$

Since $n^{1/n} \to 1$
and $2c/n^2 \to 0$,
$(n+c)^{1/n} \to 1$.


问:
Distribution function that is not absolutely continuous

Find, with proof, an example of a distribution function $F$ in $\mathbb{R}^d$ with absolutely continuous margins or component functions that is not absolutely continuous.

I know that if $F$ is absolutely continuous, its margins are absolutely continuous. Also, $F$ is absolutely continuous if it can be written in the form $\int_{-\infty}^{x_1} \cdots \int_{-\infty}^{x_d} f(z_1,\cdots, z_d) dz_1\cdots dz_d,$ where $f$ is the density of $f$. I also know that random vectors are vectors of random variables. However, I'm not sure how to find a distribution function $F$ with absolutely continuous margins that is not absolutely continuous.

答: Let $X$ have a standard normal distribution and $X_i=X$ for $1\leq i \leq n$. Then the distribution function of $(X_1,X_2,...,X_n)$ is concentrated on the set $\{(x,x,...,x):x \in \mathbb R\}$ which has Lebesgue measure $0$ so it is not absolutely continuous. But the marginals are normal.


问:
Differentiate this trigonometric function
Let $h$ be defined as

$$h(x) = \begin{cases}\sin(x^2)\cos\Big(\frac{1}{x}\Big) \quad& x \neq 0\\ 0\quad&x=0\end{cases}$$

The question is:

Prove that $h$ is differentiable at $0$ and find $h'(0)$.

I showed that the left and right limits exist and equal to each other. I also showed that the function $h$ is continuous at $x=0$ but I could not show the right and left derivatives at $x=0$ are equal.

Thanks for your help.

答:
Your work showing that $h$ is continuous at $0$ is correct.  A plot might reinforce your result.

In fact, $\pm x^2$ is an envelope for this $h$.  (Although I make no representation that this is easy to show.)

But what about $h'(x)$?  Except at $x = 0$, we have
\begin{align*}
h'(x) &= \left( \cos(x^2) \cdot (2x) \right) \cos(1/x) \\
&\quad{}+ \sin(x^2) \left( \sin(1/x) \cdot (x^{-2}) \right)
\end{align*}
And a plot of that might help you see why you are having trouble with the limits from the left and right -- neither limit exists.

So how do we show this?  Let $x_k = \frac{1}{\frac{\pi}{2} + 2 \pi k}$ for $k \in \Bbb{Z}_{>0}$.  This is a sequence that approaches $0$.  Then $h'(x_k) = \frac{1}{4}(\pi + 4\pi k)^2 \sin\left( \frac{4}{(\pi + 4 \pi k)^2}\right)$, a sequence that approaches $1$.  Now let $y_k = \frac{1}{\frac{-\pi}{2} + 2 \pi k}$ for $k \in \Bbb{Z}_{>0}$.  This is a sequence that approaches $0$.  Then $h'(y_k) = \frac{-1}{4}(\pi^2 - 4\pi k)^2 \sin\left( \frac{4}{(\pi - 4 \pi k)^2}\right)$, a sequence that approaches $-1$.  So some care is required to show that $h$ is differentiable at $0$.

As long as $x \neq 0$,
$$  \frac{h(x) - h(0)}{x} = \frac{\cos(1/x) \sin(x^2)}{x}  \text{.}  $$
We have $-1 \leq \cos(1/x) \leq 1$, so
$$  \frac{-\sin(x^2)}{x} \leq \frac{h(x) - h(0)}{x} \leq \frac{\sin(x^2)}{x}  \text{.}  $$
Then, taking the limit as $x \rightarrow 0$ and applying L'Hopital's rule on the left and right ends of the inequality,
$$  \lim_{x \rightarrow 0} -2x \cos(x^2) \leq h'(0) \leq \lim_{x \rightarrow 0}  2x \cos(x^2)  \text{.}  $$
Now $\cos(x^2) \in [-1,1]$, so as before the expressions on the left and right are bounded by $-2x$ and $2x$.  In the limit as $x \rightarrow 0$, the squeeze theorem forces
$$  0 \leq h'(0) \leq 0  \text{,}  $$
so $h'(0) = 0$.


问:
Proof by induction for $n\in\mathbb N$
I need some help with the following proof by induction problem:

Prove that for all natural numbers $n\in\Bbb N$:

$$\dfrac{4^{n}}{n + 1} < \dfrac{(2n)!}{(n!)^{2}}$$

first I proof this first for $n=2$, and we got this
$\dfrac{4^{2}}{2 + 1} < \dfrac{(2 \times 2)!}{(2!)^{2}}$ and this meets inequality.

now for $n=k$  $$\dfrac{4^{k}}{k + 1} < \dfrac{(2k)!}{(k!)^{2}}$$ and if this is true so $$\dfrac{4^{k}}{k + 1} +(k+1) < \dfrac{(2k)!}{(k!)^{2}} +(k+1)$$

After that I don't know how follow this problem. Any help would be sincerely appreciated. Thanks!

答:
What you need to show is that if the inequality holds for $n=k$, it also holds for $n = k+1$, i.e.
$$
\frac{4^k}{k+1}< \frac{(2k)!}{(k!)^2}\Rightarrow \frac{4^{k+1}}{k+2}< \frac{(2k+2)!}{((k+1)!)^2}.
$$

Title: Proof by induction for $n\in\mathbb N$


问:
Application of Ito's lemma relating to bond price
I'm interested in solving the following questions but I am confused on the second part because I do not know how to define/calculate the interest per "unit time", which I'm guessing is informal terminology for "dt".  I've included my attempt after the picture.

(i) - this is trivial:  $B(y) = \int_0^\infty e^{-yt} dt = y^{-1} e^{-yt}|_{y=0}^{y = \infty} = \frac{1}{y}$

(ii) - I'm not sure how to define the interest.  Would this be the interest payment received from the bond payment?  i.e. informally $\exp(-y_t t)dt$?

In this case we get $$\text{Exp. total return per unit time} = \frac{dB_t + e^{-y_t t}dt}{B_t}$$

and from Ito's lemma we obtain $$dB_t = \frac{-1}{y_t^2} dy_t + \frac{1}{2} \frac{2 d\langle y \rangle_t}{y_t^3} = -\frac{a(m-y_t) dt + by_t dZ_t}{y_t^2} + \frac{b^2}{y_t} dt = \frac{\bigg((b^2+a)y_t - am\bigg) dt + by_t dZ_t}{y_t^2}$$

so that

$$\text{Exp. total return per unit time} =  \frac{\bigg(e^{-y_t t}y_t^2 + (b^2+a)y_t - am\bigg) dt - by_t dZ_t}{y_t} $$

Would this be the right idea?  Thanks for any advice!

答:
We have $B(y) = \frac{1}{y}$ and y follows $dy = a(m - y)dt + bydZ$. Using Ito's lemma we have

$$dB = \bigg[\frac{\partial B}{\partial y}a(m - y) + \frac{\partial B}{\partial t} + \frac{1}{2}\frac{\partial^2 B}{\partial y^2}b^2y^2\bigg]dt + \frac{\partial B}{\partial y}bydZ$$

$$dB = \bigg[-a(m - y)\frac{1}{y^2} + \frac{b^2}{y}\bigg]dt - \frac{b}{y}dZ$$

This means that The expected instantaneous rate at which capital gains are earned from the bond is

$$E[dB] = -a(m - y)\frac{1}{y^2} + \frac{b^2}{y}$$

and we have that the expected interest per unit time is 1. The total expected instantaneous return is then

$$1 - a(m - y)\frac{1}{y^2} + \frac{b^2}{y}$$

When expressed as a proportion of the bond price this is

$$\frac{1 - a(m - y)\frac{1}{y^2} + \frac{b^2}{y}}{y} = y - \frac{a}{y}(m - y) + b^2$$


问:
Forging Intermediate Value
Suppose that $X$ is a (real) Hausdorff topological vector space and let $k \in (0,\infty)$.

Let $f,g\in C(X)$ and suppose that $Im(f)=Im(g)=[0,\infty)$.  So in particular, both have minimum at $0$ and I assume that that $g(0)=0=f(0)$.  Fix some $y \in X$.  Does there exist some $x\in X$ such that
$
f(x)+g(y-x)=k
?
$

If not, are there mild conditions under which we can guarantee it?

答:
Well, consider the function $h:X\to\mathbb{R}$ defined by $h(x)=f(x)+g(y-x)$.  Then $h$ is continuous, so its image is an interval since $X$ is connected.  Also, $h(0)=g(y)$, $h(y)=f(y)$, and $h$ is unbounded each term of $h(x)$ can get arbitrarily large and the other term is nonnegative.  So, the image of $h$ contains $[a,\infty)$ where $a=\min(f(y),g(y))$ (so the answer to your question is yes if $k\geq a$).

In general, though, the image of $h$ may not be any larger than $[a,\infty)$.  For instance, suppose $f=g$ is a norm on $X$.  Then $h(x)=f(x)+f(y-x)\geq f(y)$ for all $x$ by the triangle inequality.

Title: Forging Intermediate Value


问:
Show that a multiplicative group contains at most $c$ elements of order $c$.
Suppose $g$ is a field of cardinality $64$. Let $g^\times$ be a multiplicative group of invertible elements of order $63$ and let $c \geq 0$ be an integer. Show that $g^\times$ contains at most $c$ elements of order $c$.

I know that an element of order $c$ must satisfy an equation but I'm not entirely sure where to go from here... any help would be appreciated!

答:
You have an unusual notation, lower case $g$ for a field. Let me switch to more familiar $F$ for a field. Let $f(x)$ be a polynomial, say of degree $n>1$, then for every root $a\in F$, by applying remainder theorem, $f(x) = (x-a) f_1(x)$ for a polynomial $f_1(x)$ of degree $n-1$ having coefficients in $F$ again.

This shows that the polynomial $X^n-1=0$ has at most $n$ roots. These roots among them contain  all elements of multiplicative order $n$ (and some thing which are not), and this proves what you need.

EDIT: This statement is false for rings which are not fields. In the ring R=Z/8Z the polynomial $f(X) = X^2-1$ though of degree 2, has 4 solutions, namely $X=1,3,5,7$. So the multiplicative group of units of $R$ has 3 elements of order 2 (which along with 1 is a group   isomorphic to Klein's four-group).


问:
Maximise profits using probability
A gambler on the streets has 2 loaded coins with probability 0.7 of getting tails, and 1 fair coin with a probability of getting heads or tails.

If you get 3 heads, you win 10 dollars. If you get 2 heads (not in a row), you win 5 dollars, if you get 2 heads (in a row), you win 1 dollar. Otherwise you win nothing.

If you can play the game many times, is there a particular arrangement of coins to maximise my profits?
How would I prove that there is no such arrangement?

答:
Consider the arrangement LLF. We have that:

$P(HHH) = 0.3 \cdot 0.3 \cdot 0.5 = 0.045$ (three heads in a row).

$P(HTH) = 0.3 \cdot 0.7 \cdot 0.5 = 0.105$ (two heads, not in a row).

$P(HHT)+P(THH) = 0.3 \cdot 0.3 \cdot 0.5 + 0.7 \cdot 0.3 \cdot 0.5 = 0.150$ (two heads in a row).

The expected win is:

$$10\cdot 0.045 + 5 \cdot 0.105 + 1 \cdot 0.150 = 1.125.$$

Now, consider the arrangement  LFL. We have that:

$P(HHH) = 0.3 \cdot 0.5 \cdot 0.3 = 0.045.$

$P(HTH) = 0.3 \cdot 0.5 \cdot 0.3 = 0.045.$

$P(HHT)+P(THH) = 0.3 \cdot 0.5 \cdot 0.7 + 0.7 \cdot 0.5 \cdot 0.3 = 0.210.$

The expected win is:

$$10\cdot 0.045 + 5 \cdot 0.045 + 1 \cdot 0.210 = 1.125 = 0.885.$$

Finally, consider the arrangement FLL. We have that:

$P(HHH) = 0.5 \cdot 0.3 \cdot 0.3 = 0.045.$

$P(HTH) = 0.5 \cdot 0.7 \cdot 0.3 = 0.105.$

$P(HHT)+P(THH) = 0.5 \cdot 0.3 \cdot 0.7 + 0.5 \cdot 0.3 \cdot 0.3 = 0.150.$

The expected win is:

$$10\cdot 0.045 + 5 \cdot 0.105 + 1 \cdot 0.150 = 1.125 = 1.125.$$

This means that both LLF and FLL maximize your expected payoff... so don't use the fair coin for the second toss!!! :D

Addition

As a side remark, we observe that the probability to win something, i.e.

$$P = P(HHH) + P(HTH) + (P(HHT)+P(THH))$$

is independent on the arrangement, and it is equal to $0.3$. Let's give a name to each coin. Let's that one loaded coin is A, the other is B and fair one is C. First of all, notice that, for example:

$$P(A = H, B = T, C = T) = P(B = T, C = T, A = H) = ...,$$
i.e. it is not important the order.

Secondly, tosses are independent, i.e.
$$P(A = H, B = T, C = T)  = P(A=H)P(B=T)P(C=T).$$

Last assumption: let $P(A=T) = P(B=T) = t$ (in the specific case, $t=0.7$).

Observe that:

$$P = P(\text{probability to get at least two H}) = \\
~\\
= P(A=H, B=H, C=H) \\
+ P(A=H, B=H, C=T) \\
+ P(A=T, B=H, C=H) \\
+ P(A=H, B=T, C=H) =\\
~\\
= P(A=H)P(B=H)P(C=H) \\
+ P(A=H)P(B=H)P(C=T) \\
+ P(A=T)P(B=H)P(C=H) \\
+ P(A=H)P(B=T)P(C=H) =\\
~\\
= (1-t)(1-t)0.5
+ (1-t)(1-t)0.5
+ t(1-t)0.5
+ (1-t)t0.5 =\\
~\\
= (1-t)^2 + 2 \cdot 0.5 t(1-t) = (1-t)^2 + t(1-t) = (1-t)((1-t)+t)) = 1-t.
$$

Since $t=0.7$, then $P = 1-0.7= 0.3$.

Title: Maximise profits using probability


问:
Jacobi operator's spectrum in $l_2$
I want to find the spectrum (with points classification) of operator $A$ in $l_2$, acting on the standart basis $\{e_n\}$ in the following way
$$
Ae_1 = ae_1 + be_2, \ Ae_n = be_{n-1} + ae_n + be_{n+1}, \ n\geq 2
$$
Of course we can assume that $b\neq 0$, since on the other hand the problem is simple.

My attempts. First of all I tried to find point spectrum $\sigma_p(A) =\{\lambda \in \mathbb{C}: \ker(A - \lambda I) \neq \{0\} \}$, where $I$ is an identity operator. Let $x = (x_1,x_2, \ldots)\in l_2$. We obtain equations of the form
$$
Ax = \lambda x \Leftrightarrow
\begin{cases}
x_2 = \frac{(\lambda -a)x_1}{b} \\
x_3 = \frac{(\lambda -a)x_2}{b}-x_1 \\
x_4 = \frac{(\lambda -a)x_3}{b}-x_2 \\
\ldots \\
x_n = \frac{(\lambda -a)x_n-1}{b}-x_{n-2} \\
\ldots
\end{cases}
$$
Also we can obtain the equations for $x_n$ in the form
$$
x_n = p_n\left(\frac{\lambda -a}{b}\right)x_1
$$
where $p_n(x)$ is a polynomial of degree $n-1$. But the form of polynomials is remains unclear. Also this sequnce $x$ should belongs to $l_2$, that is
$$
\sum_{n\geq 1}|x_n|^2 \leq \infty
$$
It is clear that for $\lambda = a$ we can construct such a sequence, so
$$
a \in \sigma_p(A)
$$
But what can we say after that?
Also I found that this operator has tha following propery
$$
A^* = \overline{A}
$$
in particular it is normal operator.

答:
Let $S$ be the right shift operator on $\ell^2$ given by $S(e_n)=e_{n+1}$.  Observing that
$$
  A=aI+b(S+S^*),
  $$
it is enough
to compute the spectrum of $S+S^*$ since one then has that
$$
  \sigma (A) = a + b\sigma (S+S^*),
  $$
by the spectral mapping Theorem.  The classification of spectral elements will also follow because  the
class  of any spectral value $\lambda  \in \sigma (S+S^*)$ will be the same as the class of $a+b\lambda $, as a spectral value of $A$.

Observing that $S+S^*$ is a self-adjoint operator with norm no bigger than $2$, we see that $\sigma (S+S^*)\subseteq [-2, 2]$.

Speaking of eigenvalues,  suppose that  $\lambda $ lies in the point spectrum of $S+S^*$,  and let $x=(x_n)_{n=1}^\infty $ be an eigenvector.  Then
$x$ satisfies the difference equation
$$
  x_{n+1}+x_{n-1} = \lambda x_n,
  $$
or, equivalently
$$
  x_{n+2} - \lambda x_{n+1} +x_{n} = 0,
  $$
whose characteristic polynomial is
$$
  z^2-\lambda z+1 = 0.
  $$
So the characteristic roots  are
$$
  z={\lambda \pm \sqrt{\lambda ^2-4}\over 2 } $$ $$ ={\lambda \pm i\sqrt{4-\lambda ^2}\over 2 }.
  $$
Assuming that $\lambda \in [-2, 2]$, we see that the characteristic roots have absolute value 1, so the solutions $x_n$ do not
converge to zero and hence cannot belong to $\ell^2$.  In other words, there are no eigenvalues and hence the point
spectrum of $S+S^*$ is empty.

Since $S+S^*$ is  self-adjoint, it follows that its spectrum is then the same as the continuous spectrum.

The closed *-algebra $\mathcal T$ of operators on $\ell^2$ generated by $S$ is called the Toeplitz algebra.  It is well
known that $\mathcal T$ contains the algebra $\mathcal K$ formed by all compact operators and that
the quotient $\mathcal T/\mathcal K$ is isomorphic to $C(S^1)$,  namely the algebra of all continuous, complex valued functions on
the unit circle $S^1$.

The image of $S$ under the quotient map
$$
  \pi :\mathcal T \to  \mathcal T/\mathcal K = C(S^1)
  $$
is known to be the identity function
$$
  f(z)=z,\quad \forall z\in  S^1,
  $$
so the image of $S+S^*$ is the function
$$
  g(z) = f(z)+\overline{f(z)} = 2\Re(z).
  $$

Since homomorphisms shrink spectra, we conclude that
$$
  \sigma (S+S^*) \supseteq   \sigma (\pi (S+S^*)) =  \sigma (g) = \text{Range}(g)=[-2,2],
  $$
so  we finally get
$$
  \sigma (S+S^*) = \sigma _c(S+S^*) = [-2,2],
  $$
whence
$$
  \sigma (A) = \sigma _c(A) = [a-2b,a+2b],
  $$

EDIT: Here is an elementary  proof, not using the Toeplitz algebra,  that $[-2, 2]\subseteq \sigma (S+S^*)$.

Recall that
the search for eigenvalues for $S+S^*$ leads us to consider the initial value problem
$$
  \left\{  \matrix{x_{n+2} - \lambda x_{n+1} +x_{n} = 0, \cr
  x_2 = \lambda x_1, }
  \right.
  \tag 1
  $$
whose  characteristic polynomial  is
$$
  z^2-\lambda z+1 = 0.
  $$
Under the assumption that $\lambda \in [-2, 2]$,  the characteristic roots are the two conjugate complex numbers
$$
  z ={\lambda \pm i\sqrt{4-\lambda ^2}\over 2 },
  $$
both of which have absolute value is $1$, and hence may be expressed as $z=e^{\pm i\theta }$, with  $\theta \in [0,\pi ]$.

According to the Wikipedia entry for "Linear difference equation"
(https://en.wikipedia.org/wiki/Linear_difference_equation), in the section on "Converting complex solution to trigonometric form",
the solutions  have the form
$$
  x_n = K\cos(n\theta+\psi ), %{2{\sqrt {\gamma ^{2}+\delta ^{2}}}\cos(n\theta+\psi )},
  $$
where $K$ and $\psi $ are constants.

Fixing any nonzero solution $x = (x_n)_n$,
notice that when  $\theta $ is a rational multiple of $2\pi $,  the $x_n$ are periodic.  Otherwise the $x_n$ describe a dense
set in some symmetric interval.  In any case the $x_n$ fail to converge to zero and in particular
$$
  \sum_{n=1}^\infty |x_n|^2 = \infty ,
  $$
so  $x$ does not belong to  $\ell ^2$.  Incidentally this is why $S+S^*$ admits  no eigenvalues.
Nevertheless,  the existence of nonzero solutions to (1) will be our main tool in showing that every $\lambda $ in $[-2,2]$  belongs to the spectrum of
$S+S^*$.

In order to prove this, fix any $\lambda \in [-2, 2]$,  and any nonzero solution $x = (x_n)_n$ to (1).   For each  $k\geq 1$, let
$$
  x^k = (x_1,x_2,\ldots ,x_k,0,0\ldots ),
  $$
keeping in mind that
$$
  \lim_{k\to \infty }\|x^k\|=\infty .
  \tag 2
  $$
We then have that
$$
  (S+S^*)(x^k)-\lambda x^k = $$ $$
  \matrix{
    =&&(&0,& x_1,&x_2,&\ldots ,&x_{k-2},&x_{k-1},&x_k,&0,&\ldots &)\cr
    &+&(&x_2,&x_3,&x_4,&\ldots ,&x_k,&0,&0,&0,&\ldots &) \cr
    &-&(&\lambda x_1,&\lambda x_2,&\lambda x_3,&\ldots ,&\lambda x_{k-1},&\lambda x_k,&0,&0,&\ldots &)& =\cr
    =&&(&0, &0, &0, &\ldots , &0, &x_{k-1}-\lambda x_k, &x_k, &0,&\ldots &).&}.
  $$
Observing that $|x_n|\leq K$, for every $n$, we then see that
$$
  \|(S+S^*)(x^k)-\lambda x^k\| \leq  |x_{k-1}| + |\lambda x_k| + |x_k| \leq  2K+|\lambda |K.
  $$
From (2) we then deduce  that $S+S^*-\lambda I$ sends arbitrarily large vectors (the $x^k$) to vectors of  bounded
size,  so   this shows that $S+S^*-\lambda I$ is not invertible and hence that $\lambda \in \sigma (S+S^*)$.

Title: Jacobi operator's spectrum in $l_2$


问:
Determine if any model of the following language has a finite model elementarily equivalent to it
Let $L$ be a language with no equals, with one unary function symbol $g$ and one unary relation symbol $G$. Let $M_1$ be any infinite model of $L$.

Does there exist a finite model $M_2$ such that $M_1$ and $M_2$ are elementarily equivalent?

I think the answer is no, but I can't seem to find a counterexample. Is there a simple infinite model $M_1$ that interprets $L$ such that there are no elementarily equivalent finite models?

答:
Your intuition is right: while some infinite $\{G,g\}$-structures are equality-freely-elementarily-equivalent (EFE-equivalent) to some finite ones, not all of them are. Whipping up a counterexample requires two ideas: we can use the unary relation $G$ to distinguish objects on an "immediate" level, and we can use the unary function $g$ to "probe deeper."

First, let me start with recapping the trivial stuff. If we had equality in our language, we'd get a trivial negative answer: in the first-order-with-equality theory of an infinite structure we have sentences saying "There are at least $n$ distinct objects" for each $n\in\mathbb{N}$, and so no finite structure is ever elementarily equivalent to an infinite one ... if equality were allowed.

In order to whip up an infinite structure not EFE-equivalent to any finite one, we need to find a way to work around this. Specifically, we need a way to somehow talk about inequality without using "$=$." So:

What are some ways that a language consisting of a unary relation symbol $G$ and a unary function symbol $g$ can distinguish between two objects ... without using $=$?

Well, there's one obvious way which only involves one of our symbols: if $G$ holds of one thing but fails of another, those two things are distinct. Or to put it more usefully, the sentence

$$(*)_2:\quad \exists x,y[G(x)\wedge\neg G(y)]$$

can only be true in a structure with at least two elements.

Since in fact we can whip up a model of that sentence, this shows that without using the function symbol $g$ we can at least count to $2$:

There is a $\{G\}$-structure which is not EFE-equivalent to any one-element structure. Specifically, any such structure in which $G$ holds of some but not all elements of the domain will have this property.

That's ... not great though. And in fact you can show (exercise) that every $\{G\}$-structure is EFE-equivalent to a two-element structure. So somehow we need to get a lot of leverage out of that function symbol.

I'll pose the question as follows:

What is a more complicated way we can distinguish between elements $x$ and $y$ using $G$ and $g$ (but not $=$ of course)?

Well, it's still the case that the only "verb" we have is $G$, so whatever formula we're thinking about has to break into pieces of the form "$G(...)$" and "$\neg G(...)$." But by using $g$ we can talk, not just about the "$G$-ness" of an element, but the "depth-$2$ $G$-ness," the "depth-$3$ $G$-ness," and so forth - and this gives rise to more incompatible possibilities.

Here, for example, is a way to imply that there are at least four elements using just $G$ and $g$:

 In order for the sentence $$(*)_4:\quad \exists x,y,z,w[G(x)\wedge G(y)\wedge\neg G(z)\wedge\neg G(w)$$ $$\wedge G(g(x))\wedge G(g(z))\wedge\neg G(g(y))\wedge\neg G(g(w))]$$ to be true in a structure, that structure must have at least four elements.

Do you see a way to generalize this to arbitrary $n\in\mathbb{N}$? Now consider a structure in which all of these sentences hold ...


问:
Linear combination of Matrix Row Vectors

For $A \in M_{m×n}$ we define $r(A)$ to be the smallest integer k ≥ 1 such that $A =\sum^k_{j=1} c_j r_j$ for some $c_j$ column vectors and $r_j$ row vectors.

If k = row-rank(A), then letting $r_1' , . . . , r_k'$ be a subset of the rows of A forming a basis of the row-space, show $A = \sum^k_{j=1} c_j' r_j'$  for some column vectors $c_j'$.

I know that A is basically the sum of a series of $c_j' r_j'$ and every row should equal to a linear combination of  $r_1' , . . . , r_k'$, i.e. $c_1r_1' + . . . +c_k r_k'$. But I am trying to find the connection between how we are guaranteed with a set of column vectors such that $A=\sum c_j' r_j'$, i.e. how sum of $c_j$'s equal to $[c_1,...,c_k]^T$.

答:
Suppose that $r_j = \sum_{p=1}^k b_{pj} r_p'$ for scalars $b_{pj}$. We can then write
$$
\sum_{j=1}^k c_j r_j = \sum_{j=1}^k c_j \sum_{p=1}^k b_{pj} r_p' =
\sum_{p=1}^k \left(\sum_{j=1}^k b_{pj} c_j\right)r_p'.
$$


问:
Restrictions for Integer Programming problem with Simplex Method
I have an integer programming problem:

max $F = −4x_1 + 3x_2$

subject to:

$−x_1 + 3x_2 ≤ 9$

$7x_1 − 3x_2 ≥ −7$

$x_1 ≤ 3, x_2 ≥ 0$, and integer valued

How can I model the restriction that $x_1 > 2$ and $x_2 > 3$ cannot both hold at the same time?? I'm told to give explicit numerical values for any “Big M” that I use.

答:
Introduce binary variables $y_1$ and $y_2$ and impose linear big-M constraints:
\begin{align}
x_1 - 2 &\le M_1 y_1 \tag1 \\
x_2 - 3 &\le M_2 y_2 \tag2 \\
y_1 + y_2 &\le 1 \tag3 \\
\end{align}
Constraint $(1)$ enforces $x_1 > 2 \implies y_1 = 1$.
Constraint $(2)$ enforces $x_2 > 3 \implies y_2 = 1$.
Constraint $(3)$ enforces $\neg (y_1 \land y_2)$.

You want $M_1$ to be an upper bound on $x_1 - 2$ when $y_1=1$, so take $M_1 = 3 - 2 = 1$.  To determine a good value for $M_2$, first use the original constraints to deduce an upper bound on $x_2$.


问:
Calculus question with oblique asymptote involved
This question is let $$f(x) = \frac{ax^2+bx-c}{x-4}.$$ Determine the values of $a,b,$ and $c$ so that $f(x)$ has an oblique asymptote of $y=3x+1$ and has local minimum at $x=-3$.

I know this requires two equations. The first one requires taking derivative of $f(x)$ and subbing local minimum. But how do I create second equation involving the oblique asymptote.

答:
We have
$$\frac{ax^2+bx-c}{x-4}=\overbrace{ax+b+4a}^\text{oblique asymptote}+\overbrace{\frac{16a+4b-c}{x-4}}^{\text{remainder}}$$ and therefore have $a=3$ and $b=-11.$

To calculate $c$, you mentioned that you have to take the derivative and sub in local minimum.  Hopefully you can take it from here.


问:
'Guessing' local extrema of a polynomial given its roots
To start with let's assume that $p$ is a degree $n>1$ polynomial in $x$ and has $n$ distinct roots $\alpha_1, \ldots, \alpha_n$. Without loss of generality we can also stipulate that $0 = \alpha_1 < \cdots < \alpha_n = 1$. This guarantees there are $n-1$ local extrema, occurring at locations $x_1 \in (\alpha_1, \alpha_2)$, $x_2 \in (\alpha_2, \alpha_3)$, and so on. One might like to guess at the values of $x_i$ based on knowledge of the roots, and I'm curious about any heuristics that could do better than guessing the midpoint of each interval.

Of course, if $n$ is small, then there exists an explicit formula; e.g. when $p(x)=(x-\alpha_1)(x-\alpha_2)$ then $x_1 = (\alpha_1 + \alpha_2)/2$, the midpoint between the roots. But as early as $n=3$ things get murky; if $p(x)=(x-\alpha_1)(x-\alpha_2)(x-\alpha_3)$, then $$x_{1,2}=\frac{\alpha_1+\alpha_2+\alpha_3}{3}\pm\frac{\sqrt{(\alpha_1+\alpha_2+\alpha_3)^2-3(\alpha_1\alpha_2+\alpha_1\alpha_3+\alpha_2\alpha_3)}}{3}$$
From this we see that the two extrema are centered around the mean of the roots. For example when $\alpha_2=1/2$, they are at $1/2 \pm \sqrt{3}/6$, so they're "pushed out" toward $0$ and $1$ (as opposed to being evenly distributed at $1/4$ and $3/4$).

Based on this idea, I can imagine a heuristic that says the extremal values will be nearer some roots and further away from others, where "nearer" and "further" should be taken in a relative sense; in the simple example above they would be nearer $\alpha_1=0$ and $\alpha_3=1$, and further from $\alpha_2 = 1/2$. Once there are more roots, do the roles of the roots alternate? (a "near" root, then a "far root", then a "near" root again?).

A more concrete question to ask is: suppose I just guess that the extrema are at the midpoints between each pair of roots, call them $m_1 = (\alpha_1+\alpha_2)/2$, $m_2=(\alpha_2+\alpha_3)/2$, and so on. Call the error term $E=\frac{1}{n-1}\sum|m_i - x_i|^2$. How does $E$ depend on the roots of $p$? Is it monotonic with $n$ in some sense?

This is an idle curiosity; I'm just trying to dream up interesting Calc I problems and found something that is a little too interesting.

答:
Given the polynomial
$$
p_{\,n} (x) = \prod\limits_{k = 1}^n {\left( {x - r_{\,k} } \right)}
 \quad \left| {\;r_{\,k}  \le r_{\,k + 1} } \right.
$$

Putting
$$
p_{\,n} (x) = \prod\limits_{k = 1}^n {\left( {x - r_{\,k} } \right)}
 \quad \left| {\;r_{\,k}  \le r_{\,k + 1} } \right.
$$
then it is clear that if we keep only the absolute values, we are converting all the extremals
into maxima, preserving the abscissas where they occur and their absolute values.

Then consider to take the logarithm
$$
\eqalign{
  & \left| {\,p_{\,n} (x)\,} \right| = \prod\limits_{k = 1}^n {\left| {\,x - r_{\,k} \,} \right|}   \cr
  & L_{\,n} (x) = \ln \left| {\,p_{\,n} (x)\,} \right|
 = \sum\limits_{k = 1}^n {\ln \left| {\,x - r_{\,k} \,} \right|}  \cr}
$$
the extremals of $p_n(x)$ will be the maxima of $L_n(x)$, occurring in between its poles.

Let's take for example five roots, as in the following graph.

The contribution of the first two roots alone is shown by the black curve.  The maximum would occur
at the average of the two roots.

The contribution of the remaining three roots is the blue curve, which at a sufficient distance may be approximated by the pink
one, as if the three roots were concentrated at their barycenter.

Clearly the action of the roots on the right is such as to "push" leftward the maximum between $r_1,r_2$,
yet not  beyond $r_1$.

Same in the reverse direction,  the effect the effect of the first couple on the right triple.

To estimate the deviation, we can develop in series the two set of functions around $s = (r_1 + r_2)/2$.

Let's put
$$
s = {{r_{\,2}  + r_{\,1} } \over 2}\quad d
 = {{r_{\,2}  - r_{\,1} } \over 2}\quad t = {{r_{\,3}  + r_{\,4}  + r_{\,5} } \over 3}
$$
so that for
$$
0 \le \left| {\,x - s\,} \right| \le d \le t - s
$$
we can write
$$
\eqalign{
  & L_{\,a} (x) = \ln \left| {\,x - r_{\,1} \,} \right| + \ln \left| {\,x - r_{\,2} \,} \right|  \cr
  &  = \ln \left| {\,x - s + d\,} \right| + \ln \left| {\,x - s - d\,} \right| =   \cr
  &  = \ln \left( {d^{\,2}  - \left( {x - s} \right)^{\,2} } \right) =   \cr
  &  = 2\ln d + \ln \left( {1 - \left( {{{x - s} \over d}} \right)^{\,2} } \right) =   \cr
  &  = 2\ln d - \left( {{{x - s} \over d}} \right)^{\,2}  + O\left( {\left( {{{x - s} \over d}} \right)^{\,4} } \right)  \cr
  &   \cr
  & L_{\,b} (x) = 3\ln \left| {\,x - t\,} \right| = 3\ln \left( {t - x} \right) =   \cr
  &  = 3\ln \left( {\left( {t - s} \right) - \left( {x - s} \right)} \right)
 = 3\ln \left( {t - s} \right) + 3\ln \left( {1 - {d \over {t - d}}\left( {{{x - s} \over d}} \right)} \right) =   \cr
  &  = 3\ln \left( {t - s} \right) - 3{d \over {t - d}}\left( {{{x - s} \over d}} \right)
 - {3 \over 2}\left( {{d \over {t - d}}} \right)^{\,2} \left( {{{x - s} \over d}} \right)^{\,2}
  + O\left( {\left( {{{x - s} \over d}} \right)^{\,3} } \right) \cr}
$$

Therefore the maximum between $r_1$ and $r_2$ will move
of the following amount
$$
\left( {{{x - s} \over d}} \right) = 0\quad
  \Rightarrow \quad \left( {{{x - s} \over d}} \right) \approx  - {{3{d \over {t - d}}}
 \over {3\left( {{d \over {t - d}}} \right)^{\,2}  + 2}}
$$

Generalization

The example above straitghtly suggests how to generalize it.

Always given the $n$ roots $r_1,\, r_2, \,  \ldots , \, r_n$ arranged in a non-decreasing order
from the logarithm defined above
$$
L_{\,n} (x) = \ln \left| {\,p_{\,n} (x)\,} \right|
 = \sum\limits_{k = 1}^n {\ln \left| {\,x - r_{\,k} \,} \right|}
$$
we know that the positions of the extremes is given by the solutions to
$$
0 = L_{\,n} '(x) = \sum\limits_{k = 1}^n {{1 \over {\,x - r_{\,k} \,}}}  = {{p_{\,n} '(x)} \over {p_{\,n} (x)}}
$$
which actually is a $n-1$ degree polynomial.

If the roots were only two (or if they are quite isolated from the others) there would be an extreme right in the middle.

We want to estimate how much the extreme between a couple of roots is deviated from the middle due to the
influence of the other (external) roots.

So let's consider a consecutive couple of roots $r_j, \, r_{j+1}$ and let's define
$$
s_{\,j}  = {{r_{\,j + 1}  + r_{\,j} } \over 2}\quad d_{\,j}  = {{r_{\,j + 1}  - r_{\,j} } \over 2}
$$
and write
$$
\eqalign{
  & L_{\,j,\,n} '(x) = {1 \over {\,x - \left( {s_{\,j}  - d_{\,j} } \right)\,}}
 + {1 \over {\,x - \left( {s_{\,j}  + d_{\,j} } \right)\,}}
 + \sum\limits_{\left\{ {\matrix{   {k \ne j,\,j + 1}  \cr    {1\, \le \,k\, \le \,n}  \cr } } \right.}
 {{1 \over {\,x - r_{\,k} \,}}}  =   \cr
  &  = {{2\left( {x - s_{\,j} } \right)} \over {\,\left( {x - s_{\,j} } \right)^2  - d_{\,j} ^2 }}
 +  \sum\limits_{\left\{ {\matrix{   {k \ne j,\,j + 1}  \cr    {1\, \le \,k\, \le \,n}  \cr } } \right.}
 {{1 \over {\,\left( {x - s_{\,j} } \right) - \left( {r_{\,k}  - s_{\,j} } \right)\,}}}  =   \cr
  &  = {1 \over {d_{\,j} }}{{2\left( {{{x - s_{\,j} } \over {d_{\,j} }}} \right)}
 \over {\,\left( {\left( {{{x - s_{\,j} } \over {d_{\,j} }}} \right)^2  - 1} \right)}} + {1 \over {d_{\,j} }}
 \sum\limits_{\left\{ {\matrix{   {k \ne j,\,j + 1}  \cr    {1\, \le \,k\, \le \,n}  \cr } } \right.}
 {{1 \over {\,\left( {{{x - s_{\,j} } \over {d_{\,j} }}} \right)
 - \left( {{{r_{\,k}  - s_{\,j} } \over {d_{\,j} }}} \right)\,}}}  =   \cr
  &  = {1 \over {d_{\,j} }}\left( {{{2\xi _{\,j} } \over {\,\left( {\xi _{\,j} ^2  - 1} \right)}}
 +  \sum\limits_{\left\{ {\matrix{   {k \ne j,\,j + 1}  \cr    {1\, \le \,k\, \le \,n}  \cr } } \right.}
 {{1 \over {\,\xi _{\,j}  - \rho _{\,k,\,j} \,}}} } \right)  \cr
  & \left| {\; - 1 \le \xi _{\,j}  = {{x - s_{\,j} } \over {d_{\,j} }} \le 1 < \rho _{\,k,\,j}
  = {{r_{\,k}  - s_{\,j} } \over {d_{\,j} }}} \right. \cr}
$$

Since
$$
{1 \over {x - a}} =  - {1 \over a}{1 \over {\left( {1 - x/a} \right)}}
 =  - {1 \over a}\left( {1 + {x \over a} + \left( {{x \over a}} \right)^{\,2}
  + O\left( {\left( {{x \over a}} \right)^{\,3} } \right)} \right)
 \quad \left| {\;\left| {{x \over a}} \right| < 1} \right.
$$
and
$$
{x \over {\,\left( {x^2  - 1} \right)}}
 =  - x\left( {1 + O\left( {x^{\,2} } \right)} \right)
\quad \left| {\;\left| x \right| < 1} \right.
$$
we can approximate at various levels the expression for $L_{\,j,\,n} '(x)$,  the very first being
$$ \bbox[lightyellow] {
\eqalign{
  & 0 \approx  - 2\xi _{\,j}
  - \sum\limits_{\left\{ {\matrix{ {k \ne j,\,j + 1}  \cr {1\, \le \,k\, \le \,n}  \cr  } } \right.}
 {{1 \over {\,\rho _{\,k,\,j} }}}  - \xi _{\,j}
 \sum\limits_{\left\{ {\matrix{ {k \ne j,\,j + 1}  \cr  {1\, \le \,k\, \le \,n}  \cr  } } \right.}
 {{1 \over {\,\rho _{\,k,\,j} ^{\,2} }}} \quad  \Rightarrow   \cr
  &  \Rightarrow \quad \xi _{\,j}  \approx
  - \;  {{\sum\limits_{\left\{ {\matrix{   {k \ne j,\,j + 1}  \cr   {1\, \le \,k\, \le \,n}  \cr  } } \right.}
 {{1 \over {\,\rho _{\,k,\,j} }}} }
 \over
{2 + \sum\limits_{\left\{ {\matrix{ {k \ne j,\,j + 1} \cr  {1\, \le \,k\, \le \,n}  \cr } } \right.}
 {{1 \over {\,\rho _{\,k,\,j} ^{\,2} }}} }} \cr}
}$$


问:
Convex analysis: relative interior in finite and infinite dimension
Let $X$ be a normed space. Given a nonempty convex set $C \subset X$, the relative interior of $C$, denoted by $\text{ri} C$, is the set of the interior points of $C$, considered as a subset of $\text{aff} C$ (this is the smallest affine set which contains $C$). In other words,
$$
\text{ri} C = \left\{x \in X: \,  \exists \varepsilon > 0 \text{ s.t. } B(x; \varepsilon ) \cap \text{aff} C \subseteq C\right\}.
$$

Question n.1. How can I show that $\text{ri} C \ne \emptyset$? I have no idea on how to start, sincerely. The book gives some hint: for example, up to translations (which are allowed, since $\text{ri}(x+C)=x+\text{ri}C$ as one can easily verify), we can suppose $0 \in \text{aff} C$, i.e. the affine of $C$ is a subspace. Now we can consider a basis of this subspace, $(e_1, \ldots ,e_k)$: now how can I conclude?

Question n.2. Secondly, my book says that the concept of relative interior is important in finite dimension, since in infinite dimensions it can happen that a convex nonempty set has empty relative interior. Could you please provide an example of this? My book suggest considering a dense hyperplane with no interior points, but this is clearly a mistake (at least, it is a misleading counterexample, I cannot understand it).

Thanks.

答:
Suppose the dimension of aff $C$ is $k-1$, and choose $k$ affinely independent points of $C$. Denote them by $v_1,\ldots,v_k$. Since $C$ is convex, it contains the convex hull conv$(v_1,\ldots,v_k)$, that is, all points of the form $a_1v_1+\cdots a_kv_k$ for $a_1,\ldots,a_k\geq 0$ and $a_1+\cdots+a_k=1$. In particular it contains the point $x=(v_1+\cdots+v_k)/k$. Now, aff $C$ consists of all points of the form $a_1v_1+\cdots+a_kv_k$ for arbitrary $a_1,\ldots,a_k$. We can find a sufficiently small $\epsilon>0$ such that all points in aff $C$ at a distance at most $\epsilon$ from $x$ are contained in conv$(v_1,\ldots,v_k)$. Since conv$(v_1,\ldots,v_k)$ itself is contained in $C$, we are done. We have shown that $x\in$ Ri $C$.

I think the following works. Take $l^2(\mathbb R)$ to be your infinite dimensional normed space. Write $e_k=(0,0,\ldots,0,1,0,0,\ldots)$ for all $k$, where the $1$ is in the $k$th place, and let $e_0=(0,0,\ldots)$. Let $C$ be the convex hull of all the vectors $e_0,e_1,\ldots$. Then $C$ consists of all vectors of the form $(x_1,\ldots,x_m,0,\ldots)$ where $x_i\geq 0$ and $x_1+\cdots+x_m\le1$, for all $m\geq 0$, whereas aff $C$ consists of all vectors of the form $(x_1,\ldots,x_m,0,\ldots)$ for arbitrary $x_i$. No matter which such vector we pick, it will not be in the relative interior of $C$, because any ball centered at $x$ will contain the point $(x_1,\ldots,x_m,-\delta,0,\ldots)$ for some small $\delta>0$, which is in aff $C$, but it is not in $C$.


问:
How do i compute this integral for a moment generating function?
I'm trying to find the moment generating function of a random variable but I'm not sure how to compute this integral:

for $t<1$ How do i compute $\int_{0}^{\infty} \frac{1}{2} x^2 e^{tx-x} \,dx$

Body:
$$\begin{align}
  & u=\frac{1}{2}{{x}^{2}},\quad dv={{e}^{\left( t-1 \right)x}}dx \\
 & =\left. \frac{1}{2}{{x}^{2}}\frac{{{e}^{\left( t-1 \right)x}}}{t-1} \right|_{0}^{\infty }-\int_{0}^{\infty }{\overbrace{x}^{u}\overbrace{\frac{{{e}^{\left( t-1 \right)x}}}{t-1}}^{dv}dx} \\
 & =\left. \frac{1}{2}{{x}^{2}}\frac{{{e}^{\left( t-1 \right)x}}}{t-1} \right|_{0}^{\infty }-\left( \left. x\frac{{{e}^{\left( t-1 \right)x}}}{{{\left( t-1 \right)}^{2}}} \right|_{0}^{\infty }-\int_{0}^{\infty }{\frac{{{e}^{\left( t-1 \right)x}}}{{{\left( t-1 \right)}^{2}}}dx} \right) \\
 & =\left. \frac{1}{2}{{x}^{2}}\frac{{{e}^{\left( t-1 \right)x}}}{t-1} \right|_{0}^{\infty }-\left. x\frac{{{e}^{\left( t-1 \right)x}}}{{{\left( t-1 \right)}^{2}}} \right|_{0}^{\infty }+\left. \frac{{{e}^{\left( t-1 \right)x}}}{{{\left( t-1 \right)}^{3}}} \right|_{0}^{\infty } \\
 & =\frac{-1}{{{\left( t-1 \right)}^{3}}} \\
\end{align}$$


问:
what is the basis for the development of the following product
I have the following identity in my probability text book, but I was unable to relate it to a known development. Here, $A_n$ is a series of events.

答:
If you expand the product, there are $2^n$ terms.  The first one arises from taking the $1$ in each binomial factor $1 - 1_{A_k}$, yielding $1^n=1$.  Each of the other $2^n-1$ terms corresponds to a nonempty subset $S \subseteq \{1,2,\dots,n\}$.  Note that the product of characteristic functions is the characteristic function of the intersection: $1_{A} 1_{B} = 1_{A \cap B}$.

Putting it all together:
\begin{align}
\prod_{j=1}^n \left(1 - 1_{A_j}\right)
&= \sum_{S \subseteq \{1,\dots,n\}} \prod_{s \in S} \left(-1_{A_s}\right) \\
&= \sum_{S \subseteq \{1,\dots,n\}} (-1)^{|S|} \prod_{s \in S} 1_{A_s} \\
&= \sum_{S \subseteq \{1,\dots,n\}} (-1)^{|S|} 1_{A_{\prod_{s \in S}}} \\
&= \sum_{k=0}^n \sum_{\substack{S \subseteq \{1,\dots,n\}:\\ |S|=k}} (-1)^k 1_{A_{\prod_{s \in S}}} \\
&= 1 + \sum_{k=1}^n  (-1)^k \sum_{\substack{S \subseteq \{1,\dots,n\}:\\ |S|=k}} 1_{A_{\prod_{s \in S}}} \\
&= 1 - \sum_{k=1}^n (-1)^{k-1} \sum_{\substack{S \subseteq \{1,\dots,n\}:\\ |S|=k}} 1_{A_{\prod_{s \in S}}} \\
\end{align}

This is a generalization of the binomial theorem
$$\prod_{j=1}^n (1-x) = (1-x)^n = \sum_{k=0}^n \binom{n}{k} (-1)^k x^k.$$


问:
Let $\Bbb R$ be a field of all real numbers. Prove that $x+1$ is not a unit in $\Bbb R[x]$.
Let $\Bbb R$ be a field of all real numbers. Prove that $x+1$ is not a unit in $\Bbb R[x]$.

Attempts:

Suppose that $x+1$ is a unit in $\Bbb R[x]$. Then, there is exists $g(x) \in \Bbb R[x]$ such that $(x+1)g(x) = 1_R$.

Now, we have
\begin{equation*}
deg(x+1) + deg(g(x)) = deg((x+1)g(x)) = deg(1_R) = 0
\end{equation*}
Thus, we have
\begin{align*}
deg(x+1) + deg(g(x)) &= 0 \\
1 + deg(g(x)) &= 0 \\
deg(g(x)) &= -1
\end{align*}
which is a contradiction since $deg(f(x))$ must be non-negative integers for all $f(x) \in \Bbb R[x]$.
Hence, $x+1$ is not a unit in $\Bbb R[x]$.

Is the above true?

答:
Yes, this is correct.

Another way to see this is that $\Bbb{R}[x]/(x+1)\cong \Bbb{R}$ and hence $(x+1)\ne \Bbb{R}[x]$ so that $x+1$ is not a unit.


问:
Computing the probability of a type-1 error
Let $X_1, X_2,\dots, X_{130}$ be a sample from $GAM(θ, k).$ This sample is used for a
hypothesis test. The null hypothesis is
$θ = 2$ and $k = 2$
and the alternative hypothesis is irrelevant for this question. The test statistic is
$\log(X_{0.3}),$
where log is the natural logarithm and $X_{0.3}$ is the 30th percentile of the sample. The
critical region for this hypothesis test and this test statistic is
(−∞, 0.477] .
Compute (approximately) α, the probability of a type-I error.

答:
There are two possible parameterizations of a gamma distribution: one in which the second parameter is a scale parameter and on in which the second parameter is a rate parameter. In your case it makes a difference whether
the mean of the distribution is 4 or 1, respectively. I have interpreted $k$ as a scale parameter, so that the rate (used by R) is $1/k.$

[Also, the rejection region is clearly for a one-sided test, so it is not quite accurate to say that the alternative is irrelevant, even though we do not have particular alternative values of
the parameters in mind.]

For an analytic solution you'd need to derive the distribution of the 39th order statistic $X_{39:130}$ in a sample of size 130 (see Note). Then find the probability in that distribution below $\ln(X_{39:130}).$

Below I have given an approximate solution by simulating (in R)
a million samples of size 120. It seems $\alpha \approx 0.0015.$

```<code>set.seed(2020)
n = 130;  k = 2
x.3 = replicate(10^6, quantile(rgamma(n,k,1/k),.3))
mean(log(x.3) <= 0.477)
[1] 0.001453
</code>```

```<code>hist(x.3, prob=T, br=50, col="skyblue2")
 abline(v = exp(.477), col="red", lwd=2, lty="dotted")
</code>```

Note: The simulated distribution of $X_{36:120}$ seems
approximately normal, so you might be able to use the
asymptotic normal distribution of the 30th quantile.

Body:
There are two possible parameterizations of a gamma distribution: one in which the second parameter is a scale parameter and on in which the second parameter is a rate parameter. In your case it makes a difference whether
the mean of the distribution is 4 or 1, respectively. I have interpreted $k$ as a scale parameter, so that the rate (used by R) is $1/k.$

[Also, the rejection region is clearly for a one-sided test, so it is not quite accurate to say that the alternative is irrelevant, even though we do not have particular alternative values of
the parameters in mind.]

For an analytic solution you'd need to derive the distribution of the 39th order statistic $X_{39:130}$ in a sample of size 130 (see Note). Then find the probability in that distribution below $\ln(X_{39:130}).$

Below I have given an approximate solution by simulating (in R)
a million samples of size 120. It seems $\alpha \approx 0.0015.$

set.seed(2020)
n = 130;  k = 2
x.3 = replicate(10^6, quantile(rgamma(n,k,1/k),.3))
mean(log(x.3) <= 0.477)
[1] 0.001453

hist(x.3, prob=T, br=50, col="skyblue2")
 abline(v = exp(.477), col="red", lwd=2, lty="dotted")

Note: The simulated distribution of $X_{36:120}$ seems
approximately normal, so you might be able to use the
asymptotic normal distribution of the 30th quantile.


问:
How to find the image of the map $\mathbf{x} \mapsto \mathbf{x}-(\mathbf{x} \cdot \mathbf{n}) \, \mathbf{n}$?
I'm trying to find the image of the linear map $$\mathbf x \mapsto \mathbf{x}-(\mathbf{x} \cdot \mathbf{n}) \, \mathbf{n} = \mathbf x'$$ in $\mathbb{R}^3$, where $\mathbf x$ is a (varying) vector in $\mathbb R^3$ and $\mathbf n$ is a given unit vector.

So far, by taking the cross product of both sides, I have obtained $$\mathbf x' \times \mathbf n = \mathbf x \times \mathbf n$$ where $\mathbf x'$ is the vector that $\mathbf x$ is mapped to.

This shows that for given $\mathbf x$, we have that $\mathbf x'$ lies on a line passing through $\mathbf x$ that is parallel to $\mathbf n$ (the same direction as $\mathbf n$). However, we don't know whether the entire line is contained in the image of the map so cannot leave it there.

I have also noticed that $(\mathbf{x} \cdot \mathbf{n}) \, \mathbf{n}$ is the component of $\mathbf x$ parallel to $\mathbf n$ so is the projection of $\mathbf x$ onto $\mathbf n$. This means that the image of the map is the perpendicular component of $\mathbf x$ with respect to $\mathbf n$.

I have these pieces of information but am not sure how to find a precise way to express exactly what subset of $\mathbb R^3$ is mapped to by this function.

答: Hint: $f(x)=x-(x.n)n,  f(x).n =0$ and if $ x.n=0, f(x)=x$ implies that the image is the orthogonal of $n$. $f$ is the orthogonal projection to the orthogonal of $n$.


问:
Differentiating an integral with FTC
Question: How to differentiate function $x\rightarrow$$\int^x_0 f(x-t)g(t)dt$?

My solution attempt: $$\int^x_0 f(x-t)g(t)dt=\left[f(x-t)G(t) \right]^x_0-\int^x_0 f'(x-t)\cdot(-1)\cdot G(t)dt=f(0)G(x)-f(x)G(0)+\int^x_0f'(x-t)G(t)dt$$

If I differentiate it, I get: $$\frac{d}{dt}\int^x_0f(x-t)g(t)dt=0\cdot G(x)+f(0)g(x)-f'(x)G(0)-f(x)\cdot 0 + \frac{d}{dt}\int^x_0f'(x-t)G(t)dt =$$ $$=\frac{d}{dt}\int^x_0f'(x-t)G(t)dt+f(0)g(x)-f'(x)G(0)$$

I checked the solution with WolframAlpha and it seems I'm wrong.

答: If I'm reading this correctly when you differentiate the function $x \mapsto \int_{0}^{x} f(x-t)g(t) dt$ you must differentiate with respect to $x$, not $t$. $t$ is just some dummy variable. It may help to think of it like this: let $F(x) = \int_{0}^{x} f(x-t)g(t) dt$, and compute $\frac{dF}{dx}$. Can you see how the FTC will apply?

Title: Differentiating an integral with FTC


问:
Differentiability doesn't imply Lipchitz for $f:U\subset\Bbb R^n\to\Bbb R$.
I've got this question on my mind for a while and I can't find an argument for it. Here goes my question.

Let $U\subset\Bbb R^n$ an open set and $f:U\to\Bbb R$ differentiable at $a\in U$. Exist $r>0$ such that $B(a,r)\subset U$, then for every vector $h\in\Bbb R^n$ with $|h|<r$ follows $a+h\in B(a,r)$. By the differentiability at $a$ we have

$$f(a+h)-f(a)=\langle\nabla f(a),h\rangle+r(h),\quad\lim_{h\to0}\frac{r(h)}{h}=0.$$

Since $\displaystyle\lim_{h\to0}\frac{r(h)}{h}=0,$ exist $\varepsilon>0$ such $|h|<\varepsilon\Rightarrow|r(h)|<|h|$. Then, for every $|h|<\varepsilon$ we have
$$|f(a+h)-f(a)|=\left|\langle\nabla f(a),h\rangle+r(h)\right|\leq\left|\langle\nabla f(a),h\rangle\right|+|r(h)|\leq|\nabla f(a)||h|+|h|.$$
So we get $M>0$ such that $|f(a+h)-f(a)|\le M|h|$.

But why is it not possible tweak these steps to find $\varepsilon>0$ and $M>0$ such that $|f(x)-f(y)|\leq M|x-y|$ for every $x,y\in B(a,\varepsilon)$ ?

答:
The easy answer: There are counterexamples. For example, suppose we take $n=1$ and define $f(x)=x^2$ if $x$ is rational, $f(x)=0$ otherwise. Then $f'(0)=0.$

But for any $r>0$ you can find a non-zero rational $x\in (-r,r).$ For this $x,$ there is a sequence $y_n$ of irrationals converging to $x.$ For this sequence we have

$$\tag 1 \frac{f(y_n)-f(x)}{y_n-x}=\frac{-x^2}{y_n-x}.$$

This is unbounded as $n\to\infty$ because the numerator just sits there at a nonzero value, while the denominator $\to 0.$ And because $(1)$ is unbounded, we have a counterexample.


答:
Just to be a bit different, note that a binomial expansion tells us

$$7^7=(1+6)^7=1+7\cdot6+(\text{stuff})\cdot6^2\equiv43\equiv-2\mod 9$$

since $6^2\equiv0$ mod $9$, and thus, since $13\equiv4$, $19\equiv1$, and $23\equiv-4$ mod $9$, we have

$$1^7+7^7+13^7+19^7+23^7\equiv1^7-2+4^7+1^7+(-4)^7=1-2+4^7+1-4^7=0\mod 9$$

Body:
Show that $1^7+7^7+13^7+19^7+23^7\equiv{0}\pmod{63}$

According to Fermat's theorem:

$$1^7+7^7+13^7+19^7+23^7\equiv{1+7+13+19+23}\pmod{7}\equiv{63}\pmod{7}\equiv{0}\pmod{7}$$

Now we need to show: $1^7+7^7+13^7+19^7+23^7\equiv{0}\pmod{9}$ , but how??


问:
What does $\doteqdot$ mean?
I am reading the following document of Solitary waves page $14$. And I found the following symbol $\doteqdot$.

What does  $\doteqdot$ mean? For example:
$$y_t \doteqdot -c_0y_x $$

答:
After the very first equation (1.1) is this line

breaking occurs for a≑d. ...

so I think that it means "approximately equal to" which is usually written with ≈. I don't know why the author decided to use this symbol. It must
be a rare usage because I had not seen it used before.

Title: What does $\doteqdot$ mean?


问:
Rewriting constraints of a minimization problem to create an LP
Linear Program

I understand that in order to formulate a minimization problem as a linear program, I would have to rewrite the constraints as a linear set of equalities or inequalities. How would I rewrite the L1 norm as a set of linear inequalities/equalities?

答:
Rewrite the L1 norm as a sum of absolute values $\sum_i |y_i|$ and linearize each absolute value.  Here are the two standard ways to reformulate $\sum_i |y_i|\leq1$:

Two variables and one equality:
\begin{align}
y_i^+ - y_i^- &= y_i \\
y_i^+ &\ge 0 \\
y_i^- &\ge 0 \\
\sum_i (y_i^+ + y_i^-) &\le 1
\end{align}

One variable and two inequalities:
\begin{align}
z_i &\ge y_i \\
z_i &\ge -y_i \\
\sum_i z_i &\le 1
\end{align}


问:
How to represent the floor function using mathematical notation?
I'm curious as to how the floor function can be defined using mathematical notation.

What I mean by this, is, instead of a word-based explanation (i.e. "The closest integer that is not greater than x"), I'm curious to see the mathematical equivalent of the definition, if that is even possible.

For example, a word-based explanation of the factorial function would be "multiply the number by all integers below it", whereas a mathematical equivalent of the definition would be $n! = \prod^n_{i=1}i$.

So, in summary: how can I show what $\lfloor x \rfloor$ means without words?

答:
Recursive way: $\lfloor x\rfloor \equiv \begin{cases}
1+\lfloor x-1\rfloor& x\ge1 \\
-1+\lfloor x+1\rfloor& x<-1 \\
0&0\le x<1\\
-1&-1\le x<0
\end{cases}$

Also directly(sort of) computes the answer.


问:
IVT-related Topology question
Is $[a,b]$ in ${\mathbb{R}_L}$ connected in the subspace topology?

I am trying to see whether or not the IVT applies for $[a,b]$ in the topology inherited from $\mathbb{R}_L$ instead of $[a,b]$ inherited from $\mathbb{R}_U$. My proof of the IVT relies on $[a,b]$ being connected in the subspace topology so this would be helpful.

答:
For a counterexample to the intermediate value theorem when $[a,b]$ has the Sorgenfrey (or lower limit) topology, fix a point $c\in(a,b)$, and define $f:[a,b]\to\Bbb R$ as follows:

$$f(x)=\begin{cases}
0,&\text{if }a\le x<c\\
1,&\text{if }c\le x\le b\,.
\end{cases}$$

Because $[a,c)$ is both open and closed in $[a,b]$, $f$ is continuous, and $f$ assumes no value strictly between $f(a)=0$ and $f(b)=1$.

Title: IVT-related Topology question


问:
Is limit a value or a representation technique/notation?

$\lim_{x\to 0}f(x)=L$

According to Wikipedia,

A limit is the value that a function (or sequence) "approaches" as the input (or index) "approaches" some value.

According to the Khan Academy,

Limits describe how a function behaves near a point, instead of at that point.

Is limit a value or a representation technique/notation?

答:
Both.  But "limit" is not the only place we say things two ways.

Does $3+4$  mean the process of adding $3$ and $4$, or does it mean the result of that addition?  We can say "The first summand in $3+4$ is odd".  But we can also say "$3+4$ is a prime number".

We can say "The series $\sum_{n=0}^\infty \frac{1}{n!}$ converges."  But we can also say "$\sum_{n=0}^\infty \frac{1}{n!}$ is irrational".


问:
Expected number of trials for either A or B to occur
Suppose we are playing a game where the player gets 3 points for a win, 1 point for a draw and 0 points for a loss. The probabilities are as follows

P(Win) = 0.2

P(Draw) = 0.5

P(Loss) = 0.3

What is the expected number of games before a player has 3 points or more?

I am unsure quite how to approach the problem, the expected number of games for a win would be 5 and the expected number of games for 3 draws would be 6 games so we would expect it to take less than 5 games to reach the 3 point threshold. My instinct would be to add together the probabilities in some way but I think that needing at least 3 games to get the points via draws is confusing me.

答:
You want the expected count for trials until the earliest of the first win or the third draw.

That is: $1 +$ the expected count of trials where no win or at most two draws have occurred.

Let $X_k$ be the indicator for the event that no win or at most two draws have occurred on or before trial $k$.

The probability that this event occurs is: $\mathsf E(X_k) $

And so the expected count you seek is: $1+\sum\limits_{k=1}^\infty \mathsf E(X_k)$

Your task is to evaluate that probability and find the closed form for the series.


问:
$\frac{(x + \sqrt{x}) - (x-\sqrt{x})}{\sqrt{x+\sqrt{x}}+\sqrt{x-\sqrt{x}}} = \frac{2}{\sqrt{1+\frac{1}{\sqrt{x}}}+\sqrt{1-\frac{1}{\sqrt{x}}}}$?
According to an example in my text book:

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

I don't see how this works. The closest I can get is:

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

Which is slightly off. But I'm not even sure if I calculated that correctly. What am I missing, what's the way to think?

答:
You have
$$
\sqrt{x+\sqrt{x}}+\sqrt{x-\sqrt{x}} = \sqrt{x(1 + \frac{1}{\sqrt{x}})} + \sqrt{x( 1 - \frac{1}{\sqrt{x}})}
$$
It looks like you only factored out a $\sqrt{x}$ from last term.</p>


问:
Number of multiplicative inverses in $\mathbb{Z}_m$
Is there a formula for the number of multiplicative inverses (invertibles) in $\mathbb{Z}_m$? I know one way would be to count for how many elements $n \in \mathbb{Z}_m$, $0<n<m$ the following equation satisfies: $\gcd (n,m)=1$.

答: Yes, this is precisely what the Euler totient function $\phi(n)$ counts. It is also easy to compute given a prime factorisation of $n$ as $\phi(p^n)=p^n-p^{n-1}$ for prime $p$, and $\phi$ is multiplicative.


问:
A Level Discrete Mathematics Combination with Repetition Integer Solutions Question
How many solutions are there to the equation:

$$ x_1 + x_2 + x_3 + x_4 + x_5 = 21 $$

where $x_i$, $i = 1,2,3,4,5$ is a nonnegative integer such that $$0 \leq x_1 \leq 3, \quad1 \leq x_2 < 4, \quad \text{and} \quad x_3 \geq 15$$

If I think about each $x_i$, $i = 1,2,3,4,5$ as categories and $21$ ones to distribute between them, then I can use the combination with repetition formula. For example, when the only condition is that $x_i$, $i = 1,2,3,4,5$ is a nonnegative integer, I can get the answer of $12~650$ solutions by using the combination with repetition formula as follows.

$$
\qquad \qquad C(n + r - 1, n-1)
\\ \qquad \qquad \qquad =C(5 + 21 - 1, 5 -1 )
\\=12 \,650
$$

I don't know how to solve conditions on multiple variables at the same time. Any suggestions?

答:
Let me help you along the way.

We know that $x_3\geq 15$. That means that if we define $y_3=x_3-15$ then we have $y_3>0$ and $x_1+x_2+y_3+x_4+x_5=21-15=6$. Use this trick again on $x_2$ (which has $1\leq x_2\leq 3$) and we have $x_1+y_2+y_3+x_4+x_5=5$ where our only constraints are that everything is a non-negative integer, and $0\leq x_1\leq 3$ and $0\leq y_2\leq 2$.

So if you count the cases now, using the method that you know, then you're almost done. All you need to do is make sure that $x_1$ and $y_2$ are $\leq 3$. If you calculate how many times we get $x_1>3$ or $y_2>2$, then subtracting that from the count should give you the final result.

Hope this helps! Good luck.


问:
Find all functions $f:\mathbb R\to\mathbb R$ such that $f\big(x+f(y)\big)=f(x+y^n)+f\big(y^n-f(y)\big),\ \forall x,y\in\mathbb R$

Let $ n = 2018 $. Find all functions $ f : \mathbb R \to \mathbb R $ such that
$$ f \big( x + f ( y ) \big) = f ( x + y ^ n ) + f \big( y ^ n - f ( y ) \big) ,\ \forall x , y \in \mathbb R \text . $$

I tried the standard way: $ x = 0 $, $ x = y $, $ x = 1 $, $ \dots $, but without any success. I spent quite some time trying to solve it but without success!

I tried to reduce it to Cauchy's $ 1 - 4 $ equations but didn't succeed. In the course of it, I found interesting works of Aczél, Erdős and even Putnam, but they are not directly related, I guess.

Any ideas? I am interested in this problem but I couldn't solve it!

答:
It can be shown that for any integer $ n \ge 2 $, the only functions $ f : \mathbb R \to \mathbb R $ satisfying
$$ f \big( x + f ( y ) \big) = f ( x + y ^ n ) + f \big( y ^ n - f ( y ) \big) \tag 0 \label 0 $$
for all $ x , y \in \mathbb R $ are $ f ( x ) = 0 $ and $ f ( x ) = x ^ n $. It's easy to see that these functions are solutions. We prove that they are the only ones.

Letting $ x = - f ( y ) $ in \eqref{0} we have
$$ f \big( y ^ n - f ( y ) \big) = \frac 1 2 f ( 0 ) \text . \tag 1 \label 1 $$
\eqref{1} can be used to rewrite \eqref{0} as
$$ f \big( x + f ( y ) \big) = f ( x + y ^ n ) + \frac 1 2 f ( 0 ) \text . \tag 2 \label 2 $$
\eqref{2} can be used to derive
$$ f \left( x - \frac 1 2 f ( 0 ) + y ^ n \right) + \frac 1 2 f ( 0 ) = f \left( x - \frac 1 2 f ( 0 ) + f ( y ) \right) \\
= f \left( x - \frac 1 2 f ( 0 ) + f \Big( \big( y - f ( z ) \big) + f ( z ) \Big) \right) = f \Big( x + f \big( y - f ( z ) + z ^ n \big) \Big) \\
= f \Big( x + \big( y - f ( z ) + z ^ n \big) ^ n \Big) + \frac 1 2 f ( 0 ) \text , $$
which by substituting $ x - y ^ n + \frac 1 2 f ( 0 ) $ for $ x $ yields
$$ f ( x ) = f \left( x + \big( y - f ( z ) + z ^ n \big) ^ n - y ^ n + \frac 1 2 f ( 0 ) \right) \text . \tag 3 \label 3 $$

The last step implies that if $ f ( z ) \ne z ^ n $ for any $ z \in \mathbb R $, then $ f $ is constant. This will prove what is desired, as the only constant function $ f $ satisfying \eqref{0} is clearly the zero function. To see why the claimed implication holds, choose $ z $ as such, and define $ g : \mathbb R \to \mathbb R $ with $ g ( y ) = \big( y - f ( z ) + z ^ n \big) ^ n - y ^ n + \frac 1 2 f ( 0 ) $. As $ g $ is a nonconstant polynomial, $ \operatorname {ran} g $ is either $ \mathbb R $, $ [ a , + \infty ) $ for some $ a \in \mathbb R $ or $ ( - \infty , a ] $ for some $ a \in \mathbb R $. This will depend on parity of $ n $, and also on whether $ f ( z ) < z ^ n $ or $ f ( z ) > z ^ n $. In any case, for any $ x , y \in \mathbb R $, we can choose $ z \in \mathbb R $ so that both $ z - x $ and $ z - y $ are in $ \operatorname {ran} g $, which by \eqref{3} shows that
$$ f ( x ) = f \big( x + ( z - x ) \big) = f ( z ) = f \big( y + ( z - y ) \big) = f ( y ) \text , $$
and hence $ f $ is constant.


答:
$\sqrt{x \pm \sqrt x} = \sqrt{x (1\pm\frac {\sqrt x}{x}}) = \sqrt x \sqrt{1\pm\frac {1}{\sqrt x}}$

Looks like you swapped the terms on both sides of the negative $-$ sign. It is okay for the $+$ but not for the $-$.

Title: $\frac{(x + \sqrt{x}) - (x-\sqrt{x})}{\sqrt{x+\sqrt{x}}+\sqrt{x-\sqrt{x}}} = \frac{2}{\sqrt{1+\frac{1}{\sqrt{x}}}+\sqrt{1-\frac{1}{\sqrt{x}}}}$?

Body:
According to an example in my text book:

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

I don't see how this works. The closest I can get is:

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

Which is slightly off. But I'm not even sure if I calculated that correctly. What am I missing, what's the way to think?


答:
The most common formula is $\phi(m) = m\prod_{p|n;p\ prime}(1-\frac 1p)$ (So, for example, $\phi(24) = 24(1-\frac 12)(1-\frac 13) = 24\cdot \frac 12\cdot \frac23=8$.)  But I personally prefer $\phi(\prod p_i^{a_i}) =\prod p_i^{a_i-1}\prod(p_i - 1)$.  (So, for example $\phi (24) = \phi(2^3\cdot 3) = (2^2\cdot 3^0)(2-1)(3-1) = 8$.)

These handy rules will never let you down:  If $p$ is prime then $\phi(p) = p-1$.  And $\phi(p^k) = p^{k-1}(p-1)$.  ANd if $\gcd(m,n) = 1$ then $\phi(mn) = \phi(m)\cdot\phi(n)$.

Title: Number of multiplicative inverses in $\mathbb{Z}_m$

Body: Is there a formula for the number of multiplicative inverses (invertibles) in $\mathbb{Z}_m$? I know one way would be to count for how many elements $n \in \mathbb{Z}_m$, $0<n<m$ the following equation satisfies: $\gcd (n,m)=1$.


问:
Closed set of infinite union
Let $A = \{0\} \cup \left\{\frac{1}{n}: n \geq 2\right\}$. Consider $$A_1 = A \cup \left\{\frac{1}{n} + \frac{1}{k}\left(\frac{1}{n-1}-\frac{1}{n}\right): k \geq 2\right\}.$$
I'm basically constructing a sequence that approaches each point in $A$ from the right. Repeat this process; for $i \in \mathbb{N}$, $A_{i+1}$ is the union of $A_i$ along with all the sequences that approach each point in $A_i$ from the right. Is it true that $\bigcup_{i \geq 1} A_i$ is closed?

答:
Based on your definiton, $\bigcup_{i\geq 1}A_{i}$ is not closed.

You can always construct a sequence of points by choosing one point $a_{i}$ from each $A_{i}$ (from the group of points that approach $a_{i-1}$). As long as you make each $a_{i}$ close enough to $a_{i-1}$, your sequence $\{a_{i}\}_{i\geq 1}$ will not converge to any point from any of the $A_{k}$'s.

More specifically, in your construction of the $A_{i}$'s, the sequence of points $\{\max A_{i}\}_{i\geq 1}$ converges to 1, but 1 is certainly not contained in any of your $A_{i}$'s.

Title: Closed set of infinite union


答:
Use this equalities
$$(x + \sqrt{x}) - (x-\sqrt{x})=2\sqrt{x}$$
and
$$\sqrt{x+\sqrt{x}}=\sqrt{x(1+\frac{1}{\sqrt{x}})}=\sqrt{x}\sqrt{1+\frac{1}{\sqrt{x}}}$$
and the same result for
$$\sqrt{x-\sqrt{x}}$$
then simplify.</p>


问:
How do I compute convergence of taylor series generated by f(x) = x^5(sin(2x)) at x = 0?
I know that the taylor series for sin is:

[x^(2n+1)]/(2n+1)!

I know that 2x can just be plugged in for x. What happens to the x^5?


问:
Subgroups of $\mathbb{Z}^*_{29}$
Assume the group $G = \mathbb{Z}^*_{29} = \{1,2,\dots, 28 \}$ with operation of multiplication modulo $29$.

Since $G$ is cyclic, for every $d \in \{1,2,4,7,14,28 \}$, there exists a $H \leq G$ with $|H| = d$.

$d=1$: $H_1 = \{1\}$

$d = 2$: $H_2 = \{1, 28\}$, since $28^2 \mod 29 = 1$

$d= 4$: $H_3 = \{1,12,17,28 \}$, since $12 \cdot 17 \mod 29 = 1$ and we have closure.

Is there a way to yield the subgroups of order $7$ and $14$, without having to check all the possible combinations to assert closure?

答:
The following table demonstrates that $(\mathbb Z/29\mathbb Z)^\times$ is cyclic with generator (primitive root) $2$:

$\begin{array} 1&n&1&2&3&4&5&6&7&8&9&10&11&12&13&14\\
&2^n\bmod29&2&4&8&16&3&6&12&24&19&9&18&7&14&28\\ \\
&n&15&16&17&18&19&20&21&22&23&24&25&26&27&28\\
&2^n \bmod29&27&25&21&13&26&23&17&5&10&20&11&22&15&1\end{array}.$

(Note that $2^{14}\equiv-1\bmod29$, so $2^{14+n}\equiv-(2^n)\bmod29$.)

Now we can take advantage of the isomorphism (same structure) between $(\mathbb Z/29\mathbb Z)^\times$ and $\mathbb Z/28\mathbb Z$

to conclude (without checking all the possible products to assert closure),

that the subgroup of order $7$ is $\{16,24,7,25,23,20,1\}$,

and the subgroup of order $14$ is $\{4,16,6,24,9,7,28,25,13, 23,5,20,22,1\}$.

Title: Subgroups of $\mathbb{Z}^*_{29}$


问:
A followup question on surreal numbers and Collatz iteration game
This question is not a duplicate of the previous, because here we use a different function and get different values for the games:

Let us define a game based on the modified Collatz function $T(n) = n/2$ if $n$ is even, otherwise $=(3n+1)/2$.

Each number $n$ represents a game played by left $L$ and right $R$:

$$g(n) = \{L_n | R_n \}$$

The rules of the game are:

If $n$ is even, the left player can play the game:

$$g(n) = \{g(n/2) |  \}$$

If $n \neq 1$ is odd, the right player can play the game:

$$g(n) = \{| g((3n+1)/2) \}$$

If $n=1$, the game is over as no player can make a move:

$$g(n)=g(1) = \{| \}$$

Assuming the Collatz conjecture is true, this game starting with an arbitrary number $n$, has always an end.

So these games define surreal numbers and we could add and multiply, negate those games, which I think would be fun.

Q: How do I find the numeric value of these surreal numbers and what interpretation can be given to these values?

Here are some examples, but I do not see any pattern, where $g(n)$ denotes the numerical value of $n$:

$n,g(n)$

```<code>1 0
2 1
3 -1
4 2
5 0
6 0
7 -2
8 3
9 -1
10 1
11 -1
12 1
13 0
14 0
15 -3
16 4
17 0
18 0
19 -1
20 2
21 0
22 0
23 -2
24 2
25 -1
26 1
</code>```

Some more examples in SAGEMATH

Related question:  Conway's surreal numbers and the Collatz iteration as a game?

答:
Setup

I have a characterization, but the answer is pretty complicated. These
definitions depend on the Collatz conjecture being true.

I will define a function related to the Collatz conjecture that associates
strings of "$\mathrm{E}$"s and "$\mathrm{O}$"s to the positive
integers. I will use multiplicative notation for concatenating strings,
so that $\mathrm{E}\left(\mathrm{OE}\right)=\mathrm{EOE}$ and $\mathrm{E}^{3}=\mathrm{EEE}$.
Define $C\left(1\right)$ to be the empty string. Then, for $n>1$,
define $C(n)=\begin{cases}
\mathrm{E}C\left(\frac{n}{2}\right) & \text{if }n\text{ is even}\\
\mathrm{O}C\left(\frac{3n+1}{2}\right) & \text{if }n\text{ is odd}
\end{cases}$. For example, $C\left(7\right)=\mathrm{OOOEOEEOEEE}$, with the tail
$\mathrm{OEEE}$ coming from $5\overset{\mathrm{O}}{\to}8\overset{\mathrm{E}}{\to}4\overset{\mathrm{E}}{\to}2\overset{\mathrm{E}}{\to}1)$.
We can abbreviate this as $C\left(7\right)=\mathrm{O}^{3}\mathrm{E}^{1}\mathrm{O}^{1}\mathrm{E}^{2}\mathrm{O}^{1}\mathrm{E}^{3}$.

Answer

We can express the values of $g$ in terms of $C$ in a relatively
simple way. Note that $g\left(1\right)=0$ by definition. For $n>1$,
we have the following piecewise formula, where $m\ge1$ is the length
of the initial run and $k\ge0$:

$$
g\left(n\right)=\begin{cases}
\begin{cases}
m-1 & \text{if }C\left(n\right)=\mathrm{E}^{m}\left(\mathrm{OE}\right)^{k}\mathrm{O}^{2}\cdots\\
m & \text{if }C\left(n\right)=\mathrm{E}^{m}\cdots\text{ otherwise}
\end{cases} & \text{if }n\text{ is even}\\
\begin{cases}
1-m & \text{if }C\left(n\right)=\mathrm{O}^{m}\left(\mathrm{EO}\right)^{k}\mathrm{E}^{2}\cdots\\
-m & \text{if }C\left(n\right)=\mathrm{O}^{m}\cdots\text{ otherwise}
\end{cases} & \text{if }n\text{ is odd}
\end{cases}
$$
In other words, using $\mathrm{A}$ and $\mathrm{B}$ as stand-ins
for $\mathrm{E}$ and $\mathrm{O}$ in some order, and $\left[\mathrm{A}=\mathrm{O}\right]=\begin{cases}
0 & \text{if }\mathrm{A}=\mathrm{E}\\
1 & \text{if }\mathrm{A}=\mathrm{O}
\end{cases}$, we have:
$$
g\left(n\right)=\left(-1\right)^{\left[\mathrm{A}=\mathrm{O}\right]}*\begin{cases}
m-1 & \text{if }C\left(n\right)=\mathrm{A}^{m}\left(\mathrm{BA}\right)^{k}\mathrm{B}^{2}\cdots\\
m & \text{otherwise}
\end{cases}
$$

Proof

Since $C\left(n\right)$ determines $n$, I will define $G:\text{strings}\to\mathbb{N}$
so that $g\left(n\right)=G\left(c\right)$ if $c=C\left(n\right)$.
In order to show that the above formula for $g$/$G$ is correct for
$n>1$, we can induct on the number of alternations between $\mathrm{O}$
and $\mathrm{E}$.

Base cases

Firstly, $G\left(\mathrm{E}^{m}\right)=m$ (including if $m=0$) by
a straightforward induction on $m$. And secondly, for $j\ge1$, $$G\left(\mathrm{O}^{j}\mathrm{E}^{m}\right)=\left\{ \mid G\left(\mathrm{O}^{j-1}\mathrm{E}^{m}\right)\right\} =\begin{cases}
G\left(\mathrm{O}^{j-1}\mathrm{E}^{m}\right)-1 & \text{if }G\left(\mathrm{O}^{j-1}\mathrm{E}^{m}\right)\le0\\
0 & \text{if }G\left(\mathrm{O}^{j-1}\mathrm{E}^{m}\right)>0
\end{cases}\text{.}$$ Note that we must have $m\ge3$ (as $1,2,4$ can't be reached from
an odd number $n>1$). Therefore, $G\left(\mathrm{E}^{m}\right)>0$
and $G\left(\mathrm{O}\mathrm{E}^{m}\right)=0$. By induction on $j$,
$G\left(\mathrm{O}^{j}\mathrm{E}^{m}\right)=1-j$. This agrees with
the formula since $m\ge3$, so this has the form $G\left(\mathrm{O}^{j}\left(\mathrm{EO}\right)^{0}\mathrm{E}^{2}\cdots\right)$.

Induction step

E

Assume, for induction purposes, that the formula for $G$ holds for
all strings with a given number of alternations that begin with $\mathrm{E}$,
so that $G\left(\mathrm{E}^{\ell}\cdots\right)=\begin{cases}
\ell-1 & \text{if }\mathrm{E}^{\ell}\left(\mathrm{OE}\right)^{k}\mathrm{O}^{2}\cdots\\
\ell & \text{otherwise}
\end{cases}$.

Then we have $$G\left(\mathrm{O}\mathrm{E}^{\ell}\cdots\right)=\begin{cases}
\begin{cases}
-1 & \text{if }\mathrm{O}\mathrm{E}^{\ell}\left(\mathrm{OE}\right)^{k}\mathrm{O}^{2}\cdots\\
0 & \text{otherwise}
\end{cases} & \text{if }\ell=1\\
0 & \text{if }\ell>1
\end{cases}=\begin{cases}
-1 & \text{if }\left(\mathrm{OE}\right)^{k+1}\mathrm{O}^{2}\cdots\\
0 & \text{otherwise}
\end{cases}\text{.}$$ And $G\left(\mathrm{E}\mathrm{O}\mathrm{E}^{\ell}\cdots\right)=\begin{cases}
0 & \text{if }\mathrm{E}\left(\mathrm{OE}\right)^{k+1}\mathrm{O}^{2}\cdots\\
1 & \text{otherwise}
\end{cases}$. Since those values are nonnegative, we can conclude that $G\left(\mathrm{E}^{m}\mathrm{O}\mathrm{E}^{\ell}\cdots\right)=\begin{cases}
m-1 & \text{if }\mathrm{E}^{m}\left(\mathrm{OE}\right)^{k+1}\mathrm{O}^{2}\cdots\\
m & \text{otherwise}
\end{cases}$.

For higher powers of $\mathrm{O}$, now consider $G\left(\mathrm{O}^{2}\mathrm{E}^{\ell}\cdots\right)=\begin{cases}
-2 & \text{if }\mathrm{O}\left(\mathrm{OE}\right)^{k+1}\mathrm{O}^{2}\cdots\\
-1 & \text{otherwise}
\end{cases}$. And so, for $j\ge2$, $G\left(\mathrm{O}^{j}\mathrm{E}^{\ell}\cdots\right)=\begin{cases}
-j & \text{if }\mathrm{O}^{j-1}\left(\mathrm{OE}\right)^{k+1}\mathrm{O}^{2}\cdots\\
1-j & \text{otherwise}
\end{cases}$. Since these are all negative, $G\left(\mathrm{E}\mathrm{O}^{j}\mathrm{E}^{\ell}\cdots\right)=0$,
and $G\left(\mathrm{E}^{m}\mathrm{O}^{j}\mathrm{E}^{\ell}\cdots\right)=m-1$.
Note that $\mathrm{E}^{m}\mathrm{O}^{j}\mathrm{E}^{\ell}\cdots$ has
the form $\mathrm{E}^{m}\left(\mathrm{OE}\right)^{0}\mathrm{O}^{2}\cdots$,
so this agrees with our formula.

O

The induction steps for adding two alternations that begin with $\mathrm{O}$
are completely analogous. Just flip signs and swap $\mathrm E$ and $\mathrm O$.

Commentary

The formula for $g$ depends on $C$, which basically requires us
to run through an unbounded amount of steps of the Collatz sequence
for a number, which is not ideal. It also doesn't have an obvious
tidy characterization that's not recursive, like "write the $\mathrm{EO}$
string with $1$s and $0$s in a certain way, and then do something
with the number to get the value of $G$".

Simple cases

The only thing I could think to do is collect together some simple
cases that have a fixed form; but nothing can be done for the general
case as that essentially requires you to prove Collatz.

For example, the numbers with $C\left(n\right)=\mathrm{E}^{m}$ are
the powers of $2$, with $g\left(2^{m}\right)=m$. These are A000079 in the OEIS.

The numbers of the form $\mathrm{O}\mathrm{E}^{n}$ are those of the
form $(4^{k}-1)/3$ for $k\ge1$ (A002450), and they
have $g\left(n\right)=0$.

The numbers of the form $\mathrm{O}^{2}\mathrm{E}^{m}$ are those
of the form $\left(64^{k}-10\right)/18$ for $k\ge1$ (A228871),
and they have $g\left(n\right)=-1$.

The numbers of the form $E^{m}\mathrm{O}\mathrm{E}^{\ell}$ are those
of the form $2^{m}(4^{k}-1)/3$ for $k\ge1$ (A181666),
and have $g\left(n\right)=m$.

The numbers of the form $E^{m}\mathrm{O^{2}}\mathrm{E}^{\ell}$ are
those of the form $2^{m}\left(64^{k}-10\right)/18$ for $k\ge1$ (no
OEIS entry), and have $g\left(n\right)=m-1$.

The numbers of the form $\mathrm{O}\mathrm{E}^{m}\mathrm{O}\mathrm{E}^{\ell}$
have one of the two forms $\dfrac{4^{3k+r}-4^{r+1}-6}{18}$ or $\dfrac{4^{3k+r}-4^{r+2}-48}{144}$,
etc.

Simpler Code

Your Sage code appears to be doing all of the work of the Conway notation. But since these games only have one move for one of the two players, you can calculate values of $g$ in a much more straightforward way. I imagine you could port the following code to Sage if desired:

Wolfram Language (Mathematica)

```<code>g[x_] := g[x] = If[x == 1, 0,
  If[Mod[x, 2] == 0, If[g[x/2] >= 0, g[x/2] + 1, 0],
   If[g[(3 x + 1)/2] <= 0, g[(3 x + 1)/2] - 1, 0]]];
Table[g[x],{x,1,10000}]//Print
</code>```

Try it online!

Body:
Setup

I have a characterization, but the answer is pretty complicated. These
definitions depend on the Collatz conjecture being true.

I will define a function related to the Collatz conjecture that associates
strings of "$\mathrm{E}$"s and "$\mathrm{O}$"s to the positive
integers. I will use multiplicative notation for concatenating strings,
so that $\mathrm{E}\left(\mathrm{OE}\right)=\mathrm{EOE}$ and $\mathrm{E}^{3}=\mathrm{EEE}$.
Define $C\left(1\right)$ to be the empty string. Then, for $n>1$,
define $C(n)=\begin{cases}
\mathrm{E}C\left(\frac{n}{2}\right) & \text{if }n\text{ is even}\\
\mathrm{O}C\left(\frac{3n+1}{2}\right) & \text{if }n\text{ is odd}
\end{cases}$. For example, $C\left(7\right)=\mathrm{OOOEOEEOEEE}$, with the tail
$\mathrm{OEEE}$ coming from $5\overset{\mathrm{O}}{\to}8\overset{\mathrm{E}}{\to}4\overset{\mathrm{E}}{\to}2\overset{\mathrm{E}}{\to}1)$.
We can abbreviate this as $C\left(7\right)=\mathrm{O}^{3}\mathrm{E}^{1}\mathrm{O}^{1}\mathrm{E}^{2}\mathrm{O}^{1}\mathrm{E}^{3}$.

Answer

We can express the values of $g$ in terms of $C$ in a relatively
simple way. Note that $g\left(1\right)=0$ by definition. For $n>1$,
we have the following piecewise formula, where $m\ge1$ is the length
of the initial run and $k\ge0$:

$$
g\left(n\right)=\begin{cases}
\begin{cases}
m-1 & \text{if }C\left(n\right)=\mathrm{E}^{m}\left(\mathrm{OE}\right)^{k}\mathrm{O}^{2}\cdots\\
m & \text{if }C\left(n\right)=\mathrm{E}^{m}\cdots\text{ otherwise}
\end{cases} & \text{if }n\text{ is even}\\
\begin{cases}
1-m & \text{if }C\left(n\right)=\mathrm{O}^{m}\left(\mathrm{EO}\right)^{k}\mathrm{E}^{2}\cdots\\
-m & \text{if }C\left(n\right)=\mathrm{O}^{m}\cdots\text{ otherwise}
\end{cases} & \text{if }n\text{ is odd}
\end{cases}
$$
In other words, using $\mathrm{A}$ and $\mathrm{B}$ as stand-ins
for $\mathrm{E}$ and $\mathrm{O}$ in some order, and $\left[\mathrm{A}=\mathrm{O}\right]=\begin{cases}
0 & \text{if }\mathrm{A}=\mathrm{E}\\
1 & \text{if }\mathrm{A}=\mathrm{O}
\end{cases}$, we have:
$$
g\left(n\right)=\left(-1\right)^{\left[\mathrm{A}=\mathrm{O}\right]}*\begin{cases}
m-1 & \text{if }C\left(n\right)=\mathrm{A}^{m}\left(\mathrm{BA}\right)^{k}\mathrm{B}^{2}\cdots\\
m & \text{otherwise}
\end{cases}
$$

Proof

Since $C\left(n\right)$ determines $n$, I will define $G:\text{strings}\to\mathbb{N}$
so that $g\left(n\right)=G\left(c\right)$ if $c=C\left(n\right)$.
In order to show that the above formula for $g$/$G$ is correct for
$n>1$, we can induct on the number of alternations between $\mathrm{O}$
and $\mathrm{E}$.

Base cases

Firstly, $G\left(\mathrm{E}^{m}\right)=m$ (including if $m=0$) by
a straightforward induction on $m$. And secondly, for $j\ge1$, $$G\left(\mathrm{O}^{j}\mathrm{E}^{m}\right)=\left\{ \mid G\left(\mathrm{O}^{j-1}\mathrm{E}^{m}\right)\right\} =\begin{cases}
G\left(\mathrm{O}^{j-1}\mathrm{E}^{m}\right)-1 & \text{if }G\left(\mathrm{O}^{j-1}\mathrm{E}^{m}\right)\le0\\
0 & \text{if }G\left(\mathrm{O}^{j-1}\mathrm{E}^{m}\right)>0
\end{cases}\text{.}$$ Note that we must have $m\ge3$ (as $1,2,4$ can't be reached from
an odd number $n>1$). Therefore, $G\left(\mathrm{E}^{m}\right)>0$
and $G\left(\mathrm{O}\mathrm{E}^{m}\right)=0$. By induction on $j$,
$G\left(\mathrm{O}^{j}\mathrm{E}^{m}\right)=1-j$. This agrees with
the formula since $m\ge3$, so this has the form $G\left(\mathrm{O}^{j}\left(\mathrm{EO}\right)^{0}\mathrm{E}^{2}\cdots\right)$.

Induction step

E

Assume, for induction purposes, that the formula for $G$ holds for
all strings with a given number of alternations that begin with $\mathrm{E}$,
so that $G\left(\mathrm{E}^{\ell}\cdots\right)=\begin{cases}
\ell-1 & \text{if }\mathrm{E}^{\ell}\left(\mathrm{OE}\right)^{k}\mathrm{O}^{2}\cdots\\
\ell & \text{otherwise}
\end{cases}$.

Then we have $$G\left(\mathrm{O}\mathrm{E}^{\ell}\cdots\right)=\begin{cases}
\begin{cases}
-1 & \text{if }\mathrm{O}\mathrm{E}^{\ell}\left(\mathrm{OE}\right)^{k}\mathrm{O}^{2}\cdots\\
0 & \text{otherwise}
\end{cases} & \text{if }\ell=1\\
0 & \text{if }\ell>1
\end{cases}=\begin{cases}
-1 & \text{if }\left(\mathrm{OE}\right)^{k+1}\mathrm{O}^{2}\cdots\\
0 & \text{otherwise}
\end{cases}\text{.}$$ And $G\left(\mathrm{E}\mathrm{O}\mathrm{E}^{\ell}\cdots\right)=\begin{cases}
0 & \text{if }\mathrm{E}\left(\mathrm{OE}\right)^{k+1}\mathrm{O}^{2}\cdots\\
1 & \text{otherwise}
\end{cases}$. Since those values are nonnegative, we can conclude that $G\left(\mathrm{E}^{m}\mathrm{O}\mathrm{E}^{\ell}\cdots\right)=\begin{cases}
m-1 & \text{if }\mathrm{E}^{m}\left(\mathrm{OE}\right)^{k+1}\mathrm{O}^{2}\cdots\\
m & \text{otherwise}
\end{cases}$.

For higher powers of $\mathrm{O}$, now consider $G\left(\mathrm{O}^{2}\mathrm{E}^{\ell}\cdots\right)=\begin{cases}
-2 & \text{if }\mathrm{O}\left(\mathrm{OE}\right)^{k+1}\mathrm{O}^{2}\cdots\\
-1 & \text{otherwise}
\end{cases}$. And so, for $j\ge2$, $G\left(\mathrm{O}^{j}\mathrm{E}^{\ell}\cdots\right)=\begin{cases}
-j & \text{if }\mathrm{O}^{j-1}\left(\mathrm{OE}\right)^{k+1}\mathrm{O}^{2}\cdots\\
1-j & \text{otherwise}
\end{cases}$. Since these are all negative, $G\left(\mathrm{E}\mathrm{O}^{j}\mathrm{E}^{\ell}\cdots\right)=0$,
and $G\left(\mathrm{E}^{m}\mathrm{O}^{j}\mathrm{E}^{\ell}\cdots\right)=m-1$.
Note that $\mathrm{E}^{m}\mathrm{O}^{j}\mathrm{E}^{\ell}\cdots$ has
the form $\mathrm{E}^{m}\left(\mathrm{OE}\right)^{0}\mathrm{O}^{2}\cdots$,
so this agrees with our formula.

O

The induction steps for adding two alternations that begin with $\mathrm{O}$
are completely analogous. Just flip signs and swap $\mathrm E$ and $\mathrm O$.

Commentary

The formula for $g$ depends on $C$, which basically requires us
to run through an unbounded amount of steps of the Collatz sequence
for a number, which is not ideal. It also doesn't have an obvious
tidy characterization that's not recursive, like "write the $\mathrm{EO}$
string with $1$s and $0$s in a certain way, and then do something
with the number to get the value of $G$".

Simple cases

The only thing I could think to do is collect together some simple
cases that have a fixed form; but nothing can be done for the general
case as that essentially requires you to prove Collatz.

For example, the numbers with $C\left(n\right)=\mathrm{E}^{m}$ are
the powers of $2$, with $g\left(2^{m}\right)=m$. These are A000079 in the OEIS.

The numbers of the form $\mathrm{O}\mathrm{E}^{n}$ are those of the
form $(4^{k}-1)/3$ for $k\ge1$ (A002450), and they
have $g\left(n\right)=0$.

The numbers of the form $\mathrm{O}^{2}\mathrm{E}^{m}$ are those
of the form $\left(64^{k}-10\right)/18$ for $k\ge1$ (A228871),
and they have $g\left(n\right)=-1$.

The numbers of the form $E^{m}\mathrm{O}\mathrm{E}^{\ell}$ are those
of the form $2^{m}(4^{k}-1)/3$ for $k\ge1$ (A181666),
and have $g\left(n\right)=m$.

The numbers of the form $E^{m}\mathrm{O^{2}}\mathrm{E}^{\ell}$ are
those of the form $2^{m}\left(64^{k}-10\right)/18$ for $k\ge1$ (no
OEIS entry), and have $g\left(n\right)=m-1$.

The numbers of the form $\mathrm{O}\mathrm{E}^{m}\mathrm{O}\mathrm{E}^{\ell}$
have one of the two forms $\dfrac{4^{3k+r}-4^{r+1}-6}{18}$ or $\dfrac{4^{3k+r}-4^{r+2}-48}{144}$,
etc.

Simpler Code

Your Sage code appears to be doing all of the work of the Conway notation. But since these games only have one move for one of the two players, you can calculate values of $g$ in a much more straightforward way. I imagine you could port the following code to Sage if desired:

Wolfram Language (Mathematica)

g[x_] := g[x] = If[x == 1, 0,
  If[Mod[x, 2] == 0, If[g[x/2] >= 0, g[x/2] + 1, 0],
   If[g[(3 x + 1)/2] <= 0, g[(3 x + 1)/2] - 1, 0]]];
Table[g[x],{x,1,10000}]//Print

Try it online!


问:
Least squares intersection of three circles
Given is a triangle in the plane, with the coordinates of all three vertices known. I need to determine the location of a point $X$, for which the distances to all three triangle vertices are given (with some error). Therefore, $X$ is located at the intersection of the three circles around the triangle vertices, whose radii are the respective distances.

Since the distances are given with some error, the solution is not exact. How can the "best" intersection point be determined, possibly in a least-squares sense (e.g. minimizing the squared sum of deviations from the given distances)? Or is there a more reasonable way to define what is "best"?

答: If the points are $v_1$ to $v_3$ and the given distances are $d_1$ to $d_3$, you might try finding the point $p$ to minimize $f(p) = \sum_i (\|p - v_i\|^2 - d_i^2)^2$.  This objective function is smooth, avoiding differentiability problems that might bother some solvers.     </p>


问:
Is $\mathcal{O}(a^n) = \mathcal{O}(b^n)$ for $a,b > 1$?
I'm unsure about how to solve this exercise, any help on the steps I took or alternative ways are appreciated.

Intuitively this should not be the case, because the constant factor $c$ does have no weigh in the exponential term as n approaches infinity.

$Definition: \mathcal{O}(g) = \{f \in \mathcal{F}| \exists c >0 \exists{n_0}\in\mathbb{N}\forall n\ge n_0:f(n)\le cg(n)\}$

So far I've rewritten the equation a bit to get to "simpler" terms:

$$ a^n = c\cdot b^n \Leftrightarrow $$
$$log_b(a^n)  = log_b(c \cdot b^n) \Leftrightarrow $$
$$log_b(a^n)  = log_b(c)+log_b(b^n) \Leftrightarrow $$
$$log_b(a^n)  = log_b(c)+n \Leftrightarrow $$
$$\frac{log_a(a^n)}{log_a(b)}  = log_b(c)+n \Leftrightarrow $$
$$\frac{n}{log_a(b)}  = log_b(c)+n$$

On the left hand side we have n that is divided by a constant factor $> 1$ and on to the right hand side a constant factor $> 1$ is added, but its impact pales in comparision to the quotient term, as n gets large. Therefore we can't find a c and $\mathcal{O}(a^n) \neq \mathcal{O}(b^n)$

答:
When you take equality $O(a^n)=O(b^n)$, then, as you consider left and right sides as sets, the equality we should understand as between sets, so as
$$O(a^n) \subset O(b^n) \land O(b^n) \subset O(a^n)$$
To be specific let's assume, that $1<a<b$. We need take any $g \in O(a^n)$ and show that it holds $g \in O(b^n)$. This is clear, because of $a<b$.

But for other side, i.e. $O(b^n) \subset O(a^n)$ it is not so: obviously  $b^n \in O(b^n)$. If we admit, that $b^n \in O(a^n)$, then it means existence of such $C>0,N \in \mathbb{N}$, that for $\forall n>N$ $b^n \leqslant C a^n\Leftrightarrow \left(\frac{b}{a}\right)^n \leqslant C$, which is impossible, as  $\left(\frac{b}{a}\right)^n\to \infty.$

So $1<a<b$ implies $O(a^n) \subset O(b^n)$.