问:
Prove $\ln(a \cdot b)=\ln(a)+\ln(b)$, $a,b>0 $ and $\lim_{a \to 0} \frac{\ln(1+a)}{a} =1$.But we shall not even know that the exponential function.
In Japanese high school education, the number $e$ is defined first. There is no disagreement that $e^q$ can be defined algebraically when the rational number $q$ is an exponent. However,  there is a sudden "deregulation" that $q$ can be a real number. Until now, I had no doubts about this. But now I'm confused about it.
(I am a user of college-level mathematics, and probably know the epsilon-delta argument. But I'm not familiar with rigorous mathematics.)

I found the way exponential functions were introduced in Japanese high school to be a bit mathematically imprecise. I overheard someone say, "That can be essentially eliminated with only high school knowledge by starting with defining the logarithmic function in terms of integrals. My question is based on that sense. Specifically;

We assume that we do not know the existence or properties of the $\exp(x)$.

We assume that we do not know that $\ln(x)$ is the logarithm.

But, we assume that we know general properties of differentiation and integration, such as integration by substitution.

We also assume that the function $\ln$ is defined as follows;
$$\ln(x):=\int_{t=1}^{t=x} \frac{1}{t}\ dt \tag{0-1}$$

We do not know any more about ln. For example, we do not know the following formulas;
$$\lim_{a \to 0}\ \frac{\ln(1+a)}{a} =1 \tag{0-2}$$

My Question:

Under the these assumptions, I would like to derive the following formulas. In particular, we want to pay attention to whether we are violating mathematical rules (e.g., improper exchange of integrals and limits).
$$\ln(a \cdot b)=\ln(a)+\ln(b) \ , a,b>0 \tag{1}$$
$$\lim_{a \to 0} \frac{\ln(1+a)}{a} =1 \ ,a>0 \tag{2}$$

Perhaps an outline of the solution would be as follows;

For (1)

$$\ln(a \cdot b):=\int_{t=1}^{t=a \cdot b} \frac{1}{t} dt$$
$$=\int_{t=1}^{t=a} \frac{1}{t}\ dt + \int_{t=a}^{t=a \cdot b} \frac{1}{t}\ dt$$
$$=\ln(a) + \int_{t=a}^{t=a \cdot b} \frac{1}{t}\ dt \tag{1-1}$$

Using $t=s*a$, second term on the right side is
$$\int_{t=a}^{t=a \cdot b} \frac{1}{t}\ dt
=\int_{s=1}^{s=b} \frac{1}{sa} \cdot a\ ds
=\int_{s=1}^{s=b} \frac{1}{s} \ ds
=\ln(b) \tag{1-2}$$

For (2)

$$\ln(1)=\int_{t=1}^{t=1} \frac{1}{t}\ dt=0 $$

Therefore,
$$\frac{\ln(1+a)}{a}
=\frac{\ln(1+a)+0}{a}$$
$$=\frac{\ln(1+a)-\ln(1)}{a}  + \frac{\ln(1)}{a}
=\frac{\ln(1+a)-\ln(1)}{a}  +0 $$
If we take the limits of both sides of the above equation, we can show the (2).
That is;
$${\lim}_{a \to 0} \frac{\ln(1+a)}{a}=
{\lim}_{a \to 0}\frac{\ln(1+a)-\ln(1)}{a}
=\ln'(1)=\frac{1}{1}=1$$
Again, I emphasize that my main concern is not the solution itself, but the  "violate mathematical rules". In other words, does the above solution do anything mathematically inappropriate? (e.g., use of circular argument, improper ordering of integrals and limits, etc.)

答:
It's really good that you are noting this must be proven and not taken for granted!

Integration by substitution is valid.  So your proof is valid.

Note if you use Reimann definition of integral

$\int_a^b f(x) dx = \lim_{n\to\infty} \sum_{i=1}^nf(x_i)\Delta x$ where we divide the interval $[a,b]$ into $n$ equal parts, $\Delta x = \frac {b-a}n$ and $x_i \in $ the $i$th of the smaller intervals (for practical purposes we may assume, assuming the function is integrible at all, the endpoint).

In other words: $\int_a^b f(x)dx = \lim_{n\to\infty}\sum_{i=1}^n f(a + i\frac {b-a}n)\cdot \frac {b-a}n$.

So

$\int_{a}^{b} \frac 1x dx = \lim_{n\to\infty} \sum_{i=1}^n\frac 1{x_i}\Delta_1 x=$ (where $\Delta_1 x = \frac {b-a}n$ and $x_i = a + i\Delta_1 x$.  Now let $k$ be any non-zero constant....)

$\lim_{n\to\infty} \sum_{i=1}^n\frac 1{kx_i}k\Delta_1 x= $(where $k\Delta_1 x = \frac {kb- ka}n$ and $kx_i = ka + i(k\Delta_1 x)$)

$\lim_{n\to\infty} \sum_{i=1}^n\frac 1{y_i}\Delta_2 y= $(where $\Delta_2 y = k\Delta_1 x = \frac {kb-ka}n$ and $y_i = ka + i\Delta_2 y$)

$\int_{ka}^{kb} \frac 1y dy= \int_{ka}^{kb} \frac 1x dx$

So for any non-zero constant, $k$ we have $\int_a^b \frac 1x dx = \int_{ka}^{kb} \frac 1x dx$.

(we can give a similar argument for the other definitions of integral)

And with that....


问:
Happy number: is loop really possible?
I try to solving leetcode problem #202 about "Happy number" and wondering is really infinit loop is possible:

A happy number is a number defined by the following process:

Starting with any positive integer, replace the number by the sum of
the squares of its digits.

Repeat the process until the number equals 1 (where it will stay), or
it loops endlessly in a cycle which does not include 1.

Those numbers for which this process ends in 1 are happy.

Classic way contains no loop detector (HashSet or similar data structures).

I've checked all numbers upto Int32.MaxValue but can't detect any loop. Is is really possible? I tried to proove by induction that it's not possible, but failed.

答:
The sum of squares of its digits brings large numbers down by a lot. Namely, given a number with n digits, the maximal next value it can attain is $81n$. This is because if you have a number with $n$ nines, the sum will be $9^2 + 9^2 + ... n$ times. You can now use the fact that a number a has $\lceil\log_{10}(a)\rceil$
digits. Solving $\lceil\log_{10}(a)\rceil< a$ gives $243$ as a bound for which no number above can possibly be contained in a loop. All you have to do now is check all number up to $243$, and you're done.

ContentLicense: CC BY-SA 4.0

Title: Happy number: is loop really possible?


问:
Sum of Logarithm Arguments
This is a very simple question I suspect but I just cannot seem to nail it...

I have values for $X,Y,Z $, where $X =\log (x)$,  $Y = \log (y)$ and $Z = \log (z)$ and I need to calculate $x + y + z$, well actually $\log(x + y + z)$ would suffice. Is there a clever way of doing this other than simply doing $e^X+e^Y+e^Z$?

Its for an algorithm where I am trying to avoid underrun - $x=e^X,y=e^Y,z=e^Z$ likely to be very small.

Any pointers much appreciated.

With answer given by @response I ended up using $\log(x+y+z)=\log(e^R+e^S+e^T)-C$ where $R=X+C$, $S=Y+C$, $T=Z+C$

答:
Suppose, we add a constant $C$ to each one of the values: $X, Y, Z$ which would prevent underflow when they are raised to $e$. Then we get:

$X' = X + C$

$Y' = Y + C$

$Z' = Z + C$

Thus, we have:

$x' = e^{X'}$

$y' = e^{Y'}$

$z' = e^{Z'}$

Adding them, we have:

$x'+y'+z' = e^{X'} + e^{Y'} + e^{Z'}$

But, we know that:

