问:
A corollary of Doob's inequality for general submartingales
I have been trying to prove the following result:

Let $(X_n)_{n \in \mathbb N_0}$ be a submartingale or supermartingale. Use Doob's Inequality and Doob's Decomposition to show that, for all $n \in \mathbb N$ and $\lambda > 0$,
$$
\lambda\mathbb P\left[|X|_n^* \geq \lambda\right] \leq 12\mathbb E\left[\left|X_0\right|\right] + 9\mathbb E\left[\left|X_n\right|\right].
$$
where $|X|_n^* = \sup\left\{|X_k| : 0 \leq k \leq n\right\}$.

The version of Doob's inequality we're using is that for any $p \geq 1$, $\lambda > 0$, and martingale or positive submartingale $Y$,
$$
\lambda^p \mathbb P\left[|Y|_n^*\geq \lambda\right] \leq \mathbb E\left[\left|Y_n\right|^p\right].
$$
It suffices to prove this result when $X$ is a submartingale. Using Doob's decomposition $X = M+A$, $M$ a martingale and $A$ an increasing predictable process with $A_0 = 0$ (so $A$ is a positive submartingale), one can in fact show a stronger inequality. Indeed, since $A$ is positive and increasing, $|X|_n^* \leq |M|_n^* + A_n$. And since $A_0 = 0$:
$$
\mathbb E\left[A_n\right] = \mathbb E\left[X_n\right] - \mathbb E\left[M_n\right] = \mathbb E\left[X_n\right] - \mathbb E\left[M_0\right] = \mathbb E\left[X_n\right] - \mathbb E\left[X_0\right] \leq \mathbb E\left[|X_n|\right] + \mathbb E\left[|X_0|\right]
$$
from which it follows that
$$
\mathbb E\left[\left|M_n\right|\right] \leq \mathbb E\left[\left|X_n\right|\right] + \mathbb E\left[A_n\right] \leq 2\mathbb E\left[\left|X_n\right|\right] + \mathbb E\left[\left|X_0\right|\right].
$$
Using these inequalities, it follows that
\begin{align*}
\lambda\mathbb P\left[|X|^*_n\geq \lambda\right] & \leq \lambda\mathbb P\left[|M|_n^*+A_n\geq\lambda\right] \\ &\leq \lambda \mathbb P\left[ |M|^*_n\geq \frac 2 3 \lambda\right] + \lambda\mathbb P\left[A_n\geq\frac 1 3 \lambda\right] \\
&\leq \frac 3 2 \mathbb E\left[\left|M_n\right|\right]+ 3\mathbb E\left[A_n\right] \\
&\leq 6\mathbb E\left[\left|X_n\right|\right]+\frac 9 2 \mathbb E\left[\left|X_0\right|\right]
\end{align*}
My question is twofold:

Is there an error in this argument, such as a flaw in my assumptions or an unjustified assumption I'm not noticing? And if not,

Is there a reason the book I'm using (Klenke's Probability Theory: A Comprehensive Course) uses the coefficients $12$ and $9$ rather than $9/2$ and $6$? Is the stated result somehow more classical or easier to show using more fundamental properties of martingales and the Doob decomposition?

This problem was also discussed here, but this thread doesn't really address the seeming arbitrariness of the coefficients $12$ and $9$. Can anyone provide any insight?

答:
This is only a fragment of an answer because I don't touch upon your proof or the techniques it uses, but it is too long for a comment. My intuition is that the coefficients are arbitrary because they are not optimal. Here is one possible improvement, which I take from the book Brownian Motion, Martingales, and Stochastic Calculus by Jean-François Le Gall (p.263)

Maximal inequality If  $(Y_n)_{n\in\mathbb{N}}$ is a supermartingale then for all $\lambda>0$ and $k\in\mathbb{N}$:
$$\lambda\mathbb{P}\left[\sup_{n\leq k}\left|Y_n\right|>\lambda\right]\leq\mathbb{E}\left|Y_0\right|+2\mathbb{E}\left|Y_k\right|$$

Proof (not in the book). Fix $\lambda>0$ and $k\in\mathbb{N}$. Let $A_k=\left\{\omega\in\Omega : \sup_{n\leq k}Y_k(\omega)> \lambda\right\}$. Define the stopping time $T=\inf\left\{n\in\mathbb{N} : Y_n> \lambda\right\}$, and notice that $A_k=\left\{T\leq k\right\}$. Since $(Y_n)_{n\in\mathbb{N}}$ is a supermartingale
$$\mathbb{E}Y_0\geq\mathbb{E}Y_{T\land k}\geq \lambda \mathbb{P}(A_k)+\mathbb{E}[Y_k\mathbf{1}_{A_k^c}]$$
Now, let $S=\inf\left\{n\in\mathbb{N} : Y_n<-\lambda\right\}$ and $B_k=\left\{\omega\in\Omega : \inf_{n\leq k} Y_k(\omega)<-\lambda\right\}$. We have
$$\mathbb{E}Y_k\leq\mathbb{E}Y_{S\land k}\leq -\lambda \mathbb{P}(B_k)+\mathbb{E}[Y_k\mathbf{1}_{B_k^c}]$$
Rearranging and summing the two inequalities gives
$$\lambda\mathbb{P}\left[\sup_{n\leq k}\left|Y_n\right|>\lambda\right]\leq \mathbb{E}Y_0-\mathbb{E}[Y_k\mathbf{1}_{A^c_k}]-\mathbb{E}[Y_k\mathbf{1}_{B_k}]\leq \mathbb{E}|Y_0|+2\mathbb{E}|Y_k|$$
By the way, we also proved that an even better upper bound is $\mathbb{E}Y_0 + 2\mathbb{E}Y_k^-$.


问:
Prove relation about area of triangle

In the below picture, angle A is obtuse, AD is a median.
We are also given the relation $AB^2 = AF*AC$.
We want to prove that area of triangle $(ABC) = AB*AD$.

What I have tried:

Area of triangle is $A = \frac {1}{2}*AC*BF$.

Replacing AC from the given relation $AB^2 = AF*AC$, we get $A = \frac {1}{2}*\frac{AB^2*BF}{AF}$.

Also from Pythagoras, we replace $AB^2$ with $BF^2+AF^2$.

But I can't see how to involve AD and prove the required relation!

Any help please?

答:
As you have noted, the area $\cal A$ can be written as $AC\times BF/2$. Proving ${\cal A}=AB\times AD$ is equivalent to proving $$AB^2\times 4AD^2=AC^2\times BF^2\tag1$$ on squaring both sides.

The median $AD$ has the property that $4AD^2=2AC^2+2AB^2-BC^2$ as shown here. Using Pythagoras on $\triangle CFB$ yields $$BC^2=(AF+AC)^2+BF^2=AF^2+AC^2+2AF\times AC+BF^2.$$ Since $AF^2+BF^2=AB^2=AF\times AC$ we obtain $BC^2=3AB^2+AC^2$ so that $$4AD^2=AC^2-AB^2\tag2.$$ Finally, using the same identity, we have $BF^2=AF\times(AC-AF)$ so that $$AC^2\times BF^2=AF\times AC\times(AC^2-AF\times AC)=AB^2\times(AC^2-AB^2).$$ Substituting in $(2)$ gives $(1)$ so it follows that ${\cal A}=AB\times AD$.

ContentLicense: CC BY-SA 4.0

Title: Prove relation about area of triangle


问:
Proofs using modular arithmetic.
In my textbook, it says,

The sum of the cubes of any three consecutive integers is divisible by
$9$

This statement is equivalent to proving,

$(n^3 + (n+1)^3 + (n+2)^3 ) \mod 9 =0$  is true for $n=0,1, \ldots, 8$

Now I understand how the modulo function works but I just don't see how the latter part is the same as the former. Can anyone walk me through it?

Note that, I'm not really looking for the proof, what I am looking for is how the first and the second statement are related.

Follow up question which begs to be asked,

Given some expression of $a \in \mathbb{Z}$, say $P(a)$, are the following 2 statements equivalent?

$n$ divides $P(a), \, \forall a \in \mathbb{Z}$ and for some fixed $n \in \mathbb{N}$

$P(a) \mod n = 0, \forall a \in \{0,1, \ldots, n-1\}$

Can anyone explain me whether or not the two statements are equivalent? Thanks!

答: $3$ consecutive numbers gives remainders $0,1,-1(i.e 2)$ in some order when divided by $3$. So let $3$ consecutive  numbers be $3k,3k'+1,3k''-1$ in some order. Cubing and adding we get, $(3k)^3+(3k'+1)^3+ (3k''-1)^3= 27k^3+27k'^3+ 9k'^2+ 9k'+1+27k''^3- 9k''^2+ 9k''-1= 9K$

Title: Proofs using modular arithmetic.


问:
A question about real random variables
Let $X_{n}$ be a sequence of real random variables and let $X$ a real random variable defined over the same probability space $(\Omega,\mathcal{A},\mathbb{P})$ and such that $X_{n}(\omega)\searrow_{n} X(\omega)$ for all $n\in\mathbb{N}$. Let $\{x_{n}\}_{n}$ be a sequence of real numbers such that $x_{n}\searrow_{n} x$ and such that $x_{n}$ is a median of $X_{n}$ for all $n\in\mathbb{N}$, that is,

$$\mathbb{P}(X_{n}\leq x_{n})\geq 1/2 \text{ and } \mathbb{P}(X_{n}\geq x_{n})\geq 1/2$$

The question is whether or not we have that

$$\mathbb{P}(X\geq x)\geq 1/2 - \epsilon,$$

for every $\epsilon > 0$.

答: $P(X<x) \leq \lim \inf P(X_n <x)$ (by convergence in distribution). Since $x \leq x_n$ this gives $P(X<x) \leq \lim \inf P(X_n <x_n)=\lim \inf [1-P(X_n \geq x_n)] \leq 1-\frac1  2$. Hence $P(X\geq x) =1-P(X<x) \geq \frac1  2$ which is stronger than what you want to prove.

Title: A question about real random variables


问:
On the coordinate ring of an affine algebraic variety over a field that is not algebraically closed.
I do hope I'm translating all of the terms correctly to English!

As a part of a course in algebraic geometry we proved the theorem: If $X\subset\mathbb{A}_\mathbb{k}^n$  is an affine variety, $\mathbb{K}$ is an algebraicly closed field, $f\in A(X)\backslash\{0\}$ and $X_f = X\backslash \mathcal{Z}(f)$ then
$\mathcal{O}(X_f) = A(X)_f = \{{\frac{g}{f^n}\mid g\in A(X), n\geq 0}\}$

As a note, the proffesor added that the statment isn't correct over non algebraicly closed fields, and for example he observed the function $\frac{1}{x^2+1}$ which is regular in $\mathbb{A}_\mathbb{R}^1$ but isn't a polynomial.

I don't understant how the fact that the given function isn't a polynomial is a contradiction to the statment in the theorem (I do understand the regularity). Can anyone explain, please?

EDIT: adding appropriate defenitions
Let $X\subset\mathbb{A}_\mathbb{k}^n$ be an affine variety, $\mathbb{K}$ is an algebraicly closed field, then

$A(X)=\mathbb{K}[x_1,\dots,x_n]/\mathcal{I}(X)$.

For any point $P\in X$ we define $\mathcal{O}_{X,P}=\{\frac{f}{g}\mid f,g\in A(X), g(P)\ne0\}$
and for an open set $U\subset X$, $\mathcal{O}(U)=\bigcap_{P\in U} \mathcal{O}_{X,P}$

答:
I'm unsure about the notation, but let me guess.  The claim is that the formula

F1. $\mathcal{O}(X_f)\cong \mathcal{O}(X)_f$

does not hold when $k$ is the field of real numbers.

If $k[x]$ is the polynomial ring in one variable with $k$ the field of real numbers and $I:=(0)$ the zero ideal, let $X:=Z(I)=\mathbb{A}^1_k$. Let us assume there is an isomorphism $\mathcal{O}(X)\cong k[x]$. Let $f:=x^2+1$. It follows $Z(f)$ is the empty set, hence $X-Z(f)=X$ and $\mathcal{O}(X_f)=\mathcal{O}(X)=k[x]$. But $k[x]_f\cong k[x,t]/(tf-1) \neq k[x]$. Hence $\mathcal{O}(X_f)\neq \mathcal{O}(X)_f$ in this case.

If you give the definition of an algebraic variety $X$ and the ring $\mathcal{O}(X)$ over a non-algebraically closed field $k$, it will be easier to comment. Hartshorne assumes in Chapter I that the base field $k$ is algebraically closed.

If you define $\mathcal{O}(\mathbb{A}^1_{\mathbb{R}})$ as the set of functions with the following property (P1):

P1. $f: \mathbb{R}^2 \rightarrow \mathbb{R}$ with the property that for any point $p\in \mathbb{R}^2$ there is an open subset $U(p)\subseteq \mathbb{R}^2$ and two polynomials $p(x),q(x)\in \mathbb{R}[x]$ such that the restriction $f_{U(p)}$ of $f$ to $U(p)$ satisfies $f_{U(p)}=\frac{p(x)}{q(x)}$,

then it follows the function $\frac{1}{x^2+1}$ is a regular function on $\mathbb{R}^2$. Hence $\mathcal{O}(\mathbb{A}^1_{\mathbb{R}})\neq \mathbb{R}[x]$. Hence the answer depends on the definition of $\mathcal{O}(X)$. If $z=a+ib \in \mathbb{C}$ with $b\neq 0$, it follows
the polynomial $p_z(x):=(x-z)(x-\overline{z})=x^2-2ax+a^2+b^2\in \mathbb{R}[x]$ is an irreducible polynomial - it has no real roots.
Hence if you use definition P1 to define the ring of regular functions, it follows the function $f(x):=\frac{1}{p_z(x)}$ is a regular function. If $S\subseteq A:=\mathbb{R}[x]$ is the set of polynomials on the form $p(x):=\prod_{z_i\in \mathbb{C}-\mathbb{R}} (x-z_i)(x-\overline{z_i})$ it follows $S$ is a multiplicatively closed subset, and the ring of fractions $S^{-1}A$ is a sub-ring of $\mathcal{O}(\mathbb{A}^1_{\mathbb{R}})$. Hence with definition P1 it follows the ring $\mathcal{O}(\mathbb{A}^1_{\mathbb{R}})$ is much larger than $A$.

Your addition: "EDIT: adding appropriate definitions. Let $X\subseteq \mathbb{A}^n_K$ be an affine variety, $K$ is an algebraically closed field, then $A(X)=K[x_1,…,x_n]/I(X).$"

My comment: This is the definition given in Hartshorne, Chapter I for algebraically closed fields. You need to include the definition used for non-algebraically closed fields.

Real algebraic geometry is an independent field. There is a version of Hilbert's "Theorem of zeros".

https://en.wikipedia.org/wiki/Krivine%E2%80%93Stengle_Positivstellensatz


