问:
Solving an equation for an unknown matrix
I have come across the following equation but not sure how to solve it for matrix $D$. Let matrices $E$, $M$ and $D$ are three symmetric, $2\times 2$ and semi p.d. matrices. How to solve the equation $M = ED + DE$ for D, where $M$ and $E$ are known?

I tried the following,
\begin{equation}
M = ED + DE = E^{1/2}DE^{1/2}+E^{1/2}DE^{1/2} = E^{1/2}(D+D) E^{1/2}
\end{equation}
Then, we get $D = \frac{1}{2}E^{-1/2}ME^{-1/2}$. But I do not think it is correct as I found a counterexample, and also it shows $ED=DE$ which is not always true.

I appreciate any help in this regard.

答:
This is called a sylvester equation, and there are many known ways to solve it (for instance, on the linked wikipedia article). Naively, the idea is to write $X$ as a vector rather than a matrix, and encode all the relevant linear conditions in one (bigger) matrix.

You can also find information at this wonderful blog post. Though now that you know the name, I'm confident you'll have no issues finding solution techniques!

I hope this helps ^_^


问:
How to construct a topological group from a semidirect product of two subgroups
I'm trying to endow affine group $\mathrm{GA}(X)$, $X$ the given affine space, with canonical topology based on the semidirect product of two of its subgroups $T(X)$ and $\mathrm{GA}_a(X)$: $\mathrm{GA}(X)=T(X)\mathrm{GA}_a(X)$, where $T(X)$ is the set of all translations of $X$ and $\mathrm{GA}_a(X)$ is the stabilizer of $a\in X$ in $\mathrm{GA}(X)$ (note that $X$ is a homogeneous space for $\mathrm{GA}(X)$). I have had the canonical topology on subgroups $T(X)$ and $\mathrm{GA}_a(X)$, respectively, based on group isomorphisms $T(X)\cong\vec X$ and $\mathrm{GA}_a(X)\cong\mathrm{GL}(\vec X)$. But my math background does not support me to construct the topology based on semidirect product.

Abstracting from the above concrete motivation, the problem is as follows:

Given topological groups $(H,\tau)$ and $(K,\sigma)$, group $G$ is the
semidirect product of its subspaces $H$ and $K$, assuming, without
loss of generality, $H$ is normal. How to, if at all, construct the induced
topology $\nu$ on $G$ to make it a topological group and $\tau,\sigma$
happen to be the subspace topology of $\nu$?

The condition that $\tau,\sigma$ are subspace topologies of $\nu$ is added by me because I think that's a natural requirement. Please correct me if not. As I said, I'm not able to perform this construction, so I ask here in hope to get some help. It is also ok if you refer me to some textbook or online tutorial (I searched but having no luck) that addresses construction of topological group out of semidirect product. Thank you.

PS, for those who doubt feasibility/motivation/context of such a construction, the question comes from the following paragraph in a geometry text:

Note: the $X$ on the 3rd line should be $\mathrm{GA}(X)$ in my understanding.

答:
Upon request, here we go: if $H$ and $K$ are topological groups equipped with an action
$$\alpha: K \to \text{Aut}(H),$$
which is continuous in the sense that
$$
  (k,h)\in K\times H \mapsto \alpha_k(h)\in H
  $$
is a continuous map, then we define the semidirect product group
$
H\rtimes_{\alpha}K
$
to be the Cartesian product  $H\times K$, equipped with the multiplication operation
$$
(h_1,k_1)(h_2,k_2) = (h_1\alpha_{k_1}(h_2),k_1k_2).
$$

If we equip $H\rtimes_{\alpha} K$ with the product topology, then it becomes a topological group.

ContentLicense: CC BY-SA 4.0


问:
How to integrate x^2 exp(-x^2/8)?
$\int x^2 e^{-x^2/8}$

I want to know the theoretical value of mean of N(0,sd=2) and then every number is squared. The r code is:

mean(rnorm(10000,0,2)^2)

答:
Another method than the one mentioned in the comments is to consider a more general version of your problem. Let
$$\mathcal{G}(a)=\int_0^\infty e^{-a x^2}\,dx=\sqrt{\pi}a^{-1/2}$$
Then your integral is given by $-\frac{d}{da}\mathcal{G}\,\big|_{a=1/8}$. Computing it, you find that your integral is
$$8\sqrt{2}\sqrt{\pi}.$$

Title: How to integrate x^2 exp(-x^2/8)?


答:
If $X$ has normal($0,\sigma=2$) distribution and you want $E(X^2)$, use the fact that
$$\operatorname{Var}(X)=E(X^2)-[E(X)]^2.$$

Title: How to integrate x^2 exp(-x^2/8)?

Body:
$\int x^2 e^{-x^2/8}$

I want to know the theoretical value of mean of N(0,sd=2) and then every number is squared. The r code is:

mean(rnorm(10000,0,2)^2)


问:
Can you switch integrals if you don't care about the infinite part?
So, schematically, suppose one is doing some real integral
$$\mathcal{I}=\int_a^\Lambda \int_b^cf(x,y)\,dx\,dy,$$
where $\Lambda$ is some cutoff that one would like to take to infinity and suppose the inner integral is finite and $\int_b^c|f(x,y)|\,dx<\infty$ for any $y$. Further suppose that the whole integral diverges as $\Lambda\to\infty$ (for example, the case I have in mind is $\mathcal{I}\sim \alpha\Lambda + \beta\log\Lambda+$ finite). Obviously, switching the order of integration is not okay. However, if I am interested only in the non-divergent part of the integral, is switching the order of integration allowed? Or are there conditions under which it is allowed if I only want the part that is finite as $\Lambda\to\infty$?

答:
Without going too far afield, e.g., theorems of Tonelli and Fubini,  if $f$ is continuous on a bounded rectangle $[a,b]\times [c,d]$, then it must hold that

$$\int_a^b \int_c^d f(x,y) \, dy \, dx =\int_c^d \int_a^b f(x,y) \, dx \, dy $$

This can be proved easily using the uniform continuity of $f$ on the compact rectangle.

A counterexample when $f$ is not continuous is

$$ \int_0^1\int_0^1 \frac{x-y}{(x+y)^3} \, dx\, dy = -\frac{1}{2}, \quad   \int_0^1 \int_0^1 \frac{x-y}{(x+y)^3} \, dy\, dx = \frac{1}{2}$$

The integrals are evaluated easily by noticing that

$$\frac{x-y}{(x+y)^3} = -\frac{\partial}{\partial x} \left( \frac{x}{(x+y)^2} \right) =\frac{\partial}{\partial y} \left( \frac{x}{(x+y)^2} \right),$$

and, hence,

$$ \int_0^1\int_0^1 \frac{x-y}{(x+y)^3} \, dx\, dy =  -\int_0^1\int_0^1\frac{\partial}{\partial x} \left( \frac{x}{(x+y)^2} \right) \,dx\,dy \\ = -\int_0^1\frac{1}{(1+y)^2} \, dy = \left.\frac{1}{1+y} \right|_0^1 = - \frac{1}{2}$$


问:
Do derivative and Integral really cancel out so easily here?
In a paper I came across the following equation where the loss function $\mathcal{L}$ must be minimized with respect to the reconstruction function $r_\sigma$.
With  $\bar{x} := x + \eta \quad \eta \sim \mathcal{N}(\sigma^2I)$:
$$
\begin{align*}
\mathcal{L}_{\textrm{DAE}}(\theta) &=
\mathbb{E}_{f(\eta, x)} \left[ \|x - r_{\sigma}(\bar{x}) \|^2_2  \right]  \\
 &= \int_{\mathbb{R}^d} \int_{\mathbb{R}^d} p(\bar{x}-\eta)p(\eta|\bar{x}) \|r_{\sigma}(\bar{x}) - \bar{x} + \eta  \|^2_2 \;  d\eta d\bar{x} \\
 &= \int_{\mathbb{R}^d} \int_{\mathbb{R}^d} p(\bar{x}-\eta)p(\eta) \|r_{\sigma}(\bar{x}) - \bar{x} + \eta  \|^2_2  \; d\eta d\bar{x} \\
&=  \int_{\mathbb{R}^d} \mathbb{E}_{\eta} \left[ p(\bar{x}-\eta) \left\|r_{\sigma}(\bar{x}) - \bar{x} + \eta \right \|^2_2 \right] d\bar{x} \quad (1)
\end{align*}
$$
We minimize this equation by differentiating it with respect to $r_{\sigma}(\bar{x})$ and setting it equal to $0$. Let $r_\sigma^*(\bar{x})$ denote the the minimum:
$$
\begin{align*}
0 &= \mathbb{E}_{\eta } \left[ p(\bar{x}-\eta) \left(r_\sigma^*(\bar{x}) - \bar{x} + \eta \right) \right] \quad(2)
\end{align*} \\
...
$$

My problem is the step between (1) and (2).
Although it looks correct, I failed to do this step more formally.
Any help is much appreciated!

It is the first part of the proof 6.1 from https://arxiv.org/pdf/1211.4246.pdf

Edit
Thanks to Milo Brandt's answer I now understand why the integral vanishes. However I am very unsure about the correctness of the  following steps:

Lets fix $\bar{x}$ and try to find a $r$ which minimizes $\mathbb{E}_{\eta} \left[ p(\bar{x}-\eta) \left\|r_{\sigma}(\bar{x}) - \bar{x} + \eta \right \|^2_2 \right] $ for this arbitrary $\bar{x}$. To do so we take the derivativ with respect $r$ and get the minima $r^*$ by setting it to 0.
$$
\begin{align}
0=&\frac{d}{dr}  \mathbb{E}_{\eta} \left[ p(\bar{x}-\eta) \left\|r_{\sigma}^*(\bar{x}) - \bar{x} + \eta \right \|^2_2 \right] \qquad (3) \\
0= &  \mathbb{E}_{\eta} \left[ \frac{d}{dr}  p(\bar{x}-\eta) \left\|r_{\sigma}^*(\bar{x}) - \bar{x} + \eta \right \|^2_2 \right] \qquad (4)\\
0 &= \mathbb{E}_{\eta } \left[ p(\bar{x}-\eta) \left(r_\sigma^*(\bar{x}) - \bar{x} + \eta \right) \right] \quad(4)
\end{align}
$$

答:
This isn't really an integral and a derivative cancelling out, so much as an artifact of optimizing over a domain of functions - basically, it's a problem involving the calculus of variations.

Without worrying too much about formality, the problem looks something like:

Find a function $f$ minimizing $L(f) = \int g(x, f(x))\, dx$

And the claim being put forward is essentially that the authors can produce a function $f^*(x)$ with the property that $g(x,f^*(x)) \leq g(x,y)$ for every $x$ and $y$ - or, in words, that $f^*(x)$ minimizes $g(x,-)$ for each $x$. From this, it follows that $L(f^*) \leq L(f)$ for every other function $f$, since the integral on the left hand side is pointwise less than or equal to the integral on the right hand side.

However, this is not what the authors of that paper wrote - perhaps because they wanted to show a derivation of the minimum, rather than just pulling a function $f^*$ out of nowhere and saying "it's got this nice property so it must be the minimum" (although, this is indeed the shortest and perhaps clearest proof of their claim). The form of their argument is somewhat suggestive (though not formally using) of some results that look like a converse to this.

Essentially, if you want to minimize $L(f)$, a good bet is to think about what happens if you slightly perturb $f$ - since the minimum, of course, should not get smaller due to perturbation (or due to anything else, of course!). Informally speaking, if you had some other candidate function $h$, one would expect, as a linear approximation,
$$L(f+\varepsilon h)\approx L(f)+\varepsilon\int g_y(x,f(x))\cdot h(x)$$
where $g_y$ is the derivative of $g$ with respect to its second argument. This is often rigorously true with derivatives, but all the usual analytical details pop up when you try to prove it. In any case, you can see from this that, for $f$ to be a minimum, it really has to be true that
$$\int g_y(x,f(x)) \cdot h(x)=0$$
for every function $h$ by which we could perturb $f$. As long as the domain of $L$ is not too constrained and $g$ is not too badly behaved, this just means that
$$g_y(x,f(x)) = 0$$
for every $x$, since otherwise you'd just choose $h$ to be negative where $g_y(x,f(x))$ is positive and positive where $g_y(x,f(x))$ is negative, and find out that perturbing $f$ by that $h$ would decrease $L$ - ruling out $f$ as a minimum. This is why the integral disappears - because we can choose to focus only on any part of the domain by choosing a perturbation wisely - not for any special reason about derivatives and integrals being inverse.

This is more or less analogous to techniques for finding critical points in finitely many dimensions. If you wanted to minimize $f_1(x_1)+f_2(x_2)+f_3(x_3)$ over tuples $(x_1,x_2,x_3)$, you would just minimize $f_1(x_1)$ and $f_2(x_2)$ and $f_3(x_3)$ separately. What the authors do here is the same, replacing a sum over a finite set with an integral over a continuous domain.


问:
MVT Differentiation
Can anyone help me with these

Suppose that $f$ is differentiable on $[4,6]$ and is such that $f(4) = 6$ and $f' \geq 2$ on
$[4,6]$. Find the lowest possible value of $f(6)$.

I think the answer for the lowest possible value of $f(6)$ is $10$. Is it right?