$e^{X'} + e^{Y'} + e^{Z'} = e^{X+C} + e^{Y+C} + e^{Z+C} = e^C (e^{X} + e^{Y} + e^{Z})$

Thus, we have:

$x+y+z = (x'+y'+z') e^{-C}$

ContentLicense: CC BY-SA 3.0

Title: Sum of Logarithm Arguments


问:
Maximum Likelihood Estimator of parameters of multinomial distribution
Suppose that 50 measuring scales made by a machine are selected at random from the production of the machine and their lengths and widths are measured. It was found that 45 had both measurements within the tolerance limits, 2 had satisfactory length but unsatisfactory width, 2 had satisfactory width but unsatisfactory length, 1 had both length and width unsatisfactory. Each scale may be regarded as a drawing from a multinomial population with density

$$
\pi_{11}^{x_{11}}
\pi_{12}^{x_{12}}
\pi_{21}^{x_{21}}(1-\pi_{11}-\pi_{12}-\pi_{21})^{x_{22}}
$$

Obtain the maximum likelihood estimates of the parameters.

I have tried this by the following way:

the likelihood function is

\begin{align}
L & =L(\pi_{11},\pi_{12},\pi_{21},(1-\pi_{11}-\pi_{12}-\pi_{21})) \\[8pt]
& =\prod_{i=1}^{50}[\pi_{11}^{x_{11}} \pi_{12}^{x_{12}}
\pi_{21}^{x_{21}}(1-\pi_{11}-\pi_{12}-\pi_{21})^{x_{22}}] \\[8pt]
& =[\pi_{11}^{x_{11}} \pi_{12}^{x_{12}}
\pi_{21}^{x_{21}}(1-\pi_{11}-\pi_{12}-\pi_{21})^{x_{22}}]^{50} \\[8pt]
& =[\pi_{11}^{45}\pi_{12}^{2}
\pi_{21}^{2}(1-\pi_{11}-\pi_{12}-\pi_{21})^{1}]^{50} \\[8pt]
& =\pi_{11}^{2250}\pi_{12}^{100}
\pi_{21}^{100}(1-\pi_{11}-\pi_{12}-\pi_{21})^{50}
\end{align}

Taking logarithm of the likelihood function yields,

\begin{align}
L^*& =\log L=\log \left[\pi_{11}^{2250} \pi_{12}^{100}
\pi_{21}^{100}(1-\pi_{11}-\pi_{12}-\pi_{21})^{50}\right] \\[8pt]
& =2250\log [\pi_{11}]+100\log [\pi_{12}]+100\log [\pi_{21}]+50\log (1-\pi_{11}-\pi_{12}-\pi_{21})
\end{align}

Now taking the first derivative of $L^*$ with respect to $\pi_{11}$

$\frac{\partial L^*}{\partial \pi_{11}}$
$=\frac{2250}{\pi_{11}}-\frac{50}{(1-\pi_{11}-\pi_{12}-\pi_{21})}$

setting $\frac{\partial L^*}{\partial \pi_{11}}$ equal to $0$,

$$\frac{\partial L^*}{\partial \hat\pi_{11}}=0$$

$$\Rightarrow\frac{2250}{\hat\pi_{11}}-\frac{50}{(1-\hat\pi_{11}-\hat\pi_{12}-\hat\pi_{21})}=0$$

$$\Rightarrow \hat\pi_{11}=\frac{45(1-\hat\pi_{12}-\hat\pi_{21})}{44}$$

$\bullet$Are the procedure and estimate of $\pi_{11}$ correct?

$\bullet$I have another question that if it is multinomial then where the term $\binom{n}{x_{11}x_{12}x_{21}x_{22}}=\binom{50}{45,2,2,1}$?

答:
From the beginning, you assume a multinomial (not product) kdistribution of $n=50$ i.e., for counts $x_{11}, x_{12},x_{21},x_{22} $ from the $2×2$ contingency table of four possible events. Therefore,
$$X\sim Multn(n, p_{11},p_{12},p_{21},p_{22})$$
The PMF~ with interest to maximize the parameter p={p_i: I=1 to q categories/outcomes}: $ L(p) = P_X(x_{11}, x_{12},x_{21},x_{22}: n, p_{11},p_{12},p_{21},p_{22}) $
Which is,
$$= \frac{n! p_{11}^{x_{11}} \cdot p_{12}^{x_{12}} \cdot p_{21}^{x_{21}} \cdot p_{22}^{x_{22}} }{x_{11}! x_{12}! x_{21}! x_{22}! } $$

Hence, we can write
$$ Log_e{L(p)} = \log_e { \frac{50! p_{11}^{x_{11}} \cdot p_{12}^{x_{12}} \cdot p_{21}^{x_{21}} \cdot p_{22}^{x_{22}} }{x_{11}! x_{12}! x_{21}! x_{22}! }} $$

That is,
$$ Log_e(L(p)) = \log_e{\frac{50! p_{11}^45 p_{12}^2 p_{21}^2 p_{22}^1}{45! 2! 2! 1! }} $$

From there you equate the slope [differentiation with respect to p] to zero,
... the process of differentiation you did was correct, but not for the right pmf. And, combination $nC_{***}$ should be included.
That is,
$$∆(Log(L))= ∆(\log_e{ n!} + \log_e{p_{11}^45} + \log_e{p_{12}^2} + \log_e{p_{21}^2} + \log_e{p_{22}^1} - \log_e{45!} - \log_e{ 2!} - \log_e{2!} - \log_e{1!}) $$
These reduce to only expressions with p, that we are maximizing, that is
$$ ∆[ \log_e{p_{11}^45} + \log_e{p_{12}^2} + \log_e{p_{21}^2} + \log_e{p_{22}^1}]= 0 $$
Sum of $P_{ij}$ equal 1, $p_i= \frac{n_{ij}}{N}$ , hence $p_{21}=\frac{2}{50}$
Hope this help.


问:
Prove a multivariate function is convex
Show that the following multi-dimensional function is (strictly?) convex $$ f(x) =  \sum_{j=1}^m log\left(\frac{1}{2}+e^{2 x_j}\right) - \sum_{j=1}^m x_j  $$

Does it simply suffice to show that if the function is convex in one dimensional space, then it is in multivariate case too? e.g. the second derivative is clearly non-negative:

$$\frac{\partial^2}{\partial x} = \frac{4e^{2 x}}{(0.5+e^{2 x})^2}>0$$

But if not, I am unsure how to compute for when $\{x_j\}_{j=1}^p$ is multivariate, I think I need to show the $p\times p$ Hessian Matrix is positive definite, so i calculated the Hessian, but am not sure what to do now.

$$H = \pmatrix{\frac{4e^{2 x_1}}{(0.5+e^{2 x_1})^2}, \frac{2(x_1x_2e^{2 (x_1x_2)}+0.5e^{2x_1x_2}+e^{4x_1x_2})}{(0.5+e^{2 x_1x_2})^2},..., \frac{2(x_1x_pe^{2 (x_1x_p)}+0.5e^{2x_1x_p}+e^{4x_1x_p})}{(0.5+e^{2 x_1x_p})^2}  \\
    \frac{2(x_1x_2e^{2 (x_1x_2)}+0.5e^{2x_1x_2}+e^{4xy})}{(0.5+e^{2 x_1x_2})^2},  \frac{4e^{2 x_2}}{(0.5+e^{2 x_2})^2},...,  \frac{2(x_2x_pe^{2 (x_1x_p)}+0.5e^{2x_2x_p}+e^{4x_2x_p})}{(0.5+e^{2 x_1x_p})^2} \\
.\\
.\\
.    }$$

Alternatively, looking at this answer

答:
If $f: \Bbb R \to \Bbb R$ is (strictly) convex then
$$
 F: \Bbb R^m \to \Bbb R, \, F(x) = \sum_{j=1}^m f(x_j)
$$
is (strictly) convex as well.

This can be verified directly:  For $x \ne y \in \Bbb R^m$ and $0 < \lambda < 1$ is
$$
F((1-\lambda)x + \lambda y) = \sum_{j=1}^m f((1-\lambda)x_j + \lambda y_j) \\ \le \sum_{j=1}^m (1-\lambda) f(x_j) + \lambda f(y_j) = (1-\lambda) F(x) + \lambda F(y)
$$
because $f$ is convex. If $f$ is strictly convex then strict inequality holds here, since $x_j \ne y_j$ for at least one index $j$.

Alternatively (if $f$ is twice differentiable) this can be verified by computing the Hessian matrix $H$. The entries on the  diagonal are $f''(x_j)$, $j=1, \ldots, m$, and all mixed derivatives are zero. $H$ is a diagonal matrix with non-negative entries on the diagonal, and therefore positive semi-definite. If $f$ is strictly convex then the diagonal entries are positive and $H$ is positive definite.

In your case,
$$
 f: \Bbb R \to \Bbb R, f(t) = \log\left(\frac{1}{2}+e^{2 t}\right) - t
$$
is a strictly convex function, so that  $F$ is strictly convex.

Slightly more general: If $f_j: \Bbb R \to \Bbb R$, $j=1\, \ldots, m$ are $m$ (strictly) convex functions then
$$
 F: \Bbb R^m \to \Bbb R, \, F(x) = \sum_{j=1}^m f_j(x_j)
$$
is (strictly) convex as well.

Title: Prove a multivariate function is convex


问:
Find the $\mathcal{O}\left(\frac{1}{n}\right)$ so that $a_n-1=\mathcal{O}\left(\frac{1}{n}\right)\,{\rm as}\,n\rightarrow\infty$

Given a recursion $a_{n+ 1}= \dfrac{a_{n}^{2}+ 1}{2}$ with $a_{1}= \dfrac{1}{2}.$ Find the $\mathcal{O}\left ( \dfrac{1}{n} \right )$ so that
$$a_{n}- 1\sim\mathcal{O}\left ( \dfrac{1}{n} \right )\,{\rm as}\,n\rightarrow\infty$$

Remark. By this recurrence sequence, Ji Chen proposed 2 inequalities on AoPS, which I can't prove, of course
$$1- \frac{2}{n}+ \frac{2}{n^{2}}\ln\frac{n}{3}+ \frac{417}{128n^{2}}\leq a_{n}\leq 1- \frac{2}{n}+ \frac{5\ln n+ 3}{n^{2}}$$
and for non-negative $x_{1\div n}$ quite not related
$$\sum_{i= 1}^{n}\frac{x_{i}}{\left ( 1+ \sum_{j= 1}^{i}x_{j} \right )^{2}}\leq a_{n}^{2}$$
Return to the OP, I realise that
$$a_{n+ 1}- 1= \frac{1}{2}\left ( a_{n}- 1 \right )^{2}+ a_{n}- 1= \frac{1}{2}\left ( a_{n}- 1 \right )^{2}+ \omega\left ( \left ( a_{n}- 1 \right )^{2} \right )$$
As same as what I told on this topic  * Find the $\mathcal{o}\left(n\right)$ so that $a_n\sim\frac{\mathcal{o}\left(n\right)}{n}+\mathcal{O}\left(\frac{1}{n}\right){\rm as}\lim a_n=\infty$ *, I still can't find such an $\mathcal{o}$ satisfying my wish. I need to your help, thanks.

答:
First, we have the sequence $a_n$ satisfying $a_{n+1}= \frac{ a_{n}^2+1}{2}$  (1) converges to $1$. Indeed, we have $a_n$ is a increasing sequence ($a_{n+1}-a_n = \frac{1}{2}(a_{n}- 1)^2)$ and the sequence is bounded above by $1$ (we deduce that by proof of induction, as $a_{n+ 1}- 1= \frac{a_{n}^2- 1}{2}<1$ and $a_1 <1$).

Now, with the technique "The second term in asymptotic expansion" of Moubinool OMARJEE provided by RiverLi, we can use the function $f(y)=\frac{1}{1-y}$ for the second order expansion. Indeed, we find this function by noticing that $a_{n+1}-a_n = \frac{1}{2}(a_{n}- 1)^2$ and from the differential equation $\frac{dy}{dx} = \frac{1}{2}(y- 1)^2$ we deduce that $x=\frac{2}{1-y}$).

We have

\begin{align}
(1) &\iff 1-a_{n+1} = \frac{ 1-a_{n}^2}{2}\\
& \iff \frac{1}{1-a_{n+1}}=\frac{1}{1-a_{n}}+\frac{1}{1+a_{n}} \\
& \iff \frac{1}{1-a_{n+1}}-\frac{1}{1-a_{n}}=\frac{1}{1+a_{n}}
\end{align}
then
$$ \frac{1}{1-a_{n+1}}-\frac{1}{1-a_{n}}=\frac{1}{1+a_{n}}\xrightarrow{n \rightarrow +\infty} \frac{1}{2} $$
or
$$\frac{1}{1-a_{n}} \sim \frac{n}{2} \tag{2}$$

And from (2) we can deduce that
$$a_n \sim 1-\frac{2}{n}$$

Let's denote $a_n=1-\frac{2}{n}+\frac{1}{n}b_n$, then $b_n = \mathcal{o}(1)$. We have
\begin{align}
(1) &\iff 1-\frac{2}{n+1}+\frac{b_{n+1}}{n+1} = \frac{1}{2}((1-\frac{2}{n}+\frac{b_n}{n})^2+1) \\
&\iff b_{n+1} =2+\frac{n+1}{2}\left(   2 \frac{-2+b_n}{n} +\left(\frac{-2+b_n}{n} \right)^2 \right) \\
&\iff b_{n+1} = 2+\frac{n+1}{2}\left(   -\frac{4}{n} +\frac{2b_n}{n} +\frac{4}{n^2} -\frac{4b_n}{n^2}+\frac{b_n^2}{n^2}\right)\\
&\iff b_{n+1} = 2+\frac{n+1}{2}\left(   -\frac{4}{n}  +\frac{4}{n^2} \right) +\frac{n+1}{2}\left(  \frac{2b_n}{n}  -\frac{4b_n}{n^2}\right) +\frac{n+1}{2}\left(   \frac{b_n^2}{n^2}\right)\\
&\iff b_{n+1} = \frac{2}{n^2}+(1+\frac{1}{n})(1-\frac{2}{n})b_n + \frac{1}{2n}(1+\frac{1}{n})b_n^2 \\
&\iff b_{n+1} = (1-\frac{1}{n})b_n +\frac{b_n^2}{2n}+ \frac{2}{n^2}-\frac{2}{n^2}b_n+\frac{1}{2n^2}b_n^2 \tag{2}\\
\end{align}
We guess that $b_n\sim \alpha \frac{\ln(n)}{n}$, we denote $b_n=\frac{c_n}{n}$. Because $b_n = \mathcal{o}(1)$ then $c_n = \mathcal{o}(\ln(n))$.
\begin{align}
(2) &\iff \frac{c_{n+1}}{n+1} = (1-\frac{1}{n})\frac{c_n}{n} +\frac{b_n^2}{2n}+ \frac{2}{n^2}-\frac{2}{n^2}b_n+\frac{1}{2n^2}b_n^2  \\
&\iff c_{n+1}= (1-\frac{1}{n^2})c_n +\frac{n+1}{n}\frac{b_n^2}{2}+ \frac{2(n+1)}{n^2} + (n+1)\left(-\frac{2}{n^2}b_n+\frac{1}{2n^2}b_n^2   \right)  \\
&\iff c_{n+1} -c_n= -\frac{c_n}{n^2} +\frac{n+1}{n}\frac{b_n^2}{2}+ \frac{2(n+1)}{n^2} + (n+1)\left(-\frac{2}{n^2}b_n+\frac{1}{2n^2}b_n^2   \right) \tag{3} \\
\end{align}

We notice that
$$-\frac{c_n}{n^2} = \mathcal{o}(\frac{1}{n})$$
$$\frac{n+1}{n}\frac{b_n^2}{2} = \mathcal{O^*}(\frac{c_n^2}{n^2})$$
$$\frac{2(n+1)}{n^2} \sim \frac{2}{n}$$
$$(n+1)\left(-\frac{2}{n^2}b_n+\frac{1}{2n^2}b_n^2   \right) = \mathcal{o}(\frac{1}{n})$$

Hence,
$$(3) \iff c_{n+1} -c_n \sim \frac{2}{n} + \mathcal{O^*}(\frac{c_n^2}{n^2})+ \mathcal{o}(\frac{1}{n}) \tag{4}$$

Here, if we can prove that
$$b_n^2 = \frac{c_n^2}{n^2} = \mathcal{o}(\frac{1}{n}) \tag{5}$$
, then
$$(4) \iff c_{n+1} -c_n \sim \frac{2}{n} + \mathcal{o}(\frac{1}{n})$$
or
$$c_n = 2\ln(n)$$

And
$$b_n = 2\frac{\ln(n)}{n}$$

Note:
I haven't proven yet (5). According to the topic owner, Ji Chen proposed 2 inequalities on AoPS
$$1- \frac{2}{n}+ \frac{2}{n^{2}}\ln\frac{n}{3}+ \frac{417}{128n^{2}}\leq a_{n}\leq 1- \frac{2}{n}+ \frac{5\ln n+ 3}{n^{2}} \tag{6}$$
I guess that directly proving (5) is more difficult than proving the 2 inequalities (6) of Ji Chen.

But if we succeed to prove these 2 inequalities (6), then we can conclude (5) holds true also  (because $2\frac{\ln(n)}{n} +\frac{p}{n^2} \le b_n \le 5\frac{\ln(n)}{n} +\frac{q}{n^2} \implies b_n^2 =  \mathcal{o}(\frac{1}{n}) $) and consequently we have the 3rd order expansion of $a_n$ as follows
$$a_n = 1-\frac{2}{n}+2\frac{\ln(n)}{n^2} $$
And with this expansion, we can deduce a stronger inequality than the second one of (6).


问:
Is $C_c^\infty$ dense in $H^{s,p}$ even if $s < 0$?
It is easy to show that $\mathcal{S}(\mathbb{R}^d)$ is dense in $H^{s, p}(\mathbb{R}^d)$ for all $s \in \mathbb{R}$ and $p \in (1, \infty)$, where $H^{s,p}$ are Sobolev spaces (or Bessel potential spaces).

I know that $C_c^\infty(\mathbb{R}^d)$ is dense in $H^{s,p}$ if $s \geq 0$, since $C_c^\infty \hookrightarrow W^{n,p} = H^{n,p} \hookrightarrow H^{s,p}$, where $\hookrightarrow$ is dense embedding and $s \leq n \in \mathbb{N}$.

However, is $C_c^\infty$ dense in $H^{s,p}$ even if $s < 0$ ?

答: I found this is clear, because $\mathcal{D} \hookrightarrow \mathcal{S} \hookrightarrow H^{s,p}$, where $\hookrightarrow$ is dense embedding.


问:
Average of all possible permutations of arranging a 5 digit number.
I found this question from a olympiad practice test question and it seems like it has a rule to it that I don't know. Here it is:

What is the average of all possible five-digit numbers that can be formed by using each of the digits $4, 8, 9, 5,$ and $2$ exactly once?

The ONLY thing I can think of is list out all the possible permutations that can be made using those digits, but it seems unnecessarily complicated, and I figured there should be a law that can be used for this type of problem. I've asked plenty of questions like this where I'm asking for the rule that can be used to solve a problem and I would like you to present to me only the rule so I can approach this problem myself.

Many thanks!

答:
Since the five digits are distinct, there are $5! = 120$ such numbers.  By symmetry, each of the five digits appears in each position $$\frac{5!}{5} = 24$$ times.  Hence, the sum of the digits is
$$24 \cdot (2 + 4 + 5 + 8 + 9) \cdot (10000 + 1000 + 100 + 10 + 1)$$
Can you take it from here?


答:
Starting point: possible numbers are 54321 (each digit can be in every position and there are no repetitions so is a permutation without repetition) = 120 numbers

All digits appears exactly the same number of times. 24 start with 8, 24 start with 4, 24 start with 9… 24 have 5 has second digit, 24 have 2 has second digit…

The average number can be found by averaging each other.

$ 10000x + 1000x + 100x + 10x + x -- Eq 1$

$ x = (4 + 8 + 9 + 5 + 2)/5 $

Now hope you can solve it further. Find the value of x and put it in the eq 1

Even you can solve it by python

```<code>from itertools import permutations as perms
from functools import reduce

L=[reduce(lambda a,b: a*10+b,x) for x in perms([9,4,8,5,2])]
print(sum(L)/float(len(L)))
</code>```

You will get the result as 62221.6

Title: Average of all possible permutations of arranging a 5 digit number.

Body:
I found this question from a olympiad practice test question and it seems like it has a rule to it that I don't know. Here it is:

What is the average of all possible five-digit numbers that can be formed by using each of the digits $4, 8, 9, 5,$ and $2$ exactly once?

The ONLY thing I can think of is list out all the possible permutations that can be made using those digits, but it seems unnecessarily complicated, and I figured there should be a law that can be used for this type of problem. I've asked plenty of questions like this where I'm asking for the rule that can be used to solve a problem and I would like you to present to me only the rule so I can approach this problem myself.

Many thanks!

Body:
Starting point: possible numbers are 54321 (each digit can be in every position and there are no repetitions so is a permutation without repetition) = 120 numbers

All digits appears exactly the same number of times. 24 start with 8, 24 start with 4, 24 start with 9… 24 have 5 has second digit, 24 have 2 has second digit…

The average number can be found by averaging each other.

$ 10000x + 1000x + 100x + 10x + x -- Eq 1$

$ x = (4 + 8 + 9 + 5 + 2)/5 $

Now hope you can solve it further. Find the value of x and put it in the eq 1

Even you can solve it by python

from itertools import permutations as perms
from functools import reduce

L=[reduce(lambda a,b: a*10+b,x) for x in perms([9,4,8,5,2])]
print(sum(L)/float(len(L)))

You will get the result as 62221.6


问:
Simplify $\sum_{i=0}^n(-1)^i { n \choose i } (n - i)^3$
How can we simplify $\sum_{i=0}^n(-1)^i { n \choose i } (n - i)^3$?

I started computing the first values to figure the pattern:

$\sum_{i=0}^0(-1)^i { 0 \choose i } (0 - i)^3 = 0$

$\sum_{i=0}^1(-1)^i { 1 \choose i } (1 - i)^3 = 1 + 0 = 1$

$\sum_{i=0}^2(-1)^i { 2 \choose i } (2 - i)^3 = 2^3 - 2 + 0 = 6$

$\sum_{i=0}^3(-1)^i { 3 \choose i } (3 - i)^3 = 3^3 -3 \cdot 2^3+3-0 = 6 $

The results don't lead to a pattern and so I thought I must be missing something.

I know that $\sum_{i=0}^n(-1)^i { n \choose i } = 0$ but this also doesn't help.

How to go forth here to solve this (finding a form without the $\Sigma$)?

答:
I will re-index the sum for personal taste.

The trick here, from the theory of generating functions, is to write $k^3$ as the linear differential operator $(x\frac{\partial}{\partial x})$ applied thrice to the power $x^k$, then evaluated at $x=1$. Then

$$ \sum_{k=0}^n (-1)^k \binom{n}{k}k^3=\left(x\frac{\partial}{\partial x}\right)^3\left.\sum_{k=0}^n (-1)^{n-k}\binom{n}{k}x^k\right|_{x=1} $$

$$ = \left.\left(x\frac{\partial}{\partial x}\right)^3 (x-1)^n\right|_{x=1} $$

Funnily enough, if $n>3$ then all of the derivatives of $(x-1)^n$ above (using the product rule multiple times) will still retain a $(x-1)$ factor, and so when evaluated at $x=1$ will yield $\Sigma=0$. You will see this pattern if you evaluate the sum for $n=4,5,6,\cdots$ (you will get $0$ each time)!


问:
Prove inequality using Cauchy-Schwarz
I have some difficulties to show that $\int_0^1 u^2(x) dx \leq \frac{1}{2} \int_0^1 (u'(x))^2 dx$ for some $u \in \{u \in C([0;1]) \cap C^2((0;1)) | u(0)=u(1) = 0 \}$ . I tried to write $u(x) = \int_0^x u'(t)dt$ and then use Cauchy-Schwarz on it, so I obtain $u(x) \leq (\int_0^x (u'(t))^2 dt)^{1/2}$. Then $u(x)^2 \leq \int_0^x (u'(t))^2 dt$. Finally $\int_0^1 u^2(x) dx \leq \int_0^1 \int_0^x (u'(t))^2 dt dx$. I don't really see how to conclude. Maybe it's not the write way. Thank you

答:
\begin{align*}
\int_0^1u^2(x)\,\mathrm d x&=\int_0^1\left(\int_0^xu'(t)\,\mathrm d t\right)^2\,\mathrm d x\\
&\underset{C.S.}{\leq} \int_0^1x\int_0^x u'(t)^2\,\mathrm d t\,\mathrm d x\\
&\leq \int_0^1 x\int_0^1 u'(t)^2\,\mathrm d t\,\mathrm d x\\
&=\int_0^1 x\,\mathrm d x\cdot \int_0^1u'(t)^2\,\mathrm d t\\
&=\frac{1}{2}\int_0^1 u'(t)^2\,\mathrm d t.
\end{align*}

Title: Prove inequality using Cauchy-Schwarz


Title: Prove inequality using Cauchy-Schwarz

Body: I have some difficulties to show that $\int_0^1 u^2(x) dx \leq \frac{1}{2} \int_0^1 (u'(x))^2 dx$ for some $u \in \{u \in C([0;1]) \cap C^2((0;1)) | u(0)=u(1) = 0 \}$ . I tried to write $u(x) = \int_0^x u'(t)dt$ and then use Cauchy-Schwarz on it, so I obtain $u(x) \leq (\int_0^x (u'(t))^2 dt)^{1/2}$. Then $u(x)^2 \leq \int_0^x (u'(t))^2 dt$. Finally $\int_0^1 u^2(x) dx \leq \int_0^1 \int_0^x (u'(t))^2 dt dx$. I don't really see how to conclude. Maybe it's not the write way. Thank you

Body: $\int_0^{1}u(x)^{2}dx=\int_0^{1} (\int_0^{x} u'(t)dt)^{2}dx$ and $(\int_0^{x} u'(t)dt)^{2}\leq x\int_0^{x} u'(t)^{2}dt \leq x\int_0^{1} u'(t)^{2}dt$. Can you finish?


问:
$g'(x) \ge f'(x)$ implies $h(x) = \frac{f(x)}{g(x)}$ is decreasing?
Conjecture:

If $f(x)$ and $g(x)$ are continuous and differentiable in $(a,b)$ and $g'(x) \ge f'(x)$ for all $x \in(a,b)$ then $h(x) = \frac{f(x)}{g(x)}$ is decreasing in $(a,b)$ if $h(x)$ is continuous in $(a,b)$.

I came up with this myself when I was studying the nature of functions however I don't know if it's true. (It seems very obvious intuitively)

$h(x) = \frac{f(x)}{g(x)}$.
To prove $h'(x) < 0$ for $ x \in(a,b)$

$h'(x ) = \frac{g(x)f'(x) - f(x)g'(x)}{(g(x))^2}$

To prove: $g(x)f'(x) < f(x)g'(x)$

Here I don't know what to continue with.

Some examples:

If $g(x) = k$(Constant function) and $k$ is not $0$

$\frac{\sin x}{x}$ for $x \in (0 , \infty)$ or $x \in (-\infty,0)$

I found many other examples but no counterexamples.

Any counterexample in case this is not true will help.

答:
It is possible to conclude "in a positive way" (pun intended) to your question if supplementary assumptions are made, i.e.,

$$    \forall x \in (a,b) \ \ \begin{cases}\color{red}{0}&\color{red}{<}&f'(x)&<&g'(x)\\ \color{red}{0}&\color{red}{<}&\color{red}{g(x)} &\color{red}{<}&\color{red}{f(x)}\end{cases}$$

As the involved quantities are all positive, we are allowed to multiply the two second inequations, giving:

$$g(x)f'(x) < f(x)g'(x) $$

i.e., $ \ g(x)f'(x)-f(x)g'(x) < 0$ as desired.


问:
Proof that the line $\textbf{l}$ tangent to a conic $C$ is $\textbf{l}=C\textbf{x}$
Prove that the line $\textbf{l}$ tangent to a conic $C$ at a point $\textbf{x}$ on C is given by $\textbf{l}=C\textbf{x}$. The equation of a conic in matrix form is defined as $\textbf{x}^TC\textbf{x}=0$.

The proof in the textbook says:

The line $\textbf{l}=C\textbf{x}$ passes through $\textbf{x}$, since $\textbf{l}^T\textbf{x}=\textbf{x}^TC\textbf{x}=0$. If $\textbf{l}$ has a one-point contact with the conic, then it is a tangent, and we are done. Otherwise suppose that $\textbf{l}$ meets the conic in another point $\textbf{y}$. Then $\textbf{y}^TC\textbf{y}=0$ and $\textbf{x}^TC\textbf{y}=\textbf{l}^T\textbf{y}=0$. From this it follows that $(\textbf{x}+\alpha \textbf{y})^TC(\textbf{x}+\alpha \textbf{y})=0$ for all $\alpha$, which means that the whole line $\textbf{l}=C\textbf{x}$ joining $\textbf{x}$ and $\textbf{y}$ lies on the conic C, which is therefore degenerate.

What I am confused about is where this:

From this it follows that $(\textbf{x}+\alpha \textbf{y})^TC(\textbf{x}+\alpha \textbf{y})=0$ for all $\alpha$

comes from, why is this statement true? I don't get how the preceding sentence implies this.

答:
We simply have
$$(x+\alpha y)^TC(x+\alpha y)=x^TCx+\alpha x^TCy +\alpha y^TCx+\alpha^2y^TCy$$
and each term on the right side is $0$, using $y^TCx=x^TCy$.


问:
Equal functions almos everywhere Riemann integrable
I am looking for an example of two functions which are the same function almost everywhere (they are equal everywhere except from a null set), but one of them is Riemann integrable and the other one it is not.</p>

答: The Dirichlet function which is non-Riemann integrable and the function $f(x)=0$, for all $x \in [0,1]$, which is Riemann integrable.


问:
Finding nth term for a recursive/iterative/term to term sequence
I have the sequence: 1, 16, 166, 1666 . Im trying to find the nth term for this sequence but since it is not linear or geometric I'm not sure how to. I worked out that the recursive formula is:
\begin{gather}
a_1 = 1 \\
a_{n + 1} = 10a_{n} + 6
\end{gather}
I'm trying to write this as an nth term and I saw that one solution was:
\begin{gather}
\frac{1}{6}\left ( 10 ^{n}-4\right )
\end{gather}
But I don't know how to derive this. I have seen other answers on this site but the explanations arent often very clear or involve math that is beyond my ability. For reference I am a high schooler in my final year, if anyone is familiar with the British Education system I am studying further maths for a level so I don't know any math more complex than that.
Thank you

Body:
$a_n = 1\underbrace{6666...6}_{n-1}=$

$1\underbrace{0000.....0}_{n-1} + \underbrace{666...6}_{n-1} =$

$10^{n-1} + 6\cdot \underbrace{111....1}_{n-1} =$

$10^{n-1} + 6\cdot \frac {\underbrace{9999....9}_{n-1}}9 =$

$10^{n-1} + 6\cdot \frac {10^{n-1} -1}9=$

$10^{n-1} + \frac 23(10^{n-1} -1) =$

$\frac {3\cdot 10^{n-1} +2\cdot 10^{n-1} - 2}3=$

$\frac {5\cdot 10^{n-1} -2}3$.

......

ALteratively:

$a_n = 1\underbrace{6666...6}_{n-1}$

$3a_n = 4\underbrace{99999...9}_{n-2}8=$

$5\underbrace{00000.....0}_{n-1} - 2$

$5\cdot 10^{n-1} -2$

So $a_n = \frac {5\cdot 10^{n-1} -2}3$


答:
Observe that $1/6= 0.1666\dots $ and $a_n = 10^n(0.1666\dots - \varepsilon_n)$, where $\varepsilon_n = 10^{-n}\cdot 0.666 \dots$. Since $\varepsilon_n$ is geometric for every $n$, you can have a closed expression which is
$$\varepsilon_n = 10^{-n} \cdot \dfrac{4}6. $$
Hence,
$$a_n =  \dfrac{1}{6} \bigg(10^n - 4\bigg).$$

Title: Finding nth term for a recursive/iterative/term to term sequence

Body:
I have the sequence: 1, 16, 166, 1666 . Im trying to find the nth term for this sequence but since it is not linear or geometric I'm not sure how to. I worked out that the recursive formula is:
\begin{gather}
a_1 = 1 \\
a_{n + 1} = 10a_{n} + 6
\end{gather}
I'm trying to write this as an nth term and I saw that one solution was:
\begin{gather}
\frac{1}{6}\left ( 10 ^{n}-4\right )
\end{gather}
But I don't know how to derive this. I have seen other answers on this site but the explanations arent often very clear or involve math that is beyond my ability. For reference I am a high schooler in my final year, if anyone is familiar with the British Education system I am studying further maths for a level so I don't know any math more complex than that.
Thank you


问:
$l_1$ distance between $n$th fold product distributions $p^n$ and $q^n$
Let $p$ and $q$ be two probability distributions on a finite alphabet $\mathcal{X}$. The $l_1$ distance between them is defined as
$$l_1(p, q) = \sum_{x \in \mathcal{X}} |p(x) - q(x)|$$

Consider $n$th fold product distribution of $p$, namely $p^n$ given by
$$p^n(x^n) = \prod_{i=1}^n p(x_i)$$
for all $x^n \in \mathcal{X}^n$.

Can we express $l_1(p^n, q^n)$ in terms of $l_1(p, q)$ or at least provide an upper or lower bound on $l_1(p^n, q^n)$ in terms of $l_1(p, q)$?

\begin{align}
l_1(p^n, q^n) &= \sum_{x^n \in \mathcal{X}^n} |p^n(x^n) - q^n(x^n)|\\
&= \sum_{x^n \in \mathcal{X}^n} \Bigg | \prod_{i=1}^n p(x_i) - \prod_{i=1}^n q(x_i) \Bigg |
\end{align}

Body:
I figured it out.

Consider first the case for $n=2$ and arbitrary product distributions $p_1 \times p_2$ and $q_1 \times q_2$

\begin{align*}
    l_1(p_1 \times p_2, q_1 \times q_2) &= \sum_{x_1} \sum_{x_2} |p_1(x_1) p_2(x_2) - q_1(x_1) q_2(x_2)|\\
    &= \sum_{x_1} \sum_{x_2} |p_1(x_1) p_2(x_2) - p_1(x_1) q_2(x_2) +  p_1(x_1) q_2(x_2) - q_1(x_1) q_2(x_2)|\\
    &= \sum_{x_1} \sum_{x_2} |p_1(x_1)(p_2(x_2) - q_2(x_2))  + q_2(x_2) (p_1(x_1) - q_1(x_1))  |\\
    &\leq \sum_{x_1} \sum_{x_2} p_1(x_1) |p_2(x_2) - q_2(x_2)| + \sum_{x_1} \sum_{x_2} q_2(x_2) |p_1(x_1) - q_1(x_1)|\\
    &=  \sum_{x_2}  |p_2(x_2) - q_2(x_2)| + \sum_{x_1}  |p_1(x_1) - q_1(x_1)|\\
    &= l_1(p_1, q_1) + l_1(p_2, q_2)
\end{align*}

This implies $$l_1(p^2, q^2) \leq 2 l_1(p, q)$$

Now use induction with similar arguments as before.


问:
Collatz Conjecture, why a rate of change of $*4$ in the following?
Following the rules of the Collatz Conjecture, in this experiment I have created a list of all odd numbers until $33333$. The list includes 3 columns, such as in the following sample:

A) Starting Odd $(X)$
B) $(X * 3) +1$
C) $X/2$ repeat until odd

1
4
2, (1)

3
10
(5)

5
16
8, 4, 2, (1)

7
22
(11)

9
28
14, (7)

11
34
(17)

I have then checked what kind of numbers in Column A) lead to a specific odd number in Column C) marked in ():

When Column C) ends in 5, We have the following numbers in Column A):

$3, 13, 53, 213, 853, 3413...$ Growing as $+10, +40, +160, +640, +2560..$ at a rate of $*4$

When Column C) ends in 7, We have the following numbers in Column A):

