问:
Weak derivative of $|x|$ not in $W^{1,p}(-1, 1)$, another possible solution
I'm referring to the question presented here: Weak derivative of $u(x)=|x|$ not belong in $W^{1,p}(-1,1)$

In short, it is easy to see that the weak derivative of $|x|$ (defined on $(-1, 1)$) is the function $g(x)$ which is equal to $-1$ if $x \in (-1, 0)$ and $1$ if $x \in (0,1)$.

The accepted solution presented uses the density of the certain type of functions in $L^{p}(-1, 1)$, but I have another (potentially incorrect) solution in mind. In particular, is it true that weak and strong derivatives coincide pointwise, i.e. wherever both exist? We know that for $f \in C^{1}(-1, 1)$ the weak and strong derivative coincide on all of $(-1, 1$). But is it true in general that for any function in $L^{p}(-1,1)$ its weak derivative coincides with its strong derivative at any point at which both exist?

If that is the case, then an alternative solution to the linked problem is that the weak derivative of $g$ (as defined above) is $0$ a.e. in $(-1, 1)$, i.e. all points except $0$, where it is not defined. This shows that
$$
(\varphi(1) - \varphi(0)) + (\varphi(-1) - \varphi(0)) = \int_{-1}^{1} g' \varphi = 0
$$
for all $\varphi \in {C_{c}}^{1}(-1, 1)$, which is certainly not true. But, of course, this turns on the "lemma" I have presented above -- which I can't prove in general (other than in the $C^{1}$ case where we can integrate by parts).

答: OK, one sort of answer is that, yes, indeed, since both classical and distributional (and "weak") differentiability is a local property, and since "distributions are localizable", at every point with a nbd where a distribution's derivative is given_by integration against a locally $L^1$ function, that locally $L^1$ function is also the classical limit-of-difference-ratios derivative.


问:
How to calculate distribution of sine of a random variable
I am trying to prove $$
\int_{\Xi} \exp \left(\|\xi\|^{a}\right) \mathbb{P}(\mathrm{d} \xi)<\infty,
$$ where the random variable $\xi$ complies with the distribution of $\sin(X)$ with $X \sim N\left(\mu, \sigma^{2}\right)$.

I figured out how to calculate the first two order moments. Just wondering how to calculate the distribution of $\sin(X)$.

Any hint would be appreciated.

答:
Hint:

Note that $\exp(\|\xi\|^a)$ is bounded, and you are integrating with respect to a finite measure.

ContentLicense: CC BY-SA 4.0


问:
Nullify (zero out, cancel) rotation in an arbitrary axis in a Quaternion
Question:

How do you nullify (zero out) rotation around an arbitrary axis in a Quaternion?

Example:

Let's say you have an object with quaternion orientation $A$.
You also have a rotation quaternion $B$.
You can calculate a new quaternion orientation $C=BA$.

Let's say the new orientation $C$, if done with axis-angle rotations, is equivalent to a 45 degree rotation around the arrow's local y-axis, followed by a 45 degree rotation around the arrow's local x-axis (which was moved due to the rotation around the y-axis).

In other words, imagine our 3D coordinate frame as a cube. Now imagine the initial orientation $A$ as an arrow in the center of our cube, facing in the negative-z direction. It's pointing at the center of the face of the cube whose normal is in the negative-z direction (with all normals pointing out of the cube).

Now, if we rotate this arrow 45 degrees around its local y-axis, it would be pointing at an edge of the cube. If we rotate it again, this time around its local x-axis, it would then be pointing at a corner of the cube.

The rotations described above can be encoded in a single Quaternion. A specific example of my question is, how can we alter that Quaternion so that it zeros out the rotation around, say, the x-axis, leaving only the rotation around the y-axis (meaning, in the end it would be pointing at an edge of the cube, not the corner)?

My full question is, how can we alter a Quaternion so that it zeros out the rotation around an arbitrary axis?

Remember of course that in general we would not know how the Quaternion was made, meaning we wouldn't know that it represents $a$ degrees around the x-axis, $b$ degrees around the y-axis, and $c$ degrees around the z-axis.

答:
This is the same approach, but in more direct terms:  To find the quaternion that is closest to $q$, but has no component in the direction of your arbitrary axis $v$, first rotate $v$ by $q$ to get $w$

$$w = R(q)^\top v.$$

Then, find the shortest rotation $\hat{q}$ between $w$ and $v$.  Being the shortest rotation, $\hat{q}$ by definition has no rotation about either $v$ or $w$. Its angle is $\theta=\arccos\left({v^\top w}\right)$ and the axis is $\delta = \tfrac{v \times w}{\lVert v\times w\rVert}$.

$$\hat{q} = \pmatrix{\cos\left(\frac{\theta}{2}\right) \\ \sin\left(\frac{\theta}{2}\right)\delta}$$.

ContentLicense: CC BY-SA 3.0


问:
Sum of atrocious numbers $p^n|(7^{p^n} + 1)$ where $p$ is prime
Reviewing Fermat's Little Theorem, I came across a question on here in the applications portion of the article.

It states that a number $p^n$ is said to be atrocious if $p^n|(7^{p^n} + 1)$ where $p$ is prime. The goal is to find the sum of all atrocious numbers. The question doesn't quantify $n$, but I am assuming it is a positive integer.

Attempt

Fermat's Little theorem states for any prime $p$, for any integer $a$ that $a^p \equiv a \pmod{p}$.

Ok so suppose $p$ is a prime where $p^n$ is atrocious for some $n$, then $p|p^n$, and so $p|(7^{p^n} + 1)$. Then since $p$ is prime I want to write $7^{p^n} = (7^p)^{p^{n-1}} \equiv 7^{p^{n-1}} \pmod{p}$. Continuing on in this manner, you can show that $7^{p^n} \equiv 7 \pmod{p}$.

Any insights appreciated.

答:
Well, first by the line of reasoning OP, $p$ has to divide $7+1$ so $p$ must be 2. Also, note the following: If $2^n|(7^{2^n} +1)$ for $n >3$ then $7^{2^n} \pmod 8 = -1$.
But then $7 \pmod 8 =-1$ already and so $7^{2^n} \pmod 8 = 1$ for any $n \in \mathbb{N}$ [because the exponent $2^n$ is even for all $n \in \mathbb{N}$] so this is impossible for $2^n$ to divide $7^{2^n}$ for $n>3$, and one can check directly that it is impossible for $n=2$ as well . Thus $2^0=1, 2^1= 2$ can be the only atrocious numbers. So $1+2=3$.


问:
Combinatorics: stars and bars with conditions
How do you solve $x_1+x_2+x_3+x_4 \le 45$, where all the $x$'s are nonnegative with the added conditions that $x_1 \ge 0, x_2\ge 1, x_3 \ge 4,$ and $x_4 \le 5$? I know how to do the normal stars and bars argument, but the inequality and these conditions make it more complicated.

答:
By using slack variables.  Find the number of solutions of $x_1+x_2+x_3+x_4+x_5=45$, where each $x_i$ is a non-negative integer.  That converts the last inequality into an equality.

For $x_2$ and $x_3$, just use the constraints as your starting point:  $x_1+y_2+y_3+x_4+x_5 = 40$, where $y_2+1=x_2$ and $y_3+4=x_3.$

To handle the inequality on $x_4$, use the technique discussed above to ascertain the number of solutions of your original equation where $x_4 \geq 6:  x_1+y_2+y_3+y_4+x_5=34,$ where $y_4+6=x_4$.  Subtract this number from the number of solutions of your first equation.

Thus, your answer should be $\binom{44}{4}-\binom{38}{4}.$


答:
I think of this as the number of ways to place at most $45$ indistinguishable balls in $4$ distinct buckets, where we must place at least $1$ ball in bucket $2$, at least $4$ balls in bucket $3$, and at most $5$ balls in bucket $4$.

First, add a fifth bucket, and place $45$ balls in the buckets, so that there will be at most $45$ in the first $4$.  Start by putting $1$ ball in bucket $2$ and $4$ in bucket $3$, leaving us with $40$ balls to place.  If we place $k$ balls in bucket $4$, we must place $40-k$ balls in the remaining $4$ buckets.  By stars and bars, there are $\binom{43-k}3$ ways to do this, so the answer is $$\sum_{k=0}^5\binom{43-k}{3}$$

Title: Combinatorics: stars and bars with conditions

Body: How do you solve $x_1+x_2+x_3+x_4 \le 45$, where all the $x$'s are nonnegative with the added conditions that $x_1 \ge 0, x_2\ge 1, x_3 \ge 4,$ and $x_4 \le 5$? I know how to do the normal stars and bars argument, but the inequality and these conditions make it more complicated.


问:
Vectors as differential operators act on functions.
Within my studies of differential geometry the concept of tangent space has just arisen. Now, a tangent vector $v_p$ at point $p \in M$ on a manifold $M$ is defined to be the differential operator $v_p^i \frac{\partial}{\partial x^i}$. Given an arbitrary smooth function $f$, I understands how this vector corresponds to a directional derivative of $f$.

However, what I don't understand -- even after consulting numerous google results and similar questions posted on this forum -- is why I need this function for my vector to be defined? To be more specific, what has this function (a specific function? a general function? a class of functions?) to do with my vector.

I suppose, from an naive point of view, when dealing with vectors I want to e.g. describe mechanical situations, maybe a collision. Perhaps I want to describe the electrical field of an electron. But what do I have to think of when talking about an action of my vector field (electric field) on some function? What physical relevance has this function. Why would I want my definition of a vector to depend on an additional function? Is there a correspondence to a more intuitive but less abstract object (e.g. in 3-d euclidean space) or maybe a low-level but didactically promising example? This is all so confusing.

$${}$$

EDIT:
To formalise my concerns:

The "usual" interpretation of a vector field as I am used to it is a function $V: \mathbb{R}^3 \longrightarrow \mathbb{R}^3$.
The "new" interpretation of a vector field as a differential operator is a function
$V: C^{\infty}(M) \longrightarrow C^{\infty}(\mathbb{R})$.

But this is not the object I want to have, is it? In fact this is a scalar-function, where I would want to have a vector.

答:
I hope someone here can write about the motivations and physical interpretations for this definition.