Give a function $f$ that is differentiable on $\Bbb R$ and which has the following 3 properties, or explain why such a function can't exist: $f(1) = 3$, $f(3) = 8$, and $f'(x)\leq 2$ for all $x$.

答:
For the first one, you've done well in figuring out what the least value of $f(6)$ may be. By MVT, there is a point $4<t<6$ such that $$f'(t)=\frac{f(6)-f(4)}{6-4},$$ whence $$f(6)=f(4)+2f'(t)=6+2f'(t)\ge10.$$ A straight line shows us that $10$ is a feasible value.

For the second, use the same kind of reasoning to figure out the following:

Let $f$ be differentiable on $[1,3]$, such that $f(1)=3$ and $f'\le 2$ on $[1,3]$. What is the highest possible value of $f(3)$?

ContentLicense: CC BY-SA 3.0

Title: MVT Differentiation


问:
Thoughts on Bézier curve intersection and reliability of the test
Suppose we have two planar parametric curves f(t) and g(t), which are guaranteed to be second- or third-degree Bézier curves, which means they can be placed in "polynomial" form:
$$
\textbf f(t) = \textbf a t^3 + \textbf b t^2 + \textbf c t + \textbf d\textrm{, where }\textbf a \neq (0, 0)\textrm{ or }\textbf b \neq (0, 0)
$$
For a graphics application, I want to find, with certain precision, all the intersection points between f and g on their respective intervals. Those intersections are then used to subdivide the curves and place them in a modified doubly-connected edge list data structure to determine the topology of a certain path: I want to identify a path's "faces" and explicitly encode them in order to correctly implement the Loop-Blinn curve rendering technique (preferentially without using the stencil buffer).

One of the facts I can use is that, unless the curves are part of the same "matrix curve", the number of intersections is at most $\partial \textbf f \ \partial \textbf g$, since they are polynomial. That means 4 for quadratic-quadratic, 6 for cubic-quadratic and 9 for cubic-cubic curves. My initial ideas were to use bounding-box and subdivision techniques, but they fail and produce a large amount of intersections when the curves are tangent (meaning $\textbf f(t) = \textbf g(u)$ and ${\textbf f}'(t) \times {\textbf g}'(u) = 0$); trust me, I spent weeks trying to "improve" only this part of the algorithm, since it is the main one, given that missed or multiple intersections can break the rest of the code.

It wasn't until now that I decided to try more mathematical approaches, instead of more geometrical methods. We essentially have a function we want to find the roots of:
$$\textbf d(u, v) = \textbf f(u) - \textbf g(v)$$
Given that function, we can use the multivariate Newton method in order to search for root:
$$\textbf J(u,v) = \begin{bmatrix}f'_x(u) & -g'_x(v)\\f'_y(u) & -g'_y(v)\end{bmatrix}$$
$$\textbf J^{-1}(u,v) = -\frac 1{\textbf f'(u) \times \textbf g'(v)}\begin{bmatrix}f'_x(u) & -f'_y(u)\\ g'_x(v) & -g'_y(v)\end{bmatrix}$$

And then, choosing an iteration point $(u_0, v_0) \in [0, 1]^2$, we can use Newton method to find:
$$\begin{bmatrix}u_{n+1}\\v_{n+1}\end{bmatrix} = \begin{bmatrix}u_n\\v_n\end{bmatrix} + \frac 1{\textbf f'(u_n) \times \textbf g'(v_n)}\begin{bmatrix}f'_x(u_n) & -f'_y(u_n)\\ g'_x(v_n) & -g'_y(v_n)\end{bmatrix} \left(\textbf f(u_n) - \textbf g(v_n)\right)$$

That raised some questions though: this method will also fail on tangent curves (we will have numerical instabilities because of $\textbf f'(u) \times \textbf g'(v)$ going to zero), and this has no guarantee to find but one of the roots, and then I would have to randomly test points until I find all the curves (I can fail fast if $(u_n, v_n)$ falls off the unit square). Another thought would try to find the zeros of $\left\|\textbf d(u,v)\right\|^2$, since it will only be zero when the curves intersect, but finding the zeros of a $\mathbb{R}^2$ to $\mathbb{R}$ sounds even more challenging; I could try to minimize it, but I would fall on solving a system of equations of fifth degree, which falls again to trying the roots numerically.

Another insight would be to detect tangent curves in a way; there's no way to escape those, because they are artistically pleasing and they will always appear between "consecutive" curves in a piecewise-smooth path (they are tangent at their endpoints!). So I would like some new insights on how to proceed to solve that. The results don't need to be infinitely precise, but they should at least be tractable enough so I can derive topology information from them. Thank you!

答:
Doing this reliably is very difficult. That's why CAD companies have had hundreds of developers working for decades on problems like this. I'd say a couple of weeks to get something that works 95% of the time, and several months to get to 99%.

As you said, it's a good idea to look for tangent intersections first, and treat those as a special case. If you just treat a tangent intersection as a regular intersection, it's an ill-conditioned problem, so no algorithm is going to work reliably.

I'd guess that tangent intersections will be quite rare in the interior of curve segments, but very common at shared end-points, so you should special-case that, too. In fact, shared end-points (tangent or not) are likely to be a very common type of intersection, so you should find those first.

If you're going to resort to generic multivariate root-finding, then don't write that code yourself. Go find some code written by people whose expertise is far greater than yours or mine. The Numerical Recipes book is much maligned by true experts, but it's not a bad place to start. Certainly better than re-inventing root-finding yourself.

There's a good discussion of curve-curve intersection techniques in chapter 7 of this document, though it focuses more on performance than reliability.

This book might also be helpful. It has a pretty good discussion of polynomial root-finding and how this can be applied to intersection problems.


问:
Upper bound for $|3x - 2|$ given $|x+3| < 2$?
I am given a condition $|x+3| < 2$ to find the upper bound of $|3x - 2|$. I am not quite sure if my process is correct.
\begin{align*}
|x+3|<2 & \Longleftrightarrow -2 < x + 3 < 2\\\\
& \Longleftrightarrow -6 < 3x + 9 < 6\\\\
& \Longleftrightarrow -17 < 3x - 2 < -5
\end{align*}

Is it safe to assume that the upper bound of $|3x - 2|$ is $-5$?

答: No, the upper bound is actually 17 because when you take the absolute value it makes it positive. Also, the RHS of your inequalities should be -5 instead of 5.</p>


问:
Points of inflexion at circular points at infinity.
According to the Wikipedia article on Cassini Ovals, a Cassini oval has double-points, which are also inflexion points, at circular points I and J at infinity.  I don't understand how to show that I and J are inflexion points.  Wikipedia references a very old text by Basset which makes the same claim.  Unfortunately, I was not able to find any "computational" support for this statement; only a general discussion about points of contact was given.  I am looking for an explanation or a good reference that I can use to understand this problem.  Thanks in advance!</p>

答:
The Wikipedia article on
Circular points at infinity
gives their homogeneous coordinates as
$$(x_0,y_0,z_0) = (1,\pm i,0). \tag{1}$$
The homogeneous equation for
Cassini ovals is
$$ P(x,y,z) := (x^2+y^2)^2 - 2 a^2 (x^2-y^2) z^2 + (a^4-b^4) z^4 = 0. \tag{2}$$
Verify for the circular points in equation $(1)$ that
$$ P(x_0,y_0,z_0) = 0. \tag{3}$$

As for inflection points, differentiate the equation $(2)$ taking partials to get
the equation of the tangent line at $\,(x_0,y_0,z_0).\,$ Namely,
$$ \frac14 dP(x,y,z) = x((x^2+y^2)-a^2z^2)dx +
y((x^2+y^2)+a^2z^2)dy + z(a^2(y^2-x^2)+(a^4-b^4)z^2)dz.\tag{4}$$
If we evaluate this equation $(4)$ with $\,x^2+y^2=z=0\,$ as
in equation $(1)$ it vanishes which verifies that there
is a double point at infinity.
Also equation $(4)$ is cubic in $\,x,y,z\,$ which verifies that
the circular points are also inflection points of the curve.


问:
Stability ODE's problem
$(0,0)$ is a equilibrium point of the System $(x,y)'=f(x,y)$, where $f(x,y)=(2xy-x^3, x^2-y^5)$ stable or unstable. I think that is unstable but i don't now how prove it. thanks for your skills

答:
My response is too long for a comment and is not intended to be a complete answer to your question. But here it goes.

The Jacobian of $f$ at the origin, namely $J_f(0,0)$, is the precisely zero matrix, and we can't use it to assess stability.  When this happens you'll want to refer to a directed graph of the vector field $$\vec{f}(x,y)=\Big<2xy-x^3,x^2-y^5\Big>$$ If you do so you'll see right that the critical point at the origin is unstable. You should also notice that $$(x,y)=\Big(\pm2^{5/8},2^{1/4}\Big)$$ are asymptotically stable critical points since the trace of $J_f$ is negative at both points. You may be able to identify a theorem which says any critical point wedged between two asymptotically stable critical points cannot itself be stable. I tried to find a theorem which made this claim myself but to no avail.

Title: Stability ODE's problem


问:
Let $(X,d)$ be a compact metric space. Let $f:X\to X$ be such that $d(f(x),f(y))<d(x,y)$ for all $x,y\in X$ but $x\neq y$. Can $f$ be surjective?
Let $(X,d)$ be a compact metric space. Let $f:X\to X$ be such that $d(f(x),f(y))<d(x,y)$ for all $x,y\in X$ but $x\neq y$. Can $f$ be surjective?

I (believe) I've shown $f$ is always continuous and always has a fixed point. But, I cannot seem to pin down whether it can be onto. I don't know if there may be some exotic compact space that would allow so, but my intuition says the answer is 'no.'

Continuous: Simply choose $\delta=\epsilon$.

Fixed point: Proof by contradiction using $x\mapsto d(x,f(x))$.

Surjective: (?)

答:
Given a metric space $(X, d)$, define its diameter to be
$$
\text{sup} \{d(x, y) |x, y \in X\}.
$$
If $X$ is compact, then its diameter is finite and there exist two points $x_0, y_0$ whose distance is equal to the diameter, because the function
$$
d: X \times X \to \mathbb{R}
$$
has compact, and hence bounded image.

The diameter of $f(X)$ is less than that of $X$, so they cannot be the same as each other. (Proof: say $d(f(x), f(y)) \geq \text{diameter}(X)$; then $d(x, y) > \text{diameter}(X)$ which is nonsense.)


问:
pmf multiplies pdf? pdf of the second independent exponential random variable
There are two Poisson processes (simultaneously, but independently): event A happens in Poisson process with $\lambda_{A}$ and event B happens with $\lambda_{B}$. I would like to find the probability density function for random variable $X$, where $X$ is the time from the start until the first event A happens which is preceded by at least one B.

My solution:

$F_{X}(X\leq x)=\int_{0}^{x}\lambda_{A}e^{-\lambda_{A}t}dt[1-e^{-\lambda_{B}t}]$
$=\int_{0}^{x}\lambda_{A}e^{-\lambda_{A}t}dt-\int_{0}^{x}\lambda_{A}e^{-(\lambda_{A}+\lambda_{B})t}dt=1-e^{-\lambda_{A}x}+\frac{\lambda_{A}}{\lambda_{A}+\lambda_{B}}[1-e^{-(\lambda_{A}+\lambda_{B})x}]$.

Therefore, $f_{X}(x)=\lambda_{A}e^{-\lambda_{A}t}[1-e^{-\lambda_{B}t}]$.

Explanation: The probability that A first happens at time $T$ in a small interval is $\lambda_{A}e^{-\lambda_{A}t}dt$. The probability that B happens before $T$ is $1-e^{-\lambda_{B}t}$. Because they are independent, the joint probability is the multiplication of individual ones.

The correct answer is follows:
Let $X_B$ = the time from the start to the time of the 1st event B, and $X_A$ = the time from the 1st event B to the time of the 1st event A. $X=X_A+X_B$.

So its PDF is the convolution of the two exponential distributions. For $x \geq0$, $f_{X}(x)=\int_{-\infty}^{+\infty}\lambda_{A}e^{-\lambda_{A}y}\lambda_{B}e^{-\lambda_{B}(x-y)}dy=\frac{\lambda_{A}\lambda_{B}}{\lambda_{B}-\lambda_{A}}(e^{-\lambda_{B}x}-e^{-\lambda_{A}x})$.

Please tell me where I am wrong and how to correct it.

Updates after @heropup 's answer.

Update 1: @heropup is right, the correct answer is $\frac{\lambda_{A}\lambda_{B}}{\lambda_{A}-\lambda_{B}}(e^{-\lambda_{B}x}-e^{-\lambda_{A}x})$

Update 2: I misunderstood the problem as "the X is the time until first A happens and the first A happens after at least one B". In that sense, $(A_1,A_2,A_3,B_1,A_4)$ is not in my sample space. Under this condition, will $f_{X}(x)=\frac{\lambda_{A}e^{-t\lambda_{A}}[1-e^{-t\lambda_{B}}]}{F_X(\infty)}$ be the correct answer? The $F_X(\infty)$ makes $f_{X}$ integrals to 1. My thought is since $f_{X}$ contains the new subsample space, normalizing it will makes it a new complete sample space.

