答:
You can analyze this question as follows: Suppose $G=(V,E)$ is a self-complementary graph of order $5$ and let $\overline{G}=(V,E')$ denote its complement.

First, since $G\cong\overline{G}$, we have $|E|=|E'|$. Besides, it is clear that $G\cup\overline{G}=K_5$ and $E\cap E'=\emptyset$, so $$|E|+|E'|=\binom{5}{2}=10.$$ Thus, $|E|=|E'|=5$.

Now you consider the degree sequence $d_1\leq d_2\leq d_3\leq d_4\leq d_5$ in $G$. The degree sequence in $\overline{G}$ is $$4-d_5\leq4-d_4\leq 4-d_3\leq 4-d_2\leq 4-d_1.$$ Again, since $G\cong\overline{G}$, we must have $4-d_5=d_1$, $4-d_4=d_2$ and $4-d_3=d_3$. That is, it yields $$d_1+d_5=d_2+d_4=4$$ and $d_3=2$. Besides, $d_1>0$, for $d_1=0$ implies $d_5=4$. It is impossible for a graph of order $5$ containing both an isolated vertex (degree $0$) and a vertex adjacent to all others (degree $4$). Note that $d_2\leq d_3=2$ and consider the following cases:

Suppose $d_2=1$. Then $d_4=4-d_2=4-1=3$. Since $1\leq d_1\leq d_2=1$, we must have $d_1=1$. Thus, the degree sequence of $G$ is $1,1,2,3,3$. This is precisely the first graph shown in David's answer.

Suppose $d_2=2$. Then $d_2=d_3=d_4=2$. Of course, if $d_1=2$, then $G$ is $C_5$. What if $d_1=1$? As we can see, the degree sequence now becomes $1,2,2,2,3$. There are two graphs of order $5$ possessing such sequence, but they are neither self-complementary nor isomorphic to each other.

In general, all the examples are displayed in David's answer.

Title: Is there any self complementary graph of order 5 other than C5

Body: The concept of a self-complementary graph as I learned is, a graph that is isomorphic to its complement is called self-complement. I have some examples in mind of the self-complementary graph of order five but I am confused about, how can we find a self-complementary graph of order five other than copies of C5. Kindly give me the answer with an example.</p>


问:
Find C value given CDF

Given $Y$ a continuous random variable which takes no values with positive probability. Let $F$ be its CDF given by the table:

$F(y)=\left\{\begin{matrix}
y<0 & C \log (1-y)/y\\
y>=0 & 1
\end{matrix}\right.$

Find the value of C.

I tried to get the probability i.e. $P(Y=0)$ from the corresponding CDF. $P(Y>=y)=1-P(Y<y)=1-C \log (1-y)/y$

$P(Y<y)=C \log (1-y)/y$

Thus $P(Y=y)=P(Y>=y)-P(Y<y)$

Equating this to $0$ and substituting the value of $y$ as $0$, I am finding the value of $C$.

But the answer is not coming correct. Can you please let me know if the approach to the above formulation is correct and at which step it is going wrong?

答:
By assumption, $F$ is continuous at $0$. The right limit is $1$, while the left limit is $$\lim_{y\to 0^-}{\frac{C\log(1-y)}{y}}=C\lim_{y\to 0^-}{\frac{\log(1-y)}{y}}=C\cdot(-1)=-C.$$ Therefore, $-C=1$, which gives $C=-1$.

Besides, in your assumption, $Y$ takes no values with positive probability. There is no wonder why $P(Y=0)=0$.

ContentLicense: CC BY-SA 4.0

Title: Find C value given CDF


问:
Minimum of quadratic program
Given a symmetric matrix $A \in \mathbb{R}^{n \times n}$ and vectors $b \in \mathbb{R}^{n}$ and $c \in [0,\infty)^n$ is there a closed-form solution of the following quadratic program?

$$\begin{array}{ll} \text{minimize} & x^T A x + b^T x\\ \text{subject to} & c^T x = 1 \\ & x_{i} \ge 0\end{array}$$

Note that $A$ is not necessarily positive-definite.

If not, how can I solve this efficiently? Are there specific algorithms?

答:
Closed form under some hypothesis. Supposing $A$ invertible and also $\frac 12x^TA x+b^Tx,\ \text{s. t.}\ \ c^Tx=1$ (without the condition $x\ge 0$)

Considering the lagrangian

$$
L = \frac 12x^TA x+b^Tx-\lambda(c^Tx-1)
$$

the stationary points are the solution for

$$
\cases{x^T A+b^T-\lambda c^T = 0\\
c^Tx - 1 = 0}
$$

If $A$ is invertible

$$
x = \lambda A^{-T}c-A^{-T}b
$$

substituting into the restriction

$$
\lambda c^TA^{-T}c-c^{T}A^{-T}b=1
$$

so

$$
\lambda = 1-\frac{c^{T}A^{-T}b}{c^TA^{-T}c}
$$

and finally

$$
x = \left(1-\frac{c^{T}A^{-T}b}{c^TA^{-T}c}\right)A^{-T}c-A^{-T}b
$$

Title: Minimum of quadratic program


问:
Small factors of $(2^{1642811}-1)\cdot 10^{494536}+2^{1642810}-1$
Consider primes of the form:

$3371+327888\cdot s$, for s nonnegative.

The first three are: $3371$, $331259$ and $1642811$.

$(2^{3371}-1)\cdot 10^{1015}+2^{3370}-1$, is probable prime, where $1015$ is the number of decimal digits of $2^{3370}-1$.

$(2^{331259}-1)\cdot 10^{99719}+2^{331258}-1$, is probable prime, where $99179$ is the number of decimal digits of $2^{331258}-1$.

So I tried to plug in in the formula the third prime: $1642811$.

$(2^{1642811}-1)\cdot 10^{494536}+2^{1642810}-1=A$

The number A is not prime. It is divisible by $91739407$, but it has no other factor below $10^9$.

Can we conclude that there are no small smactors other than $91739407$, and what the chance to find another factor?
What the chance that the number is a semi-prime?

I found another factor in a blink of an eye with Siqs. I dont know why Siqs was so quick to find a 15 digit factor. Maybe an error?

$P15 = 227131270328969$ which divides A, no maybe it does not divide A, maybe there is some issue with Siqs

The three primes $3371$, $331259$ and $1642811$ have the form $72\cdot s-13$ and also of the form $59+23\cdot s$

答:
After a 'quick' primality test with PFGW the compositeness of $\large \frac {A}{91739407}$ is proven!

```<code>((2^1642811-1)*10^494536+2^1642810-1)/91739407 is composite: RES64: [A3A230C5E98B5040] (30348.4725s+0.1158s)
</code>```

About 8 hours and 30 minutes to find out for sure.

Body:
After a 'quick' primality test with PFGW the compositeness of $\large \frac {A}{91739407}$ is proven!

((2^1642811-1)*10^494536+2^1642810-1)/91739407 is composite: RES64: [A3A230C5E98B5040] (30348.4725s+0.1158s)

About 8 hours and 30 minutes to find out for sure.


问:
Solving equation of the type $ -1 = \cos x - a x \sin x $
I have the equation
$$ -1 = \cos x - a x \sin x $$
where, $a$ is a constant, $x$ is a real variable and taken in the range $0<x<\pi$. When I solve it by simply rearranging the terms, I end up with
$$ \frac{1+\cos x}{\sin x}=\cot \frac{x}{2}=a x. $$

However, the correct answer is supposed to give both
$$\cot \frac{x}{2}=a x,$$
$$\cos \frac{x}{2}=0.$$

I am not sure how the latter was found. I must be missing something. Any advice is appreciated.

答:
Your "real" equation is:
$$
1+\cos x=a x\sin x\implies2\cos^2\frac x2=2ax \cos\frac x2\sin\frac x2
\implies 2\cos\frac x2\left(\cos\frac x2-ax\sin\frac x2\right)=0.
$$
This equation has two solutions: $\cos\frac x2=0$ and $\cos\frac x2-ax\sin\frac x2=0$

Your mistake was that you canceled $\cos\frac x2$ without considering the possiblity that it can be zero.


问:
Show that the norms $\|\cdot\|_1$ and $\|\cdot\|_\infty$ are both continuous.

Show that the norms  $\|\cdot\|_1 : (\mathbb{R}^n,d_2) \to (\mathbb{R}, |\cdot|)$ and $\|\cdot\|_\infty : (\mathbb{R}^n,d_2) \to (\mathbb{R}, |\cdot|)$ are both continuous.

For the first one if $x \in \mathbb{R}^n$, then $\|x\|_1=|x_1|+|x_2|+\dots+ |x_n|$ this seems just to be a sum of multiple projections e.g $\operatorname{pr}_j: \mathbb{R}^n \to \mathbb{R}$, where $j  \in \{0, \dots n\}$. So as the sum of continuous functions this is continuous? For the second one I'm not sure how to approach. I know that if I have for example $\max\{f,g\}$ then this equals $\frac12(f+g)+\frac12|f-g|$ so do I have that $$\max\{|x_1|,|x_2|, \dots|x_n|\}= \frac1n(|x_1|+\dots|x_n|)+\frac1n||x_1|-|x_2|-\dots-|x_n||$$ and I could show that this is continuous by the fact that all $x_i$ are continous since the previous result?

答: Every norm is continuous w.r.t topology generated by this norm because it's Lipschitz function with Lipschitz constant $L = 1$, and since all norms are equivalent on the finite dimenshion space we get the statement.


问:
Inverse exponential markov inequality
Let $X$ be a real-valued random variable, $t\geq 0.$ With the exponential Markov inequality, we know that
$$
P(X\geq t)\leq e^{-\theta t}\mathbb E \left[ e^{\theta X} \right] \textrm{ for all } \theta \geq 0.
$$
Problem: However, I'd like to prove estimate of the other direction, that is
$$
P(X\leq t) \leq e^{\theta t} \mathbb E \left[ e^{-\theta X} \right].
$$
I tried using the formula from above and the counter-probability but could not prove the statement. Is there maybe another, better way?

答:
For $\theta>0$
$$
P(X\leq t)  =P(\theta X\leq \theta t)=P(e^{\theta X}\leq e^{\theta t}) =P(e^{-\theta X}\geq e^{-\theta t}) \leq e^{\theta t} E[e^{-\theta X}].
$$
The last line is Markov inequality.

Title: Inverse exponential markov inequality


问:
$AB = AC$, $BC = 2$ and $∠BAC = 90$°. Then find the value of $\dfrac{\text{$a$}}{\text{$b$}}$.
In the figure, $AB = AC$, $BC = 2$ and $∠BAC = 90$°.
$BD = CD = 1$. $DE$ and $DF$ are the arcs whose centers are at $B$ and $C$ respectively. The area of the shaded region is $x$. If $x = a - b\pi$ where $a$ and $b$ are rational numbers,
then find the value of $\dfrac{\text{$a$}}{\text{$b$}}$.

答: Hint: The shaded area is the difference between the area of the right (isosceles) triangle $ABC$  and the sum of the areas of the circular sectors $BDE$ and $CDF$.


问:
Probability to reach $a>0$ before returning to the origin in a one dimensional random walk.
Given a one dimensional random walk where I have $p$ probability to go forward and $q$ probability to go backwards.

I have to prove that, starting from the origin, the probability of reaching $a>0$ before returning to the origin is $p(1-q_1)$

Where

$$q_1=\frac{\left(\frac{q}{p}\right)^a-\left(\frac{q}{p}\right)}{\left(\frac{q}{p}\right)^a-1}$$

答:
So first you have to go right, so that introduces a factor of $p$. After that, you need to hit $a$ before hitting $0$ starting at $1$. There is a standard way to compute the probability to do that, based on computing the probability to hit $a$ before hitting $0$ starting at every point in $0,1,\dots,a$. The idea is the total probability formula:

$$P(\tau_a<\tau_0 \mid X_0=k)=p P(\tau_a<\tau_0 \mid X_0=k+1) + q P(\tau_a<\tau_0 \mid X_0=k-1).$$

So if $u(k)=P(\tau_a<\tau_0 \mid X_0=k)$ then you have the equations

$$u(k)=pu(k+1)+qu(k-1)$$

for $k=1,2,\dots,a-1,u(0)=0,u(a)=1$. (Note that $u(0)$ is not the quantity that you want; you actually want $pu(1)$. This is an annoying thing about the distinction between "hitting" and "returning".)

This system can be solved; the solution is of the form

$u(k)=c_1 + c_2 \left ( \frac{1-p}{p} \right )^k$ if $p \neq q$

$u(k)=c_1 + c_2 k$ if $p=q$.

Using the BCs you can find $c_1,c_2$.


问:
Meaning of "Jacobian determinant"?
In his book on optimal control, George Leitmann uses a meaning of "Jacobian determinant" I don't understand (and I do understand the standard definition). Can anyone explain it? In particular, which function's Jacobian is being taken? (Also, why? I understand this why bit might be hard without more context.) The relevant excerpts from the book are, in order:

http://imgur.com/2vKMmkF,2WDQM91#0

http://imgur.com/2vKMmkF,2WDQM91#1

(Unfortunately, I don't have access to "Ref 6.1").

EDIT: I'm not requiring a firm answer like "This is definitely what it means." Even conjecture is fine.

答: This so called Jacobian determinant is simply the Wronskian (up to a transposition). Why he has chosen to use that particular language, i'm not sure. </p>

ContentLicense: CC BY-SA 3.0

Title: Meaning of "Jacobian determinant"?


问:
Fourier Series and Countability
In this video, is it noted that Georg Cantor concluded it impossible to decompose all functions as an infinite linear combination of sines and cosines, "because there are only countably many...degrees of freedom in a Fourier Series, and uncountably many degrees of freedom in a function."  I would like to ask some questions to understand this better.

Obviously, there are uncountably many possible Fourier Series representations of a function, since there are uncountably many possible expressions for each coefficient in a Fourier Series.  It is fairly clear that what is meant by there being only countably many degrees of freedom in a Fourier Series is that a Fourier Series has only countably many terms.  However, I don't understand what is meant by there being uncountably many degrees of freedom in a function, in this context.  In general, a function's number of degrees of freedom is at most the number of independent variable it contains, which is finite.  In fact, the Fourier Series I'm familiar with attempt to represent functions of a single variable (perhaps there is a multivariable extension).  What is meant here by the number of degrees of freedom in the function a Fourier Series attempts to represent?

According to Wikipedia, "Through Fourier's research the fact was established that an arbitrary (at first, continuous and later generalized to any piecewise-smooth) function can be represented by a trigonometric series."  How are piecewise-smooth functions countable, whereas functions in general are uncountable, so as to solve Cantor's problem?

Why does it even matter that a Fourier Series has only countably many terms for the purpose of a bijection between functions and Fourier Series representations being possible, since as stated above, there are still uncountably many possible Fourier Series representations?  It would seem that a countable family of uncountable sets would be more than large enough to stand in a bijective relation to an uncountable set.

答:
A Fourier series is determined by a bisequence (two-sided sequence) of complex numbers. You have one degree of freedom for each of those coefficients: once you’ve chosen each of the countably many coefficients, you’ve completely determined the series, but the series isn’t determined until you’ve made all of those choices. An arbitrary real- or complex-valued function on $\Bbb R$ or $\Bbb C$, however, has $\mathfrak{c}$ degrees of freedom: it isn’t pinned down completely until you have specified its value at every real or complex number.

There are $\mathfrak{c}=2^{\aleph_0}$ complex numbers, so there are $$\left(2^{\aleph_0}\right)^{\aleph_0}=2^{\aleph_0\cdot\aleph_0}=2^{\aleph_0}=\mathfrak{c}$$ such bisequences. There are also $\mathfrak{c}$ real numbers, so pinning down an arbitrary function from $\Bbb R$ or $\Bbb C$ to $\Bbb R$ or $\Bbb C$ requires specifying $\mathfrak{c}$ real or complex numbers, something that can be done in

$$\mathfrak{c}^{\mathfrak{c}}=\left(2^{\aleph_0}\right)^{\mathfrak{c}}=2^{\aleph_0\cdot\mathfrak{c}}=2^{\mathfrak{c}}$$

ways. And $2^{\mathfrak{c}}>\mathfrak{c}$ by Cantor’s theorem, so there are more functions than there are Fourier series: there are altogether $2^{\mathfrak{c}}$ possible real- or compled-valued functions on $\Bbb R$ or $\Bbb C$, but only $\mathfrak{c}$ of them are nice enough to be represented by Fourier series.

Note that the claim is not that there are only countably many piecewise smooth functions; in fact there are $\mathfrak{c}$ of them. The claim is that each is completely determined by countably many complex parameters.

Title: Fourier Series and Countability


问:
How to deterministically pick a vector that is guaranteed to be non-parallel to the given one?
I have a unit vector $u = (x1, y1, z1)$ in $R^3$, given $(x1, y1, z1)$ are known rational numbers.

I need to deterministically pick a unit vector $v = (x2, y2, z2)$, such that $v$ and $u$ are not parallel, so ||${\bf u} \times {\bf v}$|| $\neq 0$.

$x2, y2, z2$ values can likely be derived from $x1, y1, z1$, but I can't figure out how exactly.

答:
Option 1:

Unless $x1=y1=z1$, the permuted vector $(y1, z1, x1)$ is guaranteed to not be parallel to $(x1, y1, z1)$.

Intuitively this is achieved by rotating $u$ 90° in the x-axis and then 90° in the y-axis.

In 3D the rotation matrices are:

$\begin{alignat}{1}
R_x(\theta) &= \begin{bmatrix}
1 & 0 & 0 \\
0 & \cos \theta &  -\sin \theta \\[3pt]
0 & \sin \theta  &  \cos \theta \\[3pt]
\end{bmatrix} \\[6pt]
R_y(\theta) &= \begin{bmatrix}
\cos \theta & 0 & \sin \theta \\[3pt]
0 & 1 & 0 \\[3pt]
-\sin \theta & 0 & \cos \theta \\
\end{bmatrix} \\[6pt]
R_z(\theta) &= \begin{bmatrix}
\cos \theta & -\sin \theta & 0 \\[3pt]
\sin \theta &   \cos \theta & 0\\[3pt]
0 & 0 & 1\\
\end{bmatrix}
\end{alignat}$

The resulting rotation is

$\begin{alignat}{1}
R_x(\theta) &= \begin{bmatrix}
0 & 0 & 1 \\
1 & 0 & 0 \\[3pt]
0 & 1 & 0 \\[3pt]
\end{bmatrix} \\[6pt]
\end{alignat}$

This has eigenvector $(1, 1, 1)$ and so only vectors with $x1=y1=z1$ will end up parallel (or antiparallel) to themselves under this transformation.

In the case where $x1=y1=z1$, you can just use $(-x1, y1, z1)$.

Option 2:

Convert to spherical coordinates, and then just add $\frac{\pi}{2}$ to either of the angles, say $\theta$.


问:
Let $A \in \mathcal{M}_n ( \mathbb{C} ) $ be a matrix. Do all eigenvalues of $A^k$ have the form $\lambda^k$ where $\lambda$ is an eigenvalue of A?
One contention is easy to prove: If $\lambda$ is an eigenvalue of $A$ then there exists nonzero $v \in \mathbb{C^n}$ such that $Av = \lambda v$, thus $A^k v  = \lambda^k v$. But, I am having trouble proving that all eigenvalues of $A^k$ are necessarily of that form. If $A$ is diagonalizable, then the result is easy to prove, but I lack of tools for manipulating the case in which $A$ is non-diagonalizable.

答:
The answer is yes. One proof is as follows.

Suppose that $\mu$ is an eigenvalue of $A^k$. Let $\lambda_1,\dots,\lambda_k$ denote the solutions to the equation $\lambda^k = \mu$. Because $\mu$ is an eigenvalue of $A^k$, $A^k - \mu I$ must be singular. However, we can write
$$
(A^k - \mu I) = (A - \lambda_1 I) \cdots (A - \lambda_k I).
$$
A product of matrices can only be singular if one of the matrices in the product is singular. Thus, there a $j$ for $1 \leq j \leq k$ for which $(A - \lambda_j I)$ is singular, which is to say that $\lambda_j$ is an eigenvalue of $A$.

Thus, $A$ has an eigenvalue $\lambda = \lambda_j$ for which $\lambda^k = \mu$.


问:
$\sum_{i=1}^r\sum_{j=r+1-i}^{n-r}{r \choose i}{{n-r}\choose j}=2^n-2^{n-r}+\sum_{i=1}^r\left({{n-r}\choose i}-{n\choose i}\right)$
I am trying to prove the following

$$
\sum_{i=1}^r\sum_{j=r+1-i}^{n-r}{r \choose i}{{n-r}\choose j}=2^n-2^{n-r}+\sum_{i=1}^r\left({{n-r}\choose i}-{n\choose i}\right)
$$

I want to know the hint to the correct path.

Edit

I am trying to prove this and now I got the following:

$$
-\sum_{i=1}^r \sum_{j=i}^r {r\choose i}{{n-r}\choose {j-i}}
$$
that must be equal to
$$
\sum_{i=1}^r\left({{n-r}\choose i}-{n\choose i}\right)$$

答:
We are trying to prove that

$$\sum_{p=1}^r {r\choose p}
\sum_{q=r+1-p}^{n-r} {n-r\choose q}
= 2^n - 2^{n-r}
+ \sum_{p=0}^r {n-r\choose p}
- \sum_{p=0}^r {n\choose p}.$$

We start with the LHS:

$$\sum_{p=1}^r {r\choose p}
\sum_{q=r+1-p}^{n-r} {n-r\choose n-r-q}
= [z^{n-r}] (1+z)^{n-r}
\sum_{p=1}^r {r\choose p}
\sum_{q=r+1-p}^{n-r} z^q.$$

Now the coefficient extractor enforces the upper limit of the inner sum
and we get

$$[z^{n-r}] (1+z)^{n-r}
\sum_{p=1}^r {r\choose p}
\sum_{q\ge r+1-p} z^q
= [z^{n-r}] (1+z)^{n-r} \frac{1}{1-z}
\sum_{p=1}^r {r\choose p}
z^{r+1-p}
\\ = [z^{n-2r-1}] (1+z)^{n-r} \frac{1}{1-z}
\sum_{p=1}^r {r\choose p} z^{-p}
\\ = - [z^{n-2r-1}] (1+z)^{n-r} \frac{1}{1-z}
+ [z^{n-2r-1}] (1+z)^{n-r} \frac{1}{1-z}
\left(1+\frac{1}{z}\right)^r
\\ = - [z^{n-2r-1}] (1+z)^{n-r} \frac{1}{1-z}
+ [z^{n-r-1}] (1+z)^{n} \frac{1}{1-z}.$$

Converting back into sums, we find

$$-\sum_{p=0}^{n-2r-1} {n-r\choose p}
+ \sum_{p=0}^{n-r-1} {n\choose p}
\\ = - 2^{n-r} + \sum_{p=n-2r}^{n-r} {n-r\choose p}
+ 2^n - \sum_{p=n-r}^n {n\choose p}.$$

We see that these two sums take the complete upper range of the highest
$r+1$ terms in the expansions of $(1+z)^{n-r}$ and $(1+z)^n.$ This being
binomial coefficients these sums are equal to the sums of the lower range
of the lowest $r+1$ terms by symmetry. We obtain

$$2^n - 2^{n-r}
+ \sum_{p=0}^r {n-r\choose p}
- \sum_{p=0}^r {n\choose p}$$

which is the RHS and hence the claim.


答:
Because $AB = AC$, we know that $\measuredangle B = \measuredangle C$ by base angles theorem and since $\measuredangle A = 90^{\circ}$, $\measuredangle B = \measuredangle C = 45^{\circ}$.

This gives us a $45^{\circ} 45^{\circ} 90^{\circ}$ triangle meaning $AB = AC = \frac{BC}{\sqrt{2}} = \sqrt{2}$

Since $\Delta ABC$ is a right triangle, we can calculate its area as $\frac{AB\cdot AC}{2} =1$.

Since $\measuredangle B = 45^{\circ}$, the area of sector $BED$ is $\frac{45^{\circ}}{360^{\circ}} = \frac{1}{8}$ of the area of a circle with radius $BD$. The area of that circle can be found with $\pi r^2 \rightarrow \pi \cdot 1^2 \rightarrow \pi$. We then take the fraction: $\frac{1}{8} \cdot \pi = \frac{\pi}{8}$ so the area of the sector $BED$ is $\frac{\pi}{8}$.

Same thing for sector $FCD$ so that area is also $\frac{\pi}{8}$

X is just the whole triangle minus those two sectors so $1 - \frac{\pi}{8} - \frac{\pi}{8} = 1-\frac{\pi}{4}$ so $4$

Title: $AB = AC$, $BC = 2$ and $∠BAC = 90$°. Then find the value of $\dfrac{\text{$a$}}{\text{$b$}}$.

Body:
In the figure, $AB = AC$, $BC = 2$ and $∠BAC = 90$°.
$BD = CD = 1$. $DE$ and $DF$ are the arcs whose centers are at $B$ and $C$ respectively. The area of the shaded region is $x$. If $x = a - b\pi$ where $a$ and $b$ are rational numbers,
then find the value of $\dfrac{\text{$a$}}{\text{$b$}}$.


问:
Is $x^x$ differentiable when $x<0$?
The function $f(x)=x^x$ is only defined for negative values of $x$ if $x$ is a rational number $a/b$, where $b$ is odd. Initially, I thought this meant that the limit
$$
f'(a)=\lim_{h\to0}\frac{(a+h)^{a+h}-a^a}{h}
$$
cannot exist if $a$ is a negative number, since every neighbourhood of $a$ would contain values for which $x^x$ does not make any sense at all. However, this post—about $\lim_{x\to0}\frac{\sin(1/x)}{\sin(1/x)}$—suggests that provided every neighbourhood of $a$ contains values for which $x^x$ is defined, there is no issue with taking limits at the point.

So if $a$ is negative number that is in the domain of $f$, then does $f'(a)$ exist? And if so, is there a general formula for $f'(a)$?

答:
Complex values allowed...

Define
$$
x^x = \exp\big(x\log x\big)
$$
using the principal value of $\log x$.  Undefined at $x=0$.

Then the derivative is
$$
\frac{d}{dx}\; x^x = x^x (1+\log x)
$$
Here is the real part of the derivative

It is continuous, except at $x=0$, where it goes to $-\infty$.

Here is the imaginary part of the derivative

It is continuous, except at $x=0$, where it jumps from $\pi$ to $0$.

Title: Is $x^x$ differentiable when $x<0$?


问:
Limit and singular point
I have a elementary problem but I don't know how to solve it :

$\lim\limits_{z \to 0} \dfrac{1}{e^z-1}-\dfrac{1}{z}$, it is indetermine because we have :$\infty - \infty$, according to my research on the web I think that is 1/2 but I don't know how to prove it.

singular point of $e^{\frac{1}{z+1}}$

Anybody can help me or give me a clue? Thank you in advance

答:
Hint: Start by combining the fractions into a single fraction:

$$ \lim_{z \to 0} {\frac{1}{e^z - 1} - \frac{1}{z}} = \lim_{z \to 0} {\frac{z - (e^z - 1)}{z(e^z - 1)}} .$$

Then, use L'Hopital's Rule a couple of times.

Title: Limit and singular point


问:
Prove that if $3|a^2+b^2\Rightarrow 3|a ,\, 3|b$
How do i prove that if $$3|a^2+b^2\Rightarrow  3|a ,\, 3|b \,?$$ The book (Problem-Solving Strategies by Arthur Engels, page 43, E9) does not prove this theorem and leaves it as an excercise. I'm relatively new to this kind of problems and I just can't get any ideas. If anyone could prove that or, even better, just give me some hints it would be great. Thanks for your time

答:
Assume $a = 3A + r_1$ and $b = 3B + r_2$ where $r_1$ and $r_2$ are remainders. Then $$a^2+b^2 = 3C + r_1^2 + r_2^2$$
Therefore, if $3\mid a^2+b^2$, then $3 \mid r_1^2+r_2^2$. Since $r_1,r_2 \in \{0,1,2\}$, it is easy to verify that $r_1 = r_2 = 0$.


问:
Computing the Frobenius normal form
I was wondering whether someone could give me an example how one actually determines the Frobenius normal form of a given matrix. Further, it seems hard to find an example where the new basis is calculated so that a given matrix is in Frobenius normal form. I really tried to find an example where this is done, but most books just use this form as a theoretical example rather than actually calculating this form?

A short summary how you would proceed to calculate the Frobenius normal form and the basis would be more than enough, too.

答:
If this is often treated as mostly a theoretical construction, this is probably because there is no really easy procedure for finding the rational canonical form, even though its existence is of fundamental importance.

However here is a basic algorithmic way to compute it.
Write down the matrix $XI-A$, a matrix with polynomial entries, the one whose determinant defines the characteristic polynomial. Now apply the Smith normal form algorithm over the principal ideal domain $K[X]$ of polynomials. This will produce a diagonal matrix with on the main diagonal (monic) polynomials$~P_i$, each of which divides the next, the last of which is the minimal polynomial, and the product of which is the characteristic polynomial. The list will usually start with many occurrences of the constant polynomial$~1$, which can be ignored; for every remaining polynomial write down its companion matrix, and string these together in order to get the block diagonal matrix which is the Frobenius normal form of$~A$.

A more "linear algebraic" way to find the Frobenius normal form is to first find the minimal polynomial of $A$. If it has degree$~n$ then it is also the characteristic polynomial and the Frobenius normal form will just be its companion matrix. If not then the companion matrix of the minimal polynomial will just be the final block in the Frobenius normal form; to find the other blocks, find a vector$~v$ not annihilated by any polynomial in$~A$ of degree less than the minimal polynomial (which is certain to exist, in fact most vectors have this property), take the ($A$-stable) subspace $W$ of$~V$ generated by$~v$ and its repeated images by$~A$, and continue recursively with the linear operator that $A$ induces in the quotient space$~V/W$ (there also exists a $A$-stable complementary subspace to $W$, but I think finding one is unnecessary, and working with the quotient is easier).

Title: Computing the Frobenius normal form


答: You divided by $\sin x$. You need to check if $\sin x=0$ can be a solution. It is, if $\cos x=-1$. This is $x=\pm \pi, \pm 3\pi,...$, which is equivalent to $\cos\frac x2=0$. However, for $0<x<\pi$ you don't have the second solution.

Title: Solving equation of the type $ -1 = \cos x - a x \sin x $

Body:
I have the equation
$$ -1 = \cos x - a x \sin x $$
where, $a$ is a constant, $x$ is a real variable and taken in the range $0<x<\pi$. When I solve it by simply rearranging the terms, I end up with
$$ \frac{1+\cos x}{\sin x}=\cot \frac{x}{2}=a x. $$

However, the correct answer is supposed to give both
$$\cot \frac{x}{2}=a x,$$
$$\cos \frac{x}{2}=0.$$

I am not sure how the latter was found. I must be missing something. Any advice is appreciated.


问:
Approximately sinusoidally varying Fourier transforms
Given a function $f(x)$ and its Fourier transform $\tilde{f}(k) = \int_{-\infty}^{\infty}f(x) e^{ikx}dx$, if I decompose the Fourier transform as
$$\tilde{f}(k) = A(k)e^{ikl(k)}$$
Under what conditions on $f(x)$ can I say that $l(k)$ is a slowly varying length scale ($\dfrac{d l}{dk}$ is small), i.e. when does the Fourier transform look approximately sinusoidal $\tilde{f}(k) \sim \sin(kd + \phi)$?

For example, the functions $\dfrac{\sin kd}{kd}$, which is the Fourier transform of a box centered at the origin and $\cos(kd) e^{-k^2}$, the Fourier transform of a symmetric shifted gaussian both are acceptable. In both these cases, $f(x)$ has a finite support ($f(x) = 0$ for $|x| >$ some L). Does having a finite support help in general? I've tried fitting cubic splines to random points and almost always, my Fourier transform is sinusoidal with some decaying envelop (I've attached a picture of one such example). Is this something general?

答:
Since your question is not very rigorous I'll give the simplest case:

If $\|k \hat{h}(k)\|_{L^1}$ is small then $\|h'\|_\infty\le \|k \hat{h}(k)\|_{L^1}$ is small so that for $|k_0|$ large enough

$$F(x)=h(x)e^{i k_0 x}$$ can be seen as a complex sine with slowly varying amplitude/phase.

$\|k \hat{h}(k)\|_{L^1} = \|(k-k_0) \hat{F}(k-k_0)\|_{L^1}$

The large enough is a bit hard to quantify because it depends on how small $h(x)$ can be. If $h$ is compactly supported on $[a,b]$ then looking at $\frac{\|k \hat{h}(k)\|_{L^1}}{\|\hat{h}(k)\|_{L^1}}(b-a)$ is fine.


问:
Square of number of divisors of n equals n
Find $n \in \mathbb{N}$ such that $n = \tau(n)^2$ ($\tau(n)$ being the number of positive divisors of $n$).
I tried some values for $n$, it seems that besides $n = 1$ and $n = 9$ there's no other solutions.
I have no idea to how to prove that nor if it's true in the first place.
I could use some hints, thank you.

答:
$n$ is a perfect square, so

$$n = \prod_{i=1}^k p_i^{2 \beta_i}.$$

Therefore, $$\tau(n) = \prod_{i=1}^k (2\beta_i+1),$$ so

$$n = \prod_{i=1}^k (2\beta_i+1)^2.$$

Note that $p_i^{\beta_i} > 2\beta_i + 1,$ unless $p_i=2, 3$ and $\beta_i = 1.$ For $p_i=3$ we have equality, for $p_i=2,$ the ratio between the LHS and the RHS is $2/3.$ The smallest next ratio is $5/3,$ and since $5/3 \times 2/3 = 10/9 > 1,$ the only prime we can have in the decomposition of $n$ is $3,$ so $n = 9.$


问:
A question about a limit in a Hilbert space
Suppose $H$ is a Hilbert space, $v_{n},z \in H$ and suppose that

$$ \lim\langle x, v_{n}\rangle = \langle x, z \rangle$$

for all $x$ in some dense subset of $H$. Then can I say that the sequence $v_{n}$ converges to $z$?

Note: $v_{n}$ is not given to be convergent.

答: No; the classic example is the space $L^2([0,2\pi])$ with $v_n=\sin(nx)$, $z=0$, and $x$ being any function in $L^2$ and $L^1$. This is known as the Riemann-Lebesgue Lemma (http://en.wikipedia.org/wiki/Riemann%E2%80%93Lebesgue_lemma).</p>


问:
Incompleteness of $(C[a,b], \| \cdot \|_1)$
Consider $C([a,b])$, the vector space of continuous functions in $[a,b] \subset \mathbb{R}$ to $\mathbb{R}$. Let be $f \in C([a,b])$, we define $\|\cdot\|_1$ as follows:
\begin{equation*}
\|f\|_1 =  \int_{a}^{b}|f(x)|dx
\end{equation*}

I must show that $(C([a,b]), \|\cdot\|_1)$ is not a Banach space.

This is my answer the which one is wrong according to my teacher. Consider the following counterexample. Let $c =2^{-1}(a+b)$ y $f_n:[a,b] \rightarrow \mathbb{R} \hspace{.1cm} \forall n \in \mathbb{N}$ with the following association rule and graph:

It's clear that $\{f_n\}_{n \in \mathbb{N}} \subset C([a,b])$. We will show that $\{f_n\}_{n \in \mathbb{N}}$ it's a $||\cdot||_1-Cauchy$ sequence. Let be $\epsilon > 0$ and $N = \displaystyle \left\lceil{ \frac{1}{2 \epsilon}}\right\rceil$, then:
\begin{equation*}
    ||f_n-f_m||_1 = \int_{a}^{b} |f_n(x)-f_m(x)|dx = \left| \frac{1}{2n}-\frac{1}{2m} \right| \leq \max \left\{ \frac{1}{2n}, \frac{1}{2m}\right\} < \epsilon, \hspace{.1cm} \forall n,m \geq N
\end{equation*}
So the sequence is $||\cdot||_1-Cauchy$,
however though this sequence converges to the following limit function, the limit function is clearly discontinuous. Let be $f:[a,b] \rightarrow \mathbb{R}$:
\begin{equation*} f(x) =
    \begin{cases}
        1 & \text{si $x \leq c$}\\
        0 & \text{si $x > c$}
    \end{cases}
\end{equation*}
Fixed $\epsilon_1 > 0$ and $N_1 = \left\lceil{\displaystyle\frac{1}{2 \epsilon_1}}\right\rceil$, then:
\begin{equation*}
||f_n-f||_1 = \displaystyle\int_{0}^{1} |f_n(x)-f(x)| = \frac{1}{2n} < \epsilon, \hspace{.1cm} \forall n \geq N_1
\end{equation*}
$\textbf{Now, the problem is that}$ (according to my teacher) I only have propose a discontinuous function wich is a limit of the sequence, this does not means that do not exits another continuous function wich is also the limit of the sequence. I understand the problem, but nothing comes up to me to solve this.

答:
Suppose $f_n \to f \in C[0,1]$ with the $\|\cdot \|_1$ norm.

Let $g$ be $1$ on $[a,c]$ and $0$ on $(c,b]$. It is clear that $f_n \to g$ uniformly on $K_\epsilon = [a,b] \setminus (c-\epsilon, c+\epsilon)$ and that $g$ is continuous on $\{c\}^c$.

Let $\|\cdot \|_{K_\epsilon}$ be the $1$-norm on $K_\epsilon$, then
$\|f-g\|_{K_\epsilon} \le \|f-f_n\|_{K_\epsilon} + \|f_n -g\|_{K_\epsilon} \le \|f-f_n\|_1 + \|f_n -g\|_{K_\epsilon}$ from which we see that $f=g$ on $K_\epsilon$ (since both $f,g$ are continuous).

In particular, we must have $f=g$ on $\{c\}^c$ and so $f$ is discontinuous, which is a contradiction.


问:
What is the following limit?
How can I calculate the following limit?
What do I miss here? What am I doing wrong?

$$\begin{align*}
\lim_{x\rightarrow0}\frac{6x\cdot\sin x-6\cdot\sin\left(x^{2}\right)+x^{4}}{x^{5}\left(e^{x}-1\right)}= & \lim_{x\rightarrow0}\frac{6x\cdot\sin x}{x^{5}\left(e^{x}-1\right)}-\lim_{x\rightarrow0}\frac{6\cdot\sin\left(x^{2}\right)}{x^{5}\left(e^{x}-1\right)}+\lim_{x\rightarrow0}\frac{x^{4}}{x^{5}\left(e^{x}-1\right)}=\\
= & \lim_{x\rightarrow0}\frac{6}{x^{3}\left(e^{x}-1\right)}\cdot\underbrace{\frac{\sin x}{x}}_{\rightarrow1}-\lim_{x\rightarrow0}\frac{6}{x^{3}\left(e^{x}-1\right)}\cdot\underbrace{\frac{\sin\left(x^{2}\right)}{x^{2}}}_{\rightarrow1}+\lim_{x\rightarrow0}\frac{1}{x\left(e^{x}-1\right)}=\\
= & \lim_{x\rightarrow0}\frac{1}{x\left(e^{x}-1\right)}=\infty\neq\frac{21}{20}.
\end{align*}$$

According to WolframAlpha $21/20$ is the solution. What am I doing wrong?

答:
You replaced parts of the formula with their limits, so that some terms (not replaced with their limit) cancel. This may lead to wrong results, as you see.

I suggest finding equivalents for the numerator and the denominator.

For the denominator, it is basid:  it is known from Taylor-Young's formula that $\mathrm e^x-1\sim_0 x$, hence $\;x^5(\mathrm e^x-1)\sim_0x^6$

For the numerator, apply Taylor-Young's formula to each term so as to obtain ultimately an expansion at order $6$:
\begin{align}
6x\sin x-6\sin x^{2}+x^4 &= 6x\Bigl(x-\frac{x^3}6+\frac{x^5}{120}+o(x^5)\Bigr)-\Bigl(6x^2-\frac{6x^6}6+o(x^6)\Bigr)+x^4 \\
&=6x^2-x^4 +\frac{x^6}{20}+o(x^6)-\Bigl(6x^2-x^6+o(x^6)\Bigr)+x^4 \\
&=\frac{x^6}{20}+x^6+o(x^6)=\frac{21x^6}{20}+o(x^6)\sim_{0}\frac{21x^6}{20}.
\end{align}

Title: What is the following limit?


问:
Let $A⊆B⊆C$ and $X<Y$ denote $X$ is an elementary substructure of $Y.$ Does $A<B$ and $A<C$ imply $B<C$?
Let $A \subseteq B \subseteq C $ and $X<$Y denote $X$ is an elementary substructure of $Y$. Does $A < B$ and $A < C$ $\implies B<C$? My inkling is that this is not true. Here is why:

$A<B$ means for any sentence $\phi(\overline{x})$, $A \models \phi(\overline{a})$ iff $B \models \phi(\overline{a})$ for any tuple $\overline{a} \in A$.

Similarly,

$A<C$ means for any sentence $\psi(\overline{x})$, $A \models \psi(\overline{\alpha})$ iff $C \models \psi(\overline{\alpha})$ for any tuple $\overline{\alpha} \in A$.

We want to show that for any $\theta(\overline{x})$, $B \models \theta(\overline{b})$ iff $C \models \theta(\overline{b})$ for any tuple $\overline{b} \in B$.

From the first two we can only conclude that for any $\theta(\overline{x})$, $B \models \theta(\overline{\text{a}})$ iff $C \models \theta(\overline{\text{a}})$ for any tuple $\overline{\text{a}} \in A$, but not for any tuple $\overline{b} \in B$.

However, I cannot think of a counter example.

答: Here's a simple example.  Let $A$ be $(\mathbb{N},\leq)$ and let $C$ be any nontrivial elementary extension of $A$.  Then every element of $C\setminus A$ has a predecessor and a successor (since every element of $A$ besides $0$ has a predecessor and a successor).  Pick an element $c\in C$ and let $B=C\setminus \{c\}$.  Note then that $B$ is isomorphic to $C$ via an isomorphism that fixes $A$: just send every element of $C$ that is less than $c$ to itself, and every element of $C$ that is greater than $c$ to its predecessor.  So since $A\preceq C$, $A\preceq B$ as well.  But $B\not\preceq C$: if $b$ is the predecessor of $c$ and $d$ is the successor of $c$, then $B\models\text{"$b$ is the predecessor of $d$"}$ but $C$ does not.


问:
Absolute value proof in Spivak
Prove (1) using the fact that $|x|-|y| \le |x-y|$

(1) $|(|x|-|y|)| \le |x-y|$

Attempt: as I know $|a| \le b \iff -b \le a \le b$, then proving (2) would allow me to prove (1)

(2): $-|x-y| \le |x| - |y| \le |x-y|$.

From testing different cases of $x$ and $y$, it seems that (2) is true. Furthermore, as $-|a| \le a \le |a|$, it seems that (2) is true.

However, could someone show me a proof why we can assume (2) is true? I can't figure out how to write a rigorous one.

citation: Spivak Calculus 3rd edition, chapter 1 question 12 vi

答:
Hint: It is much simpler to prove if you observe that $|x-y|=|y-x|$, as there results that we also have
$$|y|-|x| \le |x-y|,$$
whence $\;|x-y|\ge\max\bigl(|x|-|y|, |y|-|x|\bigr)$.

Title: Absolute value proof in Spivak


答:
$2$ is true because of the triangular inequality :

$$|x|=|x-y+y|\le |x-y|+|y|\implies$$

$$|x|-|y|\le |x-y|$$
and by symetry,
$$|y|-|x|\le |x-y|$$

Remark
$$A\le B \wedge -A\le B \implies |A|\le |B|$$

Title: Absolute value proof in Spivak

Body:
Prove (1) using the fact that $|x|-|y| \le |x-y|$

(1) $|(|x|-|y|)| \le |x-y|$

Attempt: as I know $|a| \le b \iff -b \le a \le b$, then proving (2) would allow me to prove (1)

(2): $-|x-y| \le |x| - |y| \le |x-y|$.

From testing different cases of $x$ and $y$, it seems that (2) is true. Furthermore, as $-|a| \le a \le |a|$, it seems that (2) is true.

However, could someone show me a proof why we can assume (2) is true? I can't figure out how to write a rigorous one.

citation: Spivak Calculus 3rd edition, chapter 1 question 12 vi


问:
Additive Inverse and integer modulo
I am not completely sure how inverses work with sets of integer modulo. I have just started to learn about them. I have tried some practice problems, though I am not sure if my approach is correct in solving them.

Currently, this is what I am doing when solving for additive inverses:

Example Problem: Which element in $\mathbb{Z}_8$ is an additive inverse of $[13]$?

My solution:

$13\equiv 5(\text{mod }8 )$, and so we need to find the inverse of $5(\text{mod }8)$. The additive inverse of $x$ is simply the number which when added to $x$  yields the additive identity and the additive identity is $0$.

So what $y$  should we add to  $x=5$  to give  $x+y\equiv 0(\text{mod }8)$?

Say $y\equiv−x\equiv−5$  and ask what is equivalent to  $−5$ modulo $8$? The answer will be $y\equiv 3(\text{mod }8)$.

Or, the solution to  $5+y\equiv 8\equiv0(\text{mod }8)$.  Again you’ll get $y\equiv 3(\text{mod }8)$.

Thus, the element $[3]$ is an additive inverse of $[13]$.

Can someone check if this is done correctly? If anyone has any other ways to solve this or advice on how to better understand integer modulo, I would appreciate it! Thanks!

答:
It's correct.  Don't worry modular arithmetic is easy and is meant to be easy.

$a \equiv b \mod n \iff n\mid a-b$.

So $a + x \equiv b + x\pmod n \iff n\mid (a+x) - (b+x)$ but $(a+x) - (b+x) = a-b$.

So $a + x \equiv b + x \pmod n \iff a \equiv b \pmod n$.

So... you can always add to the same thing to both sides.  Just liked you'd hope you could.

So $a + x \equiv 0\pmod n \iff$

$x \equiv - a \pmod n$.

And if you don't like negatives as $n \equiv 0 \pmod n$  (Because $n\mid n-0= n$)

We can add $n$.

$x \equiv -a \pmod n$ so

$x\equiv x + 0 \equiv -a + n \equiv n-a \pmod {n}$.

(That works because $n \equiv 0 \pmod n \implies  n + (-a) \equiv 0 + (-a) \pmod n$).

It's meant to be easy.

....

So $13 + x \equiv 0 \pmod {8}$ so

$5 + x \equiv 0 \pmod 8$ so

$x \equiv -5 \equiv -5 + 8 \equiv 3\pmod 8$.

That's all you have to do and that is enough.

Title: Additive Inverse and integer modulo


问:
Expressing trigonometric expression in multiple angles using complex methods.
How would you express $\cos^3x\sin^3x$ in terms of $\sin(6x)$ and $\sin(2x)$ via complex methods?

答:
$$\cos^3x\sin^3x=\frac{1}{8}\sin^32x$$
Now that we have that, we can use complex numbers to derive an identity for this in terms of $\sin6x$ and in $\sin2x$ (assuming you mean a method using complex numbers when you say 'complex methods'). Firstly, note that of $z=\cos x+i\sin x$, then $z^2-z^{-2}=2i\sin2x$ and in general, $z^n-z^{-n}=2i\sin nx$.

Hence, $$\begin{align}\frac{1}{8}\sin^32x&=\frac{1}{8}\left(\frac{z^2-z^{-2}}{2i}\right)^3=-\frac{1}{64i}(z^6-3z^2+3z^{-2}-z^{-6})\\
&=-\frac{1}{64i}(2i\sin6x-6i\sin2x)=\frac{3}{32}\sin2x-\frac{1}{32}\sin6x\end{align}$$

I hope that was helpful. If you have any questions please don't hesitate to ask :)


问:
Find an algorithm which solves the following problem
I have a problem like this:

we have an array of elements like this :

```<code>(a0,b0)
(a1,b1)
.
.
.
(an,bn)
</code>```

and I wanna find the number of elements which have one of this two condition:

1) if ai>aj and bi<bj then:count:=count+1

or

2)if ai<aj and bi>bj then:count:=count+1

I've already found an algorithm that is O(n^2), but I need the  faster algorithm

Example:
suppose we have this:

```<code>(1,5)
(4,7)
(8,2)
</code>```

I wanna find the number of time that condition satisfied, so
1<8 and 2<5 so condition is satisfied but 1<4 and 5<7 so condition is
not satisfied.

答:
This can be accomplished by divide-and-conquer, and if done well (essentially, avoiding multiple sorts by using merge in each pass), this will be $O(n\cdot \log{n})$. Throughout this solution it is helpful to imagine these tuples as points on a $2D$ Cartesian plane which $a_i$s being the horizontal $x$-coordinate and $b_i$s being the vertical $y$-coordinates: thus the left/right notions refer to comparisons in $a_i$s while upper/lower notions refer to comparisons in $b_i$s.

This is a recursive solution, here is the pseudocode:

```<code>function numpair(array_sorted_by_ai):
    N = length(array_sorted_by_ai)
    // base case: for N=1, we have 0 pairs and already bi-sorted array
    if N == 1:
        return (0, array_sorted_by_ai)

    // call for left & right partitions: get intra-partition pairs &
    // the bi-sorted subarrays for these partitions
    leftans,  left_sorted_by_bi  = numpair(array_sorted_by_ai[0 → N/2])
    rightans, right_sorted_by_bi = numpair(array_sorted_by_ai[N/2 → N])

    // Now find cross partition pairs and do two-pointer merge of
    // bi-sorted subarrays to get the bi-sorted parent array
    crossans = 0, leftidx = 0, rightidx = 0
    oldpoints = 0
    array_sorted_by_bi = [] // We will return the input array sorted by bi's

    while length(array_sorted_by_bi) < N:
        // The right one's bi is lower (i.e. a potential pair)
        if left_sorted_by_bi[leftidx][1] > right_sorted_by_bi[rightidx][1]:
            // Must also check that the right one's ai is strictly bigger
            if left_sorted_by_bi[leftidx][0] < right_sorted_by_bi[rightidx][0]:
                crossans = crossans + oldpoints + 1
            // Try to up the lower side (right) pointer unless impossible
            if rightidx < length(right_sorted_by_bi):
                array_sorted_by_bi += [right_sorted_by_bi[rightidx]]
                rightidx = rightidx + 1
                oldpoints = 0
            else:
                array_sorted_by_bi += [left_sorted_by_bi[leftidx]]
                leftidx = leftidx + 1
                oldpoints = rightidx
        // The left one is lower (not a valid pair)
        else:
            // Try to up the lower (left) side pointer unless impossible
            if leftidx < length(left_sorted_by_bi):
                array_sorted_by_bi += [left_sorted_by_bi[leftidx]]
                leftidx = leftidx + 1
                oldpoints = rightidx
            else:
                array_sorted_by_bi += [right_sorted_by_bi[rightidx]]
                rightidx = rightidx + 1
                oldpoints = 0
    // pairs on left, right and cross-partition, bi-sorted input array
    return (leftans+rightans+crossans, right_sorted_by_bi)
</code>```

Explanation:

We first sort our array by the $a_i$s and call $numpair()$ with this sorted array. The recursive function calls the left and right halves of this array in turn and thus gets the number of pairs where both members lie on the left or on the right. These calls also return the left and right subarrays (which we passed sorted by $a_i$s), now sorted by $b_i$s

Now we run a merge sequence for these returned $b_i$-sorted subarrays while now also counting pairs that have one member in the left and one in the right. We use a two pointer method: we keep each pointer on left and right at their lowest values (by $b_i$s) and increment the one which has the lower $b_i$ between the two. At any time we see the left point at greater $b_i$ than the right one, we increment our cross-pairs count.
Now here comes a little twist: we actually increment every time by a quantity $oldpoints+1$. Here is why:

If the previous update was on the left, it means that it is a new point suitable for making pairs for all previous points encountered below its $b_i$ on the right (including the current one), i.e. an increment by $rightidx+1$ is needed. So whenever we update on the left, we make $oldpoints$ equal to $rightidx$, so that if this scenario arises in the following iteration, pairs from all older points encountered in the right are added for this newly eligible point on the left.

If the previous update was on the right, then the left point is not new and has already been considered for all lower points in the right previously. So only an increment for the current right point (i.e. by 1) is needed. So whenever we update on the right, we make $oldpoints$ equal to $0$, so that if this scenario arises in the following iteration, we only add one more new pair for just the current point on the right

At the end we return the total number of pairs we counted on the left and right (by recursion) and the cross-partition pairs we counted via the merge sequence as the total number of pairs and also return the input array sorted by $b_i$s to tie up the recursion. The first element we returned is the actual answer.

Time Complexity:

Denote this as a function of input size $n$ as $T(n)$ and observe that the merge process is $O(n)$. So for the function, complexity:
$$T(n) = 2T(n / 2) + O(n)$$
This, as we know (just like in merge sort) resolves to $O(n\cdot \log{n})$. And this doesn't change when you count the initial sort by $a_i$s, we do on the parent array before calling the function. So yeah, a properly designed divide-and-conquer achieves this in $O(n\cdot \log{n})$

Body:
This can be accomplished by divide-and-conquer, and if done well (essentially, avoiding multiple sorts by using merge in each pass), this will be $O(n\cdot \log{n})$. Throughout this solution it is helpful to imagine these tuples as points on a $2D$ Cartesian plane which $a_i$s being the horizontal $x$-coordinate and $b_i$s being the vertical $y$-coordinates: thus the left/right notions refer to comparisons in $a_i$s while upper/lower notions refer to comparisons in $b_i$s.

This is a recursive solution, here is the pseudocode:

function numpair(array_sorted_by_ai):
    N = length(array_sorted_by_ai)
    // base case: for N=1, we have 0 pairs and already bi-sorted array
    if N == 1:
        return (0, array_sorted_by_ai)

    // call for left & right partitions: get intra-partition pairs &
    // the bi-sorted subarrays for these partitions
    leftans,  left_sorted_by_bi  = numpair(array_sorted_by_ai[0 → N/2])
    rightans, right_sorted_by_bi = numpair(array_sorted_by_ai[N/2 → N])

    // Now find cross partition pairs and do two-pointer merge of
    // bi-sorted subarrays to get the bi-sorted parent array
    crossans = 0, leftidx = 0, rightidx = 0
    oldpoints = 0
    array_sorted_by_bi = [] // We will return the input array sorted by bi's

    while length(array_sorted_by_bi) < N:
        // The right one's bi is lower (i.e. a potential pair)
        if left_sorted_by_bi[leftidx][1] > right_sorted_by_bi[rightidx][1]:
            // Must also check that the right one's ai is strictly bigger
            if left_sorted_by_bi[leftidx][0] < right_sorted_by_bi[rightidx][0]:
                crossans = crossans + oldpoints + 1
            // Try to up the lower side (right) pointer unless impossible
            if rightidx < length(right_sorted_by_bi):
                array_sorted_by_bi += [right_sorted_by_bi[rightidx]]
                rightidx = rightidx + 1
                oldpoints = 0
            else:
                array_sorted_by_bi += [left_sorted_by_bi[leftidx]]
                leftidx = leftidx + 1
                oldpoints = rightidx
        // The left one is lower (not a valid pair)
        else:
            // Try to up the lower (left) side pointer unless impossible
            if leftidx < length(left_sorted_by_bi):
                array_sorted_by_bi += [left_sorted_by_bi[leftidx]]
                leftidx = leftidx + 1
                oldpoints = rightidx
            else:
                array_sorted_by_bi += [right_sorted_by_bi[rightidx]]
                rightidx = rightidx + 1
                oldpoints = 0
    // pairs on left, right and cross-partition, bi-sorted input array
    return (leftans+rightans+crossans, right_sorted_by_bi)

Explanation:

We first sort our array by the $a_i$s and call $numpair()$ with this sorted array. The recursive function calls the left and right halves of this array in turn and thus gets the number of pairs where both members lie on the left or on the right. These calls also return the left and right subarrays (which we passed sorted by $a_i$s), now sorted by $b_i$s

Now we run a merge sequence for these returned $b_i$-sorted subarrays while now also counting pairs that have one member in the left and one in the right. We use a two pointer method: we keep each pointer on left and right at their lowest values (by $b_i$s) and increment the one which has the lower $b_i$ between the two. At any time we see the left point at greater $b_i$ than the right one, we increment our cross-pairs count.
Now here comes a little twist: we actually increment every time by a quantity $oldpoints+1$. Here is why:

If the previous update was on the left, it means that it is a new point suitable for making pairs for all previous points encountered below its $b_i$ on the right (including the current one), i.e. an increment by $rightidx+1$ is needed. So whenever we update on the left, we make $oldpoints$ equal to $rightidx$, so that if this scenario arises in the following iteration, pairs from all older points encountered in the right are added for this newly eligible point on the left.

If the previous update was on the right, then the left point is not new and has already been considered for all lower points in the right previously. So only an increment for the current right point (i.e. by 1) is needed. So whenever we update on the right, we make $oldpoints$ equal to $0$, so that if this scenario arises in the following iteration, we only add one more new pair for just the current point on the right

At the end we return the total number of pairs we counted on the left and right (by recursion) and the cross-partition pairs we counted via the merge sequence as the total number of pairs and also return the input array sorted by $b_i$s to tie up the recursion. The first element we returned is the actual answer.

Time Complexity:

Denote this as a function of input size $n$ as $T(n)$ and observe that the merge process is $O(n)$. So for the function, complexity:
$$T(n) = 2T(n / 2) + O(n)$$
This, as we know (just like in merge sort) resolves to $O(n\cdot \log{n})$. And this doesn't change when you count the initial sort by $a_i$s, we do on the parent array before calling the function. So yeah, a properly designed divide-and-conquer achieves this in $O(n\cdot \log{n})$


问:
If the radical of an ideal $I$ in $\mathbb{C}[x_1,\dotsc,x_n]$ is generated by a single irreducible, what is $I$?
Let $I$ be an ideal of $\mathbb{C}[x_1,\dotsc,x_n]$ such that its radical $\sqrt{I}$ is equal to $(g)$, where $g$ is an irreducible polynomial.

Does this imply that $I=(g^m)$ for a positive integer $m$?

答:
No. For example take $n=2$. We have:

$(x^2)\subseteq (x)\cdot (x,y)\subseteq (x)$

So if we let $I=(x)\cdot (x,y)$ then $(x)=\sqrt{(x^2)}\subseteq\sqrt{I}\subseteq\sqrt{(x)}=(x)$, and so $\sqrt{I}=(x)$. However, $I$ is not generated by a power of $x$. (this is easy, I'll leave it to you to check this)


问:
Finding $\hat{\theta}$ using the moment method, given $X \sim \mathrm{UNIF}(-\theta, \theta)$
Let $x_1, \cdots, x_n \sim f(x;\theta) = \frac{1}{2\theta}, -\theta < x < \theta$ and $\theta > 0$. I'm tasked with finding $\hat{\theta}$ using the moment method.

It's clear that $f(x;\theta) \sim \mathrm{UNIF}(-\theta, \theta)$, but $M_1 = \mathbb{E}(x) = 0$. What do I do?

On a related vein, what exactly is the benefit of using the moment method to find $\hat{\theta}$ vs. other methods? I don't mean to sound snooty but it just feels like I'm doing an unnecessary extra step.

答:
The method of moments is not simply about matching the first moment.  The general strategy is to use as many moments as is needed to obtain a system of equations that has a unique solution for the parameter.  So in your case, because the first moment is zero, we use the second:  $$\operatorname{E}[X^2] = \frac{\theta^2}{3},$$ hence we match the second raw sample moment to this:  $$\frac{\hat \theta^2}{3} = \frac{1}{n} \sum_{i=1}^n X_i^2,$$ or $$\hat \theta = \sqrt{\frac{3}{n} \sum_{i=1}^n X_i^2}.$$  We could also match on the second central moment, also known as the variance: $$\operatorname{E}[(X - \operatorname{E}[X])^2] = \operatorname{Var}[X] = \frac{\theta^2}{3},$$ since the first moment is zero.  This leads to a different estimator:  $$\frac{\hat \theta^2}{3} = \frac{1}{n} \sum_{i=1}^n (X_i - \bar X)^2.$$  In practice, $\bar X$ will be "close" to zero, so these will be roughly the same, but notice that if $n = 1$, the first estimator is still defined, whereas the second will give $0$ for $\theta$, which is not sensible.

As a general approach, if we have, say, $k$ parameters to estimate, then the method of moments leads to a system in $k$ equations that we can (sometimes) recursively solve.  This tends to be an easier way to obtain estimators for the parameters compared to, say, maximum likelihood estimation, but the problem with method of moment estimators is that they don't always make sense given the data.


问:
Linear Algebra: Change of Basis question on Wiki definitions
I'm reading about change of basis and am confused with definitions on Wiki and less so on this site.  I present the definitions which are more understandable first, then follow with Wiki.  Here are the definitions which I understand:

$$
B = \{\mathbf b_1, \mathbf b_2, ..., \mathbf b_n\}
$$
where $B$ is a basis of a vector space $V$.   Then the coordinates $(\alpha_z)_{z \in I}$ of a vector $\mathbf x \in V$ using basis $B$ and field $F$ are:
$$
\phi_B : V \rightarrow F^n
$$
$$
\phi_B(\mathbf x) = [\mathbf x]_B
$$
$$
[\mathbf x]_B = \begin{bmatrix} \alpha_1 \cr \alpha_2 \cr ... \cr \alpha_n \end{bmatrix}_B = (\alpha_1, ..., \alpha_n)
$$
$$
\mathbf x = [\mathbf x]_S = \mathbf b_1 \alpha_1 + ... + \mathbf b_n \alpha_n = \sum_{i=1}^n \mathbf b_i \alpha_i
$$
The basis transformation matrix or vector is denoted $P_B$ and is from basis $B$ to $S$, where $S$ is the standard basis:
$$
P_B = [\mathbf b_1 \mathbf b_2 ... \mathbf b_n] = (\mathbf b_1, ..., \mathbf b_n)
$$
$$
P_B = [P]_S^B = [P]^B = [[\mathbf b_1]_S [\mathbf b_2]_S ... [\mathbf b_n]_S] = ( [\mathbf b_1]_S, ..., [\mathbf b_n]_S)
$$
$$
\mathbf x = P_B [\mathbf x]_B
$$
$$
\mathbf x = [\mathbf x]_S = [P]_S^B [\mathbf x]_B
$$
$$
[\mathbf x]_B = P_B^{-1} \mathbf x = ([P]_S^B)^{-1} \mathbf x
$$
where $\det(P_B) \ne 0$ and the change of basis from basis $B$ to $B'$ is as follows.

Convert from standard coordinates to coordinates in $B'$:
$$
[\mathbf x]_{B'} = P_{B'}^{-1} \mathbf x
$$

Question : does above appear correct?

I'm the most confused by the Wiki definitions and explanation.  The forms do not explicitly agree with above:

$$
\mathbf x_{old} = A \mathbf x_{new}
$$
is this form reversed?

Wiki then defines the change of basis formula as:
$$
B_{old} = (\mathbf v_1, ..., \mathbf v_n), B_{new} = (\mathbf w_1, ..., \mathbf w_j)
$$
For $j = 1, ... n$ and $w_j$'s coordinates are $a_{i,j}$ over $B_{old}$
$$
\mathbf w_j = \sum_{i=1}^n a_{i,j} \mathbf v_i
$$

Question: Why are the coordinates $a_{i,j}$ two dimensional when they are one dimensional in earlier examples.

Question: Can the above form be rewritten in notation used earlier?  For instance:

$$
P_{B_{old}} = [\mathbf v_0 ... \mathbf v_n] = (\mathbf v_0, ..., \mathbf v_n)
$$
$$
\mathbf w_j = P_{B_{old}} [\mathbf w_j]_{B_{old}}
$$
$$
[\mathbf w_j]_{B_{old}} = (a_{1,j}, ..., a_{n,j})
$$

答:
Consider $\mathbb{R^2}$ as a set of ordered pairs and consider the linear transformation T that maps $(1,0)$ to $(1, 1)$ and $(0,1)$ to itself. We interpret the ordered pair $(1,1)$ and $(0, 1)$ as vectors using the standard basis.  We have

$T( (1,0 )) = (1, 1)$

Now think of the domain of $T$ as coordinates using the basis $ (1,1)$ and $(0,1)$. Thus $T$ is telling you how to interpret the meaning of the new coordinates $(1,0)$ in terms of the standard basis.  For purposes of your questions think of the standard basis as the old basis.  So we see that

$T( x_{newbasis}\ \ ) = x_{oldbasis}$


问:
Two diagonals - right angle
For which natural number $n$ there exists a regular $n$-angle that has two diagonals that intersect at right angles? I tired to consider various cases, but I have problem with $n=5,7,9,11...$. Do you have any hint?

答:
For a given $n$-gon, it appears that the size of the angles between the diagonals are of the form $\frac{180k}{n}$, where $k$ ranges from $1$ to $(n-4)$.

A $9$-gon, for example, has angles $\frac{180}{9}=20$, $\frac{360}{9}=40$, ..., $\frac{900}{9}=100$.

To answer your question, we are searching for when $\frac{180k}{n}=90$, subject to the constraint that $1\leq k\leq (n-4)$.

Rearrange to get $180k=90n$ and you can see that we need $n=2k$. That is, $n$ must be even, which explains why you were unable to find examples for polygons with an odd number of sides.

For even-sided polygons, when we consider $k=\frac{n}{2}$ it is evident that this value is in the range $1\leq k\leq (n-4)$ for all polygons with number of sides $n\geq 8$.

Note: I don't have a rigorous proof that the angles between diagonals are of the form $\frac{180k}{n}$. This is just something I observed by playing around with a few examples.

Title: Two diagonals - right angle


问:
Painting fences, probability
There are $a$ yellow and $b$ green fences, and on each day one of these fences is getting painted green, choosen at uniform probability, meaning $\dfrac{a}{a+b}$ yellow and $\dfrac{b}{a+b}$ for green, even though it might already be green. How can I calculate the probability, that after $a+1$ days all fences are green? I know that there are $(a + b)^{a+ 1}$ ways one could paint them, but I can't figure out how to count the events that result in all fences being green.

答: We must paint all the $a$ yellow fences green within the interval of $a + 1$ days, so we are only allowed to paint the wrong fence once (one that was already green). The probability that we make no mistakes at all is equal to $p_0 = \prod_{0 \leq k \leq a - 1} \frac{a - k}{a + b} = \frac{a!}{(a + b)^a}.$ The probability that we make the mistake on day $j$ is $p_j = \frac{b + j - 1}{a + b} p_0$ (up until day $j$ we would have painted $j - 1$ fences green, so we have $b + j - 1$ choices; the number $p_0$ still appears because we compute the probability of painting only yellow fences up until day $j$ and we get the first $j - 1$ terms in $p_0$ and from day $j + 1$ to day $a + 1$ we get the rest of the terms). Therefore, the total probability is equal to $$\sum_{0 \leq j \leq a} p_j = p_0 + \frac{p_0}{a+b} \sum_{1 \leq j \leq a} b + j - 1 = p_0 + \frac{p_0}{a + b}(ab + \frac{a(a - 1)}{2}).$$ Note that $p_{a + 1}$ does not appear in the sum because this is actually $p_0.$ I hope this helps. :)

Title: Painting fences, probability


问:
Reducing an integral equation to a differential one
In my course about differential equations I have the following problem:

Find all the functions $f:\mathbb{R} \longrightarrow \mathbb{R}^+$ such that the area below the graphic of the function in an interval $[a,b]$ (b>a) is proportional to the length of the interval itself. (with $f \in \mathcal{C}^1(\mathbb{R}))$

I have enunciate it as follows:

$\int_a^b{f(x)}dx = K (b-a)$

but I cant solve that with my knowledge in differential equiations. I have read in serveral places that integral equations and differential ones can be related between them but I can't think of any way to transform it to a differential equation

答:
One form of the Fundamental Theorem of Calculus says:
$$\frac{d}{db} \int_a^b f(x)\,dx = f(b)\tag1$$
where $f$ is assumed continuous, and $b$ is taken as a variable with respect to which the derivative is taken.

Differentiating both sides of
$$\int_a^b{f(x)}dx = K (b-a)\tag2$$
with respect to $b$ and using (1), you will arrive at the conclusion.

OwnerDisplayName: Trollkemada


问:
Simplify $2\log 4 + 3\log 8 - \log 2$ using logarithmic laws, then evaluate.
Firs time I've encountered this type of question where there is a number in front of the log, and it's throwing me a bit. I'm fine with using the logarithmic laws to simplify, but not sure if I need to get rid of those numbers first, and if so, how? thought perhaps the power law would apply but obviously there's no powers so I'm really not sure how to approach this one.</p>

答:
Use that
$$
a\log\left(b\right)=\log\left(b^a\right)
$$
(and then :)
$$\log\left(a\right)+\log\left(b\right)=\log\left(ab\right)$$


问:
The Maximum number of points of intersection of 4 distinct circles and 8 distinct straight lines is
The Maximum number of points of intersection of 4 distinct circles and 8 distinct straight lines is

1)66