问:
Average order of the prime counting function
I am very interested in the average order of arithmetic functions. The average order of the prime counting function is
$$\overline{\pi}(n):=\frac1n\sum_{k=1}^n\pi(k)$$
I wanted an asymptotic formula for this function (it is very probable that a closed form might not exist).  Here is what I did: I could not do anything with the sum, so I derived an approximation. First, I changed this sum to
$$\frac1n+\frac1n\sum_{2<k\le n}\frac k{\log k}$$
(this is an approximation). Now I used the Euler summation method, and some other techniques to simplify this to
$$\overline{\pi}(n)\approx\frac1n+\frac1n\left(\frac2{\log 2}+\mathrm{Ei}(2\log n)-\mathrm{Ei}(\log 4)-O\left(\frac n{\log n} \right)\right)\quad\text{ for sufficiently large }n$$
where $\mathrm{Ei}$ is the Exponential integral. My question is: is there a better formula? if so, please mention a proof of it.

答:
You need the PNT stating that $\pi(x)=\frac{x}{\log x}(1+o(1))$ which gives that $$\frac1{x}\sum_{n\le x} \pi(n) = \frac1{x}\sum_{n\le x} \frac{n}{\log n}(1+o(1))= \frac1{x}(1+o(1))\sum_{n\le x} \frac{n}{\log n}$$ $$=\frac1{x}(1+o(1)) \frac{x^2}{2\log x}(1+o(1))=\frac{x}{2\log x}(1+o(1))$$

Note that it is not immediate that $\sum_{n\le x} \frac{n}{\log n}o(1)=o(1)\sum_{n\le x} \frac{n}{\log n}$, it holds because $\frac{n}{\log n}$ is non-negative and $\sum_{n\le x} \frac{n}{\log n}\to \infty$


问:
How to derive the alternate forms of Power Series Expansion for Modified Bessel Functions of the second kind?
I was reading  page 25 of this document. They present a strange form of the series expansion of the Modified Bessel Function of the second kind. But I do not know how can the author get this form ?
${K_1}(x) = {\left( {\frac{\pi }{{2x}}} \right)^{1/2}}{e^{ - x}}\left[ {1 + \frac{3}{{8x}}\left( {1 - \frac{5}{{2(8x)}}\left( {1 - \frac{{21}}{{3(8x)}}} \right)} \right)} \right]$.

I myself observed that (subjectively) using only the first term provide a pretty good approximation.

My problem is to try to use this form to approximate ${K_1}(2\sqrt x )$.

Please help me with this.

Thank you !

答:
The expression$${K_1}(x) = {\left( {\frac{\pi }{{2x}}} \right)^{1/2}}{e^{ - x}}\left[ {1 + \frac{3}{{8x}}\left( {1 - \frac{5}{{2(8x)}}\left( {1 - \frac{{21}}{{3(8x)}}} \right)} \right)} \right]$$ is nothing else than the Horner method.

SInce you use Mathematica, ask for the series expansion of $K_1(x)$ for infinitely large values of $x$. After factoring and simplifying, you have
$${K_1}(x) = {\left( {\frac{\pi }{{2x}}} \right)^{1/2}}{e^{ - x}}\left[1+\frac{3}{8 x}-\frac{15}{128 x^2}+\frac{105}{1024 x^3}-\frac{4725}{32768
   x^4}+O\left(\frac{1}{x^5}\right)\right]$$ For the expression inside backets, let $t=\frac 1{8x}$ to make
