答:
If we limit to first order, it means that you want to approximate the function
$$f(x,y)=x \cos (y) + y \cos( x)$$ by a plane. It would then be something like
$$f(x,y)= a + b x$$ with
$$a=a_0+a_1(y-\pi) \qquad \text{and} \qquad b=b_0+b_1(y-\pi)$$ I am sure that you can make the link between coefficients $(a_0,a_1,b_0,b_1)$ and the partial derivatives of $f(x,y)$ at $(0,\pi)$.

Title: Taylor expanding implicit curves

Body:
$$ x \cos y + y \cos x = 0$$

Suppose I wished to write the above as polynomial around $x=0$, we can see by substitution of $x=0$ that $y=\pi$ around that point from the original equation. Hence, could we write the equation as:

$$ x \left[ \pi  +\frac{d y}{dx} \frac{ (y- \pi)^2}{2!} .. + stuff \right] + y \left[ 1 - \frac{x^2}{2!} .. stuff \right]=0 $$

Is the above equation correct? What would be the rationale/ intuition behind expanding $y$ individually in the equation?


问:
Well defined operator between $L_p$ and $L_q$ spaces
I have a doubt which can be summarized in the following question:

Let $(\Omega , A,\mu)$ be a probability space and $F: \Omega \times \Omega \to \mathbb{R}$ a measurable function such that $\|F\|_p<\infty$ with $p\in[1,\infty)$. Now if we define the function $g(x)=\int_\Omega f(y)F(y,x)d\mu(y)$ and $q=\frac{p}{p-1}$.

Does $g$ belong to $L_p(\Omega)$ for every $f\in L_q(\Omega)$?

Does $g$ belng to $L_q(\Omega)$ for every $f\in L_p(\Omega)$?

My attempt:

I have not come too far but I expose my attempt. Concretely, I am trying to use the following property which follows from Hölder inequality:
$$\int_\Omega \left|\int_\Omega f(y)F(x,y) d\mu(y) \right|^r d\mu(x)\leq \int_\Omega \int_\Omega \left|f(y)F(x,y)\right|^r d\mu(y)  d\mu(x),\;\forall r\geq1.$$
However, I don't know how to use this property to involve the norms of $f$ and $F$ in each item, I have tried to use the Young's inequality but it have not worked to me.

Any help will be wellcome.

答:
$|g(x)| \leq (\int |f(x)|^{q})^{1/q} (\int |f(y,x)|^{p} dy)^{1/p}$ so $|g(x)|^{p} \leq (\int |f(x)|^{q})^{p/q} (\int |F(y,x)|^{p} dy)$. Integrating we get $\int |g(x)|^{p} \leq \|f\|_q^{p} \|F\|_p^{p}$ so $g \in L^{p}$.

is fasle. Here is a hint: take $F(y,x)=\phi(y)\psi(x)$ where $\phi, \psi \in L^{p}, \phi \in L^{q}, \psi \notin L^{q}$ and $\int f \phi \neq 0$.

ContentLicense: CC BY-SA 4.0


答: They're called Ducci sequences. The proof that they terminate for $n = 2^k$ is fairly elementary: all you have to show is that eventually all of the terms are even, and then you're done by induction on the binary expansion. To show that eventually all of the terms are even it suffices to work $\bmod 2$, and then you're just looking at powers of the matrix $I + P$ over $\mathbb{F}_2$, where $P$ is a cyclic permutation. We have $(I + P)^{2^k} \equiv I + P^{2^k} \bmod 2$, so when $n = 2^k$ we are guaranteed that after at most $n$ steps all of the terms are even (and otherwise we get the behavior you already described). </p>

ContentLicense: CC BY-SA 3.0

Title: Integer absolute difference sequences

Body:
Given an arbitrary sequence of nonnegative integers
$x_0, \ldots, x_{n-1}$,
define its difference sequence as
$x'_i = | x_i - x_{i+1} |$,
with indices mod $n$ (so $x_n = x_0$).
Repeated application of this process leads to interesting
behavior.  For example, for $n=2^k$, it appears the
process always ends with the zero sequence:

```
181,530,245,548,294,228,364,958
349,285,303,254,66,136,594,777
64,18,49,188,70,458,183,428
46,31,139,118,388,275,245,364
15,108,21,270,113,30,119,318
93,87,249,157,83,89,199,303
6,162,92,74,6,110,104,210
156,70,18,68,104,6,106,204
86,52,50,36,98,100,98,48
34,2,14,62,2,2,50,38
32,12,48,60,0,48,12,4
20,36,12,60,48,36,8,28
16,24,48,12,12,28,20,8
8,24,36,0,16,8,12,8
16,12,36,16,8,4,4,0
4,24,20,8,4,0,4,16
20,4,12,4,4,4,12,12
16,8,8,0,0,8,0,8
8,0,8,0,8,8,8,8
8,8,8,8,0,0,0,0
0,0,0,8,0,0,0,8
0,0,8,8,0,0,8,8
0,8,0,8,0,8,0,8
8,8,8,8,8,8,8,8
0,0,0,0,0,0,0,0
```

Is this a theorem?
For $n$ not a power of 2, it falls into cycles where all elements
are 0 or $m$ for some integer $m$ (usually $m=1$).

Have these difference sequences been studied?
They seem to have a rich structure.


问:
Question about iterated limit and limit for a function on $\Bbb R^2$.

Let $f(x,y)=\begin{cases}
0,  & \text{if $x\ne0$ and $y\ne0$ } \\
1, & \text{if either $x=0$ or $y=0$}
\end{cases}
\text{ defined on } \Bbb R^2 $
Show that $\lim \limits_{x\to a}f(x,y)$ and $\lim \limits_{y\to b}f(x,y)$ both exist, and $\lim \limits_{x\to a}\Bigl(\lim \limits_{y\to b}f(x,y) \Bigr)=\lim \limits_{y\to b}\Bigl(\lim \limits_{x\to a}f(x,y) \Bigr)=L$ for all $a,b\in \Bbb R$. Does $\lim \limits_{(x,y)\to (0,0)}f(x,y)$ exist?

I think $\lim \limits_{x\to a}f(x,y)=\begin{cases}
1,  & \text{if $y=0$ } \\
0, & \text{if $y\ne0$}
\end{cases}$, and $\lim \limits_{y\to b}f(x,y)=\begin{cases}
1,  & \text{if $x=0$ } \\
0, & \text{if $x\ne0$}
\end{cases}_.$

But for $\lim \limits_{x\to a}\Bigl(\lim \limits_{y\to b}f(x,y) \Bigr)=\lim \limits_{y\to b}\Bigl(\lim \limits_{x\to a}f(x,y) \Bigr)$, what should I do?

$\lim \limits_{h\to 0}f(h,h)=0$, but $\lim\limits_{h\to 0}f(h,0)=1$, so I think $\lim \limits_{(x,y)\to (0,0)}f(x,y)$ does not exist.

答:
$\lim_{x\to a}\left(\lim_{y\to b}f(x,y)\right)$ becomes $\lim_{x\to a}g(x)$ where
$$g(x)=\lim_{y\to b}f(x,y)= \begin{cases} 1 & x = 0 \\
0 & x \ne 0\end{cases}$$
and we see that $\lim_{x\to a}g(x)=0$. It's the same for the other iterated limit. And the double limit doesn't exist for the reason you gave.


问:
Dynamics of population development - how is this equation derived?
I am currently reading a publication on an ecological model, where the authors adopt the following growth equation:

$$\frac{\partial n}{\partial t} = \bar{r}n(t)\left(1-\frac{n(t)}{K} \right) \tag{1}$$

where $\frac{\partial n}{\partial t}$ is the rate of change for the time-dependent population density $n(t)$ for $t=0,....,T$, $\bar{r}$ is an average growth rate, and $K$ is a fixed population density limit. If we assume a starting population density $n(t=0)=n_0$, the authors give the following equation for the time-dependent population density:

$$n(t)=\frac{Kn_0\exp(\bar{r}t)}{K+n_0(\exp(\bar{r}t)-1)} \tag{2}$$

Now, I have tested this equation against a simple numerical scheme where I incremented the growth rate and population size, and did indeed obtain the same results, so this equation does seem correct. My question is how the authors obtained it. I assume they started off something like this:

$$n(t)=n_0+\int_0^t\frac{\partial n}{\partial t}dt \tag{3}$$

But how to continue from here? Where does the exponential in Equation (2) come from?

答:
This is a separable equation, which can be solved via partial fractions.
$$
r(t+c)=\int\frac{((K-n)+n)\,dn}{n(K-n)}=\ln|n|-\ln|K-n|
$$

It is also a Bernoulli equation with a quadratic term, so can be solved via the substitution $u=n^{-1}$,
$$
u'=-n^{-2}n'=-r(u-K^{-1})\implies u(t)-K^{-1}=(u(0)-K^{-1})e^{-rt}
$$

Both approaches lead quickly to the given solution.


问:
Can $(x,y)\in \mathbb R\times (-\infty,x]$ be seen as a product space?
Consider the following set: $\{(x,y)\in\mathbb R^2||y\leq x\}$.

It could be informally written as: $\mathbb R\times (-\infty,x]$

Can it be seen as a product space?

It seems really wierd and I think the answer is "no".

--

Edited according to comments.

I acknowledge that the notation is very very informal. It is adapted from the notation in:

$$\int_{(x,y)\in\mathbb R\times\mathbb R}f(x,y)d(x,y)$$

$$\int_{(x,y)\in\mathbb R\times (-\infty,x]}f(x,y)d(x,y)$$

答: If $\{(x,y): y \leq x\}=A \times B$ then, for any real number $a$ the point $(a,a-1)$ belongs to the left side hence to the right side. It follows that $a \in A$. Similarly every real number is in $B$. [Consider $(a,a+1)$ for this]. Thus $A=B=\mathbb R$ and $\{(x,y): y \leq x\}\neq A \times B$


问:
How is this true in case of proportionality?
If $a \propto t$ (directly proportional), then $a = Kt$.

If $a = 6Kt$ , then also $a \propto t$.

Why are these two results same?

Displacement of a particle is proportional to the cube of time elapsed. How does the acceleration of the particle depends on time obtained is?

This is the question from where my doubt arose.

答: When we say $a \propto t$ (directly proportional) , it means a = constant*t. By convention, the constant is called K but it could be anything else; it could be D OR Y or anything. Thus when we say a = 6Kt, the new constant is 6K which can be renamed to another constant D. So if we say D= 6K, then a = Dt and as D is a constant a is still directly proportional to t.


问:
Number of "double" surjections from $\{1,2,\ldots,n\}$ to $\{1,2,\ldots, m\}$
I know about number of surjective functions from $\{1,2,\ldots,n\}$ to  $\{1,2,\ldots,m\}$. I was wondering is there some way to find number of functions $f$ from $\{1,2,\ldots,n\}$ to  $\{1,2,\ldots,m\}$ such that  $\forall y \in \{1,2,\ldots,m\}\;\exists x,z \in \{1,2,\ldots,n\}, x\neq z$ such that $f(x)=y$ and $f(z)=y$.

I was trying to use inclusion exclusion formula but it seems that there are many cases.
Is there some "trick" to solve this problem?

答:
Write $[n] = \{ 1, 2, \dots n \}$. A surjection $f : [n] \to [m]$ amounts to a (labeled) partition of $[n]$ into $m$ non-empty subsets, namely the fibers of $f$; these are counted by the Stirling numbers of the second kind $\left\{ n \atop m \right\} m!$. You are asking for a (labeled) partition of $[n]$ into $m$ subsets of size at least $2$. These are counted by a variant of the Stirling numbers of the second kind, which can be described using a two-variable generating function

$$\exp \left( \sum_{k \ge 2} z \frac{t^k}{k!} \right) = \exp \left( z \left( e^t - t - 1 \right) \right) = \sum_{n, m \ge 0} f_{n, m} z^m \frac{t^n}{n!}.$$

Here $f_{n, m}$ counts unlabeled partitions and to get labeled ones we multiply by $m!$ as before. There are several things you can do from here, for example you can write down an expression for $f_{n, m}$ in terms of the Stirling numbers by factoring out the $\exp(-zt)$, which corresponds to some inclusion-exclusion argument. You can also expand out $\exp(z(e^t - t - 1))$ to get a formula somewhat similar to one of the formulas for the Stirling numbers but more complicated. It depends on what you want to do.


问:
A problem in discrete optimization
I am interested in the following problem and its generalizations. Say we are on the real axis, and we have $n$ points $x_1, \ldots, x_n$ on this line. I would like to minimize/maximize the length someone would walk to go through all of them in a certain order.

Intuitively, I feel:

to minimize, we can pass by all of them from the leftmost one to the rightmost one;

to maximize, we would need to do many "round-trips", going from a point more on the "left side" to a point on the "right side", etc. but I don't see in what order it is better to do it.

Is there a convenient way to write a proof of the minimization? And how to determine if the heuristic strategy I suggest in the second case works or can be improved.

Less trivially maybe, I am interested in an equivalent question in a two-dimensional disk.

答:
Enumerate the points providing $x_1<x_2<\dots<x_n$.

to minimize, we can pass by all of them from the leftmost one to the rightmost one

Yes,  any path going through the points has a fragment connecting $x_1$ and $x_n$. By the triangle inequality, this fragment has length at least  $x_n-x_1$. On the other hand, a path $x_1x_2\dots x_n$ has this minimal length.

to maximize, we would need to do many "round-trips", going from a point more on the "left side" to a point on the "right side", etc. but I don't see in what order it is better to do it.

A particular case of this problem (when the distances between consecutive points is equal) was considered by Hugo Steinhaus in his book “A hundred problems”. The solution consists of two pages and I’ll try to read it and adapt to a general case. [Added: I see, RavenclawPrefect already considered this case.]

I am interested in an equivalent question in a two-dimensional disk.

The minimization case is very similar (with the only difference that your path is open, but not closed)  to a well-known Euclidean travelling salesman problem, so I expect it has the same computational complexity and can be solved by similar algorithms. I guess for the maximization case you should look for someting like Euclidean longest path problem.

Title: A problem in discrete optimization


问:
Variation of Euler's theorem
I think the following works, but am not sure how to prove it. I tested it up to $n = 1000000$. It's related to Euler's theorem.

Given $n$, a multiple of 3, s.t. $\gcd(n, 10) = 1$, is it true that:

$$10 ^ {\varphi(3 n) / 2} \equiv 1 \pmod{9 n}$$