What is the pdf of X if the X is the time until first A happens and the first A happens after at least one B?

答:
You seem to be suggesting that $$\Pr[X \le x] = \int_{t=0}^x \Pr[B \le t \mid A = t]f_{A}(t) \, dt = \int_{t=0}^x \Pr[B \le t] f_{A}(t) \, dt.$$  But this is not true.  To see why, suppose the sequence of events we observe are $$(A_1, A_2, A_3, B_1, A_4).$$  Then $X = A_4$ is the time we want, but three previous $A$-type events have already occurred before we observe the first $B$ event.  Your computation does not account for this kind of outcome.

A few comments.  First, the correct answer contains a typo, and is also incomplete:  it should be $$f_X(x) = \begin{cases} \frac{\lambda_A \lambda_B}{\color{red}{\lambda_A - \lambda_B}} (e^{-\lambda_B x} - e^{-\lambda_A x} ), &\lambda_A \ne \lambda_B,  \\ \lambda_A^2 x e^{-\lambda_A x}, & \lambda_A = \lambda_B.\end{cases}$$ because if $\lambda_A > \lambda_B > 0$, then $e^{-\lambda_B x} > e^{-\lambda_A x}$; and if $\lambda_A = \lambda_B$, the derived expression is indeterminate; instead, the sum $X_A + X_B$ is Gamma distributed with shape $2$ and rate $\lambda_A = \lambda_B$.

Second, one way to see that your result cannot be correct is to integrate your density:  you will find yours integrates to $\lambda_B/(\lambda_A + \lambda_B) < 1$.  Another way is to note that when $\lambda_B \ll \lambda_A$, that is to say, $B$-type events are much more rare than $A$-type events, the distribution of $X$ is mainly influenced by the random time it takes to observe $B$.  For instance, if $\lambda_B = 1/1000$ but $\lambda_A = 1000$, then $X \approx X_B$.  The correct answer behaves in this way, but yours does not.

Third, how do we fix your approach?  I do not see a simple way to do it if you are conditioning on $A$, because $A$ depends on whether we have observed $B$.  Therefore, to condition on $A$ is in a sense circular logic:  $B$ depends on $A$ but $A$ depends on $B$.  You could condition on $B$, but this is precisely what the correct solution does:  $$\Pr[X \le x] = \int_{t=0}^x \Pr[B < A \le x \mid B = t] f_B(t) \, dt = \int_{t=0}^x \Pr[A - B \le x - t \mid B = t] f_B(t) \, dt,$$ and then the solution uses the memoryless property and independence of $A$ and $B$ to conclude $A - B = X_A$, $B = X_B$, and $\Pr[A - B \le x - t \mid B = t] = \Pr[X_A \le x-t]$.  After differentiating to get the density, we obtain the same result.


答:
By way of contradiction, suppose $f$ is surjective.

Then $\forall x,y \in X$, we have $x_0,y_0 \in X$ such that $f(x_0)=x$ and $f(y_0) = y$. Then

$$d(x,y) = d(f(x_0),f(y_0)) < d(x_0,y_0)$$

Define the constant $M$ by

$$M := \sup_{(x,y) \in X \times X} d(x,y)$$

This exists since, trivially, the set of distances is nonempty. However, since metrics are continuous function and $M$ is compact, $d$ attains its supremum, and thus we may claim

$$M = \max_{(x,y) \in X \times X} d(x,y)$$

Thus, there exist some $x^*,y^*$ such that $d(x^*,y^*) = M$. However, there always exists a pair $(x_0,y_0)$ for any $(x,y)$ such that $d(x,y) < d(x_0,y_0)$. A contradiction is reached, and $f$ cannot be surjective.

Perhaps an example would be enlightening.

An easy one would be to take $X = [0,1]$ with the usual Euclidean metric $d$, and the function $f(x) = x/2$. Clearly meets the contraction criteria, but, for instance, is there $x$ such that $f(x)=1$?

I say contraction criteria because one may define a mapping $f$ to be a contraction on a metric space if $d(f(x),f(y)) \le k \cdot d(x,y)$ for every $x,y$ and for $k \in (0,1)$. Your function meets this criteria. Notice how, intuitively, the function $f$ "shrinks" the space, and reduces the distances between points.

Body:
Let $(X,d)$ be a compact metric space. Let $f:X\to X$ be such that $d(f(x),f(y))<d(x,y)$ for all $x,y\in X$ but $x\neq y$. Can $f$ be surjective?

I (believe) I've shown $f$ is always continuous and always has a fixed point. But, I cannot seem to pin down whether it can be onto. I don't know if there may be some exotic compact space that would allow so, but my intuition says the answer is 'no.'

Continuous: Simply choose $\delta=\epsilon$.

Fixed point: Proof by contradiction using $x\mapsto d(x,f(x))$.

Surjective: (?)


问:
Taylor series for $\sqrt{x}$?
I'm trying to figure Taylor series for $\sqrt{x}$. Unfortunately all web pages and books show examples for $\sqrt{x+1}$. Is there any particular reason no one shows Taylor series for exactly $\sqrt{x}$?</p>

答:
Well, I know this is an old answered post, but referring to the question that all web pages and books doesn't show examples for $\sqrt{x}$,  on book, Thomas' Calculus Twelfth Edition on exercises of section 10.8, problem 9 the question is: find the Taylor polynomial of order 0,1,2, and 3 generated by $f$ at $a$ and the exercises are the following

And the book also gives the answers, those are the following

I've posted the images of the book in order to show that at least there's one book with the worked exercise.

Internet is a very resourceful place, but good calculus books are a very good option to find lots of exercises and examples that have been worked by experts.

Title: Taylor series for $\sqrt{x}$?


问:
Proof that limits are unique
I have been working through a few calculus proofs, and to prove that a limit was unique i assumed the fact that if $c,d\in\mathbb{R}$ if given any $\epsilon>0$ we have $|c-d|<\epsilon$, then $c=d$.  However, is there an actual proof of this statement, or is this more of an obvious reality?

答:
Limit points are unique in any $T_2$-space (Hausdorff space).

The proof is straightforward, since there are disjoint open sets separating any two distinct points.  Then if there were two different limit points $p,q$ of a sequence $(x_n)$, we reach a contradiction right away, because there are disjoint open sets $U_p,U_q$ with all the elements of the sequence in one, hence not the other, after a certain $n$.

Notes:

Any metric space is Hausdorff.

$T_1$ is not enough to ensure unique limit points.

The cofinite topology on an infinite set is an example of a topology which is $T_1$ but not $T_2$.

Ultrafilters and nets do have unique limits in $T_1$ spaces.

Title: Proof that limits are unique


问:
Finding a function which maps two variables $x_1$ and $x_2$ to $y$ with given points
I'm trying to determine a function/equation that would "solve" the following mapping (apologies for the super wide table):

$x_1$
$x_2$
$y$

3
3
0

3
4
1

3
5
2

4
3
3

4
4
4

4
5
5

5
3
6

5
4
7

5
5
8

...
...
...

I've been trying to solve this for a while now, but I'm not sure how to approach it other than by randomly trying different combinations of transforms. Is it even solvable?

答:
When $x_1=3, y=x_2-3$.  When $x_1=4, y=x_2.$  When $x_1=5, y=x_2+3$.

So  $y=x_2+3(x_1-4)=3x_1+x_2-12$.

(I can say at least that choice matches all the data given.)


问:
Probability to get 5 successes in at most 7 trials
The night before the party, you plan to rehearse the song you are to sing and would like to sing it perfectly 5 times before sleeping. Since you are a great singer, the probability of you singing it perfectly on each attempt is 5/6. Suppose your attempts are mutually independent, what is the probability that you'll rehearse the song at most 7 times?

Here's my approach:
\begin{align*} \text{Probability to get 5 successes in 5 tries} = 4C4\left(\dfrac{5}{6}\right)^4\left(\dfrac{1}{6}\right)^0\dfrac{5}{6} &\approx 0.402\\ \text{6 tries} = 5C4\left(\dfrac{5}{6}\right)^4\left(\dfrac{1}{6}\right)^1\dfrac{5}{6} &\approx 0.334\\ \text{7 tries} = 6C4\left(\dfrac{5}{6}\right)^4\left(\dfrac{1}{6}\right)^2\dfrac{5}{6} &\approx 0.167\\\\ \text{Probability to get 5 successes in at most 7 tries} &= 0.903 \end{align*}

Was my approach correct? May I also know what type of Probability Distribution is suitable to model this problem?

答:
Interesting!

Inittially I thought the calculations in your original post had to be incorrect, since they included the probability of getting 6 or 7 heads in 7 trials, and that seems to makes no sense, since you stop flipping as soon as you get that 5th head. Indeed, you may not do 7 trials at all.

In your updated calculations in the comments to true blue anil's answer you at least make sure that you flip exactly 5 heads, and that this may occur in 5, 6, or 7 trials, so that seemed to be closer to what you want. However, here you do not specify that that 5th head must be the last one of the sequence of trials, because again you stop as soon as you get that 5th head.

Specifically, when you calculate getting exactly 5 heads out of 7 trials, then that includes something like getting 5 heads followed by 2 tails ... or getting 5 heads in the first 6 trials followed by a tail. These are not sequences you want.

Indeed, the fact that in your updated calculatona you got a calculated probability over $1$ (which is of course impossible) is because the event of getting $5$ heads in the first $5$ trials is incorporated in your calculations three different times!

To get all valid sequences for 7 trials, you only want those where the first 4 heads occur in the first 6 trials, and the 5th one on the 7th.

This would be:

$6C4 (\frac{5}{6})^4 (\frac{1}{6})^2 \frac{5}{6}$

Likewise, the probability of getting 5 heads out of 6 trials includes the one where you get 5 heads followed by a tail ... again not what you want.

Instead,you just want those with 4 heads in the first 5 trials, followed by a head:

$5C4 (\frac{5}{6})^4 (\frac{1}{6})^1 \frac{5}{6}$

Interestingly, when you do the calculations this way, you do end up with the same probability as your original answer .. which we can understand as follows:

With your original method, you calculated any sequence of 7, with 5, 6, or 7 heads. With my method, we considered the sequence of 5,6, or 7, ending with a head. But note, once you extend the sequences of 5 or 6 ending with a head to get a sequence of 7, you are also getting all sequences of length 7, and with 5,6, or 7 heads! So, they are in fact exactly the same, and your original calculations are in fact correct!


问:
"Great Theorems" references
I read a great book a few years ago that gave itself this description:

For disciplines as diverse as literature, music and art, there is a tradition of examining masterpieces - the "great novels", the "great symphonies," the "great paintings" - as the fittest and most illuminating objects of study. Books are written and courses are taught on precisely these topics in order to acquaint us with some of the creative milestones of the discipline and with the men and women who produced them.

The present book offers an analogous approach to mathematics, where the creative unit is not the novel or symphony, but the theorem.

I found this to be a highly enjoyable way of learning math: first a problem is motivated, then it is solved. I just finished a course on algebra which was very well taught, and I learned a lot, but I often felt it wasn't well motivated - I spent lots of time learning about, say, rings, but no reasons as to why rings are useful and we should reason at that level instead of the more familiar algebra.

Anyway, this is a very long-winded introduction to my question: can anyone recommend books or (preferably) courses which follow the basic structure of: here's a problem, here's why it's important, now let's solve it?

答:
I've since found some other books that I thought I should include for others' reference:

Dunham is the master of this niche; his other books include: The Calculus Gallery, The Mathematical Universe and Euler: Master of us All. (See also Dunham's Clay Lecture on Euler)

The MAA has several books in this line, the only one of which I've read so far is Charming Proofs: A Journey into Elegant Mathematics

Benson's The Moment of Proof: Mathematical Epiphanies had some good stuff, but it also had a lot of introductory material which I didn't like as much.

Title: "Great Theorems" references


问:
Automorphism group of a non-abelian group is divisible by $p^2$.
Suppose $G$ is a finite non-abelian group, so that $|G|=p^n$ for some positive integer $n\ge 3$ (where $p$ is prime).

How can we prove that $|{\rm Aut}(G)|$ is divisible by $p^2$?

We know that $G/Z(G)\leq{\rm Aut}(G)$ by the inner automorphisms and the first isomorphism theorem. And because $G$ is non-abelian $Z(G)<G$ and by Lagrange's Theorem $|G/Z(G)|=\frac{p^n}{|Z(G)|}$. But from here I'm stuck.

答:
As you correctly showed, $G/Z(G) \leq {\rm Aut}(G)$, so by Lagrange's theorem, $[G:Z(G)] \mid |{\rm Aut}(G)|$. Now, as $G$ is not abelian, $[G:Z(G)] > 1$. Since this is a $p$ group, that tells us that $p\mid [G:Z(G)]$ (and in fact that it is a power of $p$). But we want a factor of $p^2$, so let's suppose that $[G:Z(G)]=p$. $Z(G)$ is a normal subgroup of $G$, and because $p$ is prime, we have that $G/Z(G)$ is cyclic.

Let $G/Z(G) = \langle a Z(G) \rangle$. Then we can parition $G$ into the cosets $Z(G), a Z(G), a^2 Z(G), \dots, a^{p-1} Z(G)$. In other words, every element of $G$ takes the form $a^r g$ for some $r \in \mathbb Z$ and $g \in Z(G)$. Now, observe that $(a^r g)(a^s h)=(a^s h)(a^r g)$ as all the terms here commute: the powers of $a$ commute with each other and $g,h \in Z(G)$. So we have shown that if $G/Z(G)$ is cyclic then $G$ must have been abelian, a contradiction.

In summary, we have $p\mid [G:Z(G)]\mid |{\rm Aut}(G)|$. Furthermore, $[G:Z(G)]$ is a power of $p$ and the above showed that $[G:Z(G)]\neq p$. Thus, $p^2 \mid [G:Z(G)]\mid |{\rm Aut}(G)|$ as desired.


问:
Are the functions $f:[1,2]\to (0,1)$ and $g:\mathbb{R}\to \mathbb{R} \setminus \mathbb{N}$ I defined bijective?
I defined functions $f:[1,2]\to (0,1)$ and $g:\mathbb{R}\to \mathbb{R} \setminus \mathbb{N}$ as follows:

$$f(x)=
\begin{cases}
1/2 & x=1\\
1/3 & x=2\\
1/(n+2) & \exists n \in \mathbb N^+ (x=1+1/n)\\
x-1 & \text{else}
\end{cases}$$

$$g(x)=
\begin{cases}
-2x-1 & x \in \mathbb N\\
2x & \exists n \in \mathbb N^+ (x=-n)\\
x & \text{else}
\end{cases}$$

I showed that they're bijective by considering all possible cases (and proving by contradiction that some can't occur - in the injectivity proof). My question is: are they really bijections? If so, is there any simpler way to prove it?

