问:
Does $\lim_{x \to a}\frac{f(x)}{g(x)}=0 \text{ and } \lim_{x \to a}g(x)=0 \implies \lim_{x \to a}f(x) = 0$?
The Problem

Say
$$
\lim_{x \to a}\frac{f(x)}{g(x)}=0 \text{ and } \lim_{x \to a}g(x)=0 \, .
$$
Does this imply that $$\lim_{x \to a} f(x) = 0 \, ?$$
I understand that $f(x)$ must become very small relative to $g(x)$ as $x$ approaches $a$, but I'm worried that my intuitions might be failing me here.

What I have tried so far

For some neighbourhood of $a$, it seems evident that $|f(x)|\leq|g(x)|$. (Otherwise, the limit wouldn't equal $0$.) Consider the case where both $f(x)$ and $g(x)$ are nonnegative. Then, we are left with $0 \leq f(x) \leq g(x)$. Since
$$
\lim_{x \to a}g(x)=\lim_{x \to a}0=0 \, ,
$$
the squeeze theorem seems applicable here. However, I'm not sure how to generalise this result to when $|f(x)|\leq|g(x)|$, nor am I certain how to show that $|f(x)|\leq|g(x)|$ in the first place.

答:
Overcomplicating things is not always bad. Maybe it will help you improve your $\epsilon-\delta$ proof skills. I'll prove the contrapositive by assuming $\neg \left(\lim_{x \to a} f(x) = 0\right)$ and $\lim_{x \to a}g(x)=0$, and show that $\neg \left(\lim_{x \to a}\frac{f(x)}{g(x)}=0\right)$. Let us examine what each of these statements means.

First, define $E_{z,\alpha} = (z-\alpha,z)\cup(z,z+\alpha).$

$\neg \left(\lim_{x \to a} f(x) = 0\right)$ is equivalent to the statement:

$\exists r>0$ such that $\forall \gamma>0,\ \exists \ x_\gamma\in  E_{a,\gamma}$  such that $|f(x_\gamma)-0| = |f(x_\gamma)| > r.$

Next, $\lim_{x \to a}g(x)=0$ is equivalent to the statement:

$\forall \varepsilon>0, \exists \delta>0$ such that $|f\left(x\right)-0| = |f\left(x\right)| <\varepsilon,\ \forall x \in E_{a,\delta}.$

We want to show that $\exists r'>0$ such that $\forall \beta > 0, \exists x_\beta \in E_{a,\beta}$ such that $\frac{|f(x_\beta)|}{|g(x_\beta)|} > r'.$

To this end, let $\beta > 0$ and then let

$
\beta'=
\begin{cases}
 \beta&\text{if}\, 0<\beta\leq 1\\
 \frac{1}{\beta}&\text{if}\, \beta > 1.\\
\end{cases}
$

Then $\exists \delta>0$ such that $ |g(x)| < \beta' \leq \beta \quad \forall \ x \in E_{a,\delta}$.

Also, $\exists x' \in E_{a,\delta}$ such that $|f(x')| > r.$

So now it makes sense to let $r' = r.$