Here $\varphi$ is Euler's totient function.

答:
Yes, it's true. Try writing $n = 3^k m$ where $\gcd(3, m) = 1$ so you can write

$$\frac{\varphi(3n)}{2} = \frac{\varphi(3^{k+1}) \varphi(m)}{2} = 3^k \varphi(m)$$

and then use the Chinese remainder theorem to work $\bmod 3^{k+2}$ and $\bmod m$ separately. The $\bmod m$ part is immediate so only the $\bmod 3^{k+2}$ part presents difficulties, and for that part you'll want to take advantage of the fact that $10 \equiv 1 \bmod 9$. You may want to look up a result called Lifting the Exponent (LTE for short), but you can try proving the result you need by induction on $k$ first.

Title: Variation of Euler's theorem


问:
Finding domain of $f \circ g$
I am having a small question, please don't close this before answering, I just want to know whether its a matter of convention or not.

If $f(x) = \dfrac{1}{x}$ and $g(x) = \dfrac{1}{x}$

$ $

Then $f \circ g = x$

$ $

I think domain of $f \circ g $ is $\mathbb{R} - \left\{0\right\}$

$ $

But many ppl I know are having an opinion that domain is $\mathbb{R}$

$ $

Which is true, OR is it just a matter of convention.

答:
Functions are like input output machines and composite functions are a combination of them. Thus when you consider f(g(x)), the domain cannot be greater than the domain of g(x) because if g(x) cannot process a x value then how can f(g(x))?

It does not do to just simplify composite functions because if f(g(x)) = x then can't we just make another function named h(x) =x but we don't. Why? so that the function f(g(x)) depends on the domain of the functions f(x) and g(x).

Title: Finding domain of $f \circ g$


问:
Let $nx_n \to a \in \mathbb{R}\setminus\{-\infty, 0, \infty\}$. How to find $\lim\limits_{n\to\infty}\sum_{k=1}^{n}{x_k^2}$
Let $nx_n \to a \in \mathbb{R}\setminus\{-\infty, 0, \infty\}$. How to find $\lim\limits_{n\to\infty}\sum\limits_{k=1}^{n}{x_k^2}$

For example for $x_n=\frac{a}{n}$ we have that $\lim\limits_{n\to\infty}\sum\limits_{k=1}^{n}{x_k^2}=\lim\limits_{n\to\infty}\sum\limits_{k=1}^{n}{\frac{a^2}{n^2}}=a^2\frac{\pi^2}{6}$ by Basel problem

Proposition. For any $c>0$ there exists sequence $x_n$ such that $nx_n \to a$ and $\lim\limits_{n\to\infty}\sum\limits_{k=1}^{n}{x_k^2}=c$.
Proof. Let $c=a^2\frac{\pi^2}{6}$ then $x_n=\frac{a}{n}$.
Let $c\neq\frac{\pi^2}{6}$ then consider sequences $x_n$ with property that there exists positive integer $N$ such that $x_m=\frac{a}{m}$ for $m>N$. Then
$\lim\limits_{n\to\infty}\sum\limits_{k=1}^{n}{x_k^2}=x_1^2+\dots+x_N^2+\frac{a^2}{(N+1)^2}+\frac{a^2}{(N+2)^2}+\dots=-(\frac{a^2}{1^2}+\dots+\frac{a^2}{N^2})+\frac{a^2}{1^2}+\dots+\frac{a^2}{N^2}+ x_1^2+\dots+x_N^2+\frac{a^2}{(N+1)^2}+\frac{a^2}{(N+2)^2}+\dots=x_1^2+\dots+x_N^2+a^2\frac{\pi^2}{6}-(\frac{a^2}{1^2}+\dots+\frac{a^2}{N^2})$

Therefor

$x_1^2+\dots+x_N^2+a^2\frac{\pi^2}{6}-(\frac{a^2}{1^2}+\dots+\frac{a^2}{N^2})=c$

for some $N$ and $x_1, x_2, \dots, x_N$

Question. Is there a sequence $x_n$ with property that $nx_n \to a \in \mathbb{R}\setminus\{-\infty, 0, \infty\}$ such that $\lim\limits_{n\to\infty}\sum\limits_{k=1}^{n}{x_k^2}=+\infty$ ?

答:
Changing the value of $x_1$ does not change the hypothesis but it changes the final answer. So it is impossible to find the limit in terms of $a$.
Since $x_n{2}<C/n^{2}$ for some constant $C$ the limit cannot be $\infty$.


问:
Gradient of linear scalar field $X \mapsto \operatorname{tr}(AXB)$
Could someone explain the following?

$$ \nabla_X \operatorname{tr}(AXB) = BA $$

I understand that

$$ {\rm d} \operatorname{tr}(AXB) = \operatorname{tr}(BA \; {\rm d} X) $$

but I don't quite understand how to move ${\rm d} X$ out of the trace.

答:
These are the main equations to remember:

Let $\mathbf{A} \in \mathbb{R}^{n\times m}$, $\mathbf{X} \in \mathbb{R}^{m\times n}$. Then

\begin{equation}
    \frac{d}{d\mathbf{X}}\text{Tr}(\mathbf{AX}) = \frac{d}{d\mathbf{X}}\text{Tr}(\mathbf{XA}) = \mathbf{A}^T
\end{equation}

Let $\mathbf{A} \in \mathbb{R}^{n\times m}$, $\mathbf{X} \in \mathbb{R}^{n\times m}$. Then

\begin{equation}
    \frac{d}{d\mathbf{X}}\text{Tr}(\mathbf{AX^T}) = \frac{d}{d\mathbf{X}}\text{Tr}(\mathbf{X^TA}) = \mathbf{A}
\end{equation}

Proof 1.

\begin{equation}
\left[ \frac{d}{d\mathbf{X}} \text{Tr}(\mathbf{AX}) \right]_{i,j} = \frac{d}{dx_{i,j}} \text{Tr}(\mathbf{AX}) = \frac{d}{dx_{i,j}} \sum_{k,l} a_{k,l} x_{l,k} = a_{j,i} = \left[\mathbf{A}^T\right]_{i,j}
\end{equation}

Proof 2

\begin{equation}
\left[ \frac{d}{d\mathbf{X}} \text{Tr}(\mathbf{AX^T}) \right]_{i,j} = \frac{d}{dx_{i,j}} \text{Tr}(\mathbf{AX^T}) = \frac{d}{dx_{i,j}} \sum_{k,l} a_{k,l} x_{k,l} = a_{i,j} = \left[\mathbf{A}\right]_{i,j}
\end{equation}

Once you have these, you can derivate crazy things like the following:

Example 1. Let $\mathbf{A} \in \mathbb{R}^{m\times m}$, $\mathbf{X} \in \mathbb{R}^{m\times n}$. Then

\begin{equation}
    \frac{d}{d\mathbf{X}} \text{Tr}(\mathbf{X}^T \mathbf{A} \mathbf{X}) = (\mathbf{A} + \mathbf{A}^T) \mathbf{X}
\end{equation}

We can derive it as follows:

\begin{split}
    \frac{d}{d\mathbf{X}} \text{Tr}(\mathbf{X}^T \mathbf{A} \mathbf{X}) =& \frac{d}{d\mathbf{Y}} \text{Tr}(\mathbf{Y}^T \mathbf{A} \mathbf{X}) + \frac{d}{d\mathbf{Y}} \text{Tr}(\mathbf{X}^T \mathbf{A} \mathbf{Y})\\
    =& \mathbf{A} \mathbf{X} + (\mathbf{X}^T \mathbf{A})^T\\
    =& \mathbf{A} \mathbf{X} + \mathbf{A}^T \mathbf{X} = (\mathbf{A} + \mathbf{A}^T) \mathbf{X}
\end{split}

Example 2. Consider now this example.

\begin{equation}
f(\mathbf{X}) = \text{Tr}(\mathbf{X}^T \mathbf{A} \mathbf{X} \mathbf{B} \mathbf{X}^T \mathbf{C})
\end{equation}

where $\mathbf{X} \in \mathbb{R}^{n\times m}$, $\mathbf{A} \in \mathbb{R}^{n\times n}$, $\mathbf{B} \in \mathbb{R}^{m\times m}$, $\mathbf{C} \in \mathbb{R}^{n\times m}$.

\begin{equation}
\begin{split}
    \frac{d}{d\mathbf{X}} f(\mathbf{X}) =& \frac{d}{d\mathbf{Y}} \text{Tr}(\mathbf{Y}^T \mathbf{A} \mathbf{X} \mathbf{B} \mathbf{X}^T \mathbf{C})\\
    +& \frac{d}{d\mathbf{Y}} \text{Tr}(\mathbf{X}^T \mathbf{A} \mathbf{Y} \mathbf{B} \mathbf{X}^T \mathbf{C})\\
    +& \frac{d}{d\mathbf{Y}} \text{Tr}(\mathbf{X}^T \mathbf{A} \mathbf{X} \mathbf{B} \mathbf{Y}^T \mathbf{C})
\end{split}
\end{equation}

Calculating these:

\begin{split}
    \frac{d}{d\mathbf{Y}} \text{Tr}(\mathbf{Y}^T \mathbf{A} \mathbf{X} \mathbf{B} \mathbf{X}^T \mathbf{C}) = \mathbf{A} \mathbf{X} \mathbf{B} \mathbf{X}^T \mathbf{C}
\end{split}

\begin{split}
    \frac{d}{d\mathbf{Y}} \text{Tr}(\mathbf{X}^T \mathbf{A} \mathbf{Y} \mathbf{B} \mathbf{X}^T \mathbf{C}) =& \frac{d}{d\mathbf{Y}} \text{Tr}(\mathbf{Y} \mathbf{B} \mathbf{X}^T \mathbf{C} \mathbf{X}^T \mathbf{A})\\
    =& (\mathbf{B} \mathbf{X}^T \mathbf{C} \mathbf{X}^T \mathbf{A})^T\\
    =& \mathbf{A}^T \mathbf{X} \mathbf{C}^T \mathbf{X} \mathbf{B}^T
\end{split}

\begin{split}
   \frac{d}{d\mathbf{Y}} \text{Tr}(\mathbf{X}^T \mathbf{A} \mathbf{X} \mathbf{B} \mathbf{Y}^T \mathbf{C}) = \frac{d}{d\mathbf{Y}} \text{Tr}(\mathbf{Y}^T \mathbf{C} \mathbf{X}^T \mathbf{A} \mathbf{X} \mathbf{B}) = \mathbf{C} \mathbf{X}^T \mathbf{A} \mathbf{X} \mathbf{B}
\end{split}

So the result is:

\begin{equation}
\frac{d}{d\mathbf{X}} \text{Tr}(\mathbf{X}^T \mathbf{A} \mathbf{X} \mathbf{B} \mathbf{X}^T \mathbf{C}) = \mathbf{A} \mathbf{X} \mathbf{B} \mathbf{X}^T \mathbf{C} + \mathbf{A}^T \mathbf{X} \mathbf{C}^T \mathbf{X} \mathbf{B}^T + \mathbf{C} \mathbf{X}^T \mathbf{A} \mathbf{X} \mathbf{B}
\end{equation}


问:
What are the necessary components to finding structures for a suitable language?

The Question (and its Answer)

We are given the following:

$$\sigma: (\forall x)(\exists y)[x < y \rightarrow x + 1 \neq y]$$

Now, in order to find the structure of a language that makes $\sigma$ true, we say the following:

We will work in $\mathcal{L}_{NT}$, and let:
$$ \mathfrak{} = (ℕ , 0 ,  , + ,  , < )$$

be the standard structure.

We will let $s$ be a variable assignment that will assign $v_i$ to number $i$. We can see that this makes $\sigma$ true.

The Problem:

It seems a bit too simplistic to be true that the aforesaid answer is sufficient structure of a language specifications to make $\sigma$ true. It feels like there must me other moving parts involved as well, and I'm not sure what those would be. Any ideas?

答:
If we want to have a "fully formal" proof that $\mathfrak N \vDash \sigma$, we have to apply the clauses of the satisfaction definition [see Leary, Def.1.7.4, page 29]:

$\mathfrak N \vDash \sigma \text {  iff for every  } n \in \mathbb N : \mathfrak N \vDash (∃v_2)[v_1 < v_2 → v_1+1 ≠ v_2][s(v_1 \mid n)]$,

where I've adopted the convention that $x$ is $v_1$ and $y$ is $v_2$.

This in turn implies:

$$\mathfrak N \vDash (∃v_2)[v_1 < v_2 → v_1+1 ≠ v_2][s(v_1 \mid n)] \text {  iff for some  } m \in \mathbb N : \mathfrak N \vDash (v_1 < v_2 → v_1+1 ≠ v_2)[s'(v_2 \mid m)]$$

where $s'(v_2 \mid m)$ is a "variant" of $s(v_1 \mid n)$.

What does it mean? Having chosen $n \in \mathbb N$ whatever, can we always find a suitable $m$ such that:

$(n < m → n+1 ≠ m)$

holds in $\mathbb N$?

The answer is: Yes. For $s(v_1)=n$ it is enough to choose $s'(v_2)=n+2$.

The variable assignment function [see Leary, Def.1.7.1, page 28] is a function that maps variables of the language to elements of the domain. Spercigfically, for the above question we have:

$s: \text {Var} \to \mathbb N$.

The symbols $s(v_1 \mid n)$ [see Def.1.7.2] is simply: $s(v_1)=n$.


问:
what is the area of face of the cube in $m^2$
A fly is trapped inside a hollow cube. It moves from A to C along edges of cube, taking shortest possible route. It then comes back to A again along edges, taking longest route(without going over any point more than once). If the total distance traveled is 5040 meter , what is the area of face of the cube in $m^2$ ?

Please check following drawing , you will understand about A & C

答:
If $A$ is adjacent to $C$, then the shortest path is a single edge.  The longest path visits all eight vertices, hence is seven edges long.  Together that's eight edges; if the total distance is $5040$ meters, then each edges is 630 meters long, which makes each cube's face $630^2=396900$ square meters, and the total cube surface area $2381400$ square meters.

Other cases ($A$ on the same face as $C$ but not adjacent, $A$ opposite from $C$), I leave for you to figure out.

More details as per request:
Again, for the case where $A,C$ are adjacent, the longest path is what's called a Hamiltonian path for a cube graph.  In fact, there's a Hamiltonian cycle, which returns back to the starting point.  The start and end point of the Hamiltonian path are adjacent, so for this case we can take a tour of all the other vertices along the way.  For the problem as given (where $A,C$ are on the same face but not adjacent), as @Guest points out you can't visit all the edges on the return trip.


问:
Find $\angle ADB$ where $\angle BAC = 18^\circ$, $\angle ABC = 12^\circ$ and $AB = CD$.
Let $\triangle ABD$ be a triangle and $C$ be a point on $BD$ such that $ {AB} ={CD}$, $\angle BAC = 18^\circ$ and $\angle ABC = 12^\circ$. The question is to find $x$, where $\angle ADC = x^\circ$.

I think this is a pretty classic problem but I am not able to find a solution using the techniques which were used to solve a similar kind of problem (only the angles were different and they were $30^\circ$ and $24^\circ$ respectively). The idea was to create an equilateral triangle by drawing a perpendicular line segment from $B$ to $AC$ with the same length as $AB$. However, that technique does not work here and I cannot find another way. Any help is appreciated (I forgot to add this but an answer which uses "geometrical" methods like drawing line segments or forming new triangles etc. would be great), thank you. The figure is as follows:

答:
While I was trying to correctly plot the angles in  $\triangle ABC$ I figured out that an easy way is to use a regular triangle and a regular pentagon.

In the figure below you can see that, drawing the regular triangle $\triangle BCE$ on $BC$ and a regular pentagon on $BE$, the vertex of the pentagon is indeed in $A$. In fact it is known that $\angle EAB=36°$ and $\angle ABE=72°$ (you can easily verify it using symmetries in the pentagon), so $\angle ABC=\angle ABE-\angle CBE=72°-60°=12°$ and $\angle CAB=18°$ as it bisects $\angle EAB$.

When I see pentagons, what comes to my mind are golden triangles and golden ratios: $\triangle ABE$ is a golden triangle so $AB$ and $BC=BE$ are in golden ratio.

So we can build the golden triangle $\triangle KBC$ over $BC$ with $BK=CK=AB$. But the nice thing about golden triangles is that they "sum up": the triangle with $BD=BC+CD$ as a side and $BK$ as base is again a golden triangle as $\angle KBD=\angle KBC=72°$ and $BD$ and $BK$ are in golden ratio. So $DK=BD$ and $\angle BDK=36°$.

Now we can use again an equilateral triangle: $AB=BK$ and $\angle ABK=60°$ so $AK=AB$, the triangles $\triangle ABD$ and $\triangle ADK$ are equivalent as their sides have the same length, and finally $\angle BDA$ bisects $\angle BDK$.

So the solution is $\angle BDA=18°$.


答:
I order the points $x_1<\ldots<x_n$ in this answer.

Your assumption for the minimization is correct. (In fact, if the points are distinct, left-to-right and right-to-left are the only two traversals of minimal length.)

Proof: Given any path which goes through all the points, the portion of its route which starts at one of $x_1$ or $x_n$ will have length at least equal to the distance $|x_1-x_n|$, by the triangle inequality. But the direct linear route you describe has exactly this distance, so it must be optimal.

In the maximization case, things are somewhat more complicated, but the sort of "zigzag" procedure you describe is optimal.

If $n$ is even, then we create a path by connecting $x_i$ to $x_{n+1-i}$ and $x_{n-i}$ for $1\le i<n/2$. We also connect $x_{n/2}$ to $x_n$. This creates a path between all nodes, which I claim is maximal.

If $n=2k+1$ is odd, then we create a path by connecting $x_i$ to $x_{n+1-i}$ and $x_{n-i}$ for $1\le i<k$. We also connect $x_{k}$ to $x_n$. I claim that either this path or its reflection by flipping our indexing of each $x_i$ and performing the same procedure is optimal, depending on whether $x_{k+1}-x_{k}$ or $x_{k+2}-x_{k+1}$ is larger (with the reflection being optimal if the former is larger).

To see why this is true, we count, for each segment between adjacent points in our interval, the number of times we walk across that segment. The total length of our path is just the sum, over each segment, of its length times the number of times we traverse it. The segment from $x_i$ to $x_{i+1}$ can be traversed at most $2i$ times, since we can only go back and forth once each from every one of the $i$ nodes left of it. By the same argument on the other side, the segment can be traversed at most $2(n+1-i)$ times.

Additionally, no segment can be traversed more than $n-1$ times, since there are only $n-1$ segments total, and if any segment is traversed that often, it is unique.

So, for example, if $n=7$ then the number of traversals of each of the 6 segments is bounded above by either $2,4,5,6,4,2$ or $2,4,6,5,4,2$. If $n=8$ it is bounded by $2,4,6,7,6,4,2$.

Then, to see that this path is maximal, we just observe that the described path traces over every segment a maximal number of times, so it is impossible to walk a longer path than they trace out.

Edit: I have included a diagram for $n=8$, to make the idea a little clearer. Above each segment between adjacent points is the number of times the path traverses that segment.

Title: A problem in discrete optimization

Body:
I am interested in the following problem and its generalizations. Say we are on the real axis, and we have $n$ points $x_1, \ldots, x_n$ on this line. I would like to minimize/maximize the length someone would walk to go through all of them in a certain order.

Intuitively, I feel:

to minimize, we can pass by all of them from the leftmost one to the rightmost one;

to maximize, we would need to do many "round-trips", going from a point more on the "left side" to a point on the "right side", etc. but I don't see in what order it is better to do it.

Is there a convenient way to write a proof of the minimization? And how to determine if the heuristic strategy I suggest in the second case works or can be improved.

Less trivially maybe, I am interested in an equivalent question in a two-dimensional disk.


问:
Questions about harmonic functions (Complex Analysis)
I was studying harmonic functions and had some confusions. A theorem was introduced which is: If $f(z) = u(x,y) + iv(x,y)$ is analytic, then $u$ and $v$ are harmonic functions. The proof was done by using the Cauchy-Riemann equations. So, if $u$ and $v$ satisfy the Cauchy-Riemann equations, they are harmonic. Is the converse true? If $u$ and $v$ are harmonic functions, do they satisfy the Cauchy-Riemann equations?

Another confusion is the conjugate harmonic function. If we have $u(x,y)$ which is harmonic, and if we can find a harmonic function $v(x,y)$ such that $u$ and $v$ satisfy the Cauchy-Riemann equations, then $v$ is the conjugate harmonic function of $u$. Is the converse also true? If $v$ is the conjugate harmonic of $u$, do $v$ and $u$ satisfy the Cauchy-Riemann equations?

Is it also true that if $u(x,y)$ and $v(x,y)$ is harmonic, then f(z) = $u(x,y)$ + $iv(x,y)$ is analytic? I know that if $u$ and $v$ are conjugate harmonic of each other, then $f(z)$ is analytic. But what if they aren't? And IF $u(x,y)$ and $v(x,y)$ are harmonic conjugates of each other, how do we decide which one of $u$ and $v$ gets to be the imaginary function of $f(z)$ if $f(z)$ is analytic.

答: If $u$ is real harmonic function on the entire complex plane then there is always  a harmonic conjugate $v$ but $v$ is only unique up to a  constant. $v$ is a harmonic conjugate of $u$ if and only if $u_x=v_y$ and $u_y=-v_x$ if and only if $u+iv$ is analytic.  It is impossible for $u$ and $v$ to be harmonic conjugates of each other except when they are both constants.


问:
If vector space has finite dimension, then algebra is finitely generated
Suppose we have a $\mathbb{K}$-vector-space $V$ which has finite dimension, so in particular $V=\langle v_1,\dots,v_n \rangle_{\mathbb{K}}$ ($V$ is generated as a vector space by $v_1,\dots,v_n$). Suppose $V \subseteq A$ where $A$ is a $\mathbb{K}$-algebra (commutative with $1$ and the scalar multiplication of $V$ is just the scalar multiplication of $A$). Then I claim that
$$ \langle V \rangle_A=\langle v_1, \dots, v_n \rangle_A $$
where we write $\langle B \rangle_A$ for the $\mathbb{K}$-algebra (commutative with $1$) generated by a set $B \subseteq A$. In particular, a finite dimensional vector space generates a finitely generated algebra.

Proof idea: Elements in $\langle V \rangle_A $ are of the form $\sum_{i=1}^m \alpha_i \cdot x_1 \cdots x_{m_i} + \sum_{k=1}^{l} \beta_k \cdot 1$ for $\alpha_i, \beta_k \in \mathbb{K},x_j \in V$ (where $1$ is the identity in $A$). All elements $x_j$ can be written as $x_j = \sum_{i=1}^n \gamma_{j,i} \, v_i$ for $\gamma_{j,i} \in \mathbb{K}$. Hence, all elements in $\langle V \rangle_A$ can be written as polynomials in $v_1,\dots,v_n$ over $\mathbb{K}$.

Is the statement above true? If so, do you know of any references for it?

答: The statement is true and the proof you gave works just fine. Here's another idea that requires writing fewer sums. $\langle B \rangle_A$ is the smallest $\mathbb K$ subalgebra of $A$ that contains $B$. So certainly $\langle v_1, \dots v_n \rangle_A \subseteq \langle V\rangle_A$. On the other hand, let $v\in V$. Then $v=\sum a_i v_i$ so $v \in \langle v_1,\dots,v_n\rangle_A$. Hence, $V\subseteq \langle v_1,\dots,v_n\rangle_A$ and we have $\langle V\rangle_A \subseteq \langle v_1,\dots,v_n\rangle_A \subseteq \langle V\rangle_A$. This is the desired equality.


问:
Square with equilateral triangle trig proof question

PQRS is a square with side lengths a, and PQT is an equilateral triangle.

This is a two part question, the first part of which was to find length TR, which I got as $a\sqrt{2-\sqrt{3}}$

The next part is to prove that $sin(15)=\frac 12 \sqrt{2-\sqrt{3}}$

I managed to do it in a really long and hideous way, finding the length TR (assuming that a = 1/2) and finding pretty much every possible angle and side, eventually realising that angle TRS is 15 degrees, and then doing some really messy trig and simplifying.

But I feel like there must be a shorter, nicer way. Any hints?

答:
Let $TA\perp PQ$ and $TB\perp SR$

Since $\triangle PTQ$ equilateral, $TA=\dfrac{a\sqrt3}{2}$ then $TB=a-\dfrac{a\sqrt3}{2}$

$$TR^2=TB^2+BR^2=(a-\dfrac{a\sqrt3}{2})^2+(\frac{a}{2})^2$$

$$TR=a\sqrt{2-\sqrt3}$$

Now, since $QT=QR$ , $\angle QRT=75$ and $\angle TRB=15$

$$\sin15= \frac{a-\dfrac{a\sqrt3}{2}}{a\sqrt{2-\sqrt3}}=\frac{2-\sqrt3}{2\sqrt{2-\sqrt3}}=\frac{\sqrt{2-\sqrt3}}{2}$$


问:
Yoneda embedding preserves finite coproducts
For the Yoneda Embedding, where $\mathcal{T}$ is an algebraic theory,
$$
Y_\mathcal{T}: \mathcal{T}^\mathrm{op} \to Alg \mathcal{T}
$$
it is claimed that $Y_\mathcal{T}$ preserves finite coproducts. The argument provided is as follows

I am not quite sure how the last line proves that $\mathcal{T}(t_1 \times t_2, -)$ is a co-product of $\mathcal{T}(t_1, -)$ and $\mathcal{T}(t_2, -)$. It seems that all that is shown is
$$
[Y_\mathcal{T}(t_1 + t_2), A] \cong [\mathcal{T}(t_1 \times t_2 , -), A]\cong A(t_1 \times t_2) \cong A(t_1) \times A(t_2) \cong [\mathcal{T}(t_1, -) , A] \times [\mathcal{T}(t_2, -) , A] \cong [\mathcal{T}(t_1, -)\times \mathcal{T}(t_2, -)  , A]\cong [Y_\mathcal{T}(t_1)\times Y_\mathcal{T}( t_2), A] .
$$
But I am not sure how to use that to show the claimed sentence.

答:
Your last two isomorphims are wrong, or more precisely, the second-to-last isomorphism is wrong. The universal property of the coproduct gives you an isomorphism
$$[\mathcal{T}(t_1, -) , A] \times [\mathcal{T}(t_2, -) , A] \cong [\mathcal{T}(t_1, -)+ \mathcal{T}(t_2, -)  , A] = [Y_\mathcal{T}(t_1)+Y_\mathcal{T}(t_2),A],$$
which concludes the proof.


问:
Prove existence of 2 distinct integer pairs with equal sum in a subset with cardinality $> 2\sqrt{n} + 1$
I hope somebody can help me with this question.

Let $A \subseteq \{1,2,...,n\}$ be a $k$-element subset with $k > 2\sqrt{n} + 1$. Show that there exist two distinct pairs $(a_1,b_1), (a_2,b_2) \in A\times A$ with $a_1 < b_2$ and $a_2 < b_2$ such that $a_1 + b_1 = a_2 + b_2$.

I think applying the pigeonhole principle might be one step to the solution. But, I can't figure out where to apply it. I tried to look at all possibilities to choose such pairs from $\{1,2,...,n\}$ and then to apply the principle. I could not figure out how.
Help or some hints would be much appreciated!

答:
The set $\{1,2,\dots, n\}$ has $2n-3$ possibles sums of differents terms (all numbers from 3 to 2n-1 are possible here), so, in $A$, you have at most $2n-3$ sums.

In the other hand, you have $\binom{k}{2}=\frac{k(k-1)}{2}>\frac{(2\sqrt{n}+1)(2\sqrt{n})}{2}=2n+\sqrt{n}$. This says that you have at least $2n+\sqrt{n}>2n-3$ forms to choose two terms of $A$ to sum, so, by the pigeonhole principle, there will be at least two pairs of different numbers in $A$ with the same sum.


问:
Can we derive bound for the subgradient of stochastic convex function from the bound for the subgradient of its sample function?
Suppose $f:\mathbb R^n\times\Omega\to\mathbb R$ is a function on $\mathbb
R^n$ and measurable space $\Omega$ such that for each $\xi\in\Omega$, $f(\cdot,\xi)$ is a convex function on $\mathbb R^n$. Our assumption here is that $\|\partial f(x,\xi)\|\leq M$ for every $(x,\xi)\in\mathbb R^n\times \Omega$, where $\partial f$ is understood as a set-valued mapping of $x$ and $\xi$ is fixed. And the norm of a set is defined as the maximal norm of its element. Of course, it's not hard to prove that $F(x):=E_{\xi}[f(x,\xi)]$ is convex but not necessarily real-valued. Nevertheless, we assume $F$ is real valued here. Hence $\partial F(x)$ is nonempty everywhere.

My question is that whether we have $\|\partial F(x)\|\leq M$ for every $x\in\mathbb
R^n$. This is claimed in some ML papers and textbooks, but unfortunately I haven't seen any rigorous proof so I am not convinced by this result. Can anyone help me to give a rigorous proof? Additional assumption can be added if necessary.

答:
This is true.

The key point to notice is that (what you meant by) $\|\partial f(x,\xi)\|\leq M$ is equivalent to function $f(\cdot,\xi)$ being globally $M$-Lipschitz, due to its convexity. From here, by the same argument, $\|\partial F(x)\|\leq M$.

Hope this helps.


问:
Difference between a vector function and parametric equations
What is the difference between a vector function and parametric equations? Both are capable of describing plane/space curves and both can indicate direction. The only notable difference I see is that a vector function includes a measured distance between a given point and the origin (magnitude of position vector that draws out a plane/space curve). </p>

答:
I used to think they are the same, but recently I found they are different, at least for the meaning of coplanarity. For example, suppose a vector function $r(t) = <f(t), g(t), h(t)>$ and a paramatric curve $(x, y, z) = (f(t), g(t), h(t))$.

When we say $r(t)$ lies on the same plane, we mean that all vectors determined by $r(t)$ are parallel to the same plane. This means that all points $(f(t), g(t), h(t))$ determined by position vectors of $r(t)$ and the origin lie on the sample plane.

When we say the paramatric curve $(x, y, z) = (f(t), g(t), h(t))$ lie on the same plane, we just mean that all points on the paramatric curve lie on the same plane. The plane deos not need to contain the origin.

Practically, to prove the curve determined by $r(t)$ lies on the same plane with normal vector $n$, one needs to prove $n\cdot r(t)=h$ where $h$ is a constant. To prove $r(t)$ lies on the same plane, one needs to prove  $ n\cdot r(t)=0$.


问:
find singular point and investigate its type for x^2 y" + (e^x-1)y' +(sin ^2 x)y=0 and Specify the answer form of y1(x), y2(x)
find singular point and investigate its type for
$$x^2y''+(e^x-1)y'+(sin^2x)y=0$$ and Specify the answer form of $y_1(x)$,$y_2(x)$

答:
Near $x=0$,$e^x-1 \approx x, \sin x \approx x$ one can write the given ODE as:
$$x^2y''+xy'+x^2y=0 \implies y''+\frac{1}{x}y'+y=0$$. So $x=0$,is regular sigular point. By putting $y=x^m$, we get indicial equation as $m^2=0$.
So the both indical roots are zero. By frobbenius mrthod $y_1(x)$ and $y_2(x)$ will  infinite series which are well behaved at $x=0$.


问:
Determine the convergence and divergence of $\int_0^1{\int_0^1{\frac{1}{x^{1-y}\left( 1-x \right) ^y}dxdy}}$
Determine whether $$\int_0^1{\int_0^1{\frac{1}{x^{1-y}\left( 1-x \right) ^y}\mathbb dx \mathbb dy}}$$
is convergent or divergent.

It looks like that it needs to be scaled by inequalities, but I failed. Can anyone help?

答: Not the simplest argument perhaps, but the inner integral (over $x$) is well-known: $$\int_0^1\frac{dx}{x^{1-y}(1-x)^y}=\mathrm{B}(y,1-y)=\Gamma(y)\Gamma(1-y)=\frac{\pi}{\sin\pi y},$$ and since $\int_0^1\frac{dy}{\sin\pi y}$ diverges, the original integral does as well (the integrand is positive).


问:
3-regular graph and two-way Euler circuit
A town-planner has built an isolated city whose road network consists of $2N$ roundabouts, each connecting exactly three roads. A series of tunnels and bridges ensure that all roads in the town meet only at roundabouts. All roads are two-way, and each roundabout is oriented clockwise.
Vlad has recently passed his driving test, and is nervous about roundabouts. He starts driving from his house, and always takes the first edit at each roundabout he encounters. It turns out his journey incluldes every road in the town in both directions before he arrives back at the starting point in the starting direction. For what values of $N$ is this possible?

I have tried to turn this into an equivalent graph theory problem in which we can apply some results on Euler circuits or similar, but with no such rephrasals seem useful. Any help appreciated!

答:
$\text{Partial answer}$

Let the vertices of our graph (the roundabouts) be $v_1,v_2,...,v_{2N}$. We will prove that every odd $N$ works and discuss about even $N$.

$\text{For odd }N$

Of course, cases $N=3$ and $N=5$ work ($N$ must be $\geq 2$ for the graph to make sense, so we cannot discuss about $N=1$). Here are $2$ configurations which show that $N=3$ and $N=5$ work:

We will now show that if $N_1$ and $N_2$ work, then $N_1+N_2+1$ works. Suppose we have $2$ graphs $G_1$ and $G_2$, one with $2N_1$ vertices and the other with $2N_2$ vertices, which both work. Select $2$ vertices which are connected from $G_1$, $v_1$ and $v_2$ and $2$ vertices that are connected from $G_2$, $u_1$ and $u_2$. Add $2$ more vertices, $w_1$ and $w_2$.

If we prove we can connect some vertices such that the new graph works (which has $2\cdot(N_1+N_2+1)$), we proved that if $N_1$ and $N_2$ are valid numbers, then so is $N_1+N_2+1$.

We will do the folowing operations:

erase the edge between $v_1$ and $v_2$

erase the edge between $u_1$ and $u_2$

connect $v_1$ and $w_1$

connect $v_2$ and $w_2$

connect $u_1$ and $w_1$

connect $u_2$ and $w_2$

connect $w_1$ and $w_2$

So from this initial configuration

we reach this configuration

I will not actually explain step by step why it works, but a simple analysis of the trip the car will make with these new little changes will, indeed, confirm that this new graph works.

Thus, $N_1$, $N_2$ work implies that $N_1+N_2+1$ works. We have shown $3$ and $5$ work, so every odd $N$ works. $\text{ }\blacksquare$

$\text{For even }N$

To my dissapointment, I have failed to come up with either a contradiction or a proof for one of the small cases. Note that is $2k$ is a solution, then any even number greater $\geq 2k+4$ is clearly a solution (using the above result, $N_1$ and $N_2$ work $\Rightarrow$ $N_1+N_2+1$ works).

$N=2$ clearly does not work and, well, for $N=4$ I spent about one hour testing configurations and didn't manage to find one that works. I do not think there is a way to prove such a graph exists without at least one example, which is nowhere to be found when $N$ is even, so I tried to prove that even $N$ does not work.

I tried several approaches such as edge colorings, invariants and some other tricks, but again I did not manage to get a contradiction. I just want to point out that it is impossible to control configurations while trying to disprove that even $N$. It is hard, just because you have to talk purely theoretically and you cannpt rely on any configuration. Take a look at this:

Suppose you are coming from the blue edge towards $v$. In the first case, you would leave on the green edge, $vv_1$4, but in the second case you would leave on the red edge $vv_2$:

That is why the positionning of the points is crucial, so disproving that even $N$ works is pretty hard, as we cannot make configuration-related observations.

To be honest, I am not even sure if even $N$ should or should not work. On one hand, out of the (ver very) many possible configurations, one might work, but on the pther hand, there might be a little condition which prevents it from working. I hope this "disection" of the problem helped in any way.


问:
Is there a category of partially defined binary operations?
A magma is a set $Y$ with a binary operation $m:Y \times Y \rightarrow Y.$ A partial magma is the same idea, but where the binary operation $m$ may not be defined on some pairs of elements of $Y.$ My question is, is there a category where the objects are partial magmas ? If there is such a category then I would like to know how the arrows are defined, whether the category has any nice properties, and whether there is any literature about the idea. Although any information would be most welcome.

答:
This answer contains three separate ways to do this.

First: a partial magma could be defined as a set $Y$, together with a function $m\colon Y\times Y \to Y + 1$ representing the binary operation, where $1$ is the one-element set and $+$ is the coproduct of sets (disjoint union).

This suggests that a natural notion of morphism between partial magmas $(Y,m)$ and $(Y',m')$ would be a function $f\colon Y\to Y'$ such that $f(m(x,y)) = m'(f(x),f(y))$, for all $x,y\in Y$, as you suggested in the comments.

Another option, which I think is more natural, is to define it as a magma in the category of partial maps. To define that category, take the objects as sets and let a morphism $f\colon X\to Y$ be any function $f\colon X\to Y+1$, so it either returns an element of $X$ or a special element meaning "undefined", which I'll write as $\bot$. Define composition as
$$(f;g)(x) = \begin{cases}
\bot &\text{if $f(x)=\bot$}\\
g(f(x)) &\text{otherwise.}
\end{cases}
$$
This is the Kleisli category of what Haskell people call the Maybe monad. We can make it into a symmetric monoidal category by letting $\otimes$ be the Cartesian product of sets on objects, and letting
$$
(f\otimes g)((x,y)) = \begin{cases}
\bot &\text{if $f(x)=\bot$ or $g(y)=\bot$}\\
(f(x),g(y)) &\text{otherwise.}
\end{cases}
$$

A magma in this category consists of a set $Y$, together with a partial map $m\colon Y\times Y\to Y$, so it's also a partial magma as you defined it. But now a magma homomorphism from $(Y,m)$ to $(Y',m')$ is a partial function $f\colon Y\to Y'$, such that $f(m(x,y)) = m'(f(x),f(y))$ for all $x,y\in Y$. The difference between this and the other construction above is that $f$ is a partial function, so that $m'(f(x),f(y))$ is allowed to be undefined even if $m(x,y)$ is defined.

As well as seeming more natural, this second solution is probably easier to work with. Being a magma in some category means that many of the things you can prove about magmas will also be true of partial magmas, since the proof will still work unless it relies on some specific property of $\mathsf{Set}$ that isn't shared by the category of partial maps.

It occurs to me that you might want something different to either of the above. You mentioned in a comment that you want to generalise categories, where you see composition as a partial magma on the set of morphisms. In that case it seems like you would want a functor to be a special case of a magma morphism. But functors behave kind of opposite to what I just described. You can have morphisms $f$ and $g$ that aren't composable in a
category $\mathscr{C}$, but their images under a functor $F\colon\mathscr{C}\to\mathscr{D}$ are composable in $\mathscr{D}$. But you can't have it the other way around - if two morphisms are not composable in $\mathscr{D}$ then they also have to be non-composable in $\mathscr{C}$.

So perhaps you want a morphism to be a function (not a partial function) $f\colon Y\times Y\to Y$, such that if $m'(f(x),f(y))=\bot$ then $f(m(x,y))=\bot$, otherwise $f(m(x,y))=m'(f(x),f(y))$.

I don't currently know a more abstract way to construct that, or have much intuition about its properties. I'll think about it.


问:
Evaluate $\lim_{n\to\infty} \frac{b_n}{n}$
define a sequence $a_n = (1-a_{n-1})(1-a_{[n/2]})$ where $[k]$ represents the largest integer $s\leq k$ and $a_1 = 1$. Furthermore, define $b_n = \sum_{k = 1}^{n} a_k$. Evaluate $$\lim_{n\to\infty} \frac{b_n}{n}.$$
For now I have been able to prove by contradiction that $a_k = 1 \implies k \equiv 0$ (mod 2) and by writing a simple python program I realised the expression seems to tend to $1/3$. How can this result be proven mathematically?

答:
Observe $a_n$ series peacefully that series look like as shown below:
$10010100010001010100010101000100010001010100010001000101010001010...$

So when we will be solving for limit $n→∞$ it should be equal to $W/n$ where $W$ is the total number of '1' that occurred in the series so our aim is to generate a formula that can help us to find $W$.

We will try different values of n to understand how limit approaches to 1/3 as shown below:

TRIAL 1 $n=10$ then W=4 hence $lim_{n→∞}{{b_n/n}} $ approximate to 4/10

TRIAL 2 $n=100$ then W=34 hence $lim_{n→∞}{{b_n/n}} $ approximate to 34/100

TRIAL 3 $n=1000$ then W=334 hence $lim_{n→∞}{{b_n/n}} $ approximate to 334/1000

TRIAL 4 $n=10000$ then W=3333 hence $lim_{n→∞}{{b_n/n}} $ approximate to 3333/10000

TRIAL 5 $n=100000$ then W=33335 hence $lim_{n→∞}{{b_n/n}} $ approximate to 33335/100000

Ok so now we understood why answer is $0.3333333333333333333333.....$ for n approaching to infinity.

Now assume you have calculated out $f(n)$ which help us to find $W$ so divide it by n to get your answer :).