2)64

3)104

4)40

Can anyone please help me to solve this problem?

My attempt : I have seen this link--Maximum number of points of intersection. But I can not understand how they are so sure that all intersection points are distinct.

答:
An interesting way to understand the 8-line situation is with inversion. As we know a circle that passes through the center of inversion is inverted into a line. Choose the original as the center of inversion, and choose 8 evenly spaced points on the unit circle with angles ranging from 0 to $\frac{7\pi}{8}$ as centers and draw 8 circles passing through the origin, we easily get 8 circles that intersect with each other at distinctive points. Invert the 8 circles centered at the origin, we get 8 lines intersecting each other at distinct points.
8 circles inverted into 8 lines


答:
HINT

There are 'hidden powers' in this expression; all the logarithms are of the form $a\log2^n$ where $a$ and $n$ are integers.

Title: Simplify $2\log 4 + 3\log 8 - \log 2$ using logarithmic laws, then evaluate.

Body: Firs time I've encountered this type of question where there is a number in front of the log, and it's throwing me a bit. I'm fine with using the logarithmic laws to simplify, but not sure if I need to get rid of those numbers first, and if so, how? thought perhaps the power law would apply but obviously there's no powers so I'm really not sure how to approach this one.</p>


问:
prove $\lim\limits_{x\to-e^{+}}(x+e)^{1/2}\int_{0}^{+\infty}\frac{1}{e^t+xt}dt=\pi\sqrt{\frac{2}{e}}$