Therefore, $\frac{|f(x')|}{|g(x')|} > \frac{r}{\beta'} \geq r$ for this $x' \in E_{a,\delta}.$

In other words, $r' = r$, and we have shown that $\exists r$ such that $\forall \beta > 0, \exists \delta > 0$ such that $\exists x' \in E_{a,\delta}$ with $\frac{|f(x')|}{|g(x')|} > r,$

i.e. $\lim_{x \to a} \frac{|f(x)|}{|g(x)|}$ does not exist.


问:
Problem with the Definition of Inner Product Space.
Let $V$ be a vector space over a field $F=\mathbb{R}/\mathbb{C}.$ Then an inner product on V is defined to be a function $(,):V\times V \rightarrow \mathbb{F}$ satisfying the following property:

Linearity in the first coordinate.

Conjugate-Symmetry.

Positivity: For all $x \in V$, if $x$ is nonzero then $(x,x)>0$.

My Questions:

If I  take $\mathbb{F}$ to be $\mathbb{C}$. Since it is not an ordered field,
the idea of positivity does not make sense. But I find this definition
everywhere. Am I missing something out?

Every Inner Product defined on $V$ (an $\mathbb{R}$-vector space) is bilinear.
Does every bilinear map $f: V\times V\rightarrow \mathbb{R}$  give rise to an
inner product on $V$?

答:
The third condition should be: for every $x\in V$, $(x,x)\in[0,\infty)$. In particular, $(x,x)$ is always a real number.

No. If, say $f(x,x)$ is always equal to $0$; then $f$ is not an inner product. And, if $V=\Bbb R$ and $f(x,y)=-xy$, this $f$ is also not an inner product.

ContentLicense: CC BY-SA 4.0


问:
Intuitive explanation of why the modified Gram-Schmidt is more stable than the classical one?
This may be an old question, and there are certainly some related posts which I will mention below. However, there seems no clear answer to me yet. The question is: is there an intuitive way to explain why the modified Gram-Schmidt (MGS) process for doing QR factorization of a matrix $A\in\mathbb{C} ^{m\times n}$ gives a $Q$ matrix that is "more orthogonal" than that from the classical Gram-Schmidt (CGS) process? By "intuitive", I hope the explanation can be related to the procedural difference between MGS and CGS in a transparent way.

In Trefethen's Numerical Linear Algebra, the distinction between the CGS and MGS is as below:

At the $j$th step, both GS processes compute $q_j$ as
$$ q_j=\frac{P_j a_j }{\|| P_j a_j \|| } $$
while for CGS,
$$ P_j=I-Q_{j-1}Q_{j-1}^* $$
but for MGS,
$$ P_j=(I-q_{j-1}q_{j-1}^* )...(I-q_2q_2^* )(I-q_1q_1^* ) $$

Trefethen does not discuss why this procedural difference leads to the better numerical stability of MGS.

@AlgebraicPavel has given quantitative bounds here on the orthogonality factors: $\||I-Q^* Q\||\leq O(\epsilon \kappa(A))$ for MGS, while $\||I-Q^* Q\||\leq O(\epsilon \kappa^2(A))$ for CGS. These results are quantitative enough. However, as mentioned above, I would like a more intuitive reasoning for how this comes out.

@Ian said here that:

"Classical Gram-Schmidt, in which you subtract off the projections of the (k+1)th vector onto the first k vectors, is quite unstable, especially in high dimensions, because you essentially ensure that your new vector is orthogonal to the input vector in question but fail to ensure that the vectors you get at the end of the process are orthogonal to each other. Combine that with the fact that you can wind up subtracting nearly equal numbers and you get a bad situation."

This does sound like an intuitive and qualitative explanation for the problem of CGS. However, going into the detail, I don't feel comfortable about this line of reasoning. Specifically, saying that the "new vector is orthogonal to the input vector in question" does not seem to agree with what CGS is doing. For both CGS and MGS, the new vector ($a_j$) is subtracted in an attempt to make it orthogonal to the existing $q_i, i=1,...,j-1$. It might not be proper to call these $q_i$ "input vector", and this does not address the main procedural difference between MGS and CGS.

In this post, the $4\times 3$ Lauchli matrix is used as an example to demo the different results between MGS and CGS. Though there is still no intuitive explanation to the question either, I notice that for this Lauchli example, the result that $q_3^{CGS}$ fails to be orthogonal to $q_2^{CGS}$ is because the $r_{23}^{CGS}$ is wrongly computed, with a relative error of 100%. However, I can't figure out why the MGS procedure can alleviate this problem significantly.

I greatly appreciate any comments.

答:
In both CGS and MGS, the orthogonalization step of subtracting off projections onto the columns of $Q$ that have already been computed introduces errors to due to finite-precision arithmetic. Each column $\mathbf{q}_i$ of $Q$ therefore has some error component in the direction of previously-computed columns $\{\mathbf{q}_1….\mathbf{q}_{i-1}\}$. The error accumulates for increasing column number $i$, which is an inherent weakness in both algorithms.

In CGS, the orthogonalization of a column $n$ against column $\mathbf{q}_{i}$ ($i<n$) is performed by projecting the original column of $A$ (call this $\mathbf{a}_n$) onto $\mathbf{q}_{i}$ and subtracting.
$$
\begin{split}
\mathbf{p}_{n} &\equiv \mathbf{a_n} - \sum_{i=1}^{n-1}(\mathbf{q_i^T}\cdot \mathbf{a_n})\mathbf{q_i} \\
\mathbf{q}_{n} &= \frac{\mathbf{p}_{n}}{\|\mathbf{p}_{n}\|}
\end{split}
$$
In MGS, on the other hand, the components along each $\mathbf{q}_i$ are immediately subtracted out of rest of the columns to the right of column $i$ as soon as the $\mathbf{q}_i$ are computed. Therefore the orthogonalization of column $n$ against $\mathbf{q}_{i}$ is not performed by projecting $\mathbf{q}_{i}$ against the original column of $A$ as it is in CGS, but rather against a vector obtained by subtracting from that column of $A$ the components in span($\mathbf{q}_1….\mathbf{q}_{i-1}$). This is important because of the error components of $\mathbf{q}_i$, which span $\{\mathbf{q}_1….\mathbf{q}_{i-1}\}$.

More precisely, in MGS the orthogonalization of column $n$ against $\mathbf{q}_{i}$ is performed by subtracting the component of $\mathbf{q}_{i}$ from the vector $\mathbf{v}_n^{i-1}$, where $\mathbf{v}_n^0\equiv \mathbf{a}_n$ and $\mathbf{v}_n^i$ ($0<i<n$) is defined as
$$
\begin{split}
\mathbf{v}_n^{i}&\equiv \mathbf{v}_n^{i-1} -(\mathbf{q}_{i}^T\cdot \mathbf{v}_n^{i-1})\mathbf{q}_{i}, \\
\mathbf{q}_n &= \frac{\mathbf{v}_n^{n-1}}{\|\mathbf{v}_n^{n-1}\|}
\end{split}
$$
Notice the difference in the projection factors in parenthesis in the above expression, $(\mathbf{q}_{i}^T\cdot \mathbf{v}_n^{i-1})$, and the corresponding one for CGS, ($\mathbf{q_i^T}\cdot \mathbf{a_n}$). The vector $\mathbf{q}_i$ has error components in span($\mathbf{q}_1….\mathbf{q}_{i-1}$) that will be introduce error into this projection factor. Whereas the vector $\mathbf{a}_n$ can in general have large components in span($\mathbf{q}_1….\mathbf{q}_{i-1}$), the vector $\mathbf{v}_n^{i-1}$  has only error components in span($\mathbf{q}_1….\mathbf{q}_{i-1}$) because in computing $\mathbf{v}_n^{i-1}$ those components of $\mathbf{a}_n$ in span($\mathbf{q}_1….\mathbf{q}_{i-1}$) have already been subtracted off. As a result, the error in this multiplicative factor due to the imperfect orthogonality between $\mathbf{q}_i$ and $\{\mathbf{q}_1...\mathbf{q}_{i-1}\}$ is much smaller in MGS than it is in CGS.

Because of the much smaller error in this projection factor, the MGS introduces less orthogonalization error at each subtraction step than does CGS.


问:
Show that $\lim_{j\to\infty}\int_{\mathbb{R}^n}f_jd\mathcal{L}^n=\int_{\mathbb{R}^n}f\mathcal{L}^n$
Let $g_j\le f_j\le h_j$ be three sequences of Lebesgue-integrable functions with $g_j\to g, f_j\to f, h_j\to h$ such that $g,h\in L^1(\mathbb{R}^n)$ and $\lim_{j\to\infty}\int_{\mathbb{R}^n}h_jd\mathcal{L}^n=\int_{\mathbb{R}^n}hd\mathcal{L}^n,\;\lim_{j\to\infty}\int_{\mathbb{R}^n}g_jd\mathcal{L}^n=\int_{\mathbb{R}^n}gd\mathcal{L}^n $.

Show that $f\in L^1(\mathbb{R}^n)$ and $\lim_{j\to\infty}\int_{\mathbb{R}^n}f_jd\mathcal{L}^n=\int_{\mathbb{R}^n}fd\mathcal{L}^n$.

My work so far: $f$ is integrable by the definition of the Lebesgue integral since both the negative (which I will denote by $f_{\_}$) and positive part of $f$ (which I will denote by $f_{+}$) are bounded by $g_{\_}$ and $h_{+}$.

My problem is the second part: I want to obtain something like $f_j\ge h_j+\epsilon$ and $f_j\le g_j-\delta$ for some $\epsilon,\delta> 0$ in order to be able to use the fact that we can switch integral and limit for $g$ and $h$. I have already tried to make the convergence uniform by using Egorov locally and then gluing the result together but I don't know how to continue from here.

答:
I don't think you should have uniform convergence. Here is my idea:

Let $f_{n-}$ denote the negative part of $f_n$ for every $n$. $f_{n-}$ is always a positive function. Thus, by Fatou's Lemma $$\int_{\mathbb{R}^n}f_-\;d\mathcal{L}^n\leq\liminf_{n\to\infty}\int_{\mathbb{R}^n}f_{n-}\;d\mathcal{L}^n\leq\limsup_{n\to\infty}\int_{\mathbb{R}^n}f_{n-}\;d\mathcal{L}^n\leq\int_{\mathbb{R}^n}f_-\;d\mathcal{L}^n.$$ The same follows analogously for $f_+$. The proof follows from the definition of the Lebesgue Integral.


问:
Is my solution correct in terms of proof? I can't prove directly that $f(x)=4$.
Given  $f:\mathbb{R}\rightarrow \mathbb{R}^+$ and the following conditions:

$f(x+2)\cdot f(x+3)=16$,

$f(x)+f(-x)=8$,

we have to find integral $\int_{-8}^8 f(x-2019)dx$. So, if we plug in $0$, then $f(0)+f(0)=8$. Therefore, $f(0)=4$. Then plug in $-2$ in first equation,  we get $f(0)\cdot f(1)=16$, therefore $f(1)=4$, analogically plug $x=-1$ and I think that $f(x)=4$, so answer will be  $64$ (value after integrating). Is this correct? How can i prove it in a better manner?

答:
Here's a more direct solution:

From 1 we have $\displaystyle f(1+x)=\frac{16}{f(x)}$ and from 2 we have $f(x) = 8-f(-x)$.

Then $$f(x) = f(1+x-1) = \frac{16}{f(x-1)} = \frac{16}{8-f(1-x)} = \cfrac{16}{8-\cfrac{16}{f(-x)}} = \cfrac{16}{8-\cfrac{16}{8-f(x)}}$$

Solving for $f(x)$ we get $f(x)=4$.


问:
Why is there an inconsistency between manual calculations result and R calculation result in t-test?
Initially, I asked this question in "Cross Validated" but since no clear answer was received I moved the question to here.

I have the following sample:

tree length : 186, 181, 176, 149, 184, 190, 158, 139, 175, 148, 152, 111

after using some nutrient:

tree length : 181, 191, 186, 129, 178, 194, 139, 122, 195, 158, 158, 104

I am using Welch two sample t-test with two-tailed testing to see if the nutrient had an effect on tree growth therefore,

$H_0$: Nutrient had no effect.

$H_1$: Nutrient had an effect.

The results in R are as follows:

```<code>l1 = c(186, 181, 176, 149, 184, 190, 158, 139, 175, 148, 152, 111)
summary(l1); length(l1);  sd(l1)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
  111.0   148.8   166.5   162.4   181.8   190.0
[1] 12
[1] 23.70063

l2 = c(181, 191, 186, 129, 178, 194, 139, 122, 195, 158, 158, 104)
summary(l2); length(l2);  sd(l2)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
  104.0   136.5   168.0   161.2   187.2   195.0
[1] 12
[1] 31.26754

t.test(l1, l2, alternative = c("two.sided"), paired = FALSE, var.equal = FALSE, conf.level = 0.95)

    Welch Two Sample t-test

data:  l1 and l2
t = 0.10301, df = 20.503, p-value = 0.919
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -22.42215  24.75548
sample estimates:
mean of x mean of y
 162.4167  161.2500
</code>```

Based on the results, $H_0$ is rejected as there has been an effect.

Now, I do the calculations manually:

$t_\alpha = \frac{\mu_1 - \mu_2}{\sqrt{\frac{\sigma_1^2}{n_1} + \frac{\sigma_2^2}{n_2}}} = \frac{162.4 - 161.2}{\sqrt{ \frac{23.7^2}{12} + \frac{31.268^2}{12}}} \approx 0.11$

I get the t-value to be 0.11 where there is a 0.01 difference between this result and the R's one (probably due to the different degree of freedom? R uses 20.503 whereas I am using 22 in my calculations). Then based on the significance level of 0.05 and degree of freedom 22, I find the critical value to be 2.074 in the t-distribution table. So since 0.11 < 2.074 $\Rightarrow t_\alpha$ < critical-value, the null hypothesis is failed to reject. But this is inconsistence with R result as in R the null hypothesis was rejected and alternative hypothesis was supported: alternative hypothesis: true difference in means is not equal to 0. So why is there an inconsistency between R result and manual calculation result?

答:
There are at least three issues:

Neither your manual calculation nor the R automated calculation reject the null hypothesis, and you can see this from the high $p$-value and the confidence interval overlapping $0$.  The critical value from $R$ would be qt(0.975,20.503) i.e. about $2.083$, much larger than its $t \approx 0.103$ and  not far from your critical value of $2.074$

rounding of the means: $162.4-161.2=1.2$ but $162.4167 - 161.2500 = 1.1667$; this can make the $t$-value about $0.106$ (rounding to $0.11$) rather than $0.103$

the number of degrees of freedom: when Welch's $t$-test is used when the two variances are not assumed to be equal, there is the complicated expression below for approximating the degrees of freedom (usually not an integer) so your $\nu=(12-1)+(12-1) =22$ would be based  on an assumption the variances are equal while removing this assumptions gives about $20.5$. $$\nu \quad  \approx \quad
{\dfrac{\left( \; {s_1^2 \over n_1} \; + \; {s_2^2 \over n_2} \; \right)^2 }
 { \quad {s_1^4 \over n_1^2 (n_1-1)} \; + \; {s_2^4 \over n_2^2 (n_2-1) } \quad }}$$


问:
$\operatorname{int}_ {\tau_1}(A) \subseteq\operatorname{int}_{\tau_2}(A) $ and $ \overline{A}^{\tau_1} \supseteq\overline{A}^{\tau_2}$
Let $\tau_1$ and $\tau_2 $ topologies over a set $X$ such that $ \tau_1 \subseteq \tau_2 $. Show that for every $ A \subseteq X $, you have to $\operatorname{int}_{\tau_1}(A) \subseteq \operatorname{int}_{\tau_2}(A)$ and $\overline{A}^{\tau_1} \supseteq \overline{A}^{\tau_2}$.

答: The intuition for the closure inclusion is the following: the finer the topology, the more open sets (and so the more closed sets) you have. Since the closure of a set $A$ is the intersections of all closed sets that contain $A$, then it follows that if I take the intersection over more sets (the case of the closure of $A$ in $\tau_2$) I will get a (weakly) smaller set.


问:
binomial coefficients modulo $3$
Let $a(n)$ be the number of binomial coefficient's on the $n$-th row of Pascal's triangle which leave remainder $1$ upon division by $3$, and $b(n)$ be the number that leave remainder $2$. Show that $a(n)-b(n)$ is a power of $2$.
So I stumbled upon this problem in a book by Naoki Sato online and have been unable to crack it since. After generating the first few values of $a(n)-b(n)$ on python, I'm fairly convinced that the answer to the problem has something to do with the base $3$ representation of $n$, but so far I have been unable to make real progress.

答:
The problem at the bottom of page $5$ of this PDF is to show that $a(n)>b(n)$ for all $n\in\Bbb Z^+$. The solution by Andy Liu at the top of page $6$ is easily modified to show that $a(n)-b(n)$ is a power of $2$ for all $n\in\Bbb N$. All congruences are modulo $3$.

Let

$$n=\sum_{i=0}^k3^in_i\,,$$

where each $n_i\in\{0,1,2\}$. Then

$$(1+x)^n\equiv\prod_{i=0}^k(1+x)^{3^in_i}\equiv\prod_{i=0}^k\left(1+x^{3^i}\right)^{n_i}\,.$$

For $0\le\ell\le k$ let

$$F_\ell(x)=\prod_{i=0}^\ell\left(1+x^{3^i}\right)^{n_i}\,,$$

and let $c(\ell)$ be the amount by which the number of coefficients of $F_\ell(x)$ congruent to $1$ exceeds the number congruent to $2$. $F_0(x)=(1+x)^{n_0}$, so $F_0(x)$ is $1$, $1+x$, or $1+2x+x^2$, so $c(0)$ is $2^0$ or $2^1$. Suppose that $0\le\ell<k$, and $c(\ell)=2^m$. Then

$$F_{\ell+1}(x)=\left(1+x^{3^{\ell+1}}\right)^{n_{\ell+1}}F_\ell(x)\,,$$

and we consider the three possibilities for $n_{\ell+1}$.

If $n_{\ell+1}=0$, $F_{\ell+1}(x)=F_\ell(x)$, so $c(\ell+1)=2^m$.

If $n_{\ell+1}=1$, $F_{\ell+1}(x)=F_\ell(x)+x^{3^{\ell+1}}F_\ell(x)$, where $\deg F_\ell(x)<3^{\ell+1}$. $x^{3^{\ell+1}}F_\ell(x)$ has the same coefficients as $F_\ell(x)$, so $c(\ell+1)=2^{m+1}$.

If $n_{\ell+1}=2$, $F_{\ell+1}(x)=F_\ell(x)+2x^{3^{\ell+1}}F_\ell(x)+x^{2\cdot3^{\ell+1}}F_\ell(x)$, where again there are no like terms. Modulo $3$ the coefficients of $2x^{3^{\ell+1}}F_\ell(x)$ are the negatives of the coefficients of $F_\ell(x)$, and $x^{2\cdot3^{\ell+1}}F_\ell(x)$ has the same coefficients as $F_\ell(x)$, so $c(\ell+1)=2^m$.

In every case $c(\ell+1)$ is a power of $2$, so by induction $c(k)$ is a power of $2$, and clearly $c(k)=a(k)-b(k)$.

Title: binomial coefficients modulo $3$


问:
Smallest singular value a matrix.
Let $A\in\mathbb{R}^{m\times n}$ be a matrix and $\sigma_n$ be its smallest singular value. Prove that
$$\sigma_n=\min_{x\neq 0} \frac{x^TA^TAx}{x^Tx}.$$
From Proving that the norm of a Matrix is bigger or equal to it's smallest singular value multiplied by a vector., I know that $$\sigma_n\leq  \frac{x^TA^TAx}{x^Tx}\ \text{for all}\ x \neq 0.$$
How to prove that minimum is actually attained?

答:
$\def\p#1#2{\frac{\partial #1}{\partial #2}}$
Given a symmetric matrix $M$, consider the scalar function
$$\mu(x) = x^TMx \quad\implies\quad \p{\mu}{x} = 2\,Mx$$
The objective function is a ratio of such functions, therefore
$$\eqalign{
\lambda &= \frac{x^TA^TAx}{x^Tx} \;\doteq\; \frac{\alpha}{\beta} \\
\p{\lambda}{x} &= 2\beta^{-1}(A^TAx-\lambda x) \\
}$$
Setting the gradient to zero yields an eigenvalue equation, whose solutions are the extrema of the objective
$$\eqalign{
A^TAx &= \lambda x \\
}$$
Since $(A^TA)$ is SPD, its eigenvalues and singular values coincide. So the minimum of the objective function corresponds to the smallest singular value.

Title: Smallest singular value a matrix.


问:
How can I prove this inequality? [...]
$3^{n+m}+n^2+m^2>2^{n+m+2}-2n(m+2)-4(m+1)$ where $n,m \ge 1$ and are integres.

I haven't written a proof with two variables yet so this caught me off-guard. I would appreciate any hints and suggestions! Or even some links to questions that deal with a similar proof.

Thanks!

Title: How can I prove this inequality? [...]

Body:
Do it in two steps by fixing first one term than the other.  So to do it by induction.

Base case: $n = m = 1$

$3^{n+m} +n^2 +m^2 = 3^2+1+1 =11$ and $2^{m+n+2} -2n(m+2) -4(m+1)= 2^4 - 2*6-4*2= 16-12-8=- 4$

First induction step:  Assume it is true for a specific $n$ and $m$.  Prove it is true for $n$ and $m+1$.

$3^{n+(m+1)} + n^2 + (m+1)^2 = 3^{n+m}\cdot 3 + n^2 + m^2 + 2m + 1 = [3^{n+m} + n^2 + m^2] + [2\cdot 3^{n+m} + 2m + 1]$

while $2^{(m+1) + n+2} -2n((m+1)+2) - 4((m+1)+1)=2\cdot 2^{m+n+2}- 2n(m+2) - 2n -4(m+1) - 4= [2^{m+n+2}- 2n(m+2) -4(m+1)]+[2^{m+n+2}- 2n-4]$

Now $3^{n+m} + n^2 + m^2 > 2^{m+n+2}- 2n(m+2) -4(m+1)$ and $2\cdot 3^{n+m} + 2m + 1> 2^{m+n+2}- 2n-4$ so

$3^{n+(m+1)} + n^2 + (m+1)^2>2^{(m+1) + n+2} -2n((m+1)+2) - 4((m+1)+1)$.

.....

The base case and that first induction step proves our first result:

Result 1: For $n = 1$ and $m \in \mathbb N$ then $3^{n+m} +n^2 +m^2 > 2^{m+n+2} -2n(m+2) -4(m+1)$.

Now we do a second induction step: Is we assume it is true for a specific $m$ and $n$ prove it is true for $m$ and $n+1$.

$3^{(n+1)+m+1} + (n+1)^2 + (m+1)^2 = 3^{n+m}\cdot 3 + n^2 +2n + 1+ m^2= [3^{n+m} + n^2 + m^2] + [2\cdot 3^{n+m} + 2n + 1]$

while $2^{n + (n+1)+2} -2(n+1)(m+2) - 4(m+1)=2\cdot 2^{m+n+2}- 2n(m+2) - 2(m+2) -4(m+1)= [2^{m+n+2}- 2n(m+2) -4(m+1)]+[2^{m+n+2}-2(m+2)]$

Now $3^{n+m} + n^2 + m^2 > 2^{m+n+2}- 2n(m+2) -4(m+1)$ and $2\cdot 3^{n+m} + 2n + 1> 2^{m+n+2}-2(m+2)$ so

That proves the second induction step.

Combine that with result 1) we have the result holds for any $n,m$


问:
generalizing De Morgan's Laws
Show: $$ B - \bigcup_{a \in A}F_{a} = \bigcap_{a \in A} (B - F_{a}) $$

and show $$ B - \bigcap_{a \in A}F_{a} = \bigcup_{a \in A} (B - F_{a}) $$

I struggle with proofs.  This is what I have for the first proof, going in one direction.  If I am correct then the other direction is straight forward.

$$
\text{let  } x \in B - \bigcup_{a \in A} F_{a}
$$
then $$ x \in B \text{ and } x\notin F_{a} \text{ for all } x \in A$$
then $$ x \in \bigcap_{a \in A}(B - F_{a}) $$

答:
You could expand the explanation a bit to make the reasoning clearer, but yes, this is correct. If $x\in B\setminus\bigcup_{a\in A}F_a$, then for each $a\in A$ we have $x\in B$ and $x\notin F_a$, so $x\in B\setminus F_a$. And since this is the case for all $a\in A$, it follows that $x\in\bigcap_{a\in A}(B\setminus F_a)$.

I’d not say that the opposite inclusion is more straightforward: it’s basically just the same argument in reverse.

ContentLicense: CC BY-SA 3.0

Title: generalizing De Morgan's Laws


问:
Condition for a module to be finitely generated projective
Let $A$ be a ring and $E$ a left $A$-module. Write $\theta$ for the canonical homomorphism from $E^*\otimes_AE$ into $\text{End}_A(E)$ such that
$$\theta(x^*\otimes y)(x)=\langle x,x^*\rangle y$$
for all $x^*\in E^*$ and $(x,y)\in E\times E$.

I want to show that $E$ is finitely generated projective if and only if $1_E\in\text{Im}(\theta)$.

It is clear that the condition is necessary. I am not sure how to show that it's sufficient. If the condition holds, then $E$ is clearly projective. But why would it have to be finitely generated?

答: Hint: If $1_E=\sum_ix_i^*\otimes y_i$, then $y_i$ generates $E$.


问:
Show that $f(A ∩ f ^{−1} (B)) = f(A) ∩ B$
I need to prove that $f(A ∩ f^{-1}(B)) = f(A) ∩ B$.

$f^{-1}$ is a inverse image. Sorry, if it wasn't clear enough. And $∩$ stands for intersection.

I'm pretty sure that I need to to use definition of inverse image, then defition of ∩ and in the end definition of image. But I don't know how to properly write it.

I hope you can help me.
If something is unintelligible or grammatically uncorrect, I'm sorry. English isn't my first language.

答:
It’s just a matter of element-chasing to show that each side of the equation is a subset of the other. I’ll do half of it.

Suppose that $x\in f[A]\cap B$; then there is an $a\in A$ such that $f(a)=x\in B$. Since $f(a)\in B$, we know that $a\in f^{-1}[B]$, so $a\in A\cap f^{-1}[B]$, and therefore $x=f(a)\in f\big[A\cap f^{-1}[B]\big]$. This shows that