Try for $f(n)$ if you are not getting I am still here to help in the comment section.


问:
Integral of the min() between sec() and csc()
I am trying to understand the equations from a paper. basically the paper defines:

$$\rho = r_m(\varphi) = \frac{1}{2}\lim_{n\to+\infty}\left(|\cos{\frac{m\varphi}{4}|^n}+|\sin{\frac{m\varphi}{4}}|^n\right)^{-\frac{1}{n}}=\frac{1}{2}\min{\left(\left|\sec{\frac{m\varphi}{4}}\right|,\left|\csc{\frac{m\varphi}{4}}\right|\right)}\label{1}(1)$$
$$A_m = \frac{1}{2}\int_{0}^{2\pi} r_m^2(\varphi) \,d\varphi ~(2)$$

The authors conclude that $A_m$ is equal to 1. They replace (1) in (2) to do so. To my understanding I would need to divide the integral in intervals where sec > csc and where sec < csc. However, it seems that I lack some trigonometry simplification to achieve the same result, as my development of the equations is getting quite big for the result given from the authors. Can anyone point me the realization I must have been missing?

答:
If you set $r_m(\varphi)=\frac{1}{2}\min{\left(\left|\sec{\frac{m\varphi}{4}}\right|,\left|\csc{\frac{m\varphi}{4}}\right|\right)}$, notice that this function is periodic with the period $\frac{2\pi}{m}$ because $\min{\left(|\sec\varphi|,|\csc\varphi|\right)}$ is periodic with the period $\frac{\pi}{2}$.

This means that

$$2A_m=\int_{0}^{2\pi}r^2_m(\varphi)d\varphi=m\int_0^{2\pi/m}r^2_m(\varphi)d\varphi=m\int_0^{2\pi}r^2_1(\psi)\frac{1}{m}d\psi=\int_0^{2\pi}r^2_1(\psi)d\psi$$

