Title: Computing the exponential matrix with complex eigenvalues

Body:
Let $a,b\in\mathbb{R}$ two fixed parameters, and consider the following matrix $$
A:=\left(\begin{matrix} 0 & -a & 0 & 0 \\ a & 0 & 0 & 0 \\ 0 &0&0&b \\ 0&0&b&0\end{matrix}\right).
$$
I am trying  to compute the exponential matrix $e^{Ax}$ associated with $A$ above. In order to do it, I started by computing its eigenvalues, from where I obtained $\{\pm b,\pm ia\}$, and hence $A$ is diagonalizable. Here is where everything became dark for me, specifically, the fact that I have two complex eigenvalues confuses me. For example, in order to obtain the eigenspace associated with $\pm b$, I know that I just have to solved the following system $$
(A\mp bI)\vec{v}=\vec{0},
$$
from where I obtained (respectively): $$
\left(\begin{matrix} 0 \\ 0 \\ 1 \\ 1\end{matrix}\right) \qquad \hbox{and}\qquad \left( \begin{matrix} 0 \\ 0 \\ 1 \\ -1\end{matrix}\right).
$$
However, as I said before, when trying to mimic the previous computations with the eigenvalues $\pm ia$, I got confused and I blocked. For example, if I pick $+ia$, the first two equations associated with $(A-iaI)\vec{v}=\vec{0}$ writes $$
ia v_1+av_2=0 \quad \hbox{ and } \quad av_1-iav_2=0,
$$
from where I cannot solve for $v_1$ or $v_2$. Does anyone knows how to follow?

Body:
Noticing that
$$
A^{2n}={\rm diag}\{(-1)^n a^{2n},(-1)^n a^{2n}, b^{2n},  b^{2n}\}
$$
and
$$
A^{2n+1}=
\begin{pmatrix}
0 & (-1)^{n+1} a^{2n+1}& 0 & 0 \\
(-1)^{n} a^{2n+1} & 0 & 0 \\
0 & 0 & 0 & b^{2n+1}\\
0 & 0 &  b^{2n+1} & 0
\end{pmatrix}
$$
You can separate $e^{x A}$ into two parts
$$
e^{x A} = \sum_{n=0}^\infty \frac{A^{2n}}{(2n)!}x^{2n}+
\sum_{n=0}^\infty \frac{A^{2n+1}}{(2n+1)!}x^{2n+1}
$$
The first and second summation are separately
$$
\begin{pmatrix}
 \cos (a x) & 0 & 0 & 0 \\
 0 & \cos (a x) & 0 & 0 \\
 0 & 0 & \cosh (b x) & 0 \\
 0 & 0 & 0 & \cosh (b x) \\
\end{pmatrix}
,\qquad
\begin{pmatrix}
 0 & -\sin (a x) & 0 & 0 \\
 \sin (a x) & 0 & 0 & 0 \\
 0 & 0 & 0 & \sinh (b x) \\
 0 & 0 & \sinh (b x) & 0 \\
\end{pmatrix}
$$


问:
Is a module structure over a sheaf of rings the same as a module structure on each stalk?
The definition of an $O$-module of Rotman textbook, where $O$ is a sheaf of comutative rings over a space $X$ is: an $O$-module is a sheaf $F$ of abelian groups over $X$ such that

(i) $F(U)$ is an $O(U)$-module for every open $U \subset X$;

(ii) if $U \subset V$, then $F(U)$ is also an $O(V)$-module, and the restriction $\rho^{V}_{U}: F(V) \rightarrow F(U)$ is an $O(V)$-module homomorphism.

It seems to me that it is equivalent to ask that each stalk $F_{x}$ be an $O_{x}$-module. Is this right? If so, how can I prove it?

Thanks in advance.

答:
No, this is not just an $O_x$-module structure on $F_x$ for each $x$.  For a really simple example, let $X=\{a,b\}$ with topology $\{\emptyset,\{a\},X\}$.  A sheaf on $X$ is just determined by the two values $F(X)$ and $F(\{a\})$ with a map $F(X)\to F(\{a\})$, and $F(X)$ is the same as the stalk $F_b$ and $F(\{a\})$ is the same as the stalk $F_a$.

So, a sheaf of commutative rings on $X$ is the same as giving two commutative rings $O_b$ and $O_a$ with a homomorphism $O_b\to O_a$.  A sheaf of abelian groups is two abelian groups $F_b$ and $F_a$ with a homomorphism $F_b\to F_a$.  To make $F$ an $O$-module then is more than just giving $F_b$ the structure of an $O_b$-module and $F_a$ the structure of an $O_a$-module: additionally, the map $F_b\to F_a$ must be an $O_b$-module homomorphism with respect to these structures (using the homomorphism $O_b\to O_a$).  In other words, we can't just have any two random module structures on $F_b$ and $F_a$; they have to be compatible with the restriction maps of $O$ and $F$ in a certain way.

More generally, giving an $O$-module structure on $F$ is determined by an $O_x$-module structure on $F_x$, but these can't just be arbitrary independent module structures: the assumption that they all arise from module structures over each open set is a severe extra restriction that imposes a certain "compatibility" between the module structures at different points.

Here is another example which you may find illuminating.  Let $k$ be an algebraically closed field and let $X=k$ with the cofinite topology.  This has a natural sheaf of rings $O$ defined by $O(k\setminus\{a_1,\dots,a_n\})=k[x,(x-a_1)^{-1},\dots,(x-a_n)^{-1}]$ with the obvious restriction maps.  The stalk $O_a$ at a point $a$ is then naturally identified with the localization $k[x]_{(x-a)}$.

Now given an $O$-module $F$, each stalk $F_a$ will be a module over $k[x]_{(x-a)}$.  But these module structures cannot be arbitrary: they have to be strongly related to each other!  For instance, given any global section $s\in F(X)$, the actions of $x\in k[x]_{(x-a)}$ on the images of $s$ in each stalk $F_x$ have to be "the same": they all come from the action of $x\in k[x]=O(X)$ on $F(X)$ via the restriction maps.  So for instance, if $F$ was a constant sheaf, then the $k[x]_{(x-a)}$-module structures on the stalks $F_x$ would have to all be the same, in that they actually glue together to make the constant value of $F$ a $k(x)$-module.

ContentLicense: CC BY-SA 4.0


问:
Continuous function differentiable on $[0,1]\setminus\mathbb{Q}$, but nondifferentiable on all of $\mathbb{Q}\cap[0,1]$?
I'm trying to work out an example of a continuous function which is differentiable at all irrationals but nondifferentiable at all rationals in $[0,1]$.

Since $\mathbb{Q}$ is countable, list it as $\mathbb{Q}=\{q_0,q_1,q_2,\dots\}$. Define a map $g\colon\mathbb{Q}\to\mathbb{R}$ by $q_n\mapsto 2^{-n}$. Since $\sum_{n=0}^\infty\frac{1}{2^n}$ is absolutely convergent, $\sum_{r\in\mathbb{Q}}g(r)$ is too. Then define $f\colon [0,1]\to\mathbb{R}$ by
$$
f(x)=\sum_{r\in\mathbb{Q};r<x}g(r)
$$
which is well defined.

It is not hard to see that $f$ is monotonically increasing on $[0,1]$, and thus Riemann integrable on $[0,1]$. I've been able to show that $f$ is continuous at all irrationals, but discontinuous at all rationals. I can add this if needed.

By the fundamental theorem of calculus, the function $F\colon [0,1]\to\mathbb{R}$ defined by
$$
F(x)=\int_0^x f
$$is continuous, and differentiable at all irrationals since $f$ is continuous at all irrationals.

The example on page 7 of these notes, Math 131AH Winter 2003, Prof. Terry Tao remarks that $F$ is actually nondifferentiable at every rational, by use of the mean value theorem.

I'm confused because I don't see how I can apply the mean value theorem. I don't think I'm intended to apply it to $f$, since $f$ is not differentiable on any nondegenerate interval. Also, although $F$ is continuous, I don't think I can apply the mean value theorem to it without assuming that $F$ is differentiable on all the rationals in some interval, which seems like a large assumption.

How can the mean value theorem (if necessary), show that $F$ is discontinuous at all rationals? Thanks.

答:
Your example of a function continuous at irrationals but discontinuous at rationals can be rephrased as follows: writing $\mathbb Q\cap[0,1] = \{q_0,q_1,q_2,\dots\}$ as before, define
$$
f_n(x) = \begin{cases} 0, &\text{if } x\le q_n, \\ 2^{-n}, &\text{if } x>q_n.\end{cases}
$$
Then your example $f(x)$ is simply $f(x) = \sum_{n=0}^\infty f_n(x)$. In this formulation, it's easy to see where the discontinuity at some $q_k$ comes from: all the functions being added are continuous there except for $f_k$.

So to construct a function differentiable at irrationals but nondifferentiable at rationals, I suggest trying $F(x) = \sum_{n=0}^\infty F_n(x)$, where
$$
F_n(x) = \begin{cases} 0, &\text{if } x\le q_n, \\ 2^{-n}(x-q_n), &\text{if } x>q_n.\end{cases}
$$
(And yes, this $F$ really is $\int f$, although it's not necessary to know that: one can deduce the differentiability properties of $F$ directly from the above definition.)

ContentLicense: CC BY-SA 3.0


问:
There are red and blue balls in the urn, only put red ball back. What is the expected value?
There are b blue balls and r red balls in the urn. All balls currently in the urn have an equal probability of being selected each.

When drawing a red ball, put it back in the urn, but a blue ball doesn't. Ask the expected value of times to draw the red ball after n times drawn.

I'm really confused since if put both red and blue balls back in the urn, it will be binomial, if put neither of them back, it will be hypergeometric.

But only put back red ball but not blue is very hard to figure out.

答:
I cannot see a simple closed form, but there will be a recurrence.

Suppose the expectation is $f(r,b,n)$.  Then  $$f(r,b,n)= \frac{r}{r+b}(1+f(r,b,n-1))
+ \frac{b}{r+b}f(r,b-1,n-1)$$ starting with $f(r,b,0)=0$.

For example, if $r=10,b=5,n=3$ then you get $f(10,5,3)=\frac{35216}{17199} \approx 2.0475609$ as your expected number of red balls drawn, slightly more that the expectation of $2$ red balls you would get with the binomial or hypergeometric approach.


问:
Finite Factors of Refactorable Numbers
This was just a question that I came up with while learning about refactorable numbers.

While looking through the sequence of refactorable numbers (1, 2, 8, 9, 12, 18....), I decided to look at the number of factors that each refactorable number had. This gave me the sequence (1, 2, 4, 3, 6, 6....). I saw that while refactorable numbers were all distinct, my numbers repeated. My question is that will all the numbers in my sequence repeat infinitely, or will some of these stop showing up after a finite value? Either way how do I prove this?

Since this is just a problem that I came up with I don´t have much work on it, but here is the wikipedia page that I  reading about refactorable numbers from:

https://en.wikipedia.org/wiki/Refactorable_number

答:
To fully generalize bits from the two existing answers:

Every square-free $n$ appears $k!$ times where $k$ is the number of prime divisors of $n$. Every other number appears infinitely often.

The two crucial bits to solving this are seeing that the number
$$p_1^{n_1}p_2^{n_2}\ldots p_k^{n_k}$$
has $(n_1+1)(n_2+1)\cdots (n_k+1)$ factors and that
$$p_1^{n_1}p_2^{n_2}\ldots p_k^{n_k} \text { divides } q_1^{m_1}q_2^{m_2}\ldots q_k^{m_k}$$
if and only if every prime on the left appears on the right with an equal or greater exponent. Using these facts lets us easily constrain both which numbers have $n$ divisors and which are divisible by $n$ knowing the prime factorization of $n$.

First, for the square free case, suppose that
$$n=p_1p_2p_3\cdots p_k$$
for distinct primes $p_1,\ldots,p_k$. Note that, in order for $n$ to divide some $m$, that $m$ must have at least these same prime factors - but, for a number with $k$ distinct prime factors to have $n$ factors total, it must be of the form
$$q_1^{p_1-1}q_2^{p_2-1}\cdots q_k^{p_k-1}$$
for distinct primes $q_1,\ldots,q_k$. Thus, any number divisible by $n$ and having $n$ factors must be of the form $$p_1^{p_{\pi(1)}-1}p_2^{p_{\pi(2)}-1}\cdots p_k^{p_{\pi(k)}-1}$$ for some permutation $\pi$ of the indices $\{1,2,\ldots,k\}$. There are thus $k!$ multiples of $n$ with $n$ factors.

If $n$ is not square free, let us write
$$n=p_1^{a_1}p_2^{a_2}\cdots p_k^{a_k}$$
and assume $a_1>1$. Then, consider, for any prime $q$:
$$m=p_1^{p_1^{a_1-1} - 1}\cdot p_2^{p_2^{a_2}-1}\cdot p_3^{p_3^{a_3}-1} \cdots p_k^{p_k^{a_k}-1}\cdot q^{p_1-1}$$
where we reduce the power of $p_1$ to "make room" for a power of $q$. This number has $n$ factors for every choice of prime $q$, hence $n$ appears infinitely often in your sequence.

Title: Finite Factors of Refactorable Numbers


问:
X,Y,D,E collinear in simple incircle configuration with a right triangle

There is a right triangle $ABC$ with right angle at $A$. Let the incircle touch $AB$ and $AC$ at $D$ and $E$, respectively. $X$ and $Y$ are the arc midpoints of minor arc $AB$ and $AC$ on $(ABC)$. Show that $X,Y,D,E$ collinear.

The lemma above is a step in in proving a different result which won't be provided here. I am sure there will be an easy proof to the above, but I appear to be having difficulty in showing that it is true. Sorry for the lack of information about what I have already tried, but indeed I have not made too much progress; thanks in advance.

答:
In any triangle (not necessarily right-angled), $XY$ is the perpendicular bisector of $\overline{AI}$, as the circles centred at $X$, $Y$ passing through $I$ also go through $A$ (this is the famous incentre-excentre lemma).

When $\angle A=90^{\circ}$, then $ADIE$ is a square, so $DE$ is also the perpendicular bisector of $\overline{AI}$.


问:
There is the problem of putting back and drawing 5 different cards.
Each time a student attends a lecture, the organizer gives out one card at random. The card is written with one of the five different letters from A to E. How many lectures does a student need to attend on average to collect all the five different cards?

I think this is a problem of how many times a card is successfully collected, so the probability of success on the n-th time is obey geometrical distributed. Suppose X is the i-th event that successfully gets the "A" card. $p(X=j)=(\frac{4}{5})^{j-1}*\frac{1}{5}$. How can I continue to solve this problem?

答:
For $n$ different cards, the answer is $n\sum_{k=1}^n\frac1k$.

The key insight is to define random variables $X_k$ as the number of lectures you need to attend after you obtained your $(k-1)$-th card, until the lecture in which you receive the $k$-th distinct card. So $X_k\sim\operatorname{Geo}\left(\frac{n-k+1}{n}\right)$.

Then we can just apply linearity of expectation:
$$\mathbb E\left[\sum_{k=1}^n X_k\right]=\sum_{k=1}^n\mathbb E[X_k]=\sum_{k=1}^n\frac{n}{n-k+1}=n\sum_{k=1}^n\frac{1}{k}.$$


问:
$24ml+1=k^2$ has no solution for all $l=1 \dots m$
Investigating solutions of $$24ml+1=k^2$$ for $l=1\dots m$

The question is to find the $m$-s for which the above equation has no solution for all $l=1..m$-s.
The first few $m$-s are:
$$3, 9, 24, 27, 81, 192, 243, 432, 729$$
Actually have found that the $m$ should be of form $2^a3^b$. Seems hang on the simple task, of finding general formula for this.

One interesting addition. Just tested the cases when the $$12ml+1=k^2$$ has no solution for all $$l=1..m$$ Seems it has no solution iff $m=3^a$ But has no proof yet.

答:
Under $100$ there are $84$ $m$-values yield no integer integers $(k)$ for $l=1$.

To find them is simple. $\quad k\not\in\mathbb{N} \text { for }k=\sqrt{24 m + 1)}$.