$$1+3 t-\frac{15 t^2}{2}+\frac{105 t^3}{2}-\frac{4725 t^4}{8}+O\left(t^5\right)$$ which is
$$1+3t\left(1-\frac 5 2t(1-7t(1+   \cdots\right)$$

S0 for your case
$${K_1}(2\sqrt x )=\frac 12 {\left( {\frac{\pi }{{\sqrt x}}} \right)^{1/2}}e^{-2 \sqrt{x}}\left[1+3 t-\frac{15 t^2}{2}+\frac{105 t^3}{2}-\frac{4725 t^4}{8}+O(t^5)\right]$$ with $t=\frac 1{16\sqrt x}$.

Now use Horner's method to write the polynomial it $t$.
$$1+t \left(t \left(\left(\frac{105}{2}-\frac{4725 t}{8}\right)
   t-\frac{15}{2}\right)+3\right)$$


问:
What is the difference between countable infinity and uncountable infinity?
What is the difference between countable infinity and uncountable infinity? Are there any examples? How can I imagine it?
Can you offer some assistance? please.</p>

答:
For a finite set $A$ the size of $A$ or $card(A)$ is the number of elements in $A$. Now, what's the size of infinite sets? Or first: what's the definition of infinite set?

A set $A$ is infinite if there exist a $1-1$ and onto map $f:A\to B \varsubsetneqq A$!

Since we cannot set a number as size of an infinite set, instead we use $card(A)$ as size of set $A$; and we can compare cardinality of sets. We say $card(A)=card(B)$ if and only if there exist a $1-1$ map $f$ such that $f:A\to B$

In many cases finding such mapping is extremely hard. so instead we use this theorem:

$card(A)=card(B)$ if and only if there exist two $1-1$ maps $f$ and $g$ such that $f:A\to B$ and $g:B\to A$. Intuition of $f$ and $g$ is (sort of) $A\subseteq B$ and $B\subseteq A$.
In many cases finding such mappings is so easy.

Now, an infinite set $A$ is countable infinite if $card(A)=card(\mathbb{N})$ else it is uncountable infinite.

As some examples, $\mathbb{N,Z,Q}$ are countable infinite and $\mathbb{R},\mathbb{C}, \mathbb{R}^n, P(\mathbb{R})$(powerset) are uncountable infinite.

For a countable infinite set $A$, let $f:A\to \mathbb{N}$ be $1-1$ and onto, so we can write elements of $A$ as $\{a_1=f^{-1}(1),a_2=f^{-1}(2),...\}$ so intuitively we can count elements of $A$ exactly like $\mathbb{N}$ as first element, second element and so on.

But for sets like $\mathbb{R}$ we can't count elements like $\mathbb{N}$, witch means $card(\mathbb{R})$ is much greater than $card(\mathbb{N})$.


问:
If p, q, r are the roots of $x^3-6x^2+3x+1=0$ determine the possible values of $p^2q+q^2r+pr^2$.
If p, q, r are the roots of $x^3-6x^2+3x+1=0$ determine the possible values of $p^2q+q^2r+pr^2$. I tried to solve this problem through Vieta's relations but I did not find a way that allows not to use the cubic formula.
I found this question on Pathfinder of Olympiad Mathematics and I have been struggling for a week without getting anywhere.

答:
Hint: Let
\begin{eqnarray*}
A=p^2q+q^2r+r^2p \\
B=pq^2+qr^2+rp^2.
\end{eqnarray*}
Now calculate $A+B$ and $AB$ ... and solve the quadratic.


问:
partial fractions when the fraction cannot be decomposed
I am trying to find partial fractions of $\frac {1}{(x^2+1)^2}$. All the coefficients I get are zeros except the coefficient for the constant term which is 1, leaving me with the fraction I started with, so it seems like the fraction cannot be decomposed. How can I then go about writing this fraction as the sum $\frac {1}{2}\left [\frac {1}{x^2+1}-\frac{x^2-1}{(x^2+1)^2}\right]$? Is it just manipulation and trial and error?

Body:
It can be decomposed if you use the complex roots
$$(x^2+1)^2=(x-i)(x+i)(x-i)(x+i)$$
$$\frac 1{(x^2+1)^2}=\frac{i}{4 (x+i)}-\frac{1}{4 (x+i)^2}-\frac{i}{4 (x-i)}-\frac{1}{4 (x-i)^2}$$


问:
$\lim_{y \to 0^{+}} \int_{0}^{\infty} e^{-yx} \frac{\sin x}{x} dx = \frac{\pi}{2}$
I have shown using the application of Dominated Convergence Theorem (i.e., interchange of differentiation and integral) that
$$
\int_{0}^{\infty} e^{-yx} \frac{\sin x}{x} dx = \frac{\pi}{2}-\tan^{-1}y
$$
for $(x,y) \in [0,\infty) \times (0,\infty)$.

Now I want to conclude that
$$
\int_{0}^{\infty} \frac{\sin x}{x} dx =\int_{0}^{\infty} \lim_{y \to 0+}e^{-yx} \frac{\sin x}{x} dx =\lim_{y \to 0+}\int_{0}^{\infty} e^{-yx} \frac{\sin x}{x} dx = \lim_{y \to 0+} \frac{\pi}{2}-\tan^{-1}y =  \frac{\pi}{2}
$$
(The hint which is given with this part is to use DCT.)

To interchange the limit and the integral sign, using DCT, I need to find a non-negative function $g$ which dominates $ |(e^{-yx}\sin x) /x|$ and is integrable, i.e., $g \in L^{1}([0,\infty))$.

The only function I could think of is (obviously) $|\sin x/x|$. But I don't know whether $|\sin x/x|$ is integrable.

Body:
$$I(y)=\int_{0}^{\infty} e^{-yx} \frac{\sin x}{x} dx =\Im \int_{0}^{\infty} \frac{e^{-(y-i)x}}{x} dx$$
$$J(y)=\Im \int_{0}^{\infty} e^{-(y-i)x} dx=\Im \frac{1}{y-i}=\frac{1}{1+y^2}$$
$$I(y)=-\int J(y) dy+C=-\tan^{-1} y+C$$
As $I(0)=\pi/2 \implies C=\pi/2$
$$\implies I(y)=\pi/2-\tan^{-1}y \implies \lim_{y\to 0} I(y)=\pi/2$$


问:
High school contest question
Some work on it reveals the possibility of using gamma function. Is there any easy way to compute it?
$$\lim_{n\to\infty}\left(\frac{1}{n!} \int_0^e \log^n x \ dx\right)^n$$</p>

答:
Let $ x = e^{-y} $ to arrive at $ \displaystyle(-1)^n \int_{-1}^\infty  y^n e^{-y} \ dy = (-1)^n \left(n! + \int_{-1}^0 y^n e^{-y} \ dy\right) $. This second integral is bounded between $ 0 $ and $ (-1)^n $. In fact, it is exactly equal to $ u_n e - n! $ where $ u_n $ has a recursive definition easily found though integration by parts, namely $ u_{n} = (-1)^{n} + nu_{n-1} $.

Hence, the overall integral has value $ (-1)^n u_n e $. Because $ u_n \sim \frac{n!}{e} $ the overall result is $ (-1)^{n^2} = (-1)^n  $.

The latter result can be drawn from the fact that $\displaystyle \lim_{n \to \infty} \int_{-1}^0 y^n e^{-y} \ dy = \lim_{n \to \infty} u_n e - n! = 0 $.

A more interesting question is my opinion is $$ \sum_{n = 1}^\infty \left(\frac{1}{n!}\int_0^e \log^n x \ dx\right)^n - (-1)^n $$

ContentLicense: CC BY-SA 3.0

Title: High school contest question


问:
Looking for a proof of two combinatorial summation identities
While working on a problem I came across the following similar combinatorial identities valid by numerical evidence $(n\ge m)$:
$$\begin{align}
A(n,m)&\equiv\sum_{k\ge1}\binom km\binom{n-1}{k-1}=2^{n-m-1}\binom nm\frac{n+m}{n},\\
B(n,m)&\equiv\sum_{k\ge1}\left[\binom{\left\lfloor\frac k2\right\rfloor}m
+\binom{\left\lceil\frac k2\right\rceil}m\right]\binom{n-1}{k-1}=2^{n-2m}\binom {n-m}{m-1}\frac{n+1}{m}.
\end{align}$$

I am looking for an algebraic proof of these identities.

Is there a smart way to prove:
$$
B(n,m)=A(n-m+1,m)
$$
without explicit evaluation of the sums?

答:
A fairly straightforward calculation using standard identities also yields the first identity:

$$\begin{align*}
n\sum_{k\ge 1}\binom{k}m\binom{n-1}{m-1}&=\sum_kk\binom{k}m\binom{n}k\\
&=\sum_kk\binom{n}m\binom{n-m}{k-m}\\
&=\binom{n}m\sum_kk\binom{n-m}{k-m}\\
&=\binom{n}m\sum_k(k+m)\binom{n-m}k\\
&=\binom{n}m\left(\sum_kk\binom{n-m}k+m\sum_k\binom{n-m}k\right)\\
&=\binom{n}m\left((n-m)\sum_k\binom{n-m-1}{k-1}+m2^{n-m}\right)\\
&=\binom{n}m\left((n-m)2^{n-m-1}+m2^{n-m}\right)\\
&=\binom{n}m(n+m)2^{n-m-1}\\
&=2^{n-m}\binom{n}m\frac{n+m}2
\end{align*}$$

For the second identity observe first that

$$\begin{align*}
\sum_k\binom{n}{2k}\binom{k}m&=\sum_k\left(\binom{n-1}{2k-1}+\binom{n-1}{2k}\right)\binom{k}m\\
&=\sum_k\binom{n-1}{2k-1}\binom{k}m+\sum_k\binom{n-1}{2k}\binom{k}m\\
&=\sum_\ell\binom{n-1}\ell\binom{\lfloor(\ell+1)/2\rfloor}m
\end{align*}$$

and

$$\begin{align*}
\sum_k\binom{n}{2k-1}\binom{k}m&=\sum_k\left(\binom{n-1}{2k-1}+\binom{n-1}{2k-2}\right)\binom{k}m\\
&=\sum_k\binom{n-1}{2k-1}\binom{k}m+\sum_k\binom{n-1}{2k-2}\binom{k}m\\
&=\sum_\ell\binom{n-1}\ell\binom{\lceil(\ell+1)/2\rceil}m\,,
\end{align*}$$

so that

$$\begin{align*}
&\sum_k\binom{n-1}k\left[\binom{\lfloor(k+1)/2\rfloor}m+\binom{\lceil(k+1)/2\rceil}m\right]\\
&\qquad=\sum_k\binom{k}m\left[\binom{n}{2k}+\binom{n}{2k-1}\right]\\
&\qquad=\sum_k\binom{k}m\binom{n+1}{2k}\\
&\qquad=\frac{n+1}{2m}\sum_k\binom{k-1}{m-1}\binom{n}{2k-1}\\
&\qquad=\frac{n+1}{2m}\sum_k\binom{k}{m-1}\binom{n}{2k+1}\,,
\end{align*}$$

and the problem reduces to showing that

$$\sum_k\binom{k}{m-1}\binom{n}{2k+1}=2^{n-2m+1}\binom{n-m}{m-1}\,.$$

This can be proved by a double induction, the outer induction on $m$ and the inner induction on $n$. We may as well assume that $n\ge 2m-1$, as otherwise both sides are $0$.

For $n\ge m=1$ we have

$$\sum_k\binom{k}0\binom{n}{2k+1}=\sum_k\binom{n}{2k+1}=2^{n-1}=2^{n-2+1}\binom{n-1}0\,.$$

Now suppose that

$$\sum_k\binom{k}{m'-1}\binom{n'}{2k+1}=2^{n'-2m'+1}\binom{n'-m'}{m'-1}\tag{1}$$

whenever $n'\ge 2m'-1$ and $1\le m'<m$. Then the only non-zero term in

$$\sum_k\binom{k}{m-1}\binom{2m-1}{2k+1}$$

is

$$\binom{m-1}{m-1}\binom{2m-1}{2(m-1)+1}=1\,,$$

and

$$2^{(2m-1)-2m+1}\binom{(2m-1)-m}{m-1}=1\,,$$

so $(1)$ holds for $m'=m$ and $n'=2m-1$. Suppose that $(1)$ holds whenever $1\le m'<m$ and $n'\ge 2m'-1$, or $m'=m$ and $2m-1\le n'\le n$. Then

$$\begin{align*}
&2^{(n+1)-2m+1}\binom{n+1-m}{m-1}\\
&\qquad=2^{n-2m+2}\left[\binom{n-m}{m-1}+\binom{n-m}{m-2}\right]\\
&\qquad=2\sum_k\binom{k}{m-1}\binom{n}{2k+1}\\
&\qquad\qquad+2^{n-2m+2}\binom{(n-1)-(m-1)}{(m-1)-1}\\
&\qquad=2\sum_k\binom{k}{m-1}\binom{n}{2k+1}\\
&\qquad\qquad+\sum_k\binom{k}{m-2}\binom{n-1}{2k+1}\\
&\qquad=\sum_k\binom{k}{m-1}\binom{n}{2k+1}\\
&\qquad\qquad+\sum_k\binom{k}{m-1}\left[\binom{n-1}{2k}+\binom{n-1}{2k+1}\right]\\
&\qquad\qquad+\sum_k\binom{k}{m-2}\binom{n-1}{2k+1}\\
&\qquad=\sum_k\binom{k}{m-1}\binom{n}{2k+1}\\
&\qquad\qquad+\sum_k\binom{k}{m-1}\binom{n-1}{2k}\\
&\qquad\qquad+\sum_k\binom{k}{m-1}\binom{n-1}{2k+1}+\sum_k\binom{k}{m-2}\binom{n-1}{2k+1}\\
&\qquad=\sum_k\binom{k}{m-1}\binom{n}{2k+1}\\
&\qquad\qquad+\sum_k\binom{k}{m-1}\binom{n-1}{2k}\\
&\qquad\qquad+\sum_k\left[\binom{k}{m-1}+\binom{k}{m-2}\right]\binom{n-1}{2k+1}\\
&\qquad=\sum_k\binom{k}{m-1}\binom{n}{2k+1}\\
&\qquad\qquad+\sum_k\binom{k}{m-1}\binom{n-1}{2k}+\sum_k\binom{k+1}{m-1}\binom{n-1}{2k+1}\\
&\qquad=\sum_k\binom{k}{m-1}\binom{n}{2k+1}\\
&\qquad\qquad+\sum_k\binom{k}{m-1}\binom{n-1}{2k}+\sum_k\binom{k}{m-1}\binom{n-1}{2k-1}\\
&\qquad=\sum_k\binom{k}{m-1}\binom{n}{2k+1}\\
&\qquad\qquad+\sum_k\binom{k}{m-1}\left[\binom{n-1}{2k}+\binom{n-1}{2k-1}\right]\\
&\qquad=\sum_k\binom{k}{m-1}\binom{n}{2k+1}+\sum_k\binom{k}{m-1}\binom{n}{2k}\\
&\qquad=\sum_k\binom{k}{m-1}\left[\binom{n}{2k+1}+\binom{n}{2k}\right]\\
&\qquad=\sum_k\binom{k}{m-1}\binom{n+1}{2k+1}\,,
\end{align*}$$

so $(1)$ holds for $m'=m$ and $n'=n+1$ and by induction whenever $m'\le 1$ and $n'\ge 2m'-1$. This completes the proof of the second identity.


Title: partial fractions when the fraction cannot be decomposed

Body: I am trying to find partial fractions of $\frac {1}{(x^2+1)^2}$. All the coefficients I get are zeros except the coefficient for the constant term which is 1, leaving me with the fraction I started with, so it seems like the fraction cannot be decomposed. How can I then go about writing this fraction as the sum $\frac {1}{2}\left [\frac {1}{x^2+1}-\frac{x^2-1}{(x^2+1)^2}\right]$? Is it just manipulation and trial and error?

Body:
$\frac{1}{(x^2+1)^2}$ is already in "partial fractions form", so...

"Is it just manipulation and trial and error?"

Yes.

It's not super trivial, but the result is true.

I did:

\begin{align} \frac{1}{(x^2+1)^2}
&= \frac{1 + x^2 - x^2}{(x^2+1)^2} \\\\
&= \frac{1}{(x^2+1)}\ - \frac{x^2}{(x^2+1)^2} \\\\
&= \frac12\left[\frac{2}{(x^2+1)}\ - \frac{2x^2}{(x^2+1)^2}\right] \\\\
&= \frac12\left[\frac{1}{(x^2+1)} + \frac{1}{(x^2+1)}\ - \frac{2x^2}{(x^2+1)^2}\right]\\\\
&= \frac12\left[\frac{1}{(x^2+1)}\ + \frac{x^2+1-2x^2}{(x^2+1)^2}\right] \\\\
&= \frac12\left[\frac{1}{(x^2+1)}\ - \frac{x^2-1}{(x^2+1)^2}\right]. \\\\
\end{align}


答:
In the real-valued partial fraction method, your term
$$
\frac{1}{(x^2+1)^2}
$$
is the best you can do.  Evaluation of integrals
$$
\int\frac{dx}{(ax^2+bx+c)^n}
$$
is done as follows:  For $n=1$, complete the square and it is an arctangent.  For $n>1$ there is a reduction formula from integration by parts:
\begin{align}
\int\frac{dx}{(ax^2+bx+c)^n} &= \frac{2ax+b}{(n-1)(4ac-b^2)(ax^2+bx+c)^{n-1}}
\\ &\qquad+\frac{(2n-3)2a}{(n-1)(4ac-b^2)}
\int\frac{dx}{(ax^2+bx+c)^{n-1}}
\end{align}


问:
Show series converges
Show that the series

$$
\sum_{n=1}^{\infty} \frac{n!^n}{n^{n^2}}$$ converges.

I tried the ratio test but didn't come to a conclusion.
Wolfram says the series converges by comparison but I don't know what series to compare to.

答: Since by the Stirling approximation$$n\ln n!-n^2\ln n\in n(n\ln n-n+o(n))-n^2\ln n=-n^2(1-o(1)),$$we have a superexponentially decaying upper bound on the $n$th term, so the series converges.

Title: Show series converges


答:
By Stirling's approximation
$$\frac{n!}{n^{n}} \sim \frac{\sqrt{2\pi n}}{e^n}$$

so $$\lim_{n \rightarrow +\infty} \frac{n!}{n^{n}} = 0$$

In particular, for $n$ sufficiently large, $$\frac{n!^n}{n^{n^2}} = \left( \frac{n!}{n^{n}} \right)^n \leq \frac{n!}{n^{n}} \sim \frac{\sqrt{2\pi n}}{e^n}$$

and since the series $\sum \frac{\sqrt{2\pi n}}{e^n}$, converges, then by comparison, the series
$$\sum \frac{n!^n}{n^{n^2}} $$
also converges.

Title: Show series converges

Body:
Show that the series

$$
\sum_{n=1}^{\infty} \frac{n!^n}{n^{n^2}}$$ converges.

I tried the ratio test but didn't come to a conclusion.
Wolfram says the series converges by comparison but I don't know what series to compare to.


问:
Brownian motion reflection principle (hitting probabilities conditioned on path)
This is a revamped version of a question I asked previously (which I have since removed as it was poorly posed). I am considering the SDE $\mathrm{d}X_t=3X_t^{\frac23}\mathrm{d}B_t+3X_t^{\frac13}\mathrm{d}t$, which I know admits the non-unique solutions $X_t=B_t^3$ and

$$\tilde{X}_t=\begin{cases}0&t<\tau_a\\B_t^3&\tau_a\leq t\end{cases}$$

where $\tau_a=\inf\{t>a:B_t=0\}$.  I am asked to find $\mathbb{P}(X_{a+t}=0|B_a=1)$ as well as $\mathbb{P}(\tilde{X}_{a+t}=0|B_a=1)$. Intuitively, this feels like translated Brownian motion and I know I need to use reflection principle about $B_a=1$, but I am unsure of how I should begin my solution to approach the condition of the underlying Brownian path or where I should include the reflection principle. Usually when I think of the reflection principle I think of CDFs, but these events are singletons which leaves me quite confused. Any guidance is appreciated!

答:
Answer to the previous version of question for case when $\tilde{X}_t = 0$ for $\tau_a < t$.

Statement: $\mathbb{P}(X_{a+t}=0|B_a=1) = 0$ and $\mathbb{P}(\tilde{X}_{a+t}=0|B_a=1) = I_{t > a} 2(1 - \Phi(\frac{1}{\sqrt{t-a}}))$.

Proof.

Put $Y_t = B_{a+t} - B_a$ and let $\mathcal{F}_t, t \ge 0$ be the natural filtration of $B_t$. Hence $Y_t$ and $\mathcal{F}_{\le a}$ are independent and $Y_t$ is a Brownian motion - Markov property of Wiener process.

Thus
\begin{gather}
P(X_{a+t} = 0 | B_a = 1) = P(B_{a+t}^3 = 0 | B_a = 1) = \\
=  P((B_{a+t}-B_a+B_a)^3= 0 | B_a = 1) = \\
= P((Y_t+1)^3 = 0 | B_a = 1) = P((Y_t+1)^3 = 0)
\end{gather}
by independence of $Y_t$ and $\mathcal{F}_{\le a}$. It follows that
$$P(X_{a+t} = 0 | B_a = 1) =  P((Y_t+1)^3 = 0) = P(Y_t = -1) = P(B_t = -1) = 0.$$

Further, $P(\tilde{X}_{a+t}=0|B_a=1) = P(B_{a+t}^3 I_{\tau_a \ge t} = 0| B_a = 1)$.

We know that
\begin{gather}
\tau_a = \inf(t>a: B_t = 0) = [t = u+a] = a + \inf(u>0: B_{u+a}=0) =\\ = a + \inf(u >  0: B_{u+a} -B_a = -B_a) = a + \inf(u>0: Y_u = -B_a).
\end{gather}
If $B_a = 1$ then $\tau_a =  a + \inf(u>0: Y_u = -1) = a + \tilde{\tau}_{-1}$.

Thus

\begin{gather}
P(\tilde{X}_{a+t}=0|B_a=1) = P(B_{a+t}^3 I_{\tau_a \ge t} = 0| B_a = 1) = \\
= P( (B_{a+t} - B_a + B_a)^3  I_{\tau_a \ge t} = 0 |B_a =1) = \\ \nonumber
P( (Y_t + 1)^3  I_{\tilde{\tau}_{-1} \ge t-a} = 0 |B_a =1) = P( (Y_t + 1)^3  I_{\tilde{\tau}_{-1} \ge t-a} = 0)
\end{gather}
by independence,  because $\tilde{\tau}_{-1}$ is  measurable with respect to the natural filtration of $Y_t$.

Put $A = \{(Y_t+1)^3 = 0 \}$, $B = \{I_{\tilde{\tau}_{-1} \ge t-a} = 0 \}$. Hence $P(A) = 0$ and

\begin{gather}
P(\tilde{X}_{a+t}=0|B_a=1) =  P( (Y_t + 1)^3  I_{\tilde{\tau}_{-1} \ge t-a} = 0) \\
= P(A \cup B) = P(B) = P(\tilde{\tau}_{-1} < t-a) = \\
= P( \inf(u>0: Y_u = -1) < t-a)  = P( \inf(u>0: -Y_u = 1) < t-a)
\end{gather}
But $-Y_{t}$ is a Brownian motion, thus
$$P(\tilde{X}_{a+t}=0|B_a=1) =  P( \inf(u>0: B_u = 1) < t-a)  = P(\tau_1^* < t-a),$$
where $\tau_s^* =  \inf(u>0: B_u = s) $.

For all $s > 0$, $t > 0$ we have (I use standard properties of maximum of Brownian motion)

\begin{gather}
P(\tau_s^* < t) = P( \max_{u \in [0,t]} W_u > s) = P(|W_t| \ge s) = P(|N(0,t)| \ge s) = \\ =
P(\sqrt{t}|N(0,1)| \ge s) = P(|N(0,1)| \ge \frac{s}{\sqrt{t}}) = 2P(N(0,1) \ge \frac{s}{\sqrt{t}}) = \\
= 2(1 - \Phi(\frac{s}{\sqrt{t}})).
\end{gather}

If $s > 0 $ and $t \le 0$ then $P(\tau_s^* < t)= 0$.

Hence
$$\mathbb{P}(\tilde{X}_{a+t}=0|B_a=1) = I_{t > a} 2(1 - \Phi(\frac{1}{\sqrt{t-a}})).$$

Do you have any questions?


问:
On determining the constant term in Stirling's approximation
It is well-known that the discrete version of Stirling's formula is as follows

$$
\log N!=\left(N+\frac12\right)\log N-N+\log C+\int_N^\infty{P_1(t)\over t}\mathrm dt\tag1
$$

where $P_1(t)=B_1(\{t\})$, and $C$ is some constant term emerged while applying the Euler-Maclaurin formula. Using the limit definition of gamma function that

$$
\Gamma(s+1)=\lim_{N\to\infty}{N^sN!\over(s+1)(s+2)\cdots(s+N)}
$$

I am able to obtain an identity similar to (1) but with respect to continuous variable $s$:

$$
\log\Gamma(s+1)=\left(s+\frac12\right)\log s-s+\log C+\int_0^\infty{P_1(t)\over s+t}\mathrm dt\tag2
$$

I already know that $C=\sqrt{2\pi}$ can be obtained by replacing factorial terms in Wallis product, but I wonder if there is an alternative way to figure out the constant.

答:
Indeed, it is possible to determine $C$ by employing Legendre's duplication formula, which states

$$
\Pi(s)\Pi\left(s-\frac12\right)=2^{-2s}\sqrt\pi\cdot\Pi(2s)
$$

where we set $\Pi(s)=\Gamma(s+1)$ for convenience

Taking logarithms, we have

$$
\color{orange}{\log\Pi(s)+\log\Pi\left(s-\frac12\right)}-\color{purple}{[\log\Pi(2s)-2s\log2]}=\frac12\log\pi
$$

Now, due to (2), we get

$$
\begin{aligned} \color{orange}{\log\Pi(s)+\log\Pi\left(s-\frac12\right)} &=\left(s+\frac12\right)\log s-s \\ &+s\log\left(s-\frac12\right)-s+\frac12+2\log C+\mathcal O\left(\frac1s\right) \\ &=s\log\left[s\left(s-\frac12\right)\right]-2s+\frac12\log s \\ &+\frac12+2\log C+\mathcal O\left(\frac1s\right) \end{aligned}
$$

and for the purple part we also have

$$
\begin{aligned} \color{purple}{\log\Pi(2s)-2s\log2} &=\left(2s+\frac12\right)\log2s-2s-2s\log2+\log C+\mathcal O\left(\frac1s\right) \\ &=s\log(s^2)+\frac12\log2+\frac12\log s-2s+\log C+\mathcal O\left(\frac1s\right) \end{aligned}
$$

Combining these results gives

$$
\frac12\log\pi=s\log\left(1-{1\over2s}\right)-\log2+\frac12+\log C+\mathcal O\left(\frac1s\right)
$$

Finally, if we were to take $s\to\infty$, we get $C=\sqrt{2\pi}$.


问:
How to comprehend positive measure entropy
How to comprehend the statements below?

Let $X=[0,1],f_2(x)=2x(mod1)$.$\mu$ is a measure such that $f_2$ is ergodic.The positive entropy assumption $h_\mu(f_2)>0$ implies that the restriction of $f_2$ to the support of $\mu$ is not invertible. Equivalently, we can always find some pairs of $\mu$ generic points with the same image under $f_2$.

答: If $f_2$ is invertable on $supp\ \mu$ then one of the preimage of small interval inherit the measure of the interval and the other is zero measure set. Then use Shannon's theorem about measure entropy to show that $h_2(f)=0$,a contradiction.


问:
Matching an image with a fractal, advice needed

Introduction

I'm trying to find a fractal function that spells out a name on the complex plane. I'm doing this by numerically 'training' a program to match the desired image / name.

I don't expect any answers regarding the coding, but any help is appreciated and I'm very open to critique. It is written in C++, do keep in mind that it's just a working prototype and that I'm pretty new to C++. (the github link is in the last section)

Objective

Given a region $E$ in the complex plane. Find a complex fractal function $f:\mathbb{C}\to\mathbb{C}$ that when the escape time algorithm is applied it is convergent in all points of $E$ and divergent outside of $E$. I'm not concerned here with making the fractal look good as I have plenty of programs that can draw fractals and make them look appealing, I'd just like to be able to find a complex function $f$ that converges in $E$ to spell out the name. Generally it also doesn't matter where this region $E$ is or how much area it covers, as long as it spells out the name.

I'm not hoping that the fractal perfectly matches the given region $E$, but rather that it matches it to a point where you can easily read it and it of course looks appealing. Ideally I'm hoping for it to match the letters but have mandelbrot like shapes on the edges.

My Method

fractal function

I guess a form of the function $f(z;\boldsymbol\theta)$, here $\boldsymbol\theta$ denotes the parameters this fractal function takes. So far in practice I have only used function series, here are a few examples.
$$
\sum_{n=1}^N\theta_nz^n+c\\
\sum_{n=1}^N\exp{(in\theta_nz)}+c
$$
Where $c\in\mathbb C$ is the coordinate (just like in the mandelbrot $f(z)=z^2+c$), which I leave out of the notation of $f$ for simplicity.

In these examples there are $N$ parameters, but I have used other forms so the amount of parameters may vary. Expected is that if the amount of parameters goes up, the fractal can take more complicated shapes. There is of course a balance between execution time and getting the desired degree of complexity.

I have also used complex parameters, but after lots of trial and error I just started to use two real parameters for each term inside the sum as these forms of $f$ gave very diverse fractals which made me think these were more suited to match the region $E$. The form of $f$ I have been using predominantly is the following:
$$
\begin{align}
\tag{1}
\sum_{n=1}^N \theta_{n,1}(\exp(i\theta_{n,2}z)+c)
\end{align}
$$
Where $\theta_{n,1}$ and $\theta_{n,2}$ are real parameters. This means that for this example there are $2N$ parameters.

To give some insight into the coding process and to show I'm not making any mistakes, equation (1) can be translated into code like the following:

```<code>for (int n=1; n<N; n++)
{
    double A = exp(-theta_2[n] * y);
    double a = theta_2[n] * x;
    //temporary variables so x and y don't change during the summation
    tx += theta_1[n] * (A * cos(a) + c);
    ty += theta_1[n] * (A * sin(a) + c);
}
x = tx;
y = ty;
</code>```

cost function

I then define a cost function $C_f(\boldsymbol{\theta})$ which takes all the parameters as input and outputs a number between $0$ and $1$ using the fractal function $f$. If this cost is $0$ the current fractal function $f(z;\boldsymbol{\theta})$, with its current configuration of parameters, will converge exactly in every point of $E$ and diverge in every point outside of it, hence the ideal solution. Consequently if the cost is $1$ it implies that it diverges inside of every point of $E$ and converges outside of $E$. As discussed earlier I'm not looking for a fractal function and parameter configuration , $f(z;\boldsymbol\theta)$, that perfectly matches the region $E$, so the cost should generally be very low but not $0$.

In practice I have found that a lot of the parameter configurations result in completely divergent fractals. Hence I have added a weight to the cost function so that it prefers convergent pixels over divergent ones. This also means that the cost can never be $1$, but this doesn't matter as we don't care about the least optimal solution.

Let $v_c\in[0,1]$ be the convergence value of $f(z;\boldsymbol\theta)$ in the point $c$, being $0$ if the fractal converges and $1$ if it diverges. The value $v_c$ is obtained using a simple escape time algorithm. The cost function $C_f$ is then defined as:
$$
C_f(\boldsymbol\theta)=
\begin{cases}
\tag 2
\sqrt{\dfrac{1}{w}\sum\limits_c(v_c-d_c)^2}:v_c < d_c\\
\sqrt{\sum\limits_c(v_c-d_c)^2}:v_ \ge d_c
\end{cases}
$$
Where the sum is over all the coordinates of the relevant pixels, for now we can assume it is just a simple rectangle in the complex plane where we want the name to be spelled out.

$d_c$ is the desired value of the fractal in the point $c$. So if the name, spelled out on the complex plane, crosses over the point $c$ then $d=0$. Keep in mind that the value $v_c$ can be any number between $0$ and $1$. So the desired pixels $d_c$ are also chosen to be between $0$ and $1$, which just corresponds to the brightness (black=fully convergent, white=fully divergent) of the image spelling out the name.

The cost function is also divided by a weight $w$ for values lower than the desired $d_c$. This is to put a preference on convergent pixels as discussed earlier.

We can also clearly see that the cost function returns $0$ if all iterated values equal the desired values.

descending the gradient of the cost function

So to achieve my goal of finding a fractal that converges inside $E$, I try to minimize the cost function by changing the parameters $\boldsymbol\theta$.

I do this by numerically calculating the gradient $\nabla_{\boldsymbol\theta}C_f$ and taking a small step in the opposite direction. The elements of this gradient are nothing more than:
$$
\tag 3
\dfrac{\partial C_f(\boldsymbol\theta)}{\partial\theta_n}=\dfrac{C_f(\theta_1,..,\theta_n+\Delta\theta_n,..)-C_f(\theta_1,..,\theta_n,..)}{\Delta\theta_n}
$$

I then take a small step along $-\nabla_{\boldsymbol\theta}C_f$, this just means to subtract $s\frac{\partial C_f(\boldsymbol\theta)}{\partial \theta_n}$ from the parameters $\theta_n$. Where $s$ is the step size, I have tried all kinds of step sizes and I'm still not really sure if there is a most efficient way of choosing one.

I then calculate the cost again with those new parameters and compare it to the previous cost. Here two things can generally happen:

Any small step taken in the direction of the negative gradient does not go downhill, or in other words the new cost is higher than the previous cost.

There is a step that does go downhill, so the cost decreases after taking the step.

If the latter happens, nothing needs to be done besides repeat the process until the cost is essentially $0$ and the fractal matches the given region $E$.

Now it almost always does not go downhill. I'm not really sure why this happens, but my suspicion is that the parameter space is very chaotic and possesses a lot of local minima. It also seems to have a harder time going downhill if there are more parameters, which I can't really explain. I have also observed that the partial derivatives seem to be very inconsistent. They usually grow very big for small $\Delta \theta_n$ and generally decrease as $\Delta\theta_n$ increases ($\Delta\theta_n\in[10^{-6},1]$). Which leads me to believe my method of calculating the partial derivatives isn't very accurate at all.

There are two things I can do here if the step taken does not go downhill.

Choose a new random point in the parameter space, by this I mean picking a new set of random parameters $\boldsymbol\theta$ and starting the process over again.

Taking a small step in the negative gradient anyway and continuing the process.

Neither of these really get me to the desired solution of finding the correct parameters $\boldsymbol\theta$ so that $f(z;\boldsymbol\theta)$ matches $E$.

The Question

The main question really is:

Is my current method a good approach? Is there a better way of doing this? Or is there anything that makes the current method flawed?

Note that I'm not expecting any answers on the programming point of view, but any input is greatly appreciated!

Continuing with the current method. I have programmed a working prototype in C++, but I lack the mathematical knowledge to find a good form of the function $f$, so:

What is a good form of the function $f(z;\boldsymbol\theta)?$

I'm continuously changing the parameters $\boldsymbol\theta$ to lower the cost, but I'm not even sure that a parameter configuration which has a cost very close to zero exists for the current form of $f$.

I wasn't even sure if I should post this question on here, it feels kind of vague what I'm asking but I've really hit a dead end. I don't know where to go from here and would really appreciate any ideas, tips or feedback anyone has to offer. Also my apologies if this post is too long, I wanted to make sure everything was super clear to avoid any confusion.

The Code

Again I don't expect any answers regarding the coding, but if you'd like to check it out please do so on https://github.com/catmousedog/FractalDrawer.git.

The code does do one thing I haven't fully explained in the section cost function, but that isn't all too necessary. It doesn't iterate the fractal function $f$ or the cost function $C_f$ over a simple rectangle in the complex plane, but rather over a set of predetermined relevant pixels. It's easiest to understand this by looking at the following picture.

This picture represents the desired set of pixels $d$. The fractal function $f$ should ideally converge if the pixel is black ($d=0$) and diverge if it is white ($d=1$), these two make up for all the relevant pixels. Hence the red pixels are irrelevant, they are ignored in all calculations.

Adding the concept of relevant pixels was naively done by me thinking it would increase the chance of finding a function which fits the desired region $E$ as there are no constraints on the function outside of the relevant pixels. Whether this is a good or bad idea, I don't really know.

答:
Shapes can be approximated by Julia sets of rational functions with a large number of roots [1]:

we are [...] interested in factored rationals of the form

$$ R(q) = e^C \frac{ \prod (q - t_i)^{T_i} }{ \prod (q - b_i)^{B_i} } $$

Property 1: If an iterate $q$ is sufficiently close to a top
root $t_i$, then it is inside the filled Julia set $J$.

Property 2: If an iterate $q$ is sufficiently close to a bottom
root $b_i$, then it is outside of $J$.

Property 3: The $T_i$ term expands and contracts the attractive region of $t_i$. The $B_i$ does the same for repulsion with $b_i$.

The paper uses quaternions for 3D shapes, but presumably the same techniques can apply in 2D with complex numbers, given that the paper references [2] which is about doing something similar for Jordan curves with polynomials, and combinations of Jordan curves with rational functions:

Both papers are complementary, [2] has lots of proofs while [1] has practical tips too.

[1]: "Quaternion Julia Set Shape Optimization", Theodore Kim, Eurographics Symposium on Geometry Processing, Volume 34 (2015), Number 5, https://doi.org/10.1111/cgf.12705 online https://tkim.graphics/JULIA/

[2]: "Shapes of Polynomial Julia Sets", Kathryn A. Lindsey, Ergodic Theory and Dynamical Systems, Volume 35, Issue 6, September 2015, pp. 1913 - 1924, DOI: https://doi.org/10.1017/etds.2014.8 preprint https://arxiv.org/abs/1209.0143


问:
How to show $3$-period point means positive entropy
Let $f$ be a continuous function from $ [0,1] $ to itself with a $3$-period point. How to show that the topology entropy of $f$ is positive?

答: It can be solved by a little improvement of a proof by T.y.Li and J.Yorke showing that "3-peirod implies chaos". Use Markov graph and the concept "$f$-cover" to find a semiconjugate to sybolic system with positive entropy.I find the related theory in Brin and Stuck's book Introduction to Dynamic systems Chapter7.3


问:
Find value for equation to be contained in interval
I've been thinking if you can always find $x$ such

$$x-\frac{x-\epsilon\sin(x)-M}{1-\epsilon\cos(x)} \in [0, \pi]$$

with $\epsilon \in [0, 1]$ fixed, $M \in ]0, \pi[$. I've tried finding a bound for the equation but I can't find anything useful. This problem rises as a modification where $\epsilon$ is free and $x$ is fixed.

答: For $x=\pi$, $$\pi-\frac{\pi-M}{1+\epsilon}\in[0,\pi] \\ \iff \frac{\pi-M}{1+\epsilon} \in [0,\pi] $$ But this is true as $$\frac{\pi-M}{1+\epsilon} \le \frac{\pi-0}{1+0} = \pi $$ and $$\ge \frac{\pi-\pi}{1+1} = 0$$


问:
Evaluating Complex Integral using Residues
Evaluate the integral $\int_C \frac{\cot z}{z^2}$ where $C: |z|  = \frac{\pi}{3}.$
I am planning to use residue theorem. The integrand has poles at $z  = 0, n\pi, n \in \mathbb{Z}.$ Only $z  = 0$ is inside $C$. However, I'm confused. Is $z  = 0$ a pole with multiplicity three? Thank you in advance!

答:
Is $z=0$ a pole with multiplicity three?

Yes, because, if you denote the integrand by $f(z)=\dfrac{\cot z}{z^{2}}$, and $\dfrac{1}{z^{3}}$ by $g(z)$,
then you can easily see that $f(z)$ behaves like $g(z)$ at $z=0$, evaluating the following limit, which is finite.

\begin{equation*}
\lim_{z\longrightarrow 0}\frac{f(z)}{g(z)}=\lim_{z\longrightarrow 0}\frac{%
\cot z}{z^{2}}\diagup \frac{1}{z^{3}}=\lim_{z\longrightarrow 0}\frac{z}{\sin
z}\cos z=1.
\end{equation*}


问:
What is distance between two points in a parallel coordinate system?
We know the distance between two points in a cartesian coordinate system.

$d=\sqrt{(x_{2}-x_{1})^2+(y_{2}-y_{1})^2}$

So how can we find the formula for the distance between points $A(x_{1},y_{1}), B(x_{2},y_{2})$ in a parallel coordinate system?

(Parallel Coordinate system : Let's take two lines intersecting each other at any angle in the plane. Let's orient these lines by thinking of them as number lines and consider these number lines as coordinate axes.From any point P in the plane to a pair consisting of numbers corresponding to the marked distances of the parallels drawn to these axes; They are called parallel coordinates of P or Descartes coordinates.)

Body:
Just use the cosine rule:
$$d=\sqrt{(x_{2}-x_{1})^2+(y_{2}-y_{1})^2-2(x_{2}-x_{1})(y_{2}-y_{1})\cos(\pi-\theta)}$$
or
$$d=\sqrt{(x_{2}-x_{1})^2+(y_{2}-y_{1})^2+2(x_{2}-x_{1})(y_{2}-y_{1})\cos(\theta)}$$
where $\theta$ is the angle between the axes.


问:
How to prove this a(n) is bounded above
We have $0<a_1<1$, and $a(n+1)=a(n)+\frac{a(n)^2}{n^2}$ for $n\geq 1$. How can I show $a(n)$ is bounded above.

答:
Idea (partial answer) : You have $a_k>0$ for all $k$ and
$$\frac{1}{a_{n+1}}=\frac{1}{a_n}-\frac{1}{n^2+a_n}$$ hence
$$\frac{1}{a_{n+1}}=\frac{1}{a_1}-\sum_{k=1}^{n}\frac{1}{k^2+a_k}$$
but one has also to show that $\frac{1}{a_1}-\sum_{k=1}^{+\infty}\frac{1}{k^2+a_k} >0$ to finish...

Title: How to prove this a(n) is bounded above


问:
Prove relation about area of triangle

In the below picture, angle A is obtuse, AD is a median.
We are also given the relation $AB^2 = AF*AC$.
We want to prove that area of triangle $(ABC) = AB*AD$.

What I have tried:

Area of triangle is $A = \frac {1}{2}*AC*BF$.

Replacing AC from the given relation $AB^2 = AF*AC$, we get $A = \frac {1}{2}*\frac{AB^2*BF}{AF}$.

Also from Pythagoras, we replace $AB^2$ with $BF^2+AF^2$.

But I can't see how to involve AD and prove the required relation!

Any help please?

答:
$BE$ parallel to $DA$, $E$ on the line $CA$

Let $AB=c$, $AC=b$, $BC=2a$ , $AD=d$

we have $BE=2d$

Given $AF = \frac{c^2}{b}$

We get $EF=b-\frac{c^2}{b}$, $CF=b+\frac{c^2}{b}$

using Pythagoras, express $BF^2$ in two different ways

$4d^2-\left(b-\frac{c^2}{b}\right)^2=4a^2-\left(b+\frac{c^2}{b}\right)^2$

it follows from this that $d^2+c^2=a^2$

and so $BAD$ is a right angle, area $ABD = \frac{1}{2} cd$ and therefore area $ABC=cd$

Title: Prove relation about area of triangle


问:
How to show that, following function is smooth
Question: I need to show that, the function defined by,
$$
f(x)=\begin{cases}
         e^{\frac{1}{x^2-1}} & \text{if $|x| < 1$;}\\
        0 & \text{if $|x|≥ 1$.}
     \end{cases}
$$
has continuous derivatives of all order for every $t$

My attempt: as for $x>1$ function is defined to be zero. Hence for $x>1$ it has derivative of all orders and all them are Continuous. But for for $x<1$ how to show function is smooth? I am not to calculate those derivatives for $x≤1$? Please anyone help me?

答:
The composition of smooth functions is smooth, so you only need to check what happens at $x=1$. The right derivative at $1$ is zero. For the left derivative, note that for $x<1$
$$
f^{(n)}(x)=\frac{q_n(x)}{(x^2-1)^{n+1}}\,\exp\Big(\frac1{x^2-1}\Big)
$$
for some polynomial $q_n$. Then
$$
\frac{f^{(n)}(x)-0}{x-1}={q_n(x)\,(x+1)}\,\frac1{(x^2-1)^{n+2}}\,\exp\Big(\frac1{x^2-1}\Big).
$$
And
$$
\lim_{x\to1^-}\frac1{(x^2-1)^{n+2}}\,\exp\Big(\frac1{x^2-1}\Big)
=\lim_{t\to\infty}\frac{(-1)^{n+2}\,t^{n+2}}{e^t}=0.
$$
So $f^{(n+1)}(1)=0$ for all $n$.


问:
How to read and execute $\sum_{1 \leq \ell <m<n} \frac{1}{5^{\ell}3^{m}2^{n}}$

How to read and execute this sum?
$$\sum_{1 \leq \ell <m<n} \frac{1}{5^{\ell}3^{m}2^{n}}$$

I am having trouble to understand where is my error.

The question does not say, but I am assuming that $\ell$ starts at $1$, $m$ at $2$, and so $n$ at $3$.

This is essential a product of pg:

$$\sum_{1 \leq \ell<m<n} \frac{1}{5^{\ell}3^{m}2^{n}} = \sum_{\ell=1}\frac{1}{5^{\ell}}\sum_{m=2}\frac{1}{3^{m}}\sum_{n=3}\frac{1}{2^{n}} = \frac{1/5}{1-1/5}\frac{1/9}{1-1/3}\frac{1/8}{1-1/2}$$
But this does not agree with the answer :/

答:
We will assume that $n$ is not fixed.
Firstly, note that for any triple $(l,m,n)\in\mathbb{N}^3$ such that $l<m<n$ there is exactly one triple $(a,b,c)\in\mathbb{N}^3$ such that $l=a$, $m=a+b$, $n=a+b+c$.

Thus, we have the following equality (all terms are positive, so order of summation can be chosen arbitrarily)
$$
\sum_{1<l\le m\le n}\frac{1}{5^l 3^m 2^n}=\sum_{a,b,c\in\mathbb{N}}\frac{1}{5^{a} 3^{a+b} 2^{a+b+c}}=\sum_{a,b,c\in\mathbb{N}}\frac{1}{30^a 6^b 2^c}=\sum_{a\in\mathbb{N}}\frac{1}{30^a}\cdot\sum_{b\in\mathbb{N}}\frac{1}{6^b}\cdot\sum_{c\in\mathbb{N}}\frac{1}{2^c}=
\\
=\frac{1}{30-1}\cdot\frac{1}{6-1}\cdot\frac{1}{2-1}\cdot=\frac{1}{145}.
$$


问:
Number of heads at the end
There are $8$ coins, which are flipped simultaneously. Coins that show tails are flipped a second time. If $Y$ is the RV that represents the number of heads after the second set of flips, find $\mathbb{E}[Y]$ and $\mathrm{Var}[Y]$.

Can this be modeled as a binomial distribution with $n = 8$ and $p = \frac{3}{4}$, thus giving me $\mathbb{E}[Y] = 6$ and $\mathrm{Var}[Y] = \frac{3}{2}$?

EDIT: My logic was that the only outcomes for a coin are $\{H, TH, TT\}$, and the only way to fail was to get $TT$, which has a probability of $\frac{1}{4}$. So any given coin has a $\frac{3}{4}$ probability of succeeding.

答:
Yep, it can modelled as proposed, your reasoning is entirely correct.

And among the quickest tracks towards the seeked values.

Title: Number of heads at the end


问:
inverse image of fiber product of scheme
I asked this question and I couldn't understand the following result.
https://math.stackexchange.com/questions/3956704/hartshorne-Ⅱ-prop-6-6-irreducible

Let $X$ be a noetherian integral separated scheme which is regular in codimension one, $\pi$ is a projection $X \times_{\operatorname{Spec}\mathbb{Z}} \operatorname{Spec}\mathbb{Z}[t] \rightarrow X$,and $Y$ be a prime divisor of
$X$.
Then, according to the person who answered that question, $\pi^{-1}(Y)=Y\times_{\operatorname{Spec}\mathbb{Z}}\operatorname{Spec}\mathbb{Z}[t]$ .
But I can't prove this and I also think this can be true in more general case, that is,

$X$,$Y$ be schemes over scheme $S$, $\pi$:$X\times_{S} Y \rightarrow X$ be a projection, $Z\subset X$ be a closed subset. Then $\pi^{-1}(Z)=Z\times Y$.

If this is true, I want to know how to prove it, and if this needs some modifications, I want to know it and its proof.
This may be a elementary question, so only a good reference will be a great help.

答:
If $C:=Spec(\mathbb{Z}[t])$ and $\pi: X\times_{\mathbb{Z}} C\rightarrow X$ is the canonical projection map and $Y\subseteq X$ is any subscheme it follows

F1. $\pi^{-1}(Y):=Y\times_X X\times_{\mathbb{Z}} C\cong Y\times_{\mathbb{Z}} C$.

The $X$-terms "cancel each other out". You will find this in Hartshorne, Chapter II.3.

Answer: Yes, F1 is the definition of the inverse image of $Y$. It follows

$top(\pi^{-1}(Y)):=  top(Y\times_{\mathbb{Z}} C)$


答:
Assume that you have two lines $L_1, L_2$, passing through the origin, which you wish to be your new axes. By themselves the lines are not enough, we also need to specify where the marked points are. Let $P_1, P_2$ be the points with new coordinates $(1,0)$ and $(0,1)$ respectively. Let $(a,b)$ and $(c,d)$ be their Cartesian coordinates.

Let $A = \pmatrix{a & c \\ b & d}$. Then we have

\begin{align*}
A\pmatrix{0 \\ 0} &= \pmatrix{0 \\ 0} \\
A\pmatrix{1 \\ 0} &= \pmatrix{a \\ b} \\
A\pmatrix{0 \\ 1} &= \pmatrix{c \\ d}
\end{align*}

So that $A: \mathbb{R}^2 \to \mathbb{R}^2$ maps your parallel coordinates to Cartesian coordinates. Therefore, let $(x_1,y_1)$, $(x_2, y_2)$ be the parallel coordinates of two points. Then the distance is

$$d^2 = \left|A\pmatrix{x_1 \\ y_1} - A\pmatrix{x_2 \\ y_2}\right|^{2} = \left|A\pmatrix{x_1-x_2 \\ y_1-y_2} \right|^{2} = \pmatrix{x_1 - x_2 & y_1-y_2}A^TA\pmatrix{x_1-x_2 \\ y_1 - y_2}.$$

Notice that if $A$ is a rotation matrix (for example), then the distance is unchanged. More generally, the distance is unchanged whenever $A^TA = I$, in other words when $A$ is an isometry.

In general, $$A^TA = \pmatrix{a^2+b^2 & ac+bd \\ ac+bd & c^2+d^2}.$$

Therefore, writing $\Delta x = x_1-x_2$, $\Delta y = y_1 - y_2$, we have

$$d^2 = (a^2+b^2)\Delta x^2 + 2(ac+bd)\Delta x \Delta y + (c^2 + d^2) \Delta y^2.$$

Title: What is distance between two points in a parallel coordinate system?

Body:
We know the distance between two points in a cartesian coordinate system.

$d=\sqrt{(x_{2}-x_{1})^2+(y_{2}-y_{1})^2}$

So how can we find the formula for the distance between points $A(x_{1},y_{1}), B(x_{2},y_{2})$ in a parallel coordinate system?

(Parallel Coordinate system : Let's take two lines intersecting each other at any angle in the plane. Let's orient these lines by thinking of them as number lines and consider these number lines as coordinate axes.From any point P in the plane to a pair consisting of numbers corresponding to the marked distances of the parallels drawn to these axes; They are called parallel coordinates of P or Descartes coordinates.)


问:
Prime Sequence Conjecture

Note: I don't know how to program a computer to check for me, hence my question. Thanks in advance.

Building on the concept explored in
Sets of Prime and Composite Numbers

Conjecture: For every pair of twin primes $a$ and $b$, performing the arithmetic operation of:

$(a+b)+(a ⋅b)= c$

[Example: $(3+5)+(3⋅5)=23$]

yields either a composite number part of a Twin-Composite pair or a prime only within a Prime-Composite pair.

[Example: Twin Composites, Example: 119,121 (composite followed by a composite)]

[Example: Prime-Composite, Example: $23,25$ (prime followed by a composite)]

First Ten Examples from Manual Calculation:

$a = 3$ and $b = 5$ ; yields $23$ ; $23$ is prime, $25$ is composite

$a = 5$ and $b = 7$ ; yields $47$ ; $47$ is prime, $49$ is composite

$a = 11$ and $b = 13$ ; yields $167$ ; $167$ is prime, $169$ is composite

$a = 17$ and $b = 19$ ; yields $359$ ; $359$ is prime, $361$ is composite

$a = 29$ and $b = 31$ ; yields $959$ ; $959$ is composite, $961$ is composite

$a = 41$ and $b = 43$ ; yields $1847$ ; $1847$ is prime, $1849$ is composite

$a = 59$ and $b = 61$ ; yields $3719$ ; $3719$ is prime, $3721$ is composite

$a = 71$ and $b = 73$ ; yields $5327 $ ; $5327$ is composite, $5329$ is composite

$a = 101$ and $b = 103$ ; yields $10607$ ; $10607$ is prime, $10609$ is composite

$a = 107$ and $b = 109$ ; yields $11879$ ; $11879$ is composite, $11881$ is composite

Conclusion: $c$ is either part of a twin-composite pair or a prime-composite pair.

答:
As @DanielFischer pointed out, the conjecture is true:

$a=b-2$

$\Rightarrow c=(a+b)+(a*b)$

$=(b-2+b)+((b-2)*b)$

$=b^2-2$.

Thus, $c+2=b^2$ is always composite.

Title: Prime Sequence Conjecture


问:
A binary quadratic form: $nx^2-y^2=2$
For which $n\in\mathbb{N}$ are there $(x, y)\in\mathbb{N}^2$ such that $nx^2-y^2=2$ ?</p>

答:
As pointed out by J.Claus and JavaMan, the Pell-like equation,

$$u^2-nv^2=-2\tag{1}$$

has solutions when $n$ is a prime of form $p=8m+3$ (by Legendre). Another class obviously is,

$$u^2-(m^2+2)v^2=-2$$

A third class seems to be $n = 2p$, with $p$ the same primes above, but I have no ready proof.

A fourth is $n=3+2a+7a^2-6a^3-3a^4-4a^5+4a^6$, so,

$$(5+9a+15a^2+2a^3-4a^4-8a^5)^2-n(3+4a+4a^2)^2 = -2\tag{2}$$

Excluding $a=0,1$, I believe the parameterization above gives the fundamental solutions of $(2)$. There are other polynomial solutions to Pell equations in my site (in fact $(2)$ is a member of a 2-parameter family), and the transformations given in Wikipedia are from this site as well.

Title: A binary quadratic form: $nx^2-y^2=2$


问:
Find the minimum value of $7x-24y$
LMNAS $25^{th}$ UGM, Indonesian

Suppose that $x,y\in\mathbb{R}$, so that :

$x^2+y^2+Ax+By+C=0$

with $A,B,C>2014$. Find the minimum value of $7x-24y$

$x^2+y^2+Ax+By+C=0$

can be written $\rightarrow$ $(x+\frac{A}{2})^2+(y+\frac{B}{2})^2+C-(\frac{A}{2})^2-(\frac{B}{2})^2=0$

Stuck,:>

答:
Using Cauchy-Schwarz inequality,
$$\left(x+\frac{A}{2}\right)^2+\left(y+\frac{B}{2}\right)^2+C-\left(\frac{A}{2}\right)^2-\left(\frac{B}{2}\right)^2=0\\
\implies 7x-24y=7\left(x+\frac A2\right)-24\left(y+\frac B2\right)+\frac{-7A+24B}{2}\\
\ge -\sqrt{7^2+(-24)^2} \cdot \sqrt{\left(x+\frac A2\right)^2+\left(y+\frac B2\right)^2}+ \frac{-7A+24B}{2}\\
=-25 \frac{1}{2} \sqrt{A^2+B^2-4C} + \frac{-7A+24B}{2}\\
=\frac 12 \left(-25\sqrt{A^2+B^2-4C}-7A+24B\right).\blacksquare$$

Title: Find the minimum value of $7x-24y$


问:
Second derivatives, Hamilton and tangent bundle of tangent bundle TTM
I'm learning the Hamilton formalism of classical mechanics, where a second order differential equation is formalized as two first order differential equations on the cotangent bundle of the configuration manifold. I find the concept of tangent spaces and the notion of the derivative $f_*: TM \to TN$ as a function between tangent spaces very elegant, natural and intuitive. I still struggle, though, with an intuitive understanding of tangent spaces of tangent spaces.

Let the $n$ dimensional configuration space $M$ be a smooth manifold, $\pmb{q} \in M$, then $TM$ is the tangent bundle and $\pmb{v} \in TM$ a tangent vector. Even without local coordinates, every tangent vector can canonically be split into a point $q$ and a vector $\dot q \in T_qM$. Therefore $\pmb v = (q, \dot q)$.

The intuitive notion of a tangent vector is the notion of a change of position or a velocity (thus the notation) starting at a point. Now lets look at the tangent space of the tangent space $TTM$. Let $\pmb a \in TTM$ be tangent vector to $TM$. The intuitive notion of $\pmb a$ is a change of velocity or acceleration. Just as we could do for $TM$, we can split $\pmb a$ into a "point" $(q, \dot q)$ in $TM$ and a vector in $T_{(q, \dot q)}TM$ given by $(\dot{q}, \ddot q)$, with $\dot{q}$ denoting a change of the fiber and $\ddot{q}$ denoting a change of the vector within the same fiber. Combining with the previous, $\pmb a \in TTM$ consists of $(q, \dot{q}, \dot{q}, \ddot{q})$. What you might disregard as a double occupancy in notation, is a real problem for my understanding. It seems like the information about the position change is duplicated, not even necessarily consistently.

Which roles do the vector component $\dot{q} \in T_{\pmb q}M$ and the fiber change component $\dot{q} \in TTM$ play generally in manifolds?

Which role do they play in the Hamilton formalism (if any different)?

How to construct a second derivative $f_{* *}: TTM \to TTN$? How do these components appear there?

How, if at all, does this relate to curvature and torsion of curves?

How, if at all, does the exterior derivative $dd=0$ or any other relevant derivative relate to this?

The Hamilton equations of motion are $\dot{\pmb q} = \frac{\partial H}{\partial \pmb p}, \dot{\pmb p} = -\frac{\partial H}{\partial \pmb q}$ (with $H: T^*M\to\mathbb R$ and $(\pmb q, \pmb p) \in T^*M$). How does the notational double occupancy of $\dot{\pmb q}$ resolve here?

In this question I concentrated on $TTM$ while the Hamilton formalism is defined on $TT^*M$. Is there a fundamental difference between $TT^*M$ and $TTM$ that is relevant to the problem in question?

答:
peek-a-boo answered this question terrifically well and detailed. I want to document the conclusions I drew from their answer and how I think my confusion is to be resolved:

The Hamilton equations of motion are $\dot{\pmb q} = \frac{\partial H}{\partial \pmb p}, \dot{\pmb p} = -\frac{\partial H}{\partial \pmb q}$. How does the notational double occupancy of $\dot{\pmb q}$ resolve here?

Let me answer this first, because it lays a ground for the remaining struggles. This question and most of the other confusion came from identifying both curve parameters $s$ and $t$ (as defined in peek-a-boos answer) with time. In mechanics $\dot q$ is understood to be a velocity, ie. shift of location in time and $\dot v$ is meant to be an acceleration, ie. a change of velocity in time.

Most important to resolve my confusion is to realize what "$\pmb p$ is an independent variable in Hamiltonian mechanics" means. In my words: Inertia (the physical fact that change of position is linked to momentum) is not encoded into the mathematical formalism. It is, instead, encoded into the Hamilton function (by the fact that for a free mechanical system the Hamiltonian is not zero, but $H=\frac{p^2}{2m}$).

Which roles do the vector component $\dot{q} \in T_{\pmb q}M$ and the fiber change component $\dot{q} \in T_{\dot{\pmb q}}TM$ play generally in manifolds?
Which role do they play in the Hamilton formalism?

In Hamilton mechanics the vector component $\dot{q} \in T_{\pmb q}M$ does not really play a role, because Hamiltonian mechanics is defined on $T^*M$. Thus, let's instead talk about $\pmb p \in T^*_{\pmb q}M$. This is part of the momentary state of the system and as I wrote above the mathematical formalism does not link it to the timely shift of position.
Instead, the fiber change component $\dot{q} \in T_{\dot{\pmb q}}T^*M$ as well as the velocity change component $\dot{p} \in TT_{\pmb p}^*M$ are to be considered differences between almost-identical experimental setups.

The latter point can be seen when we consider the differential $\mathrm{d}H \in T^*T^*M$, which is a linear function that maps a change of position and/or momentum of a system to the change in the Hamiltonian (aka it's total energy). Ie. it answeres the question "How would the total energy and therefore the outcome of the experiment change if I changed the initial conditions by $(\dot{\pmb q}, \dot{\pmb p}) \in TT^*M$?"

Only then, this is linked to a timely shift in position and momentum by $\dot{\pmb x} = I\mathrm{d}H$ (where $\pmb x = (\pmb q, \pmb p) \in T^*M$) resp. $\dot{\pmb q} = \frac{\partial H}{\partial \pmb p}, \dot{\pmb p} = -\frac{\partial H}{\partial \pmb q}$.

Finally, the fact that $\dot{\pmb x}$ is indeed an element of $TT^*M$ and represents a timely shift does not mean, that in general elements of $TT^*M$ represent timely shifts.
$I\mathrm{d}H: T^*M \to TT^*M$ is a vector field, which links those two things. Constructed from infinitesimal changes in experimental setup it outputs the timely shift in position and velocity. And that's the very core of Hamilton formalism.


问:
Probability question - Binomial vs. Poisson
I have come across the following probability problem. I've used the binomial formula to come up with an answer, but I'm wondering if this is the correct approach, rather than modelling the question with, say, a Poisson process.

Question: You are running a site with 1 million customers, one hundred of which use an Android phone. Everyday, the website is visited independently and randomly by 10,000 people. On how many days of the year would you would expect to your site to have three or more visitors using an Android mobile?

I used the following logic:

1,000,000 customers, 100 Android phones. --> $P($Android$) = 0.0001$

$P(\geq 3 \text{ Android})$ = 1 - $P(0 \text{ Android})$ - $P(1 \text{ Android})$ - $P(2 \text{ Android})$

$P(0 \text{ Android})$ = $(1 - 0.0001)^{10,000}$ = 0.3679

$P(1 \text{ Android})$ = $\binom{10000}{1} (1 - 0.0001)^{9,999} (0.0001)^1$ = 0.3679

$P(2 \text{ Android})$ = $\binom{10000}{2} (1 - 0.0001)^{9,998} (0.0001)^2$ = 0.1839

This gives me a $P(\geq 3 \text{ Android}) = 0.0803$. Multiplying this probability by the number of days in the year gives me ~29.3 days.

Is this logic correct, and is there an equivalent way that this could be derived using a Poisson process?

Thanks in advance!

答:
Same result using a poisson distribution. Each day you have a $Poi(1)$ thus the probability you nasty calculated with a binomial is simply

$$\mathbb{P}[X\geq3]=1-e^{-1}-e^{-1}-\frac{e^{-1}}{2}=1-\frac{5}{2}e^{-1}\approx0.0803$$


问:
Does this integral have simple result expression?
I am evaluating the integral

$$\int_0^\infty\frac{1}{(1+x)^a(1+bx)^2}\,\mathrm{d}x,$$

where $a>0$ and $b>1$.

By expressing $(1+x)^{-a}$ and $(1+bx)^2$ in terms of Meijer-G function, I can obtain the result for the above integral, but the result contains the Meijer-G function.

I wonder if the above integral can have a simple expression result, i.e., without containing any special functions.

Thanks!

答:
Except if $a$ is an integer, you will face hypergeometric functions such as
$$\frac{1+\frac{a \, _2F_1(1,1;2-a;b)}{1-a}-a\pi   (1-b)^{-a}
   \left(\frac{1}{b}\right)^{1-a} \csc (\pi  a)}{b-1}$$

If $a$ is an integer, the problem is quite different. Let
$$I_n=\int_0^\infty\frac{1}{(1+x)^n(1+bx)^2}\,dx$$
$$ \,I_n=\frac{(b-1)P_{n-1}(b)-n b^{n-1}\log(b)}{(b-1)^n }$$ where $P_k$ is a polynomial of degree $k$ in $b$.

In these polynomials, the constant term is $\frac{(-1)^n}{n-1}$ and the coefficient of $b^{n-1}$ is $1$.

What are these polynomials ?


问:
Random Walk Probability in a Circle
Consider a circular arrangement of 8 people as shown below:

Let's say person 1 has a candy which is passed around with equal probability either to the left or right. All the other people do the same.

a) Find the probability that the person 3 gets the candy before person 6.

b) Find the expected number of times the candy will be passed before the person 5 gets it for the first time.

For a) I could just break the circle between 3 and 4 and consider them siting in a straight line as,

$3\hspace{10pt}2\hspace{10pt}1\hspace{10pt}8\hspace{10pt}7\hspace{10pt}6$

Now how do I go about calculating the probability? Do I take different cases? I think using conditional probability I could get some recurrence relation. Not sure how to go about b).
Any help is appreciated. Thanks!