$9, 37, 149, 597, 2389...$ Growing as $+28, +112 , +448, +1792..$ at a rate of $*4$

When Column C) ends in 11, We have the following numbers in Column A):

$7, 29, 117, 469, 1877, 7509, 30037...$ Growing as $+22, +88 , +352, +1408, +5632, 22528 ...$ at a rate of $*4$

When Column C) ends in 13, We have the following numbers in Column A):

$17, 69, 277, 1109, 4437, 17749...$ Growing as $+52, +208 , +832, +3328, +13312 ...$ at a rate of $*4$

When Column C) ends in 17, We have the following numbers in Column A):

$11, 45, 181, 725, 2901, 11605...$ Growing as $+34, +136, +544, +2176, +8704 ...$ at a rate of $*4$

My question is:

How can the rate of change of $*4$ be explained for causing these increments to lead to the same ending numbers in column C)?

答:
I prefer always the "Syracuse"-style of notation for the analysis of the Collatz-transformation: we would write, with odd $a$ and $b$ and where the exponent $A$ follows from the value $A=v_2(3a+1)$, the following one step: $$ b= { 3a+1 \over 2^A } \qquad \qquad a,b \text{ odd,} A \in \mathbb N^+ \tag 1$$
We can go backwards:
$$ a= { 2^A b -1 \over 3 }  \tag 2$$
But this way we see, that parameter $A$ is somehow free: having chosen some odd value $b$ we can choose some value $A_j$ either from $A_j \in \{2,4,6,8,...\}$ or from  $A_j \in \{1,3,5,7,...\}$ (depending on $b$).