答: They are bijections. I think there's no simpler way to complete the proof, for you must deal with the conditions that maps the integers since they are special from the others. They're nice constructions tho.


答:
Here it is another way to approach it for the sake of curiosity:
\begin{align*}
|3x - 2| = |3(x + 3) - 9 - 2| = |3(x+3) - 11| \leq 3|x+3| + |11| < 3\times 2 + 11 = 17
\end{align*}

Hopefully this helps!

Title: Upper bound for $|3x - 2|$ given $|x+3| < 2$?

Body:
I am given a condition $|x+3| < 2$ to find the upper bound of $|3x - 2|$. I am not quite sure if my process is correct.
\begin{align*}
|x+3|<2 & \Longleftrightarrow -2 < x + 3 < 2\\\\
& \Longleftrightarrow -6 < 3x + 9 < 6\\\\
& \Longleftrightarrow -17 < 3x - 2 < -5
\end{align*}

Is it safe to assume that the upper bound of $|3x - 2|$ is $-5$?


问:
Determining distance with laser and camera
I'm designing a device that measures distance using a laser and a camera. The device has the camera and laser separated by 100mm and they both point in the exact same direction. This is done so the camera can determine how far an object is depending on the distance between the center of the camera and the laser light is. So if the device is pointing towards a far object the light from the laser is closer to the center of the camera but on the contrary, if the object is very close, the distance between the laser light and the center is about 100mm. In my head it seems possible but how would I do this?

I was thinking of posting this to StackOverflow but I decided this was more of a math question rather than a code question.

Edit: I found a video of this method being used here.

答:
The thin lens formulae are fairly simple.  Depending on your camera, the lens may be rather complex and they may not work for you. You can consider the object to be a line segment from the center of the frame to the laser spot, so the size of the object is $100$ mm

We define

$d_o$ as the distance from the lens to the object.  This is what you are trying to measure

$d_i$ as the distance from the lens to the image

$f$ as the focal length of the lens

$s_o$ as the size of the object.  You have said this is $100$ mm

$s_i$ as the size of the image.

You want to measure all the variables in the same units, presumably mm.

The formulas are
$$\frac 1f=\frac 1{d_o}+\frac 1{d_i}\\
\frac {s_o}{d_o}=\frac {s_i}{d_i}$$
You measure $s_i$, which is the distance on your image plane from the center to the laser spot.  You will have to convert the number of pixels to mm based on the characteristics of your sensor.  You know $s_o$, which I will leave as a variable in case you change it sometime.  Then
$$\frac{s_i}{s_o}=\frac {d_i}{d_o}\\
d_i=\frac {s_id_o}{s_o}\\
\frac 1f=\frac 1{d_o}+\frac {s_o}{s_id_o}=\frac 1{d_o}\left(1+\frac {s_o}{s_i}\right)\\
d_o=f\left(1+\frac {s_o}{s_i}\right)$$
It will be crucial to have the lens aligned so its center is the correct distance from the laser spot.  Given that, you will get best accuracy if the focal length is chosen so the laser spot is barely in the frame.


问:
The restriction of a covering map on the connected component of its definition domain
Suppose $p:Y\to X$ is a covering map, $X,Y$ are manifolds and $X$ is connected. If $Z$ is a connected component of $Y$, I wonder if the restriction of $p$ on $Z$ is also a covering map? If not, what conditions should be added to guarantee the restriction is a covering map? (expect that $Y$ is compact.)

What I do: I know only need to show $p(Z)=X$. $p$ is a local homeomorphism and thus an open map. $Z$ is an open set since $Y$ is locally connected, and of course a closed set, so $p(Z)$ is an open set. Then I want to show $p(Z)$ is also closed, thus $p(Z)$ is open and closed in a connected space $X$, so $p(Z)=X$. But I cannot show $p(Z)$ is closed, perhaps I try a wrong way.

答:
I'll use the definition of covering map as it appears in Hatcher's Algebraic Topology:  A continuous map $p:Y\to X$ is called a covering map, if for every $x\in X$ there is an open neighborhood $U$ around $x$ whose preimage is a (possibly empty) disjoint union of open sets, each of which is mapped homeomorphically onto $U$ via $p$. Note that this definition does not require a covering map to be surjective.

Still, if the codomain is connected, the map must be surjective by the following argument:

Assume $x\notin p(Y)$. Then its preimage $p^{-1}(x)$ is empty. There is an open $U$ containing $x$ such that $p^{-1}(U)$ equals $\bigsqcup_{\alpha\in I}U_\alpha$ where $U_\alpha\approx U$ and all $U_\alpha$ are open. But since $x$ is not in the image of $p$, the disjoint union must be the empty union. This means that $U$ does not intersect $p(Y)$, so $p(Y)$ is closed.

On the other hand, $p$ is an open map. If $V\subset Y$ is an open set containing $y$ and $U$ is the evenly covered neighborhood of $p(y)$, then $y$ is contained in some $U_\alpha$. Since $V\cap U_\alpha$ is open, $p(V\cap U_\alpha)$ is an open subset of $U$, thus an open set in $X$ which is contained in $p(V)$, so $p(V)$ is open.

If $X$ is connected, then $p(Y)$ must be all of $X$, being a clopen subset of a connected space.

To prove that the restriction of the $p$ in your problem to the connected component $Z$ is also a covering map, take an $x\in X$ and an open neighborhood $U$ such that $p^{-1}(U)$ equals $\bigsqcup_{\alpha\in I}U_\alpha$ where $U_\alpha\stackrel p\approx U$ and all $U_\alpha$ are open. Since $X$ is locally connected, there is an open connected $V$ such that $x\in V\subset U$. Its preimage is $\bigsqcup_{\alpha\in I}V_\alpha$ where $V_\alpha$  is simply the preimage of $V$ in the particular $U_\alpha$. Each $V_\alpha$ is connected, so it is either entirely in $Z$ or it is disjoint to $Z$. If you delete all the $V_\alpha$'s which are not in $Z$ from the union, you obtain the preimage of $V$ under the restriction of $p$. This means that this restricted $p$ still is a covering map.


问:
Can a self-inverse function introduce bias?
I have a self-inverse function $f(x)$, with the domain $\{x: 0 \le x \lt n\}$ (for some arbitrary $n$) such that $x$ is a nonnegative integer. I'm looking for a proof that $f(x)$ cannot introduce any kind of statistical bias.

Since $f$ is a self inverse, every output must be within the domain. Otherwise, $f$ could produce an output it cannot use as an input, therefore not being a self-inverse.

Since $f$ is a self inverse, any introduction of bias would mean it's more likely to produce a certain output. Since $f$ is a self inverse, this would be impossible.

$f$ cannot produce any output more than once, since the inverse would no longer be a function (for each output of a function, there must be exactly 1 corresponding input)

Since $f$ is its own inverse, this would make $f$ not a function

I think I have a good basis for my proof, but I'm unable to articulate why these properties mean there cannot be bias introduced by $f$.