答:
We can solve this using the theory of absorbing markov chains. It may be over-complicating the question a little but I think it's a useful and general tool worth using. For question a, the absorbing states will be 3 & 6 while state 4 & 5 have been removed. Our transition matrix will then be
$$
    P =
    \begin{pmatrix}
        0 & 1/2 & 1/2 & 0 & 0 & 0 \\
        1/2 & 0 & 0 & 0 & 1/2 & 0 \\
        1/2 & 0 & 0 & 1/2 & 0 & 0 \\
        0 & 0 & 1/2 & 0 & 0 & 1/2 \\
        0 & 0 & 0 & 0 & 1 & 0 \\
        0 & 0 & 0 & 0 & 0 & 1 \\
    \end{pmatrix}
    =
    \begin{pmatrix}
        Q & R \\
        0 & I_2
    \end{pmatrix}
$$

where our indices are in the order $(1,2,8,7,3,6)$.

We then find the fundamental matrix (using some CAS) which is
$$
    N = (I_4 - Q)^{-1} =
    \frac25
    \begin{pmatrix}
        6 & 3 & 4 & 2\\
        3 & 4 & 2 & 1\\
        4 & 2 & 6 & 3\\
        2 & 1 & 3 & 4\\
    \end{pmatrix}
$$

Finding the probability of being absorbed can be done just by examing the (1,1) entry in
$$
    B = NR =
    \frac15
    \begin{pmatrix}
        3 & 2 \\
        4 & 1 \\
        2 & 3 \\
        1 & 4 \\
    \end{pmatrix}
