问:
Equivalent ways of representing a cycle
I was reading a text about permutations and cycles. At a certain point, the author says that

Let $n,k \in \mathbb{N},$ $X = \{a_1,a_2,\dots,a_n\}$ and $\gamma \in S_{n}$ such that $\gamma = \begin{pmatrix}a_1 & a_2 & \dots & a_k \end{pmatrix}.$ Observe that $ \gamma = \begin{pmatrix}a_1 & a_2 & \dots & a_k \end{pmatrix} = \begin{pmatrix}a_2 & a_3 & \dots & a_k & a_1 \end{pmatrix} = \dots = \begin{pmatrix}a_k & a_1 & a_2 & \dots & a_{k-1} \end{pmatrix}.$

This seemed pretty intuitive but the proof of this equality is omitted.

I tried to prove this fact, but I’m really uncertain of the validity of my proof, so I’m gonna share with you what I have worked and I am really looking for a feedback of what needs to be improved.

Let $n,k \in \mathbb{N}$, such that $k \leq n$, $X = \{a_1,a_2,\dots,a_n\}$ and $\gamma \in S_n$ such that $\gamma = \begin{pmatrix}a_1 & a_2 & \dots & a_k \end{pmatrix}.$

Let $i \in \mathbb{N}$ such that $1 < i \leq k$ and consider $\pi \in S_n$ such that $\pi = \begin{pmatrix}a_i & \dots & a_k & a_1 & \dots & a_{i-1} \end{pmatrix}.$ We want to prove that $\pi = \gamma.$

Since $\gamma$ is a cycle (of length $k$), we know that $\gamma : X \to X$ is such that $\gamma(a_j) = a_{j+1}$ for any $j \in \mathbb{N}$ such that $j < k-1$ and $\gamma(a_k) = a_1.$

Now, we note that, as well, $\pi:X \to X$ is such that $\pi(a_{i}) = a_{i+1}, \dots \pi(a_{k}) = a_1, \dots, \pi(a_{i-2}) = a_{i-1}$ and $\pi(a_{i-1}) = a_{i}.$ Then, $\pi$ is such that $\pi(a_{j}) = a_{j+1}$ for every $j \in \mathbb{N}$ such that $1 < j \leq k-1$ and $\pi(a_k) = a_1.$

Then, we have that $\pi(x) = \gamma(x)$ for every $x \in \{a_1,a_2\dots,a_k\}.$

Since, $\gamma$ and $\pi$ are both cycles, we also know that $\gamma(y)=y$ and $\pi(y)=y$ for any $y \in X \setminus \{a_1,a_2,\dots,a_k\}.$

Hence, $\gamma(x) = \pi(x),$ for every $x \in X.$ Therefore, $\gamma = \pi. \quad \square$

My doubt is that this proof seems so simple and comes really straightforward from the definition that it made me feel uncomfortable.

What do you think? Any suggestions? Thank you for your attention.

答:
Your proof is fine.

The key is, as you have explained, to keep track of where the cycles in question send the elements of the underlying set, then demonstrate that the cycles do the same thing to each of them. It really is that simple.

Well done.

Title: Equivalent ways of representing a cycle


问:
Given $n+1$ points, bound the product of the distances from one of them
We have $n+1$ real numbers $x_1,\cdots,x_{n+1}$ such that $-1\leq x_i\leq 1$ for all $1\leq i\leq n+1$.

I am wondering whether the following fact is true:

There exists some $j$ such that $\prod_{\substack{i=1\\i\neq j}}^{n+1}\left |x_j-x_i\right |\leq \frac{n+1}{2^{n-1}}$.

Some base steps are easy. Assume that this holds for $n-1$.

Applying this inductive hypothesis to $\left\{x_i:i\in\mathbb{N}_{\leq n+1}\right\}\setminus\left\{x_j\right\}$ for each $j\in\mathbb{N}_{\leq n+1}$, we conclude that for each $j\in\mathbb{N}_{\leq n+1}$ there exists $h\left(j\right)\in\mathbb{N}_{\leq n+1}\setminus\left\{j\right\}$ such that $\prod_{\substack{i=1\\i\neq j\\i\neq h\left(j\right)}}^{n+1}\left |x_{h\left(j\right)}-x_i\right |\leq\frac{n}{2^{n-2}}$.

Now, if for some $j\in\mathbb{N}_{\leq n+1}$ we have $\left |x_{h\left(j\right)}-x_j\right |\leq \frac{1}{2}$, then $\prod_{\substack{i=1\\i\neq h\left(j\right)}}^{n+1}\left |x_{h\left(j\right)}-x_i\right |\leq \frac{1}{2}\cdot\frac{n}{2^{n-2}}\leq \frac{1+\frac{1}{n}}{2}\frac{n}{2^{n-2}}=\frac{n+1}{2^{n-1}}$, which gives what we want. But what about the case in which $\left |x_{h\left(j\right)}-x_j\right |>\frac{1}{2}$ for all $j\in\mathbb{N}_{\leq n+1}$?

Is there any other way?

答:
The following should allow to conclude, although the end is sketchy.

Since we are considering "relative positions"/differences $|x_j-x_i|$ the "origin" has in fact no importance and we can multiply the inequality by $2^n$
$$ 2^n \prod_{\genfrac{}{}{0pt}{}{1\leq i\leq n+1 }{i\neq j}} |x_i-x_j| \leq 2(n+1)$$
"Shifting" everything by $+1$ and "absorbing" this $2^n$ factor, the problem is equivalent to having $(n+1)$ points
$$\left\lbrace x_i \in [0, 4],\ i=1, \cdots, n+1\right\rbrace \qquad \Big(4= \big(1-(-1)\big)\times 2 \Big)$$

Now because $\mathbb{R}$ is totally ordered, one can assume that $x_i \leq x_j$ when $i\leq j$ (relabelling if necessary) and the data of these points is thus equivalent to that of $x_1$ together with $n$ "increments": $u_i:= x_{i+1}-x_i$.