One idea I have is I can model $f$ as a permutation of the set of integers $\{x: 0 \le x \lt n\}$, then elaborate on how a permutation of a set cannot introduce bias (I'm thinking this is the most likely to come out as a clear explanation).

In my case, $f(x)$ operates within a finite range (integers from $1$ up to $n$). One answer mentions $\sqrt{1-x^2}$ being a self-inverse that changes the average for $x$ between $0$ and $1$, but it relies on the fact that one can choose infinite possible $x$.

I purposely fail to define what "bias" means; because within the scope of this question, I refer to any possible bias. I understand that this lack of specific definition makes this question weird (which is why I was unable to develop a clear answer myself, and therefore why I needed to ask this question).

答:
You could argue that $f$ simply "renames" the values.  Therefore, it cannot introduce any bias because it is the $identity$ function -- simply it gives the values new names.  E.g. the name of "1" is now "5", the name of "2" is "1", etc.

Note: This approach works regardless of what "introducing statistical bias" means -- which in my field (cryptography) is a rather long definition.


问:
Calculate zeros of rational function directly from residues of partial fraction expansion without calculating polynomial coefficients
Imagine the following rational function in the Laplace-domain with $s = \mathrm{j}\omega$

$$G(s) = \sum_{i=1}^{m} \dfrac{c_i}{s-p_i}= h\,\dfrac{\prod\limits_{i=1}^{n}(s-z_i)}{\prod\limits_{i=1}^{m}(s-p_i)} = \dfrac{A_0 + A_1 s + \ldots A_n s^n}{B_0 + B_1 s + \ldots B_m s^m}$$

for which I know the poles $p_i$ and the residues $c_i$.

I would like to calculate the zeros $z_i$. This is actually trivial: one can calculate the coefficients $A_1 \ldots A_n$ of the numerator polynomial in various ways (most simple would be the Matlab function residue) and calculate the roots of this polynomial. However, in case floating-point-precision is an issue, the polynomial coefficients are the bottleneck and it would be advantageous to avoid that intermediate step.

Question

Do you know any approach, algortihm or source, which explains a possibility to directly calculate the zeros $z_i$ from the residues $c_i$ and poles $p_i$ without calculating the numerator polynomial as intermediate step?

At the moment I use Matlab's vpa to increase the precision, but it appears to be a waste of computational effort, if I am not interested in the polynomial but just the zeros and poles. So any hint would be appreciated.

Thank you very much!

答:
Usually when one is concerned with the numerical evaluation of roots of a given function, manipulating said function can cause many issues. Wilkinson's polynomials, which are of the form $\prod_i(s-z_i)+\epsilon s^k$ for very small $\epsilon$, are a case similar to yours. Indeed it turns out that trying to write your numerator in standard form may result in coefficients which are only marginally off, but the resulting roots are then changed drastically.

Finding the roots of rational functions directly, however, may be done by standard root-finding techniques. This doesn't require you to rewrite the given function in any way (though some methods, such as the Newton-Raphson method, requires derivatives).

If you are searching for real roots only and your function turns out to be $\mathbb R\to\mathbb R$, then there are bracketing methods which guarantee convergence if you can provide bounds where $G(s_p)>0$ and $G(s_m)<0$. Bisection, in particular, will not care even if you have $|G(s)|=\infty$, and is hence easy to implement if you wish to do so yourself, using the poles themselves as initial bounds. If you wish for faster convergence using bracketing methods, you may wish to look at this, which has things built-in to handle such extreme cases as well.

If the above is not what you want, you can of course just try the Newton-Raphson method or similar. I recall seeing somewhere that perhaps the roots of such rational functions can be estimated better somehow, but they are not my particular specialty.


问:
Assumption seems to break Sage's integrate() function; is this a bug?
Consider the following Sage code (tested using Sage 8.6):

```<code>var('t')
var('a')
t.integrate(t, 0, a) # \int_{0}^{a} t dt
</code>```

Output (as expected):

```<code>t
a
1/2*a^2
</code>```

Next:

```<code>t.integrate(t, 0, 2*a - a^2) # 2*a - a^2 could be positive, negative, non-real(?)
</code>```

Output (again, no problem):

```<code>1/2*a^4 - 2*a^3 + 2*a^2
</code>```

Now suppose we give Sage a little more information. The following assumptions should guarantee that we're integrating over a real interval, and that the second (or "top") endpoint is strictly greater than the first ("bottom") endpoint. (Though as we have seen, Sage does not really need this information.)

```<code>assume(a, 'real')
assume(a > 1/2)
assume(a < 3/2) # now 0 < a < 2, so 2*a - a^2 > 0
t.integrate(t, 0, 2*a - a^2) # hangs, eventually produces RuntimeError
</code>```

So, .integrate() succeeds when nothing is known about the endpoint, but then fails when given more information.

My Question: Is this desired/expected behavior, or would it be considered a bug?

Personally, I found it surprising: I expected that, if a command worked with no assumptions, then it should still work after adding assumptions (consistent assumptions that only narrow the scope of the problem).

What follows is purely my own speculation; feel free to ignore.

I also get a similar kind of problem if I do the following:

```<code>forget()
var('t'); var('a');
assume(a, 'real')
assume(a > 1/2)
assume(a < 3/2)
bool(2*a - a^2 > 0) # RuntimeError
</code>```

It seems to me that $1/2 < a < 3/2$ implies $0 < a < 2$, which implies that $-a^2 + 2a > 0$. (The graph of the quadratic is a downward-opening parabola, with roots at $0$ and $2$.)  I am not surprised that Sage has trouble constructing this argument, so I am not surprised that the bool() command hangs.  But unfortunately this seems to break .integrate(), which was working otherwise.

So, I speculate that maybe the .integrate() method, when faced with an integral whose endpoints are known to be real, first tries to figure out which endpoint is greater?  But sometimes this process hangs, so the .integrate() process never terminates?

In our case, I think Sage assumes by default that a is complex-valued(?), and then it has no problem with the integral. So it seems like it should still work when a is in the real interval $(1/2, 3/2)$, which after all is a subset of $\mathbb{C}$.

By the way, the following works just fine:

```<code>forget()
var('t'); var('a');
assume(2*a - a^2 > 0)
print(bool(2*a - a^2 > 0))
t.integrate(t, 0, 2*a - a^2)
</code>```

Edit: Also asked at ask.sagemath.org: https://ask.sagemath.org/question/52382/assumption-seems-to-break-integrate-is-this-a-bug/

Also, the following works:

```<code>t.integrate(t, 0, 2*a - a^2, algorithm='sympy')
</code>```

(Based on guidance from the Sage development team, it seems that the problem is probably something to do with Maxima.)

答:
The issue seems to have been fixed in more recent versions of Sage!  Based on my experience, it seemed to be a problem in versions 8.6 and 8.9, but not in 9.2.  Since upgrading to 9.2 I can no longer reproduce this issue.

If you are experiencing a similar issue, I would recommend upgrading to a current version if possible.  (If that is not possible, a couple of work-arounds are suggested in the Question.)

Also, if you are using Sage online through CoCalc it may give you an option to upgrade to a current version.  You can check what version you are running, by opening a notebook and executing a

help()

command.

Thank you very much to the Sage Development Team!


问:
Radius of a circumscribed circle of a regular pentagon given its side, no trigonometry
I'm going through early chapters of a geometry textbook and one of the exercises is:

Find the radius of the circumscribed circle of a regular pentagon given its side (10 cm).

Now, I could just use trigonometry, but I'm clearly supposed to rely on the straightedge & compass methods and polygon properties. I've been staring at it for a while and cannot get past calculating the angles which is of no use. The answer states "≈8,5 cm" and the approximation makes me even more confused about how am I supposed to approach this problem.

Any help is appreciated.

答:
You should be able to do it by first proving that the ratio of the side length to distance between far vertices is $1:\varphi$, where $\varphi = \frac{1+\sqrt5}2$.

Then, from a vertex $A$, let $B$ be a far vertex with base $M$. Since the side length is $10$, then $AM=5$ and $AB = 10\varphi$. Consider the triangles $ABM$ and $AOM$, where $O$ is the centre of the circle. We have $AO=BO=r$ and $MO=h$, where $r$ and $h$ are the circumradius and apothem ("altitude"), respectively. Using Pythagoras, you have two equations in two unknowns.

$\hskip3cm$


问:
$\operatorname{rank}(AB-BA)=1$ implies $AB-BA$ is nilpotent

Let $A$ and $B$ be $n \times n$ complex matrices. Then $\operatorname{rank}(AB-BA)=1$ implies $AB-BA$ is nilpotent.

I have seen proof here that $\operatorname{rank}(AB-BA)=1$ implies $A$ and $B$ are simultaneously triangularisable, which implies that $AB-BA$ is nilpotent. I was wondering if there is an easier way to show the result. (I could show $A$ and $B$ share a common eigenvector but that does not imply $AB-BA$ is nilpotent.)

答:
Since $\text{rank}(AB-BA) = 1$, we can write $AB-BA = uv^*$ for some vectors $u,v \in \mathbb{C}^n$.

Since $\text{tr}(AB) = \text{tr}(BA)$, we have $0 = \text{tr}(AB-BA) = \text{tr}(uv^*) = v^*u$.

Hence, $(AB-BA)^2 = (uv^*)^2 = u\underbrace{v^*u}_{= 0}v^* = 0_{n \times n}$, i.e. $AB-BA$ is nilpotent.


问:
Modulus of a random variable which follows a continuous uniform distribution, follows which distribution?
Let $X \sim U(\theta,0),$ $\theta<0$
(continuous uniform distribution)

I want a transformation on $X$ so that it follows $U(0,1)$ distribution
I did $|X|/\theta\sim U(0,1).$ Am I right?

答:
Since $|X|>0$ and $\theta<0,$ $|X|/\theta$ will be negative.

But $X/\theta$ will serve.

For $x\in[0,1],$ $\quad\Pr(X/\theta\le x) = \Pr(X\ge \theta x) = \dfrac{0-\theta x}{\theta} = x.$


问:
Is there some non-classical logic where the van der Waerden theorem does not apply?
The van der Waerden theorem is a theorem in the branch of mathematics called Ramsey theory which states that for any given positive integers r and k, there is some number N such that if the integers {1, 2, ..., N} are colored, each with one of r different colors, then there are at least k integers in arithmetic progression whose elements are of the same color

This theorem applies to "classical" mathematics (which is basically mathematics based on classical logic). But are there any mathematical systems based on different types of logic (e.g non classical logics) where this theorem would not hold? Since there are logics where fundamental principles of classical logic do not hold (e.g the law of excluded middle in intuitionistic logic), wouldn't it be the same for this theorem?

答:
Van der Waerden's theorem remains provable if you weaken classical logic to intuitionistic logic and if you weaken the usual axioms of arithmetic (or set theory) to just primitive recursive arithmetic. But the latter fact (about weakening arithmetic) comes from a nontrivial theorem of Shelah, which bounds the $N$ in the theorem by a primitive recursive function of $r$ and $k$.

If I remember correctly, Shelah's bound is at level $\mathcal E_5$ of the Grzegorczyk hierarchy, which essentially means iteration of iteration of exponentiation.  So an ultrafinitist, who would be unwilling to accept that exponentiation is defined for all natural numbers (let alone its iteration and double-iteration) would not be convinced by the existing proofs of van der Waerden's theorem. I don't know anything about lower bounds for the $N$ in the theorem, but I'd be amazed if the $N$ could be bounded in a way that's ultrafinitistically acceptable; even an exponential bound would be big news.


问:
Computing an iterative integer sequence modulo composite n, where the iteration function involves division by a factor of n.
On page 23 of this paper, the author defines what he calls an "exponential Collatz-like function", $g_4(n)$. (Hereafter I will drop the subscript, as I will not be discussing his other g functions.) g(n) is actually a partial function since it is not defined for $n \equiv 1 \pmod 3$.  The precise definition is rather complex, but it boils down to:$$g(9k+r) = (a_r \times 4^{k} + b_r)/3$$ where $0\le r\lt 9$, $r \not \equiv 1 \pmod 3$ and $a_r$ and $b_r$ are specified integer constants defined such that the final division by 3 is exact. The author makes a number of claims about how far g(n) can be iterated before becoming $\equiv 1 \pmod 3$, and further iterations are undefined.  Specifically he claims that $g^4(0)$, $g^7(2)$, and $g^{14}(36)$ are all defined, and $\equiv 1 \pmod 3$.

My question is how is he able to calculate this?  Clearly not by simulating the Turing machine he's discussing!  Nor by naively iterating the function on a real-world computer; the sequence's power-tower-like growth would rapidly take it out of the range of even a BIGNUM library.

Were it not for that pesky division by three, we could do all the calculations in the ring $\Bbb Z/9\Bbb Z$.
Of course we can do one iteration in that ring.  This would allow us to discover whether the next iteration is defined, and if so, which subformula to use for it.  However, the value we would get for k wouldn't work in that subformula, so we could progress no further.

I think we could do 2 iterations in the ring $\Bbb Z/27\Bbb Z$.  Could we do more iterations using a higher power of 3 as the modulus?  And how much higher would it have to be, for each extra iteration gained?  Here my intuition and knowledge of modular arithmetic fail me.

答:
"Were it not for that pesky division by three, we could do all the calculations in the ring $\Bbb Z/9\Bbb Z$."

The division by three is easily disposed of.  Just define $h(3n)=3g(n)$, so that $h^j(3n)=3g^j(n)$. Then $$h(27k+3r) = a_r \times 4^k + b_r$$ and we can compute (the residues of) $g^j$ just by computing (them of) $h^j$.

The real problem is the $4^k$.  I had the mistaken idea that if $k \equiv l \pmod m$ then $b^k \equiv b^l \pmod m$, but this isn't the case, so doing the calculations in the ring $\Bbb Z/27\Bbb Z$ won't work.

Still the above does answer the problem I identified, and since the rest of the question is irredeemably wrong-headed, I'm going to mark this one as answered.


问:
Word problem I think is unsolvable
I am trying to help my 15 year old with her Critical Thinking homework. She has the entire worksheet finished except for this one problem. I want to help her but I don't even know how to start with this one. I would really like to learn how to solve it. Here is the math problem...

Photographs of students are taken and offered for sale in various packages.

2 large and 3 small: \\\$8.00

3 large and 3 small: \\\$9.00

4 large and 2 small: \\\$11.00

These prices include the same amount for postage and packaging.

What is the cost of postage and packaging included in these prices?

Please help me understand how to solve this.

Thank you.

Title: Word problem I think is unsolvable

Body:
The prices don’t make sense but here is an attempt to make sense of them.
$$2L+3S+P=\$8\land 3L+3S+P=\$9 \implies L=$1$$
By logic, then
$$ 4L+3S+P=\$10\quad\text{ but}\quad 4L+2S+P=\$11\implies S=-\$1$$
Back to the original
$$2L+3S+P=2(\$1)+3(-\$1)+P=-\$1+P=\$8\implies P=\$9$$
$$3L+3S+P=3(\$1)+3(-\$1)+P=\$0+P=\$8\implies P=\$9$$
$$4L+2S+P=4(\$1)+2(-\$1)+P=\$2+P=\$11\implies P=\$9$$


问:
Explicit isomorphism between ${\rm SL}(2,{\Bbb R})$ and ${\rm SU}(1,1)$
I have heard that there exists an isomorphism of real algebraic groups as in the title. I am asking for an explicit isomorphism.

Motivation: I need such an isomorphism for a calculation of Galois cocycles (with values in some other group).

答:
Chances are, you used to know this (long time ago) when you took a complex analysis class.

You likely knew that every conformal automorphism of the unit disk in the complex plane has the form
$$
f(z)= \frac{az+b}{\bar{b}z+ \bar{a}}.
$$
If you stare at this formula, you realize that this is just the group $PU(1,1)$. You can also see this by observing that the group $U(1,1)$ preserves the real quadric
$$
\{(z,w): z\bar z - w \bar w=0\}
$$
Passing to the projectivization, we set $w=1$ and, hence, obtain the equation $z\bar z=1$. Thus, $PU(1,1)$ preserves the unit circle in the complex plane.

You also probably knew that the upper half-plane is conformal to the unit disk and that the group of conformal automorphisms of the former is $PSL(2, {\mathbb R})$, linear-fractional transformations with real coefficients.

Now, it remains to realize that $SU(1,1)$ is a nontrivial 2-fold covering space of $PU(1,1)$, ditto $SL(2, {\mathbb R})$ for $PSL(2, {\mathbb R})$.


问:
Find path through binary tree to get to desired node #
Say we have a binary tree. If know how many nodes X there are in the tree, how can we navigate from the root node to the node with value X without any backtracking? I am doing binary arithmetic and seeing some patterns but can't make the breakthrough.

Here is a sample tree:

```<code>                  1
               /      \
             2           3
           /   \        /   \
          4     5      6     7
         / \    / \   /  \    /\
        8   9  10 11 12 13   14 15
</code>```

It seems to be better to start with 1 instead of 0 for root node, but not sure if it matters much really. My guess to start at the root node and take the left path Y times, and then if necessary go to right node from there, and then you have a new tree, with the same problem but smaller tree.

So if X = 16, we take the left path 4 times, followed by 0 right path.
but if X = 11, we take a left path 1 times, and right path twice.

I know there is a pattern here but can't figure it out lol.

Actual goal:
My actual goal is to find the next node on the tree to add a child to, given the number of current nodes on the tree. This is part of heap implementation. In the tree above, the node to add to is #8, for a balanced binary tree.

答:
At node labelled $v$, the left child is having label $2v$ and the right child is having label $2v+1$. So the parent node of a node labelled $x$ is labelled $\lfloor x/2\rfloor$.

This allows us to figure out the reverse path easily. From $16\to\lfloor16/2\rfloor=8\to\lfloor8/2\rfloor=4\to\lfloor4/2\rfloor=2\to\lfloor2/2\rfloor=1$. So the path you have to follow is: $1,2,4,8,16$.

Now it becomes easy to figure out whether you have to go left or right. If the next node in the path is having odd label, we are to take the right child. If it is having an even label, take the left child. You can do this process simultaneously with the process of finding the parent node.


答:
Write the number of the node in binary. Ignore the first bit, which is always $1$. Read the remainder from left to right: a $0$ means go left, and a $1$ means go right. For instance, $10$ is $1010_2$, so it is reached by branching $010=LRL$. Its left child is $LRLL$, corresponding to $0100$ and hence to the number $10100_2=20$; its right child is $LRLR$, corresponding to $0101$ and hence to the number $10101_2=21$.

To find the parent of node $n$, write $n$ in binary, remove the last bit, and write the result in decimal. Equivalently, the parent node’s number is $\left\lfloor\frac{n}2\right\rfloor$, since dropping the last bit is dividing by $2$ and ignoring any remainder.

Title: Find path through binary tree to get to desired node #

Body:
Say we have a binary tree. If know how many nodes X there are in the tree, how can we navigate from the root node to the node with value X without any backtracking? I am doing binary arithmetic and seeing some patterns but can't make the breakthrough.

Here is a sample tree:

```<code>                  1
               /      \
             2           3
           /   \        /   \
          4     5      6     7
         / \    / \   /  \    /\
        8   9  10 11 12 13   14 15
</code>```

It seems to be better to start with 1 instead of 0 for root node, but not sure if it matters much really. My guess to start at the root node and take the left path Y times, and then if necessary go to right node from there, and then you have a new tree, with the same problem but smaller tree.

So if X = 16, we take the left path 4 times, followed by 0 right path.
but if X = 11, we take a left path 1 times, and right path twice.

I know there is a pattern here but can't figure it out lol.

Actual goal:
My actual goal is to find the next node on the tree to add a child to, given the number of current nodes on the tree. This is part of heap implementation. In the tree above, the node to add to is #8, for a balanced binary tree.


问:
After adding $10$ cups of water to a container $1/8$ full, it becomes $3/4$ full. What is the volume of the container?

A container is $1/8$ full of water. After $10$ cups of water are added, the container is $3/4$ full. What is the volume of the container, in cups?

Ok, I wrote out an equation: $$\frac{1}{8}V + 10C = \frac{3}{4}V$$
I realized that it was asking for the volume of the container in CUPS.

Then I changed it to $\frac{1}{8}C + 10 = \frac{3}{4}C$ since I want to find the total volume of the container.

Then the answer came out to be
$$10 = \frac{5}{8}C$$
in which $C$ is equal to $16$.

Is this the right way of solving the problem?

答:
$$10\text{ cups }=\frac{3}{4}-\frac{1}{8}=\frac{6-1}{8}=\frac{5}{8}\text{ V}
\implies \frac{1}{8}\text{ V} = 2\text{ cups}\implies V=8\cdot2=16\text{ cups}
$$


问:
Hybrid field mode in electromagnetic cylindrical wave guide
If we have a boundary-value problem that consists of a circular cylindrical waveguide (axis along $\hat{z}$, say), with some arbitrary boundary condition (so not necessarily the usual conductive wall)  applied to the guide's  wall at $r=a$, with $a$ being the radius, we notice that the general field representation assumes a hybrid mode [i.e. a combination of transverse electric (TE) and transverse magnetic (TM) modes]. The TE mode is governed by the $H_{z}$ component, while the TM mode is governed by the $E_{z}$ component. Following conventional treatments of the Helmholtz equation in cylindrical coordinates, which gives a Bessel equation and periodic angular dependence, we generally get the following field form for the longitudinal component (suppressing the propagation factor $e^{-i\omega t +i\beta z}$):

$$ u=u(r,\phi)=u_{0}J_{n}(k_{t}r)\cos(n \phi + \phi_{0}), $$
where $u$ is either $E_{z}$ (for the TM case) or $H_{z}$ (for the TE case), $n$ is integer and $k_{t}$ is the transverse wavenumber (also called cut-off wavenumber). This is the most general expression mathematically for this problem.

My question now is: why when the hybrid mode (TE+TM) is considered, most books (e.g. Stratton, Slater or Mahmoud) proceed by writing one of these functions now with a cosine, while the other one with a sine? Namely, in the general case, they write

$$ E_{z}=E_{0}J_{n}(k_{t}r)\cos(n\phi), $$
$$ H_{z}=H_{0}J_{n}(k_{t}r)\sin(n\phi). $$

As if the authors know a priori that choosing the option for the angular functions (i.e. choosing $\phi_{0}$ for TM or TE) in a different way will not eventually work out physically $-$ but they don't spell it out!

Any hint is appreciated.

答:
Seeing "$\cos(n \phi)$" and "$\sin(n\phi)$", one might be tempted to form the combination $\cos(n \phi) + \mathrm{i} \sin(n \phi)$, which one can arrange through $E_z + \mathrm{i} H_z$ (ignoring a few constants).

One perhaps recognizes this as similar to the Riemann-Silberstein vector (still at the level of ignoring a few constants), in terms of which Maxwell's equations without sources (no charges, no currents) can be written.  The Riemann-Silberstein vector is a bridge to the Faraday tensor.

These connections are discussed further here: https://physics.stackexchange.com/a/80039/50480


问:
example of a flat but not faithfully flat ring extension
I am learning commutative algebra and there is a definition about faithfully flat modules or ring extensions. I can't think of an example of a flat but not faithfully flat ring extension or module. Can someone help me with it? thanks</p>

答:
A possibly instructive, concrete example is $\Bbb{Q}$ as an abelian group (i.e. as a $\Bbb{Z}$-module). Of course, this is just a special case of Dedalus's answer (and YACP's comment), but let's still prove the result directly.