$$

So the probability of 3 getting the candy before 6 is $3/5$.

For question b, the method is similar but with a larger transition matrix and 5 as the only absorbing state. We are looking for the number of states visited before being absorbed when starting from position 1, which is just the sum of the first row of N.
If we order the states $(1,2,3,4,6,7,8,5)$ in $P$ then we will get
$$Q=
    \frac12
    \begin{pmatrix}
        0 & 1 & 0 & 0 & 0 & 0 & 1 \\
        1 & 0 & 1 & 0 & 0 & 0 & 0 \\
        0 & 1 & 0 & 1 & 0 & 0 & 0 \\
        0 & 0 & 1 & 0 & 0 & 0 & 0 \\
        0 & 0 & 0 & 0 & 0 & 1 & 0 \\
        0 & 0 & 0 & 0 & 1 & 0 & 1 \\
        1 & 0 & 0 & 0 & 0 & 1 & 0
    \end{pmatrix}
$$
And then
$$
    N = (I_7 - Q)^{-1} =
    \frac14
    \begin{pmatrix}
        16 & 12 &  8 & 4 & 4 &  8 & 12 \\
        12 & 15 & 10 & 5 & 3 &  6 &  9 \\
        8  & 10 & 12 & 6 & 2 &  4 &  6 \\
        4  &  5 &  6 & 7 & 1 &  2 &  3 \\
        4  &  3 &  2 & 1 & 7 &  6 &  5 \\
        8  &  6 &  4 & 2 & 6 & 12 & 10 \\
        12 &  9 &  6 & 3 & 5 & 10 & 15
    \end{pmatrix}