(taking substitution $\psi=m\varphi$ in the second step, and taking the integral of a periodic function over $m$ periods in the first step).

So the value of the integral does not depend on $m$, and you can just calculate it for the case you find the easiest (e.g. $m=1$). I guess this simplifies the problem enough for you to complete it, if not, please let me know.


问:
$\sum_{d|n} \sigma(d)=\sum_{d|n} \frac{n}{d}\tau(d)$
The question is to show that:
$$\sum_{d|n} \sigma(d)=\sum_{d|n} \frac{n}{d}\tau(d)$$

I checked For any positive integer $n$, show that $\sum_{d|n}\sigma(d) = \sum_{d|n}(n/d)\tau(d)$
And I understood what he was doing but I didn’t get how he concluded the result
Can someone explain?

答:
I am not sure what you didn't understand so I will just prove it again here.

$$S=\sum_{d|n}\sigma(d)=\sum_{d|n}\sum_{q|d}q$$

So how many times does an integer $q$ appear in the sum? Each time $q$ divides one of the divisors on $n$. (Notice that $q$ is also a divisor of $n$) So our sum is equal to $$S=\sum_{d|n}d\cdot(\text{the number of divisors of }n\text{ which are divisible by }d)$$ So how mant divisors of $n$ are divisible by $d$? Well let such a divisor be $d\cdot k$. Then, $d\cdot k|n$ so $k|\frac{n}{d}$, so the number of divisors of $n$ that are divisible with $d$ is, in fact, the number of divisors of $\frac{n}{d}$, which gives us $$S=\sum_{d|n}d\cdot\tau\big(\frac{n}{d}\big)$$ which is what we wanted to prove.


问:
Calculus and integration
Hi I recently read one that the domain of an accumulation function is always an open interval this does not quite make sense to me for example why can't the domain be a closed interval some help would be appreciated as I've been confused for a while</p>

答:
Let $f:I \to \mathbb R$ be a integrable function ,where $I$ is an interval in $ \mathbb R$,  then a function $F$ of the form

$$F(x) = \int_\xi^x f(t)dt$$

is called an accumulation function, where $\xi \in I$ and $x \in I$.

The interval $I$ has not to be open, $I$ can be an interval of any form $(a,b), (a, \infty), [a,b]$, ...... .

Title: Calculus and integration


问:
what is the area of face of the cube in $m^2$
A fly is trapped inside a hollow cube. It moves from A to C along edges of cube, taking shortest possible route. It then comes back to A again along edges, taking longest route(without going over any point more than once). If the total distance traveled is 5040 meter , what is the area of face of the cube in $m^2$ ?

Please check following drawing , you will understand about A & C

答: It is easy to see that $6$ edges are traversed for the complete round trip. Mathematically, if $x$ is the length of each edge, then $6x=5040 m$ which implies $Area of Face=x^2=(840)^2=705600$.</p>


问:
Solution for a second order differential equation
I am looking for a hint for the solution of $y''=\frac{6}{x}y$ without using the power series. Thanks for any help.

答:
$$y''-\frac{6}{x}y=0$$
This is an ODE of the Bessel kind.

See Eqs.(6) and (7) in  https://mathworld.wolfram.com/BesselDifferentialEquation.html

With the notations used in Eq.(6) :

$$\begin{cases}
2\alpha-1=0\\
2\gamma-2=-1 \\
\beta^2\gamma^2=-6\\
\alpha^2-n^2\gamma^2=0
\end{cases} \quad\implies\quad
\begin{cases}
\alpha=\frac12\\
\gamma=\frac12\\
\beta=2i\sqrt{6}\\
n=1
\end{cases} $$
The solution Eq.(7) is :
$$y=A x^{1/2}J_1\left(2i\sqrt{6}\:x^{1/2}\right)+B x^{1/2}Y_1\left(2i\sqrt{6}\:x^{1/2}\right)$$
$A,B$ are real or complex constants. $J_1$ and $Y_1$ are respectively Bessel funnctions of first and second kind.

Equivalent in real domain :
$$\boxed{y=c_1 x^{1/2}I_1\left(2\sqrt{6}\:x^{1/2}\right)+c_2 x^{1/2}K_1\left(2\sqrt{6}\:x^{1/2}\right)}$$
$c_1,c_2$ are constants. $I_1$ and $K_1$ are respectively modified Bessel functions of first and second kind.

https://mathworld.wolfram.com/ModifiedBesselFunctionoftheFirstKind.html

https://mathworld.wolfram.com/ModifiedBesselFunctionoftheSecondKind.html

NOTE :
The original ODE can be transformed to the standard form of Bessel ODE with change of variables : $x=a\:z^b$ and $y(x)=z^c f(z)$ . In putting them into the original ODE one can determine $a,b,c$ so that $f(z)$ be solution of the standard form of Bessel ODE. This is a classical boring calculus.


问:
Finding probability $P({X}^{2}<0)$.
Probability density function of random variable $X$ is ${f}_{X}(x)=\frac{1}{2\theta}$ where $-\theta <x<\theta $ . Calculate probability $P({X}^{2}<0)$.

I'm little bit confused. I thought that ${X}^{2}$ is never less than $0$ so $P(\oslash )=0$, is it true? Any idea will be appreciated.

答:
I solve the first part but the second part, I'm little bit confused

You are perfectly right.

as $X^2\geq 0$, $\forall X$ the requested probability is zero

Perhaps there is a typo....you can calculate $P(X^2<\theta)=\theta^{-\frac{1}{2}}$

(this makes sense and the question looks similar to the one you posted)

Title: Finding probability $P({X}^{2}<0)$.


问:
Find an orthogonal basis for the subspace described by $x − y − z = 0$.
Find an orthogonal basis for the subspace described by $x − y − z = 0$.

First, find two linearly independent vectors in the span of the subspace above.

$v_1=\begin{pmatrix} 1\\ 1\\0 \end{pmatrix}$ $v_2=\begin{pmatrix} 1\\ 0\\1 \end{pmatrix}$

Then find the projection of $v_2$ on to $v_1$. this equals $\frac{v_2⋅v_1}{v_1⋅v_1}v_1=\begin{pmatrix} 1/2\\ 1/2\\0 \end{pmatrix}$

Now I need to find the orthogonal component. $\begin{pmatrix} 1\\ 0\\1 \end{pmatrix}-\begin{pmatrix} 1/2\\ 1/2\\0 \end{pmatrix}=\begin{pmatrix} 1/2\\ -1/2\\1 \end{pmatrix}$

Therefore, the orthogonal basis for the subspace is $\begin{pmatrix} 1\\ 1\\0 \end{pmatrix},\begin{pmatrix} 1/2\\ -1/2\\1 \end{pmatrix}$

Questions: Did I do this correctly? Do my steps make sense? Alternative solutions?

答:
Equation of the surface is $x-y-z=0$.

We have two independent variable here let us take them $x,y$ so we determine $z$ from this. By this you got $v_1=\begin{pmatrix} 1\\ 1\\0 \end{pmatrix} $, Now take assume another vector which is orthogonal to it, let it be $\begin{pmatrix} x\\ y\\z \end{pmatrix}$ so $x.1+y.1+z.0=0$ so $x+y = 0$,(the dot product must be zero) . Also it has to satisfy $x-y-z=0$. So we get $z=-2y, x=-y$ . Here only one independent variable so it is a straight line.
So we can take this vector as $v_2=\begin{pmatrix} 1\\ -1\\2 \end{pmatrix} $


问:
prove that $||d^2f(x)||\le M \Rightarrow ||df(x)||\le \sqrt{2Mf(x)}$
let E be a banach space  , $f : E \to \mathbb R$ a function of $C^2$ / $f>0$ we suppose that $\exists M $ cte and  :

$||d^2f(x)||\le M $

prove that :

$||df(x)||\le \sqrt{2Mf(x)}$

答:
Suppose to the contrary that there is $x_0$ such that $\|df(x_0)\|>\sqrt{2Mf(x)}$. Then there is a unit vector $v$ such that the one-dimensional restriction $\varphi(t)=f(x_0+tv)$ satisfies $$\varphi'(0)<-\sqrt{2M\varphi(0)}\tag{why?}$$ Now the Banach space disappears from the picture: we have a problem about a $C^2$ function $\varphi:\mathbb R\to\mathbb R$ which is positive and satisfies $|\varphi''(t)|\le M$ for all $t$.

A couple of hints for what to do next: (i) for all $t\in\mathbb R$

$$ \begin{split} 0 < \varphi(t) &=\varphi(0)+ \varphi'(0)\, t+\int_0^t (t-s)\varphi''(s)\,ds
\\ &\le \varphi(0)+ \varphi'(0)\, t+ \int_0^t (t-s)M\,ds \end{split}
\tag{why?} $$
(ii) when a quadratic polynomial is always positive, something can be said about its coefficients.


问:
what does the sum of 3 sides of a 3-d rectangular box mean?
I want to understand what knowing "the sum of 3 sides of a 3-d rectangular box" means.

The question was from my job interview. I didn't really understand what they meant but later, I just had an idea that the company is an organization for a fulfilment warehouse business and they need to calculate for the right box to contain items.

After the interview, I went to the company's website and they were saying the cover boxes to contain items are selected by the sum of 3 sides of a 3-d rectangular box. What is a value of a side, here?

----------------------------------------------------Updated------------------------------------------------------

But by knowing the sum of 3 sides of a 3-d cover box, how do we know an item can be contained in the a bigger 3-d box?

----------------------------------------The way I have understood ------------------------------------------

They say "the sum of 3 sides" and my understanding of the sum of 3 sides is that each side has its own length and each side of the cover box must be bigger than the item case, otherwise the item cannot fit in the cover box.

Can somebody tell me what it means? and I am not sure the way I interpret is correct or not.

答: It's $w+h+d$ where $w$ is the width, $h$ is the height and $d$ is the depth of the box.


问:
Convergence of finite difference scheme for PDE $u_t+au_{xxx}=f$
From J.C. Strikwerda's book Finite Difference Schemes and Partial Differential Equations (SIAM), p. 57:

2.2.5. Show that the scheme $$
\frac{v_m^{n+1} - v_m^n}{k} + a\frac{v_{m+2}^{n}- 3 v_{m+1}^{n} + 3 v_m^n - v_{m-1}^{n}}{h^3} = f_m^n
$$
is consistent with the equation
$$ \left[ u_t+au_{xxx}=f \right] \tag{2.2.15}$$
and, if $\nu = kh^{-3}$ is constant, then it is stable when $0\leq a\nu \leq 1/4$.

Actually, I know how to solve this problem when $f=0$, consistency condition ($Pu-p_{k,h} u$ converges to zero as $k,h$ tend zero).

How can I deal with $f(t_n, x_m)$ in this case?! I think we need grid function instead of $f(t_n, x_m)$. can I suppose $f(t_n, x_m) =g^n \exp( imhs)$?

How to solve the stability part by using von Neumann analysis? Could you help me? Thank you in advance.

答:
For the consistency part, expand $v_m^{n+1}$ and $v_{m+M}^{n}$ as Taylor series about $v_{m}^{n} \simeq u(mh,nk)$
to be inserted in the scheme. As discussed in Definition 1.4.2 of the book by Strikwerda, the source $f$ does not matter in the definition of consistency. Thus,
$$
\frac{v_{m}^{n+1} - v_{m}^{n}}{k} \simeq (u_t)_m^n + O(h,k)
$$
$$
\frac{v_{m+2}^{n} - 3 v_{m+1}^{n} + 3 v_{m}^{n} - v_{m-1}^{n}}{h^3} \simeq (u_{xxx})_m^n + O(h,k)
$$
proves that the scheme is consistent.

As usual, the Von Neumann analysis consists in a Fourier transformation of the scheme (see Sec. 2.2 of the book by Strikwerda), and the source $f$ can be ignored. Under the periodicity assumption, we have $$
v_m^{n} = \frac{1}{\sqrt{2\pi}}\int_{-\pi/h}^{\pi/h} \text{e}^{\text{i}mh\xi}\, \hat{v}^n(\xi) \, d\xi
$$
to be injected in the scheme. This step defines the amplification factor $g(\theta)$ to be determined, which is defined in such a way that $\hat{v}^{n+1}(\xi) = g(h\xi) \, \hat{v}^{n}(\xi).$ Neumann stability imposes $|g(\theta)| \leq 1$.


问:
A question concerning polynomial solvable by radicals
We know from Galois Theory that a polynomial is solvable by radicals if and only if its Galois group is solvable. On the other hand solvable by radicals for example means that the equation $X^n-1=0$ is always solvable by radicals (its Galois group is abelian), but this only means that we can find a solution by saying it is $1^{1/n}$, which is a radical. As for $n\le 6$ we can find its solution in the form $a+ib$ where $a,b$ are representable by real radicals. I guess this is not always possible for larger $n$. (I can see how it could be up to $n\le10$, but any higher?) Is there a theory concerning this kind of problem (whether a polynomial can be solved by "real radicals")?</p>

答:
Since $1^{1/n} = 1$ there is no parameter to vary express the other roots of unity. This does not give the solutions to $x^n-1=\prod_{d|n}\Phi_d(x)=0$ it only solves one of the factors $(x-1)$.

One can express primitive roots of unity ($\Phi_n(x)=0$) in terms of smaller primitive roots, which may be varied, producing all $\varphi(n)$ primitive $n$th roots of unity.

This is in simultaneous induction with nonconstructive proof that solvable Galois group means solvable in radicals, or what it really says: Solvable Galois group means the number field is a sequence of roots radical extension and roots of unity extensions.

See a basic Galois theory textbook for Casus Irreducibilis regarding the fact that you need to have imaginary numbers as an intermediate in Cardano's formula. The theory on that is general so you can apply it to all cases.


问:
prove the following linear functional is not induced by measure
Let the linear functional $I$ below defined on $C^1_c(\mathbb{R})$. as follows:

$$I(f) = \frac{df}{dx}(0)$$

Prove it's not induced by a measure,or even signed measure.that is no such measure makes $I(f) = \int fd\mu = \frac{df}{dx}(0)$.

I try to use sequence of function $f_n$ such that makes $\frac{df_n}{dx}(0) \to \infty$,but the total mass of $\int f_nd\mu \to 0$ ?If exist such measure it can not be the Lebesgue measure ,since we can construct such function,can it holds for some other measures?