Show that $$\lim_{x\to-e^{+}}(x+e)^{\frac{1}{2}}\int_{0}^{+\infty}\frac{1}{e^t+xt}dt=\pi\sqrt{\frac{2}{e}}$$

Is this result right or wrong? If true, please prove it. Thank you,
since this integral $$\int_{0}^{+\infty}\frac{1}{e^t+xt}dt$$ has no analytical solution

答:
Rewrite the integral as
$$I=\int_0^{\infty}\frac{dt}{e^t-et+(x+e)t}.$$
It is easy to check that $e^t\geq e t$ for all $t>0$ and the only point where the equality is achieved is $t=1$. Therefore the main asymptotic contribution to the integral will come from the vicinity of this point (note that $y=et$ is the tangent line to $y=e^t$ at $t=1$). Taylor expanding $$e^t-et=\frac{e}{2}(t-1)^2+O((t-1)^3)$$ and making the change of variables $t-1=\sqrt{x+e}\cdot\sqrt{\frac{2}{e}}\cdot s$, we then get
\begin{align}
I\simeq\int_{1-\Delta}^{1+\Delta}\frac{dt}{\frac{e}{2}(t-1)^2+(x+e)+\ldots}\simeq\frac{1}{\sqrt{x+e}}\sqrt{\frac{2}{e}}\int_{-\infty}^{\infty}\frac{ds}{ s^2+1}\simeq \frac{\pi}{\sqrt{x+e}}\sqrt{\frac{2}{e}}.
\end{align}</p>