$$

If we sum all values on the first row, because we are starting from position 1, we find that the expected number of times the candle is passed is 16.

Title: Random Walk Probability in a Circle


问:
Solve a congruence $1978^{20}\equiv x\pmod{125}$
I have checked the solution ($x=26$).

Solving modulo $5$ gives
$$1978^{20}\equiv 1978^{2\cdot 10}\equiv 1\pmod{5}$$

Solving modulo $25$ also gives
$$1978^{20}\equiv 1\pmod{5}$$

How to evaluate the remainder $x$?

Body:
Note that, modulo $125$, $11^2=121\equiv-4$ and $2^7=128\equiv3$.

Therefore, $1978^{20}\equiv(-22)^{20}\equiv 2^{20}11^{20}\equiv 2^{20}(-4)^{10}\equiv 2^{40}\equiv2^{35}2^5\equiv3^52^5\equiv6^5\equiv26$.


问:
Maximal ideals of $Z_6$
In $Z_n$ I know that $I=$ is a maximal ideal if and only if a is a prime divisor of n.
However according to this, in $Z_6$, <4> is not maximal since 4 is not a devisor of 6. But <4> is equal to <2> which is maximal how is that can anyone clarify this?

答:
The fact that $4$ is not a divisor of $6$ has nothing to do with $\langle 4\rangle$ being a maximal ideal or not.

The ideals of $\mathbb{Z}_6$ can be described as $\langle k\rangle$ where $k$ is a divisor of $6$, but this is all. In particular, $\langle 4\rangle$ must have that form and it turns out that $\langle 4\rangle=\langle 2\rangle$.

Title: Maximal ideals of $Z_6$


问:
Explicit form of a diagonal perturbed block 'one' matrix.
In the context of Quantum Many Body problem, I have encountered the following determinant:

$$\mathbb{F}[\{\mathbb{A}_{i}^{}\},\mathbb{B}_{}^{}]=\det[\mathbb{I}_{}^{} - \mathbf{A}_{}^{}\cdot\mathbf{B}_{}^{}],$$

where,

$\mathbb{I}_{}^{}$ is the $nN \times nN$ identity matrix,

$\mathbf{A}_{}^{}$ is an $nN \times nN$ complex block diagonal matrix defined as,
$$\mathbf{A}_{}^{} = \text{Diag}\begin{pmatrix}\mathbb{A}_{1}^{} & \cdots & \mathbb{A}_{N}^{}\end{pmatrix},$$
where $\mathbb{A}_{i}^{}$ are $n \times n$ general complex matrices and