答:
Assume that there is some (positive) measure $\mu$ that induces this functional. Clearly $\mu\ne0$.

Take $f_n(x)$ a function such that

$f_n(x)=1$ if $x\in[-n,n]$.

$f_n(x)=0$ if $x\notin [-n-1,n+1]$.

$f_n\in{\cal C}^1(\Bbb R)$.

$0\le f_n(x)\le 1$ for all $x\in\Bbb R$.

Then $I(f_n)=f_n'(0)=0$, obviously.

On the other hand,
$I(f_n)=\int_{\Bbb R} f_nd\mu \ge \int_{(-n,n)} f_n d\mu=\int_{(-n,n)}d\mu=\mu(-n,n)
$.

So $\mu(-n,n)=0$ for all $n\in\Bbb N$; and since $\Bbb R=\bigcup_n (-n,n)$, by subaditivity, $\mu(\Bbb R)\le \sum_n \mu(-n,n)=0$, so $\mu=0$, wich is a contradiction.


问:
Gegenbauer polynomials' coefficients and Gamma function
There is something that I don't understand about the coefficients of the Gegenbauer polynomials, and it is related to the gamma function.

Recall that the Gegenbauer polynomial for parameters $\alpha \in \mathbb{C}, n \in \mathbb{N}\cup\{0\}$ is
$$
C_n^\alpha(z) = \sum_{k = 0}^{[n/2]}(-1)^k\frac{\Gamma(n-k+\alpha)}{\Gamma(\alpha) k!(n-2k)!}(2z)^{n-2k}
$$
(https://en.wikipedia.org/wiki/Gegenbauer_polynomials)

Why does this expression make sense for any $\alpha \in \mathbb{C}$ if the gamma function has poles on the non negative integers?

In the wikipedia page, the first Gegenbauer polynomials are computed, but I don't understand the computation in the following sense.
For example, take n = 2. We should have:
$$C_2^\alpha (z)= 2\frac{\Gamma(\alpha + 2)}{\Gamma(\alpha)} z^2 -\frac{\Gamma(\alpha + 1)}{\Gamma(\alpha)}$$
But why is this equal to $2\alpha(\alpha + 1)z^2 - \alpha$? (as it's written in the wikipedia)

As far as I know, the expression $\Gamma(z+1) = z\Gamma(z)$ only makes sense for $z\in \mathbb{C}, z\neq 0, -1, -2, -3, \dots$

Am I missing something?

I know that the Gegenbauer polynomials are defined for any $\alpha \in \mathbb{C}$ since I read it in several books; and in every one the same formula is written (by using the gamma function).
Take for example the book: Conformal symmetry breaking operators for differential forms on spheres, by T. Kobayashi, T. Kubo and M. Pevzner.

Any comment is highly appreciated.

答:
the ratio $\Gamma(z +1) / \Gamma(z)=z$ is valid in the limit also for $z=0, -1,\cdots$ , that's similar to the fact of taking $\sin z/z$ to be 1  at $z=0$.

Then $\Gamma(z +n) / \Gamma(z)=z(z+1)\cdots (z+n-1)=z ^{\overline{\, n \,}}\quad |\,0 \le n \in \mathbb Z$ is a polynomial considered to valid on all $\mathbb C$.

In another way, instead of $\Gamma(n-k+ \alpha)/ \Gamma(\alpha)$ put $\alpha ^{\overline{\, n-k \,}}$.


问:
Almost sure convergence of sum of independent Bernoullis
Let $X_n$ be independent random variables where $X_n \sim Bernoulli(\frac{1}{n})$. I'd like to show that $Y_n = \frac{1}{\log(n)}\sum_n{X_n}$ converges to $1$ almost surely.

My idea is to first show that $Y_n$ converges to $1$ in probability, and then to use Kolmogorov's convergence criterion to show that the convergence is almost sure as well.

However, I'm running in problems even in showing the convergence in probability. I'm trying to use the bound $\log(n) + \frac{1}{n} \leq \sum_{j=1}^{n}{\frac{1}{j}} \leq \log(n) + 1$ in tandem with Markov's inequality, but the absolute value in the Markov inequality is killing me.

$P(|Y_n - 1| \geq \epsilon) \leq \frac{\mathbb E[|Y_n - 1|]}{\epsilon} \leq \frac{\mathbb E[Y_n] + 1}{\epsilon}$, but of course this bound is not good enough. If I didn't have to worry about the absolute values, I would be able to use the upper bound from above, but I'm not sure how to proceed at this point.

Does this look like a logical approach? I think that the second half of the proof might be a bit easier, since Kolmogorov's criterion just needs me to check that the sums of the means and variances converge...

答:
Too long for a comment, only partial answer:

You had a good idea about using inequalities, because in fact convergence almost surely is really connected with probabilities $$ \mathbb P(|Y_n - 1| > \varepsilon)$$ The key point is to use proper inequality here. You said Markov, which gives you bound of type $$ \frac{\mathbb E[|Y_n-1|]}{\varepsilon} $$ which is rather hard to deal with due to this absolute value. It can be shown that $$ \mathbb E[Y_n] = \frac{1}{\ln(n)} \sum_{k=1}^n \mathbb E[X_k] = \frac{1}{\ln(n)} H_n $$ where $H_n$ is $n'$th Harmonic number. Having said that, we would rather compare $$ \mathbb P(|Y_n -1 | > \varepsilon) \le \mathbb P(|Y_n - \frac{H_n}{\ln(n)}| > \eta)$$ for apriopriate $\eta > 0$. But which one would work? Let's take a look. If $|Y_n - \frac{H_n}{\ln(n)}| > \eta$, then $ |Y_n - 1| + |1-\frac{H_n}{\ln(n)}| > \eta$, too, due to triangle inequality. So that $\eta = \varepsilon - |1 - \frac{H_n}{\ln(n)}| $ will be a good choice (we can always (for fixed $\varepsilon >0$) find $N$ big enough such that for $n>N$ our $\eta$ is bigger than $0$ and everything's okay.

This is crucial, because from $\mathbb P(|X-a|>t)$ for some $a$, we arrived at $\mathbb P(|X-\mathbb E[X]| > s)$ which gives us a big opportunity to use Chebyshev.

Hence $$ \mathbb P(|Y_n - 1| > \varepsilon) \le \mathbb P(|Y_n - \mathbb E[Y_n]| > \eta_n) \le \frac{Var(Y_n)}{\eta_n^2} = \frac{Var(\sum_{k=1}^n X_k)}{\ln^2(n)\eta_n^2} = \frac{H_n}{\ln^2(n)\eta_n^2}$$

which gives us convergence in probability.

Not connected to convergence almost surely, but Note that due to Lyapunov inequality ($\mathbb E[|Z|]^2 \le \mathbb E[Z^2]$) we get$$ \mathbb E|Y_n-1| \le \mathbb E|Y_n - \frac{H_n}{\ln(n)}| + |\frac{H_n}{\ln(n)}-1| \le \sqrt{Var(Y_n)} + |\frac{H_n}{\ln(n)}-1| \to 0$$ so $Y_n$ converges to $1$ in $L_1$.


问:
How many ordered pairs $(x,y)$ satisfy the property $|x|+|y|\lt2019$?
How many ordered pairs $(x,y)$ satisfy the property $|x|+|y|\lt2019$? There must be a shorter way to get an answer here. $x$ and $y$ are natural numbers.

答: Looking at smaller cases, $$x=1 \implies y=1,2,3... 2017 \\ x=2\implies y=1,2,3...2016 $$ and in general for a given $x\in [1,2017]$, $y$ can range from $1$ to $2018-x$, so we just want $$\sum_{x=1}^{2017} 2018-x = 2035153$$


问:
Are the graphs of these two functions equal to each other?
The functions are: $y=\frac{x^2-4}{x+2}$ and $(x+2)y=x^2-4$.

I've seen this problem some time ago, and the official answer was that they are not.
My question is: Is that really true?

The functions obviously misbehave when $x = -2$, but aren't both of them indeterminate forms at that point? Why are they different?

答:
$(1)$The first function is undefined at $x = -2$,

$(2)$ the second equation is defined at $x = -2$:

$$(x + 2) y = x^2 - 4 \iff xy + 2y = x^2 - 4\tag{2}$$ It's graph includes the entire line $x = -2$. At $x = -2$, all values of y are defined, so every point lying on the line $x = -2$: each of the form $(-2, y)$ are included in the graph of function (2). Not so with the first equation.

ADDED:

Just to see how well Wolfram Alpha took on the challenge:

Graph of Equation $(1)$: (It fails to show the omission at $x = -2$) But it does add:

Graph of Equation $(2)$:

Note: The pair of graphs included here do not match in terms of the scaling of the axes, so the line $y = x - 2$ looks sloped differently in one graph than in the other.


问:
Finite Expectation implies X is finite proof
I was wondering if my proof was satisfactory to prove:
\begin{equation}
     \text{If } X\geq0 \text{ and } \mathbb{E}(X)<\infty, \text{ then } \mathbb{P}(X<\infty) = 1
\end{equation}
My proof:

For contradiction, suppose $\mathbb{P}(X< \infty) = 0$, then
\begin{equation}
    \mathbb{P}(X = \infty) = c
\end{equation}
for some $c \in (0,1]$ and

\begin{equation}
    \mathbb{E}(X) = \sum_{x\in X(\omega)} x\mathbb{P}(X=x) = \left( \sum_{x\in X(\omega)\setminus k} \mathbb{P}(X=x) \right) + k\mathbb{P}(X=k) = \infty
\end{equation}
as $k \to \infty$
hence contradiction.

答:
This works only for discrete random variables. But it is not given that $X$ is discrete.

In the general case use integrals: If  $P(X=\infty)>0$ then $EX \geq EXI_{X=\infty} =E(\infty I_{X=\infty})=\infty$.


问:
Basis for the null space of the vectorized identity matrix
Let $\mathbf{I}_N$ be the $N \times N$ identity matrix. Let us define the $1 \times N^2$ matrix $\mathbf{A}$ as:
\begin{equation}
\mathbf{A} = \mathrm{vec}(\mathbf{I}_N)^T
\end{equation}
where $\mathrm{vec}$ is the column-wise vectorization operator.

Which is an orthonormal basis for the null space of $\mathbf{A}$?

答:
So if I understood what you meant, we're talking about the matrix

$$A=\left(\,1,\overbrace{0,...,0}^{n-1\,\text{places}},0,1,\overbrace{0,...,0,0}^{n-2\;\text{places}},0,0,1,0,...,1\,\right)$$

and you thus want an orthonormal basis for the solution space of the homogeneous linear system of equation determined by that matrix, i.e. for the solution space of

$$x_1+x_{n+2}+x_{2n+3}+\ldots+x_{n^2}=0$$

This homogeneous system of one equation in $\;n^2\;$ unknowns have $\;n^2-n\;$ variables equal to zero:

$$x_2=x_3=\ldots=x_{n+1}=x_{n+3}=\ldots=x_{n^2-1}=0$$

and the general solution is given by the hyperplane of dimension $\;n-1\;$

$$M:=\left\{(x_1,...,x_{n^2})^t\in\Bbb F^{n^2}\;|\;x_1+x_{n+2}+\ldots+x_{n^2}=0\,,\,\,x_k=0\,,\,\,k\neq1, n+2, 2n+3,...,n^2\right\}\;$$

A basis for that, as we know from general hyperplanes(=kernels of linear functionals) is

$$\left\{\,(v_1, v_2,..., v_{n-1})\,\right\}\,,\,\,\text{with}\;v_1=\left(\,1,\overbrace{0,...,0}^{n-0\,\text{places}},0,0,\overbrace{0,...,0,0}^{n-2\;\text{places}},0,0,0,0,...,-1\,\right)$$

$$v_2=\left(\,0,\overbrace{0,...,0}^{n-1\,\text{places}},0,1,\overbrace{0,...,0}^{n-2\;\text{places}},0,...,-1\,\right)\,,\ldots,v_{n_1}=\left(\,0,\overbrace{0,...,0}^{n-1\,\text{places}},0,\overbrace{0,...,0}^{n-2\;\text{places}},0,1,0,...,-1\,\right)$$

If you "erase" (in your imagination) all the zeros, these are simply the $\;n-1\;$ vectors

$$(1,0,...,0,-1), (0,1,0,...,0,-1)\,...,(0,...,0,1,-1)$$

Well, now just apply Gram-Schmidt to this base and we shall be done.


问:
Testing to see if triangles intersect

I’m curious, because it was an interesting question, and would like someone to please clarify / help me determine if my statement is actually true.

So by subtraction of co-ordinates and applying Pythagoras, they could use the co-ordinate values to ensure the distances are greater than s. Thanks. Are there any better ways of doing this?

答:
If at least one vertex $X, Y, Z$ is inside triangle $ABC$, then the triangles must intersect. This is because in the worst case, the distance from the centre (for example, the centroid) to any vertex is less than the side length, so the side of triangle $XYZ$ will protrude outside triangle $ABC$.

One possible way to check for this is to use Viviani's theorem, which states that the sum of (perpendicular) distances from the point to the sides is constant. If the sum of these distances of any vertex equals the altitude of the triangle, then the triangles intersect. (Note that this does not imply if the sum of the distances is not the altitude, the triangles don't intersect).

This, together with the condition you mentioned should cover all possible cases, as one condition checks if they do not intersect, and this condition checks if they intersect.

Title: Testing to see if triangles intersect


问:
Gerschgorin theorem

One tricky question:

(a) Let $A\in\mathbb R^{n\times n}$ be a diagonal matrix and let $\tilde{A}=A+E$, where $E\in\mathbb R^{n\times n}$ is such that $e_{ii}=0$ for $i=1,2,\ldots,n$, and $2||E||_{\infty}<|a_{ii}-a_{jj}|$ for all $i,j\in\{1,2,\ldots,n\}$ such that $i\ne j$.

Show that:

$$|\tilde{\lambda}_i-\lambda_i|\le\sum_{j=1}^{n}|e_{ij}|,\qquad i=1,\ldots,n \qquad(*)$$

where $\lambda_i$ and $\tilde{\lambda}_i$ denote the $i$-th eigenvalue of the matrices $A$ and $\tilde{A}$, respectively.

Hint: You may use Gerschgorin theorem.

(b) Let $A=\begin{bmatrix}1&0\\0&2\end{bmatrix}$ and $E=\begin{bmatrix}0&\varepsilon\\\varepsilon&0\end{bmatrix}$, where $0\le 2\varepsilon\lt 1$. Find the eigenvalues of $A$ and $\tilde{A}=A+E$, then show that the estimate (*) holds for $i=1,2$.

I am aware of the Gerschgorin theorem and its proof, but it is a tricky one !
Any help would be much appreciated :)

答:
For reference: Gershgorin circle theorem.

I believe your proof needs to show two things:

The eigenvalues $\tilde{\lambda}_k$ of $\tilde{A}$ are really at the distance of not more than $\sum_{j=1}^n|e_{ij}|$ from the eigenvalues $\lambda_i$ of $A$. (Note as $A$ is diagonal, its diagonal elements are precisely $a_{ii}=\lambda_i$.)

This inequality enables us to uniquely map the eigenvalues $\lambda_i$ of $A$ to the eigenvalues $\tilde{\lambda}_i$ of $\tilde{A}$.

The first point is a simple consequence of Gershgorin theorem applied to $\tilde{A}$. To see that, notice that $e_{ii}=0$, i.e. $\tilde{a}_{ii}=\lambda_i$ as well. Thus, every eigenvalue $\tilde{\lambda}_k$ lies in the circle centered at $\lambda_i$ (for some index $i$) with radius $\sum_{j=1,j\ne i}^n|\tilde{a}_{ij}|=\sum_{j=1,j\ne i}^n|e_{ij}|=\sum_{j=1}^n|e_{ij}|$ (as $e_{ii}=0$), i.e.

$$|\tilde{\lambda}_k-\lambda_i|\le \sum_{j=1}^n|e_{ij}|$$

for some $i$.

The second point follows from the fact that those circles are all disjoint. Namely, the distance between their centres is, per assumption, $|\lambda_i-\lambda_j|=|a_{ii}-a_{jj}|>2||E||_{\infty}=2\max_{1\le i\le n}\sum_{j=1}^{n}|e_{ij}|\ge \sum_{k=1}^n|e_{ik}|+\sum_{k=1}^n|e_{jk}|$ - i.e. the distance from their centres is strictly larger than the sum of their radiuses. Thus, as per "strengthening of Gershgorin theorem" (see the linked Wikipedia article) we can conclude that there is a bijection between the eigenvalues $\tilde{\lambda}_k$ of $\tilde{A}$ and the eigenvalues $\lambda_i$ of $A$. With a suitable renumbering of the former (so that $\tilde{\lambda}_i$ is in the circle centered at $\lambda_i$), we will have:

$$|\tilde{\lambda}_i-\lambda_i|\le \sum_{j=1}^n|e_{ij}|$$

q.e.d.

Title: Gerschgorin theorem


问:
Polynomials -finding sum of symmetric function of cubic polynomial
Problem :

If $\alpha , \beta,\gamma$ are the roots of $x^3+bx+c=0$ then $\alpha^2\beta +\alpha \beta^2+\beta^2\gamma +\beta \gamma^2+\gamma^2 \alpha+\gamma \alpha^2$ is equal to

Options are :

a) 3c