问:
What is the free abelian group on $\mathbb{N}$?
I learnt that the free abelian group on a set $X$ is the group $(\operatorname{Hom}(X, \mathbb{Z}), +)$. Okay, this sounds all right, but I also know the famous result that $\mathbb{Z}^{\mathbb{N}}$ is not free abelian. Since $\mathbb{Z}^{\mathbb{N}}=\operatorname{Hom}({\mathbb{N}, \mathbb{Z}})$, I am pretty confused and I have two questions:

Are the concepts of the "free abelian group on some set" and that of "free abelian group" (this is the one where we take the definition as that of a free $\mathbb{Z}$-module) two different things?

What is the free abelian group on $\mathbb{N}$, since it doesn't seem that $\operatorname{Hom}({\mathbb{N}, \mathbb{Z}})$ is what we are looking for?

答: The free Abelian group on a set $X$ is not given by the set of functions from $X$ to $\mathbb{Z}$. It is given by the subset of those functions that take a nonzero value on only finitely many inputs. If you re-do your investigations with that change, everything should make a lot more sense.


问:
Difference between permutation groups and galois groups?
A124938   Number of non-solvable transitive Galois groups for polynomials of degree n.   +40
1

0, 0, 0, 0, 2, 4, 3, 5, 4, 15, 4, 35, 3, 27, 40, 49, 5, 91, 2, 358 (list; graph; refs; listen; history; text; internal format)