Clearly $\Bbb{Q}$ is not a faithfully flat abelian group, e.g. the zero morphism
$$
\Bbb{Z}/2\Bbb{Z} \rightarrow 0
$$
is not injective, but after tensoring with $\Bbb{Q}$ this morphism is the identity on the zero  group (as $\Bbb{Z}/2\Bbb{Z} \otimes \Bbb{Q} \cong 0$).

On the other hand, $\Bbb{Q}$ is a flat abelian group. To see this, assume that
$$
f: A \hookrightarrow B
$$
is an injective morphism of abelian groups, and consider the induced morphism
$$
f \otimes id: A \otimes \Bbb{Q} \rightarrow B \otimes \Bbb{Q}
$$
Now for $b \in B$ the element $b \otimes 1 \in B \otimes \Bbb{Q}$ is equal to zero, if and only if $b$ is torsion. So the kernel of $f \otimes id$ consists precisely of the elements $f(a) \otimes id$, such that $f(a)$ is torsion. But injectivity of $f$ implies that $a$ must be torsion as well, i.e. $a \otimes 1=0$. This shows that $f \otimes id$ is injective, and therefore $\Bbb{Q}$ is a flat abelian group.


问:
Show that $f\left(\frac{Na\tau+Nb}{c\tau+d}\right)=(c\tau+d)^kf(N\tau)$
Let $M,N$ be positive integers and $\mathfrak{h}=\{x+iy:y>0, x\in \Bbb R\}\subseteq \Bbb C$. Suppose $f:\mathfrak{h}\to\Bbb C$ satisfies $f(\frac{a\tau+b}{c\tau+d})=(c\tau+d)^kf(\tau)$ for all $\tau\in\mathfrak{h}$, $\begin{pmatrix}
  a & b\\
  c & d
\end{pmatrix}\in \Gamma_0(M):=\left\{\begin{pmatrix}
  a & b\\
  c & d
\end{pmatrix}\in SL_2(\Bbb Z): M|c\right\}$. We define the function $f_1:\mathfrak{h}\to\Bbb C$ by $f_1(\tau):=f(N\tau)$. We want to show that $f_1\left(\frac{a\tau+b}{c\tau+d}\right)=(c\tau+d)^kf_1(\tau)$ for all $\tau\in\mathfrak{h}$, $\begin{pmatrix}
  a & b\\
  c & d
\end{pmatrix}\in \Gamma_0(MN)$.

Attempt. For any $\begin{pmatrix}
  a & b\\
  c & d
\end{pmatrix}\in\Gamma_0(MN)$ and $\tau\in\mathfrak{h}$, since $f_1\left(\frac{a\tau+b}{c\tau+d}\right)=f\left(\frac{Na\tau+Nb}{c\tau+d}\right)$ and $(c\tau+d)^kf_1(\tau)=(c\tau+d)^kf(N\tau)$, it is enough to show that $f\left(\frac{Na\tau+Nb}{c\tau+d}\right)=(c\tau+d)^kf(N\tau)$. I couldn't go further from here.

答:
Let $\gamma=\begin{bmatrix}a & b\\ c & d\end{bmatrix}$ where $c=kMN$ then
$$f_1(\gamma\tau)=f(N\gamma\tau)=f\left(\begin{bmatrix}Na & Nb\\ kMN & d\end{bmatrix}\tau\right)=f\left(\begin{bmatrix}a & Nb\\ kM & d\end{bmatrix}N\tau\right)$$
Since $ad-kMNb=ad-bc=1$ we have
$$f\left(\begin{bmatrix}a & Nb\\ kM & d\end{bmatrix}N\tau\right)=(kMN\tau+d)^mf(N\tau)=(c\tau+d)^mf_1(\tau)$$
which completes the proof.

You might wanna check the analyticity of $f_1$ at its cusps if you are proving that it is a modular form. But if the identity is the ultimate goal then the previous thing should suffice. Also, I used $m$ instead of $k$ for weight.


答:
If by "introducing bias" you mean "changing the average from what it was originally", then such a function could definitely "introduce bias". By Jensen's inequality, we would expect the average to be biased upwards if $y = f(x)$ has a concave downwards graph, and biased downwards if $y = f(x)$ has a concave upwards graph.

Simple example: Let $X$ be uniformly distributed on $\left[ 0, 1 \right]$, so that $E[X] = 0.5$. $f(x) = \sqrt{1 - x^2}$ is self-inverse on this domain, but $E[f(X)] = \pi / 4$, so applying this self-inverse function has biased the average upwards.

Title: Can a self-inverse function introduce bias?

Body:
I have a self-inverse function $f(x)$, with the domain $\{x: 0 \le x \lt n\}$ (for some arbitrary $n$) such that $x$ is a nonnegative integer. I'm looking for a proof that $f(x)$ cannot introduce any kind of statistical bias.

Since $f$ is a self inverse, every output must be within the domain. Otherwise, $f$ could produce an output it cannot use as an input, therefore not being a self-inverse.

Since $f$ is a self inverse, any introduction of bias would mean it's more likely to produce a certain output. Since $f$ is a self inverse, this would be impossible.

$f$ cannot produce any output more than once, since the inverse would no longer be a function (for each output of a function, there must be exactly 1 corresponding input)

Since $f$ is its own inverse, this would make $f$ not a function

I think I have a good basis for my proof, but I'm unable to articulate why these properties mean there cannot be bias introduced by $f$.