b)  c

c)  -c

d)  -3c

Since : $\alpha + \beta +\gamma = \frac{-b}{a} = 0 $ ; $\alpha \beta + \beta \gamma + \gamma \alpha = \frac{c}{a} =b$ ; $\alpha \beta \gamma = -c$

Please guide how to simplify the symmetric functions so we can use the above values : Thanks..

答: Hint: Try multiplying out $$(\alpha+\beta+\gamma)(\alpha\beta+\beta\gamma+\alpha\gamma)$$</p>


问:
CFL Condition of general Finite Difference Scheme
I need to find the CFL Condition of the following Finite Difference Scheme.

$$
u_t + cu_x = 0\\
u_{j+1,m} = Au_{j,m+3} + Bu_{j,m+2} + Cu_{j,m+1} + Du_{j,m} + Eu_{j,m-1}
$$
So far I have the following work:

$$
\left(\frac{u_{j+1,m}-Du_{j,m}}{\Delta t}\right) + c\left(\frac{Au_{j,m+3}-Eu_{j,m-1}}{4\Delta x}\right) = 0\\
u_{j+1,m} = \frac{c\Delta t}{4\Delta x}\left(Eu_{j,m-1}-Au_{j,m+3}\right)+Du_{j,m}\\
u_{j+1,m} = \frac{\sigma}{4}\left(Eu_{j,m-1}-Au_{j,m+3}\right)+Du_{j,m}\\
0 \leq \left|\frac{c\Delta t}{4\Delta x}\right| \leq 1\\
0 \leq \left|\frac{c\Delta t}{\Delta x}\right| \leq 4
$$

I have drawn out the Domain of dependence in the image above and solved the CFL condition to be $0 \leq \left|\sigma = \frac{c\Delta t}{\Delta x}\right| \leq 4$, but I do not think this answer is correct. What did I do incorrectly? Is the CFL condition supposed to be a value of 4 on both sides of the domain of dependence from $m$ even though it goes up to $m+3$ but only down to $m-1$?

EDIT: Is the following the correct way to solve this?

$$
x_{m-1} \leq x_m-ct_{j+1} \leq x_{m+3}\\
-\Delta x\leq -c\Delta t \leq 3\Delta x\\
\boxed{-1 \leq \frac{-c\Delta t}{\Delta x} \leq 3}
$$

where the boxed solution is the CFL condition.

答:
The first 3 equations of OP's attempt modify the expression of the scheme $$
u_{j+1,m} = Au_{j,m+3} + Bu_{j,m+2} + Cu_{j,m+1} + Du_{j,m} + Eu_{j,m-1} \, . \tag{1}
$$
A simple comparison with the above time-stepping formula shows that they aren't equivalent. One shouldn't "take the derivatives of the scheme with respect to $t$ and $x$" as proposed in comments to OP.

You may have a read at Sec. 1.6 p. 34 of the book by J.C. Strikwerda, Finite Difference Schemes and Partial Differential Equations (SIAM). You are expected to prove something similar to the Theorem 1.6.1 therein:

Theorem. For the explicit difference scheme (1) for the advection equation $u_t+cu_x=0$ with $\Delta t/\Delta x = \lambda$ held constant, a necessary condition for stability is the Courant-Friedrichs-Lewy (CFL) condition $$ \sigma = |c\lambda| \leq \sigma_\max .  $$ And the goal is to find the optimal value of the critical Courant number $\sigma_\max$ such that the above property is true. Note that the Theorem 1.6.1 of the book corresponds to the case $A=B=0$, for which $\sigma_\max = 1$. Comparing the numerical and physical domains of dependence looks like a good strategy to solve it. Keep in mind that $c$ has arbitrary sign (a priori), and that (LeVeque, 2002, p. 69)

CFL Condition: A numerical method can be convergent only if its numerical domain of dependence contains the true domain of dependence of the PDE, at least in the limit as $\Delta t$ and $\Delta x$ go to zero.


问:
Evaluate $\lim_{n\to\infty} \frac{b_n}{n}$
define a sequence $a_n = (1-a_{n-1})(1-a_{[n/2]})$ where $[k]$ represents the largest integer $s\leq k$ and $a_1 = 1$. Furthermore, define $b_n = \sum_{k = 1}^{n} a_k$. Evaluate $$\lim_{n\to\infty} \frac{b_n}{n}.$$
For now I have been able to prove by contradiction that $a_k = 1 \implies k \equiv 0$ (mod 2) and by writing a simple python program I realised the expression seems to tend to $1/3$. How can this result be proven mathematically?

答:
This is not an answer, just notes too long for comments. You have already proved that the odd terms (except from 1) are zero. So, using the recurrence, you can compute the even terms as
$$
a_{2s} = (1-\underbrace{a_{2s-1}}_{=0})(1- a_s) = 1 - a_s
$$

Every even number can be written, in a unique way, in the form $n = 2^k m$, where $m$ is an odd number. Let's look at a few examples:

$10 = 2^1 \times 5$:
$$
a_{10} = a_{2\times 5} = 1-a_5 = 1-0 = 1
$$

$20 = 2^2\times 5$:
$$
a_{20} = a_{2\times 10} = 1 - a_{10} = 1 -a_{2\times 5} = 1 - (1-a_5) = 0
$$

$8 = 2^3 \times 1$:
$$
a_{2^3} = 1-a_4 = 1-(1-a_2) = 1-(1-(1-a_1))) = 0
$$

$16 = 2^4 \times 1$:
$$
a_{16} = 1 - a_8 = 1-0 = 1
$$

So, the power $k$ tells you how many times you flip between 1 and 0.
In general, if $m \ne 1$, $a_{2^k m} = \frac{1 - (-1)^k}{2}$. When $m=1$, $a_{2^k} = \frac{1+(-1)^k}{2}$.

The nonzero terms are exactly the ones for which $ n = 2^{2k-1} m$, with odd $m$.

With these tools we are able to compute $b_n$ for any $n$. If $b_n$ converges, its limit will coincide with the limit of any subsequence. for instance, for $k \ge 2$ you can establish that
$$
b_{2^{2k}} = \frac{1}{2^{2k}}\sum_{n=1}^{2^{2k}} a_n =
\frac{1}{2^{2k}}(\frac 13 4^{k}+\frac 23)  \to \frac 13  $$

It remains to show that the sequence converges.


答: In the second equation, when $x=-2$, there is no restriction whatsoever on $y$. The graph of the second equation includes the entire vertical line $x=-2$.</p>

Title: Are the graphs of these two functions equal to each other?

Body:
The functions are: $y=\frac{x^2-4}{x+2}$ and $(x+2)y=x^2-4$.

I've seen this problem some time ago, and the official answer was that they are not.
My question is: Is that really true?

The functions obviously misbehave when $x = -2$, but aren't both of them indeterminate forms at that point? Why are they different?


问:
Show that $E_n$ has empty interior
I have an exercise I am not sure how to solve:

Let $L_1([0,1], m)$ be the Lebesgue space on $[0,1]$.
We have that $L_3([0,1], m)\not \subseteq L_1([0,1], m)$.
For $n \geq 1$, define $E_n:=\{f\in L_1([0,1], m): \int_{[0,1]} |f|^3 \ dm \leq n\}$

Show that $E_n$ has empty interior in $L_1([0,1], m)$ for all $n \geq 1$.

I am thinking that I first have to show that the $L_1([0,1]$ has empty interior and then conclude that $E_ n$ empty interior. But I am not sure how to do that. Someone who can help?

答: For any $f\in E_n$ the sequence $\frac 1 {n\sqrt x}+f$ converges to $f$ in $L^{1}$ but no term of this sequence is in $E_n$.

Title: Show that $E_n$ has empty interior


问:
Suppose that $x_n \to x$ in norm as $n \to \infty$. Does it follow that $\|x_n\| \to \|x\|$ as $n \to \infty$?
H is an infinite dimensional Hilbert space with associated norm $\|\cdot\|$, and $(x_n)_{n\geq 1}$ is a sequence in $H$. $x\in H$.

答:
The proposed claim is true. Indeed, one has
\begin{align*}
\|x\| = \|x - x_{n} + x_{n}\| \leq \|x - x_{n}\| + \|x_{n}\|
\end{align*}

Similarly, the following relation holds
\begin{align*}
\|x_{n}\| = \|x - x_{n} + x\| \leq \|x - x_{n}\| + \|x\|
\end{align*}

Gathering both results, one has that
\begin{align*}
|\|x\| - \|x_{n}\|| \leq \|x - x_{n}\|
\end{align*}

Since we know that $x_{n}\to x$, let $\varepsilon > 0$. Then there exists $n_{\varepsilon} \in \mathbb{N}$ such that
\begin{align*}
n\geq n_{\varepsilon}\Rightarrow |\|x\| - \|x_{n}\|| \leq \|x - x_{n}\| \leq \varepsilon
\end{align*}
whence we conclude that $\|x_{n}\|$ converges to $\|x\|$.

Hopefully this helps!


问:
Find the sum using properties of binomial coefficients
I need to find the following sum using properties of binomial coefficients:$$\sum\limits_{k=0}^{n} k^3 {n\choose k}^2.$$ I transformed this sum first in:$n^2\sum\limits_{k=1}^{n} k{n-1\choose k-1}^2$.
Then after substitution $j=k-1$ I get $n^2\sum\limits_{j=0}^{n-1}(j+1){n-1\choose j}^2$.
Then, after separating this in two sums for first one I get: $n^2\sum\limits_{j=0}^{n-1}j {n-1\choose j}^2$. And for the second $\sum\limits_{j=0}^{n-1}{n-1 \choose j}^2$. I am not sure how to solve these two. Probably is has something to do with Vandermonde convolution, but honestly, I don't know to use it properly.

答: $$\sum_{j=0}^{n-1} {{n-1}\choose j}x^j = (1+x)^{n-1} \ (*) \\ \sum_{j=0}^{n-1} {{n-1}\choose j}x^{n-1-j} = (1+x)^{n-1} \ (\star)$$ Multiplying these equalities together gives $$x^{n-1} \sum_{j=0}^{n-1} {{n-1}\choose j}^2 + \dots= (1+x)^{2n-2}={{2n-2}\choose{n-1}} x^{n-1} +\dots$$ Comparing coefficients of $x^{n-1}$, you can get the second sum. As for the first sum, start by differentiating (*) and then multiplying by $x$ to get $$\sum_{j=0}^{n-1} j{{n-1}\choose j}x^j =(n-1)x (1+x)^{n-2}$$ Multiplying this with $(\star)$ leads to $$x^{n-1} \sum_{j=0}^{n-1} j{{n-1}\choose j}^2 + \dots= (n-1)x(1+x)^{2n-3} $$ Now you can easily find the coefficient of $x^{n-1}$ in the RHS, compare both sides and you’re done.


问:
Finding an invertible matrix without calculating the inverse using eigenvalues
I'm confused about finding the inverse of a matrix with limited information.

a) Show that the matrix $\begin{pmatrix} 9 & 16 & -4\\
-4 & -7 & 2\\
4 & 8 & -1 \end{pmatrix}$ is diagonalizable, and diagonalize it. You may use use the fact that the eigenvalues of $A$ are $-1$ and $1$.

I already did this. $P=\begin{pmatrix} 2 & -2 & 1\\
-1 & 1 & 0\\
1 & 0 & 2 \end{pmatrix}$ and $D=\begin{pmatrix} -1 & 0 & 0\\
0 & 1 & 0\\
0 & 0 & 1 \end{pmatrix}$

b) Without doing any further numerical calculations, show that $A$ is invertible and find its inverse. Explain your answer.