$\mathbf{B}_{}^{}$ is an $nN \times nN$ complex matrix defined as,
$$\mathbf{B}_{}^{} = \mathbf{1}\otimes \mathbb{B}_{}^{},$$
where $\mathbb{B}_{}^{}$ is a $n \times n$ general complex matrix and $\mathbf{1}$ is the $N \times N$ 'one' matrix defined as,
$$\mathbf{1} = \begin{pmatrix} 1 & \cdots & 1\end{pmatrix}_{}^{T}\begin{pmatrix} 1 & \cdots & 1\end{pmatrix}.$$

Is it possible to write an explicit form for $\mathbb{F}[\{\mathbb{A}_{i}^{}\},\mathbb{B}_{}^{}]$?

$\textbf{Some thoughts:}$

(i) Is there any block matrix variant of matrix-determinant lemma? Can writing $\mathbf{A}\cdot\mathbf{B}==\begin{pmatrix}\mathbb{A}_{1}^{T} & \cdots & \mathbb{A}_{N}^{T}\end{pmatrix}_{}^{T}\begin{pmatrix} \mathbb{B}_{}^{} & \cdots & \mathbb{B}_{}^{}\end{pmatrix}$ help?

(ii) Is it possible to define 'eigenvalue-matrix' problem and express the needed in terms of determinants of $n \times n$ eigenmatrices?

答:
As you have noted, we indeed have
$$
\mathbf{A \cdot B} = \overbrace{\pmatrix{A_1 \\ \vdots \\ A_N}}^P \overbrace{\pmatrix{B & \cdots & B}}^Q.
$$
With that, we can use the WA-identity (which is indeed a generalization of the matrix determinant lemma) to get
$$
\det(I_{nN} - P \cdot Q) = \det(I_n - Q \cdot P) = \det[I_n - B(A_1 + \cdots + A_N)].
$$


问:
quadratic equation precalculus
from Stewart, Precalculus, 5th, p56, Q. 79

Find all real solutions of the equation

$$\dfrac{x+5}{x-2}=\dfrac{5}{x+2}+\dfrac{28}{x^2-4}$$

my solution

$$\dfrac{x+5}{x-2}=\dfrac{5}{x+2}+\dfrac{28}{(x+2)(x-2)}$$
$$(x+2)(x+5)=5(x-2)+28$$
$$x^2+2x-8=0$$

$$\dfrac{-2\pm\sqrt{4+32}}{2}$$
$$\dfrac{-2\pm6}{2}$$
$$x=-4\text{ or }2$$

official answer at the back of the book has only one real solution of $-4$

where did I go wrong?

Title: quadratic equation precalculus

Body:
$$\frac{x+5}{x-2}=\frac{5}{x+2}+\frac{28}{x^2-4}$$
multiply both sides with $(x-2)(x+2)\neq 0$ or $x\neq 2,x\neq -2$
we get
$$(x+5)(x+2)=5(x-2)+28,x\neq 2,-2$$

$$x^2+2x-8=0,x\neq 2,-2$$

$$x^2-2x+4x-8=0,x\neq 2,-2$$
$$x(x-2)+4(x-2)=0,x\neq 2,-2$$
$$(x-2)(x+4)=0,x\neq 2,-2$$
so $x+4=0$ or $x=-4\neq 2,-2$ is unique solution because from $x-2=0$ follow solution $x=-2$ that is prohibited


问:
Are $G(30,30)$ and $G(6,10,15)$ isomorphic?
Here is a little problem if anyone could help me with it, it would be a lot appreciated

Let $G(k_1,k_2,...,k_r)$ the abelian group define as: $$\mathbb Z /k_1\mathbb Z \,\times \mathbb Z /k_2\mathbb Z \,\times ...\mathbb Z  /k_r\mathbb Z$$

We define: $G(30,30)$ and $G(6,10,15)$.

Can we prove using the Chinese reminder theorem that there is an isomorphism between this two groups?

Thanks in advance for your help.

答:
The Chinese remainder theorem can be stated as

$$\mathbb{Z}/nm\mathbb{Z}\simeq\mathbb{Z}/n\mathbb{Z}\times \mathbb{Z}/m\mathbb{Z}$$

whenever $n,m$ are coprime. Or equivalently, in your notation

$$G(n\cdot m)\simeq G(n,m)$$

With that we have

$$G(30,30)=G(2\cdot 3\cdot 5,2\cdot 3\cdot 5)\simeq G(2,2,3,3,5,5)$$
$$G(6, 10, 15)= G(2\cdot 3, 2\cdot 5, 3\cdot 5)\simeq G(2,2,3,3,5,5)$$

and so they are clearly isomorphic.


问:
Proof that a non-negative quadratic equation has at most one solution without using calculus
I'm working through Lax and Terrell's 'Calculus with Applications'. One of the first exercises is to work through the proof of the Cauchy-Schwarz inequality (without calculus). I'm all good for my proof except for the first part: i.e., how do I prove that a non-negative quadratic equation has at most one solution?

I can 'explain' this geometrically, i.e., a non-negative quadratic equation can only have a solution where the vertex touches the X axis. However, this doesn't feel very 'rigorous'.

Is there a better, algebraic, proof I could use here?

Thank you!

答:
Consider $Ax^2+Bx+C\ge 0$ for all $x,$ with $A\ne 0.$

Take $x_0\ne 0$ where $|x_0|$ is large enough that $|B/Ax_0|<1/2$ and $|C/Ax_0^2|<1/2.$ Then $1+B/Ax_0+C/Ax_0^2\ge 1-|B/Ax_0|-|C/Ax_0^2|>0.$ Therefore $0\le Ax_0^2+Bx_0+C= Ax_0^2(1+B/Ax_0 +C/Ax_0^2)\implies Ax_0^2\ge 0\implies$ $\implies A\ge 0\implies A>0.$

Let $x_1=-B/2A$. Then $0\le Ax_1^2+Bx_1+C=A(x_1+B/2A)^2 +(4AC-B^2)/4A=(4AC-B^2)/4A,$ and since $A>0,$ therefore $0\le 4AC-B^2.$

The Quadratic Formula:   $Ax^2+Bx+C =0\iff x=\frac {-B\pm \sqrt {B^2-4AC}}{2A}.$ But $B^2-4AC\le 0 $ so $\sqrt {B^2-4AC} \not\in \Bbb R$ unless $B^2-4AC=0.$ So IF there exists $x_2$ with $Ax_2^2+Bx_2+C= 0$ THEN $B^2-4AC=0$ and $x_2=\frac {-B\pm \sqrt {B^2-4AC}}{2A}=\frac {-B\pm \sqrt {0}}{2A}=\frac {-B}{2A}.$

BTW. By the methods of 1., if $p$ is a non-zero polynomial and $p(x)\ge 0$ for all $x$ then deg($p$) is even and the leading co-efficient of $p$ is positive.


答:
If you mean the following statement by Chinese Remainder Theorem, then yes, we can solve it by using it:

Theorem(Chinese Remainder Theorem): Let $m,n \in \mathbb{Z}^+$ such that $\gcd(m,n) = 1$. Then, the map $\phi: \mathbb{Z}_{mn} \to \mathbb{Z}_{m} \times \mathbb{Z}_{n}$ defined by $\phi([x]_{mn}) = ([x]_m, [x]_n)$ is an isomorphism.

Then, we have
$$G(6,10,15) = \mathbb{Z}_6 \times \mathbb{Z}_{10} \times \mathbb{Z}_{15} \cong \mathbb{Z}_{2} \times \mathbb{Z}_{3} \times \mathbb{Z}_{10} \times \mathbb{Z}_{15} \cong \mathbb{Z}_{2} \times \mathbb{Z}_{15} \times \mathbb{Z}_{3} \times \mathbb{Z}_{10} \cong \mathbb{Z}_{30} \times \mathbb{Z}_{30}$$

Note that, we are also using the fact that $G \times H \cong H \times G$ to interchange the terms of the product.

Title: Are $G(30,30)$ and $G(6,10,15)$ isomorphic?

Body:
Here is a little problem if anyone could help me with it, it would be a lot appreciated

Let $G(k_1,k_2,...,k_r)$ the abelian group define as: $$\mathbb Z /k_1\mathbb Z \,\times \mathbb Z /k_2\mathbb Z \,\times ...\mathbb Z  /k_r\mathbb Z$$

We define: $G(30,30)$ and $G(6,10,15)$.

Can we prove using the Chinese reminder theorem that there is an isomorphism between this two groups?

Thanks in advance for your help.


问:
Find $n \times n$ matrices $A$ such that $\det A = 0$ and $\text{rank}(AB) = \text{rank}(BA)$ for any $n \times n$ matrix $B$
Find all complex-valued $n \times n$ matrices $A$ such that $\det A = 0$ and $\text{rank}(AB) = \text{rank}(BA)$ for any $n \times n$ complex-valued $B$.

I believe that $A = 0$ is the only answer.

I have been able to prove that, if $A$ is of rank $r$, then any $r$ lines and any $r$ columns are linearly independent. To see this, note that since $A$ is of rank $r$, then A has $r$ linearly independent columns; say that the indexes of these columns are $i_1, i_2, ..., i_r$. Then by making B equal to a matrix that has 1 in positions $(i_k,i_k)$ and 0 elsewhere, $AB$ basically "selects" $r$ independent columns from $A$ having all other columns equal to 0, so $\text{rank} AB = r$.

Now, $BA$ selects rows $i_1,i_2,..,i_r$ from $A$. If $A$ were to have $r$ rows that were not linearly independent, then there would be an inversible matrix $M$ which would place these rows in positions $i_1,i_2,...,i_r$. Then
$$\text{rank} (BA) = \text{rank} (BAM) < r,$$

which would contradict our hypothesis. Thus any $r$ rows of $A$ are linearly independent. Running the same argument in reverse, we get that any $r$ lines of $A$ are linearly independent.

Any ideas about how to proceed?

答:
Here is a reasoning to show just how difficult it is to have the ranks of $AB$ and $BA$ to be equal for all $B$, or even just for all $B$ of rank$~1$ (in making that limitation, my answer is similar to the one by Eclipse Sun). Such rank$~1$ matrices can be obtained as matrix products $B=CR$ where $C,R$ are nonzero column respectively row matrices (i.e., of size $n\times 1$ respectively $1\times n$). Changing $C$ in this expression can always be obtained (in many ways if $n>1$) by left-multiplication by some invertible matrix, and this therefore does not change the rank of $BA$; in the same way changing $R$ can be obtained by right-multiplication by some invertible matrix, and this therefore does not change the rank of $AB$. It follows that if the ranks of $AB$ and $BA$ are to be equal for all such$~B$, both have to be independent of $B$ altogether.

But then then only possibilities are when both ranks are always$~1$, which happens only for invertible matrices $A$ that were excluded by the hypothesis $\det(A)=0$, or when both ranks are always$~0$ which happens only for $A=0$.

In a bit more detail you can see, in the given situation, that the rank of $AB$ equals that of $AC$, and that the rank of $BA$ equals that of $RA$ (both are in $\{0,1\}$), and this quickly gives the indicates reasoning.


问:
Is any number coprime to itself?
I have a fundamental question, we know that Coprime numbers are integers that have only 1 as their common factor. Now, my question is how it works for the same numbers, for example, is $10$ coprime to $10$? Since they can be simplified as $\frac{1}{1}$ and $1$ is coprime to $1$.

答:
Your explanation for why $a$ should be coprime to $a$ is the exact reason that $a$ is not coprime to $a$ for $a > 1$.

In particular, positive integers $p,q$ are coprime if and only if the fraction $\frac pq$ cannot be simplified. The fact that $\frac {10}{10}$ can be simplified to $\frac 11$ means that the numbers $10,10$ are not coprime.

On the other hand, every positive integer is coprime to $1$. Equivalently, the fractions $\frac 1a$ and $\frac a1$ cannot be simplified.

Title: Is any number coprime to itself?


问:
Support Vector Machine and Hessian Normal Form
I'm using a Support Vector Machine from Scikit Learn.

Example data:

```<code>[[1, 1],
 [2, 2],
 [3, 3], ...]
</code>```

My code:

```<code>clf = svm.SVC(kernel='linear')
clf.fit(x, y)
</code>```

This gives me:

```<code>n = clf.coef_[0]
d = clf.intercept_[0]
</code>```

which I thought to be $ n_0 $ and $ d $ of the hessian normal form see:
$$
{\displaystyle {\vec {x}}\cdot {\vec {n}}_{0}-d=0}
$$

But when I plot the seperating hyperplane of my SVM something is wrong. The line has the right slope but the wrong intercept.

It seems like the formula has to be:

$$
{\displaystyle {\vec {x}}\cdot {\vec {n}}_{0}+d=0}
$$

What am I missing here?

答:
I believe this is just pure convention regarding what Scikit Learn means by the attribute "intercept". The implementation from Scikit Learn is based on libsvm, and I found this handy guide on the libsvm webpage:

https://www.csie.ntu.edu.tw/~cjlin/papers/guide/guide.pdf

In equation 1 of that guide they write down the optimization problem for SVMs, which I'll translate to the linear case since that's what you're working with; I'll also use your $\vec{n}_0, d$ notation. Supposing you have $l$ instance-label pairs $(\vec{x}_i,y_i)_{i=1}^l$, where $\vec{x}_i \in \mathbb{R}^n$ and $y_i \in \{-1,1\}$, you want to solve

$$\begin{align} \min_{\vec{n}, d, \vec{\xi}} &\frac{1}{2} \vec{n}\cdot \vec{n} + C \sum_{i=1}^l \xi_i,\\
\text{subject to } & y_i(\vec{n}\cdot \vec{x}_i + d) \geq 1-\xi_i,\\
& \xi_i \geq 0
\end{align}$$

The first constraint is the relevant one for your classification. Allowing yourself slack $\xi_i$ for each example, you want the sign of $y_i$ to be the same as $\vec{n}\cdot \vec{x}_i + d$. So that means you want all the examples of class $1$ to satisfy $\vec{n}\cdot \vec{x}_i + d >0$, and all examples of class $-1$ to satisfy $\vec{n}\cdot \vec{x}_i + d <0$.

So, the decision plane is $\vec{n}\cdot \vec{x}_i + d = 0$, as you've guessed.


问:
Counter example in Sobolev space
I'm trying to find a counter example to the following if there does indeed exist one. Let us consider $u\in W^{2,\infty}(\mathbb{R}^n)$ does it follow that $u \in C^{1,1}(\mathbb{R}^n)$. It is known to me that $W^{1,\infty}(\mathbb{R}^n) = C^{0,1}(\mathbb{R}^n)$ (well after modifying the elements in the Sobolev space on a null set) and that the norms are equivalent. Additionally, if there are no counter examples would it be possible to get a hint for proving why the Sobolev space lies in the Holder

The only progress I do have is that using Banach-Alaoglu one can show that $C^{k,1}(\mathbb{R}^n) \subset W^{k+1,\infty}(\mathbb{R}^n)$, but of course this is the wrong direction.

EDIT
I think I have proved that indeed $C^{k,1}(\mathbb{R}^n) = W^{k+1,\infty}(\mathbb{R}^n)$. I'll post my solution in a couple of days for those of you interested.