For example, for any non-zero integer $(m)$,
$$\text{If }\space \sqrt{24 m + 1)}\ne
\big\lfloor \sqrt{24 m + 1)}\space\big\rfloor
\text{, then print } m \text{, endif }\tag{1}$$

This is the same as testing $\quad\sqrt{24 m \times(1) + 1)},\quad $
i.e. $l=1.\quad$ To find non-solution m-values for any other l-values, you must test the full $\quad 24m\times(l)+1, l\le m.\quad$ For examples,

\begin{align*}
\text{If }l=2,\quad& m\in\{ \emptyset \}\\
\text{If }l=3,\quad& m\in\{ 1,2,3\}\\
\text{If }l\in\{4,5,6,7,8\}\quad& m\in\{ \emptyset \}\\
\text{If }l=9,\quad& m\in\{ 1,2,3,4,5,6,7,8,9\}\\
\text{If }l\in\{10,11,12,\cdots, 23\}\quad& m\in\{ \emptyset \}\\
\mathbf{\vdots}
\end{align*}
Your derived list is correct but I cannot offer a better formula for finding these m-values.

$\textbf{Update}\\$
We can solve for $l$ and see which k-values yield an integer for a given m-value.

$$l = \frac{k^2 - 1}{24 m} \quad\text{and we know }m\ne0\tag{2}$$

We can find $k^2$ by taking multiples of $24m$ and adding 1 to see if any $\sqrt{k^2}$ yields an integer. Having found $k$ we plug it back into equation $(2)$ and find $l$. We have a valid $m$ if and only if the smallest $l$ generated is greater than $m$. The test values for $m$ can quickly be obtained from equation $(1)$ above.


问:
In △ ABC, D is the midpoint of AB, while E lies on BC satisfying BE = 2EC. If m∠ADC=m∠BAE, what is the measure of ∠BAC in degrees?
In △ABC, D is the midpoint of AB, while E lies on BC satisfying BE = 2EC. If m∠ADC=m∠BAE, what is the measure of ∠BAC in degrees? I know already that angle A and angle D are congruent because m∠ADC=m∠BAE I just dont know how to approach the problem and i would love some help

答:
This solution will be essentially the same as the one given by @Isaac, except for the appeal to Ceva's Theorem.  While reading the words, please look at a diagram: the whole thing would be much easier to explain at a blackboard by pointing!

I have tried to use only a very basic geometric fact about area of a triangle, that it is half of base times height.

Let $X$ be the point where lines $CD$ and $AE$ meet.  Draw the line $BX$, and let this meet side $CA$ at $F$ (which will never be mentioned again, but I like symmetry).

Note that the area of $\triangle AEB$ is twice the area of triangle $ACE$ (the base $EB$ of $\triangle AEB$ is twice the base $CE$ of $\triangle ACE$, and the heights are the same).

For the same reason, the area of $\triangle XEB$ is twice the area of $\triangle XCE$.

It follows by subtraction that the area of $\triangle AXB$ is twice the area of $\triangle ACX$.

But the area of $\triangle AXB$ is twice the area of $\triangle AXD$.

We conclude (this is the important conclusion) that the area of $\triangle ACX$ is equal to the area of $\triangle AXD$.

But $\triangle AXD$ has base $XD$, and $\triangle ACX$ has base $CX$.  With respect to these bases, the two triangles have the same height.  Since their areas are equal, their bases are equal.

We conclude that $CX=XD$.  And, by what we were given, each of these is equal to $XA$.

Now we can, as suggested by @Isaac, draw the circle with center $X$ and radius $XD$.  This circle passes through $A$.  Now use a basic fact about angle subtended by a diameter.

Or else do some angle-chasing.  We have shown that $XC=XA$.  Let $\angle ACD$ be $p$ (degrees).   Then $\angle CAX=p$.

Also, $\triangle AXD$ is isosceles.  Let $\angle XAD=\angle XDA=q$.

Then the angles of $\triangle ACD$ add up to $2p+2q$.  But they add up to $180^\circ$.  Thus $p+q=90^\circ$.

Please remember that this is the solution of @Isaac, so if you wish to accept, his is the right one to accept.


问:
Decreasing the computational speed of Gaussian elimination of a complex linear system in a special case.
The solution of the complex linear system $Ax = b$ of $n$ equations can be computed using
Gaussian elimination with $O(n^3)$ complex multiplications.
However, how can we show that if $E=exp(\frac{2\pi i}{n})$ and $A$ has the elements $A_{kj} = E^{kj}$, the solution can be obtained in at most $O(n^2)$ operations?</p>

答:
If you know the matrix $A$ in advance and it is regular, you can calculate its inverse $A^{-1}$ and just multiply the vector $b$ by it, avoiding any need for Gaussian elimination. Clearly, this requires $n^2$ complex multiplications (and $n(n-1)$ additions).

If the indices $j$ and $k$ in your definition of matrix $A$ run from $0$ to $(n-1)$, the resulting matrix is a non-normalized version of certain well-known one and its inverse is the same, except for a multiplicative factor of $n$ (i.e. $AA=nI$ or, equivalently, $A^{-1}=\frac{1}{n}A$). If they run from $1$ to $n$, you'll need to fiddle with re-ordering the rows a little.


问:
I have to solve $a-b$ without calculating $a$ and $b$. So whats is $a-b$?
It is given that $a+b=2$, $ab=-3$ and $a<b$. The answer is $-4$ but I do not know how to do it

Body:
$(a+b)^2 - 4ab = a^2 - 2ab -b^2 = (a-b)^2$

$(a-b)^2 = 2^2 - 4*-3 = 16$

$a-b = +/-4$

Since $b>a$, $a-b < 0$.
Thus, $a-b = -4$.


问:
What rational number is between these two real numbers?
According to several texts and professors, there exists a rational number between any two real numbers. But suppose you had two real numbers which had the same digits in the same places up to some place, where they differed by one digit - say the smaller one had a $4$ and the bigger one had a $5$. The smaller number's digits following the four are all $9$s, and the bigger number's digits after the five are all $0$s. For example:
$$ \beta=1.235\overline{0} \\ \alpha=1.234\overline{9}$$

What rational number is between $\alpha$ and $\beta$?

答:
Yet another perspective that I think is worthwhile.

$\alpha$ and $\beta$ are two real numbers that are arbitrarily close together. Precisely, for any $\epsilon > 0$, $|\alpha - \beta| < \epsilon$. To see this, just continue the repeating decimal until it's clear that the difference between $\alpha$ and $\beta$ is surely less than $\epsilon$.

For example, suppose $\epsilon  = .000001$. We know
$$
1.2349999 < 1.234\overline{9} = \alpha \leq \beta = 1.2345\overline{0} = 1.2345
$$ which means $|\alpha - \beta| < |1.2349999 - 1.2345| = .0000001 < .000001 = \epsilon$.
Hopefully it is clear that we could play this same game with any choice of $\epsilon > 0$.

The claim is that if for all $\epsilon > 0$ we have $| x - y | < \epsilon$, then $x = y$. Suppose not. Then $x \neq y$, so $| x - y | > 0$. But, by hypothesis, this means $| x - y | < |x - y|$, which is absurd: no number is strictly less than itself.

Therefore, since $|\alpha - \beta| < \epsilon$ for any $\epsilon > 0$, we conclude $\alpha = \beta$.


问:
Find the point on the line $y = 2x + 1$ that is closest to the point $(5, 2)$?
The question is: Find the point on the line $y = 2x + 1$ that is closest to the point $(5, 2)$.
I know the high (or middle) school method. Create a line that is perpendicular to this line, so the slope will be $-1/2$. Then the intersection is the answer.

But I meet this question from a linear algebra textbook. I want to use projection onto a line method. Projecting vector $b$ onto vector $a$ with the error $e=b-\hat{x}a$.

Thus, $a \cdot (b-\hat{x}a)=0$ or $a\cdot b-\hat{x}a\cdot a=0$.
Thus, $\hat{x}=\frac{a\cdot b}{a\cdot a}$

But the problem is that here $a$ and $b$ are pure vectors. My question is given a specific line. Then I don't know how to do with it.

答: Pick a point on the line, such as $(0,1)$. The vector joining $(0,1)$ to $(5,2)$ is their difference, $(5,1)$. We need to project this in the direction of the line, which is given by $(1,2)$ (to wit, the parametric equation is $L(t)=(0,1)+t(1,2)$). This projection is $$\frac{(5,1)\cdot (1,2)}{(1,2)\cdot (1,2)}(1,2) = \frac{7}{5}(1,2) = \left(\frac{7}{5},\frac{14}{5}\right).$$We obtain the point in the line which is closest to $(5,2)$ by adding this vector to the point $(0,1)$. Thus the point in the line which is closest to $(5,2)$ is $$\left(\frac{7}{5},\frac{19}{5}\right).$$


问:
Deriving successively $\dot{y}=f(y)$.
Let $y : \mathbb{R}\to \mathbb{R}^n$ and $f : \mathbb{R}^n\to \mathbb{R}^n$ and consider the equation $\dot{y}(t)=f(y(t))$. Then apparently if we derive successively we get
\begin{align}
\dot{y}(t)&=f'(y(t))\dot{y}(t)\\
\ddot{y}(t)&=f''(y(t))(\dot{y}(t),\dot{y}(t))+f'(y(t))y(t)\\
\dddot{y}(t) &= f'''(y(t))(\dot{y}(t),\dot{y}(t),\dot{y}(t))+3f''(y(t))(\ddot{y}(t),\dot{y}(t),\dot{y}(t))+f'(y)(\dddot{y}(t))
\end{align}

Where $f^{(k)}(y):=D_y^{(k)}f$ is a notation of the k-th differential at $y$. I don't really understand how to show this properly. I know that somewhere I should use the result $D_x(f\circ g) = D_{g(x)}f\circ D_xg$.

Notation

The differential $f'$ evaluated in the point $y(t)$ is a linear map $f'(y(t)) \in L(\mathbb{R}^n,\mathbb{R}^n)$ so it accept one argument .Also $f''(y(t)) \in L(\mathbb{R}^n,L(\mathbb{R}^n,\mathbb{R}^n))$ so it can be thought as a bilinear map $L(\mathbb{R}^n,\mathbb{R}^n;\mathbb{R}^n)$ so it has two arguments. In the same way, $f'''(y(t))$ has 3 arguments, ...