$$f[A]\cap B\subseteq f\big[A\cap f^{-1}[B]\big]\,.$$

Now suppose that $x\in f\big[A\cap f^{-1}[B]\big]$; then there is an $a\in A\cap f^{-1}[B]$ such that ... what? And how can you use this $a$ to show that $x\in f[A]\cap B$?


答:
Once you know that $V \in \tau_2$ and $x \in V \subseteq A$, it follows that $x \in \operatorname{int}_{\tau_2}(A)$. It is not true that $V \in \operatorname{int}_{\tau_2}(A)$.

If $x \in \overline{A}^{\tau_2}$, take a fundamental $\tau_1$-neighborhood system $\mathcal V(x)$ of $x$. Then, as $\mathcal V(x) \subseteq \tau_1 \subseteq \tau_2$, $\mathcal V(x)$ is also a fundamental $\tau_2$-neighborhood system of $x$, and since we are assuming that $x \in \overline{A}^{\tau_2}$, it follows that $V \cap A \neq \varnothing$ for all $V \in \mathcal V(x)$. Hence $x \in \overline{A}^{\tau_1}$.

Title: $\operatorname{int}_ {\tau_1}(A) \subseteq\operatorname{int}_{\tau_2}(A) $ and $ \overline{A}^{\tau_1} \supseteq\overline{A}^{\tau_2}$

Body: Let $\tau_1$ and $\tau_2 $ topologies over a set $X$ such that $ \tau_1 \subseteq \tau_2 $. Show that for every $ A \subseteq X $, you have to $\operatorname{int}_{\tau_1}(A) \subseteq \operatorname{int}_{\tau_2}(A)$ and $\overline{A}^{\tau_1} \supseteq \overline{A}^{\tau_2}$.


问:
Divergence theorem computation

The Divergence of the vector function comes out to be $4rcos(\theta$). The volume integral is thus:
$$\int_{0}^R\int_{0}^{\pi/2}\int_{0}^{\pi/2} 4rcos(\theta)*(r^2sin(\theta) d\theta d\phi dr)=\pi R^4/4$$

Now, for finding the closed surface integral $\oint_{s}\vec{v}.d\vec{a}$, we write:
$$\oint_{s}\vec{v}.d\vec{a}=\int_{1}\vec{v}.d\vec{a}+\int_{2}\vec{v}.d\vec{a}+\int_{3}\vec{v}.d\vec{a} +\int_{4}\vec{v}.d\vec{a} $$

Where $1$: the surface "bulging outward", $2,3,4$ are the surfaces (quarter-circles) in the $xy,yz,xz$ planes respectively.

Now, $\int_{1}\vec{v}.d\vec{a}=\int_{1}\vec{v}.(rd(\theta)rsin(\theta)d\phi\hat{r})=\int_{1}\vec{v}.(rd(\theta)rsin(\theta)d\phi\hat{r})=\int_{0}^{\pi/2}\int_{0}^{\pi/2}sin(\theta)cos(\theta)d\theta d\phi=\pi R^4/4$.

Which means, to "check" the divergence theorem , we need to show that $\int_{2}\vec{v}.d\vec{a}+\int_{3}\vec{v}.d\vec{a} +\int_{4}\vec{v}.d\vec{a} =0$.

However, I am finding this computation incredibly difficult, as the area vectors in these surfaces are pointing in the $\hat{k},\hat{j},\hat{i}$ directions, so we need to effectively convert between spherical and Cartesian coordinates.

Questions:

1. Is there a "symmetry"/alternate argument to show: $\int_{2}\vec{v}.d\vec{a}+\int_{3}\vec{v}.d\vec{a} +\int_{4}\vec{v}.d\vec{a} =0$?

2. Am I misinterpreting the $\oint$ symbol in this context? Is it somehow by definition only $\int_{1}$?

答:
Based on your working, you are considering $\theta$ as the polar angle. I do not see it mentioned clearly in the question but if that is the notation used in the book and in the question, here is how the transformation would look -

$\begin{bmatrix} \hat{r} \\ \hat{\theta}  \\ \hat{\phi} \end{bmatrix}  = \begin{bmatrix} \sin\theta\cos\phi  &  \sin\theta\sin\phi & \cos\theta \\ \cos\theta\cos\phi & \cos\theta\sin\phi & -\sin\theta \\ -\sin\phi & \cos\phi & 0             \end{bmatrix}    \begin{bmatrix} \hat{x} \\ \hat{y} \\ \hat{z} \end{bmatrix}$

So to show that the flux through $3$ planar parts of the sphere in the first octant sum to zero -

i) For part of the sphere in $YZ$ plane in first octant, the outward unit normal vector in cartesian coordinates will be $(-1, 0, 0)$ and as $\phi = \frac{\pi}{2}, 0 \leq \theta \leq \frac{\pi}{2} \,$ for the surface, it will transform to $(0, 0, 1)$ in spherical $(r, \theta, \phi)$. The vector field will be $(r^2 \cos\theta, 0, -r^2\cos\theta)$.

ii) For part of the sphere in $XZ$ plane in first octant, the outward unit normal vector in cartesian coordinates will be $(0, -1, 0)$ and as $\phi = 0, 0 \leq \theta \leq \frac{\pi}{2}$, it will transform to $(0, 0, -1)$ in spherical. The vector field will be $(r^2 \cos\theta, -r^2, 0)$. As the dot product is zero, the surface integral will be zero.

iii) For part of the sphere in $XY$ plane in first octant, the outward unit normal vector in cartesian coordinates will be $(0, 0, -1)$ and as $\theta = \frac{\pi}{2}, 0 \leq \phi \leq \frac{\pi}{2}$, it will transform to $(0, 1, 0)$ in spherical. The vector field will be $(0, r^2 \cos \phi, 0)$.

For $(i)$ and $(iii)$, you can either calculate and show or simply argue that the integral will be equal but with opposite sign and hence sum to zero.

Title: Divergence theorem computation