I would like to point out that there are more characteristics of a good definition than these (you can probably see I'm a fan of Terrence Tao and his essay). Off the top of my head, I can name a few:

It doesn't require elaborate tools in order to phrase it.

One can clearly see how it generalizes another, more standard definition.

It's directly related to our physical our geometric intuition about the object it's defining.

It's operatonally useful, i.e., allows us to write easy/short proofs with it.

It highlights the relations between the object we're defining and some other objects.

Sticking to our example of defining tangent vectors, one can consider various (commonly taught) definitions:

In a chart, a part of $M$ is actually a part of $\mathbb{R}^n$, in which case there's a standard (almost tautological) notion of a tangent vector. Identifying properly tangent vectors obtained in different charts, we can make this definition work. I think it fulfills requirements 1 and 2.

We define tangent vectors at $p \in M$ as "velocity vectors at $t=0$" of smooth curves $\gamma \colon \mathbb{R} \to M$ satisfying $\gamma(0) = 0$. Of course, one needs to clarify when two curves give us the same velocity (and we may use charts for this). Since this definition is directly related to trajectories on $M$, I'd say it satisfies 3.

What about our definition of tangent vectors as "differentiations"? I think it works nicely for 4 and 5.

As for 4, you can probably already give a few examples of how this definition saves us time. One instance is the Lie bracket: for two tangent vector fields $X,Y$ on $M$ we define a new tangent vector field $[X,Y]$ as
$$
[X,Y] f := X(Y(f)) - Y(X(f)) \quad \text{for } f \in C^\infty(M).
$$
One needs to check that it's linear and satisfies the Leibniz rule, which is easy. And that's all! Since $X$ and $Y$ act on functions (by definition), and for defining $[X,Y]$ we only need to describe its action on functions, we're done.

Number 5 is maybe the deepest point here. It may be confusing that the definition of one tangent vector involves all smooth functions on $M$, right? But at the same time, there's something deep in the fact that our definition itself relates tangent vectors to functions. This kind of definitions is quite common in more geometrically oriented parts of mathematics (e.g. definitions by universal properties), but I don't feel competent enough here to say much more.


问:
Need a hint on showing that if $f_1,\dotsc f_n$ is any basis of eigenvectors of $A^T$, then $f_i(v_i) \neq 0$ and $f_i(v_j) = 0$ for $i \neq j$
Let $A:X\rightarrow X$ be a linear map with distinct eigenvalues $\lambda_1,\dotsc, \lambda_n$ and corresponding eigenvectors $v_1,\dotsc, v_n$.

Suppose that $f_1,\dotsc, f_n$ is any basis of eigenvectors of $A^T$. We want to show that $f_i(v_i) \neq 0$ and $f_i(v_j) = 0$ whenever $i \neq j$.

I've been playing around with this problem for a couple of days now and have reached deadends with each attempt. To make things simpler, I've been considering the case when $n=2$.

So far, what I have is that $Av_1 = \lambda_1v_1$ and $A v_2 = \lambda_2 v_2$, as well as $A^T(f_1) = f_1\circ A = \gamma_1 f_1$ $A^T(f_2) = f_2\circ A = \gamma_2 f_2$, where $\gamma_1,\gamma_2$ are scalars.

Using these equations, I focused on $f_1(v_1)$ and was able to get
$$(\lambda_1-\gamma_1)f_1(v_1) = 0,$$
which clearly gives us $\lambda_1 = \gamma_1$ or $f_1(v_1) = 0$, but I don't know what to do with the assumption that $\lambda_1 = \gamma_1$, nor can I find a contradiction with assuming $f_1(v_1) = 0$.

I started looking at the nullspace of $f_1 \circ A - \lambda I$ where $I \in \operatorname{End}(X)$ is the identity map and $\lambda$ is some scalar, but I don't know where or how to proceed with this.

Any tips is greatly appreciated.

答:
In doing this, we need to note that the eigenvalues of $A^T$ and $A$ are equal. So I assume that the $f_i$ are chosen to be eigenvectors of $A^T$ with respect to the eigenvalue $\lambda_i$ (otherwise this problem doesn't work).

For $i\neq j$ we have $$(\lambda_if_i)(v_j)=(A^T(f_i))(v_j)=f_i\circ Av_j=f_i(\lambda_jv_j)=\lambda_jf_i(v_j).$$

Spoiler to conclude the $i\neq j$ case:

 The above gives $(\lambda_i-\lambda_j)f_i(v_j)=0$. When $i\neq j$ we get $\lambda_i\neq \lambda_j$, so we must have $f_i(v_j)=0$.

For the $i=j$ case: note that the $v_1,\ldots,v_n$ form a basis for $X$ since all the eigenvalues are distinct. Spoiler to conclude the $i=j$ case:

 Fix $i$. Since $v_1,\ldots,v_n$ form a basis for $X$, we cannot have $f_i(v_j)=0$ for all $j$ (this would mean that $f_i=0$, but $f_i$ is nonzero as it is an eigenvector; in fact the $f_i$ are a basis for $X^*$). Thus $f_i(v_i)\neq 0$ since we already showed $f_i(v_j)=0$ for $j\neq i$.


问:
Finding $\sum_{n=2}^8 \frac{1}{n!(17-n)!}$
Given that $$\sum_{n=2}^8 \frac{1}{n!(17-n)!} = \frac{N}{16!},$$ find the greatest integer less than $\frac{N}{100}.$

Writing out the summation, I noted that the hockey stick identity could potentially be put to use here, but I was unable to proceed from there.

答:
Hint: using a symmetry in $\frac{1}{n!(17-n)!}$ you can write:
$$\sum_{n=0}^8 \frac{1}{n!(17-n)!} = \frac{1}{2} \sum_{n=0}^{17} \frac{1}{n!(17-n)!} = \frac{1}{2} \cdot \frac{1}{17!} \sum_{n=0}^{17} \binom{17}{n} = \frac{1}{2} \cdot \frac{1}{17!} \cdot 2^{17}.$$
Now you just have to see how to make the adjustment to get an expression for $\sum_{n=2}^8 \frac{1}{n!(17-n)!}$ instead.


问:
Bounded 2nd derivative and finding a bound for the 1st derivative
Let $f:[0,1]\xrightarrow{}\mathbb{R}$ be a function such that $f(0)=f(1)=0$ the $f''$ exists and it's continuos on $[0,1]$, suppose that $|f''(x)|\leq A$ for all $x\in [0,1]$. Show that $|f'(x)|\leq A/2$ for all $x\in[0,1]$ and $|f'(1/2)| \leq A/4$.

I tried using the Taylor's theorem with Lagrange remainder by plugging 0 and 1 in order to make some terms vanish, however I wasn't able to isolate $A$ and $f'(x)$.
$$
f(x) = f(x_0) + f'(x_0)(x-x_0) + \frac{1}{2!}f'(c)(x-x_0)^2 \\
f(x) = f(0)   + f'(0)x + \frac{1}{2!}f'(c)x^2
f(1/2) = f(0)   + \frac{f'(0)}{2} + \frac{1}{2! 4}f''(c) = \frac{f'(0)}{2} + \frac{1}{2! 4}f''(c)\\
\leq \frac{f'(0)}{2} + \frac{1}{2! 4}A = \frac{1}{2}\left(f'(0)+\frac{1}{4}A \right)
$$
I also thought of applying Rolle's theorem in some way, but I don't think it fits anywhere.
If someone could point me in a useful direction, I would be glad.

答:
You were on the right track: Let $x_0\in[0,1]$. Then $$f(x) = f(x_0) + f'(x_0)(x - x_0) + \frac 12 f''(c)(x - x_0)^2$$ for $c$ between $x$ and $x_0$. Since $f(x) = 0$ for $x=0$ and $x=1$, it holds that $$0 = f(0) = f(x_0) + f'(x_0)(0 - x_0) + \frac 12 f''(c_1)(0 - x_0)^2$$
and $$0 = f(1) = f(x_0) + f'(x_0)(1 - x_0) + \frac 12 f''(c_2)(1 - x_0)^2.$$
Thus, both equations yield $$\begin{align*}f'(x_0) &= \frac 12 f''(c_1){x_0}^2 - \frac 12 f''(c_2)(1 - x_0)^2 \end{align*}$$
and therefore $$\begin{align*} \vert f'(x_0)\vert &= \left\vert \frac 12 f''(c_1){x_0}^2 - \frac 12 f''(c_2)(1-x_0)^2\right\vert \\ &\leq \frac 12 A\big({x_0}^2 + (1-x_0)^2\big) \\ &\leq \frac 12 A\end{align*}$$ using the triangle inequality, the condition $\vert f''(x)\vert\leq A$, and $x_0\leq 1$. Note that if $x_0 = \frac 12$, the other result $\vert f'(1/2)\vert \leq \frac 14 A$ is obtained.


问:
Graph $(r-2)^2+z^2=1$
I was doing a problem and I got stuck at the step of drawing this:

$(r-2)^2+z^2=1$

Since it does not depend on $\theta$, I know it would be like a circle centered at $(2,0)$ with radius $1$ in $xz$ plane, but couldn't imagine how would it be in the space. Any help would be appreciated.

Is there any website that helps me to graph such equations? Thanks

答: If you replace $r$ by $x,$ the new equation defines a circle of radius $1$ in the X-Z plane. Now rotate about the Z-axis to get the torus. (You can use this trick whenever there is no $\theta.$)

Title: Graph $(r-2)^2+z^2=1$


问:
How to show that each rank one decomposition of SVD is exactly rank one?
by using the fact that rank(AB) $\leq$ min{rank(A), rank(B)}, I can only figure out that rank(u$\cdot$v$^{T}$) $\leq$ 1.

How to show that it is exactly rank one?

Appreciate any help!

答:
You do not say so, but I assume that both $u$ and $v$ are column vectors.

The rank of a matrix is always a non-negative integer. From the fact that $\operatorname{rank}(uv^T) \leq 1$, you know that the rank is either $1$ or $0$. However, the only matrix with rank $0$ is the $0$-matrix. Show that if $uv^T = 0$, then either $u = 0$ or $v = 0$.


问:
how do determine the distribution of outcomes for a given probability?
For a game I generate various block types given certain odds. Say, there's a $0.001$ chance for the karma block. If a typical game has $600$ blocks, what's the distribution of games that have $0$ karma blocks, $1$ karma blocks, $2$ karma blocks, etc.

I've tried reading the wikipedia page on probability distributions, but I can't figure out how it applies to this.

答:
A very good approximation to the desired probabilities is
$$P\{X = n\} = e^{-0.6}\frac{(0.6)^n}{n!}, ~~ n = 0, 1, 2, 3, \ldots$$
This is called the Poisson approximation to the binomial distribution (cf. @Zen's answer)
and applies whenever $n$ is large ($600$ in your case) and $p$ is small ($0.001$ in your
case) while $np = 0.6 \ll n$.</p>


问:
Let $a_n$ be the number of even sized subsets of $ \{1,\ldots,n\}$. How do I find the exponential generating funtion $a_n$?
We need to use the Maclaurin series of $\cosh(x)$.

答:
HINT: The Maclaurin series for $\cosh x$ is

$$\cosh x=\sum_{n\ge 0}\frac{x^{2n}}{(2n)!}\,,$$

so it corresponds to the sequence $\langle e_n:n\ge 0\rangle$, where

$$e_n=\begin{cases}
1,&\text{if }n\text{ is even}\\
0,&\text{if }n\text{ is odd.}
\end{cases}$$

The number of even-sized subsets of $\{1,\ldots,n\}$ is

$$\sum_{k\ge 0}\binom{n}{2k}=\sum_{k\ge 0}\binom{n}ke_k\cdot 1\,.$$

This last expression is the coefficient of $\frac{x^n}{n!}$ in the product of the power series $\sum_{n\ge 0}e_n\frac{x^n}{n!}$ and $\sum_{n\ge 0}1\cdot\frac{x^n}{n!}$ corresponding to the sequences $\langle e_n:n\ge 0\rangle$ and $\langle 1,1,1,\ldots\rangle$. Now all you have to do is identify the generating function for that last sequence and put the pieces together.

You can check your result be deriving it in a different way. The empty set has one even-sized subset, and $\{1,\ldots,n\}$ has $2^{n-1}$ even-sized subsets for $n\ge 1$, so the power series that you want is

$$1+\sum_{n\ge 1}2^{n-1}\frac{x^n}{n!}=1+\frac12\sum_{n\ge 1}\frac{(2x)^n}{n!}\,.$$

Write this in terms of an exponential function, and compare that result with the ways of expressing $\cosh x$ in terms of exponential functions.


问:
Expected Value of MSR in General Linear Model
The setting of my problem is as follows:

Consider the general linear model $Y = X\boldsymbol{\beta} + \epsilon$, where $\beta = \begin{bmatrix} \beta_0 \\ \boldsymbol{\beta_1} \end{bmatrix}$ and $X = \begin{bmatrix} \mathbf{1} & \mathbf{X_1} \end{bmatrix}$, $\epsilon_i$ are independent with mean zero and variance $\sigma^2$. Consider the case where at least one element of $\boldsymbol{\beta_1}$ is not equal to zero. Prove that $\mathbb{E}[MSR]>\sigma^2$.

What I did so far:

$SSR = \sum(\hat{Y_i}-\bar{Y})^2 = \hat{Y}^T\hat{Y}-n\bar{Y}^2=Y^THY-n\bar{Y}^2$
where $H = X(X^TX)^{-1}X^T$.

Using the identity $\mathbb{E}[Y^THY]=\mathbb{E}[Y]^TH\mathbb{E}[Y]+tr[H*Var(Y)]$ I was able to get:

$\mathbb{E}[SSR] = \beta^TX^TX\beta+p\sigma^2-n\bar{Y}^2$

This is where I am stuck. It would suffice to show $\beta^TX^TX\beta-n\bar{Y}^2>0$, for then $MSR = \frac{SSR}{p-1} > \frac{p\sigma^2}{p-1} > \sigma^2$, but I cannot seem to figure out how to do that.

Your help is much appreciated!

$\mathbf{EDIT}$

My initial attempt was incorrect: I moved $\bar{Y}^2$ past the expectation, which is obviously wrong. Now, I attempted the problem again and I think it may have worked:

$$SSR = \sum(\hat{Y_i}-\bar{Y})^2 = \hat{Y}^T\hat{Y}-n\bar{Y}^2=Y^THY-n\bar{Y}^2$$

$\mathbb{E}[SSR] = \mathbb{E}[Y^THY-n\bar{Y}^2] = \mathbb{E}[Y^THY] -n\mathbb{E}[\bar{Y}^2]$

$=\mathbb{E}[Y]^TH\mathbb{E}[Y]+tr[H*Var(Y)] - n\mathbb{E}[\bar{Y}^2]$

$=\boldsymbol{\beta}^TX^T(X(X^TX)^{-1}X^T)X\boldsymbol{\beta} + p\sigma^2- n\mathbb{E}[\bar{Y}^2]$ (using $tr(H) = p$)

$=\boldsymbol{\beta}^TX^TX\boldsymbol{\beta}+p\sigma^2- n\mathbb{E}[\bar{Y}^2] = \mathbb{E}[Y]^T\mathbb{E}[Y]+p\sigma^2- n\mathbb{E}[\bar{Y}^2]$

$=\sum{\mathbb{E}[Y_i]^2} - \frac{1}{n}\mathbb{E}[(\sum{Y_i})^2]+p\sigma^2$

$=\sum{\mathbb{E}[Y_i]^2} - \frac{1}{n}\big(\mathbb{E}[(\sum{Y_i})^2]-\mathbb{E}[\sum{Y_i}]^2\big) - \frac{1}{n}\mathbb{E}[\sum{Y_i}]^2+p\sigma^2$

$=\sum{\mathbb{E}[Y_i]^2} - \frac{1}{n}Var(\sum{Y_i}) - \frac{1}{n}\big(\sum{\mathbb{E}[Y_i]}\big)^2+p\sigma^2$

Since the $Y_i$ are independent:

$=\sum{\mathbb{E}[Y_i]^2} - \frac{1}{n}\big(\sum{\mathbb{E}[Y_i]}\big)^2+(p-1)\sigma^2$

Now, we can simply use the fact that $\sum{x_i^2} \ge n\bar{x}^2$ with equality iff $\sum{(x_i-\bar{x})^2}=0$, by taking $x_i=\mathbb{E}[Y_i]$ (for a proof see How can I prove that the mean of squared data points is greater than the square of the mean of the data points?):

$$\mathbb{E}[SSR]\ge(p-1)\sigma^2$$ with equality iff $\mathbb{E}[Y_i]=const$.

Assuming uniqueness of the OLS estimates, if at least one element of $\boldsymbol\beta_1$ is non-zero this gives:

$$\mathbb{E}[MSR] = \frac{1}{p-1}\mathbb{E}[SSR] > \sigma^2$$

答:
For a single observation, write $Y-\bar Y=\beta_0+\beta_1 X_1+...+\beta_pX_p+\epsilon-(\beta_0+\beta_1 \bar X_1+...+\beta_p\bar X_p+\bar \epsilon)=\beta_1(X_1-\bar X_1)+...+\beta_p(X_p-\bar X_p)+(\epsilon-\bar \epsilon)$. Then the square of this for a single observation is $(Y-\bar Y)^2=\beta_1^2(X_1-\bar X_1)^2+...+\beta_p^2(X_p-\bar X_p)^2+(\epsilon-\bar \epsilon)^2+2\beta_1\beta_p(X_1-\bar X_1)+2\beta_1(X_1-\bar X_1)(\epsilon-\bar \epsilon)+2\beta_p(X_p-\bar X_p)(\epsilon-\bar \epsilon)+...$

We need two more pieces. First, the expected value of $E[(\epsilon-\bar \epsilon)^2]=E(\epsilon^2-2\epsilon\bar \epsilon+\bar \epsilon^2)=\sigma^2+\frac{\sigma^2}{n}-\frac{2\sigma^2}{n}=\sigma^2\left(\frac{n-1}{n}\right)$. Also, $E(\epsilon-\bar\epsilon)=0$. Taking the sum over all observations, we have that for the sample, $\sum(Y_i-\bar Y)^2=\beta_1^2\sum(X_{i1}-\bar X_1)^2+...+\beta_p^2(X_{ip}-\bar X_p)^2+(\epsilon_i-\bar \epsilon)^2+2\beta_1\beta_p(X_{i1}-\bar X_1)+2\beta_1(X_{i1}-\bar X_1)(\epsilon_i-\bar \epsilon)+2\beta_p(X_{ip}-\bar X_p)(\epsilon_i-\bar \epsilon)+...$

Then the expected value of this is $\begin{split}E(SSR)&=\beta_1^2\sum E(X_{i1}-\bar X_1)^2+...+\beta_p^2\sum E(X_{ip}-\bar X_p)^2+\sum \underbrace{E(\epsilon_i-\bar \epsilon)^2}_{=\sigma^2\left(\frac{n-1}{n}\right)}+2\beta_1\beta_p\sum E(X_{i1}-\bar X_1)+\underbrace{2\beta_1\sum E(X_{i1}-\bar X_1)(\epsilon_i-\bar \epsilon)+2\beta_p\sum E(X_{ip}-\bar X_p)(\epsilon_i-\bar \epsilon)}_{=0}+...\\
&=\beta_1^2\sum E(X_{i1}-\bar X_1)^2+...+\beta_p^2\sum E(X_{ip}-\bar X_p)^2+2\beta_1\beta_p\sum E(X_{i1}-\bar X_1)+...+\sigma^2(n-1)\end{split}$

Now, if exactly one of the $\beta_j$'s was not equal to 0 the terms other than the $\sigma^2(n-1)$ would just be $\beta_i^2\sum E(X_{ij}-\bar X_j)^2>0$. But here you somehow need to make an argument that those terms collectively are positive.


问:
Center of Mass Problem
Let $E=[0,3] \times  [-2,2] \times  [0,2]$ in Rectangular Coordinates with $0\le x \le 3, -2 \le y \le 2, 0 \le z \le 2$. Now let the density at each point E be equal to the distance from the z-axis. This means $(x,y,z)$ will be the center of mass E.

Now how can I find the two coordinates for the center of mass via symmetry and the third with an integral?

答: Maybe this figure will help... the contours show equal density:

Title: Center of Mass Problem


问:
Probability that $n$ random walks (1D) intersect a single point
I am struggling finding a relation to determine the probability $n$ random walks (1D) intersect in a single point at step $s$. In the method below my attempts. My method is somewhat intuitive based. I am looking for more rigorous proof.

note:
This question arises from someone who claims that a matching cumulative digit sum of: $\pi$, $e$ and $\varphi$ (golden ratio) is unique and "cosmological" [1]. I tend to disprove it. This digit sum can be seen as a random walk if the constants are normal (every digit occurs with same frequency).

Method:

For every step $s$ on the random walk we can determine the probability density function if we know the standard deviation on every step $s$.

The standard deviation of a single step can be calculated it's a discrete uniform distribution "equally likely outcomes", where $q$ is the number of outcomes e.g. the number of digits $[0,1,2,3,4,5,6,7,8,9]$, $q=10$:

$$\sigma=\sqrt{\frac{q^{2}-1}{12}} $$

All the (1D) random walks start in the origin for this example. The standard deviation will grow with every step $s$, the variance is proportional to the number of steps [2].

$$Var(s)=s \cdot \sigma^{2}$$

$$\sigma(s)=\sqrt{s} \cdot \sigma$$

While the bins grow rapid I assume a normal approximation of the Binomial distribution.

$$f(x)=\int_{-\infty}^{\infty} {\frac {1}{\sigma {\sqrt {2\pi }}}}e^{-{\frac {1}{2}}\left({\frac {x}{\sigma }}\right)^{2}}dx $$

The probability that $n$ random walks intercept in a single point is (not sure):

$$p(s)=\int_{-\infty}^{\infty} \left[ {\frac {1}{\sigma {\sqrt {2\pi }}}}e^{-{\frac {1}{2}}\left({\frac {x}{\sigma }}\right)^{2}} \right]^n dx $$

With help of Wolfram Alpha [3] the solution is found for $n=3$ meaning the probability of $3$ point intersecting random walks.

$$p(s)=\frac{1}{2 \sqrt{3} \ \pi \ \sigma^{2}} \cdot \frac{1}{s}$$

The total probability $p(n)$ is proportional to the reciprocal sum of $s$. So the total probability is proportional to the harmonic series:

$$p(n)=\frac{1}{2 \sqrt{3} \ \pi \ \sigma^{2}} \cdot \sum_{s=1}^{\infty}\frac{1}{s}$$

This series diverges, meaning there are infinate point intersections of $n=3$ random walks. So a matching cumulative digit sum of $\pi$, $e$ and $\varphi$ is not unique, probability $\sim 8 \%$ for the first 1200 digits (see graph).

Question

Does anyone know the general formula for the probability $p(n)$ that $n$ random walks (1D) intersect a single point?

```<code>import numpy as np

#Elements of digits [0,1,2,3,4,5,6,7,8,9] rescaled to fit random walk
array=[-9,-7,-5,-3,-1,1,3,5,7,9]

#steps, in single random walk, x walks to intercept, number of trial to find intercept
steps=2500
xwalks=3
trials=1500

#Set output array to zero
count=np.full([steps],0)

for n in range(trials):

    #Identify initial array, set total array to zero
    w0=np.random.choice(array,steps)
    w0=np.cumsum(w0)
    total=np.full([steps],0)

    #Select x random walk check for intercept
    for m in range(xwalks-1):

        #Next current random walk
        w=np.random.choice(array,steps)
        w=np.cumsum(w)

        #Compare previous and current random walk
        eq=np.equal(w0,w)
        eq=eq.astype(int)

        #Count intercepts
        total=total+eq

        #Set current walk to previous
        w0=w

    #Sum all interceptions for all trials
    count=count+np.where(total==(xwalks-1),1,0)

#Print output
print(count)
print(np.sum(count))
print(np.sum(count)/trials)
</code>```

答:
I now realise that your rebuttal of my analysis in your comment above at Probability that $n$ random walks (1D) intersect a single point was in fact valid, as I had made a mistake in my analysis. I assumed incorrectly that I could simply add together the probabilities of collision after one step, two steps etc. to get the total probability of collision. However, these events are not mutually exclusive, since random walks can collide at multiple steps, so if the probability of collision at step 1 was 0.6 and the probability of collision at step 2 was 0.5, I would already have a probability exceeding 1. Hence, the correct process is to work out the probability of non-collision before step m multiplied by the probability of collision at step m, and only then add together the probabilities. Alternatively, I could just calculate the probability of non-collision at or before step m by multiplying together probabilities, then subtract it from one, and take the limit as m tends to infinity.

Edit:

This method describes collision random walk with probability per step is: [-1,1] 50%.

s: step number in random walk, n: number of intersecting random walks.

Probability intersecting at single step position:
$$p(s)= \sum_{k=0}^{s} \left(\frac{1}{2^{s}}  \binom{s}{k}\right)^{n}$$

Total probability over all steps:
$$p(n)=\sum_{s=1}^{\infty}\sum_{k=0}^{s} \left(\frac{1}{2^{s}}   \binom{s}{k} \right)^{n}$$

I have now created a spreadsheet to calculate the answer to your question, which is:

n
p(n)

1
1

2
1

3
0.907472937

4
0.382922701

5
0.147129979

6
0.062758395

7
0.028516044

8
0.013419184

9
0.006446336

10
0.003136593

11
0.001538874

12
0.000759198

I am not sure how accurate my results are, but if you need better accuracy, you could extend the spreadsheet tables as required.

My spreadsheet uses data tables, and it appears that Excel cannot handle nested data tables, so the table above was produced by manually typing in the first twelve input values for n and copying the result. For a larger data set, a quick script could be written to automate the process.

The spreadsheet is available at https://groups.io/g/UnsolvedProblems/message/12251.

I can now see that your question is related to Pólya's Random Walk constants, but because you are essentially asking a different question, I don't think the answer to your question should directly equate to Pólya's Random Walk constants.

In terms of the normal approximation you mentioned in your analysis, the conditions of the Central Limit Theorem state under which circumstances a normal approximation applies, which can be found at https://en.wikipedia.org/wiki/Central_limit_theorem.


问:
How to Evaluate $\int_{0}^{1} \frac{x^2 \ln(1-x^4)}{1+x^4}dx$?
How to evaluate

$$ \int_{0}^{1} \frac{x^2 \ln(1-x^4)}{1+x^4} \,dx \approx -0.162858 \tag{1}$$

The integral arises in the computation of

$$\left( \sum_{n=1}^{\infty} \frac{(-1)^n}{n}\right)\left(\sum_{n=1}^{\infty} \frac{(-1)^n}{4n-1}\right)$$
as

$$ \scriptsize{\frac{\pi \ln(2)}{4\sqrt{2}} + \frac{\ln(2) \ln(3-2\sqrt{2})}{4\sqrt{2}} -3\ln(2) + \frac{\pi}{2}= \int_{0}^{1} \frac{x^2 \ln(1-x^4)}{1+x^4} \,dx + \int_{0}^{1} \frac{x^{1/4}}{2(1+x)}\left(\tan^{-1}(x^{1/4}) - \tanh^{-1}(x^{1/4}) \right)}dx $$

A similar Integral

$$ \int_{0}^{1}\left( \frac{x^2 \ln(2)}{x^4-1} - \frac{x^2 \ln(1+x^4)}{x^4-1}\right)dx = C-\frac{\pi^2}{16}+\frac{\ln^2(\sqrt{2}-1)}{4}+\frac{\pi \ln (\sqrt{2}-1)}{4} \tag{2} $$

Where $ C $ = Catalan Constant

Unfortunately the same techniques I used to evaluate $(2)$ have not worked for $(1)$.
I know only for integration - By parts, U-Sub, and  using Taylor Series as well as Mathematica.

Q = Is there a closed form for Integral $(1)$?

EDIT

$$ (1) = \frac{-\pi^2}{8\sqrt{2}} + \frac{\pi \ln(8)}{4\sqrt{2}} +\frac{\ln(8) \ln(3-2\sqrt{2})}{4\sqrt{2}} -\frac{\pi \ln(3-2\sqrt{2})}{8\sqrt{2}} + 4\sum_{k=1}^{\infty} \frac{(-1)^k}{4k-1}\sum_{n=1}^{k} \frac{1}{4n-1} $$

$$\sum_{k=1}^{\infty} \frac{(-1)^k}{4k-1}\sum_{n=1}^{k} \frac{1}{4n-1} = \frac{1}{64}\left(\psi^{(1)}\left(\frac{7}{8}\right)-\psi^{(1)}\left(\frac{3}{8}\right)\right) + W $$

Where $W$ is some value.

答:
By expanding the denominator and integrating term-by-term we obtain:
$$
-\sum _{n=0}^{\infty } \frac{(-1)^n }{4 n+3}H_{n+\frac{3}{4}},
$$
where $H_n$ is the $n$th harmonic number, in the formula above--the harmonic number of fractional order.

Not sure if it is useful, but the sum can be performed with the help of, e.g., Mathematica yielding a relatively simple expression:
$$
\tfrac{1}{3} \Gamma \big(\tfrac{7}{4}\big)\, {}_2F_1^{(0,0,1,0)}\!\left(\tfrac{3}{4},1,\tfrac{7}{4},-1\right)-\frac{\gamma}{4 \sqrt{2}}\left[\pi -2\log(\sqrt{2}-1)\right].
$$
The superscript means that derivative is taken with respect to the parameter $c$ of the regularized hypergeometric function ${}_2F_1(a,b,c,z)$.


问:
Linear Integer Programing: fill the package with products $A, B, C, D$
A linear integer programming problem ask to consider the next restriction: we want to fill as much as possible a package that has a capacity of $1m^3$ and we have to choose between a variety of products $A, B, C, D$ with the following dimensions:

Product
Dimensions (cm)

A
$8\times 2.5 \times 0.5$

B
$7\times 2 \times 0.5$

C
$3\times 2 \times 0.5$

D
$3\times 3 \times 0.5$

My try:
$$8x_1+7x_2+3x_3+3x_4\leq100$$
$$2.5x_1+2x_2+2x_3+3x_4\leq100$$
$$0.5(x_1+x_2+x_3+x_4)\leq100$$
With $x_1,...,x_4\in\mathbb{Z}^+$.

But I think I'm not considering combinations between different dimensions. Any suggestions would be great!

答:
I'll assume "package" means "box", so the alignment matters.

Using only boxes of type $B$ and $C$, there's an obvious way to completely fill the $1m^3$ box.

The idea is to adjoin one box of type $B$ and one box of type $C$ to effectively create a box of type, say $E$, with dimensions (in cm)
$$\textbf{l}{\,\times\,}\textbf{w}{\,\times\,}\textbf{h}=10{\,\times\,}2{\,\times\,}0.5$$
Then the bottom level (height $0.5$cm) of the $1m^3$ box can be completely filled with $500$ boxes of type $E$, arranged $10$ lengthwise and $50$ widthwise.

Then replicating the bottom level $200$ times completely fills the $1m^3$ box.


问:
Proof that $1/\sqrt{x}$ is itself its sine and cosine transform
As far as I understand, I have to calculate integrals

$$\int_{0}^{\infty} \frac{1}{\sqrt{x}}\cos \omega x \operatorname{d}\!x$$

and

$$\int_{0}^{\infty} \frac{1}{\sqrt{x}}\sin \omega x \operatorname{d}\!x$$

Am I right? If yes, could you please help me to integrate those? And if no, could you please explain me.

EDIT: Knowledge of basic principles and definitions only is supposed to be used.

答:
Consider

$$\int_0^{\infty} dx \, x^{-1/2} e^{i \omega x}$$

Substitute $x=u^2$, $dx=2 u du$ and get

$$2 \int_0^{\infty} du \, e^{i \omega u^2}$$

The integral is convergent, and may be proven so using Cauchy's theorem.  Consider

$$\oint_C dz \, e^{i \omega z^2}$$

where $C$ is a wedge of angle $\pi/4$ in the first quadrant and radius $R$.  This integral over the closed contour is zero, and at the same time is

$$\int_0^R dx \, e^{i \omega x^2} + i R \int_0^{\pi/4} d\phi \, e^{i \phi} e^{-\omega R^2 \sin{2 \phi}} e^{i \omega R^2 \cos{2 \phi}} + e^{i \pi/4} \int_R^0 dt \, e^{-\omega t^2} = 0$$

The second integral, because $\sin{2 \phi} \ge 4 \phi/\pi$, has a magnitude bounded by $\pi/(4 \omega R)$, which vanishes as $R \to \infty$.  Therefore

$$\int_0^{\infty} dx \, e^{i \omega x^2} = e^{i \pi/4} \int_0^{\infty} dt \, e^{-\omega t^2} = e^{i \pi/4} \sqrt{\frac{\pi}{\omega}}$$

Therefore

$$\int_0^{\infty} dx \, x^{-1/2} e^{i \omega x} = (1+i)\sqrt{\frac{2 \pi}{\omega}}$$

The Fourier cosine and sine transforms follow from taking the real and imaginary parts of the above.  Note the dependence on $\omega^{-1/2}$ times some scale factor.


问:
Is $\tan(\alpha/2)=(1-\cos\alpha)/\sin \alpha, \,?$
Is it true that

$$\bbox[5px,border:2px solid #138D75]{\tan\left(\frac {\alpha}2\right)=\frac{1-\cos\alpha}{\sin \alpha}, \quad ?} \tag1$$

My solution:
First, we note that the expression $\tan \left ( \frac{\alpha}{2} \right )$ makes sense when $\alpha \neq \pi + 2k\pi, k \in \mathbb{Z}$: henceforth, we will assume that this condition is met.

By definition of tangent function, we have: $$\tan \left ( \frac{\alpha}{2} \right ) = \frac{ \sin \left ( \frac{\alpha}{2} \right )}{\cos \left ( \frac{\alpha}{2} \right )}$$

When $\alpha \neq 2k \pi, k \in \mathbb{Z}$, we can multiply numerator and denominator by $\sin \left ( \frac{\alpha}{2} \right )$, because this quantity is non-zero. We therefore get:

$$\tan \left ( \frac{\alpha}{2} \right ) = \frac{ \sin^2 \left ( \frac{\alpha}{2} \right )}{\cos \left ( \frac{\alpha}{2} \right ) \cdot \sin \left ( \frac{\alpha}{2} \right )}. $$

For what we saw earlier: $$\sin^2 \left ( \frac{\alpha}{2} \right ) = \frac{1 - \cos \alpha}{2}$$and instead, applying the sine duplication formula: $$\cos \left ( \frac{\alpha}{2} \right ) \cdot \sin \left ( \frac{\alpha}{2} \right ) = \frac{1}{2} \sin \alpha$$

In conclusion we get the following formula: $$\tan \left ( \frac{\alpha}{2} \right ) = \frac{ 1 - \cos \alpha}{\sin \alpha}.$$

If in the expression of the tangent we had multiplied numerator and denominator by $\cos \left ( \frac{\alpha}{2} \right )$ then with steps similar to what we have done we get another formula:$$\bbox[5px,border:2px solid #118D45]{\tan \left ( \frac{\alpha}{2} \right ) = \frac{\sin \alpha}{1 + \cos \alpha}}. \tag 2 $$

We note that it always holds $\cos \left ( \frac{\alpha}{2} \right ) \neq 0$ since we have imposed $\alpha \neq \pi + 2k\pi, k \in \mathbb{Z}$ (and this entitles us to multiply numerator and denominator by this term).

Is there a faster and more immediate proof of the $(1)$ or $(2)$?

答:
By request, I am writing my comment as an answer:

I think there is a small technicality: you only assumed in your proof that $α≠π+2πk$, but you used that $α≠2πk$. It would be better to remark at the start of the proof that the LHS only makes sense when $α≠π+2πk$ (as you did) and that the RHS only makes sense when $\alpha≠πk$ (and therefore we should assume that $α≠πk$ for this proof).


问:
What operations do I do in an inequality to raise a number to the variable?
Suppose we have $f(x)=x^2+2x$ and an interval of $[0,1]$. What I normally do to find a range in that interval is:

Ok. that's the easy part. I need do the same, but with $f(x)=3^-x$

Here is my question. Normally I do operations such as addition, subtraction, empowerment, but how do I get to that expression by starting only from $x$?

答:
Let's say you have an inequality $$a \leq b \leq c$$
If $f$ is monotonically increasing on the interval $[a,c]$, then applying $f$ keeps the inequalities the same:
$$f(a) \leq f(b) \leq f(c).$$
If $f$ is monotonically decreasing, it's the opposite: $$f(a) \geq f(b) \geq f(c).$$

Monotonic functions include addition, subtraction, multiplication by a scalar, exponent, log, and power. You can graph any function on desmos.com/calculator to check.

Here's $f(x) = 3^{-x}$ for example:

since $f(x) = 3^{-x}$ is monotonic decreasing, on [1,2], it switches the order:
$$ 1 \leq x \leq 2 \text{ implies } 3^{-1} \geq 3^{-x} \geq 3^{-2}.$$


问:
Help with basic modular arithmetic question
I asked this question moments ago but it was closed despite the link being non-applicable to my question. I need help solving the below basic modular problem,

Show that $39$ divides $17^{48}-5^{24}$

My course has NOT covered Fermat's Theorem. The only properties of modular arithmetic I know are additivity, multiplicativity, symmetry, and transitivity. My professor wants me to solve this question only using these basic properties, but I have honestly no idea how to do so. I don't know what pattern I'm supposed to recognize.

答:
I'll provide two proofs. The second one is probaly the one you're looking for

$17^{48}-5^{24}=(17^{16})^3-(5^{4})^6(mod 39)$

By Euler Totient Theorem, you have thats equal to

$1^3-1^6=1-1=0(mod 39)$, Thus, it is divisible by 39

Second proof:

$17^{48}=(17^2)^{24}=(-1)^{24}=1 (mod39) $

$5^{24}=(5^3)^8=8^8=(8^4)^2=1^2=1 (mod 39)$

Together, you get $1-1=0 (mod 39)$. Thus, it is proven


问:
Existence of subsequences $a_{n_k}$ that converges to a value between $\liminf a_n$ and $\limsup a_n$
I am stuck on this question:

Suppose $a_n$ is a sequence with $\liminf a_n=s$ and $\limsup a_n=t$ where $s$ and $t$ are real number. Then there must exist some subsequence $a_{n_k}$ that converges to $c$ where $s<c<t$.

For example, if $\lim\inf a_n=1$ and $\lim\sup a_n=3$, then does there exist a subsequence that converges to 2?

I think it is yes, because every bounded sequence has a convergent subsequence. However, I am not fully sure how to argue it.

答:
No, take $a_n=(-1)^n$.

Then, $\liminf a_n =-1$, $\limsup a_n =1$.

However, any converging subsequence converges to either $-1$ or $1$.


问:
Statistic - different question (person's breathing )
Research psychologists are interested in finding out whether a person's breathing patterns are affected by a particular experimental treatment. To determine the general respiratory patterns of the $n=30$ people in the study, the researchers collected some baseline measurements - the total ventilation in liters of air per minute adjusted for body size - for each person before the treatment. The data are shown here:

$$\begin{matrix}
5.23 & 7.79 & 5.83 & 5.37 & 4.35 & 5.54 & 6.04 & 5.48 & 6.58 & 4.82 \\
5.92 & 5.38 & 6.34 & 5.12 & 5.14 & 4.72 & 5.17 & 4.99 & 4.51 & 5.70 \\
4.67 & 5.77 & 5.84 & 6.19 & 5.58 & 5.72 & 5.16 & 5.32 & 4.96 & 5.63
\end{matrix}$$

I want to find the sample mean, median and standard deviation, then I want to construct a stem-and-leaf plot. How could I describe the shape of the distribution? How large or small does a ventilation measurement have to be before it is considered unusual?

thanks for your help :)

I use Mathematica and I obtained :
$$\begin{array}{c|c}
\mbox{Stem} & \mbox{Leaves} \\ \hline
4 & 45778\\
5 & 00112223445566778889\\
6 & 0236\\
7 & 8
\end{array}$$

but my teacher said is not ok!

can you help me please:)

答:
The mean/average is simply: $\dfrac{\Sigma x}{n}$

To get the median, you need to sort the data from smallest to largest and find the $\dfrac{n+1}{2}th$ term. Since you will get $15.5th$ term, find the mean/average of the $15th$ and $16th$ term.

The standard deviation is given by: $\sqrt{\dfrac{\Sigma x^2}{n} - \left(\dfrac{\Sigma x}{n}\right)^2}$.

As for the stem & leaf diagram, I would make the units as the stem, and the decimals as the leaves.

For instance, the first row will be like this:

```<code>4 | 45 82
5 | 23 37 48 54 83
6 | 04 58
7 | 79
</code>```

How to fill it:

The first number is 5.23, so on the branch with "5", put "23" next to it.

Next comes 7.79, put "79" next to "7".

Third comes 5.83. Now, you will need to put this in the branch "5", and there, you already have "23". Put it after "23" since $83>23$.

Next is 5.37. This goes in the branch "5" as well, and since $23<37<83$, you will put "37" between "23" and "83".

On a computer it's easy to fill in it, but on paper, you will have to sort the sample from smallest to largest, so that you don't miss smaller amounts. In the above case on paper, you would have to cut/erase 83 to make room for 37.

Body:
The mean/average is simply: $\dfrac{\Sigma x}{n}$

To get the median, you need to sort the data from smallest to largest and find the $\dfrac{n+1}{2}th$ term. Since you will get $15.5th$ term, find the mean/average of the $15th$ and $16th$ term.

The standard deviation is given by: $\sqrt{\dfrac{\Sigma x^2}{n} - \left(\dfrac{\Sigma x}{n}\right)^2}$.

As for the stem & leaf diagram, I would make the units as the stem, and the decimals as the leaves.

For instance, the first row will be like this:

4 | 45 82
5 | 23 37 48 54 83
6 | 04 58
7 | 79

How to fill it:

The first number is 5.23, so on the branch with "5", put "23" next to it.

Next comes 7.79, put "79" next to "7".

Third comes 5.83. Now, you will need to put this in the branch "5", and there, you already have "23". Put it after "23" since $83>23$.

Next is 5.37. This goes in the branch "5" as well, and since $23<37<83$, you will put "37" between "23" and "83".

On a computer it's easy to fill in it, but on paper, you will have to sort the sample from smallest to largest, so that you don't miss smaller amounts. In the above case on paper, you would have to cut/erase 83 to make room for 37.


答:
We could multiply both sides by $\sinα$

Then on the LHS use the double angle for $\sinα = 2\sin(α/2) \cos(α/2)$ and put $\tan(α/2)=\sin(α/2)/\cos(α/2)$  then the LHS becomes $2\sin^2(α/2)$.

The RHS is the same as $1-\cosα = 1-(1-2\sin^2(α/2))$ from a double angle formula for $\cosα$, so it's true.

Title: Is $\tan(\alpha/2)=(1-\cos\alpha)/\sin \alpha, \,?$

Body:
Is it true that

$$\bbox[5px,border:2px solid #138D75]{\tan\left(\frac {\alpha}2\right)=\frac{1-\cos\alpha}{\sin \alpha}, \quad ?} \tag1$$

My solution:
First, we note that the expression $\tan \left ( \frac{\alpha}{2} \right )$ makes sense when $\alpha \neq \pi + 2k\pi, k \in \mathbb{Z}$: henceforth, we will assume that this condition is met.

By definition of tangent function, we have: $$\tan \left ( \frac{\alpha}{2} \right ) = \frac{ \sin \left ( \frac{\alpha}{2} \right )}{\cos \left ( \frac{\alpha}{2} \right )}$$

When $\alpha \neq 2k \pi, k \in \mathbb{Z}$, we can multiply numerator and denominator by $\sin \left ( \frac{\alpha}{2} \right )$, because this quantity is non-zero. We therefore get:

$$\tan \left ( \frac{\alpha}{2} \right ) = \frac{ \sin^2 \left ( \frac{\alpha}{2} \right )}{\cos \left ( \frac{\alpha}{2} \right ) \cdot \sin \left ( \frac{\alpha}{2} \right )}. $$

For what we saw earlier: $$\sin^2 \left ( \frac{\alpha}{2} \right ) = \frac{1 - \cos \alpha}{2}$$and instead, applying the sine duplication formula: $$\cos \left ( \frac{\alpha}{2} \right ) \cdot \sin \left ( \frac{\alpha}{2} \right ) = \frac{1}{2} \sin \alpha$$

In conclusion we get the following formula: $$\tan \left ( \frac{\alpha}{2} \right ) = \frac{ 1 - \cos \alpha}{\sin \alpha}.$$

If in the expression of the tangent we had multiplied numerator and denominator by $\cos \left ( \frac{\alpha}{2} \right )$ then with steps similar to what we have done we get another formula:$$\bbox[5px,border:2px solid #118D45]{\tan \left ( \frac{\alpha}{2} \right ) = \frac{\sin \alpha}{1 + \cos \alpha}}. \tag 2 $$

We note that it always holds $\cos \left ( \frac{\alpha}{2} \right ) \neq 0$ since we have imposed $\alpha \neq \pi + 2k\pi, k \in \mathbb{Z}$ (and this entitles us to multiply numerator and denominator by this term).

Is there a faster and more immediate proof of the $(1)$ or $(2)$?


Title: Help with basic modular arithmetic question

Body:
I asked this question moments ago but it was closed despite the link being non-applicable to my question. I need help solving the below basic modular problem,

Show that $39$ divides $17^{48}-5^{24}$

My course has NOT covered Fermat's Theorem. The only properties of modular arithmetic I know are additivity, multiplicativity, symmetry, and transitivity. My professor wants me to solve this question only using these basic properties, but I have honestly no idea how to do so. I don't know what pattern I'm supposed to recognize.

Body:
Well $\mod 3$ it's easy to see $17^{48} - 5^{24} \equiv (-1)^{48}-(-1)^{24} \equiv 0 \pmod 3$ so $3|17^{48}-5^{24}$.

And $\mod {13}$ we see $17^{48} - 5^{24} \equiv 4^{48} - 5^{24}\equiv 16^{24} - 5^{24} \equiv 3^{24}-5^{24}\pmod {13}$

Now... can't use Fermat (which makes short work) so we use sequential squaring.

$3^2\equiv 9$ and $3^3 \equiv 27 \equiv 1\pmod {13}$.  And $5^2 \equiv 25 \equiv -1\pmod {13}$

So $3^{24} - 5^{24} \equiv 27^8 - 25^{12} \equiv 1^8 - (-1)^{12} \equiv 1 - 1 \equiv 0\pmod{13}$

So $13|17^{48} - 5^{24}$.

So $\operatorname{lcm}(3,13) = 39|17^{48} - 5^{24}$.


答:
Here are geometric proofs, which I believe are "faster and more immediate", as the OP desired.

All you need is the "circle theorem" that "the angle at the circumference is half the angle at the center".

First, the (somewhat easier) proof for $$\tan\left(\frac{\alpha}{2}\right)=\frac{\sin{\alpha}}{1+\cos\alpha}$$

Second, the one OP requested, that $$\tan\left(\frac{\alpha}{2}\right)=\frac{1-\cos\alpha}{\sin\alpha}$$

I recognise that the picture works only for acute $\alpha$, but it is easy to see how it can work for obtuse or reflex $\alpha$.


答:
Those two exponents are very even (meaning have many factors of $2$), so let's apply difference of squares a few times, hoping that we can get a useful factor that is much smaller.

\begin{align*}
17^{48} - 5^{24} &= (17^{24} - 5^{12})(17^{24} + 5^{12})  \\
    &= (17^{12} - 5^{6})(17^{12} + 5^{6})(17^{24} + 5^{12})  \\
    &= (17^{6} - 5^{3})(17^{6} + 5^{3})(17^{12} + 5^{6})(17^{24} + 5^{12})
\end{align*}

$39 = 3 \cdot 13$.  If $3$ divides any of these factors and $13$ divides any of these factors, $39$ divides the original quantity.  If $3$ divides a quantity, that quantity is congruent to $0 \pmod{3}$.  If $13$ divides a quantity, that quantity is congruent to $0 \pmod{13}$.

Let's compute $17^6  - 5^3 \pmod{3}$.  \begin{align*}
17^6 &\cong (-1)^6 \pmod{3}  \\
    &\cong 1 \pmod{3}  \text{ and }  \\
5^3 &\cong 1^3 \pmod{3}  \\
    &\cong 1 \pmod{3}  \text{, so}  \\
17^6 - 5^3 &\cong 1 - 1 \pmod{3}  \\
    &\cong 0 \pmod{3}  \text{.}
\end{align*}
Therefore, $3$ divides the first factor.

Now let's compute $17^6  - 5^3 \pmod{13}$.  It is useful to note that $6 = 4+2 = 110_2$ in binary, so $17^6 = 17^{4+2} = 17^4 \cdot 17^2$ and we can get $17^4$ by squaring $17^2$.  (For more on this, see exponentiation by squaring and its application to modular exponentiation.)
\begin{align*}
17^2 &\cong (4)^2 \pmod{13}  \\
    &\cong 16 \pmod{13}  \\
    &\cong 3 \pmod{13}  \text{ and }  \\
17^4 &\cong (17^2)^2 \pmod{13}  \\
    &\cong (3)^2 \pmod{13}  \\
    &\cong 9 \pmod{13}  \text{ so }  \\
17^6 &\cong 17^4 \cdot 17^2 \pmod{13}  \\
    &\cong 9 \cdot 3 \pmod{13}  \\
    &\cong 27 \pmod{13}  \\
    &\cong 1 \pmod{13}  \text{ and also }  \\
5^3 &\cong 5 \cdot 5 \cdot 5 \pmod{13}  \\
    &\cong 25 \cdot 5 \pmod{13}  \\
    &\cong (-1) \cdot 5 \pmod{13}  \\
    &\cong 8 \cdot 5 \pmod{13}  \text{ so }  \\
17^6 - 5^3 &\cong 1 - 8 \pmod{13}  \\
    &\cong -7 \pmod{13}  \\
    &\cong 6 \pmod{13}  \text{.}
\end{align*}

So $13$ doesn't divide the first factor.  How about the second factor?  \begin{align*}
17^6 + 5^3 &\cong 1 + 8 \pmod{13}  \\
    &\cong 9 \pmod{13}
\end{align*}

Nope.  The third factor?  \begin{align*}
17^{12} + 5^6 &\cong (17^6)^2 + (5^3)^2 \pmod{13}  \\
    &\cong 1^2 + 8^2 \pmod{13}  \\
    &\cong 65 \pmod{13}  \\
    &\cong 5 \cdot 13 \pmod{13}  \\
    &\cong 0 \pmod{13}  \\
\end{align*}

So $13$ divides the third factor.  Therefore, $39$ divides the given quantity.

Here's another method that is more direct.

\begin{align*}
17^{48} - 5^{24}
    &\cong 17^{3 \cdot 2 \cdot 2 \cdot 2 \cdot 2 } - 5^{3 \cdot 2 \cdot 2 \cdot 2}  \pmod{39}  \\
    &\cong (17^3)^{2 \cdot 2 \cdot 2 \cdot 2 } - (5^3)^{2 \cdot 2 \cdot 2}  \pmod{39}  \\
    &\cong (4913)^{2 \cdot 2 \cdot 2 \cdot 2 } - (125)^{2 \cdot 2 \cdot 2}  \pmod{39}  \\
    &\cong (125\cdot 39 + 38)^{2 \cdot 2 \cdot 2 \cdot 2 } - (3 \cdot 39 + 8)^{2 \cdot 2 \cdot 2}  \pmod{39}  \\
    &\cong (38)^{2 \cdot 2 \cdot 2 \cdot 2 } - (8)^{2 \cdot 2 \cdot 2}  \pmod{39}  & & \text{[alt.: note that $38 \cong -1 \pmod{39}$]}  \\
    &\cong (38^2)^{2 \cdot 2 \cdot 2 } - (8^2)^{2 \cdot 2}  \pmod{39}  \\
    &\cong (37 \cdot 39 +1)^{2 \cdot 2 \cdot 2 } - (1 \cdot 39 + 25)^{2 \cdot 2}  \pmod{39}  \\
    &\cong (1)^{2 \cdot 2 \cdot 2 } - (25)^{2 \cdot 2}  \pmod{39}  \\
    &\cong 1 - (25)^{2 \cdot 2}  \pmod{39}  \\
    &\cong 1 - (25^2)^{2}  \pmod{39}  \\
    &\cong 1 - (16 \cdot 39 + 1)^{2}  \pmod{39}
    &\cong 1 - (1)^{2}  \pmod{39}  \\
    &\cong 0  \pmod{39}  \text{,}
\end{align*}
so $39$ divides the gven quantity.


问:
If $2+\log_2a=3+\log_3b=\log_6(a+b)$, find $\frac1a+\frac1b$ and $\log_{ab}\left(\frac1a+\frac1b\right)$
I have a kind of system of equations with logarithms.
How do I get to the expression that the problem asks for?
(Taken from the net.)

If $a>0$ and $b>0$ and it is given that
$$2+\log_{2}{a} =3+\log_{3}{b}=\log_{6}{(a+b)}$$

find the value of

a) $\quad\dfrac{1}{a}+\dfrac{1}{b}$

b) $\quad\log_{ab}{\left(\dfrac{1}{a}+\dfrac{1}{b}\right)}$

Edit 1
I have related the first with the third and the second with the third to form a system of equations, but the values that come out are not very comfortable to deal with, I do not know if I am wrong or if the problem is like that.

$$2+\log_{2}{a}=\log_{6}{(a+b)}$$
$$3+\log_{3}{b=}\log_{6}{(a+b)}$$

Edit 2 :I have reformulated the problem by splitting it in two

答:
I think this problem is best approached backwards.

$$\begin{align}\log_{ab}\bigg(\frac1a+\frac 1b\bigg)=\log_{ab}\bigg(\frac{a+b}{ab}\bigg)=\log_{ab}(a+b)-1\\=\frac{\log_6(a+b)}{\log_6(ab)}-1=\frac{\log_6(a+b)}{\log_6(a)+\log_6(b)}-1=\frac{\log_6(a+b)}{\frac{\log_2(a)}{1+\log_2(3)}+\frac{\log_3(b)}{1+\log_3(2)}}-1\\=\frac{\log_3(6)\log_6(a+b)}{\log_3(2)\log_2(a)+\log_3(b)}-1=\frac{\log_3(108)}{\log_3(2)\log_2(a)+(\log_2(a)-1)}\\=\frac{\log_3(108)}{\log_3(ab)}=\log_{ab}(108)\end{align}$$
which implies that $\frac 1a+\frac 1b=108$, as others found.

I can't yet find the last step needed to finish it (without approximating $a$ and $b$) but I think I'm close.


答:
For Sample mean, just add up all the observations and divide the result by the total number of observations.

For Sample median, sort the data and then find the average of $\dfrac{n}{2}$th term and $\left(\dfrac{n}2{+1}\right)$th term (Since the number of observations is even).

For Sample standard deviation, apply the formula,

$$S=\sqrt{\frac{\sum_{i=1}^n(X_i-\bar{X})^2}{n-1}}$$

Where $S$ is the Sample standard deviation, $X_i$ is the $i$th observation, $\bar{X}$ is sample mean and $n$ is the number of observations.

For the shape of the distribution, you can find the measure of skewness and kurtosis.

The last part is $\text{Sample Mean}\pm\text{Sample Standard Deviation}$.

Title: Statistic - different question (person's breathing )

Body:
Research psychologists are interested in finding out whether a person's breathing patterns are affected by a particular experimental treatment. To determine the general respiratory patterns of the $n=30$ people in the study, the researchers collected some baseline measurements - the total ventilation in liters of air per minute adjusted for body size - for each person before the treatment. The data are shown here:

$$\begin{matrix}
5.23 & 7.79 & 5.83 & 5.37 & 4.35 & 5.54 & 6.04 & 5.48 & 6.58 & 4.82 \\
5.92 & 5.38 & 6.34 & 5.12 & 5.14 & 4.72 & 5.17 & 4.99 & 4.51 & 5.70 \\
4.67 & 5.77 & 5.84 & 6.19 & 5.58 & 5.72 & 5.16 & 5.32 & 4.96 & 5.63
\end{matrix}$$

I want to find the sample mean, median and standard deviation, then I want to construct a stem-and-leaf plot. How could I describe the shape of the distribution? How large or small does a ventilation measurement have to be before it is considered unusual?

thanks for your help :)

I use Mathematica and I obtained :
$$\begin{array}{c|c}
\mbox{Stem} & \mbox{Leaves} \\ \hline
4 & 45778\\
5 & 00112223445566778889\\
6 & 0236\\
7 & 8
\end{array}$$

but my teacher said is not ok!

can you help me please:)


问:
Stationary Distribution of a Stochastic Processes
A Markov Chain with states 0,1,... has transition probabilities
$$p_{jk}=e^{-a} \sum_{r=0}^k \left( \begin{matrix} j \\ r \end{matrix} \right) p^r (1-p)^{j-r} a^{k-r} / (k-r)!$$
Show that the limiting distribution $\{ v_k\}$ is Poisson with parameter $a/(1-p)$.

My attempt was using:

$$ \sum_{k=0}^\infty p_{jk} = 1 $$ and

$$ v_k = \sum_{j=0}^\infty v_j p_{jk} $$

But I am really out of order on how to simplify

$$ v_k = \sum_{j=0}^\infty v_j e^{-a} \sum_{r=0}^k \left( \begin{matrix} j \\ r \end{matrix} \right) p^r (1-p)^{j-r} a^{k-r} / (k-r)! $$

答:
This is not a complete answer but rather adds some detail to the excellent conceptual explanation via branching with immigration given  by John Dawkins. the key identity (1)  is not derived there but relegated to generating functions. Alternatively, (1)  can be justified by combining two standard operations on Poisson processes, thinning and superposition, see [1], [2] or [3].  Consider first $\mu$ as an unknown parameter. Thinning a Poisson$(\mu)$ process with thinning probability $p$ yields a Poisson$(\mu p)$ process and superimposing an independent  Poisson$(a)$ process
will then yield a Poisson$(\mu p+a)$ process. Solving $\mu p+a=\mu$ gives $\mu=a/(1-p)$.

[1] https://en.wikipedia.org/wiki/Point_process_operation

[2] https://www.randomservices.org/random/poisson/Splitting.html

[3] Thinning a Poisson Process


问:
Simplifying $z^2+i=0$
I need to simplify $z^2+i=0$ and find all solutions for $z$. I have seen that the solutions to $z=\sqrt{i}=\left(\frac{1}{\sqrt{2}}+i\frac{1}{\sqrt{2}}\right)$ and $\left(-\frac{1}{\sqrt{2}}-i\frac{1}{\sqrt{2}}\right)$. I was hoping to find a similar solution for $z=\sqrt{-i}\,$ but my attempt gives me $z=\pm i^{\frac{3}{2}}$

$$z=re^{i\theta} \,\,\& \,\, e^{i\pi}=-1 $$
then,
$$(re^{i\theta})^2=-i\\r^2e^{i2\theta}=ie^{i\pi+k(2\pi)}$$ where $k\in\mathbb{Z}$.

So, we have $\begin{cases} r^2=i \,\,\,\therefore r=\sqrt{i}\\ \theta=k\pi
\end{cases}$

Then, $$z_k=\sqrt{i} \, e^{i\left(\frac{\pi}{2}+k\pi\right)}$$

$$z_0=\sqrt{i}\left(\cos\frac{\pi}{2}+i\sin\frac{\pi}{2}\right)=i^\frac{3}{2}\\
z_1=\sqrt{i}\left(\cos(\frac{\pi}{2}+1)+i(\sin\frac{\pi}{2}+1)\right)=-i^\frac{3}{2}$$

I realized that this is literally the same as just solving $z=\sqrt{-i}=i\sqrt{i}=i^\frac{3}{2}$, however, I was hoping to find a solution of the form $x+iy$. I am not sure how to go about this problem a  different way.

答:
Here's the solution to $z^2 = i$. Give $z^2 + i = 0$ a try after looking through this.

You have the right idea in using $ z = re^{i\theta} $. First, note that we can choose $r = 1$ because $|re^{i\theta}| = |r|$, and $|i| = 1$. Then, substitute:

$$ z^2 = i$$
$$ (e^{i\theta})^2 = i $$
$$ e^{i(2\theta)} = i $$
$$ \cos(2\theta) + i\sin(2\theta) = i . $$

Comparing the real parts of the left and right-hand sides, we have

$$ \cos(2\theta) = 0 $$
$$ \Rightarrow 2\theta = \frac{\pi}{2} + \pi k $$
$$ \Rightarrow \theta = \frac{\pi}{4} + \frac{\pi}{2}k $$

Now comparing the imaginary parts, we have

$$ \sin(2\theta) = 1 $$
$$ \Rightarrow 2\theta = \frac{\pi}{2} + 2\pi k $$
$$ \Rightarrow \theta = \frac{\pi}{4} + \pi k $$

The two solutions have an intersection of $ \theta = \frac{\pi}{4} + \pi k $. In one rotation from $\theta = 0$ to $\theta = 2\pi$, that gives us two unique solutions:

$$ \theta = \frac{\pi}{4} \ \text{or} \ \theta = \frac{5\pi}{4} .$$

Substituting these back into $z = e^{i\theta} = \cos(\theta) + i\sin(\theta) $, we get the solutions you pointed out:

$$ \theta = \frac{\pi}{4} \Rightarrow z = \frac{\sqrt{2}}{2}+\frac{\sqrt{2}}{2}i , $$
$$ \theta = \frac{5\pi}{4} \Rightarrow z = -\frac{\sqrt{2}}{2}-\frac{\sqrt{2}}{2}i . $$

Now, for $z^2 = -i$, the solution should be a rotation of $\frac{\pi}{2}$ from the solution we got here, i.e., you should get to $\theta = \frac{3\pi}{4} \ \text{or} \ \frac{7\pi}{4}$.

Title: Simplifying $z^2+i=0$


问:
Normal Distribution - percentiles
i have this closed question,
I don't know how to solve it, I have only the answer but I would like to understand the solution and know how to solve them,
Thank you!

1.From a population that is normally distributed in which the 44th percentile is 44, a sample of 44 participants is taken. The probability that the sample's average will be higher than 44 is:

28%

51%

56%

84% (The right answer)

Thanks

答: The question doesn't state the mean or the standard deviation of the population, so these two variables will vary together. Using some experimentation, I found that a normal distribution with mean $50$ with a 44th percentile of 44 has a standard deviation of about 40. Then the probability that a sample of size 44 will have an average greater than 44 is given by $P\left(Z>\frac{44-50}{40/\sqrt{44}}\right)\approx 0.84012882$. Seeing as there are infinitely many distributions that satisfy the criterion given in the problem, I tried a normal distribution with mean $10^9$ having standard deviation $6.7*10^9$ with a 44th percentile still at 44. The probability that your sample mean from a sample of size 44 is greater than 44 is still about $0.838922$. So the normal distribution's percentiles are very robust.

Title: Normal Distribution - percentiles


问:
Proper notation for defining a repeating sequence?
How would one go about properly defining a sequence that, say, repeats the integers $\{1, 2, 3, \dots, n\}$ infinitely many times? Seemed very simple at first, but currently grappling with the proper way to go about this. If anyone could offer some insight that would be much appreciated.

Edit: For clarity, I mean a sequence of the form $\{1, 2, 3, \ldots n, 1, 2, 3, \ldots n, 1, 2, 3, \ldots n, \ldots\}$

Body:
Set $a_1 = 1, a_2 = 1 +_n a_1 , a_{m+1} = 1+_n \,a_m$ where $+_n$ is addition modulo n on the set $\{1,\ldots,n\}$. That is $1 +_n 1 =2, 2+_n 1 =3, \ldots n-1 +_n 1 = n, n+_n 1 = 1, \ldots$

Then $a_1 = 1, \ldots a_n = n, a_{n+1} = 1, \ldots a_{n+n} = n, a_{2n+1} = 1, \ldots$


问:
Coupled Diffusion Equations
I am trying to solve the following coupled-diffusion equation
\begin{align}
\frac{\partial a(x,t)}{\partial t}&= D \frac{\partial^2 a(x,t)}{\partial x^2} \\
\frac{\partial b(x,t)}{\partial t}&=-v \frac{\partial b(x,t)}{\partial x}-\mu a(x,t) b(x,t) \\
\frac{\partial c(x,t)}{\partial t}&= \gamma \frac{\partial^2 c(x,t)}{\partial x^2}+k b(x,t)
\end{align}

for the functions $a(x,t), b(x,t)$ and $c(x,t)$, subject to boundary conditions
$a(x,t\rightarrow \infty)=0$,
$\frac{\partial c(x,t)}{\partial(x)}|_{x=0}=-\frac{\partial a(x,t)}{\partial x}|_{x=0}$,$a(L,t)=a_L$, $b(L,t)=b_L$, $c(L,t)=c_L$, and $\frac{\partial c(x,t)}{\partial x}|_{x=L}=0$,
where $D, v, \mu,\gamma, k$, $a_L$, $b_L$ and $c_L$ are constants.

I tried to attack this problem using, first, the separation of variables method. Although I do obtain a "simple" answer for $a(x,t)$ written in terms of exponentials, I am stuck at the second equation. More precisely, this term with $-\mu a(x,t) b(x,t)$ became a nightmare to me. I would try Fourier transform, which could work because I have the ansatz for a$(x,t)$, but I really don't know how to proceed from that.

答:
Here's one approach. I've indicated the methods used, so you can search for them online. A step by step solution would be far too lengthy for this post.

The solution for $A(x,t)$ is

$$
A(x,t)=\int\limits_{-\infty}^{\infty}dx' \ G_0(x,x',t,0)A_0(x')
$$

Where $G_0$ is the free space Green's function of the diffusion equation

$$
G_0(x,x',t,t')=\frac{H(t-t')}{\sqrt{4 \pi \gamma (t-t')}} \exp \left[ -\frac{(x-x')^2}{4 \gamma (t-t')}\right]
$$

Where $H$ is the Heaviside step function. So that we have

$$
A(x,t)=\frac{1}{\sqrt{4 \pi D t}}\int\limits_{-\infty}^{\infty}dx' \ A_0(x') \exp \left[ -\frac{(x-x')^2}{4Dt}\right]
$$

Similar to what was posted in the comments, but note that this is an integral over the initial condition $A_0(x)$. The same solution can be found by Fourier analysis or separation of variables. I'm writing it like this because $G_0$ will be useful later. Fourier transforms on the $B$ equation won't be fruitful because the transform of $AB$ is a convolution. Using the method of characteristics, we write

$$
\partial_tB+\nu\partial_xB=-\mu AB
$$

While the chain rule says

$$
\frac{dB}{ds}=\frac{dx}{ds} \partial_x B +\frac{dt}{ds}\partial_t B
$$

So the characteristic curves are given by $\frac{dx}{ds}=\nu$, $\frac{dt}{ds}=1$, and $\frac{dB}{ds}=-\mu AB$. With the boundary data on $B(L,t)=B_L$, we parameterize the curves such that $x(s=0)=L$. The first two equations yield

$$
x(s)=\nu s +L \\
t(s)=s+t_0
$$

The equation for $B$ may be integrated

$$
\frac{dB}{B}=-\mu A(s) ds
$$

Where $A(s)=A(x(s),t(s))=A(\nu s+L,s+t_0)$, we have

$$
B(s)=\beta(t_0) \exp \left[-\mu \int\limits_0^s ds' A(s') \right]
$$

The unknown function $\beta$ is found by applying $B(L,t)=B_L$

$$
B(x,t)=B_L \exp \left[-\mu \int\limits_0^s ds' A(s') \right]_{t_0=t-\frac{x-L}{\nu} \ ; \ \ s=\frac{x-L}{\nu}}
$$

The third equation is a diffusion equation with source term $B(x,t)$. I'm considering the problem for $C$ over the finite domain $0<x<L$. The solution is given by an integral over the diffusion equation Green's function $G(x,t)$. Schematically

$$
C(x,t)=\int dx' \int dt' \  G(x,x',t,t') \ B(x',t')
$$

However, we must construct $G$ to fulfill the boundary conditions $C(0,t)=0$ and $\partial_x C(L,t)=0$; there are many ways to do this. I think it's simplest using the eigenfunction expansion

$$
G(x,x',t,t')=\sum_{n=1}^\infty  \phi_n(x) \phi_n(x') \exp \left[-\gamma(t-t') \left( n \pi + \pi/2\right)^2 \right] \\
\phi_n(x) =\sqrt{\frac{2}{L}} \sin \left( \frac{\pi x}{L} (n+1/2)\right)
$$

It's not 'obvious'. Note that $\phi_n$ automatically satisfy $C(0,t)=0$ and $\partial_x C(L,t)=0$. So we can now forget about those conditions. Finally we have

$$
C(x,t)=\int\limits_{0}^L dx' \int\limits_0^t dt' \ k B(x',t') \ G(x,x',t,t') + \int\limits_0^L dx' \ C_0(x') \  G(x,x',t,0)
$$

Where $C_0$ is the initial condition on $C$. I think that's as far as we can go without knowing initial conditions. Finally, there is the condition $\partial_x A(0,t)=\partial_x C(0,t)$: if interpreted as a condition on $C$ for known $A$, makes the problem ill posed, as we have already specified the value of $C(0,t)=0$. If interpreted as a condition on $A$, I think we will get a horrible integro-differential equation that $A_0$ must satisfy; just by taking derivatives and equating them.

Title: Coupled Diffusion Equations


答:
Here it is another solution for the sake of curiosity.

Let $z = x + yi$, where $x,y \in \mathbb{R}$. Then we have the following equation:

\begin{align*}
z^{2} + i = 0 & \Longleftrightarrow (x+yi)^{2} = x^{2} - y^{2} + 2xyi = -i\\\\
& \Longleftrightarrow
\begin{cases}
x^{2} - y^{2} = 0\\\\
2xy = -1
\end{cases}\\\\
 & \Longleftrightarrow
\begin{cases}
x = -y\\\\
2y^{2} = 1\\
\end{cases}\\\\
& \Longleftrightarrow
\begin{cases}
x = -\dfrac{1}{\sqrt{2}}\\\\
y = +\dfrac{1}{\sqrt{2}}
\end{cases};
\begin{cases}
x = +\dfrac{1}{\sqrt{2}}\\\\
y = -\dfrac{1}{\sqrt{2}}
\end{cases}
\end{align*}

Hopefully this helps!

Title: Simplifying $z^2+i=0$

Body:
I need to simplify $z^2+i=0$ and find all solutions for $z$. I have seen that the solutions to $z=\sqrt{i}=\left(\frac{1}{\sqrt{2}}+i\frac{1}{\sqrt{2}}\right)$ and $\left(-\frac{1}{\sqrt{2}}-i\frac{1}{\sqrt{2}}\right)$. I was hoping to find a similar solution for $z=\sqrt{-i}\,$ but my attempt gives me $z=\pm i^{\frac{3}{2}}$

$$z=re^{i\theta} \,\,\& \,\, e^{i\pi}=-1 $$
then,
$$(re^{i\theta})^2=-i\\r^2e^{i2\theta}=ie^{i\pi+k(2\pi)}$$ where $k\in\mathbb{Z}$.

So, we have $\begin{cases} r^2=i \,\,\,\therefore r=\sqrt{i}\\ \theta=k\pi
\end{cases}$

Then, $$z_k=\sqrt{i} \, e^{i\left(\frac{\pi}{2}+k\pi\right)}$$

$$z_0=\sqrt{i}\left(\cos\frac{\pi}{2}+i\sin\frac{\pi}{2}\right)=i^\frac{3}{2}\\
z_1=\sqrt{i}\left(\cos(\frac{\pi}{2}+1)+i(\sin\frac{\pi}{2}+1)\right)=-i^\frac{3}{2}$$

I realized that this is literally the same as just solving $z=\sqrt{-i}=i\sqrt{i}=i^\frac{3}{2}$, however, I was hoping to find a solution of the form $x+iy$. I am not sure how to go about this problem a  different way.


问:
Order completion of a linear order
I was considering the following construction in an attempt to "complete" a given linear order:

Given a linearly ordered set  $(X,\leq )$ I denote the set of lower sets in $X$ by $\mathcal{L}(X)$ and order it with respect to inclusion. Since $X$ is linearly ordered, so is $\mathcal{L}(X)$. I think that $X$ embeds in an order preserving sense into $\mathcal{L}(X)$ via

$$ x \overset{i}{\mapsto} \{ y\in x: y<x \}. $$

The notion of completeness I am using here is that every set bounded from above has a supremum and every set bounded from below has an infimum. I think that in the case of linear orders, we can say the following:

"Proposition"

$(i)$ If every lower set $\emptyset \neq A\ \subsetneq X $ is either an open intial segment $\{ y\in X: y<x_0 \}$ or a closed initial segment $\{ y\in X: y\leq x_0 \}$, then every bounded set from above in $X$ has a supremum.

$(ii)$ If every upper set $\emptyset \neq A\ \subsetneq X $ is either an open final segment $\{ y\in X: y>x_0 \}$ or a closed initial segment $\{ y\in X: y\geq x_0 \}$, then every bounded set from below in $X$ has an infimum.

$\mathcal{L}(X)$ satisfies $(i)$, and I think that in a linear order $A$ is a lower set if and only if $A^c$ is an upper set. I therefore think that $\mathcal{L}(X)$ is order complete.

I have a few questions about this:

Does this seem generally correct?

Is this construction essentially the same as Dedekind–MacNeille completion?

It seems like $\mathcal{L}(X)$ is bounded and can therefore not be minimal necessarily. Will defining $\mathcal{L}^+(X)$ the collection of non empty lower sets yield a completion when $X$ is not bounded from below? Likewise, does looking at $\mathcal{L}_-(X)$, the collection of proper lower sets , yields a completion when $X$ is not bounded from above?

答:
Let $\langle X,\le\rangle$ be a linear order, and let $\mathscr{L}(X)$ be the family of lower sets of $X$; then $\langle\mathscr{L}(X),\subseteq\rangle$ is a complete linear order. If $\varnothing\ne\mathscr{A}\subseteq\mathscr{L}$, then $\bigcap\mathscr{A},\bigcup\mathscr{A}\in\mathscr{L}$, and it’s easy to check that $\bigcap\mathscr{A}=\inf\mathscr{A}$ and $\bigcup\mathscr{A}=\sup\mathscr{A}$.

For each $x\in X$ let $x^-=(\leftarrow,x)$ and $x^+=(\leftarrow,x]$; you are embedding $X$ in $\mathscr{L}$ by the map $x\mapsto x^-$, which is indeed order-preserving. You could just as well embed it by sending $x\in X$ to $x^+$, the immediate successor of $x^-$ in $\mathscr{L}(X)$. The fact that you have this choice and are doubling every point of $X$ is an indication that you are not getting the Dedekind-MacNeille completion of $X$. Here is a concrete example.

Let $X=[0,1]\cup[2,3]$, and let $\le$ be the usual linear order on $X$; the order $\langle X,\le\rangle$ is complete, but your construction produces an order isomorphic to $X\times\{0,1\}$ ordered lexicographically. In particular, if we use your embedding, it adds a wholly unnecessary point $1^+$ between the embedded copies, $1^-$ and $2^-$, of $1$ and $2$. The other embedding is no better: $1$ and $2$ embed as $1^+$ and $2^+$, respectively, with $2^-$ an isolated point between them.

The Dedekind-MacNeille completion avoids this by keeping only those $L\in\mathscr{L}(X)$ such that $(L^{\mathrm{u}})^{\mathrm{l}}=L$, where $A^{\mathrm{u}}$ is the set of upper bounds of $A$, and $A^{\mathrm{l}}$ is the set of lower bounds of $A$. It then embeds $x\in X$ as $x^+$. (It’s easily verified that $\left((x^+)^{\mathrm{u}}\right)^{\mathrm{l}}=x^+$, and that $\left((x^-)^{\mathrm{u}}\right)^{\mathrm{l}}=x^+$, so that $x^-$ isn’t in the Dedekind-MacNeille completion of $X$.)

If $L\in\mathscr{L}(X)$, it isn’t hard to verify that $\left(L^{\mathrm{u}}\right)^{\mathrm{l}}=L$ if and only if there is no $x\in X$ such that $L=x^-$: either $L$ is clopen in the order topology, so that it corresponds to a gap in $X$, or $L=x^+$ for some $x\in X$. Thus, the Dedekind-MacNeille completion of $X$ is $\langle\mathscr{L}(X)\setminus X^-,\subseteq\rangle$, where $X^-=\{x^-:x\in X\}$.

Title: Order completion of a linear order


问:
When $\frac{z-1}{z+1}$ is a real number?
I wrote it this way: $\frac{z-1}{z+1} = \frac{(z-1)(\overline{z}+1)}{(z+1)(\overline{z}+1)}=\frac{|z|^2 + z - \overline{z} -1}{|z+1|^2} = \frac{|z|^2 -1+2iImz}{|z+1|^2}$ and
I calculated that for $|z|=1 $ this quotient $ \frac{z-1}{z+1}$ is a purely imaginary number, but I don't know for which $ z $ it is a real number.

答:
Hint: If $z \ne -1$ and $r \ne 1$, then

$
\displaystyle\quad
\frac{z-1}{z+1} = r  \iff z = \frac{1+r}{1-r}
$

$
\displaystyle\quad
r \in \mathbb R \iff \frac{1+r}{1-r} \in \mathbb R
$


问:
Inner product of elements in an orthonomal set and elements in a Hilbert Space
Let $\{e_k : k\in K \}$ be an orthonormal set in a Hilbert space $H$, where $K$ is some arbitrary set.

Let $x \in H$.

Show that for each $n\in \mathbb{N}$, $F_n = \{ k\in K: |\langle e_k, x\rangle|^2 \geq \frac{1}{n}\}$ is finite. Estimate the size of $F_n$,

Show $\{k \in K : |\langle e_k, x\rangle| \ne 0 \}$ is at most countable.

Things I know:

By definition of an orthonormal set, if $e_k \ne x$, then $\langle e_k, x\rangle=0$. Also we have $\| e_k\|=1 $.

Also, the $\{k \in K : |\langle e_k, x\rangle| \ne 0 \}$ is the $(\cup F_n)^c$

From here I'm not sure what to do.

Any help is appreciated!

Thanks!

答:
Probably you mean $\langle e_i,e_j\rangle=0$ for $i\ne j$, an arbitrary $x\in H$ need not be orthogonal to the basis elements.

For any vector $x\in H$ and finite subset $I\subseteq K$ let $x_I$ denote the orthogonal projection of $x$ to ${\rm span}(e_i:i\in I)$, that is,
$$x_I=\sum_{i\in I}\langle x,e_i\rangle e_i$$
and because it's a projection of $x$, we have $\|x_I\|\le\|x\|$.

Now, if $I\subseteq F_n$, then
$$\|x\|^2\ge\|x_I\|^2=\sum_{i\in I}|\langle x,e_i\rangle|^2\ge\frac{|I|}n$$
which implies $|I|\le n\,\|x\|^2$.

$\{k\in K:\langle x,e_k\rangle\ne 0\}=\bigcup_{n\in\Bbb N}F_n$ and not the complement of the union.

A countable union of finite sets is countable.


问:
Solve for integer values of $x,y,z$: $\frac{xy}{z} + \frac{xz}{y} + \frac{yz}{x} = 3$
Solve for integer values of $x,y,z$;
$$\frac{xy}{z} + \frac{xz}{y} + \frac{yz}{x} = 3.$$

My attempt:

Note that all $x, y, z$ are non-zero, otherwise a denominator would be zero.

Mutliplying by $xyz$ gives:
$$
x^2y^2+x^2z^2+y^2z^2 = 3xyz
$$

Since (from 1.) the left hand side (LHS) is strictly positive, then $xyz \gt 0$

Exploring the LHS of the equation from 1.:
$$
2x^2y^2+2x^2z^2+2y^2z^2 = (xy-xz)^2+(xy-yz)^2+(xz-yz)^2+2xyz(x+y+z)
$$
therefore
$$
x^2y^2+x^2z^2+y^2z^2 \geq xyz(x+y+z)
$$

Replacing LHS of the last inequation by $3xyz$ (according to 2.) gives:
$$3xyz \geq xyz(x+y+z)$$  and since (from 3.) $xyz$ is positive, we can divide both  sides by $xyz$, obtaining: $$x+y+z \leq 3$$

$xyz$ can be positive in two cases:

Case I.    $x, y, z$ are all positive. In this case $x \geq 1$, $y \geq 1$, $z \geq 1$,
so
$$
x+y+z \geq 3
$$
but according to 5. this must be an equation. Therefore all inequations for $x$, $y$ and $z$ must turn into equations, so $x=y=z=1$.

Case II.   One of $x, y, z$ is positive, two others are negative. Without loss of generality we can assume $x \gt 0$, $y \lt 0$,  $z \lt 0$

...

答:
Hint: If $(x,y,z)$ is a solution, then show that so is $(x,-y,-z)$ and other cyclical permutations. This then severely restricts the values of $|x|, |y|, |z|$ can take after you have derived the inequality:
$$x+y+z\leq 3. $$


答:
... then write $m = -y, n = -z$. Then $x,m,n$ are positive integers satisfying:

$$\frac{x(-m)}{-n} + \frac {x(-n)}{(-m)} + \frac {(-m)(-n)}{x} = 3$$

or

$$\frac {xm}{n} + \frac {xn}{m} + \frac {mn}{x} = 3$$

which is just our original equation. Using our previous analysis, $x=m=n=1$. Hence $y=z=-1$...

A shortcut to your analysis is to use the AM$\ge$GM inequality: for positive $x,y,z$,

$$\frac {xy}{z} + \frac {xz}{y} + \frac {yz}{x} \ge 3\sqrt[3]{xyz} \ge 3$$

as $xyz \ge1$. Equality holds iff $x=y=z=1$.

Title: Solve for integer values of $x,y,z$: $\frac{xy}{z} + \frac{xz}{y} + \frac{yz}{x} = 3$

Body:
Solve for integer values of $x,y,z$;
$$\frac{xy}{z} + \frac{xz}{y} + \frac{yz}{x} = 3.$$

My attempt:

Note that all $x, y, z$ are non-zero, otherwise a denominator would be zero.

Mutliplying by $xyz$ gives:
$$
x^2y^2+x^2z^2+y^2z^2 = 3xyz
$$

Since (from 1.) the left hand side (LHS) is strictly positive, then $xyz \gt 0$

Exploring the LHS of the equation from 1.:
$$
2x^2y^2+2x^2z^2+2y^2z^2 = (xy-xz)^2+(xy-yz)^2+(xz-yz)^2+2xyz(x+y+z)
$$
therefore
$$
x^2y^2+x^2z^2+y^2z^2 \geq xyz(x+y+z)
$$

Replacing LHS of the last inequation by $3xyz$ (according to 2.) gives:
$$3xyz \geq xyz(x+y+z)$$  and since (from 3.) $xyz$ is positive, we can divide both  sides by $xyz$, obtaining: $$x+y+z \leq 3$$

$xyz$ can be positive in two cases:

Case I.    $x, y, z$ are all positive. In this case $x \geq 1$, $y \geq 1$, $z \geq 1$,
so
$$
x+y+z \geq 3
$$
but according to 5. this must be an equation. Therefore all inequations for $x$, $y$ and $z$ must turn into equations, so $x=y=z=1$.

Case II.   One of $x, y, z$ is positive, two others are negative. Without loss of generality we can assume $x \gt 0$, $y \lt 0$,  $z \lt 0$

...


问:
Which one result in mathematics has surprised you the most?
A large part of my fascination in mathematics is because of some very surprising results that I have seen there.

I remember one I found very hard to swallow when I first encountered it, was what is known as the Banach Tarski Paradox. It states that you can separate a ball $x^2+y^2+z^2 \le 1$ into finitely many disjoint parts, rotate and translate them and rejoin (by taking disjoint union), and you end up with exactly two complete balls of the same radius!

So I ask you which are your most surprising moments in maths?

Chances are you will have more than one. May I request post multiple answers in that case, so the voting system will bring the ones most people think as surprising up. Thanks!

答:
The Chinese Magic Square:

816

357

492

It adds up to 15 in every direction! Awesome! And the Chinese evidently thought so too, since they incorporated it into their religious writings.

LastEditorDisplayName: anon


问:
Expectation of inverse of variable which is lognormal
If $\log(X)\sim N(a,b^2)$ for a random variable $X$, what is the expectation of $\frac{1}{X}$?</p>

答: If $\log(X) \sim N(a,b^2)$ then $\log(1/X)=-\log(X)\sim N(-a,b^2)$, so the question is: if $\log Y\sim N(-a,b^2)$ then what is $\operatorname E(Y)$?  (Can you take it from there?)</p>


问:
Why is $H(E) = H(P_e)$ in the proof of Fano's inequality?
On page $17$ of these Lecture Notes (theorem on page 15, and section of question copied in image below), why is $H(E) = H(P_e)$?  Specifically, $E = \{1 \text{ if } \hat X \neq X, \space  0 \text{ if } \hat X = X\}$ and $P_e = p(\hat X \neq X)$.

Shouldn't we have:

$H(E) = -p(\hat X \neq X) \log p(\hat X \neq X) - p(\hat X = X) \log p(\hat X = X)$

and

$H(P_e) = H(p(\hat X \neq X)) = \sum_{\hat x, x} p(\hat x, x) \log p(\hat x \neq x)$

What am I misunderstanding?

答:
Let $P_e = p(\hat{X}\neq X)$, which is a number (not a probability distribution). By a slight abuse of notation, for $p\in[0,1]$ the entropy $H(p)$ is the binary entropy function, which is the entropy of the Bernoulli r.v. with parameter $p$:
$$
H(p) = -p \log p - (1-p)\log(1-p)
$$
see lecture 2, p.8 for confirmation. (I personally hate this notation, and would encourage you to use $h(p)$ for the bianry entropy, since it's a function $h\colon[0,1]\to\mathbb{R}$, not taking an r.v. or probability distribution as argument.)

So here, indeed,
$$\begin{align}
H(P_e)
&= -P_e\log P_e - (1-P_e)\log(1-P_e)\\
&= -p(\hat{X}\neq X)\log p(\hat{X}\neq X) - p(\hat{X}= X)\log p(\hat{X}= X)\\
&= H(E)
\end{align}$$


问:
How do I imagine why divergence of curl and curl of gradient is $0$?
I tried watching several videos on YouTube, but I failed to gain intuition.
I tried to solve it by myself by imagining water flow but I was unsuccessful and got stuck. How do I imagine why divergence of curl and curl of gradient is $0$?

答:
very roughly speaking, the gradient of a function gives you the direction in which the function increases most.  The curl of a vector field describes how much the vector field "winds" around itself or whether the flow of it forms closed loops. now if curl(grad(f)) would not be zero the gradient of f would infinitesimally form closed loops but then f(x)>f(x) because f increases along the flow of the gradient, which can not be.

divergence is telling you how much a vector field flows through the walls of an infinitesimal box around the point you are looking, but the curl has no net flow, because everything that flows out also flows in, because the loops are closed

OwnerDisplayName: Nandani Kumari

OwnerDisplayName: DerHutmacher


答:
After applying the Fourier transform curl becomes proportional to the vector product with $\vec k$, div to the scalar product with $\vec k$, and gradient to the product by $\vec k$.

Thus for example
$div \,(curl \,\vec A)$ is proportional to $\vec k \cdot (\vec k \times \tilde A)=0$, where $\tilde A$ is the Fourier transform of $A$.

Body:
I tried watching several videos on YouTube, but I failed to gain intuition.
I tried to solve it by myself by imagining water flow but I was unsuccessful and got stuck. How do I imagine why divergence of curl and curl of gradient is $0$?

OwnerDisplayName: sva


答:
Imagining water flows or looking at Maxwells equations is definitely a good idea. A video for visualizing I can strongly recommend is this one: https://www.youtube.com/watch?v=rB83DpBJQsE&ab_channel=3Blue1Brown

Lets say $\vec{F}$ is a vector field. First start by actually understanding what div($\vec{F}$) really means. It represents the sources and sinks of the flow. In terms of electrodynamics these are the electrons and protons as they create the field. The curl on the other hand is a measure how much a field (flow) rotates around a certain point (for visuals watch the video). A rotation does not have a starting or end point or phrased differently it does not have a source or a sink. That is why the divergence of curl of $\vec{F}$ must be zero.

The gradient of a scalar field points into the direction of the strongest change of the field. So it is perpendicular to isosurfaces of the scalar field and that already requires that the curl of the gradient field is zero. A good example to visualize is a temperature distribution.

Title: How do I imagine why divergence of curl and curl of gradient is $0$?

OwnerDisplayName: bluesky


答:
Preliminary Geometric Observations

The conceptually simplest answer I can offer is using the integral theorems (Stokes and divergence (which is really a special case of a more generalized Stokes theorem)); but first we need some simple geometric preliminaries.

Consider the 2-dimensional setting, where we have a disk (also called a 2-dimensional ball) $B_r=\{(x,y)\in\Bbb{R}^2:\,\, x^2+y^2\leq r^2\}$. This is the closed disk of radius $r$ centered at the origin. Now, if I ask you "what is the boundary" of this surface, then I think you'd immediately tell me that the boundary of this disk is simply the circle $S_r=\{(x,y)\in\Bbb{R}^2:\,\, x^2+y^2=r^2\}$. Now, suppose I ask you what is the boundary of the circle? Well the circle itself has no boundary, because it is a closed loop (try to draw some pictures to convince yourself). Contrast this with the case of a line segment: if you draw a straight line segment, you would obviously say that the endpoints of the line segment are the boundary of the line. But for the circle, there are NO endpoints and there is no beginning! That is why there is no boundary to the circle.

Similarly, we can discuss the same situation one-dimension higher. Suppose now I consider a 3-dimensional solid ball $B_r = \{(x,y,z)\in\Bbb{R}^3:\,\, x^2+y^2+z^2\leq r^2\}$ (think of a full-solid watermelon if you wish). What is the boundary of this? Well of course we'd expect that the boundary of this is simply the sphere of radius $r$: $S_r=\{(x,y,z)\in\Bbb{R}^3\,: x^2+y^2+z^2=r^2\}$. What is the boundary of the sphere? Nothing! (again, to convince yourself of this, imagine a rectangular piece of paper: here the boundary of the piece of paper is its 4 edges... but a sphere has no such edges hence it has no boundary).

In fact the same thing is true in any dimension, in general: whenever we have a region $M$ (eg a solid ball or a solid ellipsoid, or a solid donut (torus) etc), we can ask what is its boundary. This is usually denoted $\partial M$. Then we can ask the same question again: what is the boundary of $\partial M$. Well it turns out that $\partial(\partial M)=\emptyset$ i.e it is the empty set, which means "the boundary of a boundary is non-existent". I hope the two examples I gave you above give you sufficient reason to think this is "believable"; and since you asked for intuition I'll stop here.

Integral Calculus Theorems

So far, we've just been talking about simple geometric observations of shapes you can easily imagine (while reading, please draw figures to follow along). Now, let us relate the geometry above to calculus. Specifically, we need the theorems of integral calculus which tell us how derivatives and integrals are related.

Your Actual Question.

If you don't already know the Stokes theorem and Divergence theorem, I guess this answer won't make much sense, but anyway here is a very quick 4-minute video which describes the "big idea" behind these theorems. Assuming you've understood that, we can now answer your questions.

First, I'll show the divergence of a curl is always $0$. So, let $\mathbf{F}$ be a given vector field. We wish to show that $\nabla \cdot (\nabla \times \mathbf{F})=0$. One way to show a function is zero is to show that its integral over EVERY possible region is zero. So, let $M$ be a solid 3-dimensional region (think of a solid ball as above). Then
\begin{align}
\int_{M}\nabla \cdot (\nabla \times \mathbf{F}) \, dV &=
\int_{\partial M}(\nabla \times \mathbf{F})\cdot d\mathbf{a} \tag{divergence theorem}\\
&= \int_{\partial (\partial M)} \mathbf{F}\cdot d\mathbf{l}\tag{Stokes theorem}\\
&= \int_{\emptyset} \mathbf{F}\cdot d\mathbf{l}\\
&=0
\end{align}
where I've invoked the above discussion that the boundary of a boundary is always empty. If we're integrating over an empty set then the answer is $0$. Since this is true for every region $M$, it follows that $\nabla\cdot (\nabla \times \mathbf{F})=0$.

The proof that curl of gradient is $0$ is identical: start with an arbitrary function $f$, and take any surface $S$. Then,

\begin{align}
\int_{S}\nabla \times (\nabla f) \cdot d\mathbf{a}&= \int_{\partial S}(\nabla f)\cdot d\mathbf{l}\tag{Stokes theorem}\\
&= f(\text{endpoint})-f(\text{startpoint})\tag{FTC}\\
&= 0.
\end{align}
Here $\partial S$ is a closed loop which is why the starting and ending points of the loop are the same hence the result is $0$.
Since this is true for all surfaces $S$, it follows that $\nabla \times (\nabla f)=0$.

Of course, the proofs I offered above are not the quickest or most direct (there are some steps above which need to be filled in to give a complete proof). The quickest proof is to just use the definition of divergence, curl and gradient, plug everything in and check that terms miraculously cancel out to give you $0$ (essentially it's because for sufficiently nicely behaved functions, the order of partial derivatives does not matter; this is called Schwarz's theorem in multivariable calculus).

However I hope this explanation allows you to think about these facts geometrically. Essentially there's only two ideas here. The first is a simple geometric fact

that the boundary of a boundary is always empty (which is fairly easy to imagine with some simple examples).

while the second is a very fundamental idea in calculus:

Stokes and Divergence theorem, which I hope conceptually make sense: "adding up the derivatives, i.e small changes, inside a region equals the total change on the boundary".

OwnerDisplayName: peek-a-boo


问:
Coefficients of $p\circ p$ for polynomial $p(x)=\sum_{k=0}^d a_kx^k$
Let $p(x)=\sum_{k=0}^d a_kx^k$ be a polynomial of degree $d$. Then
\begin{align*}
(p\circ p)(x) &= \sum_{k=0}^da_k\left(\sum_{j=0}^da_j x^j\right)^k\\[3pt]
&=\sum_{k=0}^d \sum_{\substack{k_0+\cdots+k_d=k\\[3pt]k_0,\dots,k_d\geqslant0}}a_k\frac{k!}{k_0!k_1!\cdots k_d!} x^{k_1+2k_2+3k_3+\cdots+d k_d}\prod_{t=0}^da_t^{k_t}
\end{align*}
by the multinomial theorem.

Is there a nicer way I can express the coefficients of $p\circ p$? Where can I read more about this polynomial and study its properties?

Body:
Not quite the answer you're looking for, but for fun taking a cubic $p(z) = a_0 + a_1 z + a_2 z^2 + a_3 z^3$, $p(p(z)) = c_0 + \cdots + c_9 z^9$ where:
\begin{align}
c_0 &=  a_{0}^{3} a_{3} + a_{0}^{2} a_{2} + a_{0} a_{1} + a_{0} \\
c_1 &=  3 \, a_{0}^{2} a_{1} a_{3} + 2 \, a_{0} a_{1} a_{2} + a_{1}^{2} \\
c_2 &=  3 \, a_{0} a_{1}^{2} a_{3} + 3 \, a_{0}^{2} a_{2} a_{3} + a_{1}^{2} a_{2} + 2 \, a_{0} a_{2}^{2} + a_{1} a_{2} \\
c_3 &=  a_{1}^{3} a_{3} + 6 \, a_{0} a_{1} a_{2} a_{3} + 3 \, a_{0}^{2} a_{3}^{2} + 2 \, a_{1} a_{2}^{2} + 2 \, a_{0} a_{2} a_{3} + a_{1} a_{3} \\
c_4 &=  3 \, a_{1}^{2} a_{2} a_{3} + 3 \, a_{0} a_{2}^{2} a_{3} + 6 \, a_{0} a_{1} a_{3}^{2} + a_{2}^{3} + 2 \, a_{1} a_{2} a_{3} \\
c_5 &=  3 \, a_{1} a_{2}^{2} a_{3} + 3 \, a_{1}^{2} a_{3}^{2} + 6 \, a_{0} a_{2} a_{3}^{2} + 2 \, a_{2}^{2} a_{3} \\
c_6 &=  a_{2}^{3} a_{3} + 6 \, a_{1} a_{2} a_{3}^{2} + 3 \, a_{0} a_{3}^{3} + a_{2} a_{3}^{2} \\
c_7 &=  3 \, a_{2}^{2} a_{3}^{2} + 3 \, a_{1} a_{3}^{3} \\
c_8 &=  3 \, a_{2} a_{3}^{3} \\
c_9 &=  a_{3}^{4} \\
\end{align}


问:
Finding Pitch Diameter of sprocket
I am currently following a tutorial on Instructables here. In the instructable to find the pitch diameter of a sprocket they use the formula on the above link. the pitch that is used is 12.70, the roller diameter is 7.92 but is rounded up to 8. I am having trouble getting the same result as shown 61.083. Maybe I am doing it wrong I first take the number of teeth "15" divide it by 180 and get 12. I then divide that by 12.70 to get 1.0583. In the formula used there is "sen" next to the parentheses I am unsure of what that is. Can someone please help me understand what I am doing wrong here step by step?</p>

答:
I think the "sen" in the formula is a sine; this is common notation in Spanish texts.  Therefore what you need to compute is

$$\frac{12.7}{\sin{12^{\circ}}} \approx \frac{12.7}{0.207912} \approx 61.0836$$

Title: Finding Pitch Diameter of sprocket


问:
Given a point on a circle, find it on a given square
Math is not my forte so I apologize. I have a seemingly simple problem and I'm unable to figure out the formula for this.

I'd describe the problem as given the center point of a circle and a point on the edge of the circle, find the same point on a square with the same length as the diameter of the circle.

The filled in points in this image are the ones I'm trying to find.

As an addition, I'd love some online resources on where I can learn how to do this kind of math and intuitively find the answer for myself in the future. Cheers.

答:
You are looking for trigonometric functions. Good news is you need very simple ones. Here is a recap:

In the figure above, suppose the radius of the circle is 1. The horizontal diameter (in cyan) is called the cosine axis, and the vertical diameter (in magenta) the sine axis. Corresponding to each point $P$ on the circle are two points $X$ and $Y$ on the cosine and sine axes, respectively. For angle $\widehat a$ between $OA$ and $OP$ we have
$$cos (a) = OX \quad , \quad sin(a) = OY$$
The vertical line (in red) that is tangent to the circle at point $A$ is called the tangent axis, and the horizontal line (in blue) that is tangent to the circle at $B$ is called the cotangent axis. Now you can see that your task has to do with these two axes. In the example shown in the figure above, you are looking for point $Q$, which is on the tangent axis. The length $AQ$ is $tan(a)$. Point $Q$ is on the tangent axis if angle $\widehat a$ is between $-45^o$ and $45^o$ . If angle $\widehat a$ is between $45^o$ and $135^o$ then the point $Q$ falls on the cotangent axis and you will want to have $cot(a)$ . For other angles you can easily find the coordinates of point $Q$ by symmetry.

So, if angle $\widehat a$ is given, then depending on its value you are looking for $\pm tan(a)$ or $\pm cot(a)$ . If instead of $\widehat a$ , the coordinates $x$ and $y$ of $P$ are given, then you should only note that
$$x = cos(a) \quad , \quad y = sin(a)$$
$$\frac yx = tan(a) \quad , \quad \frac xy = cot(a)$$
and when $\widehat a = 45^o$ , $\; x=y \;$  and  $\; tan(a) = 1 \;$ .


问:
Laurent polynomials $ \mathbb C[t,t^{-1}]$ is the localization of $\mathbb {C}[t].$
I want to prove this question:

Show that the ring of Laurent polynomials $ \mathbb C[t,t^{-1}]$ is the localization of the polynomial ring $\mathbb {C}[t].$

Localization is defined as follows: Let $R$ be a commutative, $S\subset R$ multiplicatively closed. Define $\sim $ on $ S \times R $ by $\frac{r}{s} \sim \frac{r'}{s'}$ which is equivalent to $t(rs' - r's) = 0$ for some $t \in S$ then $S^{-1}R$ is a commutative ring.

Still, I do not know how to prove this localization, do I have to find an isomorphism? or what?

答:
"Show that the ring of Laurent polynomials $\mathbb C[t,t^{-1}]$ is the localization of the polynomial ring $\mathbb C[t]$."

The problem does not make sense as you state it because, as others have pointed out in the comments, there are many localizations of $R =\mathbb C[t]$.  Each localization is done with respect to a multiplicatively closed subset $S$ of $R$.  You must choose a suitable multiplicatively closed subset $S$ so that $S^{-1}R = \mathbb C[t,t^{-1}]$.

By the way, the abstract definition you have provided of localization is not at all necessary here.  The following observation will make the problem much more tractable:

What does a localization of an integral domain look like? If $A$ is an integral domain, and $K$ is its field of fractions, any localization $S^{-1}A$ of $A$ is a ring which contains $A$ and which is contained in $K$.  Indeed, $$A \subseteq S^{-1}A = \{ \frac{a}{s} : a \in A, s \in S\} \subseteq K.$$

The abstract definition of $S^{-1}A$ as the set of equivalence classes of pairs in $S \times A$ is not necessary here and will only confuse you.  Sending the class of $(s,a)$ to $as^{-1} \in K$ gives an isomorphism between the formal definition of $S^{-1}A$ and the definition I just provided, as a subring of the field $K$.

What multiplicatively closed set $S$ should I pick to obtain $\mathbb C[t,t^{-1}]$?

The set should obviously contain $1$ and $t$, as you will want $t$ to be invertible in the localization.  What other elements does $S$ need to contain to be closed under multiplication?


答:
For more general problems of this nature, employ not one rule, but more than one rule.  Then, each rule could have a specific range.  For example, for the present query:

Assume that $k \in \mathbb{Z^+}.$

Rule 1

For $k \leq n, a_k = k.$

Rule 2

For $k > n, a_k = a_{(k-n)}.$

Title: Proper notation for defining a repeating sequence?

Body:
How would one go about properly defining a sequence that, say, repeats the integers $\{1, 2, 3, \dots, n\}$ infinitely many times? Seemed very simple at first, but currently grappling with the proper way to go about this. If anyone could offer some insight that would be much appreciated.

Edit: For clarity, I mean a sequence of the form $\{1, 2, 3, \ldots n, 1, 2, 3, \ldots n, 1, 2, 3, \ldots n, \ldots\}$


答:
I was hoping to find a similar solution for z=−i−−√ but my attempt gives me z=±i32

I don't see why.

$z = x+yi$ and $z^2 = (x^2 -y^2) + 2xyi = -i$ so $x^2-y^2 = 1$ and $2xy = -1$ so $x^2 =y^2$ and $x = \pm |y|$ but $2xy =-1$ is negative os $x = -y$ and so $2xy=-1\implies -2y^2 = 1\implies y =\pm \frac 1{\sqrt 2}$ and $x = \mp \frac 1{\sqrt 2}$. and $z = \pm \frac 1{\sqrt 2} \mp \frac 1{\sqrt 2} i$.

Which shouldn't surprise us as if $(\pm \frac 1{\sqrt 2} \pm \frac 1{\sqrt 2} i)^2 = i$ then $i(\pm \frac 1{\sqrt 2} \pm \frac 1{\sqrt 2} i) = \pm \frac 1{\sqrt 2}i \mp \frac 1{\sqrt 2} =\mp \frac 1{\sqrt 2} \pm \frac 1{\sqrt 2}$ when squared should be $i^2*i = -i$.

===

Using polar coordidates $-i = 0 + (-1)i = \cos \frac {3\pi}2 +\sin(\frac {3\pi}2)i = e^{(\frac {3\pi}2 + 2k\pi)i}$ and so the square roots of $-i$ are

$e^{(\frac {3\pi}4 + k\pi)i} = \cos(\begin{cases}\frac {3\pi}4\\\frac {7\pi}4\end{cases})+\sin(\cos(\begin{cases}\frac {3\pi}4\\\frac {7\pi}4\end{cases}))i =\pm \frac 1{\sqrt 2} \mp \frac 1{\sqrt 2}i$

Title: Simplifying $z^2+i=0$


问:
What is convex combination of two points?
I am studying algorithms and i saw a definition like the following:

Given $3$ points $p_1 = (x_1, y_1)$, $p_2 = (x_2, y_2)$ and
$p_3 = (x_3, y_3)$, $p_3$ is a convex combination of $p_1$ and $p_2$ iff
$\exists 0 \le a \le 1$ such that:

(i) $x_3 = x_1 + (1 −a )x_2$

(ii) $y_3 = y_1 + (1 − a)y_2$

If $p_3$ is a convex combination of $p_1$ and $p_2$, we also write
$p_3 = p_1 + (1 −a )p_2$

My question is, i did not understand what this definition means, and what does convex combination means intuitively? I appreciate any help. Thanks

答:
The point $ap_1+(1-a)p_2$ can also be written as $p_2+a(p_1-p_2)$. Perhaps you recognize this as a parametric representation of a line through $p_2$ with direction vector $p_1-p_2$ (with $a$ as the parameter).

When $a=0$, $ap_1+(1-a)p_2=p_2$. And when $a=1$, $ap_1+(1-a)p_2=p_1$. So the points $ap_1+(1-a)p_2$ with $0\le a\le1$ make up the line segment between the two given points.


问:
Pythagorean-Hodograph curve's control points
In the Farouki's book "Pythagorean-hodograph curves: algebra and geometry inseparable" it is said that control points of the cubic Bezier curves with Pythagorean-hodograph qualities are set as follows:

$p_1 = p_0 + 1/3(u_0^2 - v_0^2, 2u_0 v_0)$

$p_2 = p_1 + 1/3(u_0 u_1 - v_0 v_1, v_0 v_1 + u_1 v_0)$

$p_3 = p_2 + 1/3(u_1^2 - v_1^2, 2u_1 v_1)$

These control points based on linear polynomials:

$u(t)=u_0(1-t)+u_1t$; $v(t)=v_0(1-t)+v_1t$

So the questions are: how these $(u_0, u_1)$ and $(v_0, v_1)$ should be calculated? And what is the meaning of these pairs on the plot?

答:
They are just numbers, and they can be anything you like (except for a few corner cases). Whatever numbers you choose, you'll get a PH cubic.

These numbers don't have any geometric significance (as far as I know) -- they come from algebraic reasoning about the curve.

If you want a more geometric discussion, look at theorem 18.1 in Farouki's book.