A198342   Number of non-solvable transitive permutation groups for polynomials of degree n.   +40
1

0, 0, 0, 0, 2, 4, 3, 5, 4, 21, 4, 36, 3, 27, 40, 49, 5, 91, 2, 358, 56, 27, 3, 807, 79, 26, 64, 617, 2, 1896, 4 (list; graph; refs; listen; history; text; internal format)

I wanted to write down the non-solvable galoisgroups of polynomials. At degree
 10, there are, according to OEIS, 15 non-solvable galois-groups, but 21
 permutation groups. What is the difference ? What about the 6 permutation
 groups which are not galois-groups ?

答: A124938 is wrong. According to the text, it should be given by subtracting A002106 from A124937, but when we do that for the 10th terms we get $45-24=21$ (the correct value) and not $15$.</p>


问:
How to derive the sum-to-product formula for cos(a-b)-cos(a+b)?
I know how to derive the sum-to-product formulas for cos+cos, sin+cos, and cos+sin. But I cannot seem to do it for cos-cos. My problem is the negative out front. I cannot product it from any of my proofs.

Here is my attempt:

I know that cos(a-b) = cosacosb + sinasinb
I know that cos(a+b) = cosacosb - sinasinb.
If I subtract these, I get cos(a-b)-cos(a+b) = 2sinasinb