答: Well first $f(A\cap B)\subset f(A)\cap f(B)$ (I'll let you prove this one), and $f(f^{-1}(A))=A$ (trivial), so we already have the inclusion. Now take $y\in f(A)\cap B$, since this is a subset of $f(A)$ there exists an element $x\in A$ such that $f(x)=y$, but since $y\in B$, $x\in f^{-1}(B)$ so $x\in A\cap f^{-1}(B)$ and $y\in f(A\cap f^{-1}(B))$, therefore by double inclusion we have $f(A\cap f^{-1}(B))=f(A)\cap B$

Title: Show that $f(A ∩ f ^{−1} (B)) = f(A) ∩ B$

Body:
I need to prove that $f(A ∩ f^{-1}(B)) = f(A) ∩ B$.

$f^{-1}$ is a inverse image. Sorry, if it wasn't clear enough. And $∩$ stands for intersection.

I'm pretty sure that I need to to use definition of inverse image, then defition of ∩ and in the end definition of image. But I don't know how to properly write it.

I hope you can help me.
If something is unintelligible or grammatically uncorrect, I'm sorry. English isn't my first language.


问:
Show factorization $ x^{2n}-1=(x^2-1) \prod_{k=1}^{n-1}(x^2-2x \cos \frac{\pi k}{n} + 1) $
I'm interested in how to show that
$$
x^{2n}-1=(x^2-1) \prod_{k=1}^{n-1}(x^2-2x \cos \frac{\pi k}{n} + 1)
$$
I've seen this equality too often, but have no idea how to derive it. I've tried the following:

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

We all know that $x^n-1=(x-\xi^0)(x-\xi^1) \dots (x-\xi^{n-1})$,  where $\xi=\exp(i \cdot \frac{2 \pi}{n})$.

Here $x-\xi^0$ gives us the desired $x-1$(for $x^2-1$ in RHS).

But the problem is, we can not do the same with $x^n+1$, because as I understand, there is no such general factorization of $x^n+1$. Firstly, it depends whether $n$ is even or not. Secondly, if for the sake for simplicity $n$ is odd, then we can decompose the polynomial such a way:
$$x^n+1=(x+1)(1-x+x^2-x^3 \dots -x^{n-2}+x^{n-1})$$

I don't see here anything to continue with. Any suggestions?

答:
Thanks to @CalvinLin for this post. The idea was to apply direct substitution
$$
x^{2n}-1=\prod_{k=0}^{2n-1} (x-\xi^k)
$$
where $\xi$ is a base root of the equation $x^{2n}-1=0$, e.g. $\xi=\exp({i \cdot \frac{\pi}{n}})$.

It gives us the following:
$$
\prod_{k=0}^{2n-1} (x-\xi^k)=(x-\xi^0)(x-\xi^n) \prod_{k=1}^{n-1} (x-\xi^k)(x-\xi^{2n-k})
$$

$(x-\xi^0)(x-\xi^n)=(x-1)(x+1)=(x^2-1)$ since $\xi^n=\exp(i \cdot \pi)=-1$

Now let's take a deeper look at multiplier inside the product notation.
$$
(x-\xi^k)(x-\xi^{2n-k})=x^2-(\xi^k+\xi^{2n-k})x+\xi^k \cdot \xi^{2n-k}
$$

Obviously, $\xi^k \cdot \xi^{2n-k}=\xi^{2n}=1$. Consider the coefficient at $x$:
$$
\xi^k+\xi^{2n-k} \\
=\cos(k\cdot \frac{\pi}{n})+i\sin(k\cdot\frac{\pi}{n})+\cos((2n-k)\cdot \frac{\pi}{n})+i\sin((2n-k)\cdot \frac{\pi}{n})\\
=\cos(k\cdot \frac{\pi}{n})+i\sin(k\cdot\frac{\pi}{n})+\cos(2\pi - k\cdot \frac{\pi}{n})+i\sin(2\pi - k\cdot \frac{\pi}{n}) \\
=2\cos(k\cdot \frac{\pi}{n})
$$

The last equality comes from the periodicity and evenness/oddness of $\cos$/$\sin$.

So, for now we have:
$$
=(x^2-1)\prod_{k=1}^{n-1}(x^2-2x\cos(k \cdot \frac{\pi}{n})+1)
$$

And we are done!


问:
Rationalizing quotients
I have

$$\frac{\sqrt{10}}{\sqrt{5} - 2}$$

I have no idea what to do, I know that I can do some tricks with splitting square roots up but pulling out whole numbers like I know that $\sqrt{27}$ is just $\sqrt{3*9}$ so I can pull out a nine which becomes a 3. Here though I have no such options, what can I possibly do?

答:
HINT: Multiply the fraction by $1$ in the cleverly chosen disguise of

$$\frac{\sqrt5+2}{\sqrt5+2}\;.$$

Then recognize the resulting denominator as a familiar factorization of something nice.

Title: Rationalizing quotients


问:
Find the least value of $m+n$, where $1\le m<n$ such that the last three digits of $1978^n$ are the same as $1978^m$.
I am no so sure how to do this without a calculator...

My method is like this.

So, $k=1978^n-1978^m$ is divisible by $1000$ which means $k$ is divisible by $8$ and $125$.

Since $8$ does not divide into $1978=2\times7\times 127$, $8$ divides $1978^m$ implies that $m\ge 3$.

Then obviously $125$ does not divide into $1978$ as well, so I need to figure out what $r$ is such that $1978^r\equiv 0\mod 125$. I have no idea how to find $r$ without using a calculator...

Could anyone help please?

答:
As mentioned, it boils down to computing the order $\,K\,$ of $\,a = 1978\equiv -22\pmod{\!5^3}$.

Note $\!\bmod 5^3\!:\ 1\equiv a^K\Rightarrow\bmod 5\!:\  1\equiv a^K\equiv 3^K\Rightarrow 4\mid K,\,$ so $\, K = 4k$

and $\bmod 5^2\!:\ a^4 \equiv 3^4\not\equiv 1,\,$ therefore we infer that $\,\color{#c00}{\nu_5(a^4\!-1) = 1}$

so applying LTE = Lifting The Exponent as here

$$\begin{align}
&5^{\large 3}\!\mid a^{\large 4k}-1\\[.2em]
\iff\ &3 \le \nu_5(a^{\large 4k}-1) = \color{#c00}{\nu_5(a^{\large 4}-1)}+\nu_5(k)\\[.2em]
\iff\ & 2\le \nu_5(k)\\[.2em]
\iff\ &5^{\large 2}\!\mid k\end{align}\qquad$$

so the least such $\,k\,$ is $\,5^2,\,$ so $\,a\,$ has order $\,K = 4k = 4\cdot 5^2=100\pmod{\!5^3}$.


问:
Simplify trig equation
I've been working on trig simplification by hand, and can't figure out how to simplify:
$$\frac{1}{2}=\frac{\sin^2x}{\tan x}$$
What would be my next step to get to $x=45^\circ$?

Title: Simplify trig equation

Body: Let $t:=\tan x$. Since $\tfrac12=t\sin^2x=t^3\cos^2x=\tfrac{t^3}{1+t^2}$ (taking @player3236's hint),$$0=2t^3-t^2-1=(t-1)(2t^2+t+1).$$Since $2t^2+t+1>0$, $t=1$. This is achieved when $x=(45+180n)^\circ$ for $n\in\Bbb Z$.


答:
$\frac{1}{\sqrt{2}}=\sin(x)\sqrt{\tan(x)} \Rightarrow 2\sin^3x=\cos x=\sqrt{1-\sin^2x}$

$2\sin^3x=\sqrt{1-\sin^2x} \Rightarrow 4\sin^6x+\sin^2x-1=0$ let $\sin^2x=a$

$4a^3+a-1=(2a-1)(2a^2+a+1)=0 \Rightarrow$ $(2a-1)=0$ or $(2a^2+a+1)=0$

but $(2a^2+a+1)$ has not real root so

$a=\frac{1}{2} \Rightarrow \sin x = \frac{1}{\sqrt2}$ which means $x=45+180k$

Title: Simplify trig equation

Body:
I've been working on trig simplification by hand, and can't figure out how to simplify:
$$\frac{1}{2}=\frac{\sin^2x}{\tan x}$$
What would be my next step to get to $x=45^\circ$?


问:
Interesting classes of incomplete hyperbolic manifolds with torsion?
I am wondering if there are any interesting classes of incomplete hyperbolic manifolds? In particular, are there any interesting families with torsion (i.e. a cyclic subgroup in $\pi_1$)? There are orbifolds with torsion, but that's not what I'm looking for. I tried adapting the construction for lens spaces to the hyperbolic case and I was suggested to take copies of orbifolds and remove a point, but neither seem to work.

答:
Here is one class of interesting examples (they are all unorientable). Start with the "central symmetry" of the open unit ball ${\mathbb B}^3$:
$$
s: {\mathbf x}\mapsto -{\mathbf x}.
$$
The map $s$ has single fixed point, the origin $0$. I will equip ${\mathbb B}^3$ with the standard hyperbolic metric. The quotient $({\mathbb B}^3- \{0\})/s$ is an incomplete hyperbolic manifold whose fundamental group is finite cyclic, of order 2.

Now, imagine having a more complicated (infinite) discrete subgroup $\Gamma$ of isometries of the hyperbolic 3-space containing conjugates of $s$ and no other nontrivial finite order elements. Then, removing from ${\mathbb B}^3$ the (discrete) set of  fixed points of order 2 elements in $\Gamma$ we obtain an incomplete Riemannian manifold $X$; the quotient $X/\Gamma$ is an incomplete hyperbolic manifold $M$ whose fundamental group contains infinitely many elements of order $2$. You can think of $M$ as obtained from a complete hyperbolic orbifold by removing (isolated) cone-points.

See also my answer here.


问:
Seminorms and normes
How to prove this:

Let $E$ be a vector space over $\mathbb{R}$.

a seminorm is a norm, if and only if, the unit ball $B(0_E,1)$ does not contain any vector subspace of dimension 1.

答:
If $\def\norm#1{\left\|#1\right\|}\def\abs#1{\left|#1\right|}\norm{\cdot}$ is a norm, every one-dimensional subspace is unbounded: Let $x \ne 0$, then $\norm{\lambda x} = \abs{\lambda}\norm{x} \to \infty, \lambda\to \infty$ as $\norm x \ne 0$.

Now suppose $U$ is a one-dimensional subspace such that $\norm u \le 1$, $u \in U$. Let $x \in U - \{0\}$, than $\lambda x \in U$ for all $\lambda \ge 0$ and hence
$$ \norm x = \frac 1{\lambda} \norm{\lambda x} \le \frac 1\lambda \to 0, \qquad \lambda \to \infty $$
So, $x$ is a non-zero vector with $\norm x = 0$. Therefore, $\norm\cdot$ isn't a norm.

Title: Seminorms and normes


问:
How can we prove that $\lim_{x\to0^+} \sum_{n=1}^\infty e^{-n^2x}=\infty$?
Consider the function defined on $(0,\infty)$ by $$f(x)=\sum_{n=1}^\infty e^{-n^2x}.$$ How can we prove that $\lim_{x\to0^+} f(x)=\infty$?

答:
As suggested in the comments, for all $N\geqslant 1$, we have
$$ f\left(\frac{1}{N^2}\right)=\sum_{n=1}^Ne^{-\frac{n^2}{N^2}}+\sum_{n=N+1}^{+\infty}e^{-\frac{n^2}{N^2}}\geqslant Ne^{-\frac{1}{N^2}} $$
Since $\lim\limits_{N\rightarrow +\infty}Ne^{-\frac{1}{N^2}}=+\infty$, then $\lim\limits_{N\rightarrow +\infty}f\left(\frac{1}{N^2}\right)=+\infty$. In the general case, for $x>0$, let $N_x=\left\lfloor\frac{1}{\sqrt{x}}\right\rfloor$, then $N_x\leqslant \frac{1}{\sqrt{x}}$ and thus $x\leqslant\frac{1}{N_x^2}$, since $f$ is decreasing, we have $f(x)\geqslant f\left(\frac{1}{N_x^2}\right)\underset{x\rightarrow 0^+}{\longrightarrow}+\infty$, because $\lim\limits_{x\rightarrow 0^+}N_x=+\infty$. Note that $\displaystyle\vartheta(x):=\sum_{n\in\mathbb{Z}}e^{-\pi n^2 x}$ is Jacobi's $\vartheta$ function which verifies the identity $\vartheta\left(\frac{1}{x}\right)=\sqrt{x}\vartheta(x)$ (this is a consequence of Poisson's summation formula). Since $\lim\limits_{x\rightarrow +\infty}\vartheta(x)=1$, we have $\vartheta(x)\underset{x\rightarrow 0^+}{\sim}\frac{1}{\sqrt{x}}$ and, noticing that
$$f(x)=\frac{\vartheta\left(\frac{x}{\pi}\right)-1}{2}$$
We have
$$ f(x)\underset{x\rightarrow 0^+}{\sim}\frac{1}{2}\sqrt{\frac{\pi}{x}} $$


问:
Modifying distinct lists in GAP when their values are equal
I am making some functions in GAP and am having weird issues with lists and variables. It seems like whenever two variables have the same value at a given point, any changes made to one will change the other even though I have defined them separately.

Here's a simple example illustrating my main problem. Suppose I write the code:

```<code>list:=[1,2,3];
list2:=list;
Add(list2,4);
</code>```

Using this code, I would want to add 4 to list2, which would make list2=[1,2,3,4]. This part is fine. The unintended consequence here is that this also changes list to list=[1,2,3,4].

In this example, my question is: how do I change list2 without changing list?

答:
I seem to have found an answer. One can define list2:=StructuralCopy(list) to make a "structural copy" of list, and then changes to list2 are not made to list. See here.

I'll leave the question open for a bit in case anyone has any other nice solutions.


问:
Minimize difference of difference of binomial coefficients
Let
$$ f_n(i) = \binom{n}{i} - \binom{n}{i-1}$$
Is there an expression in terms of $n$ for
$$\min_{1 \leq i \leq n/2} f_n(i)$$
I know $f_n(1)=n-1$ but this does not equal the minimum value for all $n$, for example $f_4(2) = 2$, but I'm hoping I can find something in terms of $n$.
Maybe
$$f_n(i) = \Big( 1 - \frac{2i}{n+1} \Big) \binom{n+1}{i}$$
is useful?

答:
Just for clarification: My goal here is to minimize $f(k;n)$ in the range $k\in[1,n]$. As it turns out, $f$ admits some nice symmetry about $n/2$ and we have the relation $k_{\max}=n-k_{\min}$. This is the connection between mine and Claude's answer.

Via some algebra we can write as
$$f(k;n)=\frac{n-2k+1}{k}C(n,k-1)$$
Which can be expressed in terms of the Gamma function as
$$f(k;n)=\frac{n-2k+1}{k}\frac{\Gamma(n+1)}{\Gamma(k)\Gamma(n-k+2)}$$
Letting $\psi$ be the digamma function,
$$\partial_k(f)(k;n)=-\Gamma(n+1)\frac{k(n-2k+1)\psi(k)+k(2k-n+1)\psi(n-k+2)+n+1}{k^2\Gamma(k)\Gamma(n-k+2)}$$
So we look for the nearest integers to roots $k$ of the equation
$$k(n-2k+1)\psi(k)+k(2k-n+1)\psi(n-k+2)+n+1=0$$
You can do this in Mathematica with the following code:

```<code>n=(* whatver positive integer you want *);
NSolve[{1 + n + k (1 - 2 k + n) PolyGamma[0, k] +
     k (-1 + 2 k - n) PolyGamma[0, 2 - k + n] == 0 && k < n &&
   k > 0}, k, Reals]
</code>```

EDIT: Some more analysis
Here is a plot (red dots) of where the minima are attained for $n\in[1,1000]$ :

The growth appears almost linear, but not quite. It should be of the form
$$k_{\min}(n)=n/2+ (?)$$
Where $(?)$ is some unknown correction factor. What exactly this factor is is anyone's guess.

However, the approximation $k_{\min}(n)=n/2+\log(n)$ appears to be surprisingly accurate:

I think if I try to go any further I will start getting overflow errors.

Let's return to the function we want to find the larger root of:
$$g(k,n)=k(n-2k+1)\psi(k)+k(2k-n+1)\psi(n-k+2)+n+1$$
We'll see if we can approximate roots of this function.

We can approximate the digamma function by
$$\psi(z)\approx \log(z-1)$$
Which is actually a surprisingly accurate approximation that gets better and better for larger $z$. So we can say approximately
$$g(k,n)\approx k(n-2k+1)\log(k-1)+k(2k-n+1)\log(n-k+1)+n+1$$
$$=(nk-2k^2+k)\log(k-1)+(2k^2-nk+k)\log(n-k+1)+n+1$$
Using laws of logarithms we can express this as
$$g(k,n)\approx k\left(n\log\left(\frac{k-1}{n-k+1}\right)+\log\left((k-1)(n-k+1)\right)\right)+2k^2\log\left(\frac{n-k+1}{k-1}\right)$$
Which, admittedly, is not much of an improvement. But, perhaps it will submit more readily to numerical algorithms.

Body:
Just for clarification: My goal here is to minimize $f(k;n)$ in the range $k\in[1,n]$. As it turns out, $f$ admits some nice symmetry about $n/2$ and we have the relation $k_{\max}=n-k_{\min}$. This is the connection between mine and Claude's answer.

Via some algebra we can write as
$$f(k;n)=\frac{n-2k+1}{k}C(n,k-1)$$
Which can be expressed in terms of the Gamma function as
$$f(k;n)=\frac{n-2k+1}{k}\frac{\Gamma(n+1)}{\Gamma(k)\Gamma(n-k+2)}$$
Letting $\psi$ be the digamma function,
$$\partial_k(f)(k;n)=-\Gamma(n+1)\frac{k(n-2k+1)\psi(k)+k(2k-n+1)\psi(n-k+2)+n+1}{k^2\Gamma(k)\Gamma(n-k+2)}$$
So we look for the nearest integers to roots $k$ of the equation
$$k(n-2k+1)\psi(k)+k(2k-n+1)\psi(n-k+2)+n+1=0$$
You can do this in Mathematica with the following code:

n=(* whatver positive integer you want *);
NSolve[{1 + n + k (1 - 2 k + n) PolyGamma[0, k] +
     k (-1 + 2 k - n) PolyGamma[0, 2 - k + n] == 0 && k < n &&
   k > 0}, k, Reals]

EDIT: Some more analysis
Here is a plot (red dots) of where the minima are attained for $n\in[1,1000]$ :

The growth appears almost linear, but not quite. It should be of the form
$$k_{\min}(n)=n/2+ (?)$$
Where $(?)$ is some unknown correction factor. What exactly this factor is is anyone's guess.

However, the approximation $k_{\min}(n)=n/2+\log(n)$ appears to be surprisingly accurate:

I think if I try to go any further I will start getting overflow errors.

Let's return to the function we want to find the larger root of:
$$g(k,n)=k(n-2k+1)\psi(k)+k(2k-n+1)\psi(n-k+2)+n+1$$
We'll see if we can approximate roots of this function.

We can approximate the digamma function by
$$\psi(z)\approx \log(z-1)$$
Which is actually a surprisingly accurate approximation that gets better and better for larger $z$. So we can say approximately
$$g(k,n)\approx k(n-2k+1)\log(k-1)+k(2k-n+1)\log(n-k+1)+n+1$$
$$=(nk-2k^2+k)\log(k-1)+(2k^2-nk+k)\log(n-k+1)+n+1$$
Using laws of logarithms we can express this as
$$g(k,n)\approx k\left(n\log\left(\frac{k-1}{n-k+1}\right)+\log\left((k-1)(n-k+1)\right)\right)+2k^2\log\left(\frac{n-k+1}{k-1}\right)$$
Which, admittedly, is not much of an improvement. But, perhaps it will submit more readily to numerical algorithms.


Title: Rationalizing quotients

Body:
I have

$$\frac{\sqrt{10}}{\sqrt{5} - 2}$$

I have no idea what to do, I know that I can do some tricks with splitting square roots up but pulling out whole numbers like I know that $\sqrt{27}$ is just $\sqrt{3*9}$ so I can pull out a nine which becomes a 3. Here though I have no such options, what can I possibly do?

Body:
Hint

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

and $(a+b)(a-b)=a^2-b^2$


答:
cancel $ \sin x $ on either side, simplify

$$ \sin 2x= 1 \to 2 x=  \pi/2 \pm 2 k \pi \to x =\pi/4 \pm k \pi. $$

Title: Simplify trig equation


问:
green function, functional derivative
I am trying to find ${\delta F}/{\delta u}$ for the functional:

$F[u]=\int u(x)\int G(x,y)u(y)dy dx $

G is green function for laplace operator.

is there Euler-Lagrange version for double intrgral?

( lagrangian:  $L[x,y,u(x),u(y)]$)

答:
I'm tring to find such result too.
What about the following?

Write

$ \delta F[u]=\int \frac{\delta F[u]}{\delta u} \phi(x) dx=[\frac{d}{d\epsilon}\int (u(x)+\epsilon \phi(x)) \int G(x,y) (u(y)+\epsilon \phi(y))dy dx]_{\epsilon=0} $

from which:

$= \int  \phi(x) \int G(x,y) u(y) dy dx + \int  u(x) \int G(x,y) \phi(y) dy dx$

I can switch the variable of the second integral:

$= \int   \int G(x,y) u(y) dy \phi(x) dx + \int  \int u(y)  G(y,x) \phi(x) dy dx$

and if if $G(x,y)=G(y,x)$

$= \int   \int G(x,y) u(y) dy \ \phi(x) dx + \int  \int u(y)  G(x,y) dy \ \phi(x) \ dx$

$= \int   \int 2 G(x,y) u(y) dy \ \phi(x) \ dx = \int \frac{\delta F[u]}{\delta u} \phi(x) dx $

from which:

$ \frac{\delta F[u]}{\delta u} = \int 2 G(x,y) u(y) dy  $

what do you think?

Title: green function, functional derivative


答:
$$\frac{\sin ^2 x}{\tan x}=\frac{\sin ^2 x}{\frac{\sin x}{\cos x}}=\sin x\cos x$$
$$\sin x\cos x= \frac12 \sin 2x$$
$$\frac12 \sin 2x=\frac12\iff \sin 2x=1\iff 2x=90°+k360°$$
$$x=45°+k180°$$

Title: Simplify trig equation


问:
Interchange integration and differentiation
Let $x>0$. It can be shown that
$$ \int_{0}^{\infty} \frac{1}{\sqrt{4\pi t}} e^{-\frac{x^2}{4t}}t^{- \lambda}dt = \frac{\Gamma(\lambda - \frac{1}{2})}{4^{-\lambda +1}\sqrt{\pi}}|x|^{-2\lambda +1}~\lambda > \frac{1}{2}.$$
Let $-1<\lambda <0 $, then
$$ -\int_{0}^{\infty} \frac{\partial}{\partial x} \frac{1}{\sqrt{4\pi t}} e^{-\frac{x^2}{4t}}t^{- \frac{\lambda}{2}}dt = \int_{0}^{\infty} \frac{x}{2} \frac{1}{\sqrt{4\pi t}} e^{-\frac{x^2}{4t}}t^{- \frac{\lambda + 2}{2} }dt,$$
which is integrable. I would like to prove that

$$ -\frac{\partial}{\partial x} \int_{0}^{\infty} \frac{1}{\sqrt{4\pi t}} e^{-\frac{x^2}{4t}}t^{- \frac{\lambda}{2}}dt = \int_{0}^{\infty} \frac{\partial}{\partial x} \frac{1}{\sqrt{4\pi t}} e^{-\frac{x^2}{4t}}t^{- \frac{\lambda}{2}}dt. $$
But I can't find integrable function $f(t)$ such that $|\frac{\partial}{\partial x} \frac{1}{\sqrt{4\pi t}} e^{-\frac{x^2}{4t}}t^{- \frac{\lambda}{2}}| \leq f(t)$. Hence DTC can't be used. How can I justify differentiation under integral sign?

I would really appreciate any hints or tips.

答:
Let's simplify. Assume $0<p<1/2.$ Is it true that

$$ \frac{\partial}{\partial x} \int_{0}^{\infty} e^{-x^2/t}t^{p-1/2} \, dt =  \int_{0}^{\infty}\frac{\partial}{\partial x} e^{-x^2/t}t^{p-1/2} \, dt$$

for $x>0?$  The integral on the right is

$$= \int_{0}^{\infty}(-2x/t)e^{-x^2/t}t^{p-1/2}\,dt = \int_{0}^{\infty}(-2x)e^{-x^2/t}t^{p-3/2}\,dt.$$

Now suppose $x\in (a,b),$ where $0<a<b.$ Then the absolute value of the integrand on the right is bounded above by $2be^{-a^2/t}t^{p-3/2}$ for all such $x.$ That's a function in $L^1$ that dominates the integrands for all $x\in (a,b).$ You can now use DCT to get the desired result for all $x\in (a,b).$ Since every $x>0$ is in some like $(a,b),$ we have the result we wanted.


答: If all you need to do is rationalize the denominator, try multiplying the numerator and denominator by $\sqrt{5}+2$.</p>

Title: Rationalizing quotients


Title: Show factorization $ x^{2n}-1=(x^2-1) \prod_{k=1}^{n-1}(x^2-2x \cos \frac{\pi k}{n} + 1) $

Body:
I'm interested in how to show that
$$
x^{2n}-1=(x^2-1) \prod_{k=1}^{n-1}(x^2-2x \cos \frac{\pi k}{n} + 1)
$$
I've seen this equality too often, but have no idea how to derive it. I've tried the following:

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

We all know that $x^n-1=(x-\xi^0)(x-\xi^1) \dots (x-\xi^{n-1})$,  where $\xi=\exp(i \cdot \frac{2 \pi}{n})$.

Here $x-\xi^0$ gives us the desired $x-1$(for $x^2-1$ in RHS).

But the problem is, we can not do the same with $x^n+1$, because as I understand, there is no such general factorization of $x^n+1$. Firstly, it depends whether $n$ is even or not. Secondly, if for the sake for simplicity $n$ is odd, then we can decompose the polynomial such a way:
$$x^n+1=(x+1)(1-x+x^2-x^3 \dots -x^{n-2}+x^{n-1})$$

I don't see here anything to continue with. Any suggestions?

Body:
Note

\begin{align}
x^{2n}-1
&=\prod_{k=0}^{2n-1} (x-e^{i\frac{\pi k}n})
=\prod_{k=0}^{n-1} (x-e^{i\frac{\pi k}n})\cdot
\underset{k=2n-j}{ \prod_{k=n}^{2n-1} (x-e^{i\frac{\pi k}n})}\\
&=(x-1)\prod_{k=1}^{n-1} (x-e^{i\frac{\pi k}n})
\cdot \prod_{j=1}^{n-1} (x-e^{-i\frac{\pi j}n}) (x-e^{-i \pi})\\
 &=(x-1)(x+1)\prod_{k=1}^{n-1} (x-e^{i\frac{\pi k}n})
(x-e^{-i\frac{\pi k}n})\\
 &=(x^2-1)\prod_{k=1}^{n-1} (x^2 - 2x\cos\frac{\pi k}n+1)
\\
\end{align}


问:
Frogs spinning in a pot
In the classic jumping frogs game, we have 15 frogs on a circular dish, each in a pot. The dish is spinning and every few seconds it stops abruptly, so the frogs jump and land again either in their original pot or in one of the two neighboring.

In how many ways can they be rearranged after they fall? All frogs are different.

I have calculated it to be $610+(377+1)*2$ but it doesn't seem correct to me.

Any help is much appreciated.

答:
There are two special cases- if frog $1$ moves clockwise and frog $2$ moves clockwise, then they all must move clockwise. The same holds for counterclockwise. In all other cases, each frog must either stay in place, or switch places with a neighbor. First, we think of the frogs as being in a line. When a frog stays in place, we write down $1$. When two frogs switch places, we write a $2$. These numbers will add up to $15$, so we're asking how many integer compositions of $15$ there are with no part greater than $2$. This is counted by the Fibonacci numbers. The $n$-th Fibonacci number $F_n$ counts the number of integer composition of $n-1$ with no part greater than $2$. These rearrangements are counted by $F_{16}=987$.

However, there's one problem with my argument above. By treating the frogs as being in a line instead of a circle, we forget that we can also allow frog $1$ and frog $15$ to switch places. Hence, we also need to count the rearrangements where this happens. Assuming $1$ and $15$ swap positions, we can then treat frogs $2$ through $14$ as being in a line, and do the same thing above. Since there are $13$ frogs left whose positions have not been decided, we count these rearrangements using $F_{14}=377$. This time, there's no problem treating the remaining frogs as being in a line, as frogs $2$ and $14$ are not neighbors.

The total number of these rearrangements is $987+377+2$, which is the same as your answer.

In general, if there are $n$ frogs with $n\geq 3$, then this is counted by $F_{n+1}+F_{n-1}+2$

Title: Frogs spinning in a pot


问:
Compactness of sequence of positive harmonic functions
Let $v_{R}$ be a sequence of positive increasing harmonic functions on $B_{R}\setminus \overline{B}_{1}$ with $v_{R}=0$ on $\partial B_{1}$. Suppose that we have for $R>r>1$ that $$\min_{\partial B_{r}}v_{R}\leq C(r),$$ where $C(r)$ depends only on $r$.

Is it true that there exists a subsequence $R_{k}$ such that $v_{R_{k}}$ converges to a positive harmonic function $v$ in $\mathbb{R}^{n}\setminus \overline{B}_{1}$?

答: Theorem 2.6 here shows that a sequence of harmonic functions on some open set $\Omega$ that is uniformly bounded on every compact subset of $\Omega$ has a subsequence that converges uniformly on every compact subset.


问:
Harmonic Function bounded by a linear function
Let $u$ be a harmonic function on $\mathbb C$. Suppose that for each $\epsilon > 0$, there is a constant $C_\epsilon$ such that

$$u(z) \leq C_\epsilon + \epsilon |z| .$$

I am trying to show that $u$ is constant. I tried the mean value property, as well as replacing $u$ by a related function, but was unsuccessful. Does anyone have any ideas?

答: Since $u$ is harmonic on the whole plane and is bounded linearly, we know by Liouville's theorem that $u$ is a harmonic polynomial of order less than or equal to 1. The coefficient on the linear term must be 0, since if it were anything else, then you would have a contradiction for $\epsilon$ sufficiently small. </p>


问:
Poisson Process Problem with different intensities
There was a new gossip going around the office. The individual who took this information out passed it on with an intensity of one person per hour. Every person who learned of the rumor continues to pass it on at an intensity of three people per hour. How long can you expect the gossip to be known to the majority of the office staff? Assume a population of 20.

I'm a bit lost here. Should I assume intensity of 1 for the first person, and then a joint one for the rest of the people? How do i calculate the time?

答:
Three different scenarios:

If $k$ people know and each passes it on to people who do not know, then the rate of passing on messages is then $3k$ so the expected time for the next new person to know is $\frac{1}{3k}$

If $k$ people know and each passes it on to somebody else who may or may not know, then the rate of passing on messages is then $3k$ and the rate of passing on messages to people who do not know is $3k\frac{20-k}{19}$ so the expected time for the next new person to know is $\frac{19}{60k-3k^2}$

If $k$ people know and each passes it on to somebody else who may or may not know though not to the person who told them, then the rate of passing on messages is then $3k$ and the rate of passing on messages to people who do not know is $3k\frac{20-k}{18}$ (except for $k=1$ where the rate is $3$) so the expected time for the next new person to know is $\frac{6}{20k-k^2}$ (except for $k=1$ where the expected time is $\frac13$)

You want the message to be passed on ten times to new people so the majority, i.e. $11$ people, know.  So you have to sum the ten expected times.  This gives the respective sums for the three scenarios:

$\sum\limits_{k=1}^{10} \frac{1}{3k} \approx 0.9763$ hours

$\sum\limits_{k=1}^{10} \frac{19}{60k-3k^2} \approx 1.1551$ hours

$\frac13+\sum\limits_{k=2}^{10} \frac{6}{20k-k^2} \approx 1.1119$ hours


问:
Find the probability that the median of the three uniform numbers is less than 0.4.

Three numbers are randomly and independently selected from the interval (0, 1). Determine the probability that the median of the three numbers is less than 0.4.

I know that in order for this to happen, we need at least two values to be < 0.4. I'm just not sure where to go from here and what formula to use. Thanks in advance!

答:
Hint:

Find the probability the first is below $0.4$, the second is below $0.4$, and the third is above $0.4$

Multiply this by the number of ways you can have this pattern with three different users

Add the probability all three are below $0.4$


问:
Image of sup/inf under Galois connection between lattices
This is Lemma 2.4 in Pete Clark's notes on commutative algebra.

Given two posets $(X,\le)$ and $(Y,\le)$, an (antitone) Galois connection between $X$ and $Y$ is a pair of maps $F:X\to Y$ and $G:Y\to X$ such that $F$ and $G$ are antitone (= order-reversing) and for all $x\in X$ and $y\in Y$
$$x\le G(y)\iff y\le F(x)\quad\quad(*).$$

Lemma 2.4: Given a Galois connection as above, if $X$ and $Y$ are lattices, then for all $x_1,x_2\in X$

$F(x_1\lor x_2)=F(x_1)\land F(x_2)$

$F(x_1\land x_2)=F(x_1)\lor F(x_2)$

I can prove the first formula (proof below), but I don't see how to show the second one.  Can anyone show how?

Proof of $F(x_1\lor x_2)=F(x_1)\land F(x_2)$: Given $x_1, x_2$, for each $y\in Y$ we have
$$
\begin{align*}
& y\le F(x_1\lor x_2) & \\
\iff\;& x_1\lor x_2\le G(y) &\text{ from (*)} \\
\iff\;& x_1\le G(y)\quad\text{and}\quad x_2\le G(y) & \text{ from definition of }\lor\\
\iff\;& y\le F(x_1)\quad\text{and}\quad y\le F(x_2) & \text{ from (*)} \\
\iff\;& y\le F(x_1)\land F(x_2) & \text{ from definition of }\land \\
\end{align*}
$$
The desired formula follows.

答: This is false even in the basic motivating example from algebraic geometry.  For instance, there is an antitone Galois connection between the lattice of subsets of $\mathbb{C}^n$ and the lattice of subsets of $\mathbb{C}[x_1,\dots,x_n]$, sending a set $S\subseteq\mathbb{C}^n$ to the set $I(S)$ of polynomials that vanish on it and sending a set of polynomials $S\subseteq \mathbb{C}[x_1,\dots,x_n]$ to the set $V(S)$ of points where they vanish.  However, $I$ and $V$ do not turn intersections into unions.  For instance, $V(\{x_1\}\cap\{x_1+1\})=V(\emptyset)=\mathbb{C}^n$ whereas $V(\{x_1\})\cup V(\{x_1+1\})$ is not all of $\mathbb{C}^n$.


问:
generalizing De Morgan's Laws
Show: $$ B - \bigcup_{a \in A}F_{a} = \bigcap_{a \in A} (B - F_{a}) $$

and show $$ B - \bigcap_{a \in A}F_{a} = \bigcup_{a \in A} (B - F_{a}) $$

I struggle with proofs.  This is what I have for the first proof, going in one direction.  If I am correct then the other direction is straight forward.

$$
\text{let  } x \in B - \bigcup_{a \in A} F_{a}
$$
then $$ x \in B \text{ and } x\notin F_{a} \text{ for all } x \in A$$
then $$ x \in \bigcap_{a \in A}(B - F_{a}) $$

答:
$$
x\in B\setminus  \bigcup_a F_a  \Longleftrightarrow\\
x\in B \mbox{ and } x\notin \bigcup_a F_a\Longleftrightarrow\\
x\in B \mbox{ and } x\notin F_a \mbox { for any }a\Longleftrightarrow\\
x\in B\setminus F_a\mbox{ for any }a\Longleftrightarrow\\
x\in\bigcap_a B\setminus F_a
$$</p>

Title: generalizing De Morgan's Laws


问:
let the sets $A,B\ne \phi$, and $f:A\rightarrow B$, and $F(A)=\{ b\in B \mid \exists a\in A : f(a)=b \} $ , is this statement correct?
let $X,Y\subset A$ (subsets of A), then $F(X)\cup F(Y)=F(X\cup Y)$.

My attempt: intuitively it seems right and I tried to get a counterexample but all of them have worked. so I tried to proof:
 let $y\in F(X)\cup F(Y) \Rightarrow y\in F(Y) \bigvee y\in F(X) $, from here on, I'm wondering how to continue, should I say that there exists $x\in X$ or $x\in Y$ such that $f(x)=y$, then proceed to show that it is $\in F(X\cup Y)$? feels like I kinda have the idea but I lose it while proving it.

any explanation or assistance is really appreciated.

答:
First we prove that $$F(X)\cup F(Y)\subseteq F(X\cup Y)$$  Let $z\in F(X)\cup F(Y)$.  Then $z\in F(X)$ or $z\in F(Y)$.  Suppose the former.  Then $\exists x\in X$ such that $F(x)=z$.  But $x\in X$ implies that $x\in X\cup Y$, so also $z\in F(X\cup Y)$.  We can make a similar argument if we suppose instead that $z\in F(Y)$.

Now for the reverse inclusion, we proceed similarly.  Let $z\in F(X\cup Y)$.  Then $\exists a\in X\cup Y$ such that $F(a)=z$.  But $a\in X\cup Y$ means that $a\in X$ or $a\in Y$.

Can you finish it from here?


问:
Is there a name for this equation?
I want to know if there's a name for the following equation and how correctly to write this formula? $$z = \frac{x - y}{\min(x, y)}$$

答: That equation has no particular name. You can invent one if you need one. (Be careful not to divide by $0$.)

Title: Is there a name for this equation?


问:
Rational Numbers - LCM and HCF
I was reading a text book and came across the following approach to find the LCM and HCF of rational numbers/fractions:

LCM of fractions = LCM of numerators/HCF of denominators

HCF of fractions = HCF of numerators/LCM of denominators

Can someone please help me understand why the above formula holds true or how the above is logically deduced?

Thanks in advance!

答:
Note that this result holds true under the assumption that the fractions are in their simplest forms... Otherwise it might not hold.
eg. 8/12, 4/9 LCM is in fact 4/3. But using your method we get 8/3.</p>

Title: Rational Numbers - LCM and HCF


问:
How to generate planes equations containing a certain ray?
I want to generate planes equations ($Ax + By + Cz + D = 0$) that contain a ray $R$ with origin $O$ and a direction $D$.

答:
You can use the dot product to find an equation of $(x,y,z)$ perpendicular to $D = (D_x,D_y,D_z)$.  This equation gives a plane at the origin.  So you just need to translate the equation the point of interest:

$$ (x,y,z) \cdot (D_x,D_y,D_z) = 0 $$

$$ (x-tD_x,y-tD_y,z-tDz) \cdot (D_x,D_y,D_z) = 0$$


答:
First pick a direction $E$ that is not parallel to $D$. Then you can express a plane parametrically by $P = O + tD + uE$. Write this in coordinates, expressing $P=(x,y,z)$ and choosing coordinates $D = (d_1,d_2,d_3)$ and $E = (e_1,e_2,e_3)$:
$$x = t d_1 + u e_1
$$
$$y = t d_2 + u e_2
$$
$$z = t d_3 + u e_3
$$
Now just eliminate the variables $t,u$, and the one equation that you have left over can be rewritten in the form $Ax + By + Cz + D = 0$.

Title: How to generate planes equations containing a certain ray?

Body: I want to generate planes equations ($Ax + By + Cz + D = 0$) that contain a ray $R$ with origin $O$ and a direction $D$.


问:
probability specific people appear in a sample from a group
The Justice League wants to randomly select a group of 7 from among the 40 currently available superheroes/superheroines to investigate a glowing meteorite. What is the probability that Bat Man, Wonder Woman, and Spider Man are all chosen?

Initially, I tried to simplify this problem as follows:
Bob, Susan, and Mary are standing near the meteorite. What's the probability that both Bob and Susan are randomly zapped with a mutagenic beam?

I drew out the probability space for this sub-problem and get $P(s,b\ zapped)= \frac{2}{9}$ However, this is with replacement (e.g., Bob can get zapped twice).

```<code>   b  s  m
b  .  z  .
s  z  .  .
s  .  .  .
</code>```

When it is without replacement, I am not sure. Is it $P(s,b\ zapped)=\frac {1}{3}\frac{1}{2}$ or do I need to take into account the different ways people can get zapped, $P(s,b\ zapped)={3\choose 2}\frac {1}{3}\frac{1}{2}$ ?

For the original problem, my initial guess was to try to account for the different ways all three are chosen from seven:
$P(B,S,W chosen)= {7 \choose 3}{1 \over 40} {1 \over 39}  {1 \over 38} {37 \over 37}{36 \over 36}{ 35 \over 35}{ 34 \over 34}$

However if all three are chosen last then it would seem to be:
$P(B,S,W chosen\ last)= {7 \choose 3}{40 \over 40} {39 \over 39}  {38 \over 38} {37 \over 37}{1 \over 36}{ 1 \over 35}{ 1 \over 34}$

I also tried to think of treating Bat Man, Wonder Woman, and Spider man as a generic group of 3, but I still seem to be missing the possibility of having those three selected in different orderings, like second, fourth, and last.

$P(B,S,W chosen)= {3 \over 40} {2 \over 39}  {1 \over 38} {37 \over 37}{36 \over 36}{ 35 \over 35}{ 34 \over 34}$

答:
The probability of choosing a "good" team is the ratio of "good" cases (where all three named superheroes are chosen) and all possibles ones.

(All): How many ways can you choose 7 people out of 40 (the order in which those people are chosen does not matter)?

(Good): If three of the seven people are clear from the beginning, your only choice is to find four others who will complete the team. How many ways can you choose those four from the remaining superheroes?

Hint: Binomial coefficients provide the answers to both parts.


答:
Hint:

Find two different such planes $P_0=0$ and $P_1=0$ and form the combination

$$(1-\lambda)P_0+\lambda P1=0$$ to get all planes.

To create these two planes, take the origin, a point in the given direction and two extra points.


问:
$\sin(4x)y''-2(1+\cos(4x))y'=\tan(x)$

looking for more friendly way for the following second order ode, thanks in advance

$$
\sin(4x)y''-2(1+\cos(4x))y'=\tan(x)\\
$$
integration factor

$$
\mu(x) = e^{-2\int\frac{1+\cos(4x)}{\sin(4x)}dx}
$$
make long short:

$$
\mu(x) = \sin(2x)\sin(4x)\cos(2x)
$$
now for the order reduction
$$
u=y'\\
\sin(4x)u'-2(1+\cos(4x))u=\tan(x)\\
$$
$$
\left[u \cdot (\sin(2x)\sin(4x)\cos(2x)\right]'= \frac{\tan(x)}{\sin(4x)}\sin(2x)\sin(4x)\cos(2x)
$$
integrating right side
$$
u \cdot (\sin(2x)\sin(4x)\cos(2x)) = \frac{\sin(2x)}{2}-\frac{x}{2}-\frac{1}{8}\sin(4x)
$$
now all left is to integrate u to get y, however it's seems it isn't the right way...

thanks.

Title: $\sin(4x)y''-2(1+\cos(4x))y'=\tan(x)$

Body:
$$\sin(4x)y''-2(1+\cos(4x))y'=\tan(x)\\$$
$$\sin(2x) \cos (2x)y''-2 \cos^2 (2x)y'=\dfrac 12 \tan(x)$$
$$\sin(2x) y''-2 \cos (2x))y'=\dfrac {\tan(x)}{2 \cos (2x)}$$
$$ \left (\dfrac  {y'}{ \sin (2x) } \right)'=\dfrac {\tan(x)}{\sin (2x) \sin (4x)}$$
$$  {y'}={ \sin (2x) }  \int \dfrac {dx}{2\cos^2 (x) \sin (4x)}$$
$$I=-\dfrac 14 \int \dfrac {du}{u(u+1)(1-u^2)}$$
$$\dfrac {dy}{du}=\dfrac 18 \int \dfrac {du}{u(u+1)(1-u^2)}$$
Where $u= \cos (2x)$.


问:
Find principal ideals a, b in Z[√−6]
Find principal ideals a, b in Z[√−6] such that
a<2,√−6>=b<3,√−6>.</p>

答:
Hint:

Since the norm of $\langle2,\sqrt{-6}\,\rangle$ is $2$, and the norm of $\langle3,\sqrt{-6}\,\rangle$ is $3$, you’ll need elements whose norms are in the ratio $3:2$. I think any pair of elements of $\Bbb Z[\sqrt{-6}\,]$ with this property should do it.

Title: Find principal ideals a, b in Z[√−6]


问:
Joint pdf of $Y$ and $Z$ given $X_1$ and $X_2$
Let $X_1$ ~ uniform(0,1) and $X_2$ ~ uniform(0,1). Given that $X_1$ and $X_2$ are independently distributed:

A) Determine the joint probability density function of $X_1$ and $X_2$.

B) Let $Y = X_1 + X_2$ and $Z = X_2$. Determine the joint pdf of Y and Z.

C) Also, determine that marginal density of Y.

I found A to be

$f(x_1, x_2) = 1$ for 0 < x < 1 and 0 < y < 1,  0 otherwise

I found B to be

$f(y, z) = 1$ for 0 < y-z < 1 and 0 < z < 1,  0 otherwise

Am I on the right track? Any tips on how to approach part C?

答:
You've got the right joint density.  As $X_1$ and $X_2$ are independent, you just need to multiply the two densities to form the joint density.

You've noticed that $X_1 = Y-Z$, so you substituted $x$ in "$0 < x < 1$" in the previous part with $y - z$.

You need to work on $0 < y - z < 1$ to obtain the appropriate range of $y$ : $z < y < 1 + z$.
$$f_Y(y) = \int_0^1 f_{Y,Z}(y,z)\,\mathrm{d}z = \int_{\max(y-1,0)}^{\min(y,1)} 1 \,\mathrm{d}z = \begin{cases} y &\text{ if } y \in [0,1] \\ 2-y &\text{ if } y \in (1,2] \\ 0 &\text{ otherwise} \end{cases} = (1-|1-y|)_+$$
The marginal density of $Y$ is $f_Y(y) = (1-|1-y|)_+$, i.e. the positive part of $1 - |1 - y|$.


问:
Rationalizing quotients
I have

$$\frac{\sqrt{10}}{\sqrt{5} - 2}$$

I have no idea what to do, I know that I can do some tricks with splitting square roots up but pulling out whole numbers like I know that $\sqrt{27}$ is just $\sqrt{3*9}$ so I can pull out a nine which becomes a 3. Here though I have no such options, what can I possibly do?

Title: Rationalizing quotients

Body: $$\frac{\sqrt{10}}{\sqrt{5} - 2}=\frac{\sqrt{10}}{\sqrt{5} - 2}\cdot\frac{{\sqrt{5} + 2}}{{\sqrt{5} + 2}}=\frac{10({\sqrt{5}+2})}{5-4}=10({\sqrt{5}+2})$$


问:
Bounding the size of $\sqrt{x_n}$, an $\epsilon$-$N$-proof verification
I'm trying to prove that if $x_n \rightarrow x$ then $\sqrt{x_n} \rightarrow \sqrt x$ with $x_n \geq 0$ and $x \neq 0$.

Applying difference of squares,
$$\left|\, \sqrt{x_n} - \sqrt{x}\,\right| \ = \ \frac{\mid x_n - x \mid}{\sqrt{x_n} + \sqrt x}$$
I've seen that, to bound the denominator (worst case), one can use $\sqrt{x_n} + \sqrt x \geq \sqrt x$. But I was wondering if I can bound $\sqrt x_n$ with the following procedure:

Since $x_n\rightarrow x$ then there exists $N_1$ such that
$|x_n - x | < \frac{|x|}{2}$ for all $n\geq N_1$, implying that $\mid x_n \mid  > \frac{\mid x \mid}{2}$, and thus
$\sqrt{\mid x_n \mid}  > \sqrt{\frac{\mid x \mid}{2}}$. Using this fact, I can obtain
$$\frac{\mid x_n - x \mid}{\sqrt x_n + \sqrt x} \ < \ \frac{\mid x_n - x \mid}{\sqrt{\frac{x}{2}} + \sqrt x}$$
and finally choose an appropiate $N_2$ for the numerator to make the whole expression less than $\epsilon$.

Are these bounds and the process correct?

答:
Since $\vert x_n - x\vert = \vert (\sqrt{x_n} - \sqrt{x})(\sqrt{x_n} + \sqrt{x})\vert $, it holds that $$\vert \sqrt{x_n} - \sqrt{x}\vert = \frac{\vert x_n - x\vert}{\sqrt{x_n} + \sqrt{x}}$$. Note that the denominator will always be positive so no need to take the absolute value. Furthermore, it is for the same reason true that $\sqrt{x_n} + \sqrt{x}\leq \sqrt{x}$, so

$$\vert \sqrt{x_n} - \sqrt{x}\vert \leq \frac{\vert x_n - x\vert}{\sqrt{x}}.$$
Now, as you have correctly stated, since $x_n$ converges to $x$, there exists for each $\varepsilon>0$ a $N\in\mathbb N$ such that $n\geq N$ implies that $\vert x_n - x\vert<\varepsilon$.

Let $\epsilon>0$, and put $\varepsilon = \sqrt{x}\epsilon$. Note that $x$ does not depend on $n$. Then, by the above, $$\vert\sqrt{x_n} - \sqrt{x}\vert \leq \frac{\vert x_n - x\vert}{\sqrt{x}} < \frac{\varepsilon}{\sqrt{x}} = \frac{\sqrt{x}\epsilon}{\sqrt{x}} = \epsilon.$$
That is, for each $\epsilon>0$, there exists a $N\in\mathbb N$ such that $n\geq N$ implies that $\vert\sqrt{x_n} - \sqrt{x}\vert<\epsilon$, or $\sqrt{x_n}\rightarrow\sqrt{x}$.


问:
Application of extended Euclidean algorithm
I tried applying the algorithm from Wikipedia in order to calculate $-133^{-1}\mod  256$

I spent already time myself finding the mistake but no success. This is how I did go about applying the algorithm:

r
newr
quotient
t
newt

256
-133
a
0
1

-133
123
-1
1
1

123
-10
-1
1
2

-10
3
-12
2
25

3
-1
-3
25
77

-1
0
-3
77
256

The solution should be $-77$

答:
It is customary to agree on the order of operations in ordinary arithmetic and

$\quad  −133^{-1} \text{ is interpreted to be equal to } (-1)\times 133^{-1}$

but in this case since

$\quad  (−133)^{-1} = \bigr((-1)(133)\bigr)^{-1} = (-1)^{-1}(133)^{-1} = (-1)\times 133^{-1}$

you can't go wrong about what needs to be calculated.

On reading the OP's wikipedia article link, you'll find the following paragraph right before the algorithm that is specified using pseudocode:

To adapt the extended Euclidean algorithm to this problem, one should
remark that the Bézout coefficient of $n$ is not needed, and thus does
not need to be computed. Also, for getting a result which is positive
and lower than $n$, one may use the fact that the integer $t$ provided
by the algorithm satisfies $|t| \lt n$. That is, if $t < 0$, one must
add $n$ to it at the end. This results in the pseudocode, in which the
input $n$ is an integer larger than $1$.

Since the plan is to follow the specification exactly and feed the algorithm (routine) positive numbers, we can either get the answer this way (using a pre-process calculation),

$\quad \text{inverse}(123,256) \quad \text{(and getting a positive (residue) answer)}$

or this way (using a post-process calculation),

$\quad (-1) \times \text{inverse}(133, 256)  \quad \text{(and getting a negative (residue) answer)}$

Here we'll go with the former method, setting $a = 123$ and $n =256$.

Here is the wikipedia pseudocode:

```<code>function inverse(a, n)
    t := 0;     newt := 1
    r := n;     newr := a

    while newr ≠ 0 do
        quotient := r div newr
        (t, newt) := (newt, t − quotient × newt)
        (r, newr) := (newr, r − quotient × newr)

    if r > 1 then
        return "a is not invertible"
    if t < 0 then
        t := t + n

    return t
</code>```

We can perform our calculations using the available algorithm calculation table

from the first example given in the wiki article,

Index $i$
Quotient $q_{i-1}$
Remainder $r_{i}$
$s_i$
$t_i$

0

256
n/a
0

1

123
n/a
1

2
2
10
n/a
-2

3
12
3
n/a
25

4
3
1
n/a
-77

5
3
0
n/a
256

Observe that the while loop in the pseudocode executes $4$ times, corresponding to

$\quad 2 \le \text{Index-}i \le 5$

in the table. Also, as discussed in the wiki article, we can 'turn off' the $s_i$ calculations.

So we're now 'out of' the while loop with

$\quad r = 1$

$\quad t = -77$

$\quad n = 256$

and resuming execution flow at

```<code>if r > 1 then
    return "a is not invertible"
if t < 0 then
    t := t + n

return t
</code>```

The specified algorithm returns the value $179$, and since it is numeric (no error messages) we know that

$\quad 179 \cdot 123 \equiv 1 \pmod{256}$

Using the OP's calculation table,

r
newr
quotient
t
newt

256
123

0
1

123
10
2
1
-2

10
3
12
-2
25

3
1
3
25
-77

1
0
3
-77
256

Body:
It is customary to agree on the order of operations in ordinary arithmetic and

$\quad  −133^{-1} \text{ is interpreted to be equal to } (-1)\times 133^{-1}$

but in this case since

$\quad  (−133)^{-1} = \bigr((-1)(133)\bigr)^{-1} = (-1)^{-1}(133)^{-1} = (-1)\times 133^{-1}$

you can't go wrong about what needs to be calculated.

On reading the OP's wikipedia article link, you'll find the following paragraph right before the algorithm that is specified using pseudocode:

To adapt the extended Euclidean algorithm to this problem, one should
remark that the Bézout coefficient of $n$ is not needed, and thus does
not need to be computed. Also, for getting a result which is positive
and lower than $n$, one may use the fact that the integer $t$ provided
by the algorithm satisfies $|t| \lt n$. That is, if $t < 0$, one must
add $n$ to it at the end. This results in the pseudocode, in which the
input $n$ is an integer larger than $1$.

Since the plan is to follow the specification exactly and feed the algorithm (routine) positive numbers, we can either get the answer this way (using a pre-process calculation),

$\quad \text{inverse}(123,256) \quad \text{(and getting a positive (residue) answer)}$

or this way (using a post-process calculation),

$\quad (-1) \times \text{inverse}(133, 256)  \quad \text{(and getting a negative (residue) answer)}$

Here we'll go with the former method, setting $a = 123$ and $n =256$.

Here is the wikipedia pseudocode:

function inverse(a, n)
    t := 0;     newt := 1
    r := n;     newr := a

    while newr ≠ 0 do
        quotient := r div newr
        (t, newt) := (newt, t − quotient × newt)
        (r, newr) := (newr, r − quotient × newr)

    if r > 1 then
        return "a is not invertible"
    if t < 0 then
        t := t + n

    return t

We can perform our calculations using the available algorithm calculation table

from the first example given in the wiki article,

Index $i$
Quotient $q_{i-1}$
Remainder $r_{i}$
$s_i$
$t_i$

0

256
n/a
0

1

123
n/a
1

2
2
10
n/a
-2

3
12
3
n/a
25

4
3
1
n/a
-77

5
3
0
n/a
256

Observe that the while loop in the pseudocode executes $4$ times, corresponding to

$\quad 2 \le \text{Index-}i \le 5$

in the table. Also, as discussed in the wiki article, we can 'turn off' the $s_i$ calculations.

So we're now 'out of' the while loop with

$\quad r = 1$

$\quad t = -77$

$\quad n = 256$

and resuming execution flow at

if r > 1 then
    return "a is not invertible"
if t < 0 then
    t := t + n

return t

The specified algorithm returns the value $179$, and since it is numeric (no error messages) we know that

$\quad 179 \cdot 123 \equiv 1 \pmod{256}$

Using the OP's calculation table,

r
newr
quotient
t
newt

256
123

0
1

123
10
2
1
-2

10
3
12
-2
25

3
1
3
25
-77

1
0
3
-77
256


问:
Probability with Martingales Algebras and $pi$-systems
I am studying the book Probability with Martingales by D Williams and I am confused with section 1.7. In this section, Williams introduces Caratheodory's Extension theorem. Here he states,

Let S be a set, Let $\Sigma_0$ be an algebra on S, and let $$\Sigma := \sigma(\Sigma_0).$$ If $\mu_0$ is a countably additive map $\mu_0 : \Sigma_0 \to [0,\infty]$, then there exists a measure $\mu$ on $(S,\Sigma)$ such that $$\mu=\mu_0$$ on $\Sigma_0$. If $\mu_0 < \infty$, then, by Lemma 1.6, this extension is unique - an algebra is a $\pi$-system!

I do not understand the conclusion of the theorem, is it not always the case that an algebra is a $\pi$-system? An algebra is closed under finite intersections and this perfectly matches the definition of a $\pi$-system. Why is the conclusion to the theorem so surprising as to warrant an exclamation?

Many thanks

答:
As far as the exclamation is concerned, I think all one can say is that Williams is a...colorful writer (sometimes to his detriment, IMHO).

The bit about an algebra being a $\pi$ system is not part of the conclusion of the result (since, as you point out, this is trivially true by the definitions), but rather part of the result's proof. Using Lemma 1.6 (which is about $\pi$ systems) and the fact that an algebra is a $\pi$ system, one can conclude the stated uniqueness result.


问:
Simple functional equation in two variables
In one dimension the equation
$$
\frac{1}{1 + f^2(x)}=\frac{\left(\frac{\cos \phi}{\sqrt{1}} x +\sin \phi \right)^2}{1 + x^2}, \ x\in \mathbb{R}
$$
has the solution
$$f(x) =\frac{x-\frac{\cot \phi}{\sqrt{1}}}{1+ x \frac{\cot \phi}{\sqrt{1}}}, \ x\in \mathbb{R}$$

But, what is a solution of the equation in two dimensions
$$
\frac{1}{1 + f^2(x,y)+f^2(y,x)}=\frac{\left(\frac{\cos \phi}{\sqrt{2}} (x+y) +\sin \phi \right)^2}{1 + x^2+y^2}, \ x,y\in \mathbb{R}.\tag{1}
$$
Note: The function
$$f(x,y) =\frac{x-\frac{\cot \phi}{\sqrt{2}}}{1+ (x+y) \frac{\cot \phi}{\sqrt{2}}}$$
is close but not quite.

Any guess or method to derive a solution?

答:
Write

$$g(x,y) = g(y,x) = \frac{ \left ( \frac{\cos \phi}{\sqrt{2}} (x+y) + \sin \phi \right )^2}{1 + x^2 + y^2}$$

Then you want to solve

$$\frac{1}{1 + (f(x,y))^2 + (f(y,x))^2} = g$$

But this gives exactly one constraint:

$$(f(x,y))^2 + (f(y,x))^2 = \frac{1 - g}{g}$$

This determines $f$ uniquely on the diagonal, as

$$f(x,x) = \sqrt{\frac{1-g(x,x)}{2g(x,x)}}$$

But off the diagonal, all bets are off. In particular, for any function $h(x,y)$

$$
f(x,y) =
\begin{cases}
\sqrt{\frac{1-g(x,x)}{2g(x,x)}} & x = y \\
h(x,y)                & x < y \\
\sqrt{\frac{1-g(x,y)}{g(x,y)} - h(y,x)^2} & y < x
\end{cases}
$$

will do the trick. We can do whatever we want on $x < y$, and then define the function to make the swapping condition work for $y < x$.

Obviously the dream will be to find a function $h$ which makes this piecewise definition smooth, and you can try to build one by looking at the taylor series of $\sqrt{\frac{1-g}{2g}}$, or by looking for a function $h(x,y)$ so that $h(x,x) = \sqrt{\frac{1-g}{2g}}$.

At least one of those strategies is likely to work, but the definition of $g$ is too ugly for me to want to do it myself. If you aren't already using a computer algebra system like sage, you should look into one. It'll handle the calculations for you, and will make your life 1000 times easier.

I hope this helps ^_^


问:
Computation of $\int_0^{\pi} \frac{\sin^n \theta}{(1+x^2-2x \cdot \cos \theta)^{\frac{n}{2}}} \, d\theta$

Show that
  $$\begin{align*} \forall x \in [-1,1]: \int_0^{\pi} \frac{\sin^n \theta}{(1+x^2-2x \cdot \cos \theta)^{\frac{n}{2}}} \, d\theta &= c_n \tag{1} \\ \int_0^{\pi} \frac{\sin^{n+2} \theta}{(1+x^2-2x \cdot \cos \theta)^{\frac{n}{2}}} \, d\theta &= a_n \cdot x^2+b_n \tag{2} \end{align*}$$ where $a_n, b_n, c_n$ are constants (which do not depend on $x \in [-1,1]$), $n \geq 3$.

I tried several approaches (differentiation to show that the derivative of $(1)$ is equal to $0$, Weierstraß substitution, ...), but always got stuck. For example, one can show that the integrand in $(1)$ equals

$$\begin{align*} \frac{\sin^n \theta}{(1+x^2-2x \cdot \cos \theta)^{\frac{n}{2}}} &= \left( \sqrt{ \left( \frac{x-\cos \theta}{\sin \theta} \right)^2+1} \right)^{-n} \\ &= \left( \sqrt{4 \left( \frac{\sin \frac{\theta+\varrho}{2} \cdot \sin \frac{\theta-\varrho}{2}}{\sin \theta}  \right)^2+1} \right)^{-n} \end{align*}$$ where $x=\cos \varrho$. I hoped to get some kind of symmetrization out of it, but (as far as I can see) it doesn't work.

Any ideas? (The aim is to find a rather quick or direct proof - a lengthy one is already known, using a recursive/inductive approach.)

Thanks!

答:
You are in the good way.
The integral can be expressed as
$$
I(\varphi)=\int_{0}^{\pi}f(\theta,\varphi)d\theta
$$
 where
$$ f(\theta,\varphi)=\left[1+\left(\dfrac{2\sin\left(\dfrac{\theta+\varphi}{2}\right)\sin\left(\dfrac{\theta-\varphi}{2}\right)}{\sin\theta}\right)^{2}\right]^{-\frac{n}{2}}
$$
 where $x=\cos\varphi$.

Now, $f(\theta,\varphi)=f(-\theta,\varphi)$, so is no harm in writing the integral as
$$
I(\varphi)=\dfrac{1}{2}\int_{-\pi}^{\pi}f(\theta,\varphi)d\theta
$$
We want to prove that
$$
 \cfrac[l]{\partial I(\varphi)}{\partial\varphi}=\dfrac{1}{2}\int_{-\pi}^{\pi}\cfrac[l]{\partial f(\theta,\varphi)}{\partial\varphi}d\theta=0
$$
so it is enough to prove that
$$
 g(\theta,\varphi)=\cfrac[l]{\partial f(\theta,\varphi)}{\partial\varphi}
$$
is antisymmetrical in $\theta$.

Deriving we obtaing
$$
g(\theta,\varphi)=\dfrac{n\left(\dfrac{2\sin\left(\dfrac{\theta+\varphi}{2}\right)\sin\left(\dfrac{\theta-\varphi}{2}\right)}{\sin\theta}\right)}{\left[1+\left(\dfrac{2\sin\left(\dfrac{\theta+\varphi}{2}\right)\sin\left(\dfrac{\theta-\varphi}{2}\right)}{\sin\theta}\right)^{2}\right]^{\frac{n}{2}+1}}
$$
and we see that  $g(\theta,\varphi)=-g(-\theta,\varphi)$.

For expression (2), the proof is analogous.


问:
Do these infinite sequences (from day 15 of "advent of code 2020") permit cycles?
Link to the problem here but will restate the essence in the question anyway, for completeness. https://adventofcode.com/2020/day/15

So, the Elves are playing a game where they take turns saying numbers. First, they say the numbers in a given finite starting sequence of nonnegative integers. Let's say the starting sequence is "1, 2, 3".

After that, they take turns as follows:

Consider the last number that was said.

If that number hasn't ever been said before, say "0" and end your turn.

If the number has been said before, say the number of turns between the last occurrences.

So in our example, the numbers said start with 1, 2, 3.

Now, 3 has never been said before, so for the next turn the elf says "0".
For the next turn, "0" has never been said before, the next elf says "0" as well.

Now for the next turn, the last number said was 0. It has been said before just 1 turn before that, so the elf says "1".

Now we're at 1, 2, 3, 0, 0, 1.

So the next number to be said is "5", because that's the distance between the 1s.

The coding challenge is to find the 300000000th number. Brute force is entirely possible by just applying those rules. But I wondered if there could be shortcut by finding a cycle. If we knew that the sequence from a given turn onward repeats.

I have a strong feeling that the answer is "no", and that there is in fact no cycle, but I have a hard time proving it. Some observations I had so far:

Due to the special rule for "0", no cycle can ever contain the number "0", because the second time around the number that caused "0" to be said wouldn't be "new", so it wouldn't be followed by 0.

If there was a cycle of length N, the largest number it can contain is N.

A cycle of length N cannot consist of N distinct numbers; otherwise they'd all have to be "N" (contradiction).

There is one trivial cycle: If your starting sequence is "1, 1" then it will just repeat "1" forever. However, that is only possible if you actually start with "1, 1". You cannot get there any other way. The reason for this is that, if you see "1, 1" in the sequence, you can uniquely go backwards: The second 1 means the preceding number was seen before, just one turn away. Well, the preceding number is 1. So we know the next number to the left must have also been a one. Ad infinitum.

I think the last part is generally true: If we have a sequence that goes on forever "to the right" it also must go on forever to the left. That means if there's a cycle, we must have started with that cycle. Together with the first observation (no 0s in a cycle) means that we can definitely give a somewhat weaker result: As soon as you find a "0" during your game, you know that you will never hit a cycle.

Okay, but what about the even stronger result that even without 0s you can never hit a (non-trivial) cycle? There I'm quite lost, and probably approaches this in too elementary a fashion. Any hints or suspicions of what one could try? Maybe there's some general results that the sequence is unbounded (unless trivial)? Or some elegant proof by contradiction?

答:
If the sequence is bounded, then it must be eventually periodic.

Let your sequence be $a_n, n\ge 0$.  Suppose the sequence is bounded by $N$.  After some point, all numbers that will ever appear have appeared, and then to determine the next number you just have to look at the previous $N+1$ numbers, i.e. $a_{n+1} = f(a_{n-N}, a_{n-N+1}, \ldots, a_n)$ for a certain function $f:\{1,\ldots, N\}^{N+1} \to \{1,\ldots, N\}$.  Now since there are only a finite number ($N^{N+1}$) of possible $(N+1)$-tuples of numbers in $\{1,\ldots, N\}$, eventually one has to recur: $(a_m, \ldots, a_{m+N}) = (a_n, \ldots, a_{n+N})$ for some $n > m$.  And then we must have $a_{m+k} = a_{n+k}$ for all $k \ge 0$, i.e. the sequence is eventually periodic with period $n-m$.

EDIT: Another important fact is that if the sequence is eventually periodic, then it must be periodic.  I claim that if $a_{n+k} = a_{m+k}$ for all $k \ge 0$, where $n < m$,
then also $a_{n-1} = a_{m-1}$.  To see this, take the least $r \ge 0$ such that $a_{m+r} = a_{m-1}$ (we know such $r$ exist, since $a_{2m-n-1} = a_{m-1}$).
Then $a_{m+r+1} = r+1$, so also $a_{n+r+1} = r+1$, but then that says $a_{n-1} = a_{n+r} = a_{m+r} = a_{m-1}$.

In particular, since we know cycles can't contain $0$, and our sequence starting $1,2,3$ does contain $0$, our sequence must be unbounded.


问:
Sum of modulo for first n natural numbers where divisor is irrational
Given integer n and float z find sum s of modulo z of first n natural numbers i.e 1%z + 2%z + ... + n%z. Note that z is irrational number!

$$ s=\sum_{i=1}^n {(i\mod z)} \\
z \ is \ irrational
$$

For my concrete case z is $$ {\sqrt 2+1}$$

I found similar problem: https://www.geeksforgeeks.org/find-sum-modulo-k-first-n-natural-number

For my case n could be bigger than 10^100, so naive linear time solution would not work.

答:
Sums are almost linear. I found linear regression  $$s\approx 1.20708 n+0.0506173$$
For $n=10^5$ exact sum is $120712$ while the approximation gives $120708$

For $n=2\cdot 10^5$ exact sum is $241420.917186$ and approximation is $241416.6$


问:
What kind of equation is this?
I saw a book on my brother's bookshelf and I decided to look through it and to me it looked pretty complicated (it's physics). On the first page I encountered the Rayleigh-Jeans formula:

$$u(v) \space dv = \dfrac{8\pi v^2 kT}{c^3} dv$$

I have a couple of (mathematical) questions regarding this:

What kind of formula is this? I understand the fraction, the $u(v)$ part resembles the regular $f(x) = ..$ you encounter in basic math often, but the $dv$ in the beginning and end confuse me. I am familair with integrals, but this seems to be something else. A differential equation?

How do you work with these kinds of formulas? At my level of physics/mathematics you just have to plug in data (like $k, T, v, c, \pi$) and you get an answer. What do you have to do here, with the $dv$ part, in order to get the 'answer'?

答:
The Rayleigh Jeans formula is the classical (non-quantum mechanical in this context) result for the black body radiation.

The quantity $u(\nu)d\nu$ is the spectral radiance $u(\nu)$ per unit frequency $d\nu$. You can see that $u(\nu)=K\nu^2$ for some $K>0$ so

$$ \lim_{\nu\to\infty} u(\nu)=+\infty$$

These infinite radiance result is not experimentally allowed, and it's called the ultraviolet catastrophe. Its solution is due to Max Planck, via Planck's formula, one of the first (if not the first) quantum mechanical results ever.

I still propose the migration to physics.SE because it is a physics question (hence the physics tag) and people there will provide you much more insightul answers than mine.

Title: What kind of equation is this?


问:
What does $P_X (A) = P(X^{-1}(A))$ mean in probability?
I'm taking a course that covers random variables and I've been trying to make sense of this definition:

Given a set $\Omega$ and a probability $P$, a random variable is a function:
$$X : \Omega \longmapsto \mathbb{R}$$
and the probability of an event $A$ is
$$ P_X (A) = P(X^{-1}(A))$$

The last part is the one that hasn't clicked in yet. To my understanding, a probability is a function $P:\mathfrak{F}\longmapsto [0,1]$, where $\mathfrak{F}$ is a $\sigma$-algebra. I haven't been given a formal definition of $\sigma$-algebra, but I have been told that it's what gives a probability, where $\Omega$ is the universe set, these two properties:

$P(\Omega)=1$

If $\{A_n\}_{n\geq1}$ is a sequence of disjointed subsets of $\Omega$, then $\bigcup_{i=1}^{+\infty} P(A_i) = \sum_{i=1}^{+\infty} P(A_i)$

So, in the context of the probability of an event $A$, we can say that $A$ is a subset of $\Omega$, but what would $X^{-1}(A)$ mean? Intuitively, if it's something like its counter-image, then its probability would be the probability $P$ of the value of $X$ which corresponds to the event $A$. Is this correct?

I apologize if I wasn't very formal or completely accurate, but this isn't an advanced course and I'm trying to make sense on my own of some things that weren't really explained too thoroughly to us.

Thank you.

答:
$X^{-1}(A)$ means by definition $\{ \omega \in \Omega : X(\omega) \in A \}$. More generally, the preimage (or "inverse image") notation is defined as: if $f : A \to B$ and $C \subset B$ then $f^{-1}(C)=\{ x \in A : f(x) \in C \}$.

Notice that this definition doesn't actually involve the inverse, but it agrees with the ordinary image of the inverse (which would be $\{ f^{-1}(y) : y \in C \}$) if the inverse exists.

Ultimately we can understand $X^{-1}(A)$ informally as just "the event that $X \in A$"; this sort of thing tends to be the better way to think about it since $\Omega$ and its elements are really abstract things.

Another relevant detail that may be confusing you: $P$ and $P_X$ aren't defined on the same domain. $P(A)$ is defined for (some) $A \subset \Omega$; $P_X(A)$ is defined for (some) $A \subset \mathbb{R}$.


问:
Existence of a similar process to the Browinan motion
Let $(\Omega, \mathcal F, (\mathcal F_t)_{t\geq 0},P)$ a filtered probability space satisfying the usual conditions. Is there a real-valued stochastic process $X=(X_t)_{t\geq0}$ satisfying the conditions

$\forall 0\leq s<t<\infty: X_t-X_s$ is independent of $\mathcal F_s$ and

$\forall 0\leq s<t<\infty: X_t-X_s$ is uniformly distributed on the intervall $[-(t-s),t-s]$
?

My question is closely related to Lévy processes and obviously motivated by the Browian motion, where in the second condition a normal distribution is required. But I'm not happy about the fact, that the paths are not of finite variation. So, if there is this process $X$, what can we say about the paths (differentiability, ...)? $X$ should has definitely paths of finite variation and be continuous - provided it exists. If there is no such process $X$, might there be another distribution for condition (2) such that the process exists (aside from the normal distribution, where the result is well known)?

答:
Let $s < u < t$.  We have $X_t - X_s = (X_t - X_u) + (X_u - X_s)$, but the uniform distribution on $[-(t-s), t-s]$ is not a sum of two independent uniform distributions.

Indeed, in order for (1) to be true, the distribution of each $X_t - X_s$ has to be infinitely divisible.  This is what leads to the classification of Lévy processes and the distributions of their increments.  In particular, the only such processes which is continuous are Brownian motions, and none of them are differentiable (except, trivially, the constant process).


问:
How can we prove that $\lim_{x\to0^+} \sum_{n=1}^\infty e^{-n^2x}=\infty$?
Consider the function defined on $(0,\infty)$ by $$f(x)=\sum_{n=1}^\infty e^{-n^2x}.$$ How can we prove that $\lim_{x\to0^+} f(x)=\infty$?

答:
For any $N,$ we have

$$f(x)\ge \sum_{n=1}^{N}e^{-n^2x}\implies \liminf_{x\to 0^+}f(x)\ge \liminf_{x\to 0^+}\,(\sum_{n=1}^{N}e^{-n^2x})$$ $$= \lim_{x\to 0^+}(\sum_{n=1}^{N}e^{-n^2x})=N.$$

This is true for all integers $N>0,$ hence the $\liminf$ of $f$ is $\infty.$ Therefore so is $\lim f.$


问:
Using antiderivatives to find velocity given acceleration with a domain
If the acceleration is:

$a = 9 - 0.9t$ if 0 ≤ t ≤ 10

$a = 0$ if t > 10

Which function of a do I use to find the velocity? On my attempt, I had two separate antiderivatives (one for each domain), but it did not get me the correct answer.

答:
$$v=\int a ~dt$$
So for $0\le t\le10$, $v=9t-0.45t^2+c$ for some constant $c$, and for $t>10$, the velocity is constant, so it is equal to $d$ for some other constant $d$
(which could be numerically equal to $c$).


答:
In this case $A$ is a subset of $\mathbb{R}$ not $\Omega$. The point it that the words "random variable" are "hiding" that your function $X$ is mesurable. So if $A$ is a mesurable set of $\mathbb{R}$ the set $X^{-1}(A)$ has to be in your sigma-algebra, but now you know what the probability of a set in the sigma algebra is because you have a defined probability function.
You are basically trying to "translate" your probability from $\Omega$ to $\mathbb{R}$ via X.

Title: What does $P_X (A) = P(X^{-1}(A))$ mean in probability?

Body:
I'm taking a course that covers random variables and I've been trying to make sense of this definition:

Given a set $\Omega$ and a probability $P$, a random variable is a function:
$$X : \Omega \longmapsto \mathbb{R}$$
and the probability of an event $A$ is
$$ P_X (A) = P(X^{-1}(A))$$

The last part is the one that hasn't clicked in yet. To my understanding, a probability is a function $P:\mathfrak{F}\longmapsto [0,1]$, where $\mathfrak{F}$ is a $\sigma$-algebra. I haven't been given a formal definition of $\sigma$-algebra, but I have been told that it's what gives a probability, where $\Omega$ is the universe set, these two properties:

$P(\Omega)=1$

If $\{A_n\}_{n\geq1}$ is a sequence of disjointed subsets of $\Omega$, then $\bigcup_{i=1}^{+\infty} P(A_i) = \sum_{i=1}^{+\infty} P(A_i)$

So, in the context of the probability of an event $A$, we can say that $A$ is a subset of $\Omega$, but what would $X^{-1}(A)$ mean? Intuitively, if it's something like its counter-image, then its probability would be the probability $P$ of the value of $X$ which corresponds to the event $A$. Is this correct?

I apologize if I wasn't very formal or completely accurate, but this isn't an advanced course and I'm trying to make sense on my own of some things that weren't really explained too thoroughly to us.

Thank you.


答:
*Note: * For $k=1$ to $3$ we have to evaulate the sum for $k\in\{1,2,3\}$:
\begin{align*}
\sum _{n=1}^{k}\frac{{\left(-4\right)}^{n+2}}{(n-2{)}^{2}}\prod _{i=n}^{2k}\frac{i}{i+1}\tag{1}
\end{align*}
Hint: Evaluation at $n=2$ is not feasible, since in that case we have division by zero, which is not admissible. In order to overcome this problem we can exclude the value which causes the indeterminate expressions;.

We consider the  valid expression:
\begin{align*}
\sum _{{n=1}\atop{n\ne 2}}^{k}\frac{{\left(-4\right)}^{n+2}}{(n-2{)}^{2}}
\prod _{i=n}^{2k}\frac{i}{i+1}\tag{2}
\end{align*}
which  can be simplified, since
\begin{align*}
\prod _{i=n}^{2k}\frac{i}{i+1}&=\frac{n}{n+1}\cdot\frac{n+1}{n+2}\cdots\frac{2k}{2k+1 }\\
&=\frac{n}{2k+2}
\end{align*}

Title: Evaluate $\sum _{n=1}^{k}\frac{{\left(-4\right)}^{n+2}}{(n-2{)}^{2}}\prod _{i=n}^{2k}\frac{i}{i+1}$ for $k=3$

Body:
$\sum _{n=1}^{k}\frac{{\left(-4\right)}^{n+2}}{(n-2{)}^{2}}\prod _{i=n}^{2k}\frac{i}{i+1}$

How can I think this for k=3 ?

Here is my idea: $\prod _{i=n}^{6}\frac{i}{i+1}=\frac{1}{2}.\frac{3}{4}.\frac{4}{5}.\frac{5}{6}.\frac{6}{7}$

then

$\frac{3}{14}\sum _{n=1}^{3}\frac{{\left(-4\right)}^{n+2}}{{\left(n-2\right)}^{2}}=\frac{3}{14}.\left(\frac{{\left(-4\right)}^{3}}{{\left(1-2\right)}^{2}}+\frac{{\left(-4\right)}^{5}}{{\left(3-2\right)}^{2}}\right)=-233,1428571$

Is my idea correct?


问:
Uniform convergence of piecewise defined function
I have solved the following exercise and I would like to know if I have made any mistakes. Thank you.

Problem: Let $h_n(x)=$
\begin{cases}
                                1 & \text{if $x=\frac{1}{n}$}\\
                                x & \text{if $x=1,\frac{1}{2},\dots,\frac{1}{n-1}$}\\
                                0 & \text{otherwise}
\end{cases}
and let $h$ be the pointwise limit of $h_n$. Is each $h_n$ continuous at $0$? Does $h_n\to h$ uniformly on $\mathbb{R}$? Is $h$ continuous at $0$?

My solution:

Let $\varepsilon>0$, fix $n\geq 1$ and set $\delta:=\frac{1}{n}$: then $|x-0|<\delta$ implies $|h_n(x)-h_n(0)|=|h_n(x)-0|=|h_n(x)|=0<\varepsilon$ (note that $h\equiv 0$ for $x\in [0,\frac{1}{n})$) so each $h_n$ is continuous at $0$. Now, let $N\geq 1$, and $m,n\geq N$ (we can assume wlog $m>n$): then $|h_m(x)-h_n(x)|=$
\begin{cases}
                                0 & \text{if $x=1,\frac{1}{2},\dots,\frac{1}{n-1},\frac{1}{n}$} \\
                                x & \text{if $x=\frac{1}{n+1},\frac{1}{n+2},\dots,\frac{1}{m-1}$} \\
                                1 & \text{$x=\frac{1}{m}$} \\
                                0 & \text{otherwise}
\end{cases}
so if we pick $\varepsilon=\frac{1}{2}$ we have $|h_m(\frac{1}{m})-h_n(\frac{1}{2m})|=|1-0|=1>\varepsilon$. So we have shown there exists a $\varepsilon>0$ and $x\in\mathbb{R}$ such that for all $N\geq 1$ and $m,n\geq N$ we have $|h_m(x)-h_n(x)|=1>\varepsilon$ thus by the Cauchy Criterion for Uniform Convergence we have that $h_n$ does not uniformly converge on $\mathbb{R}$.

EDIT: (first part is fine, following second part corrected according to answer below by José Carlos Santos)

Now, let $\varepsilon>0$ and set $\delta:=\frac{\varepsilon}{2}$: then $|x-0|<\delta$ implies $|h(x)-h(0)|=|h(x)-0|=|h(x)|\leq\frac{\varepsilon}{2}<\varepsilon$ so $h$ is continuous at $0$.

答: You proved correctly that the convergence is not uniform. However, $h$ is continuous at $0$, since$$h(x)=\begin{cases}x&\text{ if }x\in\left\{1,\frac12,\frac13,\ldots\right\}\\0&\text{ otherwise.}\end{cases}$$