This gives for instance, that for $b=5$ all $a \in \{3,13,53,253,...\}$ can be found, which satisfy the eq $(1)$:
$$  5 = { 3a+1 \over 2^A } \qquad \qquad a \in \{3,13,53,...\} \text { and } A \in \{1,3,5,7,...\} \tag 3$$

We can see that there is a recursion in the set for $a$: $a_{j+1}=4 a_j+1$ and which can easily be explained by expanding $(2)$ while observing the modular requirements.

In another, but very similar way, one can find out the following table (with any $k \in \Bbb N$ and if we want, even with any $k \in \Bbb Z$) :

$$ \begin{array} {r|rl|rl|r|r|rl|rl|r|r}
 A & a_{A,k}&&  b_{A,k} && &A & a_{A,k}&&  b_{A,k} & \\ \hline
 1 & 2 k \cdot 2^1 &+3 & 2 \cdot 3 k&+5& &2 & 2 k \cdot 2^2 &+1 & 2 \cdot 3 k&+1 \\
 3 & 2 k \cdot 2^3 &+13 & 2 \cdot 3 k&+5& &4 & 2 k \cdot 2^4 &+5 & 2 \cdot 3 k&+1 \\
 5 & 2 k \cdot 2^5 &+53 & 2 \cdot 3 k&+5& &6 & 2 k \cdot 2^6 &+21 & 2 \cdot 3 k&+1 \\
 7 & 2 k \cdot 2^7 &+253 & 2 \cdot 3 k&+5& &8 & 2 k \cdot 2^8 &+85 & 2 \cdot 3 k&+1 \\
 \vdots &\vdots &\vdots &\vdots& &\vdots &\vdots &\vdots &
\end{array} \tag 4$$
and for instance, for $A=5$ , and between $a_{5,k}-a_{5,k-1}$ with $k=1,2,3,\ldots$ we find differences of $\Delta_A = 2 \cdot 2^5$ while the $b_{A,k}$ have always the differences $6k$.

Moreover, we have already seen the sequence $\{3,13,53,253,...\}$ with its recursion rule (occuring here as residuals $r_A$ of the $a_{A,k}$). They can be written as $ r_A={5 \cdot 2^A-1\over 3} $ for odd $A$. That residuals transform to $r_A \to {3r_A+1 \over 2^A} =5$ .

For the other sequence of residuals (for the even $A$) I leave it as an exercise to explicate the analoguous properties... :-)


问:
The shade equation of a slanted light projected onto a sphere.
Let $x^2+y^2+(z-1)^2=1$ be a sphere in $\Bbb R^3$. $z=0$ be as a ground. Suppose a light source is located at $(d,0,d)$ ($d>0$). As $d\to\infty$, it is assumed that the light can be view as "parallel" light. Find the equation of the shade on the ground.

I have totally no idea about this. (I'd tried use the slanted cylinder equation, or tangent plane to the spheres, but still stuck on it. )Need help!

答:
Consider the intersection of your sphere with the $XZ$-plane. This is a circle of radius $1$ tangent to the $X$ axis. The two rays of light coming from infinity under a $45$ degrees angle are tangent to that circle at the points $(\sqrt{2}/2,0,1-\sqrt{2}/2)$ and $(-\sqrt{2}/2,0,1+\sqrt{2}/2)$ (just draw a picture to convince yourself). Those two lines have direction vector $(1,0,1)$ so their equations are
$$
(x,y,z)=(\sqrt{2}/2,0,1-\sqrt{2}/2)+t(1,0,1),\quad (x,y,z)=(-\sqrt{2}/2,0,1+\sqrt{2}/2)+t(1,0,1)
$$
They intersect the $XY$ plane at $(\sqrt{2}-1,0,0)$ and $(-\sqrt{2}-1,0,0)$. Those are the endpoints of the major axis, so the center is at $(-1,0,0)$ and $a=\sqrt{2}$. Clearly, $b=1$ (no deformation in that direction). The equation of the shadow on the $XY$-plane is
$$
\frac{(x+1)^2}{2}+y^2=1
$$


问:
GPS distance calculation turns out too short
I have started hiking a few months ago and got myself a Garmin Garmap 62s a bunch of maps, a notebook, and a compass. Now I know the GPS can calculate the distance between 2 points and display it onscreen, however, a group of kids at a camp I was sleeping over asked me how to calculate the distance between 2 coordinates without using the GPS. I do simple Pythagoras a² + b² = c², but when I double-check my answer via the GPS I am always a few kilometers short. Can you please check if my calculations are right?

Point A lat = 26°12'8.7 S" Point A lon = 28°15'16.9 E"

Point B lat = 15°23'36 S" Point B lon = 28°22'58 E"

Get lat distance = 26°12'8.7" - 15°23'36" = 10°48'32.7"

Thus for lat -> 1° = 111.044km which is 10 * 111.044 = 1110.4km

Thus for lat -> 1' = 1.849km which is 48 * 1.849 = 88.752km

Thus for lat -> 1" = 30.78m which is 32.7 * 30.78 = 1.006Km

Therefore the lat distance or side a = 1110.4 + 88.752 + 1.006 which is 1200.158km

Get lon distance = 28°22'58" - 28°15'16.9" = 0°7'41.1"

Thus for lon -> 1° = 87.843km which is 0 * 87.843 = 0km

Thus for lon -> 1' = 1.463km which is 7 * 1.463 = 10.241km

Thus for lon -> 1" = 24.384m which is 24.384 * 41.1 = 1.002Km

Therefore the lon distance or side b = 0 + 10.241 + 1.002 which is 11.243km

Thus 1200.158² + 11.243² = 1440505.630

Therefore side c is the square root of 1440505.630 which is 1200km

Now my answer is 1200km but Google Earth says it is 1197km

答:
Pythagoras theorem doesn't hold for a sphere. To compute distances on Earth's surface, you can use the Haversine formula. Or to get an even more precise result the Vincenty's formulae.

You get the following results based on those two formulas:

```<code>Haversine:  1201.99
Vincenty:   1196.82
</code>```

Vincenty's formulae are very close to what Google Earth provides as a distance.

I used following Python code to perform the computations:

```<code>from math import radians, cos, sin, asin, sqrt

from dms2dec.dms_convert import dms2dec
from vincenty import vincenty

def haversine(lon1, lat1, lon2, lat2):
    """
    Calculate the great circle distance between two points
    on the earth (specified in decimal degrees)
    """
    # convert decimal degrees to radians
    lon1, lat1, lon2, lat2 = map(radians, [lon1, lat1, lon2, lat2])

    # haversine formula
    dlon = lon2 - lon1
    dlat = lat2 - lat1
    a = sin(dlat / 2) ** 2 + cos(lat1) * cos(lat2) * sin(dlon / 2) ** 2
    c = 2 * asin(sqrt(a))
    r = 6371  # Radius of earth in kilometers. Use 3956 for miles
    return c * r

def main():
    lon1, lat1, lon2, lat2 = map(dms2dec,
                                 ['''28°15'16.9"E''',
                                  '''26°12'8.7"S''',
                                  '''28°22'58"E''',
                                  '''15°23'36"S'''])
    print(f"Haversine: {haversine(lon1, lat1, lon2, lat2): .02f}")
    print(f"Vincenty:  {vincenty((lat1, lon1), (lat2, lon2)): .02f}")

if __name__ == '__main__':
    main()
</code>```

Body:
Pythagoras theorem doesn't hold for a sphere. To compute distances on Earth's surface, you can use the Haversine formula. Or to get an even more precise result the Vincenty's formulae.

You get the following results based on those two formulas:

Haversine:  1201.99
Vincenty:   1196.82

Vincenty's formulae are very close to what Google Earth provides as a distance.

I used following Python code to perform the computations:

from math import radians, cos, sin, asin, sqrt

from dms2dec.dms_convert import dms2dec
from vincenty import vincenty

def haversine(lon1, lat1, lon2, lat2):
    """
    Calculate the great circle distance between two points
    on the earth (specified in decimal degrees)
    """
    # convert decimal degrees to radians
    lon1, lat1, lon2, lat2 = map(radians, [lon1, lat1, lon2, lat2])

    # haversine formula
    dlon = lon2 - lon1
    dlat = lat2 - lat1
    a = sin(dlat / 2) ** 2 + cos(lat1) * cos(lat2) * sin(dlon / 2) ** 2
    c = 2 * asin(sqrt(a))
    r = 6371  # Radius of earth in kilometers. Use 3956 for miles
    return c * r

def main():
    lon1, lat1, lon2, lat2 = map(dms2dec,
                                 ['''28°15'16.9"E''',
                                  '''26°12'8.7"S''',
                                  '''28°22'58"E''',
                                  '''15°23'36"S'''])
    print(f"Haversine: {haversine(lon1, lat1, lon2, lat2): .02f}")
    print(f"Vincenty:  {vincenty((lat1, lon1), (lat2, lon2)): .02f}")

if __name__ == '__main__':
    main()


问:
Help me solve this recurrence relation
I'm trying to solve the recurrence relation

$$a_n = (\lambda +\mu)a_{n+2}+\mu a_{n+3}.$$

with initial relationships of:

$\lambda a_1 = \mu a_2$

$(\lambda +\mu)a_2 = \mu a_3.$

I found a site online which suggests using the roots of a, in this case, cubic polynomial to solve it, but the roots are of course really complex and since I don't know what $\lambda$ and $\mu$ are they don't simplify very much.  Is there another way to go about this?  Thanks.

答:
For completeness, add $a_0$. Setting up the recurrence for $n = 0$ gives:
$$
\begin{align*}
\mu a_3 + (\lambda + \mu) a_2 &= a_0 \\
2 (\lambda + \mu) a_2 &= a_0 \\
\end{align*}
$$
This gives enough to get the recurrence going:
$$
\begin{align*}
a_1 &= \frac{a_2}{\lambda} = \frac{a_0}{2 \lambda (\lambda + \mu)} \\
a_2 &= \frac{a_0}{2 (\lambda + \mu)}
\end{align*}
$$
Whatever you do, the result will be the same, unless you change the constants to simplify the recurrence. Use Wilf's "generatingfunctionology" techniques. Define $A(z) = \sum_{n \ge 0} a_n z^n$. From the recurrence:
$$
\mu \frac{A(z) - a_0 - a_1 z - a_2 z^2}{z^3}
  + (\lambda + \mu) \frac{A(z) - a_0 - a_1 z}{z^2} = A(z)
$$
Solving for $A(z)$ gives a rather horrible expression:
$$
A(z) = \frac{a_0}{2 \lambda (\lambda + \mu)}
           \frac{2 \lambda^2 \mu + 2 \lambda \mu^2
                   + (2 \lambda^3 + 4 \lambda^2 \mu + 2 \lambda \mu^2
                        + \lambda \mu + \mu) z
                   + (\lambda + \mu) z^2}
                {\mu + (\lambda + \mu) z - z^3}
$$</p>

Title: Help me solve this recurrence relation


答:
The result is related to the Stirling number of the second kind:
$$
n!{3 \brace n}.
$$
Particularly for $n>3$ all values are $0$.

Title: Simplify $\sum_{i=0}^n(-1)^i { n \choose i } (n - i)^3$

Body:
How can we simplify $\sum_{i=0}^n(-1)^i { n \choose i } (n - i)^3$?

I started computing the first values to figure the pattern:

$\sum_{i=0}^0(-1)^i { 0 \choose i } (0 - i)^3 = 0$

$\sum_{i=0}^1(-1)^i { 1 \choose i } (1 - i)^3 = 1 + 0 = 1$

$\sum_{i=0}^2(-1)^i { 2 \choose i } (2 - i)^3 = 2^3 - 2 + 0 = 6$

$\sum_{i=0}^3(-1)^i { 3 \choose i } (3 - i)^3 = 3^3 -3 \cdot 2^3+3-0 = 6 $

The results don't lead to a pattern and so I thought I must be missing something.

I know that $\sum_{i=0}^n(-1)^i { n \choose i } = 0$ but this also doesn't help.

How to go forth here to solve this (finding a form without the $\Sigma$)?


问:
Polynomials - rational root - divisibility
This is a simple (almost obvious) question but I somehow cannot find an elementary solution yet.

$$f(x) = a_0x^n + a_1x^{n-1} + ... + a_{n-1}x + a_n$$

is a polynomial with integer coefficients.

$$\frac{p}{q}$$ is a rational root of $f(x)$,

where $p,q$ are whole numbers and $(p,q) = 1$

Prove that $(p-mq)$ | $f(m)$ for every whole number $m$

Assume the solution has to be explained to someone in 7th or 8th grade

i.e. one who doesn't know much about any complicated theory of polynomials.

E.g. I know that $f(x)$ can be written as $$a_0\left(x-\frac{p}{q}\right)R(x)$$

where $R(x)$ is a polynomial but can I claim $R(x)$ has integer

coefficients. If I can, then the desired statement follows easily, it seems.

But why can I claim this?

Note: you can assume I (or the student to whom I must explain this)

know that $p/a_n$ and $q/a_0$, this was proved already.

At some point I thought of using induction (on $m$) but that

seems somewhat complicated and I don't know if it will work at all.

答: Suppose $R = x^{n-1} + \dots + b_{1}x + b_{0}$, then $$ f = a_0 \left(x - \frac{p}{q} \right) R = a_0 x^n + \left(a_0 b_{n-2} - a_0 \frac{p}{q} \right) x^{n-1} + \left(a_0 b_{n-3} - \frac{p}{q} \right) x^{n-2} + \dots + \left(-a_0 b_0 \frac{p}{q} \right).$$ So $a_0 b_{n-k} - a_0 \frac{p}{q} \in \mathbb{Z}$. Thus, the $a_0 b_{n-k} \in \frac{1}{q} \mathbb{Z}$. On the other hand, $\operatorname{gcd}(q,p-mq) = 1$, so since $a_0 R \in \frac{1}{q} \mathbb{Z}[x]$, your desired result follows.


Body:
First note that, for $n\ge 3$,
$${ n \choose i }i(i-1)(i-2)=n(n-1)(n-2){ n-3 \choose i-3 }.$$

So, for $n\ge 4$,
$$\sum_{i=0}^n(-1)^i { n \choose i } i(i-1)(i-2)=-n(n-1)(n-2)\sum_{j=0}^{n-3}(-1)^j { {n-3} \choose{j} }=0.$$
Similarly
$$\sum_{i=0}^n(-1)^i { n \choose i } i(i-1)=\sum_{i=0}^n(-1)^i { n \choose i } i=\sum_{i=0}^n(-1)^i { n \choose i }=0.$$
Therefore, by expanding $(n-i)^3$,
$$\sum_{i=0}^n(-1)^i { n \choose i } (n-i)^3=0.$$


问:
BL and CM are medians of a triangle ABC right angled at A. Prove that $ 4(BL^2 +CM^2 )=5BC^2 $
BL and CM are medians of a triangle ABC right angled at A. Prove that $ 4(BL^2  +CM^2  )=5BC^2 $

My attempt: I have found out till $ 4BL^2 =4AB^2  +(AC)^2 $. I am not getting how to move forward. Any help will be appreciated.

Any help will be appreciated.

答:
Both $BL$ and $CM$ are medians, so use Apollonius's Theorem twice.
$$2AB^2+2BC^2=4BL^2+AC^2$$
$$2BC^2+2AC^2=4CM^2+AB^2$$
Add the two equations and use the fact that (from Pyhtagorean Theorem),
$$AB^2+AC^2=BC^2$$
to finally show that,
$$4(BL^2  +CM^2  )=5BC^2.$$


问:
Formula for conditional variance for continuous random variable.
I need to expand the conditional variance of continuous random variable as a sum of integrals. Here is my try:

$$D(Y|X)=E[Y^2|X] - [E(Y|X)]^2 + EY = \int_y y^2f(x|y)dy -\left(\int_y yf(x|y)\right)^2dy $$
But I know that the second term is incorrect / could be rewritten otherwise. Maybe somoene has an insight?

答:
Your formula of conditional variance is wrong...the correct one is the following

$$\mathbb{V}[Y|X=x]=\mathbb{E}[Y^2|X=x]-\mathbb{E}^2[Y|X=x]=$$

$$=\int_{-\infty}^{+\infty}y^2f_{Y|X}(y|x)dy-\left[\int_{-\infty}^{+\infty}yf_{Y|X}(y|x)dy \right]^2$$

There is nothing else to expand...


问:
probability of exactly two out of three events occuring
Given that we have three disjoint events, a,b,c and their probabilities are given as P(A), P(B), P(A ∪ B) etc, how can we find the probability of only two by three events occurring at one point?</p>

答:
Your answer has assumed that $A,B$ and $C$ are independent.

A more general formula would be
$$p(A\cap B)+p(B\cap C)+p(C\cap B)-3p(A\cap B\cap C).$$

EXAMPLE

Consider throwing a die. Let $A$ be the event of getting a $6$, $B$ the event of getting a $5$ and $C$ the event of getting at least $5$.

The the probability of precisely two events occurring is $\frac{1}{3}$ whereas your formula gives $\frac{1}{9}$.


问:
Grassmanian : arithmetic proof for its cardinality?
Let $p$ be a prime and $n$ an integer greater that 1.

It is well known that :

$$\text{card}\left(GL_n(\mathbb{F}_p)\right)=\prod_{k=0}^{n-1}\left(p^n-p^k\right)$$

Since the n-th symmetric group $\mathfrak{S}_n$ can be seen as a subgroup of $GL_n(\mathbb{F}_p)$ (because every permutation matrix is invertible), we can deduce from Lagrange theorem that :

$$n!\mid\prod_{k=0}^{n-1}\left(p^n-p^k\right)$$

I am looking for some direct proof of this result, using only arithmetical arguments (divisibility, congruences, Gauss theorem, Bezout identity ...).

答:
Let $q \leq n$ be a prime number. What is the $q$-adic valuation of $P=\prod_{k=0}^{n-1}{p^n-p^k}$?

If $q \neq p$, then let $1 \leq \omega < n$ be the multiplicative order of $p$ mod $q$. Then the $q$-adic valuation of $P$ is the sum of the $q$-adic valuations of the $N_t=p^n-p^{n-t\omega}$ for $0 < t\omega \leq n$. But the $q$-adic valuation of $N_t$ is that of $p^{t\omega-1}$, which is (LTE lemma) the $q$-adic valuation of $t$ plus that of $p^{\omega}-1$.

In other words $v_q(N_t)=v_q(t)+v_q(p^{\omega}-1)$.

Let $\Omega$ be the integer part of $N/\omega$.

So $v_q(P)=\sum_{1 \leq t \leq \Omega}(v_q(t))+\Omega v_q(p^{\omega}-1)=\Omega v_q(p^{\omega}-1)+v_q(\Omega!)$.

If $\Omega \geq q$, then $v_q(P) \geq \Omega+1 \geq \frac{n}{\omega} \geq \frac{n}{q-1}\geq v_q(n!)$ by Legendre’s formula.

If not, then $q+1 > \frac{n}{\omega} \geq \frac{n}{q-1}$ so $n < q^2$ and by Legendre’s formula $v_q(n!)$ is the integer part of $n/q$, which is lower than or equal to $\Omega \leq v_q(P)$.

Finally, $v_p(P) \geq v_p(p^n-p^{n-1}) \geq n-1 \geq v_p(n!)$. So for any prime divisor $q$ of $n!$, $v_q(n!) \leq v_q(P)$, so $n!|P$.


问:
Showing a set is Borel and a function is Borel measurable.
I am stuck in the following question:

Suppose $f: B \rightarrow \mathbb{R}$ be a Borel measurable function. Let $g(x)=\begin{cases}
 f(x), & \text{if } x \in B,\\
 0,    & \text{if } x \in B^c
\end{cases}$.

I would like to first show that $B$ is a Borel set and that the function $g$ is Borel measurable. I know the required definitions, but I can't figure out how to put things together to solve this. Would someone please help?

答:
Well the definition of a Borel measurable function is that the preimages of Borel sets are Borel. $\mathbb{R}$ is a very Borelly Borel set, so $f^{-1}(\mathbb{R}) = B$ is Borel as well. Simple as that!

Again to show that $g$ is Borel you need to show that $g^{-1}(A)$ is Borel for every Borel $A \subseteq \mathbb{R}$. But notice we may divide this into two cases: if $0 \in A$, then $g^{-1}(A) = B^{c} \cup f^{-1}(A)$. Both of these are Borel since, again $f$ is Borel measurable and $B^{c}$ is Borel as $B$ is (sigma algebras are closed under complements). And otherwise if $0 \not \in A$, then $g^{-1}(A) = f^{-1}(A)$ which is again Borel as $f$ is Borel measurable. Thus the $g$ preimages of borel sets are Borel, meaning $g$ is Borel.


问:
Ties in Matching Pennies
Players A and B match pennies N times. They keep a tally of their gains and losses. After the first toss, what is the chance that at no time during the game will they be even?

I have seen a solution for this problem summing a series of choose functions for an expectation, but I wanted to solve it with a simple random walk in one dimension.

my logic is thus; suppose a random walk in 1 dimension. half chance for a step to the left or to the right. and one coin toss has gone (say A) so suppose we start at position 1 and go right for A and left for B, how likely is it we reach 0 in N steps or less.

So call $p_N$ the probability for doing it in N steps. Then it seems to me we have $$p_N = \frac{1}{2} + \frac{1}{2}p_{N-2}\frac{1}{2}= \frac{1}{2} + \frac{1}{4}p_{N-2}$$
since if he goes right on the first step he has N-2 steps or less to get back to 1 and then a half chance of hitting 0.

Solving the recurrence on noticing that $p_2$ = $\frac{1}{2}$ gives $$ p_{2n} = p_{2n+1} = \frac{1 + 4 + 4^2 ... + 4^{n-1}}{4^{n-1}.2}$$

Now this agrees with the correct answer for the first couple of cases but then slowly differs as N gets bigger.

Could someone please explain my mistake and perhaps give a correct solution to this problem using random walks?

答:
I don’t see a random walk solution of the very simple kind that you had in mind, but there’s a walk-counting solution that’s not too bad.

Suppose that a walk starts to the right and first returns to $0$ in $2n$ steps. Represent it as a sequence of R’s and L’s, for Right and Left steps; it must be of the form LWR, where W is a Dyck word of length $2(n-1)$, and every Dyck word of length $2(n-1)$ gives rise to such a walk. It’s well known that there are $C_{n-1}$ Dyck words of length $2(n-1)$, where $C_k$ is the $k$-th Catalan number, and that

$$C_k=\frac1{k+1}\binom{2k}k\;,$$

so that

$$C_{n-1}=\frac1n\binom{2n-2}{n-1}=\frac1n\binom{2n-2}{n-1}\cdot\frac{2n(2n-1)}{2n(2n-1)}=\frac1{2(2n-1)}\binom{2n}n\;.$$

There are the same number of walks that start to the left and first return to $0$ in $2n$ steps. Thus, the probability of a first return to $0$ in $2n$ steps is

$$\frac{2C_{n-1}}{2^{2n}}=\frac1{(2n-1)2^{2n}}\binom{2n}n\;.$$

Title: Ties in Matching Pennies


问:
If $A$ is a matrix with rank($A$)=1,then the minimal polynomial of $A$ is of degree $2$.

If  $n \ge 2$ and if  $A$ is a matrix with rank($A$)=1,then the minimal polynomial of $A$ is of degree $2$.

So, we see that $rank (A) =1$.So, nullity of $A \ge 1$.Now we try to find the range space of $A$.If $y \in R(A)$ then $A(x)=y$.

We see that null space  of $A$ is being spanned by $n-1$ linearly independent vectors. We can extend this to a basis of $\mathbb{R}^n$.Let $x_1,...,x_n$ be the basis where $x_1,..,x_{n-1} \in ker(A)$.We see that $x_n$ must not be in ker($A$) otherwise $A$ is the zero matrix so that $A=0$.

Let $x_n$ be the vector which spans the range space Of $A$ such that $A(\sum(c_ix_i))=x_n$ where $1 \le i \le n$.So from here we can conclude that $0,(c_n)^{-1}$ are the only eigenvalues values. Hence the minimal polynomial becomes $x(x-(c_n)^{-1})$ .

答:
There are many problems with the way your solution is written. You start with $n - 1$ linearly independent vectors $x_1, \dots, x_{n-1}$ which span the null space of $A$ and say that you extend them to a basis $x_1, \dots, x_{n}$ of $\mathbb{F}^n$. A priori, if this extension is performed arbitrary there is no reason that $x_n$ will span the range of $A$. You need to argue that if you pick a non-zero element $x_n$ of the range space of $A$, then $x_1, \dots, x_n$ will be linearly independent and so will form a basis of $\mathbb{F}^n$. Then $Ax_1 = \dots = Ax_{n-1} = 0$ while $Ax_n = cx_n$ for some $c \in \mathbb{F}$ (because the range space is one-dimesional). This shows that $0$ and $c$ are the only eigenvalues of $A$ and since $0$ has an $n-1$ dimensional eigenspace and $c$ has a one-dimensional eigenspace, this means that those are the only eigenvalues and so the characteristic polynomial of $A$ is $x^{n-1}(x - c)$.

Finally, you somehow "deduce" from the fact that there are only two eigenvalues that the minimal polynomial is $x(x-c)$ but you need to justify this. The minimal polynomial divides the characteristic polynomial but a priori it can be $x^2(x-c)$ or $x - c$ and so on. Why is it precisely $x(x-c)$? One way is to say that $A$ is diagonalizable and so the minimal polynomial is the product of the linear factors which are associated to the distinct eigenvalues.


答:
$B$ is a borel set because we may take $f^{-1}(\mathbb{R})=B$.

As for $g$, we see that $g^{-1}(0)$ is the complement of $B$ which must be a borel set since our borel sigma algebra is closed under complement. $g$ behaves as $f$ otherwise which implies it is borel measurable.

Title: Showing a set is Borel and a function is Borel measurable.

Body:
I am stuck in the following question:

Suppose $f: B \rightarrow \mathbb{R}$ be a Borel measurable function. Let $g(x)=\begin{cases}
 f(x), & \text{if } x \in B,\\
 0,    & \text{if } x \in B^c
\end{cases}$.

I would like to first show that $B$ is a Borel set and that the function $g$ is Borel measurable. I know the required definitions, but I can't figure out how to put things together to solve this. Would someone please help?


问:
Calculating the volume of a region in $\mathbb{R}^3$
We are interested in the volume of the bounded region above $z  = \sqrt{3x^2 + 3y^2}$ inside $x^2+y^2+z^2=9$. To Find the volume, we need to calculate this:

$$ \iint_{x^2+y^2=3} \sqrt{9-x^2-y^2} - 3\sqrt{x^2+y^2}dxdy. $$

Switching to polar coordinates yields:
$$\int_{\theta=0}^{2\pi}\int_{r=0}^3 (\sqrt{9-r^2} - 3r)rdrd\theta=2\pi[-\frac{1}{3}(9-r^2)^{3/2}-r^3]_0^3 = -36\pi.$$

But I guess my answer doesn't make sense since a volume above the $z$ axis has to be positive. Also the solution manual says the answer is $9\pi (2-\sqrt{3})$ which makes more sense. (At least it's positive ;) )