However, my book tells me that cosa - cosb = -2sin(a+b / 2)sin(a-b /2)...

Where does the negative come from?

additional effort

My book also says I can make a + b = u and a - b = v. By adding and subtracting these from one another, this gets me u+v / 2 and u-v / 2. But none of those come with a negative that I can use to make sin(-x) = -sin(x).

Body:
Put
$$a=u+v; \;\; b=u-v$$
then

$$u=\frac{a+b}{2};\;\;  v=\frac{a-b}{2}$$

$$\cos(a)-\cos(b)=$$
$$\cos(u+v)-\cos(u-v)=$$
$$\cos(u)\cos(v)-\sin(u)\sin(v)-$$
$$\cos(u)\cos(v)-\sin(u)\sin(v)=$$

$$-2\sin(u)\sin(v)=$$
$$-2\sin(\frac{a+b}{2})\sin(\frac{a-b}{2})$$

and you computed the opposite
$$\cos(u-v)-\cos(u+v)=$$
$$2\sin(u)\sin(v)$$


问:
Legendre polynomial integration, basic
I want to evaluate $$\int_0^1x^2P_n(x)\,dx$$ but the only way out i see is by using $$xP_n(x)=\frac{nP_{n-1}+(n+1)P_{n+1}}{2n+1}$$ twice and since i got many $\int_0^1P_l(x)dx$,  i use $$P_l(x)=\frac{P'_{n+1}-P'_{n-1}}{2l+1}.$$ In the endm there a lot of terms with $P_k(0)$ with big constants with factorials before. Furthermore the $P_k(0)$ are known as $$\frac{(-1)^{l/2}l!}{2^l(\frac{l}{2}!)^2}$$ for (l) even, and zero to (l) odd.

There is a way of evaluating this without this long and tedious terms that dont cancel out?

答:
I will at least offer a solution for the even case. If $n=2k$ is even, then $P_n$ is an even function and $x^2P_n(x)$ is even as well. Thus, we would have

$$\int_0^1x^2P_{2k}(x)\,dx=\frac{1}{2}\int_{-1}^1x^2P_{2k}(x)\,dx$$

We can explicitly write the $x^2$ in terms of Legendre polynomials, since

$$P_0(x)=1,\;\;\;\;P_2(x)=\frac{3x^2-1}{2}$$

Thus,

$$x^2=\frac{2}{3}P_2(x)+\frac{1}{3}P_0(x)$$

Thus,

$$\int_0^1x^2P_{2k}(x)\,dx=\frac{1}{6}\int_{-1}^1\left(2P_2(x)+P_0(x)\right)P_{2k}(x)\,dx$$

For $k\neq 0$ and $k\neq 1$, by the orthogonality of the polynomials this integral must be zero. Otherwise, we get some value, using the normalization constant of the polynomial, which is

$$\int_{-1}^1P_n(x)^2\,dx=\frac{2}{2n+1}$$

Thus, we have

$$\int_0^1x^2P_{2k}(x)\,dx=\left\{\begin{array}{ccc}
\frac{1}{3} & : & k=0 \\
\frac{2}{15} & : & k=1 \\
0 & : & \text{otherwise}
\end{array}\right.$$

For odd values of $n$, I can't see an obvious way of doing this without resorting to ugly formulae for the polynomials.

Title: Legendre polynomial integration, basic


答:
Indeed, we have
$$
\cos(a - b) - \cos(a + b) = 2 \sin(a) \sin(b).
$$
As your book indicates, we can define
$$
u = a - b, \quad v = a + b,
$$
which can be solved for $a$ and $b$ to yield
$$
a = \frac {u + v}2, \quad b = \frac {v - u}{2} = - \frac{u - v}{2}.
$$
The correct solution for $b$ has the negative sign that you were missing.

Now starting with the identity in terms of $a$ and $b$, substitute the first pair of equations into the left hand side, and substitute the second set of equations into the right hand side. We end up with
$$
\cos(u) - \cos(v) = 2 \sin\left(\frac{u + v}{2}\right)\sin\left( -\frac{u - v}{2}\right)
\\ =
-2 \sin\left(\frac{u + v}{2}\right)\sin\left( \frac{u - v}{2}\right).
$$

Title: How to derive the sum-to-product formula for cos(a-b)-cos(a+b)?

Body:
I know how to derive the sum-to-product formulas for cos+cos, sin+cos, and cos+sin. But I cannot seem to do it for cos-cos. My problem is the negative out front. I cannot product it from any of my proofs.

Here is my attempt:

I know that cos(a-b) = cosacosb + sinasinb
I know that cos(a+b) = cosacosb - sinasinb.
If I subtract these, I get cos(a-b)-cos(a+b) = 2sinasinb

However, my book tells me that cosa - cosb = -2sin(a+b / 2)sin(a-b /2)...

Where does the negative come from?

additional effort

My book also says I can make a + b = u and a - b = v. By adding and subtracting these from one another, this gets me u+v / 2 and u-v / 2. But none of those come with a negative that I can use to make sin(-x) = -sin(x).


问:
Choosing balls out of a bag, replacing them by opposite colour
Can somebody help me out on this question:

A bag contains four white balls and four red balls. A ball is selected at random, removed and replaced by a ball of the opposite colour. A second ball is then selected at random.

a) calculate the probability that the second ball was white.

Ok this is what i did but i'am not sure if its correct, i used the conditional probability formula, and got $(\frac{4}{8}\times\frac{\frac{3}{8}}{\frac{4}{8}})$

Thanks.

答:
If the first ball is white, the second will be white only with probaility $\frac38$.
If the first ball is red, the second will be white with probaility $\frac58$.
The two possibilities for the first ball each have probability $\frac48=\frac12$, so the answer is $\frac12\frac38+\frac12\frac58=\frac12$ (as one might have guessed immediately by symmetry).</p>


问:
Actual operator used in chain rule for matrix derivative
In case of scalar, chain rule for $Y = f(g(X))$ can be written as

$\frac{dY}{dX} = \frac{dY}{dU}\frac{dU}{dX}$

where $U = g(X)$.

In case of $U$, and $X$ are $M \times N$, $P \times Q$ matrices respectively,

then $\frac{dY}{dU}$ and $\frac{dU}{dX}$ result in $M \times N$, $MN \times NQ$ matrices respectively.

Here I see an issue.

The above chain rule doesn't make sense,

because $M \times N$ matrix and $MN \times NQ$ matrix can be neither multiplied nor applied to dot product because of their sizes.

What am I missing or misunderstanding?
I guess division of $\frac{dY}{dU}$ and/or multiplication of $\frac{dY}{dU}$ and $\frac{dU}{dX}$
 should be replaced with other operators. But I'm not sure what they're.

Note: I've read many articles regarding derivatives but AFAIK they're introducing the case of vectors($N=1$ and/or $Q=1$).

答:
You need to use the double-dot product
$$
\frac{dY}{dX} \;=\;
\left(\frac{dY}{dU}\right):\left(\frac{dU}{dX}\right) \\
$$
which can also be written using index notation
$$\frac{dY_{ij}}{dX_{k\ell}} \;=\;
\sum_{m=1}^M\sum_{n=1}^N\left(\frac{dY_{ij}}{dU_{mn}}\right)
\left(\frac{dU_{mn}}{dX_{k\ell}}\right) \\
$$
NB: $\;$ All of the gradients above are fourth-order tensors.


问:
Are there random variables $X,Y$ such that $X,Y,X+Y \sim N(0,1)$?
Let's suppose we have two, not necessarily independent, random variables $X,Y \sim N(0,1)$.

Then, is it possible that $X+Y \sim N(0,1)$?

What I have managed to show is that because $Var(X+Y) = Var(X) + Var(Y) + 2Cov(X,Y)$ it would be necessary that $Cov(X,Y) = -1/2$.

But I'm still looking for an example or else a proof that it is not possible.

答: The pdf of the sum of two absolutely continuous random variables is simply given by the convolution of the pdf's of the variables. In our case, $f_X(x) = f_Y(x) = \frac{1}{\sqrt{2\pi}} e^{-\frac{x^2}{2}}$, so $f_{X + Y}(x) = \int_{- \infty}^\infty f_X(t)f_Y(x - t) dt = \frac{1}{4} \int_{- \infty}^\infty \exp(- \frac{t^2 + (x - t)^2}{2}) dt = \frac{1}{2 \pi} \int_{- \infty}^\infty \exp(- \frac{(t \sqrt{2})^2 - 2 t \sqrt{2} \frac{x}{\sqrt{2}} + \frac{x^2}{2} + \frac{ x^2}{2}}{2}) dt = \frac{1}{2 \pi} e^{-\frac{ x^2}{4}} \int_{- \infty}^\infty \exp(- \frac{(t \sqrt{2} - \frac{x}{\sqrt{2}})^2}{2}) dt = \frac{1}{2 \sqrt{2} \pi} e^{- \frac{x^2}{4}} \int_{- \infty}^\infty e^{- \frac{u^2}{2}} du = \frac{1}{2 \sqrt{2} \pi} e^{- \frac{x^2}{4}} \sqrt{2 \pi} = \frac{1}{2 \sqrt{\pi}} e^{- \frac{x^2}{4}}.$ In particular, the sum of two normals of mean $0$ and variance $1$ is not a normal of mean $0$ and variance $1$. I hope this helps. :)