答:
Here is the proof I have, I'll do it for $k=2$ but arbitrary $k$ follows by induction and the inductive step follows in a very similar way. Fix $x\in \mathbb{R}^n$, let $u\in W^{2,\infty}(\mathbb{R}^n)$ and suppose WLOG that $Du(x)=0$, otherwise, consider $\tilde{u}(y) = u(y) +(x-y)Du(x)$. Then $Du \in W^{1,\infty}(\mathbb{R}^n) = C^{0,1}(\mathbb{R}^n)$ by Morrey's embedding theorem. Then due to the continuity of $Du$ we have that; $$\lim_{r\downarrow0}\|Du\|_{L^\infty(B_r(x))} = 0 $$.

Then by Morrey's Lemma (applied to $u$ which also in $W^{1,\infty}(\mathbb{R}^n)$ we have that $\forall y \in B_r(x)$;

$$|u(x)-u(y)| \leq |x-y| \|Du\|_{L^\infty(B_r(x))}.$$

Thus ,
$$\lim_{r\downarrow0} \sup_{y \in B_r(x)} \frac{|u(x)-u(y)|}{|x-y|} = 0$$

Hence $u$ is differentiable at $x$. But we can apply this to all $x\in \mathbb{R}^n$ and conclude that $u$ is differentiable everywhere and we already know that $Du$ is continuous and so $u\in C^1(\mathbb{R}^n)$ and hence we are done.

I've skipped a few details, if anyone would like something more specific please let me know!

Title: Counter example in Sobolev space


问:
Non-degenerate scalar product.
If a non degenerate scalar product (notation say $<,>$), is defined on a finite dimensional vector space $V$.

can we say that $<v,v> \neq 0 $ where $v\in V$

答:
First of all, note that for $v=0$ we have $\langle v,v \rangle = 0$. If we exclude $v=0$, then the answer depends on what your definition of a scalar product is.

If $\langle \cdot,\cdot \rangle$ is positive-definite, like the usual euclidean scalar product used in geometry, then $\langle v, v \rangle > 0$
for all $v \neq 0$.

If by an inner product you mean a symmetric bilinear form, then, even if $v$ is non-zero, we cannot say that $\langle v, v \rangle \neq 0$. For example, take the hyperbolic plane, that is, $\mathbb R^2$ with the inner product defined as

$$\langle x_1e_1+x_2e_2, y_1e_1 + y_2e_2\rangle = x_1y_1 - x_2y_2$$

(where $e_1, e_2$ is the standard basis), which is non-degenerate.

Then, for $v = e_1 + e_2$, we have $\langle v, v \rangle = 1 - 1 = 0$.

Title: Non-degenerate scalar product.


问:
proof related to Fundamental Theorem of Calculus $f$ is not necessarily continuous on an interval
I want to solve the problems from the book "A Course of Modern Analysis" (P 65) by E.T. Whittaker & G.N. Watson. The notation in this book is a little old-fashioned and I don't really like their notation.

If $f(x)$ is integrable when $a_1 \le x \le b_1$, when $a_1 \le a < b < b_1,$ we write
$$
\int_{a}^bf(x)dx = \phi(a,b),
$$
and if $f(b+0)$ exists, then
$$
\lim_{\delta \to 0^+} \frac{\phi(a, b+\delta)-\phi(a, b)}{\delta} = f(b+0).
$$

Here is my attempt for the problem:

\begin{align*}
\lim_{\delta \to 0^+} \frac{\phi(a, b+\delta)-\phi(a, b)}{\delta}  &= \lim_{\delta \to 0^+} \frac{\int_{a}^{b+ \delta}f(x)dx -\int_{a}^bf(x)dx }{\delta} \\
&=  \lim_{\delta \to 0^+} \frac{\int_{b}^{b + \delta}f(x)dx}{\delta}.
\end{align*}
Then I got stuck here.

答:
This is a general version of the Fundamental Theorem of Calculus.

Just note that $f(x) \to f(b+0)=L(\text{say}) $ as $x\to b^+$ and thus we have corresponding to a given $\epsilon>0$ a $\delta>0$ such that $$L-\epsilon <f(x) <L+\epsilon $$ whenever $b<x<b+\delta$. If $0<h<\delta$ then integrating the above inequality over interval $[b, b+h] $ we get $$h(L-\epsilon) <\int_b^{b+h} f(x)\, dx<h(L+\epsilon) $$ ie $$L-\epsilon<\frac{1}{h}\int_b^{b+h}f(x)\,dx<L+\epsilon $$ for all $h$ with $0<h<\delta$. This means (by definition of limit) that $$\lim_{h\to 0^+}\frac{1}{h}\int_b^{b+h}f(x)\,dx=L$$ which is exactly what you wanted to prove.


问:
Solving $\left(\sin\left(\sqrt{x}+5\right)-\cos\left(\sqrt{x}+5\right)\right)e^\sqrt{x}=0$
I tried to solve the following problem; but I couldn't.

$$\left(\;\sin\left(\sqrt{x}+5\right)-\cos\left(\sqrt{x}+5\right)\;\right)e^\sqrt{x}=0$$

I placed it into Microsoft Math Solver and the following was the answer:

$$x=\frac{(-4\pi n_1+20-9\pi)^2}{16}, n_1\in Z$$

How do I solve it to reach the correct answer?

My solution:

$$\sin(\sqrt{x}+5)=\cos(\sqrt{x}+5)$$

$$\sqrt{x}+5=\pi n_1+\frac{\pi}{4}$$

And after solving it I obtained:

$$x=\frac{(4\pi n_1-20+\pi)^2}{16}$$

My solution lacks the $9$ that there's in the correct answer.

Am I doing something wrong?

Body:
Your answer is equivalent to the one given. In particular, we have
$$
\frac{(4\pi n_1-20+\pi)^2}{16} = \\
\frac{(-4\pi n_1+20-\pi)^2}{16} = \\
\frac{(-4\pi[n_1-2 + 2]+20-\pi)^2}{16} =\\
\frac{(-4\pi[n_1-2] - 8\pi+20-\pi)^2}{16} =\\
\frac{(-4\pi[n_1-2]+20-9\pi)^2}{16}.
$$


答:
You are correct.
$n_1$ is just an arbitrary integer.

You can rewrite, $\boxed{(-4\pi n_1 +20 - 9\pi ) ^2}= (4\pi n_1 + 9\pi - 20)^2 = (4\pi n_1 + 8\pi + \pi - 20)^2 = \boxed{(4\pi n + \pi -20)^2}$

where $n = n_1 +2$

Title: Solving $\left(\sin\left(\sqrt{x}+5\right)-\cos\left(\sqrt{x}+5\right)\right)e^\sqrt{x}=0$

Body:
I tried to solve the following problem; but I couldn't.

$$\left(\;\sin\left(\sqrt{x}+5\right)-\cos\left(\sqrt{x}+5\right)\;\right)e^\sqrt{x}=0$$

I placed it into Microsoft Math Solver and the following was the answer:

$$x=\frac{(-4\pi n_1+20-9\pi)^2}{16}, n_1\in Z$$

How do I solve it to reach the correct answer?

My solution:

$$\sin(\sqrt{x}+5)=\cos(\sqrt{x}+5)$$

$$\sqrt{x}+5=\pi n_1+\frac{\pi}{4}$$

And after solving it I obtained:

$$x=\frac{(4\pi n_1-20+\pi)^2}{16}$$

My solution lacks the $9$ that there's in the correct answer.

Am I doing something wrong?


问:
Simplifying fractions with fractions
I am trying to simplify

$$\frac{\frac{y}{x} - \frac{x}{y}}{\frac{1}{y} - \frac{1}{x}}$$

I make the top part into

$$\frac{y^2 - x ^2}{xy}$$

I know the bottom can be rewritten to just be multiplied into the top as its inverse.

$$\frac{y^2 - x ^2}{xy} * (y - x)$$

$$\frac{y - x }{xy} $$

This of course is wrong, but I do not know why, it appears to be correct to me. Nothing I did is mathematically wrong, it follows all the rules. What went wrong?

答:
The inverse of the denominator
$$\frac{1}{y}-\frac{1}{x}$$
is not $y-x$. The denominator is equal to
$$\frac{1}{y}-\frac{1}{x}=\frac{x-y}{xy},$$
so its inverse is
$$\frac{xy}{x-y},$$
so the entire fraction is
$$\frac{\frac{y}{x}-\frac{x}{y}}{\frac{1}{y}-\frac{1}{x}}=\frac{\frac{y^2-x^2}{xy}}{\frac{1}{y}-\frac{1}{x}}=\frac{\frac{y^2-x^2}{xy}}{\frac{x-y}{xy}}=\frac{y^2-x^2}{xy}\cdot\frac{xy}{x-y}=\frac{y^2-x^2}{x-y}$$
There's one more simplification you can make at this step; do you see it?</p>

Title: Simplifying fractions with fractions


问:
Lack of clarity in complete integrals and envelopes in Partial Differential Equations?
The Complete integrals is used in the analysis of non linear first order PDE. I came across it in the books Partial Differential Equations by Evans Lawrence.
$$F(Du,u,x)=0$$
Where Du is the gradient of u. In very first page of chapter 3 it says u is function $u:U->R$ (U is subset of $R^n$ but while defining the complete integral it says $u=u(x;a)$ (where x and a belongs to X and A respectively) $C^2$ function in $U×A$, A being a open subset of $R^n$. Similar representation of u can also be seen in the definition of envelopes.
And considering the remark I found in consequent part of the book $D_au$, what does this symbol means is it gradient with respect to a vector ( if so how can we define it since it's only a parameter) or is it else?

So my question is:-

What is the domain of the function u here?

And

What is $D_au$ formally?

答: x is in the space $R^n$  and a is a (real) parameter so one could say "the domain is $R^{n+1}$"  but a more hard-nosed person might say it is "$R^n$ with  parameter a".  "$D_au$" is the derivative of u with parameter a.  For example "$D_a$ might be $\frac{\partial}{\partial x}+ a\frac{\partial}{\partial y}$ so that $D_1= \frac{\partial}{\partial x}+ \frac{\partial}{\partial y}$ and $D_2= \frac{\partial}{\partial x}+ 2\frac{\partial}{\partial y}$.  $D_au= \frac{\partial u}{\partial x}+ a\frac{\partial u}{\partial y}$ for various values of a.


答: Two numbers $a$ and $b$   are coprimes to each other if  $gcd(a,b) =1$. Since $gcd(a,a) = a$ we have $a$ is not coprime with itself for $a \ne 1$.

Title: Is any number coprime to itself?

Body: I have a fundamental question, we know that Coprime numbers are integers that have only 1 as their common factor. Now, my question is how it works for the same numbers, for example, is $10$ coprime to $10$? Since they can be simplified as $\frac{1}{1}$ and $1$ is coprime to $1$.


问:
Are there non-homogeneous topological spaces which are "almost homogeneous" in Rudin's sense?
Let $X$ be a nonempty topological space and $G$ the group of all homeomorphisms $g:X\to X$. Recall that $X$ is homogeneous if $G$ acts transitively on $X$. In

"Homogeneity Problems in the Theory of Čech Compactifications", The Mathematical Legacy of Eduard Čech (1993), pages 81-92,

Walter Rudin considers the following condition on $X$: for all point $x\in X$ and all nonempty open subset $U\subset X$ there is a $g\in G$ such that $g(x)\in U$. He calls such a space almost homogeneous.

I suspect that there are simple examples of almost homogeneous non-homogeneous spaces, but I haven't been able to find any. Let me ask the implicit question formally, together with an obvious follow-up question:

Question 1. Are there almost homogeneous non-homogeneous spaces?

Question 2. Assuming the answer to Question 1 is Yes, what is the least possible cardinality of an almost homogeneous non-homogeneous space?

[I added the quotient-spaces tag because, in the above notation, $X$ is almost homogeneous if and only if the quotient topology of $G\backslash X$ is coarse.]

答:
Yes, there are such spaces, as showed by Eric Wofsey. Another way to produce examples of almost homogeneous but not homogeneous spaces is to look at any minimal $\Bbb Z$-flow (meaning a compact $\Bbb Z$-space such that every orbit is dense) which is not homogeneous, here is a way to build one:

Given a rectangle $B=[a,a+h]\times[b,b+k]$ let $\lambda(B)$ denote the disjoint union of three rectangles obtained by removing the second and fourth vertical fifth of $B$, and then removing the top half and the bottom half of the left and right rectangles thus obtained (see the two figures below for the first two stages). More formally $\lambda(B)=B_0\cup B_1\cup B_2$ where
\begin{align*}
 B_0&=[a,a+h/5]\times[b,b+k/2]\\
 B_1&=[a+2h/5,a+3h/5]\times[b,b+k]\\
 B_2&=[a+4h/5,a+h]\times[b+k/2,b+k].
 \end{align*}

Now let $B^{(0)}=[0,1]\times[0,1]$ and define $B^{(n+1)}=\lambda(B^{(n)})$, so that $B^{(n)}$ consists of $3^n$ disjoint rectangles, numbered as in the two figures below, that is
$$\lambda(B^{(n)}_j)=B^{(n+1)}_{j}\cup B^{(n+1)}_{j+3^n}\cup B^{(n+1)}_{j+2\cdot 3^n}.$$

Let $X=\bigcap_n B^{(n)}$, which is a compact metric space made of vertical line segments (which are all degenerate to points except for countably many segments). There is one central segment of length $1$ and for each $n\in\Bbb N$ there are infinitely many segments of length $1/2^n$. This space is not homogeneous, because there are points with different local dimensions, namely $0$ and $1$ depending on whether they belong to a degenerate segment or not. The permutations $B^{(n)}_j\mapsto B^{(n)}_{j+1}$ induce a homeomorphism $\phi$ of $X$ (note that $\bigcap_n B^{(n)}_{j_n}\neq\varnothing$ iff $j_{n+1}\equiv j_n\;\;(\mathrm{mod }\;\;3^n)$, so the permutations induce a map $\bigcap_n B^{(n)}_{j_n}\to \bigcap_n B^{(n)}_{{j_n+1}}$, if both are nontrivial segments map one onto the other linearly). Then the $\Bbb Z$-flow coming form $\phi$ is minimal, since every point has dense orbit (the orbit of every point intersects every $B^{(n)}_j$), which means that this space is almost homogeneous, since $\phi\in\mathrm{Homeo}(X)$.

Stage 1 of the construction.

Stage 2 of the construction.

Regarding the cardinality question here are some observations. First of all note that $X$ also has cardinality $2^{\aleph_0}$. In general you won't find any countable example among compact hausdorff spaces:

Lemma: Let $G$ be a group and $X$ a minimal $G$-flow. Then either $X$ is finite or $X$ is perfect.

Proof: Suppose that there is an isolated point $x_0$. Since every orbit is dense, $x_0$ belongs to every orbit, which implies that there is a single orbit and every point is isolated. By compactness of $X$, it must be a finite space.

together with the standard result that perfect compact hausdorff spaces are uncountable.