One idea I have is I can model $f$ as a permutation of the set of integers $\{x: 0 \le x \lt n\}$, then elaborate on how a permutation of a set cannot introduce bias (I'm thinking this is the most likely to come out as a clear explanation).

In my case, $f(x)$ operates within a finite range (integers from $1$ up to $n$). One answer mentions $\sqrt{1-x^2}$ being a self-inverse that changes the average for $x$ between $0$ and $1$, but it relies on the fact that one can choose infinite possible $x$.

I purposely fail to define what "bias" means; because within the scope of this question, I refer to any possible bias. I understand that this lack of specific definition makes this question weird (which is why I was unable to develop a clear answer myself, and therefore why I needed to ask this question).


问:
Bézout giving some spare coins to Frobenius? (the Coin Problem)
Let $a$ and $b$ be relatively prime positive integers and write the two minimal Bézout's identity pairs,

$\tag 1  (s)\,a + (t)\,b = 1$

$\tag 2 (u)\,a + \;(v)\,b = 1$

where the extended Euclidean algorithm produces one of them

(see this discussion on the structure of solutions).

Set $\quad \; \; x = s - 1$ if $s \gt 0$,

else set $x = u-1$

Set $\quad \; \; y = t - 1$ if $t \gt 0$,

else set $y = v-1$

Let $n = ab - a - b$ be the solution to the Frobenius coin problem for $a$ and $b$.

Conjecture: The numbers $x$ and $y$ derived from the extended Euclidean algorithm satisfy the equation $n + 1 = (a-1)(b-1) = (x)\,a + (y)\,b$

My Work

I noticed this relationship occured while working on this and that (not spelled out in this answer).

Here is another example.

Let $a = 227$ and $b =2011$ and write

$\tag{Z1}  (-691)\,227 + (78)\,2011 = 1$

$\tag{Z2} (1320)\,227 + \;(-149)\,2011 = 1$

and $x = 1319$ and $y = 77$.

The statement

$ (1319)\,227 + \;(77)\,2011 = 227\cdot2011 - 227 - 2011 + 1$

is true.

If the conjecture is true one could use the connection to calculate Bézout's coefficients

(in the coprime setting) with new algorithms.

Example: Use an ad-hoc method (algorithm?) to solve for $x$ and $y$ in the equation

$\quad (x)\,227 + \;(y)\,2011 = 227\cdot2011 - 227 - 2011 + 1$

Examining

$\quad 227\cdot2011 - 227 - 2011 + 1 = (2011)\, 227 - 2237$

the problem is reduced to solving

$\quad 227 k \equiv 2237 \pmod{2011}$

That gives $k \equiv 692 \pmod{2011}$ and

$\quad (2011)\, 227 - 2237 =$

$\quad (2011 -692)\, 227 + 692\cdot227 - 2237 =$

$\quad (1319)\, 227 + 154847$

Now use our 'best' algorithm for dividing (exactly) $2011$ into $154847$,

$\quad \large \frac{154847}{2011} = 77$

so

$\quad (1319)\, 227 + 154847 =$

$\quad (1319)\, 227 + (77) \, 2011 $

and we can now easily calculate Bézout's coefficients by solving the linear equations

$\quad (z)\,227 + (78)\,2011 = 1$

and

$\quad (1320)\,227 + (z)\,2011 = 1$

答:
If the solution from the Extended Euclidean Algorithm is
$$
sa+tb=1
$$
then, since $(a,b)=1$, the other minimal solution is
$$
(s\mp b)a+(t\pm a)b=1\qquad{s>0\atop s<0}
$$
If $s\gt0$, then $x=s-1$ and $y=t-1+a$; thus,
$$
\begin{align}
xa+yb
&=(s-1)a+(t-1+a)b\\
&=ab-a-b+1
\end{align}
$$
If $s\lt0$, then $x=s-1+b$ and $y=t-1$; thus,
$$
\begin{align}
xa+yb
&=(s-1+b)a+(t-1)b\\
&=ab-a-b+1
\end{align}
$$
So what you want is true.


问:
Are the functions $f:[1,2]\to (0,1)$ and $g:\mathbb{R}\to \mathbb{R} \setminus \mathbb{N}$ I defined bijective?
I defined functions $f:[1,2]\to (0,1)$ and $g:\mathbb{R}\to \mathbb{R} \setminus \mathbb{N}$ as follows:

$$f(x)=
\begin{cases}
1/2 & x=1\\
1/3 & x=2\\
1/(n+2) & \exists n \in \mathbb N^+ (x=1+1/n)\\
x-1 & \text{else}
\end{cases}$$

$$g(x)=
\begin{cases}
-2x-1 & x \in \mathbb N\\
2x & \exists n \in \mathbb N^+ (x=-n)\\
x & \text{else}
\end{cases}$$

I showed that they're bijective by considering all possible cases (and proving by contradiction that some can't occur - in the injectivity proof). My question is: are they really bijections? If so, is there any simpler way to prove it?

答:
Bijectivity of $f$ can be shown as follows without a lot of case work. Let $A=\left\{1+\frac1n:n\in\Bbb Z^+\right\}$; $f\upharpoonright A$ is the composition of the translation $x\mapsto x-1$, the reciprocal map, the translation $n\mapsto n+2$, and the reciprocal map, each of which is injective, so it must be a bijection between $A$ and $f[A]$. Similarly, $f\upharpoonright\big([1,2]\setminus(A\cup\{1,2\})\big)$ is injective, so it must be a bijection between its domain and range, which is easily verified to be $(0,1)\setminus\left\{\frac13,\frac12\right\}$.

Similarly, bijectivity of $g$ is immediate once you show that $g\upharpoonright\Bbb Z$ is a bijection to $\Bbb Z^-$.


问:
Showing that $2\sin(x) + 3\cos(x) = x$ has three solutions
Using the IVT, show that $2\sin(x) + 3\cos(x) = x$ has three solutions

How does one apply the IVT to prove a function has three solutions? In Calc I, we only deal with proving there is at least one solution. We do this by considering the interval $[a,b]$ and calculating $f(a)$ and $f(b)$ to show there exists some $y=N$ that crosses the function bounded between those two values. But with three solutions...I'm at a loss.

答: HINT: There are exactly three solutions to the equation $f(x) = 2\sin(x)+3\cos(x)-x = 0$. Try evaluating $f(x)$ at $x = -\pi,-\frac{\pi}{2},0, \pi$ to see if this might help.


问:
Solving $x^{\log_{10}(x^2)} = 100$
$x^{\log(x^2)}=100$

Edit: I am writing $\log$ for $\log_{10}$.

I tried to solve this and can get the solutions $10$ and $10^{-1}$. But how can I get the solutions $-10$ and $-10^{-1}$? And other solutions (including complex), if exist? I'm not sure how to use the complex logarithm in this problem.

My attempt:

Note that $x \neq 0$, because we have in the equation $\log(x^2)$.

Assume $x > 0$. Then:

$x^{\log(x^2)} > 0$

$\log (x^{\log(x^2)}) = 2$

$\log(x^2)\log(x)=2$

$2\log(x)\log(x)=2$

$\log^2(x) = 1$

$\log(x) = \pm 1 \implies x=10$ or $x = 10^{-1}$.

But how about $x<0$?

Title: Solving $x^{\log_{10}(x^2)} = 100$

Body:
This may help :
$$x^{\log_{10} x^2}=100$$
$$\log_{10} x^{\log_{10} x^2}=2$$
$$2\log_{10}^2 x=2$$
$$\log_{10} x=\pm 1$$
$$|x|=10^{\pm 1}$$
$$x=\pm 10,\pm \frac{1}{10}$$


问:
Getting uniform convergence via a dominated convergence argument
Edit: A previous version of this question claimed that $\widehat{\phi_N}$ converged uniformly; I meant to say locally uniformly. It has been updated.

The context is the following problem: given $\phi \in L^1(\mathbb{R})$ and $\int_{\mathbb{R}} \phi = 1$, define $\phi_N(x) = N\phi(Nx)$ and prove that $\widehat{\phi_N}$ converges locally uniformly (i.e. uniformly on any finite interval) to the function which is identically 1 on $\mathbb{R}$. (And I suppose an answer to this problem would maybe almost answer this post.)

Using dominated convergence theorem, one can show that $\widehat{\phi_N}(\xi) \to 1$ pointwise everywhere. It comes down to showing that
$$
|\widehat{\phi_N}(\xi) - 1| \leq \int_{\mathbb{R}} |e^{i\xi y/N} - 1||\phi(y)|\, dy,
$$
which then as $\phi \in L^1$ goes to zero as $N \to \infty$. This does NOT, as far as I have gone, show uniform continuity. So, my questions are:

How to show uniform convergence on a finite interval here?

On a more abstract level, I find it hard to see how dominated convergence theorem could ever give uniform convergence when the integrand depends on a second parameter, since applying DCT "ignores" any hard quantitative estimates and just says the limit is zero. Does anyone know if DCT can be applied to give uniform convergence? Or the opposite?

答:
To start with, uniform continuity isn't enough to get uniform convergence here since $\mathbb{R}$ is unbounded.  You also need some kind of "tightness," which is actually not possible.

For each $N \in \mathbb{N}$, $\hat{\varphi}_{N}(\xi) \to 0$ as $|\xi| \to \infty$, being the Fourier transform of an $L^{1}$ function.  Consequently, there is no way $(\hat{\varphi}_{N})_{N \in \mathbb{N}}$  converges uniformly to $1$.

An example: let $\varphi(x) = (2\pi)^{-\frac{1}{2}} e^{-2^{-1} x^{2}}$ be the Gaussian kernel.  It's Fourier transform is $\hat{\varphi}(\xi) = e^{-2^{-1} \xi^{2}}$.  Hence $\hat{\varphi}_{N}(\xi) = e^{-2^{-1} N^{-1} \xi^{2}}$ for all $N$.  These converge uniformly to $1$ in $[-B\sqrt{N},B\sqrt{N}]$ as $N \to \infty$ for any fixed $B > 0$, but not uniformly in $\mathbb{R}$, again precisely because they are far from $1$ for $|\xi| \gg \sqrt{N}$.


问:
When Max is 8m from a lamp post which is 6m high his shadow is 2m long. When he is 3m from the lamp post, what is the length of his shadow?
When Max is 8 m from a lamp post which is 6 m high his shadow is 2 m long. When Max is 3 m from the lamp post, what is the length of his shadow?</p>

答:
When he is $8m$ from the lamp post, the end of the shadow is $10m$ from the lamp post meaning we have two legs of a triangle with $6$ and $10$ respectively.

By proportion, then, Max is X-high where $$\frac{X}{2}=\frac{6}{10}\implies X=\frac{12}{10}=1.2\space m=3.927'\quad \text{not very tall}$$

If we now move him closer ($3\space m$) from the post, we can work out the proportions the other way where here, the shadow will be $Y$.
$$\frac{X}{Y}=\frac{6}{3+Y}\implies 3X+XY=6Y\implies Y = -\frac{3 X}{X - 6}\land X\ne6$$

$$Y = -\frac{3(1.2)}{(1.2 - 6)}=-\frac{3.6}{-4.8}=0.75\space m$$


答:
This is false. The easiest way  to prove this is to put $\xi=N$. Uniform convergence would imply that $|\int [e^{iy}-1] \phi (y) dy |<\epsilon$ for every $\epsilon >0$ which need not be true.

Local uniform convergence: There exists $T$ such that $\int_{|x| >T} |\phi (x)| d x<\epsilon$. Now $\int_{-T}^{T} |e^{i\xi y/N}-1|dy \leq  \frac {|\xi T|} N \int_{-T}^{T}  |\phi (y)|dy $. Can you finish?

I have used the inequality $|e^{ia} -1| \leq |a|$ for all $a \in \mathbb R$.

How does one use DCT in this argument?: If $\int_{-T}^{T} [e^{i\xi y/N}-1] \phi (y) dy$ does not tend to $0$ uniformly on some bounded set then there exist $\epsilon >0$ and sequence $\xi_n, N_n$ such that $(\xi_n)$ is bounded and $|\int_{-T}^{T} [e^{e\xi y/N}-1] \phi )(y) dy |\geq \epsilon$ for all $n$. Now use the fact that the integrand is bounded by a constant times $|\phi|$ to get a contradiction to DCT.

Title: Getting uniform convergence via a dominated convergence argument

Body:
Edit: A previous version of this question claimed that $\widehat{\phi_N}$ converged uniformly; I meant to say locally uniformly. It has been updated.

The context is the following problem: given $\phi \in L^1(\mathbb{R})$ and $\int_{\mathbb{R}} \phi = 1$, define $\phi_N(x) = N\phi(Nx)$ and prove that $\widehat{\phi_N}$ converges locally uniformly (i.e. uniformly on any finite interval) to the function which is identically 1 on $\mathbb{R}$. (And I suppose an answer to this problem would maybe almost answer this post.)

Using dominated convergence theorem, one can show that $\widehat{\phi_N}(\xi) \to 1$ pointwise everywhere. It comes down to showing that
$$
|\widehat{\phi_N}(\xi) - 1| \leq \int_{\mathbb{R}} |e^{i\xi y/N} - 1||\phi(y)|\, dy,
$$
which then as $\phi \in L^1$ goes to zero as $N \to \infty$. This does NOT, as far as I have gone, show uniform continuity. So, my questions are:

How to show uniform convergence on a finite interval here?

On a more abstract level, I find it hard to see how dominated convergence theorem could ever give uniform convergence when the integrand depends on a second parameter, since applying DCT "ignores" any hard quantitative estimates and just says the limit is zero. Does anyone know if DCT can be applied to give uniform convergence? Or the opposite?


问:
On the Bounded Convergence Theorem
Question: Does the Bounded Convergence Theorem hold if $\operatorname{m}\left(E\right)<+\infty$ but we drop the assumption that the sequence $\{f_n\}$ is uniformly bounded on $E$ but still pointwise bounded?

I know that the answer is no, however, I cannot think of a counterexample. I though about the sequence of functions $f_n:[0,1]\to\mathbb{R}$ defined by:

$$f_n(x):=n\cdot\chi_{(0,1/n[}.$$

But this sequence is not pointwise bounded.

For reference, this is a modification of a question out of Roydens Real Analysis text. Moreover, the question out of Roydens Real Analysis text is the following:

Question: Does the Bounded Convergence Theorem hold if $\operatorname{m}\left(E\right)<+\infty$ but we drop the assumption that the sequence $\{f_n\}$ is uniformly bounded on $E$?

Obviously, the sequence of functions $\{f_n\}$ defined above suffices as a counterexample for this question.

答:
Define $(f_{n})_{n \in \mathbb{N}}$ in $(0,1]$ with Lebesgue measure as follows:
\begin{align*}
f_{n}(x) = x^{-1} \chi_{[n^{-2},n^{-1}]}(x)
\end{align*}
We have $\lim_{n \to \infty} f_{n} = 0$ pointwise in $(0,1]$.  Further, $f_{n}(x) \leq x^{-1}$ so we are pointwise bounded.  However, $\lim_{n \to \infty} \int_{0}^{1} f_{n}(x) \, dx \neq 0$ as
\begin{equation*}
\int_{0}^{1} f_{n}(x) \, dx = \int_{n^{-2}}^{n^{-1}} x^{-1} \, dx = \log(n^{-1}) - \log(n^{-2}) = \log(n).
\end{equation*}

Title: On the Bounded Convergence Theorem


问:
real analysis and integral
Let $f$ be a continuous function on $[a, b]$ satisfying
$$\int_a^b f(x)g^\prime(x)\,\mathrm{d}x = 0$$
whenever $g$ is a continuously differentiable function on $[a, b]$ satisfying $g(a) =
g(b) = 0$. </p>

<p>Show that $f$ must be constant. </p>

答:
Let
$$\tilde{f}(x)=f(x)-\frac{1}{b-a}\int_a^bf(x)dx.\tag{1}$$
Then from the assumption on $f$ we know that for every continuously differentiable function $g$ on $[a,b]$ with $g(a)=g(b)=0$, we have
$$\int_a^b \tilde{f}(x)g^\prime(x)\,\mathrm{d}x = 0. \tag{2}$$
By definition $(1)$, it suffices to show that $\tilde{f}\equiv 0$.
Let
$$g(x)=\int_a^x\tilde{f}(t)dt.\tag{3}$$
Clearly $g$ is continuously differentiable on $[a,b]$ and $g(a)=g(b)=0$. Substituting $(3)$ into $(2)$, we have:
$$\int_a^b(\tilde{f}(x))^2dx=0.\tag{4}$$
The conclusion follows from $(4)$ immediately.</p>

Title: real analysis and integral


问:
Why does $\operatorname{Im}\psi\left(\frac{1}{2}+i x\right)=\frac{\pi}{2}\tanh(\pi x)$, and what can be said of the real part?
Wikipedia claims that

$$\operatorname{Im}\psi\left(\frac{1}{2}+i x\right)=\frac{\pi}{2}\tanh(\pi x),$$

where $\psi$ is the digamma function.

How can we prove this identity?

Does a similar identity hold for $\operatorname{Re}\psi\left(\frac{1}{2}+i x\right)$?

Wikipedia claims the above identity can be derived by "taking the logarithmic derivative of $\left|\Gamma\left(\frac{1}{2}+i x\right)\right|^2$, which I can almost see*, but I'm not sure how to handle taking derivatives of complex absolute values.

*based on the identity $\left|\Gamma\left(\frac{1}{2}+i x\right)\right|^2=\frac{\pi}{\cosh(\pi x)},$ found here.

答:
How can we prove this identity?

Since
$$
\psi \left( x \right) -\psi \left( 1-x \right) =\left( \ln \left( \Gamma \left( x \right) \Gamma \left( 1-x \right) \right) \right) ^\prime
$$
we have
$$
\text{Im}\psi \left( \frac{1}{2}+ix \right) =\frac{1}{2}\left[ \psi \left( \frac{1}{2}+ix \right) -\psi \left( \frac{1}{2}-ix \right) \right] =\frac{\pi}{2}\tanh \pi x
$$

Does a similar identity hold for $\operatorname{Re}\psi\left(\frac{1}{2}+i x\right)$?

I didn't find a nice representation of this one.


问:
The intersection of any $r+1$ sets in a set $F$ is nonempty, then the intersection of all sets in $F$ is nonempty.
Let $F = \{E_{1}, E_{2}, \ldots, E_{s}\}$ be a family of subsets with $r$ elements of some set $X$.

Show that if the intersection of any $r+1$ (not necessarily distinct) sets in $F$ is nonempty, then the intersection of all sets in $F$ is nonempty.

Note that this has a solution but this statement seems untrue to me. But here is the given proof.

Given Proof

We assume the contrary that the intserction of all sets in $F$ is empty. Now consider the set $E_{1} = \{x_{1}, x_{1}, \ldots, x_{r}\}$. Because none of the $x_{i}, i = 1,2, \ldots, r,$ lies in the intersection of all the $E_{j}$ (this intersection being empty), it follows that for each $i$ we can find some $E_{{j}_{i}}$ such that $x_{i} \notin E_{{j}_{i}}$. Then
\begin{align}
E_{1} \cap E_{{i}_{1}} \cap E_{{i}_{2}} \cap \ldots \cap E_{{i}_{r}} = \emptyset
\end{align}
Since, at the sametime, this intersection is included in $E_{1}$ and does not contain any element of $E_{1}$. But this contradicts the hypothesis. It follows that our initial assumption was false, and hence the sets from the family $F$ have a nonempty intersection.

My Argument

This becomes a problem given that the intersection of any $r+1$ sets in $F$ are not necessarily distinct. Thus if we take $E_{1}$ and intersect with itself $r+1$ times, the intersection is not empty. However, we note that it would be possible to come up with a set $F$ where $E_{1}, \ldots, E_{s}$ do not intersect for a given $X$. And thus provides a counter example to the problem.

Comments

I don't think their proof is correct either given that we are picking $E_{{i}_{r}}$ to make sure the set intersection is empty. This is an invalid choice because it does not fit the narrative of the original question of being not necessarily distinct intersection.

Any insight or help into understanding this proof would be helpful. Note this problem comes from Putnam and Beyond as an example in the first section.

答: The proof is fine. It shows that if $\bigcap F=\varnothing$, there must necessarily be at least one family of $r+1$ or fewer members of $F$ whose intersection is empty, contradicting the hypothesis on $F$. The fact that there will still be some families of $r+1$ or fewer members of $F$ whose intersections are non-empty (e.g., all one-member families) is irrelevant: the fact that there is at least one ‘bad’ family of at most $r+1$ members of $f$ — i.e., at least one with empty intersection — is enough to contradict the hypothesis and thereby show that $\bigcap F$ cannot be empty after all.


问:
k-NN average distance bound
I need to show the following inequality concerning the k-NN algorithm:
$$
$$
Data $ S = \{X_1, X_2, ..., X_n\}  $ is split in the $ \leq k$ parts:

$$
S_j = \{ X_i L i - (j-1)   \lfloor \frac{n}{k} \rfloor + 1,\ ...\ , j\lfloor\frac{n}{k} \rfloor\}, 1 \leq j \leq k
$$

So for example for $ S = \{X_1, X_2, X_3, X_4, X_5, X_6, X_7, X_8, X_9, X_{10}\}$ and $k=2$ we got $S_1 = \{X_1, X_2, X_3, X_4, X_5\}$ and $S_2 = \{X_6, X_7, X_8, X_9, X_{10}\}$

$$
$$
For the $X_{1, j}(X)$ as 1st nearest neighbour of $X$ in $S_j, j \leq k$
I need to show that:

$$
\frac{1}{k}\sum_{j=1}^{k}{||X_{j}(X) - X||} \leq \frac{1}{k}\sum_{j=1}^{k}{||X_{1, j}(X) - X||}
$$

$X_{j}(X)$ stands for j-th next neighbour of X
$$ $$

A far as I understand, this inequality states that the on average the distance between $X$ and it's j-th neighbour is bounded by the average of distances between $X$ and it's first neighbour in the j-th partition of the data set. Does it make any sense? If not, what is the correct intuition? I'd be extremely thankful for any hints on how to aproach this proof.

答:
Your use of $j$ to index both the partitions and the nearest neighbors within each partition is confusing in terms of notation, but the key issue is that you've misstated the core inequality.  It should read:

$\frac{1}{k}\sum_{j=1}^{k}{||X_{j}(X) - X||} \geq \frac{1}{k}\sum_{j=1}^{k}{||X_{1, j}(X) - X||}$

That's because, within any given partition, the distance to $X$'s closest neighbor, ${||X_{1, j}(X) - X||}$, must, by definition, be less than or equal to the distance between $X$ and all of its more distant neighbors (whose distances will be equal only if there are multiple points equidistant from $X$):

${||X_{j}(X) - X||} \geq {||X_{1, j}(X) - X||}$

Just as that definitional inequality establishes a lower bound on how close the points within some particular partition lie to $X$, so too does the average across all those minimal, nearest-neighbor distances establish a more generalized bound.  For example, if you take the second closest point from each partition and average across each of those distances to $X$, you will necessarily get an average distance that is equal to or greater than the average across the nearest neighbor distances.  (Again, those two averages would be equal only if there was a tie between the first and second nearest point within every individual partition).  More generally, there is no way to draw a point from each partition such that the average of the selected points' distances to $X$ is less than the average of the distances between $X$ and its nearest neighbor within each partition.  That's the point of the inequality and the sense in which the average of the nearest neighbor distances from each partition establishes a lower bound across all the partitions.

Title: k-NN average distance bound


问:
Subalgebra consisting of nilpotent elements and maximal is conjugate under $\mathscr E(L)$ to $N(\Delta)$

(Question 16.2 of Humphreys's book Introduction to Lie algebras) Let $L$ be semisimple, $H$ a Cartan Subalgebra, $\Delta$ a base for the root system $\Phi$. Prove that any subalgebra of $L$ consisting of nilpotent elements, and maximal with respect to this property, is cojugate under $\mathscr E(L)$ to $N(\Delta)$, the derived algebra of $B(\Delta)$.

Notation. Call $x\in L$ strongly ad-nilpotent if $x\in \{z\in L: (\mbox{ad }y-a.I)^k(z) = 0 \mbox{ for some
 integer $k\in \mathbb Z_{>0}$}\}, a\neq 0.$ In particular, $x$ will be ad-nilpotent, so it makes sense to consider $\mbox{exp } \mbox{ad }x  = \sum_n (\mbox{ad }x)^n/n!$ . Denote by $\mathscr E(L)$ the subgroup generated by all $\mbox{exp} \mbox{ ad } x$ for $x$ strongly ad-nilpotent.

Given a base $\Delta$ of $\Phi$,  $B(\Delta)$ denotes the Borel subalgebra $B(\Delta) = H\oplus(\oplus_{\alpha \in \Phi^+} L_\alpha)$ and its derived algebra is $[B(\Delta),B(\Delta)] = N(\Delta) = \oplus_{\alpha \in \Phi^+} L_\alpha$.

Ideas. Let $K\subseteq L$ be a subalgebra consisting of nilpotent elements. Then, its elements will be ad-nilpotent and $K$ is nilpotent by Engel's theorem. In particular, $K$ is solvable, so its contained in some Borel subalgebra $B$ (maximal solvable). Now, Borel subalgebras are conjugate under $\mathscr E(L)$, so $\sigma(B(\Delta)) = B$ for some $\sigma \in \mathscr E(L)$.

Somehow I have to use the hyphotesis that $K$ is maximal wrt to the fact that its elements are nilpotent. I can't see how to argue that $K\subseteq \sigma(N(\Delta))$, because if that was true, then equality of sets must hold.

Any insight or help is very much appreciated.

答: Put $K' = \sigma^{-1}(K) \leq B(\Delta)$. Then it consists of nilpotent elements(i.e. for any $x\in K'$, $\operatorname{ad}_L x \in \operatorname{End}(L)$ is nilpotent), and is maximal with respect to this property. If $0 \neq h$ is an element of $H$ (which is a toral subalgebra of $L$), then it is not a nilpotent element of $L$ because $\operatorname{ad}_L h$ is not nilpotent. (Note that $\operatorname{ad}_H h $ is nilpotent, however.)     Thus $K' \cap H = 0$, which implies $K' \subseteq B(\Delta) - \left( H \setminus\{ 0\} \right) = N(\Delta) $. It follows that $K=\sigma(K') \subseteq \sigma \left( N(\Delta) \right)$.


问:
A point about integrals in Residue formula proof
I am reading the following proof in Complex Analysis by Stein and Shakarchi, page 76.

They are using the concept of a keyhole contour, with which you are probably familiar. Let's call this keyhole contour $K$ and follow the book's notation for other curves.

Letting the width of the keyhole's corridor tend to zero, we are left with the following (after the corridor walls cancel out):

$$\int_K f(z)dz \; = \int_Cf(z)dz \; + \int_{C_{\epsilon}} f(z)dz \; = \; 0$$

Now, this seemingly contradicts the second equality presented in the image. But I suppose this is just a notation issue, because the book uses $\int_{C_{\epsilon}} f(z)dz$ to denote integral over positively oriented curve $C_\epsilon$, while I use it to denote integral over negatively oriented curve. It makes more sense to me to so because $C_\epsilon$ is a part of a bigger $K$ contour for which the orientation was already chosen.

My only question is whether this is correct?

EDIT:

Here are diagrams of what I mean by $K$, $C$ and $C_\epsilon$:

I took $z_0 = 0$ for simplicity and $\delta$ is the width of the corridor.
First I let $\delta \to 0$ which cancels the corridor and in my understanding leaves me with positively oriented circle $C$ and negatively oriented circle $C_\epsilon$. Also integral over the whole keyhole $K$ shown in the first image must be $0$ because $f(z)$ is holomorphic everywhere except at the point $z_0$.

答:
No.  Once the corridor walls cancel out, no part of the circle $C$ remains in the path.

You seem to be describing the complement of a keyhole contour -- the contour that corresponds to your integrals fails to enclose the pole at $z_0$.

Illustrating, with $z_0 = 0$ for simplicity.

As long as the walls have not squeezed in so far that they exactly cancel out, there is a small arc of $C$ in the path.  But once the two walls coincide, there is no piece of $C$ remaining (and we typically imagine $C_\varepsilon$ to have a tiny radius).

Note that $z_0$ need not be at the origin.  With $z_0 = 1/2 + \mathrm{i}/2$, we see

Putting the first two on the same axes, only a tiny portion of $C$ is used in $K$.  And at the instant the walls collapse together, no part of $C$ remains in the path.