答: Note that$$\sqrt{3x^2+3y^2}=\sqrt3\sqrt{x^2+y^2}.$$Furthermore, you have $\sqrt3r\leqslant\sqrt{9-r^2}$ when and only when $r\leqslant\frac32$. So, the volume is\begin{align}\int_0^{2\pi}\int_0^{3/2}\left(\sqrt{9-r^2}-\sqrt3r\right)r\,\mathrm dr\,\mathrm d\theta&=2\pi\left[-\frac{r^3}{\sqrt{3}}-\frac13\left(9-r^2\right)^{3/2}\right]_{r=0}^{r=3/2}\\&=9\left(2-\sqrt3\right)\pi.\end{align}


问:
Understanding the proof that regular second countable space is normal

10.3.30 Lemma. Every regular second countable space $(X,\tau)$ is normal.

Proof. Let $A$ and $B$ be disjoint closed subsets of $(X,\tau)$ and $\mathcal{B}$ a countable basis for $\tau$. As $(X,\tau)$ is regular and $X\setminus B$ is an open set, for each $a\in A$ there exists a $V_a\in\mathcal{B}$ such that $\overline{V}_a\subseteq X\setminus B$.

As $\mathcal{B}$ is countable we can list the members $\{V_a:\ a\in A\}$ so obtained by $V_i$, $i\in\mathbb{N}$; that is, $A\subseteq\bigcup_{i=1}^\infty V_i$ and $\overline{V}_i\cap B=\varnothing$, for all $i\in\mathbb{N}$.

Similarly we can find sets $U_i$ in $\mathcal{B}$, $i\in\mathbb{N}$, such that $B\subseteq\bigcup_{i=1}^\infty U_i$ and $\overline{U}_i\cap A=\varnothing$, for all $i\in\mathbb{N}$.

Now define $U_1'=U_1\setminus\overline{V}_1$ and $V_1'=V_1\setminus\overline{U}_1$.

So $U_1'\cap V_1'=\varnothing$, $U_1'\in\tau$, $V_1'\in\tau$, $U_1'\cap B=U_1\cap B$, and $V_1'\cap A=V_1\cap A$.

Then we inductively define
$$\overline{U}_n'=U_n\setminus\bigcup_{i=1}^n\overline{V}_i,\ \text{and}\ V_n'=V_n\setminus\bigcup_{i=1}^n\overline{U}_i.$$
So that $U_n'\in\tau$, $V_n'\in\tau$, $U_n'\cap B=U_n\cap B$, and $V_n'\cap A=V_n\cap A$.

Now put $U=\bigcup_{n=1}^\infty U_n'$ and $V=\bigcup_{n=1}^\infty V_n'$.

Then $U\cap V=\varnothing$, $U\in\tau$, $V\in\tau$, $A\subseteq V$, and $B\subseteq U$.

Hence $(X,\tau)$ is a normal space. $\qquad\square$