Remark: Yet another equivalent data is that of $x_1$ and $v_i:= x_i - x_1,\ i> 1$ and the maximum of the products $\displaystyle \left\lbrace\prod_{\genfrac{}{}{0pt}{}{1\leq i\leq n+1 }{i\neq j}} |x_i-x_j|,\ j=1,\cdots , n+1 \right\rbrace $ (I didn't look for a formal proof but a drawing gives the idea) is reached (once we have totally ordered the $(x_i)_{1\leq i\leq n+1}$) for $x_j$ on the boundary, i.e. either $x_1$ or $x_{n+1}$. For $j=1$ it has value $\prod_{i=2}^n v_i$.

Instead of looking for a minimum, let us in fact make the product of all $\displaystyle \prod_{j=1}^{n+1}\prod_{\genfrac{}{}{0pt}{}{1\leq i\leq n+1 }{i\neq j}} |x_i-x_j|$ and compare it to $2^{n+1} (n+1)^{n+1}$, noticing that the factor $|x_i-x_j|$ appears only twice for each pair $(i,j),\ i\neq j$ (${n+1 \choose 2}$ possibilities.). The set of possible values for $|x_i-x_j|$ is $\left\lbrace \sum_{k=i}^{j-1} u_k,\ 1\leq i< j\leq n\right\rbrace$. Hence
$$\prod_{j=1}^{n+1}\prod_{\genfrac{}{}{0pt}{}{1\leq i\leq n+1 }{i\neq j}} |x_i-x_j| = \prod_{i\neq j} |x_i-x_j|  = \prod_{i< j} |x_i-x_j|^2 = \prod_{i< j} \left(\sum_{k=i}^{j-1} u_k\right)^2 = \left(\prod_{i< j} \left(\sum_{k=i}^{j-1} u_k\right)\right)^2 $$
Let us now regroup the sums by number of summands:
$$\prod_{i< j}\left(\sum_{k=i}^{j-1} u_k\right)= \left(\prod_{i=1}^{n} u_i \right)  \left(\prod_{i=1}^{n-1} (u_i+u_{i+1}) \right)\times \cdots \times \left(\sum_{i=1}^n u_i \right)$$
Considering this last expression as a function of $(u_i)_{1\leq i\leq n}\in \mathbb{R}_+^{n}$, we should take the gradient in order to find an extremum. It is a polynomial function (continuous in particular) and for fixed $n\in \mathbb{N}$, the variables belong to a compact subset $K$ so it does reach a minimum and a maximum (The function $f:u_i \longmapsto \sum_{i=1}^n u_i$ is continuous and the $(u_i)$ belong to $K:=f^{-1}([0,4])$ closed. Moreover each $u_i$ is bounded by $4$.)

The gradient only vanishes at $(0,\cdots ,0)$ which corresponds to a minimum. The maximum must then lie on the boundary of $K$ (e.g. the function $\mathrm{id}:[0,1]\to [0,1]$ has non vanishing derivative, so the extremum are on the boundaries). The subsets of the boundary on which one of the $u_i=0$ all correpond to minimum, so if we represent ourselves $K$ as the "$(0, \cdots 0)$ corner" of $\mathbb{R}_+^n$, the maximum must be reached on the "triangle"/"simplex" part and not the "wall" part of the corner. Let us call $S:= f^{-1}(\{4\})$ this "side" of $K$ which is also compact. This time we should be able to find the maximum by looking at the locus where the gradient vanishes: either by brute force, by looking at the function of $\big(u_1,\cdots, u_{n-1}, 4-(u_1+\cdots+ u_{n-1})\big)$ or by use of Lagrange multiplier.

I would just guess that the maximum is reached for all $u_i= \frac{4}{n}$ (the projection of the gradient of the function of $n$ variables on $S$ (kind of locally coincide with the tangent space) vanishes at this point), in which case
$$ \prod_{i< j} |x_i-x_j| =\left(\frac{4}{n} \right)^n \left( 2\cdot \frac{4}{n} \right)^{n-1}\times \cdots \times \left(n\cdot \frac{4}{n}\right)^1 = \left( \frac{4}{n}\right)^{\frac{n(n+1)}{2}} n!\cdot (n-1)! \cdot (n-2)! \cdots 2! \label{Eq}\tag{Eq}$$
There may be a discussion on the cases $n$ small vs. $n$ large enough... This clearly goes to $0$ when $n$ is big, so if we compare its square with $\big(2\,(n+1) \big)^{n+1}$ it will be smaller, thus the statment of the OP is true (for $n$ big enough).

Let me clarify a crucial point by transforming products in to sums, taking logarithm of each member of the inequality: ($\ln$ increasing, preserves order)
$$ \text{L.h.s.}= \ln\left( \prod_{j=1}^{n+1}\prod_{\genfrac{}{}{0pt}{}{1\leq i\leq n+1 }{i\neq j}} |x_i-x_j|\right) = \sum_{j=1}^{n+1} \ln\left( \prod_{\genfrac{}{}{0pt}{}{1\leq i\leq n+1 }{i\neq j}} |x_i-x_j|\right)$$

$$\text{R.h.s.} =\ln\left( 2^{n+1} (n+1)^{n+1}\right) = (n+1)\big( \ln(2) + \ln(n+1) \big)$$

If each summand $\ln\left( \prod_{\genfrac{}{}{0pt}{}{1\leq i\leq n+1 }{i\neq j}} |x_i-x_j|\right)$ were bigger than $\big( \ln(2) + \ln(n+1) \big)$ then
$$\text{L.h.s.} > \text{R.h.s.}$$
By contraposition, since (\ref{Eq}) seems to suggest that $\text{L.h.s.}  \leq \text{R.h.s.}$ (for $n$ large enough), there must exist a $j$ such that
$$\ln\left( \prod_{\genfrac{}{}{0pt}{}{1\leq i\leq n+1 }{i\neq j}} |x_i-x_j|\right) \leq \big( \ln(2) + \ln(n+1) \big)\quad \Longleftrightarrow\quad \prod_{\genfrac{}{}{0pt}{}{1\leq i\leq n+1 }{i\neq j}} |x_i-x_j| \leq 2\, (n+1)$$

ContentLicense: CC BY-SA 4.0


问:
What is the difference between effective, real and nominal interest rate?
I have been somewhat confused in financial math when to change the rates and the difference between effective, real and nominal rates. I still am confused after searching on Google and asking the teacher, so I was wondering if anyone had a more simplistic way of explaining it to get the overall idea. Thank you!</p>

答:
The nominal interest rate is the interest rate that does not take into account the effects of compound interest (or inflation, for that matter). I like to think about it in this way: say I put $\$1000$ in the bank that offers me a $5\%$ compound interest rate each month (my bank is very generous). Then, if I didn't know what compound interest was, I might assume that the interest accrued would be $12 \times 5 = 60\%$. The nominal annual interest rate in this case would be $60\%$.

However, this figure of $60\%$ does not take into account the effects of compound interest. In actual fact, after $1$ year my $\$1000$ would turn into
$$
1000 \times 1.05^{12} = \$1796 > \$1600
$$
So rather than going up by $60\%$, by money actually went up by $79.6\%$ (to one decimal place). This figure of $79.6\%$ is the effective interest rate-the interest accrued over the course of a year once the effects of compound interest have been taken into account.

Finally, the real interest rate is the interest rate once the effects of inflation have been taken into account. $\$1796$ might be the amount of money that you have after a year, but in that years the prices of goods will have risen, meaning that in practice $\$1796$ is worth less than it used to be.


问:
What is the relation between vectors in physics and algebra?
Vector math is something I find very interesting. However, we have never been told the link between vectors in physics (usually represented as arrows, e.g. a force vector) and in algebra (e.g. represented like a column matrix). It was really never explained well in classes.

Here are the things I can't wrap my head around:

How can a vector (starting from the algebraic definition) be represented as an arrow? Is it correct to assume that a vector (in a 2-dimensional space) $v = [1,1]$ could be represented as an arrow from the origin $[0,0]$ to the point $[1,1]$?

If the above assumption is correct, what does it mean in the physics representation to normalize a vector?

If I have a vector $[1,1]$, would the vector $[-1,1]$ be orthogonal to that first vector? (Because if you draw the arrows they are perpendicular).

How can one translate an object along a vector? Is that simply scalar addition?

These questions probably sound really odd, but they come from a lack of decent explanation in both physics and algebra.

答:
You can represent a vector as an arrow in cartesian coordinates by drawing an arrow from (0,0) to the vector (row vector) for example <3,2> taken as a point on the plane (3,4). In other words, your first bullet point is correct.

Vector normalization is the process by which one takes an arbitrary vector (a, b) and converts it to a new vector (a', b') where the length of (a', b') is 1.
For example, normalize(3, 4) = (3/5, 4/5). And we can verify that |(3/5, 4/5)| = sqrt(9/25 + 16/25) = sqrt(25/25) = 1.

That is correct. But keep in mind that for any vector (x, y), the vector (-x, y) will only be perpendicular to (x, y) if x = y.

ContentLicense: CC BY-SA 3.0


问:
Permutation representation, understanding a general definition and apply it to $S_3$
Author of a course I read define a permutation representation this way :

Let $X$ be a finite set , and $G$ acting on $X$ (there exists an action of $G$
on $X$, let's note it $*$). We associate to it a permutation
representation on the vectorial space $V=\oplus_{x\in
X}\mathbb{C}e_x$.

Then, $G$ acts on $V$ ($V$ is a representation of $G$), by:  $$g.e_x=e_{g*x}$$

Firstly in this definition, can someone try to define $e_x$? I thought we were considering the elements $x_i$ of $X$ as a basis of $\mathbb{C}X$, so why are these $e_x$ appearing?

Application on $S_3$ : What confuses me a lot is this example the author gives :

$S_3$ acts naturally on $X=\left\{1,2,3\right\}$. According to the precedent
definition/proposition, $S_3$ acts on $\mathbb {C^3}$ by permutation
of canonical basis vectors $\left\{e_1,e_2,e_3\right\}$.

What I don't understand is that, for me $V=\oplus_{x\in X}\mathbb{C}e_x=\mathbb{C}X=\left\{c_1+2c_2+3c_3, c_k\in \mathbb{C}\right\}$ and I don't relate it to a cartesian product. Maybe if someone writes me exactly what are $e_1,e_2,e_3$ in this specific case I'll understand better.

答:
Here the set $\{e_x\mid x\in X\}$ is a basis of the vector space $\Bbb C X$.

Concrete sense:

Let $X=\{x_1,\ldots,x_n\}$. You can write the space as $V={\Bbb C}^n$, where the element $x_i$ corresponds to the $i$th unit vector $e_i$.

Abstract sense:

A general element of this space can be written as $\sum_{x\in X} c_x e_x$ or even $\sum_{x\in X} c_x x$, where $c_x\in\Bbb C$. The latter representation is used in the example.


问:
Equivalence between the definitions of birationally trivial variety
I was consulting Manin's book  "Cubic forms algebra, geometry, arithmetic", and in the chapter about unirationality I stumbuled in the definition of "birationally trivial".
This is given as following
No proof of the equivalence is given so I was wondering where I can find one or if you could help me proving it.

答:
One direction is just as easy to see in the general case when $X$ and $Y$ are birationally equivalent varieties.

Let $\phi : X \to Y$ be a birational map of varieties. The key point is to note that in your case $k(\mathbb{P}^n) = k(x_1,...,x_n)$ (i.e., a purely transcendental extension of $k$). Consider the morphism induced on fields, namely
$$\phi^* : k(Y) \to k(X)$$
given by $\phi^*(f) = f \circ \phi$. If $\phi$ has a birational inverse $\psi$ it is easy to check that the above homomorphism of fields has $\psi^*$ as an inverse - hence is an isomorphism.

Now for the other direction is it easier if $X = \mathbb{P}^n$, if $k(Y)$ and $k(x_1,..,x_n)$ are isomorphic, then for each $x_i$ there must be a corresponding $y_i \in k(Y)$, and one can check the map from $Y \to \mathbb{A}^n$
$$a \to (y_1(a),..., y_n(a))$$
is birational (hint: find its inverse) - note this is only on an affine subset, but that's enough (hint: show $\mathbb{A}^n$ and $\mathbb{P}^n$ are birational).


问:
Continuous and residual spectrum of a multiplication operator on $\ell^p$ in the non-Hilbert case $p\ne2$
Let $a\in\ell^\infty$, $p\in[1,\infty)$ and $$T:\ell^p\to\ell^p\;,\;\;\;x\mapsto ax.$$ It's easy to show that $\sigma_p(T)=\{a_n:n\in\mathbb N\}$.

How can we determine $\sigma_c(T)$ and $\sigma_r(T)$? And is there a nice characteriation of $\sigma_p(T')$?

It really easy to show that $\mathbb C\setminus\overline{\sigma_p(T)}\subseteq\rho(T)$.

But beyond that, I'm only able to answer the question in the case $p=2$. In that case $T$ is self-adjoint and hence $\sigma_r(T)=\emptyset$ from which we can conclude that $\sigma_c(T)=\overline{\sigma_p(T)}\setminus\sigma_p(T)$.

答:
First I will compute the approximate point spectrum, $\sigma_{ap}(T)$ which is the set of $\lambda\in\mathbb{C}$ so that $T-\lambda I$ is not bounded below.

Obviously $\sigma_{p}(T)\subset\sigma_{ap}(T)$. Using the fact that in any Banach algebra the set of invertible elements is open, together with the fact that $B(X)$ is a Banach algebra for any Banach space $X$ one can conclude that $\sigma_{ap}(T)$ is a closed subset. Since $\sigma_p(T)=\{a_n:n\geq1\}$ as you have already observed, we have that $\overline{\{a_n:n\geq1\}}\subset\sigma_{ap}(T)$. I will show the other inclusion, i.e. that $\sigma_{ap}(T)\subset\overline{\{a_n:n\geq1\}}$. Equivalently, I will show that $\mathbb{C}\setminus\overline{\{a_n:n\geq1\}}\subset\mathbb{C}\setminus\sigma_{ap}(T)$.

Let $\lambda\in\mathbb{C}\setminus\overline{\{a_n:n\geq1\}}$. Then there exists a disk in the complex plane centered at $\lambda$ that does not get intersected by $\{a_n:n\geq1\}$, so there exists $\varepsilon>0$ so that $|a_n-\lambda|\geq\varepsilon$ for all $n\geq1$. Note that for $x=(x_n)\in\ell^p$ we have that
$$\|(T-\lambda I)x\|_p^p=\sum_{n=1}^\infty|a_nx_n-\lambda x_n|^p=\sum_{n=1}^\infty|a_n-\lambda|^p\cdot|x_n|^p\geq\varepsilon^p\cdot\|x\|_p^p$$
so $T-\lambda I$ is bounded below, i.e. $\lambda\not\in\sigma_{ap}(T)$.

Corollary: $\sigma_{ap}(T)=\overline{\{a_n:n\geq1\}}$.

Now we compute the compression spectrum of $T$, $\sigma_{cp}(T)$ which is the set of $\lambda\in\mathbb{C}$ so that $T-\lambda I$ does not have dense range.

Lemma: Let $A:X\to X$ be a bounded operator from a Banach space into itself. Then $\sigma_{cp}(A)=\sigma_{p}(A^*)$, where $A^*$ is the adjoint operator $A^*:X^*\to X^*$.

Proof of the lemma: Let $\lambda\in\sigma_{cp}(A)$, so $A-\lambda I_X$ is an operator that does not have dense range. Set $Y=\overline{\text{range}(A-\lambda I_X)}$. Then $Y$ is a proper, closed subspace of $X$. By Hahn-Banach there exists a non-trivial functional $\phi\in X^*$ so that $\phi\vert_Y=0$. Recall that taking the adjoint of operators is a (contra-variant) functor, so $I_{X^*}=(I_X)^*$ and note that$(\mu B)^*=\mu B^*$ for all bounded operators $B$ and scalars $\mu$. But then
$(T^*-\lambda I_X)=(T-\lambda I_X)^*$
and
$$(T^*-\lambda I_{X^*})(\phi)=(T-\lambda I_X)^*(\phi)=\phi\circ(T-\lambda I_X)=0.$$
Therefore $\phi\in\ker(T^*-\lambda I_{X^*})$, so $\lambda$ is an eigenvalue of $T^*$.

Conversely, if $\lambda\in\sigma_p(A^*)$, then there exists a non-zero functional $\phi\in X^*$ so that $A^*(\phi)=\lambda\cdot\phi$, so $\phi(Ax)=\phi(\lambda x)$ for all $x\in X$. Therefore $\phi$ is zero on the range of $A-\lambda I_X$ and since $\phi$ is continuous it is also zero on the closure of the range of $A-\lambda I_X$. If $A-\lambda I_X$ has dense range, then $\phi=0$, a contradiction. $\blacksquare$

Let us now apply our lemma to our operator.

The dual of $\ell^p$ is $\ell^q$, where $q$ is the conjugate exponent of $p$ (i.e. $1/p+1/q=1$). We identify
$$\ell^q\equiv\{\omega_x: x\in\ell^q\}$$
where $\omega_x(y)=\sum_{n=1}^\infty y_nx_n$ for all $y=(y_n)\in\ell^p$, where $x=(x_n)$. Note that if $x\in\ell^q$ then $T^*(\omega_x)=\omega_x\circ T$, so
$$T^*(\omega_x)(y)=\omega_x(Ty)=\omega_x\big((a_ny_n))=\sum_{n=1}^\infty a_ny_nx_n=\sum_{n=1}^\infty y_n\cdot(a_nx_n)=\omega_{Sx}(y)$$
where $S:\ell^q\to\ell^q$ is the multiplication operator with the sequence $\{a_n\}_{n=1}^\infty\in\ell^\infty$. Therefore $T^*(\omega_x)=\omega_{Sx}$, so $T^*$ is identified with the operator $S:\ell^q\to\ell^q$. Since $S$ is a multiplication operator by a sequence of $\ell^\infty$ we already know its point spectrum, so we have that $\sigma_{p}(S)=\{a_n:n\geq1\}$, so by our lemma we conclude that $\sigma_{cp}(T)=\{a_n:n\geq1\}$.

Now the relations
$$\sigma_r(T)=\sigma_{cp}(T)\setminus\sigma_p(T)$$
and
$$\sigma_c(T)=\sigma_{ap}(T)\setminus(\sigma_r(T)\cup\sigma_p(T))$$
yield the result: $\sigma_r(T)=\emptyset$, $\sigma_c(T)=\{\text{ the accumulation points of }(a_n)\}\setminus\{a_n:n\geq1\}$.

A final comment: Note that I am only using the Banach space adjoint. This is slightly different than the Hilbert space adjoint, you can see more details about their (non-essential) difference in this post. For example, when $p=2$ and we have a Hilbert space in our hands you can use the Hilbert-space version of the lemma which says that if $A\in B(H)$ is a bounded operator on a Hilbert space, then the operator $T-\lambda I_H$ does not have dense range if-f $\bar{\lambda}$ is an eigenvalue of $T^*$, where $T^*$ is the Hilbert space adjoint.

I hope this answers your question!


问:
Derivative of weighted Dirac delta function?
I have a function of the form

$$f(x,y) = \sum_{i=1}^{n} w(x,y) \delta(y-g_i(x))$$
where $x \in \mathbb{R}^{n}$, $y \in \mathbb{R}$, $g_i(x)$ is an increasing continuous function and  $\delta(\cdot)$ is Dirac's delta function. The coefficient $w(x,y)$ is constant along sets $\{(x,y) : y = g_i(x)\}$, so that $w(x,g_i(x)) = w_i$, where $w_i$ is a constant. Otherwise, I make no assumptions on $w$. In particular, I do not assume $w$ is differentiable on $\mathbb{R}^{n} \times \mathbb{R}$.

I have an integral of the form $I(x) =\int_{0}^{\infty} f(x,y)\mu(y) dy =  \int_{0}^{\infty} \sum_{i=1}^{n} w(x,y) \delta(y-g_i(x)) \mu(y) dy$. By the properties of the Dirac Delta function, I know that
$$I(x) = \sum_{i=1}^n w_i \mu(g_i(x)) =  \sum_{i=1}^{n} w(x,g_i(x)) \mu(g_i(x)).$$

I am interested in computing $\frac{\partial I}{\partial x_j}$, but I don't know how to use the product rule with a weighted combination of Dirac Delta functions. My intuition tells me that I can treat $w_i$ as a constant, so that

$$\frac{\partial I}{\partial x_j} = \sum_{i=1}^{n} w_i \frac{\partial \mu}{\partial y} \frac{\partial g_i}{\partial x_j}$$

Is this intuition correct? Or does the fact that $w(x,y)$ is not differentiable mean that $\frac{\partial I}{\partial x_j}$ does not exist?

答:
Yes, the constraint on $w(x,y)$ means you can validly compute the gradient directly from your one equation

$$ I(x) = \sum_{i=1}^n w_i \mu(g_i(x)) $$

Since this equation is valid for every $x \in \mathbb{R}^n$, and the constants $w_i$ do not depend on $x$, you can show the existence and formula of $\nabla I(x)$ from just that equation. The integral equation and values of $w$ outside the set of $w(x,g_i(x))$ might behave strangely, but they can't break conclusions logically drawn from just the above.


问:
A couple of questions about limits
I'm doing some homework for a calculus course I am taking and, though I feel silly because I've done problems like this before, I'm having some issues. I feel like I am getting the wrong answers for a couple of problems, and I'd like a second (or third, or tenth) opinion.

1) Find $\lim_{x\to 1}f(x)$ where: $$f(x) = \left\{
 \begin{array}{cc}
     x^2+2, & x\neq 1\\
     1, & x=1 \end{array} \right.$$

I'm thinking that the limit does not exist, since you have to plug 1 in to the equation, making x=1, meaning f(x) =1. Please, correct me if I'm wrong.

2) $\lim_{x\to -1} \frac{x^3-1}{x+1}$

I said it is undefined, but I'm not sure...

答: For the $2$ problem the as $x \to -1$ $f(x) = \displaystyle\frac{x^{3}-1}{x+1} \to -\infty$. Here is the graph

Title: A couple of questions about limits


答:
Physicists tend to emphasize a geometric interpretations of vectors, which mathematicians need not do.  This is because one of the main uses of vectors in physics is to talk about the geometry of some system, while vectors in general can be used in more abstract senses (and perhaps with no geometric interpretation at all).

Concerning your first bullet point, your interpretation is correct: this is a model of a vector space as an algebra of directions.  Each arrow has a starting point and an ending point, which determines both length and orientation.  These are the properties of a "direction".

Normalizing vectors is a way to lose the length information while maintaining directionality; it makes vectors unit length.

Yes, you're correct in saying those vectors would be orthogonal.  This is part of the geometric interpretation.

I'm not sure what you refer to by "translating an object about a vector".  It could be taking the location of the object and simply moving every point in the direction of the vector.  This is better described by vector addition.

Title: What is the relation between vectors in physics and algebra?

Body:
Vector math is something I find very interesting. However, we have never been told the link between vectors in physics (usually represented as arrows, e.g. a force vector) and in algebra (e.g. represented like a column matrix). It was really never explained well in classes.

Here are the things I can't wrap my head around:

How can a vector (starting from the algebraic definition) be represented as an arrow? Is it correct to assume that a vector (in a 2-dimensional space) $v = [1,1]$ could be represented as an arrow from the origin $[0,0]$ to the point $[1,1]$?

If the above assumption is correct, what does it mean in the physics representation to normalize a vector?

If I have a vector $[1,1]$, would the vector $[-1,1]$ be orthogonal to that first vector? (Because if you draw the arrows they are perpendicular).

How can one translate an object along a vector? Is that simply scalar addition?

These questions probably sound really odd, but they come from a lack of decent explanation in both physics and algebra.


问:
Placing n equally-sized circles and one larger circle inside the circumference of larger circle
I'm writing a computer program that needs to display circles in a particular way, but can't seem to figure out how to arrange them given the information I have available. The problem is as follows: (jump to the bottom to see a diagram)

There is one large "green" circle with radius $R_g$.

There is one smaller "blue" circle with radius $0 \leq R_b \leq G$.

There are $n \in \mathbb{Z}_{\geq 1}$ "red" circles, each with radius $0 \leq R_r \leq R_b$.

The blue and red circles must be placed on the inside circumference of the green circle.

The blue and red circles must touch each other in a specific way (see diagram).

The problem is, given the following:

$R_g$, the radius of the green circle,

$R_b$, the radius of the blue circle, and

$n$, the number of red circles

Calculate:

$R_r$, the radius of the red circles

$d$, the distance of the center of each of the red circles from the center of the green circle

$\theta_r$, the angle between each of the red circles, and

$\theta_b$, the angle between the blue circle and the nearest red circle.

I solved this problem when $R_b=R_r$ (when the radius of the blue circle is exactly the size of the red circles). In that case,

\begin{align*}
R_r &= R_b && \text{(given)}\\
d &= \frac{R_g \cdot \sec(\frac{\pi}{2}-\frac{\pi}{n+1})}{\sec(\frac{\pi}{2}-\frac{\pi}{n+1})+1} && \text{solution in link} \\
&= \frac{R_g}{1+\sin(\frac{\pi}{1+n})} && \text{simplified solution} \\
\theta_b = \theta_r &= \frac{2\pi}{n+1}
\end{align*}

A rather large diagram of this problem is here:

答:
Let $R_g$ be the radius of the green circumcircle, $R_b$ be the radius of the single blue circle, and there be $n \ge 1$ red circles.  We wish to solve $\theta_r$, the angle between centers of each pair of consecutive red circles, and $R_r$, the radius of each of the red circles.

The radius of the centers of the red circles must be $R_g - R_b$.  If we use a coordinate system where the origin is at the center of the green circle, the center of the blue circle is at $(R_b-R_g, 0)$.

If $n = 1$, then the one red circle has radius $R_r = R_g - R_b$ and is centered at $(R_b, 0)$.

If $n = 2$, then the two red circles have radius $R_r$ centered at $(x, \pm y)$,
$$\left\lbrace\begin{aligned}
   R_r &= \displaystyle \frac{4 R_g R_b (R_g - R_b)}{(R_g + R_b)^2 } \\
   x &= \displaystyle \frac{R_g ( 3 R_b - R_g )}{R_g + R_b} \\
   y &= R_r \\
   \theta_r &= 2 \operatorname{atan2}(y, x) = 2 \arctan\left(\frac{4 R_b (R_g - R_b)}{(3 R_b - R_g)(R_b + R_g)}\right)\\
   \end{aligned}\right.$$

For $n \ge 3$, we need to solve
$$\cos\left((n-1)\frac{\theta_r}{2}\right) - \frac{2 R_b}{R_g - R_b}\sin\left(\frac{\theta_r}{2}\right) + 1 = 0$$
for $\theta_r$; then $$R_r = \displaystyle R_g \frac{\sin\left(\frac{\theta_r}{2}\right)}{1 + \sin\left(\frac{\theta_r}{2}\right)}$$

I recommend using a binary search in range $$0 \le \theta_r \le \frac{2 \pi}{n}$$as there is only one zero for $$f(\theta_r) = \cos\left((n-1)\frac{\theta_r}{2}\right) - \frac{2 R_b}{R_g - R_b}\sin\left(\frac{\theta_r}{2}\right) + 1$$ If $f(\theta_r) \lt 0$, $\theta_r$ is too large; if $f(\theta_r) \gt 0$, $\theta_r$ is too small.

(The upper limit applies if $R_b = 0$, as then the red circles form a closed ring of circles.)

For neighboring red circles to touch, $$R_r = (R_g - R_r) \sin\left(\frac{\theta_r}{2}\right) \quad \iff \quad R_r = R_g \frac{\sin(\theta_r/2)}{1 + \sin(\theta_r/2)}$$

Here is a verified Python implementation, that returns $R_r$ and $\theta_r$ as a tuple:

```<code>from math import pi, atan2, sin, cos

def find_r_theta(rG, rB, n):
    n = round(n)
    if n < 1:
        raise ValueError("N must be at least 1, %s given" % n)

    if n == 1:
        return (rG - rB, 0)

    if n == 2:
        rR = 4*rG*rB*(rG-rB)/(rG+rB)**2
        return (rR, 2*atan2(rR, rG*(3*rB-rG)/(rG+rB)))

    theta_max = 2*pi/n
    theta_min = 0
    ct = 0.5*(n-1)
    cs = 2.0*rB / (rG - rB)
    # 53 bits of precision
    for k in range(0, 53):
        theta = 0.5*(theta_min + theta_max)
        d = cos(ct*theta) - cs*sin(0.5*theta) + 1
        if d > 0.0:
            theta_min = theta
        elif d < 0.0:
            theta_max = theta
        else:
            break

    s = sin(0.5*theta)
    rR = rG*s/(s+1)

    # Abort if the blue radius is smaller than the red
    if rB < rR:
        raise ValueError("Blue radius (%f) smaller than the red radius (%d)" % (rB, rR))

    return (rG*s/(s+1), theta)
</code>```

If you add the following code, you can run it via python3 this.py rG rB N out.svg, specifying the green circle radius, blue circle radius, and the number of red circles, and it'll create an SVG image, out.svg, for illustration and verification; you can view those in any browser.

```<code>if __name__ == '__main__':
    from sys import argv, stdout, stderr, exit
    from math import ceil

    if len(argv) < 4 or len(argv) > 5:
        stderr.write("\n")
        stderr.write("Usage: %s [ -h | --help ]\n" % argv[0])
        stderr.write("       %s GREEN-RADIUS BLUE-RADIUS RED-CIRCLE-COUNT [ OUT.SVG ]\n" % argv[0])
        stderr.write("\n")
        exit(1)

    rG = float(argv[1])
    rB = float(argv[2])
    n  = round(float(argv[3]))

    if len(argv) > 4:
        svg = open(argv[4], mode="w", encoding="UTF-8")
    else:
        svg = stdout

    rR, theta = find_r_theta(rG, rB, n)

    center = int(ceil(rG+2))
    svg.write('<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n')
    svg.write('<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewbox="0 0 %d %d">\n' % (2*center, 2*center))
    svg.write('<rect x="0" y="0" width="%d" height="%d" fill="#ffffff" stroke="none" />\n' % (2*center, 2*center))
    svg.write('<circle cx="%.3f" cy="%.3f" r="%.3f" fill="none" stroke="#00cc00" />\n' % (center, center, rG))
    svg.write('<circle cx="%.3f" cy="%.3f" r="%.3f" fill="none" stroke="#0000ff" />\n' % (center-rG+rB, center, rB))
    if (n & 1):
        svg.write('<circle cx="%.3f" cy="%.3f" r="%.3f" fill="none" stroke="#ff0000" />\n' % (center+rG-rR, center, rR))
        for i in range(1, int((n+1)/2)):
            a = i * theta
            x = (rG - rR) * cos(a)
            y = (rG - rR) * sin(a)
            svg.write('<circle cx="%.3f" cy="%.3f" r="%.3f" fill="none" stroke="#ff0000" />\n' % (center+x, center+y, rR))
            svg.write('<circle cx="%.3f" cy="%.3f" r="%.3f" fill="none" stroke="#ff0000" />\n' % (center+x, center-y, rR))
    else:
        for i in range(0, int(n/2)):
            a = (i + 0.5) * theta
            x = (rG - rR) * cos(a)
            y = (rG - rR) * sin(a)
            svg.write('<circle cx="%.3f" cy="%.3f" r="%.3f" fill="none" stroke="#ff0000" />\n' % (center+x, center+y, rR))
            svg.write('<circle cx="%.3f" cy="%.3f" r="%.3f" fill="none" stroke="#ff0000" />\n' % (center+x, center-y, rR))
    svg.write('</svg>\n')
    svg.flush()
    if svg != stdout:
        svg.close()
</code>```

How did I find the solution for $n \ge 3$?

Consider the following illustration:  The green circle is centered at origin, with radius $R_g$:

The blue circle has radius $R_b$ and is centered at $(R_b - R_g, 0)$.  Note that its center $x$ coordinate is actually $c = -R_g + R_b$: blue radius in from the leftmost point on the green circle.

Angle $\theta$ forms an isosceles triangle, with sides $R_g - R_r$ and base $2 R_r$. If we split it into two right triangles, where the hypotenuse length is $R_g - R_r$, short side length is $R_r$, and the angle opposite the short side $\theta/2$.  Thus,
$$\sin\left(\frac{\theta}{2}\right) = \frac{R_r}{R_g - R_r} \tag{1a}\label{G1a}$$
Solving this for $R_r$ yields
$$R_r = R_g \frac{\sin\left(\frac{\theta}{2}\right)}{1 + \sin\left(\frac{\theta}{2}\right)} \tag{1b}\label{G1b}$$
This means that the red circle radius $R_r$ is defined by $\theta$, and $\theta$ is our only free variable.  And only positive $\theta$ make any sense.

If there was no blue circle at all, then the $n$ red circles would cover the full circle: $n \theta = 2 \pi$.  This gives us the possible range for $\theta$,
$$0 \lt \theta \lt \frac{2 \pi}{n} \tag{2}\label{G2}$$

The topmost red circle is always at angle
$$\theta_T = \frac{(n - 1) \theta}{2}$$ counterclockwise from right.  Its center is at $(x, y)$,
$$\left\lbrace \begin{aligned}
x = (R_g - R_r) \cos \theta_T &= (R_g - R_r) \cos\left(\frac{(n - 1) \theta}{2}\right) \\
y = (R_g - R_r) \sin \theta_T &= (R_g - R_r) \sin\left(\frac{(n - 1) \theta}{2}\right) \\
\end{aligned} \right. \tag{3a}\label{G3a}$$
For the topmost red circle and the blue circle to touch, we need the distance between their centers to match the sum of their radiuses.  Squaring the distances, we have
$$(x - b)^2 + y^2 = (R_b + R_r)^2 \tag{3b}\label{G3b}$$
Next, we subtract the right side from the left side (so we get a function of form $f(\theta)$ whose root we need to find), substitute $x$, $y$, $b$, and $R_r$.

At this point, the expression starts to sprawl, and I for one switch to a Computer Algebra System.  I suggest wxMaxima or SageMath; both free and available for all operating systems.  In Maxima:

```<code>declare(R_g,real, R_b,real, R_r,real, theta,real, n,integer) $
R_r : R_g * sin(theta/2) / (1 + sin(theta/2)) $
x   : (R_g - R_r) * cos((n-1)*theta/2) $
y   : (R_g - R_r) * sin((n-1)*theta/2) $
b   : -R_g + R_b $
EQ  : (x-b)^2 + y^2 - (R_b + R_r)^2 = 0;
</code>```

and after applying rational and trigonometric simplifications (trigsimp(ratsimp(EQ));), we get

```<code>(((2*R_g^2-2*R_b*R_g)*sin(theta/2)+2*R_g^2-2*R_b*R_g)*cos((n-1)*theta/2)
+(2*R_g^2-6*R_b*R_g)*sin(theta/2)
+4*R_b*R_g*cos(theta/2)^2+2*R_g^2-6*R_b*R_g) / (2*sin(theta/2) - cos(theta/2)^2 + 2) = 0
</code>```

That divisor, $2\sin(\theta/2) - \cos(\theta/2)^2 + 2 \ge 1$ in this context, because we only do this for $n \ge 3$ and therefore $0 \lt \theta/2 \lt \pi/3$, per $\eqref{G2}$. So, we can just omit it, by multiplying the equation with it.  There is also a common factor $R_g$, which we can divide out at the same time: trigsimp(ratsimp(% * (2*sin(theta/2) - cos(theta/2)^2 + 2) / R_g)); and we get

```<code>  ((2*R_g-2*R_b)*sin(theta/2)+2*R_g-2*R_b)*cos((n-1)*theta/2)
+  (2*R_g-6*R_b)*sin(theta/2)
+          4*R_b*cos(theta/2)^2
+    2*R_g-6*R_b = 0
</code>```

Replacing $\cos(\theta)^2$ with $1 - \sin(\theta)^2$, we have

```<code>  ((2*R_g-2*R_b)*sin(theta/2)+2*R_g-2*R_b)*cos((n-1)*theta/2)
+  (2*R_g-6*R_b)*sin(theta/2)
+          4*R_b*(1 - sin(theta/2)^2)
+    2*R_g-6*R_b = 0;
</code>```

and finally, if we ask Maxima to solve this for $\theta$, solve(%, theta);, it gives us two solutions:

```<code>[ theta = -%pi, cos((n-1)*theta/2) = -(2*R_b*sin(theta/2)-R_g+R_b)/(R_b-R_g) ]
</code>```

The first one is garbage, so we grab the second one, cos((n-1)*theta/2) = -(2*R_b*sin(theta/2)-R_g+R_b)/(R_b-R_g);, and subtract right hand side from left hand side to get a nice function form: ratsimp(lhs(%) - rhs(%)) = 0;, so we get

```<code>((R_g-R_b)*cos((n-1)*theta/2) - 2*R_b*sin(theta/2) + R_g-R_b)/(R_g-R_b) = 0
</code>```

i.e.
$$\frac{(R_g - R_b) \cos\left(\frac{(n-1) \theta}{2}\right) - 2 R_b \sin\left(\frac{\theta}{2}\right) + R_g - R_b }{R_g - R_b} = 0$$
or, equivalently
$$\cos\left(\frac{(n-1)\theta}{2}\right) - \frac{2 R_b}{R_g - R_b} \sin\left(\frac{\theta}{2}\right) + 1 = 0$$

Body:
Let $R_g$ be the radius of the green circumcircle, $R_b$ be the radius of the single blue circle, and there be $n \ge 1$ red circles.  We wish to solve $\theta_r$, the angle between centers of each pair of consecutive red circles, and $R_r$, the radius of each of the red circles.

The radius of the centers of the red circles must be $R_g - R_b$.  If we use a coordinate system where the origin is at the center of the green circle, the center of the blue circle is at $(R_b-R_g, 0)$.

If $n = 1$, then the one red circle has radius $R_r = R_g - R_b$ and is centered at $(R_b, 0)$.

If $n = 2$, then the two red circles have radius $R_r$ centered at $(x, \pm y)$,
$$\left\lbrace\begin{aligned}
   R_r &= \displaystyle \frac{4 R_g R_b (R_g - R_b)}{(R_g + R_b)^2 } \\
   x &= \displaystyle \frac{R_g ( 3 R_b - R_g )}{R_g + R_b} \\
   y &= R_r \\
   \theta_r &= 2 \operatorname{atan2}(y, x) = 2 \arctan\left(\frac{4 R_b (R_g - R_b)}{(3 R_b - R_g)(R_b + R_g)}\right)\\
   \end{aligned}\right.$$

For $n \ge 3$, we need to solve
$$\cos\left((n-1)\frac{\theta_r}{2}\right) - \frac{2 R_b}{R_g - R_b}\sin\left(\frac{\theta_r}{2}\right) + 1 = 0$$
for $\theta_r$; then $$R_r = \displaystyle R_g \frac{\sin\left(\frac{\theta_r}{2}\right)}{1 + \sin\left(\frac{\theta_r}{2}\right)}$$

I recommend using a binary search in range $$0 \le \theta_r \le \frac{2 \pi}{n}$$as there is only one zero for $$f(\theta_r) = \cos\left((n-1)\frac{\theta_r}{2}\right) - \frac{2 R_b}{R_g - R_b}\sin\left(\frac{\theta_r}{2}\right) + 1$$ If $f(\theta_r) \lt 0$, $\theta_r$ is too large; if $f(\theta_r) \gt 0$, $\theta_r$ is too small.

(The upper limit applies if $R_b = 0$, as then the red circles form a closed ring of circles.)

For neighboring red circles to touch, $$R_r = (R_g - R_r) \sin\left(\frac{\theta_r}{2}\right) \quad \iff \quad R_r = R_g \frac{\sin(\theta_r/2)}{1 + \sin(\theta_r/2)}$$

Here is a verified Python implementation, that returns $R_r$ and $\theta_r$ as a tuple:

from math import pi, atan2, sin, cos

def find_r_theta(rG, rB, n):
    n = round(n)
    if n < 1:
        raise ValueError("N must be at least 1, %s given" % n)

    if n == 1:
        return (rG - rB, 0)

    if n == 2:
        rR = 4*rG*rB*(rG-rB)/(rG+rB)**2
        return (rR, 2*atan2(rR, rG*(3*rB-rG)/(rG+rB)))

    theta_max = 2*pi/n
    theta_min = 0
    ct = 0.5*(n-1)
    cs = 2.0*rB / (rG - rB)
    # 53 bits of precision
    for k in range(0, 53):
        theta = 0.5*(theta_min + theta_max)
        d = cos(ct*theta) - cs*sin(0.5*theta) + 1
        if d > 0.0:
            theta_min = theta
        elif d < 0.0:
            theta_max = theta
        else:
            break

    s = sin(0.5*theta)
    rR = rG*s/(s+1)

    # Abort if the blue radius is smaller than the red
    if rB < rR:
        raise ValueError("Blue radius (%f) smaller than the red radius (%d)" % (rB, rR))

    return (rG*s/(s+1), theta)

If you add the following code, you can run it via python3 this.py rG rB N out.svg, specifying the green circle radius, blue circle radius, and the number of red circles, and it'll create an SVG image, out.svg, for illustration and verification; you can view those in any browser.

if __name__ == '__main__':
    from sys import argv, stdout, stderr, exit
    from math import ceil

    if len(argv) < 4 or len(argv) > 5:
        stderr.write("\n")
        stderr.write("Usage: %s [ -h | --help ]\n" % argv[0])
        stderr.write("       %s GREEN-RADIUS BLUE-RADIUS RED-CIRCLE-COUNT [ OUT.SVG ]\n" % argv[0])
        stderr.write("\n")
        exit(1)

    rG = float(argv[1])
    rB = float(argv[2])
    n  = round(float(argv[3]))

    if len(argv) > 4:
        svg = open(argv[4], mode="w", encoding="UTF-8")
    else:
        svg = stdout

    rR, theta = find_r_theta(rG, rB, n)

    center = int(ceil(rG+2))
    svg.write('<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n')
    svg.write('<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewbox="0 0 %d %d">\n' % (2*center, 2*center))
    svg.write('<rect x="0" y="0" width="%d" height="%d" fill="#ffffff" stroke="none" />\n' % (2*center, 2*center))
    svg.write('<circle cx="%.3f" cy="%.3f" r="%.3f" fill="none" stroke="#00cc00" />\n' % (center, center, rG))
    svg.write('<circle cx="%.3f" cy="%.3f" r="%.3f" fill="none" stroke="#0000ff" />\n' % (center-rG+rB, center, rB))
    if (n & 1):
        svg.write('<circle cx="%.3f" cy="%.3f" r="%.3f" fill="none" stroke="#ff0000" />\n' % (center+rG-rR, center, rR))
        for i in range(1, int((n+1)/2)):
            a = i * theta
            x = (rG - rR) * cos(a)
            y = (rG - rR) * sin(a)
            svg.write('<circle cx="%.3f" cy="%.3f" r="%.3f" fill="none" stroke="#ff0000" />\n' % (center+x, center+y, rR))
            svg.write('<circle cx="%.3f" cy="%.3f" r="%.3f" fill="none" stroke="#ff0000" />\n' % (center+x, center-y, rR))
    else:
        for i in range(0, int(n/2)):
            a = (i + 0.5) * theta
            x = (rG - rR) * cos(a)
            y = (rG - rR) * sin(a)
            svg.write('<circle cx="%.3f" cy="%.3f" r="%.3f" fill="none" stroke="#ff0000" />\n' % (center+x, center+y, rR))
            svg.write('<circle cx="%.3f" cy="%.3f" r="%.3f" fill="none" stroke="#ff0000" />\n' % (center+x, center-y, rR))
    svg.write('</svg>\n')
    svg.flush()
    if svg != stdout:
        svg.close()

How did I find the solution for $n \ge 3$?

Consider the following illustration:  The green circle is centered at origin, with radius $R_g$:

The blue circle has radius $R_b$ and is centered at $(R_b - R_g, 0)$.  Note that its center $x$ coordinate is actually $c = -R_g + R_b$: blue radius in from the leftmost point on the green circle.

Angle $\theta$ forms an isosceles triangle, with sides $R_g - R_r$ and base $2 R_r$. If we split it into two right triangles, where the hypotenuse length is $R_g - R_r$, short side length is $R_r$, and the angle opposite the short side $\theta/2$.  Thus,
$$\sin\left(\frac{\theta}{2}\right) = \frac{R_r}{R_g - R_r} \tag{1a}\label{G1a}$$
Solving this for $R_r$ yields
$$R_r = R_g \frac{\sin\left(\frac{\theta}{2}\right)}{1 + \sin\left(\frac{\theta}{2}\right)} \tag{1b}\label{G1b}$$
This means that the red circle radius $R_r$ is defined by $\theta$, and $\theta$ is our only free variable.  And only positive $\theta$ make any sense.

If there was no blue circle at all, then the $n$ red circles would cover the full circle: $n \theta = 2 \pi$.  This gives us the possible range for $\theta$,
$$0 \lt \theta \lt \frac{2 \pi}{n} \tag{2}\label{G2}$$

The topmost red circle is always at angle
$$\theta_T = \frac{(n - 1) \theta}{2}$$ counterclockwise from right.  Its center is at $(x, y)$,
$$\left\lbrace \begin{aligned}
x = (R_g - R_r) \cos \theta_T &= (R_g - R_r) \cos\left(\frac{(n - 1) \theta}{2}\right) \\
y = (R_g - R_r) \sin \theta_T &= (R_g - R_r) \sin\left(\frac{(n - 1) \theta}{2}\right) \\
\end{aligned} \right. \tag{3a}\label{G3a}$$
For the topmost red circle and the blue circle to touch, we need the distance between their centers to match the sum of their radiuses.  Squaring the distances, we have
$$(x - b)^2 + y^2 = (R_b + R_r)^2 \tag{3b}\label{G3b}$$
Next, we subtract the right side from the left side (so we get a function of form $f(\theta)$ whose root we need to find), substitute $x$, $y$, $b$, and $R_r$.

At this point, the expression starts to sprawl, and I for one switch to a Computer Algebra System.  I suggest wxMaxima or SageMath; both free and available for all operating systems.  In Maxima:

declare(R_g,real, R_b,real, R_r,real, theta,real, n,integer) $
R_r : R_g * sin(theta/2) / (1 + sin(theta/2)) $
x   : (R_g - R_r) * cos((n-1)*theta/2) $
y   : (R_g - R_r) * sin((n-1)*theta/2) $
b   : -R_g + R_b $
EQ  : (x-b)^2 + y^2 - (R_b + R_r)^2 = 0;

and after applying rational and trigonometric simplifications (trigsimp(ratsimp(EQ));), we get

(((2*R_g^2-2*R_b*R_g)*sin(theta/2)+2*R_g^2-2*R_b*R_g)*cos((n-1)*theta/2)
+(2*R_g^2-6*R_b*R_g)*sin(theta/2)
+4*R_b*R_g*cos(theta/2)^2+2*R_g^2-6*R_b*R_g) / (2*sin(theta/2) - cos(theta/2)^2 + 2) = 0

That divisor, $2\sin(\theta/2) - \cos(\theta/2)^2 + 2 \ge 1$ in this context, because we only do this for $n \ge 3$ and therefore $0 \lt \theta/2 \lt \pi/3$, per $\eqref{G2}$. So, we can just omit it, by multiplying the equation with it.  There is also a common factor $R_g$, which we can divide out at the same time: trigsimp(ratsimp(% * (2*sin(theta/2) - cos(theta/2)^2 + 2) / R_g)); and we get

  ((2*R_g-2*R_b)*sin(theta/2)+2*R_g-2*R_b)*cos((n-1)*theta/2)
+  (2*R_g-6*R_b)*sin(theta/2)
+          4*R_b*cos(theta/2)^2
+    2*R_g-6*R_b = 0

Replacing $\cos(\theta)^2$ with $1 - \sin(\theta)^2$, we have

  ((2*R_g-2*R_b)*sin(theta/2)+2*R_g-2*R_b)*cos((n-1)*theta/2)
+  (2*R_g-6*R_b)*sin(theta/2)
+          4*R_b*(1 - sin(theta/2)^2)
+    2*R_g-6*R_b = 0;

and finally, if we ask Maxima to solve this for $\theta$, solve(%, theta);, it gives us two solutions:

[ theta = -%pi, cos((n-1)*theta/2) = -(2*R_b*sin(theta/2)-R_g+R_b)/(R_b-R_g) ]

The first one is garbage, so we grab the second one, cos((n-1)*theta/2) = -(2*R_b*sin(theta/2)-R_g+R_b)/(R_b-R_g);, and subtract right hand side from left hand side to get a nice function form: ratsimp(lhs(%) - rhs(%)) = 0;, so we get

((R_g-R_b)*cos((n-1)*theta/2) - 2*R_b*sin(theta/2) + R_g-R_b)/(R_g-R_b) = 0

i.e.
$$\frac{(R_g - R_b) \cos\left(\frac{(n-1) \theta}{2}\right) - 2 R_b \sin\left(\frac{\theta}{2}\right) + R_g - R_b }{R_g - R_b} = 0$$
or, equivalently
$$\cos\left(\frac{(n-1)\theta}{2}\right) - \frac{2 R_b}{R_g - R_b} \sin\left(\frac{\theta}{2}\right) + 1 = 0$$


问:
Can information-theory quantify deviations from bijectivity?
There are basic ways to qualitatively classify deviations from bijectivity of a function $f: x \to y$, e.g. non-injective, non-surjective, non-existence of an inverse: more generally non-monomorphic, non-epimorphic.

Are there two "natural" quantitative measures of  deviation from injectivity and surjectivity?

Is there one natural quantitative measure of "total deviation" from bijectivity (combining both injective/surjectivity violation)? And from isomorphic?

Brain storm: Relative entropy of $\{f^{-1}(y) \}$, i.e. the preimages of $f$, seems one relevant to measuring relative injectivity? Relative measure or cardinality $|Im(f)/Cod(f)|$ seems one way to measure surjectivity? These both invoke additional concepts, e.g. probability or measure. I am sure mathematicians will have clearer and better ways that I can't think of. Any ideas or references will be most welcome.

The above mostly relates to functions between sets. How does one ask and answer the corresponding questions for structure-preserving functions, i.e. functorial functions, such as monotone, equivariant, homomorphic, continuous? (Apologies if this latter is asking too much in one question!).

Thanks!

答:
Not a metric but, the following simply allows you to partially order functions by injectivity.

There is a partial order on the inverse image equivalence relations induced by the set of all functions $\{f|f:A \to B\}$, i.e. where each class of the relation or quotient on domain $A$ induced by $f$ is defined by $ x\equiv_fy$ iff $f(x)=f(y)$, for $x,y \in A$. The partial order encodes how coarse or fine the equivalence relations are, relative to one another, which in turn encodes nothing but the relative injectivity. A limitation is that this is not a total order: two "equally injective" functions may be incomparable and you would never know.

In terms of a numeric measure, for functions between finite sets, I guess you can also just calculate the entropy on the family of cardinals $(|f^{-1}(y)|)_{y \in B}$, treating the latter as a probability distribution (normalized frequency histogram). Not sure currently how this generalizes.


问:
Similar matrix of $M\in\mathcal{M}_2(\mathbb{C})$,
Let $M\in\mathcal{M}_2(\mathbb{C})$, Show that $M$ is similar with a matrix having one of the following forms:
$$
\begin{pmatrix}
z_1 & 0 \\
0 & z_2
\end{pmatrix}
~,~\text{with }(z_1,z_2)\in\mathbb{C}^2\qquad
\begin{pmatrix}
z & 1 \\
0 & z
\end{pmatrix}
~,~\text{with }z\in\mathbb{C}
$$
An idea please

答:
A complex endomorphism $f$ is triangularizable since $\mathbb{C}$ is an algebraically closed field. Hence, the matrix that represents it with respect to e.g. the canonical basis of $\mathbb{C}^2$ is similar to a triangular matrix. There are two cases to consider:

the eigenvalues of $f$ are different:in this cases you can diagonalize $f$, and so you are in the first "form" of your question;

$f$ has a unique eigenvalue $z$: you have to distinguish two subcases now. If the geometric multiplicity of $z$ is equal to 2, we are back to the first "form" with $z_1=z_2=z$; otherwise, if the geometric multiplicity is equal to $1$, the eigenspace relative to $z$ has dimension 1, spanned by a vector $v$. Let $\{v, w\}$ be a basis which respect to the endomorphism $f$ has the form

$$
\begin{pmatrix}
z & x \\
0 & z
\end{pmatrix},
$$

where $x \neq 0$. Now you have only to change the basis in order to replace $x$ with $1$, which is an easy exercise.


问:
Dimensions of kernel and image of composition
Given $A,B\in K^{n\times n}$ with $AB=0$.

I am trying to prove that $rg(A)+rg(B)\leq n$.\

My attempt:

Since $AB=0 \implies \dim(\ker(AB))=n$.

Using dimension formula to calculate dimension of images:
$$\dim(\text{im}(A))+\dim(\ker(A)) = \dim(K^n) = n\\
\dim(\text{im}(B))+\dim(\ker(B)) = \dim(K^n) = n\\
\implies \dim(\text{im}(A))+\dim(\text{im}(B) = 2n-(\dim(\ker(A)+\dim(\ker(B))$$

If I could prove that $$\ker(AB) = \ker(B) \cup (\ker(A)\cap\text{im}(B)) = \ker(A) \cup \ker(B)$$
then I get a lower bound of n for the sum of the dimension of the individual kernels:

$$\dim(\ker(AB)) = n = \dim(\ker(A)) + \dim(\ker(B)) - \dim(\ker(A) \cap \ker(B))\\
\implies n\leq \dim(\ker(A)) + \dim(\ker(B))$$
Which leads to the desired inequality, since $rg(A) = \dim(\text{im}(A))$ (same for $B$).

I am having trouble proving the upper assumption and don't even know if it is true. Any advice would be appreciated.

答:
Hint: We have $AB=0$.

Thus the sequence $\Bbb R^n\stackrel{B}{\rightarrow} \Bbb R^n\stackrel{A}{\rightarrow} 0$

shows that $im(B)\subseteq ker(A)$.


问:
Two Algorithm A and B solve the same problem
Two algorithms $A$ and $B$ solve the same problem.  $A$ solves a problem of size $n$ with $n^2~2^n$ operations. $B$ solves it with $n!$ operations. As $n$ grows, which algorithm uses fewer operations?</p>

答: I believe Stirling is your friend. </p>

Body: I believe Stirling is your friend.


问:
How many ways can 2 rooks and a bishop be placed on a 4x4 board such that no piece attacks another piece?

How many ways can $2$ rooks and a bishop be placed on a $4\times 4$ board such that no piece attacks another piece?

I stumbled upon this question and I don't know how to find the answer mathematically. I wrote this piece of code to find the answer to it. I think the code is right, but I get the answer as $232$, which doesn't "feel" right. So how do you actually go about solving this question?

答:
Brute force.

Observation : The bishop can be treated as a queen! We place Q first, then two identical rooks R1, R2.

There are three kinds of squares : corner (4), edge (8), center (4). We place first Q on each type and then two rooks.

Center : Q clears a $3\times 3$ grid and one more corner and two edge squares. Only four squares remain. Total $:4\cdot 2\cdot 2=16$ ways.

Corner : Q clears two edges and one diagonal. Six squares remain. Choosing any one of these six for R1 leaves three squares out for R2. Total $:(4\cdot 6\cdot 3)/2=36$

Edge :  Q clears an edge and a row/column and three more on its two diagonals. Six squares remain. If R1 is anywhere on one of three squares of an outer edge, it gives $2$ choices each for R2. Other three squares are at a knight's distance from Q. R1 on lonely square leaves 4 choices for R2. R1 on other pair of squres leaves $3$ choices each for R2. Total $$8\times \frac{3\cdot 2+4+2\cdot 3}{2}=64$$

Grand total $: 16+36+64=116$


问:
Propositional Formulas. Is my intuition regarding this problem correct?
I've been having trouble with proving whether this propositional formula is true or false.

Let's say we the following propositional formulas: $(A \wedge B), (A \wedge C), (C \wedge B)$ where each of is satisfiable and each of A, B, C is a propositional formula.Does this mean that $((A \wedge B)\wedge C)$ is also satisfiable? Now just based on my intuition I would think that this should be true. I've tried to come up with any counter arguments but no avail. Would my intuition be right here?

答:
Let's say we the following propositional formulas: (A∧B),(A∧C),(C∧B)
where each of is satisfiable and each of A, B, C is a propositional
formula.

You don't mention whether they are simultaneously satisfiable, so I assume not. In that case, one can have $A\wedge B\wedge C$ not satisfiable: take propositional variables $p$ and $q$ and define
$$A=p, \quad B=q \quad\text{and}\quad C=\neg p\vee\neg q.$$
If $p$ is true, but $q$ is false, $A$ and $C$ are true and then $A\wedge C$ is satisfied. If $p$ and $q$ are true, $A$ and $B$ are true and $A\wedge B$ is satisfied. And if $q$ is true but $p$ is false, $B$ and $C$ are true, and $B\wedge C$ is satisfied.

But $A\wedge B\wedge C$ can not be satisfied: if $A$ and $B$ are true, $p$ and $q$ are true and therefore $C$ is false (obs.:the first example I cooked up had three variables and dozens of formulas, this one is much better!).

If, however, $A\wedge B$, $B\wedge C$ and $A\wedge C$ are simultaneously satisfiable, as Mauro ALLEGRANZA mentions in a comment, $A\wedge B\wedge C$ is satisfiable; actually, it is enough to assume any two among $A\wedge B$, $B\wedge C$ and $A\wedge C$ are simultaneously satisfiable.


问:
Strong Law of Large Numbers for not identically distributed Bernoulli variables
Let $X_{n,j}$ be independent discrete random variables taking only two values. In particular, $X_{n,j}=-\mu_{n,j}$ with probability $1-\mu_{n,j}$ and $X_{n,j}=1-\mu_{n,j}$ with probability $\mu_{n,j}$, where $0<\mu_{n,j}<1$. Notice that they all have zero mean, and variance $\mu_{n,j}(1-\mu_{n,j})$.

Moreover, suppose that
$$
\frac 1n \sum_{j=1}^n \mu_{n,j} \to c\in \mathbb R.
$$

I would like to conclude that, almost surely,
$$
Y_n := \frac 1n \sum_{j=1}^n X_{n,j} \to 0
$$
but the classical SLLN do not work, since $X_{n,j}$ are not equidistributed for fixed $j$. The classical Markov/Chebychev estimation yields
$$
\mathbb P[ |Y_n|\ge \epsilon ]\le \frac 1{\epsilon^2} Var(Y_n) = \frac 1{n^2\epsilon^2}
\sum_{j=1}^n \mu_{n,j}(1-\mu_{n,j}) \sim \frac {c-c^2}{n\epsilon^2}
$$

that is not summable.

Any idea?

答:
The fourth moment bound works.

Clearly we have $\mathbb{E}[X_{n,j}^4]\leq 1$ and $\mathbb{E}[X_{n,j}]=0$ for all $n,j$.  So
\begin{align*}
\mathbb{E}[Y_n^4] &= n^{-4}\left(\sum_{j=1}^n\mathbb{E}X_{n,j}^4+6\sum_{1\leq i<j\leq n}\mathbb{E}X_i^2X_j^2\right)\\
&\leq n^{-3}+6n^{-2}\leq 7n^{-2}
\end{align*}
and hence
$$
\mathbb{P}(\lvert Y_n\rvert\geq\epsilon)\leq\frac{\mathbb{E}Y_n^4}{\epsilon^4}\leq7\epsilon^{-4}n^{-2}.
$$
So $Y_n\to 0$ a.s.


问:
If $A$ and $B$ are operators on $V$ and $AB=I$, must $BA=I$?
Let $V$ be a vector space and $A,B\in\mathcal L(V)$, the set of linear operators on $V$. Suppose $AB=I$. Must $BA=I$? In other words, do left and right inverses coincide? If not, do conditions of finite-dimensionality of $V$ or boundedness of $A$ and $B$ change anything?

I am asking because I know that for a group, the existence of left inverses or right inverses alone guarantees existence of the other, with both coinciding. But the set of operators with, say, left inverses, doesn't automatically form a group, so I am not sure whether this applies. But I can't think of any example of square matrices with different left and right inverses.

答:
For infinite dimensional vector spaces it may fail. A standard example is to take the space of real sequences, let $B$ be the right shift operator, and $A$ the left shift operator,
$$\begin{align*}
B(x_1,x_2,x_3,\ldots) &= (0,x_1,x_2,x_3,\ldots)\\
A(y_1,y_2,y_3,\ldots) &= (y_2,y_3,y_4,\ldots)
\end{align*}$$
For finite dimensional vector spaces, $AB=I$ imlies $BA=I$: $B$ is one-to-one, hence surjective, hence invertible.


问:
Hausdorff distance between a sequence of sets and a limiting set
I have a sequence of closed, compact sets $\{A_n\}_{n \in \mathbb{N}}$ and $\{B_n\}_{n \in \mathbb{N}}$. I know that both $A_n$ and $B_n$ are decreasing in $n$; i.e.

$n_1 > n_2 \implies A_{n_1}\subseteq A_{n_2} \text{ and } B_{n_1}\subseteq B_{n_2}$

I also know that as $n \rightarrow \infty$, $A_n \rightarrow A$ for some set $A$ and $B_n \rightarrow \emptyset$.

Define the Hausdorff distance as:

\begin{equation}\nonumber
    d_H(X,Y) = \inf\{\epsilon \geq 0: X\subseteq (Y)_\epsilon\text{ and }Y\subseteq (X)_\epsilon\}
\end{equation}
where $(Z)_\epsilon$ represents the $\epsilon$-fattening of $Z$.

I want to show the following:

\begin{equation}\nonumber
d_H(A_n\setminus B_n,A) \rightarrow 0 \text{ as } n \rightarrow \infty
\end{equation}

Can this be done? And how?

答:
If $B_n$ goes to a point $p$, then then $ \varepsilon$-ball
$B_\varepsilon (p)$ contains $B_n$ and
$d_H(A_n,A)<\varepsilon$ for $  n\geq N$ and some $N$.

$ A_n - B_n$ contains $ A_n - B_\varepsilon (p)$ and a closed
$\varepsilon$-tubular neighborhood of $A_n - B_\varepsilon (p)$
contains $A_n,\ A_n-B_n$. Hence $ d_H(A_n - B_n,A_n - B_\varepsilon
(p)) \leq \varepsilon$.

From triangle inequality $\ast$ of $d_H$, then

\begin{align*} d_H(A_n - B_n, A) &
\leq d_H(A_n - B_n,A_n-B_\varepsilon (p))  + d_H( A_n -
B_\varepsilon (p),A_n) +d_H(A_n,A) \\&\leq 2\varepsilon + d_H(A_n,A)
\\ &
 \leq 3 \varepsilon \end{align*}

We have a claim $\ast$ that $d_H$ satisfies triangle inequality :

If $d_H(X,Y)=r,\ d_H(Y,Z)=R$, then $(Y)_{r+\epsilon},\
(Y)_{R+\epsilon}$ contains $X,\ Z$ respectively.

Here $(X)_{r+\epsilon}$ contains $Y$ so that $(X)_{R+r+2\epsilon}$
contains $Z$. Similarly $(Z)_{R+r+2\epsilon}$ contains $X$ so that
$d_H(X,Z)\leq r+R$.


问:
Why is this distribution function neither discrete nor continuous?
I'm refreshing some Probability Theory (it's been a while) and came accross the following example:

Let $X$ be a random variable with distributuion function $$F_X(x) = \left\{\begin{array}{l r}0 & \text{if }x<0\\\frac{1}{2}+\frac{x}{2}&\text{if }0\le x<1\\1&\text{if }x\ge 1\end{array}\right.$$
Then this random variable is neither discrete nor continuous, since $$\mathbb{P}(X=0)=\frac{1}{2},\quad\text{and}\quad\mathbb{P}(X=\frac{1}{2})=0.$$

Is this first statement true since $X$ takes these values on all $x<0$? And the second statement true since $X$ takes that value for only 1 value of $x$, out of infinitely many?

It's probably easy, but I'm not sure if I understand it...

答:
The distribution function, F, is not continuous because the limit, at = 0, "from the left" is 0 while the limit "from the right" is $\frac{1}{2}+ \frac{0}{2}= \frac{1}{2}$.

But the statement that "P(x= 0)= 1/2" is simply WRONG.  $P(x= a)= \int_{-\infty}^a F(x)dx$.  Since F(x)= 0 for x< 0, P(x)= 0 for x< 0  and, if $x\ge 0$ $P(x)= \int_0^x F(x)dx$.

In particular, while F(0)= 1/2, P(0)= 0 since $\int_0^0 F(x)d= 0$ for any F.
And $P(1/2)= \int_0^{1/2} \frac{1}{2}+ \frac{x}{2}dx= \left[\frac{x}{2}+ \frac{x^2}{4}\right]_0^{1/2}= \frac{1}{4}+ \frac{1}{16}= \frac{5}{16}$, not "0".


问:
Differentiating a complex term by a real scalar
I am struggling to understand complex differentiation. I want to find $\frac{\partial L_\theta}{\partial\theta}$ where $L_\theta=(\mathbf{x}_\theta-\mathbf{x})^\mathrm{H}\Sigma^{-1}_\theta(\mathbf{x}_\theta-\mathbf{x})$, $\mathbf{x}_\theta,\mathbf{x}\in\mathbb{C}^m, \Sigma\in\mathbb{C}^{m\times m}$ and only $\mathbf{x}_\theta$ and $\Sigma_\theta$ depend on $\theta$. To make it a little easier, $\theta\in\mathbb{R}$ is completely real. Any help would be really appreciated.
Thanks in advance.

答:
Hint:

$$\frac{\partial [(x_\theta - x)^H]}{\partial \theta} = (x_\theta -x)^{H} x_\theta
x_\theta'$$

Observe we have just used the chain rule.


问:
How can you show that $f$ is one-to-one without horizontal line test?
$f(x) = \sqrt{4x^2 + 1}$ for $x \in [0, \infty)$

I know that typically I can just do the horizontal line test, but I'm confused about how one would do this algebraically.

答:
Hint: you can just show that the function is monotone, then this suffices for the function to be injective.

Hint 2: you have to show that the function doesn't change from positive to negative or to negative to positive, then the function will be monotone.


答:
The function $x\mapsto \sqrt{x}: [0,\infty) \to [0,\infty)$ is one-to-one

The function $x\mapsto 4x+1: [0,\infty) \to [0,\infty)$ is one-to-one

The function $x\mapsto x^2: [0,\infty) \to [0,\infty)$ is one-to-one

Call these functions $f_1, f_2, f_3$. Then your function $f(x)=\sqrt{4x^2+1}$ is equal to

$$f(x) = f_1(f_2(f_3(x)))$$

Can you take it from here?

Title: How can you show that $f$ is one-to-one without horizontal line test?

Body:
$f(x) = \sqrt{4x^2 + 1}$ for $x \in [0, \infty)$

I know that typically I can just do the horizontal line test, but I'm confused about how one would do this algebraically.


答:
A kind of horizontal line test would be this:

$f(a)=f(b)$ iff $\sqrt{4a^2+1} = \sqrt{4b^2+1}$ iff $4a^2+1 = 4b^2+1$ iff $4a^2 = 4b^2$ iff $a^2=b^2$.

The latter means $a=b$ or $a=-b$. But the domain is nonnegative and so $a=b$.


答:
Algebraic method: for one-one functions, show that $f(x_1) = f(x_2) \implies x_1 = x_2$:
\begin{align}
\sqrt{4(x_1)^2 + 1} &= \sqrt{4(x_2)^2 + 1} \\
4(x_1)^2 + 1 &= 4(x_2)^2 + 1 \\
4(x_1)^2 &= 4(x_2)^2 \\
(x_1)^2 &= (x_2)^2 \\
x_1 &= \pm \sqrt{(x_2)^2} \\
&= \pm x_2.
\end{align}
But because $x \geq 0$, we reject the negative root.
So $x_1 = x_2$, thus the function is injective.


问:
Time to retire as a function of percentage of income saved.
I've been interested in the math behind the teachings of Mr Money Moustache.
He talks about years to retire as a function of the percentage of income saved.

This is easy to calculate in a spreadsheet yet by just adding the sum of a compound interest function yet I'd love to see this function written more simply and elegantly.

We assume that the amount saved will last indefinitely without the taking from the principal. (Withdrawal = interest, and no inflation.)

The basic premise is that if t is the amount of time needed to retire, i is income, r is the interest rate, and p is the percentage saved of i, then if only saving for a single year the equation should be...

$i/r = ip(1+r)^t$

Numerically assuming a interest rate of 0.04, savings rate of 0.5 and income of  100,000 a year this would look like...

$100,000/0.04 = 100,000 * 0.5 *(1+0.04)^t $

or

$2,500,000 = 50,000*(1.04)^t$

You can see that to retire at the current income level of \$100,000 a year you need \$2,500,000 which will yeild interest of $100,000 per year.

However solving this for t only solves for saving in a single year, the reality would including include subsequent years subject to $t - years to retirement$ for each additional year of income.

This is the problem I'd like to solve without making $t$ the sum of multiple equations.

In my workings I stumbled upon the equation $ t = ln(p)/ln(1+r)$ which quite accurately matches the time to retire calculated in a spreadsheet. This function was created from calculating the time required to make your entire income back from a given saving rate of your income from a single year $ A = Ap(1+r)^t$.

In this sense the equation fails to account for multiple years yet the fact that it accounts for $pA$ compounded to get $A$ as opposed to $pA$ compounded to get $A/r$ means seems to offset the lack of subsequent years added.
It seems likely that this is a simplification of the equation I am trying to get to yet am unsure.

答:
First formulate the question mathematically.  Consider individual sums saved of $p \times I$ deposited at the start of each year for $n$ years with annual interest rate of $r$.  At the end of the $n$ years you will have accumulated a sum $C$,
\begin{align*}
C =  Ip(1+r)^{n} + Ip(1+r)^{n-1} + Ip(1+r)^{n-2} + \cdots + Ip(1+r).
\end{align*}
Notice there is interest on the last payment because each payment is made at the start of the year.  This will be sufficient to maintain your income if the interest on this capital is more than $I$.  This means you want,
\begin{align*}
Cr \geqslant I.
\end{align*}
So far, you have this in your post, except the analysis is now extended to multiple years of saving and introduced an inequality '$\geqslant$'.  The inequality simply articulates that when saving for whole years only, you may not hit the target exactly.  We assume you prefer to overshoot a little rather than undershoot.

The long sum can be evaluated because it is a geometric progression,
\begin{align*}
C &= Ip\times (1+r)\times \frac{(1+r)^n-1}{(1+r)-1} \\
&=Ip \times (1+r) \times \frac{(1+r)^n-1}{r} \\
\end{align*}
and you are looking for the value of $n$ which makes $Cr \geqslant I$, which is to say
\begin{align*}
Ip(1+r)((1+r)^n-1)\geqslant I.
\end{align*}
A little algebra shows that $I$ cancels and the condition is met if,
\begin{align*}
(1+r)^n \geqslant \Big( 1 + \frac{1}{p(1+r)} \Big) = \frac{1+p(1+r)}{p(1+r)} .
\end{align*}
You can take logarithms (to any base, but we may as well use $\log_e = \ln$) and using $\log(x\times y)=\log(x)+\log(y)$, we get,
\begin{align*}
n \geqslant \frac{\log((1+p(1+r))/p(1+r))}{\log(1+r)} = \frac{\log(1+p(1+r)) - \log p - \log(1+r)}{\log(1+r)}
\end{align*}
Now, $p$ and $r$ are small relative to $1$, which makes the first and last terms in the numerator small relative to the middle term, and so for practical purposes the numerator is close to $-\log p$.  We then have the formula you quoted (appropriately signed), which addresses the question for multiple years of saving,
\begin{align*}
n \geqslant \frac{-\log p}{\log(1+r)} \quad \text{(approximately)}.
\end{align*}
A refinement might be to consider shorter intervals of saving.  The mathematics is the same.  If you want to work with monthly savings cycle, then instead of an annual interest rate $r$, and $n$ years we use monthly interest and $n$ counts the months to retirement.  The savings rate $p$ remains the same because we will continue saving the same proportion of income, only now applied to monthly income instead of annual income.


问:
Determine $\operatorname{Ext}_{\mathbb Z}^i(A,B)$ using projective resolutions
I know that there are many resources (such as Chap. 17.1 Dummit & Foote, in particular pg. 786 Example 1; and Lemma 3.3.1 in Weibel) that calculate $\operatorname{Ext}_{\mathbb Z}^i(A,B)$ for $i \geq 2$ using injective resolutions. I am wondering if there's a nice way to calculate $\operatorname{Ext}_{\mathbb Z}^i(A,B)$ using projective resolutions instead.

答: Because every subgroup of a free abelian group is free, every abelian group has a free (hence projective) resolution of the form $0 \to P_1 \to P_0$. So $\textrm{Ext}_\mathbb{Z}^i(A,B)=0$ when $i \geq 2$.


问:
Show that the sequence $x_{n+1}=5x_n-4x_{n-1}$ diverge
Show that the sequence $(x_n)$ defined as $x_{n+1}=5x_n-4x_{n-1}$ with $x_0=0,x_1=1$ diverge.

It is clear that the sequence diverge and this sequence is not really interesting, but still i'd like to know if my proof is correct (can't complete).

Suppose by absurd that the sequence $(x_n)$ converge and is a Cauchy sequence. So by définition we must have:

$\forall \varepsilon>0 \ \exists N \ \forall m,n\ge N$ $(m>n)$: $|x_m-x_n|<\varepsilon$

Moreover, $\forall p>1$: $|x_p-x_{p-1}|=|4(x_{p-1}-x_{p-2})|=...=|4^{p-1}|$

So we have that $|x_m-x_n|\le|x_m-x_{m-1}|+|x_{m-1}+x_{m-2}|+...+|x_{n+1}-x_n|\le 4^{m-1}+4^{m-2}+...+4^{n}=\sum_{k=n}^{m-1}4^k$

and so the sequence $(x_n)$ is not Cauchy.

The last line i'm not sure how to conclude correctly (if everything that i've done till now is correct) so need help and correction please! Thanks in advance

答:
You mean given $\varepsilon > 0$, the assumption to the contrary gives $N\in\mathbb{N}$ such that $\forall m,n > N\implies |x_m-x_n|<\varepsilon$ right? So to finish it off, you can just show that for some $m,n >N,$ this cannot hold. An obvious candidate would be $n = N+1$ and $m = N+p$ and you can take $p$ as large as you want.

How large? If you want to be explicit, then evaluate the geometric sum and play around with the logarithms. Or heuristically, you can say that the geometric series obviously diverges, no matter where it starts since $4 > 1.$


答:
Your proof is not correct.

Unfortunately you missed the fact that

$$\vert x_p -x_{p-1} \vert =4^{p-1} \vert x_1 -x_0 \vert$$ is enough to prove that the sequence is not Cauchy (providing that $x_1 \neq x_0$).

You have proven that $\vert x_m -x_n \vert$ is less than a diverging term and concluded that the sequence is not Cauchy. This is where the error lies: being less that something that diverges is saying nothing on the convergence.

Also, you should be more precise
$$|x_p-x_{p-1}|=|4(x_{p-1}-x_{p-2})|=...=|4^{p-1}|$$ is not correct. The difference depends on the difference of the two first terms of the sequence.

Title: Show that the sequence $x_{n+1}=5x_n-4x_{n-1}$ diverge

Body:
Show that the sequence $(x_n)$ defined as $x_{n+1}=5x_n-4x_{n-1}$ with $x_0=0,x_1=1$ diverge.

It is clear that the sequence diverge and this sequence is not really interesting, but still i'd like to know if my proof is correct (can't complete).

Suppose by absurd that the sequence $(x_n)$ converge and is a Cauchy sequence. So by définition we must have:

$\forall \varepsilon>0 \ \exists N \ \forall m,n\ge N$ $(m>n)$: $|x_m-x_n|<\varepsilon$

Moreover, $\forall p>1$: $|x_p-x_{p-1}|=|4(x_{p-1}-x_{p-2})|=...=|4^{p-1}|$

So we have that $|x_m-x_n|\le|x_m-x_{m-1}|+|x_{m-1}+x_{m-2}|+...+|x_{n+1}-x_n|\le 4^{m-1}+4^{m-2}+...+4^{n}=\sum_{k=n}^{m-1}4^k$

and so the sequence $(x_n)$ is not Cauchy.

The last line i'm not sure how to conclude correctly (if everything that i've done till now is correct) so need help and correction please! Thanks in advance


问:
Set of points that satisfy the sum of the distances between a point P and points A(-2,0) and B(2,0) = 7
So, I have to find the set of points whose distance to point $A(-2, 0)$ plus the distance to point $B(2, 0)$ is equal to $7$.

I am solving it this way:

$ d(P, A) + d(P, B) = 7  \Leftrightarrow $

$ \sqrt{(x+2)^2+y^2}+\sqrt{(x-2)^2+y^2}=7 \Leftrightarrow $

$ (x+2)^2+y^2+(x-2)^2+y^2=49 \Leftrightarrow $

$ x^2+4x+4+y^2+x^2-4x+4+y^2=49 \Leftrightarrow $

$ 2x^2+2y^2=49-8 \Leftrightarrow $

$x^2+y^2=\frac{41}{2} $

So, we have a circle centered in the Origin and radius $\sqrt{\frac{41}{2}}$

Now, when I drew this circle, and measured the distance from any point belonging to the circle to A adding to the distance of that same point to B, I get the result of around $9$

And effectively, $2\sqrt{\frac{41}{2}} \approx 9.05$

Where am I going wrong?

答:
When you expand $(a+b)^2$, you get $\color{blue}{\text{cross terms}}$ also as
$$(a+b)^2=a^2+b^2+\color{blue}{2ab}$$

You have missed
$$(x+2)^2+y^2+(x-2)^2+y^2+\color{blue}{2\cdot \sqrt{(x+2)^2+y^2}\cdot\sqrt{(x-2)^2+y^2}}=49$$

One more squaring will clear the square roots and finally give correct equation (of an ellipse).

If this is tedious, one can recognize the curve with given property of constant sum of distances from two points as an ellipse. And try to find its parameters.

The ellipse will be centered at midpoint of two foci, $(0,0)$. Major axis $2a=7 \Rightarrow a^2=49/4$. Distance of center from foci, $ae=2$. Minor axis is $2b$ where $b^2=a^2-a^2e^2=33/4$. Therefore required ellipse is
$$\frac{4x^2}{49}+\frac{4y^2}{33}=1$$


问:
Help with a question on vectors, their representation as partial derivatives, and their geometrical relationships.
I have the relation (in tensor or indicial notation):
$$\tag{1} f_{n_i} = -k \frac{\partial v}{\partial n_i}$$
where $f_{n_i}$ is the vector projection of the vector $f_i$ in the direction of unit vector $n_i$, $k$ is a scalar, $v$ is a scalar, and $\partial/\partial n_i$ denotes differentiation along the spatial direction of $n_i$.

Question1: Since $f_{n_i}$ is a vector would that make the term $\frac{\partial v}{\partial n_i}$ a vector? If "yes", could you explain the relationship between the vector notations such as those given in Eqn(1) on the left-hand and right-hand sides?

Question2: If we want to rearrange Eqn(1) to solve for $k$, one might naively write
$$\tag{2} k=f_{n_i}/(\partial v/\partial n_i)$$
But if $\frac{\partial v}{\partial n_i}$ is a vector then this would not work since we cannot divide a vector by a vector. Since $k$ is a scalar I suppose we have to perform a scalar (dot) product of the two vectors. How would one write this operation?

Question3: Using matrix notation, I know the geometrical relationship between the vectors $\bf{f}$, $\nabla v$, and $k$ is
$$\tag{3} k=\frac{|\bf{f}| cos \theta}{|\nabla v|}$$
where $\theta$ is the angle between the two vectors $\bf{f}$ and $\nabla v$. Based on the answer to Question2 -- which would be written in indicial notation -- how would one derive (i.e., arrive at) Eqn(3) while continuing to use indicial notation?

答:
In the plane, with Euclidean geometry, we can think of vectors as "arrows", say, with direction and length, in that plane.  With more complicated geometry, say a sphere, or the more general differential geometry, we cannot do that.  On the sphere, for example, at every point, there is a "tangent plane" and the vectors at any point are "tangent vectors" and lie in that tangent plane.  If we are given a function, f, defined at every point on that sphere it's derivative, with respect to the coordinate variables or, more generally, the "gradient", $\nabla f$, gives a vector at every point, a "vector field",  You are really working with vector fields, not individual vectors.  Your "v" and "$f_{n_i}$"  are vector fields, not vectors.

Yes, given $f_{n_i}= -k\frac{\partial v}{\partial n_i}$, you cannot solve for k by dividing by $\frac{\partial v}{\partial n_i}$ since that is a vector.  But you can calculate the lengths of the two vectors: $|f_{n_i}|= k|\frac{\partial v}{\partial n_i}|$  and then calculate that $k= \frac{|f_{n_i}|}{|\frac{\partial v}{\partial n_i}|}$.


问:
Problems about Wiener algebra(absolutely convergent fourier series)
The Wiener algebra $A(\mathbb T)$ is defined as the space of all functions defined on $\mathbb T$(the torus) such that its fourier series satisfies: $$\|f_n\|_{A(\mathbb T)}:=\sum\limits_{n}|\hat f(n)|<\infty.$$

An immediate consequence is stated: let $f_n\in A(\mathbb T)$ and $\|f_n\|\leq 1.$ Assume that $f_n$ converge to $f$ uniformly on $\mathbb T$. Then $f\in A(\mathbb T)$ and $\|f\|\leq 1.$

Here is my proof which can be skipped for readers who are not interested in:

Proof:
   Since $f_n$ converges uniformly to $f$, then for any $m>0$, there exists $N_m$ such that if $n\geq N_m$, $$\sup_t|f(t)-f_n(t)|<\frac{1}{m}.$$
For any $m\in\mathbb Z, n\geq N_m$, $$|\hat f(k)-\hat f_n(k)|=\frac{1}{2\pi}\int_{\mathbb T}|f(t)-f_{n}(t)|e^{-ikt}dt\leq\frac{C}{mk},$$
for any $k\in\mathbb Z.$

Thus it is obvious that for $n\geq N_m$, there holds
$$\sum\limits_{|k|\leq m}|\hat f|=\sum\limits_{|k|\leq m}(|\hat f(k)-\hat f_n(k)|+|\hat f_n(k)|)\leq 2\sum\limits_{j=1}^m\frac{1}{mj}+1\leq 2\frac{\log m}{m}+1.$$
As $m\rightarrow \infty,\ \|f\|_{A(\mathbb T)}\leq 1.$

Q.E.D

Is there any problems in it? I can't find any errors in it.

My central problem is described as follows:

Problem: the conditions do not imply $\lim\|f-f_n\|_{A(\mathbb T)}=0$, i believe this conclusion is correct, however, i cannot find some counterexamples. Can someone tell me the counterexample: my idea is to construct $$
\widehat{f_n}(m)=\left\{
\begin{aligned}
&\frac{\mathrm{sgn}(m)}{n}& m\in[-n,n]\backslash\{0\}\\
&0            & else.
\end{aligned}
\right.
$$However, i can not find it uniformly converges to $0.$

This problem follows from Yitzhak Katznelson "An introduction to harmonic analysis."

答:
Hint:
To start with, this is false:

’’For any $m\in\mathbb Z, n\geq N_m$,
$$|\hat f(k)-\hat f_n(k)|=\frac{1}{2\pi}\int_{\mathbb T}|f(t)-f_{n}(t)|e^{-ikt}dt..’’$$

However, for any $k$ we have
$$|\hat f(k)-\hat f_n(k)|=
\left| \frac{1}{2\pi}\int_{\mathbb T}(f(t)-f_{n}(t))e^{-ikt}dt\right|\leq\|f-f_n\|_\infty\to0$$


问:
Prove $\omega^{\omega_1}=\omega_1$ and $2^{\omega_1}=\omega_1$
Prove that $\omega^{\omega_1}=\omega_1$ and $2^{\omega_1}=\omega_1$.

I also found an exercise asking to compute the ordinal number $\omega_1^{\omega}$, but I do not even understand what I am supposed to do, any help?

答:
Ordinal exponentiation is not cardinal exponentiation.

Recall the definition of $\alpha^\beta$:

$\alpha^0=1$.

$\alpha^{\beta+1}=\alpha^\beta\cdot\alpha$.

$\alpha^\beta=\sup\{\alpha^\gamma\mid\gamma<\beta\}$ for a limit ordinal $\beta$.

So now we note the following:

If $\alpha,\beta$ are countable ordinals then $\alpha^\beta$ is countable. We can prove this by induction.

If $\beta>0$ then $\alpha<\alpha^\beta$.

From this it is somewhat easy to calculate $2^{\omega_1}=\omega^{\omega_1}$, since for every $\beta<\omega_1$ we have $2^\beta$ and $\omega^\beta$ to be countable ordinals, and this is a strictly increasing sequence of length $\omega_1$.

As for the additional exercise for $\omega_1^\omega$, I'm not clear about what it means "to compute the ordinal number", because $\omega_1^\omega$ is an ordinal number.

If one interprets "the ordinal number" as the Cantor normal form of $\omega_1^\omega$, then one can note that:

$$\omega_1^\omega=\left(\omega^{\omega_1}\right)^\omega=\omega^{\omega_1\cdot\omega}$$

I don't know if that's simpler, though.


问:
What is the etymology of "strength" in the sense of "a tensorial strength"?
Tensorial strength, and the notion of a functor having "a strength," is discussed on the nLab: https://ncatlab.org/nlab/show/tensorial+strength

What was the original reason for this name? Is it due to CS Peirce, or does it come from one of the application domains of category theory?

答:
I asked Anders Kock, and this is his answer:

In the article of mine quoted (Monads on Symm. Monoidal Closed
Categories, 1970, page 1), the word strength for a functor is used as
synonymous with enriched, i.e. as a $V$-functor., and was in fact
denoted by "st". I believe it may have been folklore usage at that
time. In loc.cit., I construct out of a strong $T: V \to V$ a tensorial
strength t', and prove in the follow-up paper 1972 that t' and st
correspond to each other (Strong Functors and Monoidal Monads, 1972,
Proposition 1.1). Over time, "strength" has mainly come to mean
tensorial strength.


问:
Convergence of $\sum_{k=1}^{\infty} \sum_{u=0}^{k-1}\frac{r^{u}}{(k-u)^2}$
Assume $r \in (0,1)$, I'm looking at the following sum, conjecture that it converges.

$$  \sum_{k=1}^{\infty} \sum_{u=0}^{k-1}\frac{r^{u}}{(k-u)^2} $$

This is very similar to the result of one earlier question, but I'm not sure how to cleanly deal with the $(k-u)^2$ denominator.

Edit:
Through playing around with Wolfram Mathematica, I'm getting

$$
\begin{align*}
 \sum_{k=1}^{\infty} \sum_{u=0}^{k-1}\frac{r^{u}}{(k-u)^2} &=  \sum_{k=1}^{\infty}\sum_{u=1}^{k}\frac{r^{k-u}}{u^2}\\ &=
\sum_{k=1}^{\infty}  \left(\sum_{u=1}^{k} \int_{0}^{r} \left(\frac{k}{u^2} - \frac{1}{u}\right)x^{k-u-1} dx   \right) \\
   &=   \left(\sum_{u=1}^{\infty}   \int_{0}^{r} \sum_{k=1}^{\infty} \left(\frac{k}{u^2} - \frac{1}{u}\right)x^{k-u-1} dx   \right) \\
   &=   \left(\sum_{u=1}^{\infty}   \int_{0}^{r} \frac{x^{-u} (u x-u+1)}{u^2 (x-1)^2}  dx  \right) \\
   &=   \left( \int_{0}^{r} \frac{\text{Li}_2\left(\frac{1}{x}\right)-x \log
    \left(\frac{x-1}{x}\right)+\log
    \left(\frac{x-1}{x}\right)}{(x-1)^2} dx   \right) \\
   &=   \left( -\frac{\text{Li}_2\left(\frac{1}{r}\right)}{r-1}+\text{Li}_2\left(\frac{r-1}{r}\right)+\log \left(\frac{1}{r}\right) \log
   \left(\frac{r-1}{r}\right)-\frac{\pi ^2}{6}   \right) \\
\end{align*}
$$
However, I can't validate whether all of the steps are valid and not misspecified by the software, especially the complex logarithms..

答:
Intuition:

Consider the innermost sum. For large values of $k$, "most" of the terms of this sum will be negligibly small because of the exponential factor $r^u$. However, the "first few" terms of the inner sum will behave like $1/k^2$. It turns out that we can get away with considering only the "first few" terms of this inner sum (by "first few", I mean $\log(k)$ asymptotically, as we shall see momentarily) and noting that the contribution of the rest of the sum is insignificant compared to these first few values.

Rigor:

Define

$$s_k = \sum_{u=0}^{k-1} \frac{r^u}{(k-u)^2}$$

Let's break off the first $k'=\lfloor \log_r (1/k^3)\rfloor$ terms of this sum:

$$s_k = \color{red}{\sum_{u=0}^{k'} \frac{r^u}{(k-u)^2}} + \color{blue}{\sum_{u=k'+1}^{k-1} \frac{r^u}{(k-u)^2}}$$

For each term in the red sum, we have that

$$\frac{r^u}{(k-u)^2} \le \frac{1}{(k-k')^2}$$

meaning that the red sum satisfies

$$\color{red}{\sum_{u=0}^{k'} \frac{r^u}{(k-u)^2}} \le \frac{k'}{(k-k')^2}$$

For each term in the blue sum, we have that $r^u \le 1/k^3$, and hence

$$\frac{r^u}{(k-u)^2} \le \frac{1}{k^3}$$

Thus, the blue sum satisfies

$$\color{blue}{\sum_{u=k'+1}^{k-1} \frac{r^u}{(k-u)^2}} \le \frac{k-k'-2}{k^3} \le \frac{1}{k^2}$$

Thus, by combining our inequalities for the red and blue sums, we have that

$$s_k \le \frac{k'}{(k-k')^2} + \frac{1}{k^2}$$

Now, recalling that $k'=\lfloor \log_r (1/k^3)\rfloor$, it is easy to show that the $s_k$ is $\mathcal{O}(k^{-2}\log k)$, which is enough to show that it converges.


问:
Green function of the half-plane
There is an equation for Green function of a half-plane:
$$ \Delta G = \delta (x - x_{0})\delta(y - y_{0}), \quad G(x, 0) = 0.$$
Of course, the Green function which satisfies the boundary condition is represented as
$$
G(x, y, x_{0}, y_{0}) = G_{0}(x, y, x_{0}, y_{0}) - G_{0}(x, y, x_{0}, -y_{0}),
$$
where $G_{0}(x, y, x_{0}, y_{0})$ is the Green function for a plane, so I need to find a Green function for a plane.

After using Fourier transform (and setting $x_{0}, y_{0}$ to zero) I got
$$-(k_{x}^{2} + k_{y}^2)\tilde {G_{0}} = \frac{1}{2 \pi} \Rightarrow \tilde G_{0} = -\frac{1}{2 \pi}\frac{1}{k_{x}^{2} + k_{y}^{2}}.$$

But after that I got divergent integral. Did I make a mistake?

答:
You didn't make a mistake, but it does mean that the Green function doesn't have a nice Fourier transform (else the integral would converge).

You can also try, for instance, to look for spherically symmetric Green functions $G=G(r)$, which will give you an easily-solved ODE for $G(r)$ (but the point $r=0$ will need some special attention).

Another thing is that if you get an integral somewhere of the form
$$ I(r)=\int_{-\infty}^{\infty} \frac{e^{-|k|r}}{|k|}\,dk, $$
you can (not rigorously at all) differentiate it w.r.t. $r$, integrate the result, then integrate back. It depends on your tolerance towards such cheap tricks. Even if you get your answer using a cheap trick, you can in the end just verify that it does, in fact, solve the equation.

Title: Green function of the half-plane


问:
0.1+0.2=0.30000000000000004 in floating point IEEE representations arithmetic addition manual proof.
I am trying to prove the 0.1+0.2=0.30000000000000004 by adding the numbers 0.1, and 0.2 in IEEE floating-point representation. I have added the operand values in IEEE format, with the general addition of bits the result I got is 1.0011001100110011001100110011001100110011001100110100 as mantissa, and the exponent value is 01111111101. Now When I tried to convert this binary number into a decimal number I have used the formula

$(-1)^s * $(1+mantissa) * $(2)^e$
, where s is sign bit and e stands for exponent bit value

where I need to calculate the 2^-48 and other values wherever the value is 1 in the result mantissa bits. I have used an online precision calculator to calculate the values of 2^-49, and others where the results are as below
negative exponent of 2 values

And the final decimal value I got is 0.3000000000000000444089209850062616169452667236328125 but the value I should get it as 0.30000000000000004, the answer which many of the programming languages give you.
Do not know where I am going wrong. Can anyone let me know If I am following any wrong process or my calculation part is going wrong?

Body:
Your value is the correct one, it's just that most programming languages don't print all those digits. But Python, for example, will show them if you ask for it:

>>> 0.1+0.2
0.30000000000000004
>>> '{0:.52f}'.format(0.1+0.2)
'0.3000000000000000444089209850062616169452667236328125'

And, for the record:

>>> '{0:.55f}'.format(0.1)
'0.1000000000000000055511151231257827021181583404541015625'
>>> '{0:.54f}'.format(0.2)
'0.200000000000000011102230246251565404236316680908203125'


问:
How to prove $ \prod_{n=1}^{\infty} \left(1+\frac{2}{n}\right)^{(-1)^{n+1}n} \,= \frac{\pi}{2e}$
How can I prove that

$$ \prod_{n=1}^{\infty} \left(1+\frac{2}{n}\right)^{\large{(-1)^{n+1}n}} \,= \frac{\pi}{2e}$$

The result is given here (result 48).

The source: Prudnikov et al. 1986, p. 757 is given, however I have been unable to find the book online.

Some of my attempts include:

Multiplying known infinite products for $\frac{\pi}{2}$  and
$\frac{1}{e}$

$$ \frac{\pi}{2} = \frac{2\cdot2\cdot4\cdot4\cdot6\cdot6\cdots}{1\cdot3\cdot3\cdot5\cdot5\cdot7\cdots} $$
$$ \frac{1}{e} =  \frac{1}{2} \left(\frac{3}{4}\right)^{\large{\frac{1}{4}}}\left(\frac{5\cdot7}{6\cdot8}\right)^{\large{\frac{1}{4}}} \cdots$$

as well as others given in https://arxiv.org/pdf/1005.2712.pdf

Trying to find the partial products from ${n=1} $ to $k $, Mathematica Gives:

$$\scriptsize{ \frac{\exp\left(2\left(-\zeta(-1,k+\frac{1}{2})^{(1,0)}+\zeta(-1,k+\frac{3}{2})^{(1,0)}+\zeta(-1,k+1)^{(1,0)}-\zeta(-1,k+2)^{(1,0)}\right)\right)\pi\, \Gamma(k+2)^2}{2\,\Gamma(k+\frac{3}{2})^2}} $$

However, I have been unsuccessful producing partial products on my own.

Taking the $\ln$ of the product to try to find the partial sums;

Trying to transform the following integral into infinite product.

$$\int_{0}^{\infty} \frac{\cos(x)}{1+x^2} = \frac{\pi}{2e} $$

From what I have seen in some papers, the partial products are found, then the Stirling's Approximation is used to find the limit.

Question: How can I prove the value of the given Infinite Product? Proofs or hints are both welcome.

Thank you kindly for your help and time.

答:
So far these are just some thoughts.

Introduction:

We can use the product $\sin\pi x=\pi x\prod_{n\ge1}(1-x^2/n^2)$ to show that
$$\mathrm L(x)=\int_0^x\ln\sin\pi t\,dt=\ln\left[\left(\frac{\pi x}{e}\right)^x\prod_{n\ge1}e_k(x)\right],\tag1$$
where
$$e_k(x)=\frac{j(n+x)}{(en)^{2x}j(n-x)}, $$
and $j(x)=x^x$. This is done by expanding
$$\ln\sin\pi t=\ln(\pi t)+\sum_{n\ge1}\ln(1-t^2/n^2)$$
and integrating termwise. On the other hand, we know a lot about a closely related function called the Clausen function, which is defined as
$$\mathrm{Cl}_2(x)=-\int_0^x\ln\left|2\sin\tfrac{t}{2}\right|dt=\sum_{n\ge1}\frac{\sin nx}{n^2}.\tag2$$
We can show that
$$\tau(x)=\prod_{n\ge1}e_n(x)=\left(\frac{e}{\pi x}\right)^x\exp\mathrm L(x)=\left(\frac{e}{2\pi x}\right)^x\exp\left[-\frac{1}{2\pi}\mathrm{Cl}_2(2\pi x)\right].\tag3$$

Main Ideas:
Consider the value of $\tau(1)$. We have
$$\mathrm{Cl}_2(2\pi)=\sum_{n\ge1}\frac{\sin2\pi n}{n^2}=0,$$
so $$\tau(1)=\frac{e}{2\pi}.$$
We will consider the convergent analog of the divergent product in the title
$$P=\prod_{n\ge1}\left(\frac{n}{n+1}\right)^{2n}\left(\frac{2n+1}{2n-1}\right)^{2n-1}.$$
We aim to show that $P=\frac{1}{4\tau(1)}=\frac{\pi}{2e}$.

From the Clausen duplication formula and a bit of algebraic manipulation, we may show that
$$\tau(2x)=\frac12\left(\frac{\pi}{e}\right)^{2x-1}\left(\frac{\tau(x)}{j(\tfrac12-x)\tau(\tfrac12-x)}\right)^2.\tag4$$
If we can find a suitable value $x$ to plug into $(4)$, we may be able to get an expression for $\frac{1}{4\tau(1)}$ which can be transformed, via algebraic manipulations, to the expression for $P$. I will update my answer once a suitable value is found.


问:
Definition of representable functor with values in $Ab$
I was reading these notes and I came up with a question about Definition 8.2.1 at page 283: what does it mean for a functor $F : C \to Ab$ to be representable? Is this definition related to that of a representable presheaf?

I presume that, by composing $F$ with the forgetful functor $G :Ab \to Set$, we could adapt the definition of representable presheaf to $F$ and conclude that $F$ is representable iff $G \circ F$ is representable as a presheaf, but I am not totally sure this is correct.

答:
$\require{AMScd}$The keyword here is "enriched category"; what Neeman is leaving as understood is that every triangulated category is preadditive i.e. every hom-set is not only a set, but an abelian group, and every composition map
$$ c: \hom(A,B)\times \hom(B,C) \to \hom(A,C)$$
is not only a function, but a $\mathbb Z$-bilinear map; this means that $c$ becomes a unique, well-defined map of abelian groups
$$ c: \hom(A,B)\otimes \hom(B,C) \to \hom(A,C)$$
where the tensor product is understood over the ring $\mathbb Z$. The category of abelian groups here plays the role of a "base" where you can "enrich" your category (homs are groups now, they carry richer structure than mere sets).

Category theory can be cast in its entirety "enriched over set", and "enriched over another base"; yet, this is something you can overlook considering your final goal (which is, afaicu, understanding Brown representability?). Enriched category theory is both a very informative guiding principle and a very deep rabbit-hole, especially for the beginners. In case you need more information about that more general theory, you can ask, but I'd suggest you refrain from entering this specific hole: as you might have noticed, category theory opens very many Pandora's boxes very fast.

For the sake of understanding BRT, it is enough that you register that Yoneda lemma (the key concept in representability of functors) now exists in two forms, "strong" and "weak", specialised to the case where the "base of enrichment" (=the category each $\hom(A,B)$ in an object of) is $\bf Ab$: the weak form says that the underlying sets $FA$ and $\text{Nat}(\hom(-,A),F)$ of the two abelian groups are in bijection; the strong form (which takes a little bit more effort in general but is almost for free in the $\bf Ab$-case) says that they are also isomorphic as abelian groups.

As a general rule, you are rarely interested in knowing something about the set $FA$, when it is also a group, and mere bijections have little importance, you look for isomorphisms. A functor $F : \mathcal C^{op}\to \bf Ab$ is thus representable when there exists an object $R$ (as "r"epresentative) in $\mathcal C$ such that there is a natural isomorphism of abelian groups $\mathcal C(X,R)\cong FX$.

The word "natural" is what makes this result a little subtler than it seems because there can be a way (in fact, there is plenty) to force a bijection $\theta : \mathcal C(X,R)\overset{\sim}\to FX$ of underlying sets to become a group isomorphism: either side (say, $FX$) is a group, just transport this operation on the other side by posing
$$ f+g := \theta(\theta^{-1} f + \theta^{-1} g)$$
In principle, though, there is no reason for this family of bijections $\theta_X : \mathcal C(X,R)\cong FX$ to be natural, in the sense that it makes the squares
$$
\begin{CD}
\mathcal C(X,R) @>\theta_X>> FX \\
@Vu^* VV @VVFuV \\
\mathcal C(Y,R) @>>\theta_Y> FY
\end{CD}
$$ all commute, for every morphism $u : Y \to X$ in $\mathcal C$. For this to be true, you have to build an isomorphism in a keener way, showing that the two objects $\mathcal C(-,R), F$ have -in a suitable sense- the same universal property as objects of the category of functors $\mathcal C^{op} \to \bf Ab$.


问:
The functional equation $\delta(n) = \delta(2n) + \kappa(n)$
I am interested in finding a function $\delta(n)$ that solves a functional equation of the form—$$\delta(n) = \delta(2n) + \kappa(n),$$for all integers $n \ge 1$ that are powers of 2, where $\kappa(n)$ is a known function that depends on $n$.  This equation came up when seeking answers to a question of mine about converging polynomials.  For example (Nacu and Peres 2005, proposition 10):

If $\kappa(n) = \dfrac C {\sqrt{2n}}$, then $\delta(n) = \dfrac{(1+\sqrt{2})C}{\sqrt{n}}$, where $C > 0$.

If $\kappa(n) = \dfrac M {4n}$, then $\delta(n) = \dfrac M {2n}$, where $M > 0$.

Unfortunately, I don't know how to solve this functional equation for $\delta(n)$ when $\kappa(n)$ is arbitrary. An example is $\kappa(2^m) = \dfrac M 2 \cdot \dfrac 1 {8\cdot2^m-4}$, which is not a hypergeometric function as rsolve requires. How can I do that?

REFERENCES:

Nacu, Şerban, and Yuval Peres. "Fast simulation of new coins from old", The Annals of Applied Probability 15, no. 1A (2005): 93-115.

答:
Well, not much can be said about the solutions in the general case where $ \kappa $ is arbitrary. The only useful (and fairly trivial) observation is that using induction, you can show that for each $ n \ge 1 $ that is a power of $ 2 $, you have
$$ \delta ( n ) = \delta ( 1 ) - \sum _ { k = 0 } ^ { \log _ 2 ( n ) - 1 } \kappa \left( 2 ^ k \right) \text . \tag 0 \label 0 $$
This shows that given $ \delta ( 1 ) $, $ \delta ( n ) $ is determined uniquely. It very much depends on what $ \kappa $ is whether there is a closed form for $ \delta $ or not.

In the special case that
$$ \kappa ( n ) = \frac M { 8 ( 2 n - 1 ) } \tag 1 \label 1 $$
which is of your interest, WolframAlpha gives the solution in terms of the $ q $-digamma function $ \psi _ q $, which is the $ q $-analog of the digamma function $ \psi $. $ \psi _ q ( x ) $ is defined to be equal to $ \frac 1 { \Gamma _ q ( x ) } \frac { \partial \Gamma _ q ( x ) } { \partial x } $, as we similarly had $ \psi ( x ) = \frac 1 { \Gamma ( x ) } \frac { \mathrm d \Gamma ( x ) } { \mathrm d x } $, where $ \Gamma $ is the gamma function, and $ \Gamma _ q $ is its $ q $-analog, the $ q $-gamma function. While these are all well-know functions, their definitions involve sums, and calculating their values may not be much easier than calculating the sum appearing in \eqref{0}. But as they are well-known special functions, any usual computational software has some implementation of them, which may be useful to you.

Anyways, in case of \eqref{1}, the solution given by WolframAlpha can be simplified to the following form:
$$ \delta ( n ) = K + \frac M 8 \Big( \log _ 2 ( n ) - \log _ 2 ( e ) \cdot \psi _ 2 \big( 1 + \log _ 2 ( n ) \big) \Big) \text , $$
where $ e $ is Napier's constant and $ K $ is a constant which can be determined from the value of $ \delta ( 1 ) $.


问:
Intuitive reason for the continuity requirement in convergence in distribution.

We say that a sequence of random variable $(X_n)$ converges in
distribution to $X$, if $F_{X_n}(x)\rightarrow F(x)$ in all points $x$
where $F$ is continuous. F is the cumulative probability function.

I have two questions about this:

Why is it natural to require convergence where we have continuity?

Why is it natural to not require convergence if we have a discontinuity?

答:
Well, there are mathematical reasons for that. If one finds them intuitive/natural, depends on one's mathematical education.

Concerning the first question: it's certainly sufficient to know the limiting cdf where it's continuous, since it's monotone increasing (i.e. can have only jumps, where it's not continuous) and right-continuous, giving its value at a discontinuity.

On the other hand, imagine $X_n=\frac1n\,\sum^n_{i=1}Y_i$, where the $Y_i$ are independent and (say) normally distributed with mean $0$ and variance $1$. Then, $X_n\to0$ a.s. (strong law of large numbers), so it will also converge in distribution. But the limit cdf is discontinuous, jumping from $0$ to $1$ at $x=0$ (as it's the cdf of a constant), and due to right-continuity, $F(0)=1$. But due to symmetry, $F_{X_n}(0)=\frac12$ for all $n$, so it can't converge to $F(0)=1$, there.