问:
Skewed to the right or to the left?
If a median of some distribution given as a $PDF$ function is larger than its expected value, do we say that the distribution is skewed to the left or to the right?

答: It is not an inmediate implication, but the important idea is that the expected value is very sensitive to outliers. If a distribution has more mass to one side, the opposite tail (less mass, or in other words, less probability that an observation will fall near that range) will pull the mean to that side and we will say the skewness is to that flatter side (that flat tail creates the assimmetry in the distribution). The median will be more stable in relation with extreme values (it is the "center" of the data) so if the mean is more negative than the median, we have a clue that there is some extreme values to the left.</p>

Title: Skewed to the right or to the left?


问:
Is $1^\frac{1}{3}$ ambiguous?
I know that the three 3rd roots of unity are $1$, $(-1)^\frac{2}{3}$, and $-(-1)^\frac{1}{3}$. I also believe that $1^\frac{1}{3}$ is a cube root of unity since $(1^\frac{1}{3})^3=1$, and that $1^\frac{1}{3}= (-1)^\frac{2}{3}$ since,
\begin{equation}
1^\frac{1}{3}= (-e^{i\pi})^\frac{1}{3} = (-1)^\frac{1}{3}(e^{i\pi})^\frac{1}{3}=(-1)^\frac{1}{3}(-1)^\frac{1}{3}=(-1)^\frac{2}{3}.
\end{equation}
However, when solving $x^3=1$, I find $x=\sqrt[3]{1}=1^\frac{1}{3}$ which has those three unique roots as solutions. Does $\sqrt[3]{1}\neq1^\frac{1}{3}$? Or, is $1^\frac{1}{3}$ ambiguous in some way that $(-1)^\frac{2}{3}$ is not?

答:
It's a matter of definitions. For example, in the education that I received, the definitions were the following:

Surd function $\sqrt[n]x$, $n\in\mathbb{N^+}$, $x\in\mathbb{R}$ if $n$ is odd, $x\ge 0$ if $n$ is even. By definition,  $y=\sqrt[n]x$ is the largest real root of $y^n = x$. So $\sqrt 4 = 2$, $\sqrt[3]{-1} = -1$ and $\sqrt{-1}$ is undefined

Power function with real exponent $x^p$, $p\in\mathbb{R}$, $x\ge 0$ if $p\neq 0$, $x>0$ if $p=0$. By definition,  $y=x^p=\lim_{\frac{n}{m}\to p}\sqrt[m]{x^n}$. Here, $1^{1/3}=1$, $(-1)^{1/3}$ is undefined, $0^0$ is undefined too. The reason to limit scope to only non-negative numbers is because you want to preserve the property $a^pb^p=(ab)^p$ and $(a^p)^q = a^{pq}$. Note, that $\sqrt[n]{x}$ isn't generally the same as $x^{1/n}$.

Complex exponent $e^z=\exp{z}=1+z+z^2/2+...$, $z\in\mathbb C$. Note, that with this set of definition $e^z$ isn't generally the same as “number $e$ to the power of $z$”. Since the latter is only defined for real $z$.

By this set of definitions, $1^{1/3}=1$ and isn't ambiguous. However, your expression $(-e^{i\pi})^{1/3}=(-1)^{1/3}e^{i\pi/3}$ is wrong because power function $x^y$ is not defined for negative argument $x=-1$.

What options do you have if you still want to define something like $(-1)^{2/3}$?

As in some software, you can set $x^y=e^{y\ln x}$ where $\ln x$ is a principal value of a logarithm. However, you are losing the power properties I listed above  (that's exactly what happened $(-e^{i\pi})^{1/3}\neq(-1)^{1/3}e^{i\pi/3}$ because by this definition generally $x^ay^a\neq(xy)^a$)and also losing continuity:
$$
(-1+\epsilon i)^{1/2} \approx i, \qquad (-1-\epsilon i)^{1/2} \approx -i,\qquad\text{for small $\epsilon>0$}
$$

You can define $y=x^{p/q}$ as a set of roots $y^q=x^p$, you will retain continuity on $x$, but it only really works for rational powers (or you have to deal with infinite sets). And you still have problems with $(x^a)^b$ property: $(-1)^{1/3}$ is a set of 3 elements and $(-1)^{3/9}$ is a set of 9.

In general, I would avoid using power notation if the argument is not non-negative or the exponent is not real. Otherwise, you need to explicitly include your definition of power function if you don't want to be misunderstood.

Title: Is $1^\frac{1}{3}$ ambiguous?


答: Since the problem is symmetrical between red and white it is easy to see that the probability that the second ball is red will be the same as for the second ball being white. The probability will therefore be $\frac 12$.</p>

Title: Choosing balls out of a bag, replacing them by opposite colour

Body:
Can somebody help me out on this question:

A bag contains four white balls and four red balls. A ball is selected at random, removed and replaced by a ball of the opposite colour. A second ball is then selected at random.

a) calculate the probability that the second ball was white.

Ok this is what i did but i'am not sure if its correct, i used the conditional probability formula, and got $(\frac{4}{8}\times\frac{\frac{3}{8}}{\frac{4}{8}})$

Thanks.


Body:
From complex expressions of $\sin x$ and $\cos x$:

$\sin x =\frac{e^{ix}-e^{-ix}}{2i}$, $\cos x =\frac{e^{ix}+e^{-ix}}{2}$

$2\sin \frac{a+b}{2}\sin \frac{a-b}{2} =2(\frac{e^{^{i\frac{a+b}{2}}}-e^{-{i\frac{a+b}{2}}}}{2i})(\frac{e^{{i\frac{a-b}{2}}}-e^{{-i\frac{a-b}{2}}}}{2i})$

$2\sin \frac{a+b}{2}\sin \frac{a-b}{2} =2\frac{(e^{ia}+e^{-ia})-(e^{ib}+e^{-ib})}{4i^2}=-(\cos a-\cos b)$=$\cos b-\cos a$


答:
Develop the right side:

$$-2\sin\frac{a+b}2\,\sin\frac{a-b}2=-2\left[\sin\frac a2\cos\frac b2+\sin\frac b2\cos\frac a2\right]\left[\sin\frac a2\cos\frac b2-\sin\frac b2\cos\frac a2\right]=$$

$$\stackrel{\text{squares difference}}=-2\left[\sin^2\frac a2\,\cos^2\frac b2-\sin^2\frac b2\,\cos^2\frac a2\right]=$$

$$=-2\left[\left(1-\cos^2\frac a2\right)\cos^2\frac b2-\left(1-\cos^2\frac b2\right)\cos^2\frac a2\right]=$$

$$=-2\left[\cos^2\frac b2-\cos^2\frac a2\right]=-2\left[\cos^2\frac b2-\sin^2\frac b2+\sin^2\frac b2-\cos^2\frac a2+\sin^2\frac a2-\sin^2\frac a2\right]=$$

$$=-2\left[\cos b-\cos a+\sin^2\frac b2-\sin^2\frac a2\right]=-2\left[\cos b-\cos a-\left(\frac12-\sin^2\frac b2\right)+\frac12-\sin^2\frac a2\right]=$$

$$=-2\left[\cos b-\cos a-\frac12\cos b+\frac12\cos a\right]=\cos a-\cos b$$

We used several times in the above the super-identity

$$\cos2x=\begin{cases}\cos^2x-\sin^2 x\\{}\\2\cos^2 x-1\\{}\\1-2\sin^2x\end{cases}$$

Can you spot the places where we used this?


问:
Trouble trying to line integrate around a unit circle
I derived a formula for integrating the length of a line over a scalar valued, single-variable function. I've seen such formulae for polar curves and parametrics and multivariable calculus but my attempt focused on what I'd call "normal" functions.

My derivation comes out as: the length of a line drawn by $f(x)$ over $[a, b]$ is: $\int_a^b \sqrt{(\frac{dy}{dx}) ^ 2 + 1} \space dx$

To test my formula on a curve of known length, I applied it to the unit circle, specifically the top-right quarter circle, which would have circumference $\frac{2\pi \cdot [r = 1]}{4} = \tfrac{1}{2}\pi$. I converted the implicit curve $x^2 + y^2 = 1$ to a function $y = +\sqrt{1 - x^2}$, which I think holds for the top-right quarter circle. Then, $\frac{dy}{dx} = \tfrac{1}{2} \cdot -2x \cdot (1 - x^2) ^ {-\frac{1}{2}} = -\frac{x}{\sqrt{1 - x^2}}$

According to my tested formula, the integral is now $\int_0^1\sqrt{(\frac{dy}{dx}) ^ 2 + 1}\space dx = \int_0^1 \sqrt{\frac{x^2}{1 - x^2} + 1}\space dx = \int_0^1 \sqrt{\frac{1}{1 - x^2}} \space dx$. I do not know how to solve this regularly, so I attempted a trigonometric substitution (which seems reasonable, given the circle and the desired result of half $\pi$) of $x = \sin(\theta)$, resulting in the integral being equivalent to $\int_0^{\pi/2} \frac{1}{\sqrt{1-\sin^2(\theta)}}\space d\theta = \int_0^{\pi/2} \frac{1}{\cos(\theta)}\space d\theta$, which according to the internet would be undefined, as the antiderivative of $\frac{1}{\cos(\theta)}$ is apparently $\ln |\sec(\theta) + \tan(\theta)|$, and $\sec$ and $\tan$ are both undefined at $\frac{\pi}{2}$.

Where's my mistake? Is my integration technique bad, my formula bad, or both?

答:
You forgot to replace $ dx $ by $\cos(\theta)d\theta$.

$$\int_0^1\frac{dx}{\sqrt{1-x^2}}=$$

$$\int_0^{\frac{\pi}{2}}\frac{\cos(\theta)d\theta}{\sqrt{1-\sin^2(\theta)}}=$$
$$\int_0^{\frac{\pi}{2}}\frac{\cos(\theta)d\theta}{\cos(\theta)}=\frac{\pi}{2}$$

The first integral is improper but convergent.


答: You made a slight mistake: if you make $x=\sin \theta$ then $dx=\cos \theta d\theta$

Title: Trouble trying to line integrate around a unit circle

Body:
I derived a formula for integrating the length of a line over a scalar valued, single-variable function. I've seen such formulae for polar curves and parametrics and multivariable calculus but my attempt focused on what I'd call "normal" functions.

My derivation comes out as: the length of a line drawn by $f(x)$ over $[a, b]$ is: $\int_a^b \sqrt{(\frac{dy}{dx}) ^ 2 + 1} \space dx$

To test my formula on a curve of known length, I applied it to the unit circle, specifically the top-right quarter circle, which would have circumference $\frac{2\pi \cdot [r = 1]}{4} = \tfrac{1}{2}\pi$. I converted the implicit curve $x^2 + y^2 = 1$ to a function $y = +\sqrt{1 - x^2}$, which I think holds for the top-right quarter circle. Then, $\frac{dy}{dx} = \tfrac{1}{2} \cdot -2x \cdot (1 - x^2) ^ {-\frac{1}{2}} = -\frac{x}{\sqrt{1 - x^2}}$

According to my tested formula, the integral is now $\int_0^1\sqrt{(\frac{dy}{dx}) ^ 2 + 1}\space dx = \int_0^1 \sqrt{\frac{x^2}{1 - x^2} + 1}\space dx = \int_0^1 \sqrt{\frac{1}{1 - x^2}} \space dx$. I do not know how to solve this regularly, so I attempted a trigonometric substitution (which seems reasonable, given the circle and the desired result of half $\pi$) of $x = \sin(\theta)$, resulting in the integral being equivalent to $\int_0^{\pi/2} \frac{1}{\sqrt{1-\sin^2(\theta)}}\space d\theta = \int_0^{\pi/2} \frac{1}{\cos(\theta)}\space d\theta$, which according to the internet would be undefined, as the antiderivative of $\frac{1}{\cos(\theta)}$ is apparently $\ln |\sec(\theta) + \tan(\theta)|$, and $\sec$ and $\tan$ are both undefined at $\frac{\pi}{2}$.

Where's my mistake? Is my integration technique bad, my formula bad, or both?


问:
How to prove that the sum and product of two algebraic numbers is algebraic?
Suppose $E/F$ is a field extension and $\alpha, \beta \in E$ are algebraic over $F$. Then it is not too hard to see that when $\alpha$ is nonzero, $1/\alpha$ is also algebraic. If $a_0 + a_1\alpha + \cdots + a_n \alpha^n = 0$, then dividing by $\alpha^{n}$ gives $$a_0\frac{1}{\alpha^n} + a_1\frac{1}{\alpha^{n-1}} + \cdots + a_n = 0.$$

Is there a similar elementary way to show that $\alpha + \beta$ and $\alpha \beta$ are also algebraic (i.e. finding an explicit formula for a polynomial that has $\alpha + \beta$ or $\alpha\beta$ as its root)?

The only proof I know for this fact is the one where you show that $F(\alpha, \beta) / F$ is a finite field extension and thus an algebraic extension.

答:
Consider fields $ E \supseteq F $, and elements $ \alpha, \beta \in E $ algebraic over $ F $. We want to show $ \alpha + \beta $, $ \alpha \beta $ are algebraic over $ F $ too. If even one of $ \alpha, \beta $ are $ 0 $, the result is trivial, so let's take both $ \alpha, \beta $ to be non-zero.

We have $ \alpha ^m + a_{m-1} \alpha ^{m-1} + \ldots + a_0 = 0 $ ( each $ a_i \in F $ ), and $ \beta ^n + b_{n-1} \beta ^{n-1} + \ldots + b_0 = 0 $ ( each $ b_j \in F $ ).

(The first equation lets us express all powers of $ \alpha $ as $F$-combinations of $ 1, \alpha, \ldots, \alpha ^{m-1} $. Similarly for $ \beta $)