I am trying to understand this proof. The first half was fine until we got to the part:
"Now define $U_{i}^{'}=U_i\backslash\overline{V_i}$". What is the purpose of this? How do we know each $U_{i}^{'}$ is still open after removing certain elements?

Edit: I have made some progress. Now I am stuck on the last paragraph starting with "Then we inductively define...."

Edit2 : There has got to be a typo right? There is no reason why we are defining the closure of $U'$ and only defining $V'$

答:
First of all: if $O$ is open and $C$ is closed, then $U\setminus C = U \cap (X\setminus C)$ is open as the intersection of two open sets. So that is why $U'_1$ and $V'_1$ are open, as differences of open and closed sets, and the same holds for the "inductively" defined $U'_n$ and $V'_n$: there the subtracted set is a finite union of closures of sets, so a finite  union of closed sets and hence closed. So again $$U'_n = U_n \setminus \bigcup_{i=1}^n \overline{V_i}$$ is the difference between an open set and a closed set.

The $\overline{U'_n}$ in (definition in) the text is a typo, we are just defining the open set $U'_n$, which is a "thinning down" of $U_n$. Also it's not an inductive definition at all because we define it directly from the $U_i$ and $V_i$ we already have after the first step; we don't use $U'_{n-1}$ to define $U'_n$, which would have made it a recursive definition in my preferred terminology (not inductive, which is a proof technique, in my book).

It's not too hard to reason directly why $U$ and $V$ as defined are as required:

Suppose that $x \in U \cap V$. So $x$ is in some $U'_i$ for $i \in \Bbb N$. Also $x \in V'_j$ for some $j \in \Bbb N$.
Say that $i \le j$ (the other case is similar). Then $x \in U_i$ (definition of $U'_i$), so also in $\overline{U_i}$ and $x \in V_j$ and $x \notin \overline{U_i}$ because $i \le j$ so $\overline{U_i} \subseteq \bigcup_{i=1}^j \overline{U_i}$, the set we subtract from $V_j$ to define $V'_j$. This is a contradiction and we get another contradiction if we assume $j \ge i$ (check this, it's a symmetrical argument!). So $U \cap V = \emptyset$.

To see that $B \subseteq U$ we note that the $U_i, i \in \Bbb N$ form an open cover of $B$: if $x \in B$ for some $i$ we have $x \in U_i$ (it's named as some $U_x$ first but then "renumbered"), so fix $m$ such that $x \in U_m$. Also by construction we have that all $\overline{V_i} \cap B  =\emptyset$ whatever $i$ is. Hence $x \in U_m$, and $x \notin \bigcup_{i=i}^m \overline{V_i}$ so by definition $x \in U'_m \subseteq U$.

That $A \subseteq V$ is entirely a symmetric argument again. We don't really need all the equations claimed in the proof. Presonally I would have started defining $U_i$ around $A$ and then $V_i$ around $B$, but that's a free choice. We repeatedly apply regularity for $a \in A$ and $B$ and thin out using the countable base, and then vice versa for $b \in B$ and $A$ and then refine the sets to make them disjoint in the union.

It's an instructive proof in how we can strengthen separation axioms by more global axioms like having a countable base. We cannot go fom Hausdorff to regular here, BTW. The standard example of a a Hausdorff non-regular space (that Morris also gives in an example/exercise) is second countable too. We can add paracompactness (introduced later, maybe) or compactness to be able to go from Hausdorff to normal.


问:
Probability AND/OR
Suppose we have a bag of $10$ balls, and each ball is a unique colour.

If we randomly select $3$ balls from this bag, without replacement, I want to find out the chances of correctly guessing the colour of all $3$ balls (if we have chosen $3$ colours beforehand).

I have come down to two possible equations:

Work out the chances of not correctly guessing any ball and negate it:

$9/10 * 8/9 * 9/8 = 0.7$, where the complement is $0.3$

The chances of correctly guessing all balls:

$1/10 + 1/9 + 1/8 = 0.3361$

Firstly:

If these are both correct, which one is more accurate?

Secondly:

Is there a better way of calculating this?

I have a feeling I'm going about the whole thing in the wrong way, but I'm not too sure how I can check to be sure I'm heading in the right direction.

答:
Suppose that we want to pick balls of colors red, white and black. The chances we will pick them are $\frac{1}{10} \frac{1}{9} \frac{1}{8}$.

Calculating the required probability by negation is a little more involved because you have to consider the situations that involve getting none of the desired colors, getting one red but no white or black, getting one white but no red or black etc.

Title: Probability AND/OR


问:
Let $\{E_n\}_{n\in\mathbb{N}}$ measurable sets in $[0,1]$ s.t. $\mu(E_n)\ge 1 - \frac{1}{3^n}$, $\Rightarrow \bigcap_{n=1}^\infty E_n \neq \emptyset$
Let $\{E_n\}_{n\in\mathbb{N}}$ a sequence of measurable sets in $[0,1]$ s.t. $\mu(E_n)\ge 1 - \frac{1}{3^n}\,\,$, show that $\bigcap_{n=1}^\infty E_n \neq \emptyset$

Now, we can equivalently prove that $\mu(\bigcap_{n=1}^\infty E_n) \neq 0$. I can see why this happens, since $1 - \frac{1}{3^n}$ is monotonically increasing and $\mu([0,1])=1$, but I could not set up a proper proof:

I can observe that $\bigcap_{n=1}^k E_n = [0,1] \setminus\bigcup_{n=1}^k E_n$, hence $$\mu(\bigcap_{n=1}^\infty E_n) = \mu([0,1] \setminus\bigcup_{n=1}^k E_n) = 1-\sum_{n=1}^k \mu(E_n) \le 1 - \sum_{n=1}^k (1 - \frac{1}{3^n})= 1-k-\frac{1}{2}(3^{-k}-1)$$
but it doesn’t lead to anything, any suggestion?

答:
We have
$$[0,1]\setminus \bigcap_{n=1}^{\infty} E_n = \bigcup_{n=1}^{\infty} ([0,1]\setminus E_n)$$
so
$$1 - \mu(\bigcap_{n=1}^{\infty} E_n) = \mu([0,1]\setminus \bigcap_{n=1}^{\infty} E_n) \leq \sum_{n=1}^{\infty} \mu([0,1]\setminus E_n) \leq \sum_{n=1}^{\infty} \frac{1}{3^n} < 1$$
and $\mu(\bigcap_{n=1}^{\infty} E_n) > 0$.


问:
Prove $\int_0^\infty\frac{\ln x}{x^3-1}\mathrm{d}x=\frac{4\pi^2}{27}$
Proof of the integral
$$\int_0^\infty\frac{\ln x}{x^3-1}\mathrm{d}x=\frac{4\pi^2}{27}$$
I try to substitute $u = \ln x$. Then $x = e^u,\>\mathrm{d}x = e^u\mathrm{d}u$ and the limits $(0,\infty)\to (-\infty,\infty)$.
The integral becomes $$\int_{-\infty}^\infty \frac{ue^u}{e^{3u}-1}\mathrm{d}u.$$

答:
I will present two methods to evaluate this integral.

Method 1:-

Consider the integral $$I(m,n)=\int_{0}^{\infty}\frac{x^{m-1}}{x^{n}-1}dx=\frac{-\pi}{n}\cot\frac{m\pi}{n}$$  where $m<n$

Differentiate both sides w.r.t  $m$

$$I^{'}(m,n)=\int_{0}^{\infty}\frac{x^{m-1}\ln(x)}{x^{n}-1}dx= \frac{\pi^2}{n^2}\csc^{2}\frac{m\pi}{n}$$

Let $m=1$ and $n=3$ , we obtain our required integral as $\frac{4\pi^2}{27}$

Method 2:-

Let $$J_{k,a}=\int_{0}^{\infty}\frac{\ln^{k-1}(z)}{z^{a}-(-1)^k}dz$$  where $k\in N$ and
$a>1$

$$J_{k,a}=\int_{0}^{1}\frac{\ln^{k-1}(z)}{z^{a}-(-1)^k}dz +\int_{1}^{\infty}\frac{\ln^{k-1}(z)}{z^{a}-(-1)^k}dz$$

Let $k=\frac{1}{u}$ in second integral

$$J_{k,a}=\int_{0}^{1}\frac{\ln^{k-1}(z)}{z^{a}-(-1)^k}dz +\int_{0}^{1}\frac{\ln^{k-1}(u)}{u^{-a}-(-1)^k}\frac{1}{u^2}du$$

Using Geometric series and Changing order of Integration and Summation (by Monotone convergence theorem) and after applying repeated integration by parts we get,

$$J_{k,a}=(k-1)!\sum_{n=0}^{\infty}\frac{(-1)^{nk}}{(an+1)^k} + (k-1)!\sum_{n=1}^{\infty}\frac{(-1)^{nk}}{(1-an)^k}$$

$$J_{k,a}=(k-1)!\sum_{n=0}^{\infty}\frac{(-1)^{nk}}{(an+1)^k} + (k-1)!\sum_{n= -\infty}^{-1}\frac{(-1)^{nk}}{(an+1)^k}$$

$$J_{k,a}=(k-1)!\sum_{n= -\infty}^{\infty}\frac{(-1)^{nk}}{(an+1)^k}$$

Required integral is $J_{2,3}$

$$J_{2,3}=\sum_{n= -\infty}^{\infty} \frac{1}{(3n+1)^2}$$

Using $$\sum_{n= -\infty}^{\infty} \frac{1}{(an+1)^2}=\frac{\pi^2}{a^2}\csc^{2}\frac{\pi}{a}$$

Therefore $J_{2,3}=\frac{4\pi^2}{27}$


问:
Proof problem, 5 people in a square room, prove that at most they are 4√2 ft away from each other
"There are 5 people are in a square room that has dimensions of 8ft by 8ft.  Assume that these people are just points.  Prove that among these people, there is a pair that is standing at most 4√2 ft away from each other."

I don't understand how to prove this. Wouldn't a pair be standing at 8√2 from each other? Given if 2 people were in the corners?

Or, if say I put 2 people in the top left and bottom left corner, and the other 3 people on the far right, the pair in the corners would still be 8ft from each other?

Wouldn't this only work if 4 people were in the corners and one in the middle?

答:
Divide the square into four subsquares(connect the middle points of the sides of the big square) then by the pigeonhole principle(4 small squares 5 people) there is one square that contains two people. But now the biggest distance they can be away from each other is clearly the length of the diagonal of the smaller square which is $\frac{8}{2}\sqrt{2}$ as desired.

You only need to prove that there are 2 people at most this distance away from each other, the statement clearly does not hold for all pairs of people as your example with the two points in the corners of the big square shows.


问:
Convergence of an infinite trig series, preferablay not using approximations
Consider the trig series
$$ I = \sum_1^{\infty} \sin(\frac{2}{n})-2\sin(\frac{1}{n}).$$
By Taylor series approximation near $0$ one has
$$\sin x \approx x-x^3/3!$$ so that $$I \approx -\sum x^3 $$ which, for $x:= 1/n$ immediately implies the convergence of the series (p-series comparison).

Now I'm not perfectly comfortable with "approximation" techniques. The question is, is there another way of verifying this convergence, without resorting to Taylor series approximation? A more "exact" approach, as apposed to "approximation"?

Much obliged.

答:
$|\sin (\frac 2 n) -2 \sin (\frac  1n)|=|2 \sin (\frac  1n)  \cos (\frac  1n)-2 \sin (\frac  1n)|\leq 2[1-\cos (\frac  1n)]\leq (\frac 1 n)^{2}$ so the series is absolutely convergent.

I have used the inequality $1-\cos x \leq \frac {x^{2}} 2$ valid for all $x$.


答:
You have found $4BL^2 = 4AB^2 + AC^2$. Similarly we would have $4CM^2 = 4AC^2 + AB^2$.

Adding them together, we have:

$$4(BL^2 + CM^2) = 4AB^2 + AC^2 + 4AC^2 + AB^2 = 5(AB^2 + AC^2) = 5BC^2$$

The final equality is due to another application of the Pythagorean Theorem.

Body:
BL and CM are medians of a triangle ABC right angled at A. Prove that $ 4(BL^2  +CM^2  )=5BC^2 $

My attempt: I have found out till $ 4BL^2 =4AB^2  +(AC)^2 $. I am not getting how to move forward. Any help will be appreciated.

Any help will be appreciated.


问:
Trying to show that $\ln(x) = \lim_{n\to\infty} n(x^{1/n} -1)$
How do I show that $\ln(x) = \lim_{n\to\infty} n (x^{1/n} - 1)$?

I ran into this identity on this stackoverflow question. I haven't been able to find any proof online and my efforts to get from $\ln(x) := \int_1^x \frac{\mathrm dt}t$ to that limit have been a failure.

答:
Here is a way to do it with easy integration like you intended to do it. Let $f_n: [a, \infty) \to \mathbb{R}, f_n(t)=t^{-1+\frac{1}{n}}$, with abitrary $a>0$. Because $(f_n)$ converges uniformly $\to t^{-1}$, we can use $$\lim_{n \to \infty} \int_{1}^x  f_n (t) dt= \int_{1}^x \lim_{n \to \infty} f_n (t) dt\quad \forall x\in [a, \infty).$$
$$ \iff \lim_{n \to \infty} \int_{1}^x t^{\frac{1}{n}-1} dt=\int_{1}^x \frac{1}{t} dt$$
$$ \iff \lim_{n \to \infty} n(x^{1/n}-1)=\ln{x}\quad \forall x \in [a, \infty).$$
Since $a$ was abitrary $\implies \forall x \in (0, \infty)$.


答:
How about this solution?

We will use induction on $n$ (the degree of $f$)

for the statement we are trying to prove which is

$(p-mq)$ | $f(m)$ for every whole number $m$

The base case $n=1$ is very easy. So let's assume we have this already.

We know that $q\ |\ a_0 \tag{1}$

So let's denote $a_0 = q \cdot c_0 \tag{2}$

Note that $c_0$ is a whole number (as are all $a_i$).

OK... then we get:

$$f(x) = a_0x^n + a_1x^{n-1} + ... + a_{n-1}x + a_n = $$

$$ = c_0 q x^n + a_1x^{n-1} + ... + a_{n-1}x + a_n = $$

$$ = (xq - p) c_0 x^{n-1} + (a_1 + pc_0)x^{n-1} + a_2 x^{n-2} + ... + a_{n-1} x + a_n \tag{3}$$

Now we know that $p/q$ is a root of $f(x)$ and obviously it is also a root of the first term $(xq - p) c_0 x^{n-1}$ from the sum above.

So $p/q$ must also be a root of

$$h(x) = (a_1 + pc_0)x^{n-1} + a_2 x^{n-2} + ... + a_{n-1} x + a_n$$

But this polynomial $h(x)$ is of degree $(n-1)$ so we can apply the induction hypothesis. From it we get that $$(p-mq)\ |\ h(m) \tag{4}$$ for every whole number $m$.

But then from (3) we can see that $$f(m) = (mq - p) \cdot m^{n-1} + h(m) \tag{5}$$

for every whole number $m$.

And then from (4) and (5), we obtain that

$(p-mq)$ divides also $f(m)$ for every whole number $m$.

Is this proof good enough? Or does this proof have some subtle flaw?

If it's good enough, then the statement is indeed easy because everything was straightforward in the induction that we did, and we used just the fact that $q\ |\ a_0$.

Title: Polynomials - rational root - divisibility

Body:
This is a simple (almost obvious) question but I somehow cannot find an elementary solution yet.

$$f(x) = a_0x^n + a_1x^{n-1} + ... + a_{n-1}x + a_n$$

is a polynomial with integer coefficients.

$$\frac{p}{q}$$ is a rational root of $f(x)$,

where $p,q$ are whole numbers and $(p,q) = 1$

Prove that $(p-mq)$ | $f(m)$ for every whole number $m$

Assume the solution has to be explained to someone in 7th or 8th grade

i.e. one who doesn't know much about any complicated theory of polynomials.

E.g. I know that $f(x)$ can be written as $$a_0\left(x-\frac{p}{q}\right)R(x)$$

where $R(x)$ is a polynomial but can I claim $R(x)$ has integer

coefficients. If I can, then the desired statement follows easily, it seems.

But why can I claim this?

Note: you can assume I (or the student to whom I must explain this)

know that $p/a_n$ and $q/a_0$, this was proved already.

At some point I thought of using induction (on $m$) but that

seems somewhat complicated and I don't know if it will work at all.


问:
What category do these products live in?
There is an example at the beginning of Section 7.4 of Awodey's Category Theory, where natural transformations are first introduced, and I'm trying to figure out how it relates to the definition of a natural transformation. To give an intuitive feel for the notion, the author refers to functors $F:\mathbf{C} \to \mathbf{D}$ as "constructions" with the intention of showing what a relation between them would look like.

To give a simple
example, suppose C has products and consider, for objects $A, B, C \in \mathbf{C}$,
$$
(A \times B) \times C \text{ and } A \times (B \times C).
$$
Regardless of what objects $A$, $B$, and $C$ are, we have an isomorphism
$$
h : (A \times B) \times C \xrightarrow{\sim} A × (B × C).
$$
What does it mean that this isomorphism doesn’t really depend on the particular objects $A, B, C$? One way to explain it is this:
Given any $f : A \to A′$, we get a commutative square
$$
\begin{array}{ccc}
(A \times B) \times C & \xrightarrow{h_A} & A \times (B \times C) \\
\downarrow & & \downarrow \\
(A' \times B) \times C & \xrightarrow{h_{A'}} & A' \times (B \times C)
\end{array}
$$
So what we really have is an isomorphism between the “constructions”,
$$
(− \times B) \times C \text{ and } − \times (B \times C)
$$
without regard to what’s in the argument-place of these.
Now, by a “construction” we of course just mean a functor, and by a
“relation between constructors” we mean a morphism of functors (which is
what we are about to define). In the example, it’s an isomorphism:
$$
(− \times B) \times C \cong − \times (B \times C)
$$
For functors $\mathbf{C} \to \mathbf{C}$.

What is the category $\mathbf{D}$ in this example? What's the explicit definition of the functors $F, G$? I'm thinking something bringing us to a space of products of objects in $\mathbf{C}$, but I'm not sure what exactly that would look like. We define natural transformations as having components for each object $C \in \mathbf{C}$. What is $C$ in the example? Is it just $A$?

答:
The product of two objects of a category $\mathbf{C}$ (when it exists) is another object of $\mathbf{C}$: the product of two sets is a set, the product of two groups is a group, etc.

When the product of two objects exists for any pair of objects, this defines a bifunctor: a functor $\mathbf{C}\times \mathbf{C}\to \mathbf{C}$, sending a pair $(A,B)$ of objects to the product $A\times B\in \mathbf{C}$.

A bifunctor is similar to a bilinear map in linear algebra: just like a bilinear map $f:V\times V\to V$ is such that $f(x,-)$ and $f(-,y)$ are linear functions $V\to V$ when we fiw some $x$ or $y$, a bifunctor $F:\mathbf{C}\times \mathbf{C}\to \mathbf{C}$ defines a functor $F(-,B)$ and a functor $F(A,-)$. In other words, the product is a functor if you fix one of the terms.

Here the author is talking about the functors $\mathbf{C}\to \mathbf{C}$ defined by $A\mapsto (A\times B)\times C$ and $A\mapsto A\times (B\times C)$ (which turn out to be naturally isomorphic by some form of associativity of products).


问:
Over a Riemannian Manifold, is the composition $\log_q \circ \exp_p : T_p(M) \rightarrow T_q(M)$ an affine linear function?
Let $M$ be a Riemannian Manifold, for each $p \in M$ we will denote $\exp_p : U_p \rightarrow M$ the exponential funtion, beeing $U_p \subseteq T_p(M)$ a small enough open connected set with $0 \in U_p$. When I say "small enough" I mean small enough for the exponential funtion to be well defined, to be a difeomorphism with it's image, and small enough for my conjecture to hold (if there even exists such an open set).

Before stating my conjecture, let's denote $\log_p : \exp_p{(U_p)} \rightarrow U_p \subseteq T_p{(M)}$ the inverse function of the exponential map over $p$. My conjecture is that if $p,q \in M$ are such that $V_{p,q} :=\exp_p{(U_p)} \cap \exp_q{(U_q)} \neq \emptyset$  (for simplicity, we can assume $V_{p,q}$ is connected) then the funtion
$$\log_q \circ \exp_p : \exp_p^{-1}(V_{p,q}) \rightarrow \exp_q^{-1}(V_{p,q})$$

Is an affine linear function (wich I'm going to explain what it means to me).

An function $f : \Bbb R^n \rightarrow \Bbb R^m$ is an affine linear function if $g(x):=f(x)-v$ is a linear function for some $v \in \Bbb R^m$

If $U \subseteq \Bbb R^n$ is an open connected set, a function $h : U \rightarrow \Bbb R^m$ is affine linear if there exists an affine linear function $f : \Bbb R^n \rightarrow \Bbb R^m$ such that ${f|}_U =h$

If $U \subseteq \Bbb R^n$ is an open set, we say that $h : U \rightarrow \Bbb R^m$ is affine linear if it's affine linear restricted to every connected component of $U$

Finally, let $U \subseteq \Bbb R^n$ and $V \subseteq \Bbb R^m$ be open sets, we say that $h : U \rightarrow V$ is affine linear if $i  \circ h : U \rightarrow \Bbb R^m$ is affine linear, beeing $i : V \rightarrow \Bbb R^m$ the inclusion map.

The same definitions holds for arbitrary finite dimensional (real) vector spaces.
I've seen many examples in wich this happens to be true so I was wondering if is a general thing. Also, for some reason I belive the parallel transport will play an important role (taking the Levi-Civita connection)

答: This is very far from being true. Normal coordinate charts are not as well adapted to a Rimannian metric as one may think. They only behave well with respect to geodesics through the point at with the normal coordinate chart is centered. Suppose that the conjecture were true and consider a normal coordinate chart centered at $p$. Then we can apply the conjecture to conclude that all geodesics that meet this chart are given by affine lines in that chart (since affine functions map affine lines to affine lines). This would even be true including parametrizations. But even if one requires that there are local charts in which the all geodescis are straight lineas as unparametrized curves, this implies a condition known as "projective flatness" of the Levi-Civita connection. By a classical theorem of Beltrami, a Riemannian manifold has projectively flat Levi-Civita connection if and only if it has constant sectional curvature. (And even in this case, you don't get the "right" parametrizations in general.) So I suppose that in the form you expect the condition only holds for flat metrics.


问:
How to find fundamental period of summation function?

I cant seem to understand how to find the fundamental period from this exponential function.
$$\large x(t)=\sum _{k=2}^{k=14} e^{  j k\frac{2\pi}{7}  t}$$

I'd really appreciate any help, I cant find much anywhere

答:
Let $w=\exp{\frac{2\pi j}{7}}$. Then
$$x(t)=\sum_{k=2}^{14} w^{kt}.$$
Replacing $t$ by $t+7$ leaves every term unchanged and so $x(t+7)=x(t)$.

Does that answer your question?


问:
Prove that $\mu^*(B\cap(A_1\cup A_2)) = \mu^*(B\cap A_1)+\mu^*(B\cap A_2)$.
I am reading a Lebesgue integration book.

There is the following proposition without a proof in this book:

Let $\mu^* : 2^\mathbb{R} \to [0,\infty]$ be the Lebesgue outer measure on $\mathbb{R}$.

Let $\mathcal{M} \subset 2^\mathbb{R}$ be the set of all measurable sets.

Let $A_1,\dots,A_n\in\mathcal{M}$.

Assume that $A_i \cap A_j=\emptyset$ for $i\ne j$.

Then, for any $B\in 2^\mathbb{R}$, $$\mu^*(B\cap\bigcup_{i=1}^n A_i) = \sum_{i=1}^n \mu^*(B\cap A_i)$$ holds.

I tried to prove this proposition, but I was not able to prove it.

My attempt is here:

Let $B\in 2^\mathbb{R}$.

Since $A_1\cup A_2\in\mathcal{M}$, $\mu^*(B)=\mu^*(B\cap(A_1\cup A_2)) + \mu^*(B\cap(A_1\cup A_2)^C)$.

Since $A_1\in\mathcal{M}$, $\mu^*(B)=\mu^*(B\cap A_1)+\mu^*(B\cap A_1^C)$.

Since $A_2\in\mathcal{M}$, $\mu^*(B\cap A_1^C)=\mu^*((B\cap A_1^C)\cap A_2)+\mu^*((B\cap A_1^C)\cap A_2^C)$.

So, $\mu^*(B)=\mu^*(B\cap A_1)+\mu^*((B\cap A_1^C)\cap A_2)+\mu^*((B\cap A_1^C)\cap A_2^C)$.

Since $A_1\cap A_2=\emptyset$, $A_2\subset A_1^C$. So, $A_1^C \cap A_2 = A_2$.

So, $\mu^*(B)=\mu^*(B\cap A_1)+\mu^*(B\cap A_2)+\mu^*((B\cap A_1^C)\cap A_2^C)$.

Since $C:=B\cap(A_1\cup A_2)^C=(B\cap A_1^C)\cap A_2^C$, $\mu^*(B\cap(A_1\cup A_2)) + \mu^*(C) = \mu^*(B\cap A_1)+\mu^*(B\cap A_2)+\mu^*(C)$.

If $\mu^*(C) \in\mathbb{R}$, then $\mu^*(B\cap(A_1\cup A_2)) = \mu^*(B\cap A_1)+\mu^*(B\cap A_2)$.

But I cannot prove that $\mu^*(B\cap(A_1\cup A_2)) = \mu^*(B\cap A_1)+\mu^*(B\cap A_2)$ when  $\mu^*(C)=\infty$.

答:
As you proved, when $\mu^*(C)<\infty$ we have $\mu^*(B\cap(A_1\cup A_2)) = \mu^*(B\cap A_1)+\mu^*(B\cap A_2)$.   $(\star)$

Now prove the proposition in two case:

If $\mu^*(B\cap(A_1\cup A_2))=\infty$, since $\mu^*(B\cap A_1)+\mu^*(B\cap A_2)\ge\mu^*(B\cap(A_1\cup A_2))=\infty $, it holds true obviously;

If $\mu^*(B\cap(A_1\cup A_2))<\infty$, we put $B\cap(A_1\cup A_2)$ in $(\star)$ instead of $B$, it follows that
$$C=(B\cap(A_1\cup A_2))\cap(A_1\cup A_2)^C=\emptyset.$$


问:
Finding length of diagonal in parallelogram given two sides and other diagonal
A parallelogram has sides of length 11 cm and 13 cm and has one diagonal 20 cm long the length of the other diagonal is what I am supposed to find. Now my answer came out to be 13.2 cm.

Finding the area of the first triangle:

Perimeter = $11 + 13 + 20 = 44$ cm

Semi-Perimeter = $44 ÷ 2 = 22$ cm

Area = $\sqrt{p(p - a)(p - b) (p - c)} = \sqrt{22(22 - 11)(22 - 13)(22 - 20)} = \sqrt{4356} = 66 \text{cm}^2$

Find the area of the parallelogram:

Area of parallelogram = $2 \times \ $area of triangle

Area = $66 * 2 = 132 cm²$

Find the other diagonal:

Let the other diagonal be x

$1/2 (diagonal 1 * diagonal 2) = Area $

$1/2 (20x) = 132 $

$10x = 132 $

$x = 13.2 cm $

However, surprisingly my answer wasn't in the options. Now my friend sent me this attachment from the website topper and claimed that 20 is the correct answer so can you guys pls tell me whether 13.2 cm is the correct answer or 20? Do pls also tell whether what is the mistake done by the other one? Thanks in advance for your help.

答:
Obviously, both diagonals cannot be $20$, otherwise you would have a rectangle, and this would imply $11^2 + 13^2 = 20^2$, which is false.

One solution that is accessible to you is to employ Heron's formula as you have done, but extend the computation.  You already found that the area of the parallelogram is $66(2) = 132$.  However, in order to find the other diagonal, you must solve the equation $$66 = \sqrt{s(s-11)(s-13)(s-c)},$$ where $s = (11+13+c)/2$ and $c$ is the desired diagonal.  You already know $c = 20$ satisfies this equation; the goal is to find the other positive root.  Some algebra will give $$66 = \frac{1}{4} \sqrt{-2304 + 580c^2 - c^4},$$ after which obtaining the nontrivial positive root should be straightforward.

Alternatively, we can employ trigonometry:  we know by the Law of Cosines that $$20^2 = 11^2 + 13^2 - 2(11)(13) \cos C,$$ hence the other diagonal has length $$c^2 = 11^2 + 13^2 - 2(11)(13) \cos (180^\circ - C) = 11^2 + 13^2 + 2(11)(13) \cos  C.$$  In fact, this is how the diagonal identity can be shown:  for general side lengths $a, b$ with one given diagonal $d$, we find the other diagonal $c$ obeys $$c^2 + d^2 = 2(a^2 + b^2), \tag{1}$$ since we must have the simultaneous solution $$\begin{align} c^2 &= a^2 + b^2 - 2ab \cos C \\ d^2 &= a^2 + b^2 - 2ab \cos (180^\circ - C) \end{align}$$ and since $\cos (180^\circ - C) = -\cos C$, we add the two equations to get $c^2 + d^2 = 2a^2 + 2b^2$, proving Equation $(1)$.


答:
The length of the other diagonal is $\sqrt {180}$ and can be found by the parallelogram law as suggested by @hgmaths.
$$x^2+20^2=2(11^2+13^2)$$.

Your friend's method was correct but at the end he used the same angle instead of 180 minus that angle. He therefore obtained the original diagonal! If you change the sign of his final term you will get $\sqrt {180}$.

Title: Finding length of diagonal in parallelogram given two sides and other diagonal

Body:
A parallelogram has sides of length 11 cm and 13 cm and has one diagonal 20 cm long the length of the other diagonal is what I am supposed to find. Now my answer came out to be 13.2 cm.

Finding the area of the first triangle:

Perimeter = $11 + 13 + 20 = 44$ cm

Semi-Perimeter = $44 ÷ 2 = 22$ cm

Area = $\sqrt{p(p - a)(p - b) (p - c)} = \sqrt{22(22 - 11)(22 - 13)(22 - 20)} = \sqrt{4356} = 66 \text{cm}^2$

Find the area of the parallelogram:

Area of parallelogram = $2 \times \ $area of triangle

Area = $66 * 2 = 132 cm²$

Find the other diagonal:

Let the other diagonal be x

$1/2 (diagonal 1 * diagonal 2) = Area $

$1/2 (20x) = 132 $

$10x = 132 $

$x = 13.2 cm $

However, surprisingly my answer wasn't in the options. Now my friend sent me this attachment from the website topper and claimed that 20 is the correct answer so can you guys pls tell me whether 13.2 cm is the correct answer or 20? Do pls also tell whether what is the mistake done by the other one? Thanks in advance for your help.


问:
Why is the dotproduct of direction and gradient the directional derivative? ($\nabla_\hat{v} f = \nabla f \bullet \hat{v}$)
I have seen the claim that the directional derivative of $f$ in the direction $\hat{v}$, where $||\hat{v}|| = 1$, (denoted $\nabla_\hat{v} f$) is equal to the gradient of $\nabla f$ dotted with $\hat{v}$.

I have tried to prove this to myself, but I got stuck:
$\newcommand{\R}{\mathbb{R}}$
$\newcommand{\limit}[2]{\lim_{#1 \to #2}}$
$\newcommand{\pderiv}[2]{\dfrac{\partial#1}{\partial#2}}$

Let $f : \R^n \to \R$

I accept that

$$ \nabla_{\hat{v}} f = \limit{h}{0} \frac{f(x + h\hat{v}) - f(x)}{h}$$

for making intuitive sense. Furthermore I know that

$$ \pderiv{f}{x_i}  = \limit{h}{0} \frac{f(x + h\hat{i}) - f(x)}{h} $$

where $\hat{i}$ is the unit vector of the $i$-th dimension. I also know that

$$\nabla f =  \left( \pderiv{f}{x_1}, \dots, \pderiv{f}{x_n} \right)$$

Now I want to show that $\nabla_\hat{v} f = \nabla f \bullet \hat{v}$:

\begin{align*}
\nabla f \bullet \hat{v} & = \left( \pderiv{f}{x_1}, \dots, \pderiv{f}{x_n} \right) \bullet v\hat{v}\\
                    &= \sum_{i = 1}^{n} \pderiv{f}{x_i} \cdot \hat{v}_i\\
                    &= \sum_{i = 1}^{n} \limit{h}{0} \frac{f(x + h\hat{i}) - f(x)}{h} \cdot \hat{v}_i\\
                    &= \sum_{i = 1}^{n} \limit{h}{0} \frac{\hat{v}_if(x + h\hat{i}) - \hat{v}_if(x)}{h}\\
\end{align*}

And now I am stuck. I don't see a way to transform the last line into $\limit{h}{0} \frac{f(x + h\hat{v}) - f(x)}{h}$ to reach $\nabla_{\hat{v}} f$

Can you help me out here?

Edit

I now conceptually understand why the dotproduct of direction and gradient is the directional derivative:

Let's say we have a differentiable function $f$ from $\mathbb{R}^2$ to $\mathbb{R}^3$ mapping the $xy$-plane into the $xyz$-space and  we want to know the directional derivative of $f$ at a point $p = (x', y')$ for some vector $u$.

First what we need to know is, how much $f$ changes in $x$ direction and how much it changes in $y$ direction.

Then we need to realize that for small distances whatever direction we go along the surface of $f$, the total change in height is the sum of the change in height in the $x$ component of our direction and the change in height in $y$ component in our direction.

But now we can weight the partial derivatives for the $x$ and $y$ direction with the components of $u$ to get their individual contributions for the direction in which $u$ is pointing!

So if $u$ has an $x$-component of $u_x$ we weight the partial derivative of $f$ for the $x$ direction accordingly. When we do the same for $y$ we get:

$f'(x') \cdot u_x + f'(y') \cdot u_y$

which is in fact $\nabla f \bullet u$

I understood this after listeing to this lecture:

https://www.youtube.com/watch?v=tDPp5uWSIiU

答:
$\newcommand{\limit}[2]{\lim_{#1 \to #2}}$
Since this questions does not have an accepted answer yet and I found myself looking for a clear and easily understandable proof with low prerequisites.
I found one in 1 which I would like to share with you.

We are trying to prove

$$ \nabla_{\boldsymbol{v}} f(\boldsymbol{x}) = \nabla_{\boldsymbol{x}} f({\boldsymbol{x}}) \cdot \boldsymbol{v}. $$

Define $\boldsymbol{y_{\boldsymbol{x}, \boldsymbol{v}}}: \mathbb{R} \rightarrow \mathbb{R}^{\mathrm{dim}(\boldsymbol{x})} , \boldsymbol{y_{\boldsymbol{x}, \boldsymbol{v}}} : h \mapsto \boldsymbol{y_{\boldsymbol{x}, \boldsymbol{v}}}(h) := \boldsymbol{x} + h \boldsymbol{v}$

and $g_{\boldsymbol{x}, \boldsymbol{v}}: \mathbb{R}\rightarrow \mathbb{R}, g_{\boldsymbol{x}, \boldsymbol{v}} : h \mapsto g_{\boldsymbol{x}, \boldsymbol{v}}(h) := f( \boldsymbol{x} + h \boldsymbol{v} ) = f(\boldsymbol{y_{\boldsymbol{x}, \boldsymbol{v}}})$

Starting from the definition of the directional derivative,

\begin{align} \nabla_{\boldsymbol{v}} f(\boldsymbol{x}) =& \limit{h}{0} \frac{f(\boldsymbol{x} + h\boldsymbol{v}) - f(\boldsymbol{x})}{h} \\
=& \limit{h}{0} \frac{g_{\boldsymbol{x}, \boldsymbol{v}}(h) - g_{\boldsymbol{x}, \boldsymbol{v}}(0)}{h} \\
=& g_{\boldsymbol{x}, \boldsymbol{v}}'(0) \equiv \frac{\mathrm{d} g_{\boldsymbol{x}, \boldsymbol{v}}} {\mathrm{d} h} \Biggr|_{0} \end{align}

Now consider for an arbitrary $h \in \mathbb{R}$

\begin{align}
\frac{\mathrm{d} g_{\boldsymbol{x}, \boldsymbol{v}}(h)} {\mathrm{d} h} =& \frac{\mathrm{d} f\big( \boldsymbol{y_{\boldsymbol{x}, \boldsymbol{v}}}(h) \big)} {\mathrm{d} h} \\
=& \frac{\mathrm{d} f} {\mathrm{d} \boldsymbol{y_{\boldsymbol{x}, \boldsymbol{v}}}} \cdot \frac{\mathrm{d} \boldsymbol{y}_{\boldsymbol{x}, \boldsymbol{v}}}{\mathrm{d}h} \\
=& \nabla_{\boldsymbol{y}_{\boldsymbol{x}, \boldsymbol{v}}} f \cdot \frac{\mathrm{d} (\boldsymbol{x} + h \boldsymbol{v})}{\mathrm{d}h}  \\
=& \nabla_{(\boldsymbol{x} + h \boldsymbol{v})} f \cdot \boldsymbol{v} \end{align}

Which gives for $h=0$

$$ \nabla_{\boldsymbol{v}} f(\boldsymbol{x}) = g_{\boldsymbol{x}, \boldsymbol{v}}'(0) \equiv \frac{\mathrm{d} g_{\boldsymbol{x}, \boldsymbol{v}}} {\mathrm{d} h} \Biggr|_{0}  = \nabla_{\boldsymbol{x} } f \cdot \boldsymbol{v} .$$

References:

1 Jorge Nocedal, Stephen J. Wright. Numerical Optimization. Springer, New York, NY.  Proof can be found on p. 581 of the second edition. DOI. URL  Print ISBN: 978-0-387-98793-4. Online ISBN: 978-0-387-22742-9


问:
Help on a rational recursive relation: $T[n+1]=\frac{E[n+1](D+T[n])}{E[n+1]+D+T[n]}$
I am trying to solve this rational recursive relation:

$$T[n+1]=\frac{E[n+1](D+T[n])}{E[n+1]+D+T[n]}$$

where $T[1]=\frac{E[1]*D}{E[1]+D}$ for constant $D>0$ and $E[n]>0$.

When $E[n]$ is replaced by a constant $E$ (independent of $n$), Wolfram Mathematica's RSolve (after FullSimplify) yields the following:

$$T[n]=\frac{2E}{1+\sqrt{1+4E/D}-\frac{2\sqrt{1+4E/D}\left(D+2E-\sqrt{D(D+2E)}\right)^n}{\left(D+2E-\sqrt{D(D+2E)}\right)^n-
\left(D+2E+\sqrt{D(D+2E)}\right)^n}}$$

I assume that for constant $E$ Mathematica used methods for solving rational difference equations (but I really have no knowledge of the inner workings of that software package).  It's not helpful when function $E[n+1]$ is inserted in lieu of constant $E$.

To extend the result above to function $E[n]$ I've tried writing out the first few iterations of it (using RecurrenceTable function in Mathematica with and without Simplify and FullSimplify), however, no pattern emerged to me (though, perhaps the community can see something -- I can try to post it to the question if that would be helpful).  I am not very familiar with recurrence relations beyond some basic facts s.t. the Master Theorem.  Is this thing even soluble? I would be very happy with a solution involving sums and products of $E[n]$.  Any help would be very much appreciated.

This arose out of my question on the stats forum regarding Bayesian inference using noisy observations of a Brownian motion process.

答:
Mitchell "An Analytic Riccati Solution for Two-Target Discrete-Time Control", Journal of Economic Dynamics and Control 24(4), 615-622 (2000) uses an interesting trick to solve the Ricatti recurrence:
$$
w_{n + 1} = \frac{a w_n + b}{b w_n + d}
$$
Use the replacement $x_n = 1 / (1 + \eta w_n)$, select $\eta$ such that the result is a first order, linear recurrence in $x_n$. If $a$, $b$, $c$, and $d$ are functions of $n$, so will be $\eta$, and the resulting recurrence is linear, first order and thus has a explicit solution even if the coefficients aren't constant. But unless you are as lucky as textbook writers are with all the problems that come their way, the result will be a much worse mess than just iterating the recurrence.</p>


问:
Why is $\left( \begin{array}{cc} 1 & 1 \\ 1 & 1 \\ \end{array} \right)^0\ne1$?
Why is

$\left( \begin{array}{cc}  1 & 1 \\  1 & 1 \\ \end{array} \right)^0=\left( \begin{array}{cc}  \frac{1}{2} & \frac{1}{2} \\  \frac{1}{2} & \frac{1}{2} \\ \end{array} \right)$

This result me returns Mathematica on this command

```<code>Limit[MatrixFunction[#^s &, ( { {1, 1}, {1, 1} } )], s -> 0, Direction -> "FromAbove"]
</code>```

Result:

```<code>{{1/2, 1/2}, {1/2, 1/2}}
</code>```

Should not anything rised to zeroth power be $1$?

答:
$A^0$ is the identity matrix. This then satisfies the rule
$$A^{m+n}=A^mA^n$$
which would not be true with your value for $A^0$.

Your question should be why is the limit not $I$?


问:
In terms of the derivative f' of f express the derivative of f(3x)
In terms of the derivative f' of f express the derivative of f(3x).
The solution is: $\frac{d}{dx} f(3x)=(f'(3x))(3)=3*f'(3x)$

I don't understand the question. The derivative of f is 3. f' is 3. 3*f' is 9?

We want to express the derivative of f in terms of f'. The derivative of f is 3.
What is the question asking?

答:
The chain rule, which says what is the derivative of a composition of functions. Here we have

$$f(x)\;,\;\;h(x)=3x\implies f\circ h(x)=f(h(x))$$

and the chain rule tells us that $\;\left(f\circ h(x)\right)'=(f(h(x))' = f'(h(x)) \cdot h'(x)\;$

In this case, $\;f'(h(x))=f'(3x)\;$ , and $\;h'(x)=(3x)'=3\;$ , so at the end

$$(f(3x))'=f'(3x)\cdot 3=3f'(3x)$$


问:
Derive consistency of finite difference approximation in both, x- and y-direction?
I am used to deriving consistency for approximations of derivatives such as

$\frac{\partial u(x,y)}{\partial x} = \frac{u(x+h,y) - u(x,y)}{h}$

and then going on with taylor series:

$u(x+h,y) = u(x,y) + hu'(x,y) + \frac{h^2}{2}u''(x,y) ... $

but how does this work for this for example:

$\frac{\partial^2 u(x,y)}{\partial x \partial y} = \frac{u(x+h,y+h) - u(x-h,y+h) - u(x+h, y-h) + u(x-h,y-h)}{4h^2}$

where I have $u(x+h,y+h)$? What would be the taylor series of this?

答: $u(x+h, y+h) = u(x,y) + h\frac{\partial u}{\partial x}(x,y) + h\frac{\partial u}{\partial y} (x,y) + \frac{h^2}{2}\frac{\partial^2}{\partial x^2}u(x,y) + \frac{h^2}{2}\frac{\partial^2 }{\partial y^2}u(x,y) + \frac{h^2}{2}\frac{\partial^2}{\partial x \partial y} u(x,y) + \frac{h^2}{2}\frac{\partial^2}{\partial y \partial x} u(x,y) $


答:
This is one possible setup: the other setup is obtained by rotating this diagram $90º$ either way.

Extend $CD$ to $E$ so that $AE$ is perpendicular to $EC$.  Since area $\Delta ADC = 66$, $\frac{1}{2} AE \cdot DC = 66 \Rightarrow AE = 12$. By Pythagoras, $DE = 5$, and thus $DB^2 = (11-5)^2+12^2 \Rightarrow DB = \sqrt{180} = 6\sqrt5$.


问:
Applying Zorn's lemma in the proposition about cardinality of sets
In Real Analysis book by Folland G., the following proposition is given:

0.7 Proposition. For any sets $X$ and $Y$, either $\mathrm{card}(X)\leq\mathrm{card}(Y)$ or $\mathrm{card}(Y)\leq\mathrm{card}(X)$.

Proof. Consider the set $\mathcal{J}$ of all injections from subsets of $X$ to $Y$. The members of $\mathcal{J}$ can be regarded as subsets of $X\times Y$, so $\mathcal{J}$ is partially ordered by inclusion. It is easily verified that Zorn's lemma applies, so $\mathcal{J}$ has a maximal element $f$, with (say) domain $A$ and range $B$. If $x_0\in X\setminus A$ and $y_0\in Y\setminus B$, then $f$ can be extended to an injection from $A\cup\{x_0\}$ to $Y\cup\{y_0\}$ by setting $f(x_0)=y_0$, contradicting maximality. Hence either $A=X$, in which case $\mathrm{card}(X)\leq\mathrm{card}(Y)$, or $B=Y$, in which case $f^{-1}$ is an injection from $Y$ to $X$ and $\mathrm{card}(Y)\leq\mathrm{card}(X)$. $\qquad\square$

I know that Zorn's lemma is as follows:

Zorn's lemma: Suppose a partially ordered set P has the property that every chain in P has an upper bound in P. Then the set P contains at least one maximal element.

However, I am having difficulty in seeing how that quickly one can see that Zorn's lemma applies there as the textbook mentions. How can I show that any chain of $X\times Y$ has an upper bound? Could I say $X \times Y$ is itself the upper bound?

More explanation on the above proof would be greatly appreciated.

答: It is very common with Zorn's lemma arguments in which sets of some kind are ordered by inclusion for the upper bound of a chain to be its union. In this case, if $(f_i : A_i \to B_i)_{i \in I}$ is a chain of injections where each $A_i \subseteq X$ and each $B_i \subseteq Y$, then $\bigcup_{i \in I} f_i$ is an injection of $\bigcup_{i \in I} A_i \subseteq X$ into $\bigcup_{i \in I} B_i \subseteq Y$.