I know the matrix is invertible since none of the eigenvalues are zero. How do I find the inverse though?

I attempted the following.

I know for eigenvalues, $Ax=\lambda x$

For $\lambda=1$, we get $Ax=x$ which implies that $Ax-x=0$.

This furthermore implies that $x(A-I)=0$. Since 0 is never an eigenvector, we must have that $A=I$. If I invert both sides, I get $A^{-1}=I^{-1}$ or $A^{-1}=I$ which tells use that $A=A^{-1}$.

For $\lambda=-1$, we get $Ax=-x$ which implies that $Ax+x=0$ or $x(A+I)=0$. This implies that $A=-I$. Similarly, $A^{-1}=-I^{-1}$ or $A^{-1}=-I$ which also implies that $A^{-1}=A$.

Is my logic correct? If it's not, where did I go wrong and how can I do this? Thanks!

答:
It can be much simpler: we know that $D=P^{-1}AP$, which  is equivalent to $A=PDP^{-1}$.

Now, as $D$ is diagonal, it is obvious that $D^2=I$, whence
$$A^2=(PDP^{-1})(PDP^{-1})=PD^2P^{-1}=PP^{-1}=I.$$


问:
Pointwise convergence almost everywhere implies convergence in $L^1$
Let $(X, \mathcal{E}, \mu)$ be a measure space and $f_k,f: X \to \mathbb{R}$ integrable functions s.t $f_k \to f$ pointwise almost everywhere. Further, let $g := \sup_k |f_k|$ be integrable. Show that $f_k \to f$ in $L^1(X, \mu)$.

I started like this: By the dominated convergence theorem we have
$$\int f_k \;\mathrm{d}\mu \to \int f \;\mathrm{d}\mu.$$
Since $h_k := |f_k| + |f| - |f_k - f| \geq 0$ we can use Fatou's lemma and it follows
$$\int \lim\inf h_k\;\mathrm{d}\mu \leq \lim\inf \int h_k\;\mathrm{d}\mu$$
which gives us $2\int |f|\;\mathrm{d}\mu \leq \lim\inf \int h_k\;\mathrm{d}\mu$. This is the part where I'm stuck. How should I proceed from here? Thanks in advance.

答: $|f_k| \leq g$ for all $k$ so $|f| \leq g$ almost everywhere. Hence $|f_k-f| \leq 2g$ and $2g$ is integrable. Hence $\int |f_k-f| \to 0$ by DCT.


问:
the unique point $x_0 \in \mathbb{R}^n$ such that minimize $f(x) = \displaystyle \sum_{k = 1}^m\|x-y_k\|$ is exists.
Let $y_1 \cdots y_m \in \mathbb{R}^n$ ($n \geq 2, m \geq 3$) and with Euclidean distance, I want to prove the following proposition.

the unique point $x_0 \in \mathbb{R}^n$ such that minimize $f(x) = \displaystyle \sum_{k = 1}^m\|x-y_k\|$ is exists.

I think I should prove $f$ is strongly convex function and the point $x_0$ exists and $f$ is local minimum value on it. However something wrong and I am struggling with this proposition.

Please some help. Thank you!

(Sorry, if $y_1 \cdots y_m$ can be on the same straight line, the point $x_0$ is not unique...if $y_1 \cdots y_m$ are not on the same straight line, can we prove this?)

答:
Hint

For one dimension, the mean deviation of $y_k, k=1,2,3,...n$ about a point $x$ is defined as
$$MD=\frac{1}{n} \sum_k^{n} |y_k-x|$$
MD is the least if $x$ is the median of the data $y_k$.

If $n$ is odd $x=y_{(n+1)/2}$ so $$f(x)= \sum_{k=1}^{n} |y_k-x|$$ will have a local min at this point.

If $n$ is even then there will be two medians $x=y_{n/2}$, $x=y_{n/2+1}$ and $f(x)$ will attend the least and equal value value at these two points but there wont be a local minimum.


问:
Given $A$ is Hermitian, Show that a given $U$ is unitary
Let $A\in\mathbb{C}^{n\times n}$ be Hermitian. Show that the matrix $U=(A+iI)^{-1}(A-iI)$ is a unitary matrix.

I have done so far: We want $U^*U=I$, so finding $U^*$

\begin{align}U^*&=((A+iI)^{-1}(A-iI))^*\\
&=(A-iI)^*((A+iI)^{-1})^*\\
&=(A^*+iI)((A+iI)^*)^{-1}\\
&=(A^*+iI)(A^*-iI)^{-1}\\
&=(A+iI)(A-iI)^{-1}\end{align}

Then we know that $U^*U=(A+iI)(A-iI)^{-1}(A+iI)^{-1}(A-iI).$

This is where I am stuck as im not sure how to manipulate $U^*U$ to show that it is $I$ given that matrices in general are not commutative.

答:
$(A-iI)^{-1}$ commutes with $A$ and hence also with $A+iI$. Proof:

$(A-iI)^{-1}(A-iI)=I$ so $(A-iI)^{-1}A=I+i(A-iI)^{-1} $. Similarly,

$(A-iI)(A-iI)^{-1}=I$ so $A(A-iI)^{-1}=I+i(A-iI)^{-1}$. Since the right sides of these two equatins are the same we get  $(A-iI)^{-1}A=A(A-iI)^{-1}$.  So  $(A-iI)^{-1}$ commutes with $A$. Hence it also commutes with $A+iI$.

Thus $(A+iI)(A-iI)^{-1}(A+iI)^{-1}(A-iI)=(A-iI)^{-1}(A+iI)((A+iI)^{-1}(A-iI)=I$.


问:
what does the sum of 3 sides of a 3-d rectangular box mean?
I want to understand what knowing "the sum of 3 sides of a 3-d rectangular box" means.

The question was from my job interview. I didn't really understand what they meant but later, I just had an idea that the company is an organization for a fulfilment warehouse business and they need to calculate for the right box to contain items.

After the interview, I went to the company's website and they were saying the cover boxes to contain items are selected by the sum of 3 sides of a 3-d rectangular box. What is a value of a side, here?

----------------------------------------------------Updated------------------------------------------------------

But by knowing the sum of 3 sides of a 3-d cover box, how do we know an item can be contained in the a bigger 3-d box?

----------------------------------------The way I have understood ------------------------------------------

They say "the sum of 3 sides" and my understanding of the sum of 3 sides is that each side has its own length and each side of the cover box must be bigger than the item case, otherwise the item cannot fit in the cover box.

Can somebody tell me what it means? and I am not sure the way I interpret is correct or not.

答:
Can you please be more clear ? are you sure that it is the sum of the three sides of the rectangle rather than the sum of the square of the three sides ?

The sum of the sides of the rectangle is l + b + h,

square root of the square of three sides ie $ \sqrt {l^2 + b^2 + h^2} $ gives the dimension of the diagonal which gives a fair idea of the maximum length of an object that can be placed diagonally into the box.

Look at the image below

d is the length of the diagonal and it is the maximum length of the object that the box can accommodate.


问:
For how many natural numbers $a$ is the expression $\sqrt{\frac{a+64}{a-64}}$ also a natural number?
For how many natural numbers $a$ is the expression $\sqrt{\frac{a+64}{a-64}}$ also a natural number? I cannot seem to do this without using trial and error.

答:
If $\sqrt{\frac{a+64}{a-64}}=n$, then $a+64=n^2(a-64)$, i.e. $(n^2-1)a=64(n^2+1)$, thus $n^2-1\mid 64(n^2+1)$. We need to distinguish two cases:

$n$ is even. In that case, $n^2-1$ and $n^2+1$ are both odd, and are, moreover, coprime (*). Thus, $n^2-1$ is an odd number dividing $64$, i.e. $n^2-1=\pm 1$. The only solution there is $n=0, a=-64$ - but this is not a natural number.

$n$ is odd. In that case, $n^2+1\equiv 2\pmod 4$ (**), so $n^2-1\mid 128\cdot\frac{n^2+1}{2}$ where $\frac{n^2+1}{2}$ is odd, and, similarly to the previous case, $n^2-1$ is coprime with $\frac{n^2+1}{2}$(*), so $n^2-1$ is an even number dividing $128$. Thus, the candidates for $n^2$ are $3, 5, 9, 17, 33, 65, 129$. Only $n^2=9$ gives an integer $n=3$, which gives the solution $a=80$.

Conclusion: the only such number is $a=80$.

(*) In the first part, any divisor of $n^2-1$ and $n^2+1$ would need to divide their difference, i.e. $2$, but $2$ is not a divisor as those numbers are odd. In the second part, any divisor of $n^2-1$ and $\frac{n^2+1}{2}$ would need to divide $n^2+1$ as well, so again it can only be $2$, but $2$ does not divide $\frac{n^2+1}{2}$.

(**) $(2k+1)^2+1=4k^2+4k+2$


答:
$(A+iI)$ does commute with $(A-iI)^{-1}$ because
\begin{aligned}
(A+iI)(A-iI)^{-1}
&=(A-iI)^{-1}\left[(A-iI)(A+iI)\right](A-iI)^{-1}\\
&=(A-iI)^{-1}\left[(A+iI)(A-iI)\right](A-iI)^{-1}\\
&=(A-iI)^{-1}(A+iI).
\end{aligned}
Alternatively, by Cayley-Hamilton theorem, $X^{-1}$ is a polynomial in $X$. Therefore $(A-iI)^{-1}$ is a polynomial in $A-iI$. In turn, it is a polynomial in $A$. Hence it commutes with every polynomial in $A$ and with $A+iI$ in particular.

Title: Given $A$ is Hermitian, Show that a given $U$ is unitary

Body:
Let $A\in\mathbb{C}^{n\times n}$ be Hermitian. Show that the matrix $U=(A+iI)^{-1}(A-iI)$ is a unitary matrix.

I have done so far: We want $U^*U=I$, so finding $U^*$

\begin{align}U^*&=((A+iI)^{-1}(A-iI))^*\\
&=(A-iI)^*((A+iI)^{-1})^*\\
&=(A^*+iI)((A+iI)^*)^{-1}\\
&=(A^*+iI)(A^*-iI)^{-1}\\
&=(A+iI)(A-iI)^{-1}\end{align}

Then we know that $U^*U=(A+iI)(A-iI)^{-1}(A+iI)^{-1}(A-iI).$

This is where I am stuck as im not sure how to manipulate $U^*U$ to show that it is $I$ given that matrices in general are not commutative.


问:
How does WolframAlpha simplify $\sum_{k=0}^{n-1} {k+n-1 \choose n-1}$
Working through a Discrete Math proof I was trying to simplify my equation, but I didn't know how to deal with this summation of a selection:
$\sum_{k=0}^{n-1} {k+n-1 \choose n-1}$

I put it into wolframalpha and it simplified it for me, saying:
$$\sum_{k=0}^{n - 1} {k + n - 1 \choose n - 1} = {2 n - 1 \choose n - 1}$$
(This link should show you the result I got)

That let me simplify enough to finish the problem, but I don't know how wolframalpha got to that answer. We've just begun the basics of this 'choose notation,' but if I need to do some background research to understand why this simplification is valid I'm willing to.

My Question: WolframAlpha simplified my equation, but I'd like to understand the work necessary to get that answer.

P.S. I'm new here, I read through the rules but if I'm doing anything wrong be sure to tell me :)

答:
First note that
$$\sum_{k=0}^{m} {n+k \choose n} = {n+m+1 \choose n+1}$$
So now we have
$$\sum_{k=0}^{n-1} {n-1+k \choose n-1}$$
$$={n-1+n-1+1\choose n-1+1}$$
$$={2n-1\choose n}$$
Also note that when $0\le n\le 2n-1$, we have
$${2n-1\choose n}={2n-1\choose 2n-1-n}$$
I think you can take it from here.


问:
if $y_1=\frac{\sin x}{\sqrt x}$ is solution of $x^2y''+xy'+(x^2-1/4)y=3 \sqrt x^3 \sin x$, find the other lineraly independent solutions
If $y_1=\displaystyle\frac{\sin x}{\sqrt x}$ is a solution of the differential equation $$x^2y'' + xy' + \left(x^2-\frac{1}{4}\right)y=3\sqrt x^3 \sin x,$$ find the other linearly independent solution.

答:
If $y_1(x)$ is obne solution of $y''+p(x)y'+qy=0$, then its other solution is
$$y_2(x)=y_1(x)\int \frac{e^{\int -p(x) dx}}{y_1^2} dx$$
Please chcek that $y_1=\frac{\sin x}{\sqrt{x}}$ is also a solution of the HOMOGENEOUS ODE:
$$x^2y''+xy'+(x^2-1/4)y=0\implies y''+\frac{1}{x}y'+(1-\frac{1}{4x^2})y=0,$$
So its other solution is given as
$$y_2(x)=y_1(x)\int x \frac{e^{-\ln x}}{\sin^2 x} dx= y_1(x) \int \csc^2 x dx=-\frac{\sin x}{\sqrt{x}} \cot x= -\frac{\cos x}{\sqrt{x}}.$$

Further the solution of the inhomogeneous eq. of OP can be solved by the method of variation of parameters by seeking $$Y(x)=C_1(x) y_1(x)+ C_2(x) y_2(x)+D_1 y_1(x)+D_2 y_2(x)$$

See:https://en.wikipedia.org/wiki/Variation_of_parameters


答:
If $\sqrt{\frac{a+64}{a-64}}=n$, then $1 + \frac{128}{a-64} = n^2$ and so $a-64$ divides $128$.

Therefore, $a=64\pm 2^e$, with $e \in \{0,1,\dots,7\}$. Only $16$ candidates to test.

The only solution with $a\ge 0$ and $1 + \frac{128}{a-64}$ a square is $a=80$ and $n=3$.

Body: For how many natural numbers $a$ is the expression $\sqrt{\frac{a+64}{a-64}}$ also a natural number? I cannot seem to do this without using trial and error.


问:
Find the minimum of $|a+\frac 2 {a-1}|$ where $|a|\leq2$.

Find the minimum of $|a+\frac 2 {a-1}|$ where $|a|\leq2$.

I tried using differentiation, but the absolute makes things troublesome...

Please help. Thank you.

答:
Find the minimum of $a+\frac{2}{a-1}$ on the interval $(1,2]$, and the minimum of $-(a+\frac{2}{a-1})$ on the interval $[-2,1)$.  Take the smaller of these two minima and you're done.

These intervals were determined by checking when the inside of the absolute value was positive vs. negative.