答:
If $V,W$ are Banach spaces (example $\Bbb{R}^n,\Bbb{R}^m$) and $f:V\to W$ is differentiable, and $a\in V$, I shall use $Df_a$ to mean the element of $L(V,W)$ such that $\lVert f(a+h)-f(a)-Df_a(h)\rVert/\lVert h\rVert \to 0$ as $h\to 0$. If the domain $V$ is $\Bbb{R}$, then I'll use $f'(a)$ to mean the limit $\lim\limits_{h\to 0}\dfrac{f(a+h)-f(a)}{h}$. It is easy to verify directly that when the domain is $\Bbb{R}$, $f'(a)$ exists if and only if $Df_a\in L(\Bbb{R},W)$ exists and the relationship between the two is that $f'(a)=Df_a(1)$, i.e the linear map $Df_a:\Bbb{R}\to W$ evaluated on the basis vector $1\in\Bbb{R}$ (i.e what we're doing is using the fact that $W$ and $L(\Bbb{R},W)$ are isomorphic vector spaces, and moreover if you use the operator norm, these are isometrically isomorphic Banach spaces).

Now, let $y:\Bbb{R}\to V$ and $f:V\to W$ be infinitely differentiable functions, and consider the composite $f\circ y:\Bbb{R}\to W$. We now use the chain rule to calculate its derivatives:
\begin{align}
(f\circ y)'(t)&=D(f\circ y)_t[1]\\
&= (Df_{y(t)}\circ Dy_t)[1]\\
&= Df_{y(t)}[Dy_t[1]]\\
&= Df_{y(t)}[y'(t)]\tag{$*$}
\end{align}
Now, how do we continue calculating the derivatives? Well, this looks very much like a product rule type of situation. But product rule is really just a special type of chain rule (see the link); let's consider the "evaluation map" $\omega: L(V,W)\times V\to W$, defined by $(T,v)\mapsto T(v)$, i.e you take a linear map and a vector and just evaluate. This is easily verified to be a bilinear mapping. Using this, we can write
\begin{align}
(f\circ y)'(t)&= \omega\bigg(Df_{y(t)}, y'(t)\bigg) = \omega\bigg((Df\circ y)(t), y'(t)\bigg)
\end{align}
i.e on the RHS we have an expression of the form $\omega(u(t), v(t))$; the derivative of such an expression at $t$ is (see the link for the precise statement) given by "differentiating the first entry, keep the second, plus keep the first and differentiate the second". So, if we do this, then we get
\begin{align}
(f\circ y)''(t)&= \omega\bigg((Df\circ y)'(t), y'(t)\bigg) + \omega\bigg((Df\circ y)(t), y''(t)\bigg)\\
&=\omega\bigg(D(Df\circ y)_t[1], y'(t)\bigg) + \omega\bigg(Df_{y(t)}, y''(t)\bigg)\\
&=\omega\bigg(D^2f_{y(t)}[Dy_t[1]], y'(t)\bigg)+\omega\bigg(Df_{y(t)}, y''(t)\bigg)\\
&=\omega\bigg(D^2f_{y(t)}[y'(t)], y'(t)\bigg)+ \omega\bigg(Df_{y(t)}, y''(t)\bigg)
\end{align}
So, all I did is use the chain rule and the relation between $Dy$ and $y'$ as explained in my first paragraph. Now, let us recall that $\omega$ is nothing but the evaluation map, so
\begin{align}
(f\circ y)''(t)&= \bigg(D^2f_{y(t)}[y'(t)]\bigg)[y'(t)] + Df_{y(t)}[y''(t)]
\end{align}
Here, $D^2f_{y(t)}$ is an element of $L(V,L(V,W))$, which if you recall your linear algebra is isomorphic to the space of bilinear maps $L^2(V,V;W)$. Now, if we abuse notation by denoting $D^2f_{y(t)}$ for both the element of $L(V,L(V,W))$ and its corresponding image in $L^2(V,V;W)$ (in fact $D^2f_{y(t)}$ is symmetric in its two arguments so it is actually in $L^2_{\text{sym}}(V,V;W)$), then the above equation says
\begin{align}
(f\circ y)''(t)&= D^2f_{y(t)}[y'(t), y'(t)] + Df_{y(t)}[y''(t)]\tag{$**$}
\end{align}

With some practice, going from $(*)$ to $(**)$ becomes very easy, and you won't even have to explicitly write down the evaluation maps and the various compositions. Similarly, we can continue differentiating by introducing more evaluation maps; for example this time for the first term you can view it as the evaluation map $L^2_{\text{sym}}(V,V;W) \times V\times V\to W$ defined by $(T,x,y)\mapsto T(x,y)$. This is now a trilinear map, so differentiating this is again a type of product rule (differentiate the first keep the second two, keep the first differentiate the second keep the third, keep the first and second and differentiate the third).

But actually, in this specific case, because of the occurrence of the double evaluation $[y'(t), y'(t)]$, and by symmetry of $D^2f_{y(t)}$, you can immediately pull out a factor of $2$ (like how $\frac{d}{dx}x^2 = 2x$). In any case, I leave the details to you; you should find (after identifying third derivatives with the relevant symmetric trilinear map etc)
\begin{align}
(f\circ y)'''(t)&=D^3f_{y(t)}[y'(t), y'(t), y'(t)] + 2D^2f_{y(t)}[y'(t), y''(t)]\\
&+ D^2f_{y(t)}[y'(t),y''(t)] + Df_{y(t)}[y'''(t)]\\
&= D^3f_{y(t)}[y'(t),y'(t), y'(t)] + 3D^2f_{y(t)}[y'(t), y''(t)] + Df_{y(t)}[y'''(t)]
\end{align}
Or if we shorten notation slightly, and write $(y'(t))^3$ to mean the element $(y'(t),y'(t),y'(t))\in V^3$, then the equation reads
\begin{align}
(f\circ y)'''(t)&= D^3f_{y(t)}[(y'(t))^3] + 3D^2f_{y(t)}[y'(t), y''(t)] + Df_{y(t)}[y'''(t)]\tag{$***$}
\end{align}
We can continue once again (define relevant evaluation maps, use product rule, chain rule, use symmetry of higher derivatives, identify higher derivatives with relevant multilinear maps etc):
\begin{align}
(f\circ y)^{(4)}(t)&= D^4f_{y(t)}[(y'(t))^4] + 3D^3f_{y(t)}[(y'(t))^2, y''(t)]\\
&+ 3\bigg(D^3f_{y(t)}[y'(t), y'(t), y''(t)] + D^2f_{y(t)}[y''(t), y''(t)] +
D^2f_{y(t)}[y'(t), y'''(t)]\bigg)\\
&+ D^2f_{y(t)}[y'(t), y'''(t)] + Df_{y(t)}[y^{(4)}(t)]
\end{align}
Hopefully its clear how I got each term from the previous differentiation, and the notation is clear; for example, $y^{(4)}(t)$ means $y''''(t)$, while in the first line $[(y'(t))^2, y''(t)]$ means the element $[y'(t), y'(t), y''(t)]\in V^3$. If we now combine all the like terms, we get
\begin{align}
(f\circ y)^{(4)}(t)&= D^4f_{y(t)}[(y'(t))^4] + 6 D^3f_{y(t)}[(y'(t))^2, y''(t)] + 3D^2f_{y(t)}[(y''(t))^2]\\
& + 4 D^2f_{y(t)}[y'(t), y'''(t)] + Df_{y(t)}[y^{(4)}(t)].\tag{$****$}
\end{align}

This is a rather complicated mess, so let's do some sanity checks. THe first term involves $D^4f_{y(t)}$ this should be a $4^{th}$-order multilinear map, so the fact that it is evaluated on $[(y'(t))^4]=[y'(t),y'(t),y'(t),y'(t)]\in V^4$ makes sense. The next term is $6D^3f_{y(t)}[(y'(t))^2,y''(t)]$; this involves $D^3f$, so the fact it is evaluated on the $3$-tuple of elements $[y'(t),y'(t),y''(t)]\in V^3$ makes sense, and so on for the other terms: each of the $D^2f$ terms are evaluated on a pair of vectors, and the $Df$ term is evaluated on a single vector.

Title: Deriving successively $\dot{y}=f(y)$.


问:
Question about continuous functions and limits
I posted a thread about a certain problem I was working on and this gap in my knowledge came up, consider for example the function $g: (0,\infty)\to \mathbb R $, for which  $g\left(x\right)\cdot g\left(\frac{1}{x}\right)<0$ for every $0<x≠1$, and $g(x)$ is continuous at $1$.

So the way we define continuity is

".. for every $ϵ > 0$ there exists a $δ > 0$ such that for every $|x − a| <
 δ$, we have $| f(x) − f(a)| < ϵ$."

Therefore, when I calculate the limit of the expression above when x tend to 1, and reach that $g(x)^2$≥0, how can I justify using the given inequality above? because x CAN be 1, and if f(1) is actualy 1, not not tends to 1 then I can't use the inequality?
Is the way I'm looking at it not correct?
I also thought of a possibility, that since I only calculate the limit and not the actual expression, I would get a positive limit for  function that can't be positive! so if I assume f(1) is not 0, I would reach a contradiction..
But still I can't quiet get my head around the limits of continuous functions and the difference between the value of the limit and the expression at the point x tends to..

答:
$g$ is continuous at $1$. By the continuity of $x\mapsto \frac 1x$, $g\left(\frac 1x\right)$ is also continuous at $1$. And by the continuity of multiplication, so is their product $g(x)g\left(\frac 1x\right)$. So $\lim_{x \to 1} g(x)g\left(\frac 1x\right) = g^2(1)$.

But if a function takes its values in a closed set, any convergent limit of the function must also be in that closed set. $(-\infty, 0]$ is closed, so by your inequality, $g^2(1) \le 0$. As the square of a real number $g^2(1) \ge 0$. So the only possibility is $g(1) = 0$.


问:
Do we really need to use the assumption to show that $\phi$ is well defined. (Serge Lang Calculus of Several Variables)
I am reading "Calculus of Several Variables 3rd Edition" by Serge Lang.

Do we really need to use the assumption to show that $\phi$ is well defined.

答:
Olivier gives the answer in his comment, but you seem to have missed the point. It is true that $\phi$ is well-defined for all $X\neq0$ not on the circle, because Lang specifies a unique path from $(1,0)$ to $X$. And obviously $\phi((1,0))=0$.

But consider points of the form $X_\epsilon=(\cos\theta,\sin\theta)$ for $\theta=2\pi-\epsilon$, where $0<\epsilon<2\pi$. We'd like $\phi$ to be differentiable, so we need it to be continuous; hence $\phi(X_\epsilon)$ should approach $\phi((1,0))=0$ as $\epsilon\to0$. The assumption guarantees this.


问:
Matrices with respect to bases in quotient spaces
Let $V$ and $W$ be both K-linear vector spaces. Now $Y$ is a linear subspace of $V$ and $Z$ is a linear subspace of $W$. Let $\alpha: V \rightarrow W$ be a $K$-linear function with $\alpha(Y)\subseteq Z$. Also $\alpha$ induces $\bar{\alpha}:V/Y \rightarrow W/Z$ and $\alpha|_Y:Y \rightarrow Z$.
Let $(v_1,...,v_n)$ be a Basis of $V$ that contains a Basis $(v_1,...,v_k)$ of $Y$ and let $(w_1,...,w_m)$ be a Basis of $W$ that contains a Basis $(w_1,...,w_l)$ of $Z$.

The Matrix of $\alpha$, regarding the bases $(v_1,...,v_n)$ and $(w_1,...,w_m)$, has the form:
$\pmatrix{A&C\\ 0&B}$.

From this block matrix, I want to determine the matrix of $\alpha|_Y$ with respect to the
Bases $(v_1,\dots, v_k)$ of $Y$ and $(w_1,\dots, w_l)$ of $Z$, but also the matrix of $\bar{\alpha}$
with respect to the bases $(v_{k+1} + Y,\dots, v_n + Y)$ of $V/Y$ and $(w_{l + 1} + Z,\dots, w_m+Z)$ from $W/Z$.

Is this already the solution?:
$$\begin{pmatrix}
    a_{11} & \dots &a_{1k} &  a_{1(k+1)} & \dots &a_{1n} \\
    \vdots &  \ddots  &\vdots & \vdots &  \ddots  &\vdots \\
    a_{l1} & \dots &a_{lk} & a_{l(k+1)} & \dots & a_{ln} \\
0 & \dots &0&  a_{(l+1)(k+1)} & \dots &a_{(l+1)n} \\
    \vdots &  \ddots  &\vdots & \vdots &  \ddots  &\vdots \\
    0& \dots & 0 & a_{m(k+1)} & \dots &a_{mn}
  \end{pmatrix}$$

with $A$ as the Basis of $Y$? I am not sure whose matrices are $B$, $C$ and the Nullmatrix for. If not then how to calculate the matrices?

Thanks in advance.

答:
Restricting the domain to $Y$ corresponds to only looking at the first few columns of the matrix (since $v_1,\dots,v_k$ are a basis of $Y$). Similarly, since $\alpha(Y) \subset Z$, you can restrict to the first few rows of the matrix (the bottom several rows are zero anyways). So the matrix of $\alpha|_Y$ is just $A$.

On the other hand, the matrix of the induced map $\overline{\alpha} \colon V/Y \to W/Z$ is given by $B$. Let me explain why. You have the bases $\bar{v}_{k+1},\dots,\bar{v}_n$ of $V/Y$ and $\bar{w}_{\ell+1},\dots,\bar{w}_{m}$ of $W/Z$ (here I'm using the notation $\bar{v}_i$ instead of $v_i + Y$). The $j$-th column of the matrix tells you that

$$ \alpha(v_j) = \sum_{i=1}^m a_{ij} w_i $$

Taking equivalence classes in the quotient spaces you get

$$ \bar{\alpha}(\bar{v}_j) = \sum_{i=1}^m a_{ij} \overline{w}_i = \sum_{i=\ell+1}^m a_{ij} \overline{w}_i $$
The last equality is because $\overline{w}_i = 0$ when $i \leq \ell$ (because $w_1,\dots,w_\ell$ is a basis of $Z$). This means the $j$-th column of the matrix for $\overline{\alpha}$ is
$$ \begin {pmatrix} a_{\ell+1,j} \\ a_{\ell+2,j} \\ \vdots \\ a_{m,j} \end{pmatrix} $$
This is precisely the $j$-th column of $B$.


问:
Is the use of the quadratic formula valid? (Flammable Math's "How REAL Men Solve Equations" video)
I was wondering whether the steps used in Flammable Math's YouTube video "How REAL Men Solve Equations" are valid or not. It's a joke video, but all of his work seems correct. Is this a valid use of the quadratic formula?

$$8x=1\Rightarrow 4x+4x-1=0$$
$$\Rightarrow (x)2^2+(2x)2-1=0$$
$$
\Rightarrow 2_{12} = \frac{-2x\pm \sqrt{4x^2+4x}}{2x}
$$
$$
\require{cancel} = \frac{-\cancel{2x}\pm\cancel{2x} \sqrt{1+\frac{1}{x}}}{\cancel{2x}}
$$
$$
\stackrel{2>0}{\Rightarrow} 2 = -1+\sqrt{1+\frac{1}{x}}\Rightarrow 3 = \sqrt{1+\frac{1}{x}}
$$
$$
\Rightarrow 9 = 1+\frac{1}{x} \Rightarrow \frac{1}{8}=x
$$

I believe it is because if you let $2 = y$, you get a quadratic equation in terms of $y$, then you can set up the quadratic formula to solve for $y$.

Like this $(x)(y)^2+(2x)y-1 = 0$. So, we get $ y = \frac{-2x\pm \sqrt{4x^2+4x}}{2x}$. Now that renaming made the manipulation make much more sense.

答:
A common error in mathematicians is thinking that particular letters or symbols carry any significance. The most common statement of the quadratic formula is that given real numbers $a,b,c$, the solutions of the polynomial equation
$$ax^2+bx+c=0$$
Are
$$x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$$
But one could just as easily say that given real numbers $\#,\%,\&$ the solutions of the polynomial equation
$$\#@^2+\%@+\&=\text{zero}$$
Are
$$@=\frac{\text{negative }\% ~\mp \square \text{root}\{{}^2\% ~\_~ \text{IV}\#\&\}}{2\#}$$
I'll leave it to you to work out what the odd symbols mean. The quadratic formula (and mathematics in general) is (are) a statement(s) about numbers (or other mathematical objects), not symbols.

To answer the comment

Let's suppose we have the equation $4x+3=11$. We can solve this using elementary methods to obtain $x=2$:
$$4x=11-3$$
$$x=\frac{11-3}{4}=8/4=2$$
Let's start again. Is it incorrect to now say $4\cdot 2+3=11$ ? No. Is it incorrect to say $4\cdot 2=11-3$? No. Is it incorrect to say $2=\frac{11-3}{4}$ ? Finally, is it incorrect to say $2=2$? Erm.. no. When we say "$x$ equals $2$ is a solution of the equation $4x+3=11$" precisely what we mean is that if we substitute the numeric value $2$ in place of $x$ in the equation, that the numeric value of both sides of the equation are the same (otherwise I suppose it wouldn't be an equation).

Another edit:

To reaffirm that the quadratic formula is a statement about numbers, and not symbols, I will present the quadratic formula without using symbols. Here goes:

Imagine any three numbers - call them the first, second and third. The only demand is that the first cannot be zero. If we can find a number, call it the 'square root' such that when we multiply it by itself we get the square of the second minus four times the product of the first and the third, then we can call half the 'square root' divided by the first, minus half the second divided by the first, the 'solution', and this 'solution' has the remarkable property that if we square it, multiply that result by the first, then add the product of the second and "solution" and then add the third, we will get zero, no matter what our choices for the first, second, and third are.

I think this makes it clear why we use symbols rather than words in mathematics!


问:
How to read $x^n-1$ and $x^{n-1}$?
Now, it may sound absurd, but I would like to know (if exists), how to read $(x^{n-1})$ and $(x^n-1)$ distinctly and practice this it in everyday Mathematics.

As of now, I read $(x^{n-1})$ as, "x whole raised to power n-1" and $(x^n-1)$ as " x raised to n whole minus 1".

Similar confusing scenarios are also welcome.

Thank you.

答:
For $x^{n-1}$, $``x$ whole raised to $n-1"$ looks great.

For $x^n - 1$, I'd suggest $``1$ less than $x^n"$

Title: How to read $x^n-1$ and $x^{n-1}$?


问:
Finding all pairs $(m,n)$ of positive integers such that $m(n + 1) + n(m − 1) = 2013$

Find all pairs $(m, n)$ of positive integers such that
$$m(n + 1) + n(m − 1) = 2013$$

What I've done: I tried to make the problem simpler by $2mn+m-n$ and factoring it equals $(2m-1)(2n+1)$

Where do I go now?

答:
You started OK but you didn't see how easy it is to solve for $m$.
\begin{align*}
&m(n + 1) + n(m − 1) = 2013\\
&\implies 2 m n + m - n - 2013 = 0\\
&\implies m(2 n + 1) = n + 2013\\
&\implies m = \frac{n + 2013}{2 n + 1}\quad \land\quad 2 n + 1\ne0
\end{align*}
Since $2n$ is always even, adding or subtracting $1$ from it will never yield zero so $n\in\mathbb{N}$ but not all values of $n$ will yield integers for $m$.

For $\quad 0\le n\le 2100\quad $ there are $11$ integer pairs $(m,n)$ and these appear to be the only solutions, according the descending-m and ascending-n pattern seen here.

$$
(403,2)\quad
(288,3)\quad
(88,11)\quad
(81,12)\quad
(58,17)\quad
(18,57)\\
(13,80)\quad
(12,87)\quad
(4,287)\quad
(3,402)\quad
(1,2012)\quad
 $$


答: To read aloud I would say, "x to the power, pause, n minus 1", and "x to the power n, pause, minus 1". The position of the pause is used to communicate the implied brackets. If this is not clear enough, then "x to the power open bracket n minus 1 close bracket".</p>

Title: How to read $x^n-1$ and $x^{n-1}$?

Body:
Now, it may sound absurd, but I would like to know (if exists), how to read $(x^{n-1})$ and $(x^n-1)$ distinctly and practice this it in everyday Mathematics.

As of now, I read $(x^{n-1})$ as, "x whole raised to power n-1" and $(x^n-1)$ as " x raised to n whole minus 1".

Similar confusing scenarios are also welcome.

Thank you.


问:
Let $a,b,c$ be integers such that
$\gcd(a,6)=3=\gcd(b,6)$. Show that $\gcd(a+b,6)=6$.
Let $a,b,c$ be integers such that
$\gcd(a,6)=3=\gcd(b,6)$.
Show that $\gcd(a+b,6)=6$.

Attempt:
Let $d = \gcd(a+b,6)$.
Then, by definition, $d \mid (a+b)$ and $d \mid 6$. It means that $d=1,2,3$ or $6$. On the other hand, we have
$3\mid a$ and $3 \mid b$. Write
$a = 3m$ and $b=3n$ for some integers $m$ and $n$. Then, $a+b=3m+3n=3(m+n)$ and so
$3 \mid (a+b)$. But, $d \mid (a+b)$. Now, $a+b = dp$ for some integer $p$.
Thus, we have $3 \mid dp$ which means $3 \mid d$ or $3 \mid p$.
If $3 \mid d$, then $d=3k$ for some integer $k$. Hence, $d$ is either $3$ or $6$.

But, how to get $d=6$?

答:
Since $\gcd(a,6)=\gcd(b,6)=3$, then $a=3m$ and $b=3n$ for some odd $m$ and $n$.

Thus, $a+b=3(m+n)$ while $m+n$ is even, so $6\mid a+b$.


问:
What book would you recommend to significantly improve my problem solving skills?
I am a straight-A student (going to the ninth grade) and do nearly perfectly in math, the problem is that my school (like many other schools I suppose) makes you memorize the steps, the formulas, etc. and just apply that to similar questions, and since I’ll probably be opting for IGCSE and eventually A levels, I find it necessary to significantly improve my critical thinking skills because I never had adequate practice for that. I’m sorry for all that background, but I would like your recommendation of books/websites that would help me.

Do you think these books are appropriate:

How to Solve It by Polya

The Art of Problem Solving Vol. 1: The Basics & How to Solve It Vol. 2: And Beyond

Problem Solving Strategies by Engel

Problem-Solving through Problems

Mathematical Discovery: On Understanding, Learning and Teaching Problem Solving

Do you think that Solving Mathematical Problems by Tao is enough for me to significantly improve?

答:
Yes, I think the Art of Problem Solving is a good book series.

I have not heard of Solving Mathematical Problems by Tao, though, but I do know that you can practice your mathematics skills by completing AMC Tests from past years here.

https://artofproblemsolving.com/wiki/index.php/AMC_Problems_and_Solutions


问:
Disagreement over the arc length of an ellipse
I'm reading Elliptic Functions and Elliptic Integrals by Prasolov and Solovyev. On page $53$, it reads:

The ellipse $\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$ can be given parametrically by the formulas $x=a\cos \varphi$, $y=b\sin\varphi$. The differential $dl$ of the length of an arc on the ellipse is equal to $\sqrt{dx^2+dy^2}=d\varphi\sqrt{a^2\cos ^2\varphi +b^2\sin ^2\varphi}$. If $a=1$ and $b=\sqrt{1-k^2}$, then $dl=d\varphi \sqrt{1-k^2\sin ^2\varphi}$. In this case the length of the arc on the ellipse between the end point of the small half axis, $B$, and the point $M=(\cos\varphi ,b\sin\varphi )$ is equal to $E (\varphi )=\int_0^{\varphi}\sqrt{1-k^2\sin ^2\psi}\, d\psi .$

I think there is an error. My approach is the following:

The upper half of the ellipse (there are the points $B$ and $M$) can be represented by $y=b\sqrt{1-x^2}$. The arc length, measured from the point $B=(0,b)$ to an arbitrary point in the first quadrant $M$ in terms of the horizontal component of $M$ is
$$s=\int_0^x \sqrt{\frac{1-k^2t^2}{1-t^2}}\, dt$$
where $b=\sqrt{1-k^2}$. The substitution $u=\arcsin t$ gives
$$s=\int_0^{\arcsin x}\sqrt{1-k^2\sin ^2 u}\, du.$$
The ellipse is parametrized by $x=\cos\varphi$, $y=b\sin\varphi$, therefore if $M=(\cos\varphi ,b\sin\varphi )$, then
$$\begin{align}s&=\int_0^{\arcsin \cos\varphi}\sqrt{1-k^2\sin ^2 u}\, du\\&=\int_0^{\frac{\pi}{2}-\varphi}\sqrt{1-k^2 \sin ^2 u}\, du.\end{align}$$

So the required arc length should be $E\left(\frac{\pi}{2}-\varphi\right)$, not $E(\varphi )$. A considerable amount of the following theorems in the book is "proved" assuming $E (\varphi )$ for the arc length, which seems a bit worrying. Maybe I'm missing something.

答:
If $x=a\cos \varphi$ and $y=b\sin\varphi$ then
$$
(dx)^2+(dy)^2 = a^2\sin^2\varphi\, d\varphi +b^2\cos^2\varphi\, d\varphi,
$$
contrary to the book's claim that it would be
$a^2\cos^2\varphi\, d\varphi +b^2\sin^2\varphi\, d\varphi.$

Yet $x=a\cos \varphi$ and $y=b\sin\varphi$ also implies that
$(x,y) = (a,0)$ when $\varphi = 0$ and $(x,y) = (0,b)$ when $\varphi = \frac\pi2,$  which implies that to integrate the curve from $(0,b)$ to an arbitrary point on the ellipse you should choose $\frac\pi2$ and not $0$ as the fixed end of your integral.

So altogether the book is not making sense.

But if we make just one change -- instead of $x=a\cos\varphi$ and $y=b\sin\varphi$,
let $x=a\sin\varphi$ and $y=b\cos\varphi$ --
then $(x,y) = (0,b)$ when $\varphi=0,$ it therefore makes sense to use $0$ as the fixed end of the integral when integrating the curve length from $(0,b)$ to an arbitrary point on the ellipse, and
$$
(dx)^2+(dy)^2 = a^2\cos^2\varphi\, d\varphi +b^2\sin^2\varphi\, d\varphi
$$
as claimed in the book.

So I will guess that the original intention was to set
$x=a\sin\varphi$ and $y=b\cos\varphi,$ but sometime between the original conception
of the integration and the time when the book was typeset, someone mistakenly wrote
the more usual formulas $x=a\cos\varphi$ and $y=b\sin\varphi$ instead of the particular formulas that are correct for this particular problem.


问:
Calculate n-th possible picture given dimensions and number of colors
I want to iterate through every picture (E.g. 500x500 pixels, every pixel can have 255 different colors)
I want to be able to pass in $n$ and draw the $n$-th picture without having the picture $n-1$.

My idea was to divide the problem into

Getting the $x$-th ordered set of pixels. E.g.: $[white, red, red]$

Permutate the $x$-th ordered set of pixels until I got every $y$-th combination. E.g.: $[white, red, red], [red, white, red], [red, red, white]$ (No duplicates, e.g. $[red, red, white]$ shall not appear twice)

So I would need calculations to get $x$ and $y$ from $n$.

Given $n$, is it possible to draw the corresponding picture?

If yes, is it possible with my idea? If not, can you give me a mathematical hint to do it?

答:
First, note that my comment does provide a way to list the $N$ distinct $w\times h$ pictures using $k$ colors as $p_1$ through $p_N$ in such a way that picture $p_n$ can be drawn given $n$. Identify the colors as $c_0,c_1,\dots, c_k$ and identify the picture whose pixel colors (left to right, top to bottom) are $(c_{i_0},\dots,c_{i_{wh-1}})$ as $p_n$, where $$n=\sum_{j=0}^{wh-1}c_{i_j}\cdot k^j.$$

Perhaps more understandably, I’m observing that a picture can be looked at as a single number: the number with $wh$-many digits (each pixel is a digit), using digits from $0$ to $k-1$, where there are $k$ available colors. And starting the digits with $0$ means that the numbers corresponding to the possible pictures are exactly the numbers from $0$ to $k^{wh}-1$.

That is, let $n$ for a given picture be the $wh$-digit base-$k$ number whose $j$-th digit identifies the color of the $j$-th pixel. Then it’s straightforward to compose the picture $p_n$ from $n$ (on a system that can handle the large base $k$ integer calculations.

From the comments, however, I believe you are asking for something different: Is it possible to list the pictures as $p_n$ in such a way that the collection of all pictures with identical color histograms are listed contiguously?

For example, the $w<N$ pictures with 20 blue pixels, 17 red pixels, and 12 green pixels, say for $7\times7$ pictures with at most five colors might be $p_{x+1}, p_{x+2}, \dots p_{x+w}$ (if there were $x$ pictures having histograms that “preceded” the one mentioned) and do this in such a way that $p_n$ can be drawn directly, without drawing all previous pictures to get it.

It is, but it would be clumsy and require some auxiliary tables or formulas to refer to.

The number of different histograms for $w\times h$ pictures using at most $c$ colors is the number of ordered partitions of $w\cdot h$ with at most $c$ parts. (This number can be computed using “stars and bars” and is $\ell={wh+c-1\choose c-1}$. The histograms $h_1,\dots,h_\ell$ can be enumerated lexicographically, but to know what histogram the $n$-th picture has requires having precomputed the partial sums of the number of pictures with each histogram. For a given histogram, say $wh=i_1+i_2+\cdots+i_c$, there are $wh\choose i_1,i_2,\dots,i_c$ pictures. And you would have to systematically enumerate the pictures with a given histogram in order to get the picture knowing (using the precomputations) that $p_n$ is, say, the $m$-th picture with histogram $i_1+i_2+\cdots+i_c$ and be clever about how to find that $m$-th picture with that specific histogram directly from knowing how you enumerated pictures with identical histograms (these could also be enumerated lexicographically and formulas could probably be obtained).

My comment answers your initial question, “Can I list the pictures $p_1$ through $p_N$ and then given $n$, draw $p_n$ directly.” But you say you had that idea and I guess don’t want to use it, being curious to know if there is an approach that lists pictures with identical histograms together in the list of all pictures. So you are asking not just for an answer to your initial question, but you’re asking for an alternative answer that takes a specific different approach, where the collection of pictures with the same distribution of colors are listed consecutively.

I wouldn’t say this is impossible, but it’s certainly not straightforward. If all you really need is a way to assign a unique number to each picture and to recover the picture from the number, my suggestion of using $wh$-length base-$k$ numbers as picture labels should work.


问:
How to maximize $\| {\bf U x}\|^2$ when ${\bf U}$ is a upper triangular matrix
When ${\bf U}$ is an $N$-by-$N$ complex-valued upper triangular matrix whose diagonal elements are positive real values, how to obtain an $N$-by-$1$ vector ${\bf x}=[x_1\cdots x_N]^T$ with $|x_n|=1$, for all $n=1,...,N$, that maximizes $\| {\bf U x}\|^2$ ?

答:
Set up a Lagrangian for Lagrange multipliers and take the gradient

$$f(\mathbf{x},\lambda) = \mathbf{x^TU^TUx}-\lambda(\mathbf{x^Tx}-1)$$

$$\nabla_{\mathbf{x}}f = 2\mathbf{x^TU^TU}-2\lambda\mathbf{x^T} =0\implies \mathbf{U^TUx} = \lambda\mathbf{x}$$

In other words, the vectors that extremize the function $\mathbf{x^TU^TUx}$ on the constraint $\mathbf{x^Tx}-1=0$ are the eigenvectors of $\mathbf{U^TU}$.


问:
parenthesis of expression in such a way value not changed
one example:

How many ways we can do possible value-preserving parenthesis the following expression in such a way that value not changed after parenthesis with one constraint that parenthesis among one variable is not correct (i.e: $(i)+j+k$ is not acceptable) ?

as an example for expression $i+j+k$, parenthesis like $i+(j+k)$, $((i+j)+k)$ are correct parenthesis but $(i)+j+k$ is not. I take a complete short example as follows.

for example if we have expression: $i+j-k$ there are $6$ possible (valid = value respect to original expression not changed) way that keep two condition given in question:

$i+j-k$

$(i+j)-k$

$(i+j-k)$

$((i+j)-k)$

$i+(j-k)$

$(i+(j-k))$

The answer for this question is not general and related to given expression.

Main Question:

expression: $ g-h*i+j-k/l/m$

Answer (according to my note): $96$

my challenge is how we get the point for the result? i.e: how this number calculated?

答:
I'm certain that the answer is $96$, but I'm not certain that the argument I will give will be considered fully complete.  First, let's look at the expression tree for the formula:

I apologize for the quality of the drawing; I don't have software to produce a neat picture easily, and I'm hopeless at drawing.  I have numbered the operations for later reference.  We can ignore them for now.

There are $6$ operations in the and we can parenthesize any of them that we like.  This gives $2^6=64$ possible parenthesizations.  Clearly all of them give equivalent expressions, because they don't change the expression tree.  When we parenthesize a particular operation, we say, in effect, "Consider the subtree rooted at this operation a unit."  But that subtree already is a considered as a unit.  The parentheses change nothing.

Please note that this considers the case of no parentheses as a valid answer, in contrast to one of your comments, but not to your little example.

Any parenthesization that resulted in an inequivalent formula would have a different expression tree, so if there were only one possible tree for the expression we would be done.  There is, however one other tree:

I've kept the labels on the operations the same as in the first tree, for ease of comparison.

We want to know if there are any ways to produce a parenthesization from the second tree that we didn't already produce from the first.  Comparing the two trees, we see that the subtrees rooted at operations, $2,\  4,\ 5$ and $6$ are identical in both trees, so any disparity must come from operation $1$ or $3$.  Parenthesizing operation $3$ in the second tree just introduces a a pair of parentheses around the whole expression, so it can't introduce a disparity that wasn't already there, and we are left with operation $1$.

Here we finally have a disparity.  Parenthesizing operation $1$ in the second tree gives the subexpression $$(g-h*i+j)$$ and there is clearly no way of producing this subexpression in tree $1$ because there is no subtree whose leaves are exactly $g,\ h,\ i$ and $j$.  Thus, and new parenthesization must parenthesize operation $1$.  We can parenthesize the other $5$ operations or not, as we will.  This gives the additional $2^5=32$ other parenthesizations.

The part of this argument that you, or your teacher may find incomplete is the assertion that there are only two possible expression trees.  This seems obvious to me, but you can supply a proof, if you want.  I would start by arguing that only operations $1$ and $3$ are possible at the root, and then for each case, argue that the rest of the tree is completely determined once the root is.

EDIT

Here is a proof that the two trees shown are the only possible ones.

Before we can do the last subtraction, we must have computed $k/l/m$, so neither operation $5$ nor $6$ can be at the root.  Before we can do first subtraction, we must have computed $h*i$, so operation $4$ cannot be at the root.  If operation $2$ were at the root, we would have $$g-[h*i+j-k/l/m),$$ which isn't equivalent because the signs change on the last two terms.  Thus, only operation $1$ or $3$ can be at the root.

If operation $1$ is at the root, we have $$[g-h*i]+[j-k/l/m]$$  On the left subtree, we've already seen that operation $2$ must come after operation $4$. On the right subtree, we've seen that operation $3$ must be the last one.  By convention, division associates from the left, so operation $5$ must come after operation $6$, and the right subtree is determined.

If operation $3$ is at the root, we have $$[g-h*i+j]-[k/l/m]$$  Since the order of operation in $k/l/m$ is fixed, the right subtree is determined.  On the left subtree, we know that operation $4$ cannot be at the root.  If operation $2$ were at the root, we would have $$[g]-[h*i+j],$$ and the sign on $j$ would change, so operation $1$ is at the root and the left subtree is $$[g-h*i]+[j]$$.  The right subtree is just a leaf.  On the left subtree, as we have seen before, operation $2$ must be the root.  These remarks show that the tree is determined.

In summary, the two pictured trees are the only expression trees possible.


问:
What is the expected value of sequence $\{0, 1, 0, 1, 0, 1, ...\}$ or $\{1, 0, 1, 0, 1, 0, ...\}?$
I guess it is $\frac12$ as $P(0) = P(1) = 0.5$. While I was told it is $\frac13$. How to solve this type of problem?

Thank you.

Edit by advices:

$f(n) = \left\{\begin{aligned}{0, \text{n is odd natural number}\\1, \text{n is even natural number or 0}} \end{aligned}\right.$

What is the E[f(n)]?

答:
The expected value is the value of that term!
$$\lambda + \mu \text{ mod }2 $$ where $$\lambda = \left\{\begin{aligned}{0, \text{first sequence}\\1, \text{second sequence}} \end{aligned}\right. $$
$$\mu = \left\{\begin{aligned}{0, \text{odd term}\\1, \text{even term}} \end{aligned}\right. $$

Now, if you have either sequence, and stop it at some "random stopping point" the expected value is $1/2$.  Or, if you pick the sequence at random and stop it at $n$, the expected value is $1/2$.  Or, if you pick both the sequence and the stopping point at random, the expected value is $1/2$.


问:
Domain and Range with functions in brackets
For the function

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

Would it be sufficient to write the domain as

$(x-1)^2 + (y-2)^2 ≤ 1$

or is that too vague? Then, the range would be $z ≥ 0$ but how could that be expressed in terms of $x$ if the value has to be greater than or equal to $1$?

答:
Your idea is pretty fine, but be careful about the direction of the inequality. If you have $\sqrt{z}$, then you want $z \ge 0$, not $z \le 0$. Since $f : \Bbb R^2 \to \Bbb R$, you could write the domain by

$$\mathrm{dom}(f) = \left\{ (x,y) \in \Bbb R^2 \; \middle| (x-1)^2 + (y-2)^2 \ge 1 \right\}$$

as a result. The range of $f$ could simply be given by $\Bbb R_{\ge 0}$ if you want a symbol for it. You just want the points it is possible for $f$ to map to, regardless of the constraints that need be placed on $x,y$ in order for that to happen.

For instance, you could have $x=y-1$. Then the radicand is given by

$$(x-1)^2 + (y-2)^2 - 1 \longrightarrow 2(y-2)^2 - 1$$

Clearly the function $g(y) = \sqrt{2(y-2)^2 - 1}$, for wherever $y$ ensures $g(y)$ is defined, has range $\Bbb R_{\ge 0}$.


答: For $x^{n-1}$: $x$ raised to the difference of $n$ and $1$. And for $x^n-1$: The difference of $x$, raised to $n$, and $1$.

Title: How to read $x^n-1$ and $x^{n-1}$?


问:
Preserving structures
Category theory abstracts the notion of the preservation of structure by means of morphisms. Is there a description of what it means to preserve structure of different types of mathematical structures (topological spaces, modules, rings, etc.)? </p>

答:
A map between structured sets preserves structure when it preserves true statements about the elements of the sets (not about the sets themselves). A decision about what kind of structure to preserve is a decision about what kind of true statements you care about. For example, group homomorphisms preserve true statements involving the group operations, e.g. $g^3 = h^2$ (for $g, h$ elements of some group), ring homomorphisms preserve true statements involving the ring operations, e.g. $a^2 + b^3 = c^4$ (for $a, b, c$ elements of some ring), and so forth.

The case of topological spaces is more interesting. Here the true statements being preserved are essentially statements about limits. More formally, using the Kuratowski closure axioms you can think of a continuous function as a function that preserves true statements of the form "point $x$ is contained in the closure of subset $S$."

Title: Preserving structures


问:
If singularity points are dense in some circle, does the circle necessarily natural boundary?

$\sum\limits^{\infty}_{k=0}z^{2^k}=z+z^2+z^4+z^8+\dots$  has radius of
convergence $1$. Yet as $z\to z_0$, where $z_0$ is any $2^n$th root of
unity, all the terms of the power series past $z^{2^n}$ approach $1$,
so that $f(z)\to \infty$. Hence $f$ is singular at every $2^n$th root
of unity, $n\geq 1$. Since these are dense on the unit circle, that
circle is a natural boundary for the power series.

Can you explain the last sentence? I understand that the points consisting of every $2^n$th root of unity where $n$ is an arbitrary $\mathbb{N}$ is dense in circle but natural boundary demands that they are ALL points on the circle, which is obviously not true.

答:
Your definition of natural boundary is incorrect. It is a natural boundary since one cannot analytically continue $f$ beyond the unit circle. This is easy to see, pick any point outside the unit circle and any neighborhood around that point which intersects the unit disk. Then that neighborhood contains a singularity by density.

See, for instance, this link.


问:
When a number $N$ is expressible as a sum of two squares in EXACTLY three ways
Does there exist an $N$ such that $$N=x_1^2+y_1^2=x_2^2+y_2^2=x_3^2+y_3^2\neq x_4^2+y_4^2\qquad \land \qquad \begin{cases}\gcd(x_1,y_1)&=1 \\\gcd(x_2,y_2)&=1\\\gcd(x_3,y_3)&=1  \end{cases}$$
???

If such a number $N$ is expressible as a sum of two squares in exactly $3$ and only $3$ ways, is it guaranteed that the second condition above FAILs to be satisfied?

My way of deriving such numbers $N$:

$$\text{if}\quad N=\prod_{i=1}^k\underbrace{p_i^{\alpha_i}}_{{\text{all} \quad 1 \pmod 4\quad \text{primes}}}\qquad \text{then} \qquad r(N)=\frac 1 2 \prod_{i=1}^k(\alpha_i+1)$$
with $r(x)$ being the function which is valued by the number of ways a natural number $x$ is expressible as a sum of two squares in distinct ways (without respect to order, or negatives, also not including $0$).  For only three ways to express $N$, I chose $k=2$ and let the $\alpha_i$ be $1$ and $2$ only.

Examples,
$$\begin{aligned}325&=5^2\cdot 13 &&\to r(325)=3\\ &=1^2+18^2=6^2+17^2=\boxed{10^2+15^2}\\425&=5^2\cdot 17 &&\to r(425)=3 \\&=\boxed{5^2+20^2}=8^2+19^2=13^2+16^2 \\845&=5 \cdot 13^2&&\to r(825)=3 \\&=2^2+29^2=\boxed{13^2+26^2}=19^2+22^2\end{aligned}$$

The below is my first try at a parameterization for the case where $r(N)=3$.

$$\begin{aligned}N&=\left[\frac{(r^2-q^2)u-(2qr)v}{r^2+q^2}\right]^2+\left[\frac{(2qr)u+(r^2-q^2)v}{r^2+q^2}\right]^2\\&=\left[u\right]^2+\left[v\right]^2\\&=\left[\frac{(b^2-c^2)u+(2bc)v}{b^2+c^2}\right]^2+\left[\frac{(2bc)u-(b^2-c^2)v}{b^2+c^2}\right]^2\end{aligned}$$

Derivation, in case of interest:

 $\begin{cases}x_1&=pq+rs \\ y_1&=pr-qs \\ x_2&= pq-rs &&=ab+cd&&&=u \\   y_2&=pr+qs&&= ac-bd&&&=v\\ x_3  & &&=ab-cd \\  y_3& &&=ac+bd \end{cases} \iff \begin{cases}ab+cd-pq+rs&=0 \\ ac-bd-pr-qs&=0\end{cases}$
  $\iff \left[\begin{array}{llll}b&c&-q&r \\ c&-b&-r&-q\end{array}\right]\cdot \left[\begin{array}{l}a \\ d \\ p \\ s\end{array}\right]=\overrightarrow{0}\implies\left[\begin{array}{llll}b&c&-q&r \\ c&-b&-r&-q\end{array}\right]\sim \left[\begin{array}{llll}1 & 0 & -\frac{bq+cr}{b^2+c^2} & \frac{br-cq}{b^2+c^2} \\ 0&1&\frac{br-cq}{b^2+c^2}&\frac{bq+cr}{b^2+c^2}\end{array}\right]\implies$
$a=\left(\frac{bq+cr}{b^2+c^2}\right)p+\left(\frac{cq-br}{b^2+c^2}\right)s=\frac{b(pq-rs)+c(pr+qs)}{b^2+c^2}=\frac{bu+cv}{b^2+c^2}$
  $d=\left(\frac{cq-br}{b^2+c^2}\right)p-\left(\frac{bq+cr}{b^2+c^2}\right)s=\frac{-b(pr+qs)+c(pq-rs)}{b^2+c^2}=\frac{cu-bv}{b^2+c^2} \implies$
  $x_3=ab-cd=\frac{1}{b^2+c^2}\left[b(bu+cv)-c(cu-bv)\right]=\frac{(b^2-c^2)u+(2bc)v}{b^2+c^2}\sim y_3=\frac{(2bc)u-(b^2-c^2)v}{b^2+c^2}$
  $\begin{cases}u&=pq-rs \\ v&=pr+qs\end{cases}\implies \begin{cases}p&=-\frac{qu+rv}{r^2+q^2}\\s&=\frac{ru-qv}{r^2+q^2}\end{cases}$
  $\implies x_1=\frac{(r^2-q^2)u-(2qr)v}{r^2+q^2},\qquad  y_1=\frac{(2qr)u+(r^2-q^2)v}{r^2+q^2}$

答:
If $N=p^2q$ where $p\ne q$ are both primes congruent $1\bmod4$, then there exist unique $a,b$ with $p=a^2+b^2$, $a>b>0$, and $c,d$ with $q=c^2+d^2$, $c>d>0$. Then $p^2=(a^2-b^2)^2+(2ab)^2$, and $$\begin{aligned}N&=\left[(a^2-b^2)c+(2ab)d\right]^2+\left[(a^2-b^2)d-(2ab)c\right]^2\\&=\left[(a^2-b^2)d+(2ab)c\right]^2+\left[(a^2-b^2)c-(2ab)d\right]^2\\&=(pc)^2+(pd)^2\end{aligned}$$

Note that $2N$ has the same number of representations as $N$.

Also, if $p$ is a prime congruent $1\bmod4$, then $p^4$ has three representations, e.g., $5^4=625=25^2+0^2=24^2+7^2=20^2+15^2$.

EDIT: Let's look at this over the Gaussian integers, ${\bf G}=\{\,a+bi\mid a,b{\rm\ in\ }{\bf Z}\,\}$. Here are some facts we will use without proof. Proofs can be found all over the web, or in many intro Number Theory and Algebraic Number Theory texts.

$\bf G$ is an integral domain.

The units in $\bf G$ are $\{\,\pm1,\pm i\,\}$. Two elements are called associates if their quotient is a unit. The conjugate of $a+bi$ is $a-bi$. The conjugate of $z$ is denoted $\overline z$.

The primes in $\bf G$ are $1+i$, $a\pm bi$ where $a^2+b^2$ is a $1\bmod4$ prime, each $3\bmod4$ prime, and all their associates.

$\bf G$ is a unique factorization domain. In particular, every $1\bmod4$ prime $p$ has a unique factorization (up to associates) $p=(a+bi)(a-bi)$ where $a^2+b^2=p$.

Now, every expression of $N=r^2+s^2$ as a sum of two squares corresponds to a factorization of $N=(r+si)(r-si)$ as a product of a Gaussian integer and its conjugate. In particular, if $N=p^2q$ where $p=a^2+b^2$ and $q=c^2+d^2$ are distinct $1\bmod4$ primes, then $$N=(a+bi)^2(a-bi)^2(c+di)(c-di)$$ and there are three ways to write this as a product of a Gaussian integer and its conjugate:

$N=[(a+bi)^2(c+di)]\ [(a-bi)^2(c-di)]$

$N=[(a+bi)^2(c-di)]\ [(a-bi)^2(c+di)]$

$N=[(a+bi)(a-bi)(c+di)]\ [(a+bi)(a-bi)(c-di)]$

Multiplying everything out, this gives $N=e\overline e$ where $e$ takes on the values

$(a^2-b^2)c-2abd+((a^2-b^2)d+2abc)i$,

$(a^2-b^2)c+2abd+(-(a^2-b^2)d+2abc)i$,

$pc+pdi$.

And that gives our three ways to write $N$ as a sum of two squares.

It's clear that the representation coming from the third option, $N=(pc)^2+(pd)^2$, involves numbers that are not relatively prime.


问:
Criteria for Conservative field
I am proving a result of vector analysis here it is.

A vector field $F$ is continuous in a Domain $D$ is conservative $\iff$ the line integral of tangential component of $F$ along every regular curve in $D$ depends only on the end points of the curve. Moreover the line integral is simply the difference in potential of the end points

The definition I am using for Conservative field is :-

A vector field $F$ is said to be conservative if there exist a scalar field $\phi$ defined in the domain $D$ such that $F=$$\nabla$$\phi$

I know we have to use concepts of path connected and simply connected but I don't know where to start exactly .
Hints or solution is really appreciated.

答:
The implication $\implies$ is trivial because of the definition of line integrals, chain rule and the usual single variable fundamental theorem of calculus. Explicitly, if $F=\nabla \phi$ for some $C^1$ function $\phi:D\to \Bbb{R}$, then for any (piecewise) $C^1$ path $\gamma:[a,b]\to D$, we have
\begin{align}
\int_{\gamma}F\cdot dl &= \int_{\gamma}\nabla \phi \cdot dl \tag{by assumption}\\
&:= \int_a^b (\nabla\phi)(\gamma(t))\cdot \gamma'(t)\, dt\tag{by definition}\\
&= \int_{a}^b(\phi\circ \gamma)'(t)\, dt\tag{chain rule}\\
&= \phi(\gamma(b)) - \phi(\gamma(a)),\tag{FTC}
\end{align}
which as you can see depends only on the potential function $\phi$ and the endpoints of the path $\gamma$.

For the converse $\impliedby$, we suppose $D$ is a connected open set, and fix a point $a=(a_1,\dots, a_n)\in D$. We define the function $\phi:D\to \Bbb{R}$ as follows: take any other point $x\in D$. Since $D$ is a connected open set, it is in fact path connected, and given any two points we can even take find a $C^{\infty}$ path joining the two points. So, let's fix a piecewise $C^1$ path $\gamma_{a,x}$ starting at $a$ and ending at $x$ (i.e $\gamma_{a,x}:[0,1]\to D$ is smooth and $\gamma_{a,x}(0)=a$ and $\gamma_{a,x}(1)=x$). Now, we define $\phi(x):=\int_{\gamma_{a,x}}F\cdot dl$. In words, the value of $\phi$ at $x$ is obtained by integrating the continuous $F$ along a particular path $\gamma_{a,x}$.

Now, by our assumption on $F$, the value $\phi(x)$ DOES NOT depend on the path $\gamma$, since it only cares about the endpoints of the path (in our case $a$ and $x$); so if we had taken a different path $\sigma_{a,x}$ then $\int_{\gamma_{a,x}}F\cdot dl=\int_{\sigma_{a,x}}F\cdot dl$. This means $\phi$ is a well-defined function (each input $x\in D$ has a uniquely determined output $\phi(x)\in\Bbb{R}$). Now, all that remains is showing $\nabla \phi$ exists and equals $F$. Let us write $F=\sum_{i=1}^n F_i e_i$, i.e the components are $F=(F_1,\dots, F_n)$. Take any point $x=(x_1,\dots, x_n)\in D$, and let $h\in \Bbb{R}$ be a small non-zero quantity, small enough so that the point $(x_1,\dots, x_{i-1}, x_i+h, x_{i+1}, \dots, x_n)$ also lies in $D$ (i.e we're looking at the point $x$ and choosing $h\in \Bbb{R}$ so small that $x+he_i\in D$ as well); of course this is possible because $D$ is open.

Let us now examine the difference quotient
\begin{align}
\dfrac{\phi(x+he_i) - \phi(x)}{h}.
\end{align}
How do we calculate this? Well recall definitions. $\phi(x)$ is calculated by first choosing a piecewise $C^1$ curve $\gamma_{a,x}$ from $a$ to $x$, then $\phi(x)=\int_{\gamma_{a,x}}F\cdot dl$. How is $\phi(x+he_i)$ calculated? We have to choose a path joining $a$ to $x+he_i$ and integrate $F$. But now, because we have the freedom to do so, let us simplify our life and choose the very simple path $\gamma_{a,x+he_1} `='\gamma_{a,x}\cup \sigma$; what I mean is we first traverse from $a$ to $x$ along $\gamma_{a,x}$, then we traverse from $x$ to $x+he_i$ using the straight line path $\sigma$ (i.e $\sigma:[0,1]\to D$ defined by $\sigma(t)= x + the_i$, then $\sigma(0)=x$ and $\sigma(1)=x+he_i$ are the correct endpoints) to get
\begin{align}
\dfrac{\phi(x+he_i) - \phi(x)}{h} &=\dfrac{1}{h}\left(\int_{\gamma_{a,x}\cup \sigma}F\cdot dl - \int_{\gamma_{a,x}}F\cdot dl\right)\\
&= \dfrac{1}{h}\int_{\sigma}F\cdot dl =
\dfrac{1}{h}\int_0^1 F(\sigma(t))\cdot \sigma'(t)\, dt
\end{align}
Well, $F(\sigma(t)) = F(x+the_i)$, and $\sigma'(t) = he_i$, so their dot product is $ F_i(x+the_i) h$, i.e we take the $i^{th}$ component of $F$. Continuing,
\begin{align}
\dfrac{\phi(x+he_i) - \phi(x)}{h} &=
\dfrac{1}{h}\int_0^1F_i(x+the_i)h\, dt =\int_0^1F_i(x+the_i)\, dt.
\end{align}
As $h\to 0$, continuity of $F_i$ implies that the right limit is $F_i(x)$ (this is pretty much what the fundamental theorem of calculus (1) says, but if you want I can elaborate more). In other words, this computation shows that $(\partial_i\phi)(x)$ exists and equals $F_i(x)$. Since this is true for all $i\in\{1,\dots, n\}$ and all $x\in D$, this says precisely that $\nabla \phi=F$, hence the proof is complete.

Title: Criteria for Conservative field


问:
Find all lines on cubic surface
Problem: Find the singular point of the cubic surface

$$ZX^2 - Y^3 + TZ^2 = 0.$$

And also determine all the lines on the surface.

My attempt: I calculated the singular point by setting the partial derivatives to $0$ and I got $P = (0 : a : 0 : b)$ where $a, b$ are not both zero. Did I get this right?

About calculating the lines, I have no idea where to start. Is there perhaps some sort of technique/method/proposition for doing this? Can someone perhaps show me as an answer how to do this for this problem since I have two more of this type to do and then I can practice on those other two.

As a side question: Is there perhaps some criterion of determining the amount of total lines on the surface?

Note: We are in $\mathbb{P}^{3}$ over an algebraically closed field which does not have characteristic $2$.

答:
Here is a direct way of showing the cubic surface $S=\{ZX^2-Y^3+Z^2T=0\}$ with an $E_6$-sigularity contains a single line.

Suppose there is another line $L$ in $S$ and is different from the line $\{Y=Z=0\}$ through the singularity, then $L$ must contain a point $p$ of the form $$p=(x_0,y_0,1,t_0),$$

and $L$ lies in the tangent hyperplane $T_pS$. The condition $p\in S$ requires that $t_0=y_0^3-x_0^2$, so $T_pS$ has equation

$$2x_0X-3y_0^2Y+(2y_0^3-x_0^2)Z+T=0.$$

The intersection $C=T_pS\cap S$ is a cubic plane curve and $C$ contains $L$ as an irreducible component, therefore $C$ is reducible. However, by isolating $T$ in the linear equation and cancelling $T$ in the cubic surface equation, one finds the equation of $C$ is
$$ZX^2-Y^3-Z^2[2x_0X-3y_0^2Y+(2y_0^3-x_0^2)Z]$$

in the projective plane with coordinate $X,Y,Z$. Of course, $C$ is singular at $p=(x_0,y_0,1)$ since it is tangency point. However, a direct computation of partial derivatives shows that $p$ is the only singularity of $C$ and it is an ordinary double point if $y_0\neq 0$, is an ordinary cusp if $y_0=0$. Therefore $C$ is irreducible, which is a contradiction.

Title: Find all lines on cubic surface


问:
how to build a formula for calculation / coefficient(s) for set of descending numbers
I have been years away from my math class. Now I would like to figure out the following.

I am writing a simple javascript program where some tabular data is output to PDF file.
The program will automatically decide if to output the data in portrait or landscape layout.

User will have the ability to choose size of the font.
Based on the size of the font and the number of characters in the widest tabular data row,
the program will calculate whether portrait of landscape layout to apply.

I checked how many characters can be output per line under a specific font.
Here is the result:

Font size
Characters
Ratio
Ratio calc
Notes

4
200
50.0
(200 / 4)

6
130
21.7
(130 / 6)

8
100
12.5
(100 / 8)

10
80
8.0
(80 / 10)

12
65
5.4
(65 / 12)

14
56
4.0
(56 / 14)

16
50
3.1
(50 / 16)

18
43
2.4
(43 / 18)

20
38
1.9
(38 / 20)

22
35
1.6
(35 / 22)

24
32
1.3
(32 / 24)

26
30
1.2
(30 / 26)

28
28
1.0
(28 / 28)

etc
etc
etc

We can see the quantity of characters is lower with increased size of the font.
But the ratio is not symmetrical. I can simply create a table for this where the program would lookup the result,but it would be more efficient to have a simple formula that would calculate the result.

For example, if user supplies font size 10, the formula calculates the answer of close to: 80.
If the user chooses font size 26, the formula calculates the answer of around: 30.

What would be a mathematical approach to the calculation / formula / coefficients for this?
(If possible, please try to present the answer in terms of JavaScript Math() functions or similar - but not necessary).

答:
Thanks to @Raymond Chen here is the logic for his answer in which he turned my thinking 180 degrees around.

Font size
Characters
Product
Product calc
Notes

4
200
800.0
(4 x 200)

6
130
780.0
(6 x 130)

8
100
800.0
(8 x 100)

10
80
800.0
(10 x 80)

12
65
780.0
(12 x 65)

14
56
784.0
(14 x 56)

16
50
800.0
(16 x 50)

18
43
774.0
(18 x 43)

20
38
760.0
(20 x 38)

22
35
770.0
(22 x 35)

24
32
768.0
(24 x 32)

26
30
780.0
(26 x 30)

28
28
784.0
(28 x 28)

etc
etc
etc
etc

The product of the multiplications shows as the target size of a line - around 800. Now we can simply apply coefficient 800 and divide it by the font size and get the approximate number of characters. Good thinking @Raymond Chen.


问:
Closed form for $\int_0^\infty\frac{\log\left(1+\frac{\pi^2}{4\,x}\right)}{e^{\sqrt{x}}-1}\mathrm dx$
I encountered this integral in my calculations:

$$\int_0^\infty\frac{\log\left(1+\frac{\pi^2}{4\,x}\right)}{e^{\sqrt{x}}-1}\mathrm dx=2\int_0^\infty\frac{x\log\left(1+\frac{\pi^2}{4\,x^2}\right)}{e^x-1}\mathrm dx=6.041880938342236884944983747836284...,$$

but could not find a closed-form representation for it. I tried to replace a constant factor $\frac{\pi^2}4$ with a parameter and take a derivative, that made the integral look simpler, but I still was not successful in solving it.

I also tried to find possible closed forms using Inverse Symbolic Calculator and WolframAlpha but they did not find anything.

Could you please help me to find a closed form (even using non-elementary special functions), if it exists?

答:
A closed form indeed exists for this integral:
$$\int_0^\infty\frac{\log\left(1+\frac{\pi^2}{4\,x}\right)}{e^{\sqrt{x}}-1}\mathrm dx=\pi^2\left(\log\frac{\pi\,A^9\sqrt{2}}{\Gamma(\frac{1}{4})^2}-\frac{9}{8}\right)+2\,\pi\,C,$$
where $A$ is the Glaisher-Kinkelin constant and $C$ is the Catalan constant.

A more general result:
$$\int_0^\infty\frac{\log\left(1+\frac{a}{x}\right)}{e^{\sqrt{x}}-1}\mathrm dx=8\,\pi^2\psi^{(-2)}\left(\frac{\sqrt{a}}{2\pi}\right)-\frac{a}2\left(1+\log\frac{4\pi^2}{a}\right)-2\pi\sqrt{a}\left(1+2\log\Gamma\left(\frac{\sqrt{a}}{2\pi}\right)\right),$$
where $\psi^{(-2)}(z)$ is the generalized polygamma function.

The proof is based on Binet's second formula, but I still need to sort out some details.


问:
Is there a way to find expected value of equation?

If the random variable $X$ is binomially distributed with parameters $n=6$ and $p=0.3$, what is $$E(4+3X^2)$$

I know $E(X) = np = 1.8$. I solved this problem by finding $P(X)$ of all $X$ using $(^6_x)(0.3)^x(0.7)^{6-x}$ and then apply them with $4+3X^2$ to solve for $E(4+3X^2)$. But this takes too long and I think there should be a formula or another way to solve this.

Can anyone tell help me out with this? Thank you in advance!

答: Another way of solving this is you compute second derivative of MGF and put $t=0$.


Title: how to build a formula for calculation / coefficient(s) for set of descending numbers

Body:
I have been years away from my math class. Now I would like to figure out the following.

I am writing a simple javascript program where some tabular data is output to PDF file.
The program will automatically decide if to output the data in portrait or landscape layout.

User will have the ability to choose size of the font.
Based on the size of the font and the number of characters in the widest tabular data row,
the program will calculate whether portrait of landscape layout to apply.

I checked how many characters can be output per line under a specific font.
Here is the result:

Font size
Characters
Ratio
Ratio calc
Notes

4
200
50.0
(200 / 4)

6
130
21.7
(130 / 6)

8
100
12.5
(100 / 8)

10
80
8.0
(80 / 10)

12
65
5.4
(65 / 12)

14
56
4.0
(56 / 14)

16
50
3.1
(50 / 16)

18
43
2.4
(43 / 18)

20
38
1.9
(38 / 20)

22
35
1.6
(35 / 22)

24
32
1.3
(32 / 24)

26
30
1.2
(30 / 26)

28
28
1.0
(28 / 28)

etc
etc
etc

We can see the quantity of characters is lower with increased size of the font.
But the ratio is not symmetrical. I can simply create a table for this where the program would lookup the result,but it would be more efficient to have a simple formula that would calculate the result.

For example, if user supplies font size 10, the formula calculates the answer of close to: 80.
If the user chooses font size 26, the formula calculates the answer of around: 30.

What would be a mathematical approach to the calculation / formula / coefficients for this?
(If possible, please try to present the answer in terms of JavaScript Math() functions or similar - but not necessary).

Body:
You can make it a bit better using a constant equal to $792.2$ corresponding to $\sigma=3.6$.
$$\left(
\begin{array}{cccc}
x & y & y_{800} & y_{792.2} \\
 4 & 200 & 200 & 198 \\
 6 & 130 & 133 & 132 \\
 8 & 100 & 100 & 99 \\
 10 & 80 & 80 & 79 \\
 12 & 65 & 67 & 66 \\
 14 & 56 & 57 & 57 \\
 16 & 50 & 50 & 50 \\
 18 & 43 & 44 & 44 \\
 20 & 38 & 40 & 40 \\
 22 & 35 & 36 & 36 \\
 24 & 32 & 33 & 33 \\
 26 & 30 & 31 & 30 \\
 28 & 28 & 29 & 28
\end{array}
\right)$$


问:
Playing chess until one party wins or ties 5 times
Players $A$ and $B$ decide to play chess until one of them wins or ties $5$ times in a row.

Assume games are independent, where $A$ wins with probability $P(A) = 0.3$, $B$ wins with probability $P(B) = 0.25$, and they draw if $P(D) = 0.45$ on each game.

If the game ends in a draw another game will be played until they tie 5 times. Find the probability $A$ wins before $B$.

答:
The chance they tie the first five games in a row is $0.45^5$.  If they do, they quit and neither A nor B wins a game.  If they do not tie the first five, A will win the first decided game with probability $\frac {0.3}{0.3+0.25}=\frac 6{11}$.  The probability A wins without B having won (so it is clear that we accept cases where A wins and B never does) is $\frac 6{11}\left(1-0.45^5\right)$.  Similarly, the probability B wins without A having won is $\frac 5{11}\left(1-0.45^5\right)$

"Find the probability A wins before B" could also require that they both win at least one game but I don't read it that way.


问:
What is the issue with random variable Z?
When opening a container of $32$ toy ballet dancers performing pirouettes, let random variable $X$ denote the number of broken dancers,
and let random variable $Y$ denote the number of whole (unbroken) dancers.
Write random variable $Z = X/Y$ , i.e., $Z$ is the ratio of broken dancers to whole dancers.
What complication arises in this definition of $Z$ as a random variable?

So my work: X and Y are clearly discrete random variables with $X \in \{0,1,2,...,32\}$ and  $Y \in \{0,1,2,...,32\} $

But wouldn't $Z$ be just another discrete random variable? with $Z \in \{0, 1/31, 2/30,..., 1\}$?

With no issue?

My question is What's the Issue with $Z$? I'm not seeing it. Can someone help me see the issue?

Thank You!

答:
The issue arises for when $Y=0$, since $X/Y$ becomes undefined there.

Of course, as you have seen, there is a natural way to maintain things by defining $Z$ through $X/Y$ for $Y \ne 0$, and then adding in the $1$ afterwards to handle the skipped case. For instance, take

$$Z \in \left\{ \frac{32-y}{y} \; \middle| \; y \in Y \setminus \{0\} \right\} \cup \{1\}$$

But if we very literally define $Z$ as all of the fractions $X/Y$, then we have a problem. A little subtle, but a problem nonetheless.

Mostly reposting what I did in the comments with a little elaboration, for the sake of giving this question a "proper" answer and keeping it out of the unanswered queue on the site.


问:
Approximation of product of numbers close to 1
In one of the papers I came across to the approximation below:

$$\prod_{k=1}^K (1-x_k) \approx 1 - \sum_{k=1}^K x_k,$$

where $x_k$s are very small positive numbers.

I am aware that by the binomial approximation, we can write that

$$(1-x)^K \approx 1-Kx$$

, where $|x|<1$. I assume that these two approximations are related to each other but I am not able to solid connection between them.

Can you explain how to calculate the first approximation and when it is valid?

Body:
Use it for $K=3$
$$\prod_{k=1}^3 (1-x_k)=1- (x_1+x_2+x_3)+(x_1x_2+x_1x_3+x_2x_3)-x_1x_2x_3$$

You could do it in another way

$$P_K=\prod_{k=1}^K (1-x_k)\implies \log(P_K)=\sum_{k=1}^K \log(1-x_k)$$ Now, by Taylor
$$\log(1-x_k)=-x_k-\frac{x_k^2}{2}+O\left(x_k^3\right)$$
$$\log(P_K)=-\sum_{k=1}^K x_k-\frac 12\sum_{k=1}^K x^2_k$$
$$P_k=e^{\log(P_K)}=1-\sum_{k=1}^K x_k-\cdots$$


问:
What is $2 - 1 + 1$?
$2-1+1$; a fairly straightforward question, but I (well, not me, but Henry Reich) found something strange.

Most people would evaluate it as $2+(-1)+1 = 2$; however, this goes against the famed, and fairly standard B.E.D.M.A.S./P.E.D.M.A.S., which states that addition goes first, and then subtraction.

If this is the case, then the answer is $2 - (1 + 1) = 2-2 =0$.

Which is the correct answer, and why is the conventional way (B.E.D.M.A.S./P.E.D.M.A.S.) so ambiguous?

答:
If you're taking the minus sign out:

2 - (1-1) = 2.

I think you're misunderstanding BEDMAS. You can always make it all addition if you'd like?

2 + (-1) + 1 = 2.

Title: What is $2 - 1 + 1$?


问:
A stronger theorem than Gershgorin theorem

Let $A=(a_{ij})$ be a symmetric matrix in $\Bbb R^{n\times n}$, then for any $1\le i\le n$, there is an eigenvalue $\lambda_i$ such that $|a_{ii}-\lambda_i|^2\le \sum_{j\neq i}a_{ij}^2$.

I've being trying many ways to solve this problem, including induction, similar way like Gershgorin's theorem, but I failed.

答: Here is my solution using the canonical form for symmetry matrices. We prove by contradiction. Suppose there is an $i$ such that the $>$ inequalities hold for each eigenvalue. Let $Q^TAQ=D$ which is a diagonal matrix and $Q$ is orthogonal. Then for any $||x||=1$ we have $((D-a_{ii}I)x,(D-a_{ii}I)x)>\sum_{j\neq i}a_{ij}^2$. Using the canonical form above we have $((A-a_{ii}I)x,(A-a_{ii}I)x) >\sum_{j\neq i}a_{ij}^2$. Letting $x = e_i$ leads to the contradiction.


答:
Let $0<x_k<<1$, then $(1-x^2_k)<1 \implies 1-x_k <\frac{1}{1+x_k}$
Use Weirstrass Inequality:
$$\prod_{1}^{n} (1-x_k) \ge 1+\sum_{k=1}^{n} x_k=1+S_n$$
$$\implies \prod_{1}^{n} (1-x_k) \le \frac{1}{1+S_n} \approx 1-S_n$$
lastlt we have isede Binomial approximation provided $S_n<1.$

Title: Approximation of product of numbers close to 1

Body:
In one of the papers I came across to the approximation below:

$$\prod_{k=1}^K (1-x_k) \approx 1 - \sum_{k=1}^K x_k,$$

where $x_k$s are very small positive numbers.

I am aware that by the binomial approximation, we can write that

$$(1-x)^K \approx 1-Kx$$

, where $|x|<1$. I assume that these two approximations are related to each other but I am not able to solid connection between them.

Can you explain how to calculate the first approximation and when it is valid?


答:
This is a reverse-engineered response that finds a way of interpreting the problem by adding a plausible but omitted fact.

Expected value of $\{0, 1, 0, 1, 0, 1, \cdots \} =$ ?

Unfounded Assumption

The chance of selecting the $k$-th element in the sequence is $2^{(-k)}.$

Then, the expected value is

$$\sum_{k=1}^n 4^{(-k)} = \frac{(1/4)}{1 - [(1/4)]} = \frac{1}{3}.$$

Title: What is the expected value of sequence $\{0, 1, 0, 1, 0, 1, ...\}$ or $\{1, 0, 1, 0, 1, 0, ...\}?$

Body:
I guess it is $\frac12$ as $P(0) = P(1) = 0.5$. While I was told it is $\frac13$. How to solve this type of problem?

Thank you.

Edit by advices:

$f(n) = \left\{\begin{aligned}{0, \text{n is odd natural number}\\1, \text{n is even natural number or 0}} \end{aligned}\right.$

What is the E[f(n)]?


问:
Poisson times Binomial distributions
If I have two random variables: N follows Poisson distribution with mean as $\lambda$, and X follows binomial distribution with success rate of p, the output of N is the number of trials for X, according to this link A binomial multiplied by a poisson, XN should follow Poisson distribution with mean $p\lambda$

However, I was reading "Probability for Statistics and Machine Learning" for DasGupta and I found this example

I do not know how those two cases differ, but I think I am missing a fundamental point.

答:
A hierarchical model is not the same as the product of two random variables.

Here is a simple example of a product:  Let $$\Pr[X = x] = \theta^x (1-\theta)^{1-x}, \quad x \in \{0,1\}, \\ \Pr[Y = y] = p(1-p)^{y-1}, \quad y \in \{1, 2, 3, \ldots\}.$$

So $X$ is Bernoulli with parameter $\theta$ and $Y$ is geometric with parameter $p$.  Now $XY$ is a new random variable:  clearly, $$\Pr[XY = 0] = \Pr[X = 0] = 1 - \theta,$$ since $\Pr[Y = 0] = 0$.  And for each positive integer $y$, $$\Pr[XY = y] = \theta p(1-p)^{y-1},$$ since $XY = y$ only if $X = 1$ and $Y = y$.

Now here is an example of a hierarchical model.  Let $$\Pr[N = n] = e^{-\lambda} \frac{\lambda^n}{n!}, \quad n \in \{0, 1, 2, \ldots\}, \\ \Pr[X = x \mid N = n] = \binom{n}{x} p^x (1-p)^{n-x}, \quad x \in \{0, 1, 2, \ldots, n\}.$$  Note that the second distribution is conditional on the first:  in other words, $N$ is Poisson with rate $\lambda$, but $X$ given $N = n$ is binomial with $n$ trials with success probability $p$.  The product of $N$ and $X$ is not the same random variable as the marginal (or unconditional) distribution $X$, which is $$\begin{align}
\Pr[X = x] &= \sum_{n=x}^\infty \Pr[X = x \mid N = n] \Pr[N = n] \\
&= \sum_{n=x}^\infty \binom{n}{x} p^x (1-p)^{n-x} e^{-\lambda} \frac{\lambda^n}{n!} \\
&= \sum_{n=x}^\infty \frac{1}{x! (n-x)!} e^{-p\lambda} e^{-(1-p)\lambda} p^x (1-p)^{n-x} \lambda^x \lambda^{n-x} \\
&= e^{-p\lambda} \frac{(p\lambda)^x}{x!} \sum_{n=x}^\infty e^{-(1-p)\lambda} \frac{((1-p)\lambda)^{n-x}}{(n-x)!} \\
&= e^{-p \lambda} \frac{(p\lambda)^x}{x!}.
\end{align}$$ by the law of total probability.  Therefore, the unconditional distribution of $X$ is Poisson with rate $p\lambda$.  This would imply, for instance, $\Pr[X = 1] = p\lambda e^{-p\lambda}$.  However, as I have stated, $NX$ is not the same thing:  $$\begin{align}
\Pr[NX = 1] &= \Pr[(N = 1) \cap (X = 1)] \\
&= \lambda e^{-\lambda} p.
\end{align}$$

So when you write "$XN$ should follow a Poisson distribution with mean $p\lambda$," you are incorrect.  The question you linked to contains a similar misunderstanding, hence your confusion.  That question talks about multiplying two probability mass functions, not random variables.  And then the answer that is given assumes that this multiplication comes in the form of a hierarchical model, which is not necessarily true.

As for the question that you specifically posted, regarding the eggs, this is clearly a binomial-Poisson hierarchical model; i.e., $N$ gives the number of laid eggs, and $X \mid N$ gives the number of eggs that fertilized.  Then the covariance between $X$ and $N$ is calculated by the formula $$\operatorname{Cov}[X,N] = \operatorname{E}[XN] - \operatorname{E}[X]\operatorname{E}[N],$$ and in this formula, $XN$ truly means the product of the random variables $X$ and $N$.  And now, by the law of total expectation, we have $$\operatorname{E}[XN] = \operatorname{E}[\operatorname{E}[XN \mid N]] = \operatorname{E}[N \operatorname{E}[X \mid N]] = \operatorname{E}[N (Np)] = p \operatorname{E}[N^2] = p (\lambda^2 + \lambda).$$

The first two equalities are simply conditioning on the outcome of $N$; i.e., it is a shorthand way to write $$\operatorname{E}[XN] = \sum_{n=0}^\infty \operatorname{E}[nX \mid N = n]\Pr[N = n] = \sum_{n=0}^\infty \left( n \operatorname{E}[X \mid N] \right)\Pr[N = n].$$  The third equality arises from the fact that, conditioned on $N$, $X \mid N$ is binomial and has expectation $Np$.  The fourth equality simply factors the constant parameter $p$ out of the expectation, leaving the final equality which is the second moment of a Poisson random variable.

Title: Poisson times Binomial distributions


问:
Confused about Tensor Product of R-modules
In Tu's book on Differential Geometry he first defines $Free(V\times W)$ as:

$$\sum r_i(v_i, w_i), r_i \in R, (v_i, w_i) \in V \times W$$
where the sum is finite.

The way I understand it is the above construction is of formal combinations and forgets the actual structure of the modules. In other words, if $v_1+v_2 = v_3$, it isn't true that in $Free(V\times W)$ that $(v_1, 0) + (v_2, 0) = (v_3, 0)$

Now to form the tensor product we quotient by the submodule, $S$ spanned by elements of the form:
$$ (v_1 + v_2, w) - (v_1, w) - (v_2, w)\\
 (v,w_1 + w_2) - (v, w_1) - (v, w_2)\\
 (rv,w) - r(v,w)\\
 (v, rw) - r(v,w)$$
Then we have a map from the product to the tensor product,
$$(v,w) \rightarrow v\otimes w$$

However, if $v_3 = v_1 + v_2$, then I can't show that $$v_3\otimes w = v_1 \otimes w + v_2 \otimes w$$
which should be the case if $\otimes$ is a module homomorphism bilinear map.

答:
So for posterity, I want to write up an answer for others who may have the same confusion. As @KCd clarified, elements of $Free(V\times W)$ are of the form,

$$\sum r_i(v_i, w_i)$$

However if we write a particular element of $Free(V\times W)$ as $r_1(v_1 + v_2, w_1)$ and $v_3 = v_1 + v_2$ then
$$r_1(v_1 + v_2, w_1) = r_1(v_3, w_1)$$
In other words, inside of our parentheses in our notation we are not taking formal sums, but instead combining elements of the module as we normally would.


答: According to standard algebra rules, $a - b$ parses as $a + (-b)$.</p>

Title: What is $2 - 1 + 1$?

Body:
$2-1+1$; a fairly straightforward question, but I (well, not me, but Henry Reich) found something strange.

Most people would evaluate it as $2+(-1)+1 = 2$; however, this goes against the famed, and fairly standard B.E.D.M.A.S./P.E.D.M.A.S., which states that addition goes first, and then subtraction.

If this is the case, then the answer is $2 - (1 + 1) = 2-2 =0$.

Which is the correct answer, and why is the conventional way (B.E.D.M.A.S./P.E.D.M.A.S.) so ambiguous?


问:
Creating a network flow model for building a new organizing schema for a departament
The problem I'm attempting to solve is formulated like this:

A department consists of n groups such as for each group i in $\overline{1,n}$ contains $p_i$ members.

A change in the organization is wanted so that:

the new organizing schema contains q groups of members

each group in $\overline{1,q}$ will contain $k_i$ members

the new groups may not contain more than c members which were part of the same old group (c $\geq$ 2 , c $\in \mathbb{N}$)

How to find a model based on a flow network to build this new organizing schema?

I've tried building a network flow graph but I had trouble in representing the member groups and the restriction that no more than c members which were part of an old group can be present in a new group. Thank you for reading the question, any hint or solution is greatly appreciated.

答:
I'll repeat my answer from this deleted question from another user earlier today:

Define a complete bipartite graph with $n$ supply nodes and $q$ demand nodes. The flow from node $i$ to node $j$ indicates the number of students that move from old group $i$ to new group $j$. Each flow variable has an upper bound of $c$.


问:
If $X$ is a nonnegative $\sigma$-subGaussian random variable with $P(X=0)\ge p$, what is a good upper bound for $P(X \ge h)$?
Let $X$ be a nonnegative random variable and let $\sigma \in [0,\infty)$ and $p \in (0,1)$ such that

(1) $P(X=0) \ge p$

(2) $Var(X) \le \sigma^2$

For $h \ge 0$, define $c_X(h):=P(X \ge h)$. The following result was established in a paper of S. Bobkov.

For every $h \ge \dfrac{\sigma}{\sqrt{p(1-p)}}$, it holds that $P(X \ge h) \le \dfrac{p\sigma^2}{ph^2-\sigma^2}$.

In the referenced paper, the above inequality is labeled as (2.6).

Now, suppose we replace condition (2) with the following condition

(2') $X$ is $\sigma^2$-subGaussian, meaning that $P(|X-EX| > t) \le 2\exp(-t^2/(2\sigma^2))$ for all $t \ge 0$.

Question. What is a good upper bound for $c_X(h)$ as a function of $p$, $\sigma$, and $h$, in this case ?

One would expect to get stronger to obtain a stronger tail-bound than previously.

N.B.: Of course, if the worst comes to the worst, I'll be fine with a bound which works only works sufficiently large $h$.

答:
I have tried using some simple inequalities to get (hopefully) something useful:

I have focused on the case when $p$ is small.

Since $P(X=0) = p$, the subgaussian concentration implies that $p \leq 2 \exp\left(- \frac{(\mathbb E X)^2}{ 2 \sigma ^2}\right)$.
This gives us the following:
$$\mathbb E X \leq \sigma \sqrt{2 \log \frac{2}{p}}=: h_0.$$

Given this bound on $\mathbb E X$, we can now calculate upper tail inequalities: for any $h = \alpha h_0$ for $\alpha \geq 1$, we have that
$$ \begin{align}
P(X \geq h) &= P(X - \mathbb E X \geq (\alpha-1) h_0 ) \\
&\leq  2\exp\left(- \frac{(\alpha-1)^2h_0^2}{2 \sigma^2}\right) \\
&= 2\exp\left(-(\alpha-1)^2 \log \frac{2}{p} \right) = 2\left(\frac{p}{2}\right)^{(\alpha-1)^2}.
\end{align}
$$

For comparison, the bound in paper has $h_0' := \frac{\sigma}{\sqrt{p(1 - p)}} $ and gives the result for any $h = \alpha h_0'$, $P(X \geq \alpha h_0) \leq \frac{p(1-p)}{\alpha^2 - 1 + p}$. Thus subgaussianity allows us to get much tighter bounds, especially when $p \to 0$. Please let me know if I made an error somewhere.


问:
Coin Flipping Expected Value
Find the expected value for the number of flips you'll need to make in order to see the pattern TXT, where T is tails, and X is either heads or tails.

I tried conditioning on the coin flips (e.g. TXT, TXH, H) but I got an incorrect answer of 8. Any suggestions?

答:
I suspect you had TTH happening with probability $\frac{1}{8}$ and giving $E+3$ flips, where $E$ is the expected value of the required number of flips. This is wrong, because we don't have to restart when we get TTH.

TTH leads to TTHT and TTHH with equal probability. TTHT gives length $4$; TTHH gives length $E+4$.

In summary:
\begin{align}
H: &\frac{1}{2} & (E+1) \\
THT: &\frac{1}{8} & 3 \\
THH: &\frac{1}{8} & (E+3) \\
TTT: &\frac{1}{8} & 3 \\
TTHT: &\frac{1}{16} & 4 \\
TTHH: &\frac{1}{16} & (E+4)
\end{align}

Summing them all up and equating to $E$, and solving for $E$ gives $E = \frac{34}{5}$.

Title: Coin Flipping Expected Value


答:
This is why those abbreviations are poor. PEMA is a better one for that purpose. </p>

<p>By the way, normally it is PEMDAS (not PEDMAS) and it stands for Parenthesis, Exponentiation, Multiplication and Division, Addition and Subtract. It's just that the "and"s get lost in abbreviation. </p>

Title: What is $2 - 1 + 1$?

Body:
This is why those abbreviations are poor. PEMA is a better one for that purpose.

By the way, normally it is PEMDAS (not PEDMAS) and it stands for Parenthesis, Exponentiation, Multiplication and Division, Addition and Subtract. It's just that the "and"s get lost in abbreviation.


答:
The correct statement is the following

$N\sim  Po (\lambda)$

$X|N\sim Bin(N,p)$

Thus

$X\sim  Po(\lambda p)$

Proof:

$$P(X,N)=\frac{e^{-\lambda}\lambda^N}{N!}\binom{N}{x}p^x(1-p)^{N-x}$$

$$P(X=x)=\frac{e^{-\lambda}\lambda^x p^x}{N!}\sum_{N=x}^{\infty}\binom{N}{x}[\lambda(1-p)]^{N-x}$$

$$P(X=x)=\frac{e^{-\lambda}(\lambda p)^x}{x!}\sum_{N-x=0}^{\infty}\frac{[\lambda(1-p)]^{N-x}}{(N-x)!}= \frac{e^{-\lambda}(\lambda p)^x}{x!}e^{\lambda(1-p)}= \frac{e^{-\lambda p}(\lambda p)^x}{x!} $$

$x=0,1,2,...$

Title: Poisson times Binomial distributions

Body:
If I have two random variables: N follows Poisson distribution with mean as $\lambda$, and X follows binomial distribution with success rate of p, the output of N is the number of trials for X, according to this link A binomial multiplied by a poisson, XN should follow Poisson distribution with mean $p\lambda$

However, I was reading "Probability for Statistics and Machine Learning" for DasGupta and I found this example

I do not know how those two cases differ, but I think I am missing a fundamental point.


问:
Proof for Supremum
Let S = { $x\in\Bbb{Z}: x^2<3$ }. Then S is nonempty and bounded above. Show supS = $1$. Give a rigorous proof.

I have proved supS = $\sqrt 3$ for $x\in\Bbb{R}$. Not sure how to deal with $\Bbb{Z}$.

答:
Enumerate sets where you can. Here $|x|\geq 2 \implies x^2>3\implies x\not\in S$. Indeed;

$$S=\{-1,0,1\}$$

Which is clearly bounded above by $1$ and has supremum $1$ (If a set has a maximum, that is the supremum)

Title: Proof for Supremum