Let $$ Z := \, [ \, \alpha ^0 \beta ^0, \alpha ^0 \beta ^1, \ldots, \alpha ^0 \beta ^{n-1} ; \alpha ^1 \beta ^0, \ldots, \alpha ^1 \beta ^{n-1} ; \ldots ; \alpha ^{m-1} \beta ^{0}, \ldots, \alpha ^{m-1} \beta ^{n-1} \, ]^{T} \in E^{mn} $$

Now notice we can express $ (\alpha + \beta)Z $ as $ M_1 Z $ with $ M_1 \in F^{mn \times mn} $. So $ ( ( \alpha + \beta ) I - M_1 ) Z = 0 $, and as $ Z \neq 0 $ we have $ \det( (\alpha + \beta)I - M_1 ) = 0 $. Hence $ \alpha + \beta $ is a root of the polynomial $ P(t) := \det( tI - M_1 ) \in F[t] $, and is therefore algebraic over $ F $. Similarly we can show $ \alpha \beta $ is algebraic over $ F $ (Write $ \alpha \beta Z = M_2 Z $ and proceed as above).


问:
Are negative numbers square-free?
How would one define whether a number is square-free? For example is -243 a square-free number?

Any help would be appreciated.

答:
The wikipedia definition is, in my opinion, a bit awkwardly phrased. I would phrase it as follows instead:

In the integers, $z$ is square-free iff no nontrivial square divides $z$.

In this context "nontrivial" means "$\not=1$" - after all, $1$ is a square and divides everything. The integers are quite nice, and there are a few equivalent ways we can reformulate this definition, the most common being "no square of a prime divides $z$" (this is what the wikipedia definition is saying in a rather roundabout way); it's a good exercise to prove that this definition is equivalent to the one above.

As to a particular example, we have $$-243=(-1)(81)(3),$$ and so $81\vert -243$. Since $81$ is a nontrivial square in the integers, $-243$ is not square-free.

The definition above generalizes to arbitrary rings, with the slight twist that we need a different notion of "nontrivial:"

In a ring $R$, an element $a$ is square-free iff whenever $b^2\vert a$ the element $b$ has a multiplicative inverse in $R$ (= $b$ is a unit in $R$).

In $R=\mathbb{Z}$ the only units are $-1$ and $1$, and so the only squares of units is $1$. So this does generalize the definition above.

Note the absence of primes from the above definition. This is because in rings other than the integers we need not have a good notion of "prime factorization" - see here.

Title: Are negative numbers square-free?


问:
Why is every meromorphic function on the complex projective plane a rational function?
You can use the fact that every holomorphic function on the complex plane with a non essential singularity at $\infty$ is a polynomial by considering $f(1/z)$ and matching up the taylor series to that and $f$.  This gets you most of the way there but what is the last step?

答:
Multiply by $(z-a_i)^{k_i}$ where $a_1,...,a_n$ are the poles of order $k_1,...,k_n$. Note that not having an essential singularity at $\infty$ and being non-constant means that $f(z) = \infty$ only finitely many times (you can use identity theorem on Riemann surfaces).

This is holomorphic, so you can use the result you mentioned.


答:
It is possible. Suppose
$$(X,Y)'\sim\mathcal{N}\bigg(\begin{pmatrix}0\\0\end{pmatrix},\begin{pmatrix}1&-\frac{1}{2}\\-\frac{1}{2}&1\end{pmatrix}\bigg)$$

And consider the vector $(1,1)$. Then $(1,1)\cdot (X,Y)'=X+Y$ is distributed Normal with mean

$$(1,1)\cdot\begin{pmatrix}0\\0\end{pmatrix}=0$$

and variance

$$(1,1)\cdot \begin{pmatrix}1&-\frac{1}{2}\\-\frac{1}{2}&1\end{pmatrix}\cdot\begin{pmatrix}1\\1\end{pmatrix}=1$$

Which is what you want.

Note: By a similar argument, using the vectors $(1,0)$ and $(0,1)$ you have that $X$ and $Y$ are standard normals on their own.

Note: One should be careful and make sure that the variance-covariance matrix is a valid one. One way of doing it is by directly checking it is possitive semi-definite, which is true in this case as the first principal minor is $1$ and the determinant is $5/4$, both strictly positive.

There is an easy second way to verify that a $2$ by $2$ matrix is a valid variance-covariance matrix. Call this matrix $\Sigma$. If you can verify that the diagonal entries are strictly positive, the matrix is symmetric and that there exists $\rho\in[-1,1]$, a valid correlation coefficient, such that $\Sigma_{21}=\Sigma_{12}=\rho\cdot(\Sigma_{11}\cdot\Sigma_{22})^{1/2}$, you are done. In this case $\rho=-\frac{1}{2}$.

Title: Are there random variables $X,Y$ such that $X,Y,X+Y \sim N(0,1)$?

Body:
Let's suppose we have two, not necessarily independent, random variables $X,Y \sim N(0,1)$.

Then, is it possible that $X+Y \sim N(0,1)$?

What I have managed to show is that because $Var(X+Y) = Var(X) + Var(Y) + 2Cov(X,Y)$ it would be necessary that $Cov(X,Y) = -1/2$.

But I'm still looking for an example or else a proof that it is not possible.


问:
From my results, the quotient of two derivatives should not be defined for functions which are continuous at $x$?
I apologize for such a stupid question, but given $f(x)$ and $g(x)$, we could state that the $\frac{f'(x)}{g'(x)} = \lim_{h \to 0} \frac{f(x+h)-f(x)}{g(x+h)-g(x)}$, now this implies that given $f$ and $g$ which are continuous at $x$, then $\frac{f'(x)}{g'(x)}$ is undefined, something that should not be true. What's going on here?

Note that if this is a duplicate, please comment, I did not know what to look up for such a problem, I have asked a friend above me and he said he could not spot anything wrong.

Thank you.

答:
It is correct that both numerator and denominator in
$$
\frac{f(x+h)-f(x)}{g(x+h)-g(x)}
$$
tend to zero for $h \to 0$ if both $f$ and $g$ are continuous at $x$. But that does not tell anything about the limit of the fraction: It can be non-existent, infinity, or some finite number. If we write the fraction as
$$
\frac{\frac{f(x+h)-f(x)}x}{\frac{g(x+h)-g(x)}x}
$$
then we can see that the limit for $h \to 0$ is $\frac{f'(x)}{g'(x)}$, provided that

$f$ and $g$ are differentiable at $x$,

$g(x+h) - g(x) \ne 0$ for all sufficiently small $h$, and

$g'(x) \ne 0$.

This also follows from L'Hôpital's rule, which is a consequence of Cauchy's mean value theorem.


问:
Riemann integrability - proof of an integrable function
Let $f:[a,b]\rightarrow [a,b]$ be Riemann integrable with $a<c<b$. Show that $\int_a^cf$ and $\int_c^bf$ both exist. Use the definition of Riemann's criterion for integrability.

I don't really understand the question - surely if a function is Riemann integrable then its integral exists?

答:
Let us focus on $[a, c]$.

Given any $\epsilon > 0,$ you wish to show that there exists a partition $\mathcal{P}$ of $[a, c]$ such that $$U(\mathcal{P}, f) - L(\mathcal{P}, f) < \epsilon.$$

Now, since $f$ is Riemann integrable on $[a, b]$, you know that that there exists a partition $\mathcal{Q}$ of $[a, b]$ such that $$U(\mathcal{Q}, f) - L(\mathcal{Q}, f) < \epsilon.$$

From this, we may first get a partition $\mathcal{Q}' = \mathcal{Q} \cup \{c\}$ of $[a, b]$. Note that this is a refinement and hence,
$$U(\mathcal{Q}', f) - L(\mathcal{Q}', f) < \epsilon.$$

From the above, there is an obvious partition $\dot{\mathcal{Q}}$ of $[a, c]$ that you can get. Do you see what it is? Moreover, the above difference $(U - L)(\mathcal{Q}', f)$ is a certain sum of non-negative real numbers. When considering the corresponding difference for $\dot{\mathcal{Q}}$, we are just ignoring some of those terms. Thus, we get $$U(\dot{\mathcal{Q}}, f) - L(\dot{\mathcal{Q}}, f) < \epsilon,$$
as desired.


问:
Inverse Laplace Using Heaviside Function
I have a function for which I need to both find the inverse Laplace transformation and sketch a graph. The function is
$$
F(s)=\frac{2}{s^3}-\frac{4}{s^2}e^{-s}-\frac{2}{s^3}e^{-2s}
$$
I've gotten as far as finding
$$
f(t)=t^2+(-4t+4)(u_1(t)-u_2(t))-t^2u_2(t)
$$
using the Heaviside function. I'm not sure how to convert this to a piecewise function. Any help is greatly appreciated!

答:
Inverse Laplace Transform gives:
$$f(t)=t^2-(4t-4)\Theta(t-1)-(t-2)^2\Theta(t-2),$$
where $\Theta$ is the Heaviside function. Now you should consider three cases: $t\le 1$, $1<t\le 2$ and $t>2$. Looking at different parts of the function:

$$f(t) = \begin{cases}
t^2 : & 0\le t \le 1\\
t^2-4t+4 : & 1 < t\le 2\\
0 : & t>2.
\end{cases}$$
Since this is an Inverse Laplace Transform, we have to set $f$ for all $t\in\mathbb{Z}^-$ to $0$.


问:
Simplify $2\log 4 + 3\log 8 - \log 2$ using logarithmic laws, then evaluate.
Firs time I've encountered this type of question where there is a number in front of the log, and it's throwing me a bit. I'm fine with using the logarithmic laws to simplify, but not sure if I need to get rid of those numbers first, and if so, how? thought perhaps the power law would apply but obviously there's no powers so I'm really not sure how to approach this one.</p>

答:
Use that
$$
a\log\left(x\right)=\log\left(x^a\right)
$$
(and then :)
$$ay+by+cy=(a+b+c)y \phantom{1} where \phantom{1} y=\log\left(x\right)$$


问:
Number of students in the school
An School has $1200$ students. Each pupil takes $5$ classes a day. Each teacher teaches $4$ classes. Each class has $30$ students and $1$ teacher. How many teachers are there at School?

$\text{(A)}\ 30 \qquad \text{(B)}\ 32 \qquad \text{(C)}\ 40 \qquad \text{(D)}\ 45 \qquad \text{(E)}\ 50$

Although this question seems very easy at first glance, It confused me a lot. my guess is $\frac{1200}{30}=40$. but it doesn't make sense because I didn't use many information in the problem. can you please explain how to solve this?

答: There are $5 \times 1200$ "student-class" combinations, meaning that if you add up the # of students in all of the classes combined, you get $6000$.  At 30 students a class $\cdots$

Title: Number of students in the school


问:
Finding a paper
Sometimes I have trouble finding particular papers.  Does anyone have any general  suggestions?

I find myself in this situation frequently:  An author references a paper.  I find it on MathSciNet and read the abstract.  I then realize I want to read the paper.  Then I cannot find the paper.

Is there any better approach besides just using Google Scholar, Google, the author's webpage, JStor and MathSciNet?  I am at a University, and have some access to catalogues.

Specifically I wanted to read this but I can't seem to do it online.

Thanks a lot!

Update:  I ended up finding the paper by talking to a Professor I know who had a PDF on hand.  None of the links below lead to the correct paper, which is why I have not accepted an answer.

答: One thing we did in the Olden Days... go to the library.  Another was... write to the author.</p>

Title: Finding a paper


问:
Desperate for help showing integral is analytic
I don't have a prodigious background in analysis and would like some help...
Is the integral
$$f(t) = \int_{1}^{t}\sqrt{s} ds$$
analytic?

Clearly, the places where $\sqrt{s}$ fails to be analytic (i.e., the origin) are excluded from the region of integration...if it is analytic, why? Thanks for any help!

答: Well, if you exclued the origin, that's easy; at any positive number, there is a Taylor series expansion that converges by the Taylor remainder theorem, so it is analytic (you can also use the binomial series, appropriately shifted). Then integrating preserves analyticity.</p>


答: Let $n$ be the number of classes each day. Then the number of teachers is simply $\frac{n}{4}$ (since each teacher teaches four classes each day). There are a total $\frac{1200}{30} \times 5 = 200$ classes each day. Therefore the number of teachers is $\frac{200}{4} = 50.$ I hope this helps. :)

Title: Number of students in the school

Body:
An School has $1200$ students. Each pupil takes $5$ classes a day. Each teacher teaches $4$ classes. Each class has $30$ students and $1$ teacher. How many teachers are there at School?

$\text{(A)}\ 30 \qquad \text{(B)}\ 32 \qquad \text{(C)}\ 40 \qquad \text{(D)}\ 45 \qquad \text{(E)}\ 50$

Although this question seems very easy at first glance, It confused me a lot. my guess is $\frac{1200}{30}=40$. but it doesn't make sense because I didn't use many information in the problem. can you please explain how to solve this?


问:
Prove that the sequence $(x_n)$ is Cauchy.
Can you find errors in my prove?

Problem:

Let $(x_n)$ be a sequence of real numbers such that $(y_n)$ is a limited sequence with general term $y_n = \sum_{k=1}^{n}|x_{k+1} - x_k|$. Prove that $(x_n)$ is Cauchy.

My attempt:

$y_n = \sum_{k=1}^{n}|x_{k+1} - x_k| = |x_{n+1} - x_1| \geq |x_{n+1}| - |x_1| \Rightarrow |x_1| + y_n \geq |x_{n+1}|$, where I use the telescopic property in the second equality. Since $y_n$ is convergent (because it is monotonic and limited), $|x_{n+1}|$ is also convergent by the comparision criterion, therefore $x_n$ converges absolutely, therefore it is Cauchy.

sorry if this is duplicated.

答:
You've showen $(x_n)$ is a bounded ("limited") sequence, but that's not enough for convergence. There's no comparison test that says $a_n \le b_n$ and $b_n$ converges implies $a_n$ converges.

To prove the statement, use the fact that $y_n$ is a Cauchy sequence (you've shown it converges) to show $x_n$ is a Cauchy sequence directly with a similar triangle inequality application.