问:
Independence of two intertwined random variables
Let $X_0$, $X_1$ and $X_2$ be three mutually independent random variables. We define two more random variables $D_1$ and $D_2$ as follows:
$$D_1 = X_1 + X_0\\[1ex]
D_2 = X_2 + X_0$$
We're interested in arguing (in the most effective and simple way) if

$D_1$ and $D_2$ are independent

$D_1|X_0=x_0$ and $D_2|X_0=x_0$ are independent

If $D_1$ and $D_2$ are independent, it must be $\text{Cov}(D_1,D_2)=0$:

$$\text{Cov}(D_1, D_2)=\mathbb{E}[D_1 D_2]-\mathbb{E}[D_1]\mathbb{E}[D_2] =\\
=\mathbb{E}\left[ (X_1+X_0)(X_2+X_0) \right] - \mathbb{E}\left[ X_1+X_0 \right]\mathbb{E}\left[ X_2+X_0 \right]=\\
=\mathbb{E}\left[ X_1 X_2 + X_1 X_0 + X_0 X_2 + X_0^2 \right] - \mathbb{E}\left[ X_1 \right]\mathbb{E}\left[ X_2 \right] - \mathbb{E}\left[ X_1 \right]\mathbb{E}\left[ X_0 \right] - \mathbb{E}\left[ X_0 \right]\mathbb{E}\left[ X_2 \right] - \left(\mathbb{E}\left[ X_0 \right]\right)^2=\\
=\mathbb{E}\left[ X_1 \right]\mathbb{E}\left[ X_2 \right] + \mathbb{E}\left[ X_1 \right]\mathbb{E}\left[ X_0 \right] + \mathbb{E}\left[ X_0 \right]\mathbb{E}\left[ X_2 \right] + \mathbb{E}\left[ X_0^2 \right] - \mathbb{E}\left[ X_1 \right]\mathbb{E}\left[ X_2 \right] - \mathbb{E}\left[ X_1 \right]\mathbb{E}\left[ X_0 \right] - \mathbb{E}\left[ X_0 \right]\mathbb{E}\left[ X_2 \right] - \left(\mathbb{E}\left[ X_0 \right]\right)^2=\\
=\mathbb{E}\left[ X_0^2 \right] - \left(\mathbb{E}\left[ X_0 \right]\right)^2 = \text{Var}(X_0)\neq 0$$

So, if not for the trivial case in which $X_0 = \text{constant}$, $\mathbf{D_1}$ and $\mathbf{D_2}$ are not independent.

2.
One could do the same thing of point 1. all over again or just notice that this case is exactly the trivial one in which $X_0 = x_0$, a fixed "constant". So, $\mathbf{D_1|X_0 =x_0}$ and $\mathbf{D_2|X_0 =x_0}$ are independent.

MY QUESTION

Are my proofs correct? Is there a simpler way to prove the same thing or even just argument the same results in a better, more intuitive way?

A BONUS QUESTION

How can I test these theoretical results with the following example? (In order to really "see" what I found)

$X_0$ is the outcome of the fair coin "COIN": $X_0=1$ if Heads, $X_0=0$ if Tails.

$X_1$ is the outcome of the 6-faced fair dice "DICE1": $X_1=\{1,2,3,4,5,6\}$

$X_2$ is the outcome of the 6-faced fair dice "DICE2": $X_2=\{1,2,3,4,5,6\}$

SOMETHING THAT PERPLEXES ME

Intuitively and "constructively", I would say that the event to observe $D_1=k$ is independent from that of observing $D_2 = h$, infact the first is the event of obtaining $X_1 + X_0 = k$ with a throw of DICE1 and a toss of COIN while the second is the event of obtaining $X_2 + X_0 = k$ with a throw of DICE2 and a different toss of COIN: these two "procedures" are totally independent from each other and so should be their probabilities (?)

But this contradicts my analytical results, doesn't it! Why is that?

答:
Simulation with your coins and dice: With a million
replications of the experiment, results should be
accurate to two places.

```<code>set.seed(220)
x.0 = sample(0:1, 10^6, rep=T)
x.1 = sample(1:6, 10^6, rep=T)
x.2 = sample(1:6, 10^6, rep=T)
d.1 = x.1 + x.0
d.2 = x.2 + x.0
cov(d.1, d.2)
[1] 0.25046        # aprx 0.25
var(x.0)
[1] 0.2500002      # aprx 0.25
</code>```

Matches your result that $Cov(D_1,D_2) = Var(X_0).$

```<code>cov(d.1[x.0==1], d.2[x.0==1])
[1] 0.0005137164   # aprx 0
</code>```

Matches your result that the covariance of the conditional variables $D_1 | X_0=1$ and $D_2 | X_0=1$ is $0.$

If we simulate only 5000 values of each and uniformly
jitter them (to avoid over-plotting of the discrete points), we can visualize the nature of the association
between $D_1$ and $D_2$ in your example with coins and dice.

R code for figure:

```<code>set.seed(220);  m = 5000
x0 = sample(0:1, m, rep=T)
x1 = sample(1:6, m, rep=T)
x2 = sample(1:6, m, rep=T)
j1 = runif(m, -.2,.2);  j2 = runif(m, -.2,.2)
d1 = x1 + x0 + j1;  d2 = x2 + x0 + j2
plot(d1,d2, pch=".")
</code>```

Body:
Simulation with your coins and dice: With a million
replications of the experiment, results should be
accurate to two places.

set.seed(220)
x.0 = sample(0:1, 10^6, rep=T)
x.1 = sample(1:6, 10^6, rep=T)
x.2 = sample(1:6, 10^6, rep=T)
d.1 = x.1 + x.0
d.2 = x.2 + x.0
cov(d.1, d.2)
[1] 0.25046        # aprx 0.25
var(x.0)
[1] 0.2500002      # aprx 0.25

Matches your result that $Cov(D_1,D_2) = Var(X_0).$

cov(d.1[x.0==1], d.2[x.0==1])
[1] 0.0005137164   # aprx 0

Matches your result that the covariance of the conditional variables $D_1 | X_0=1$ and $D_2 | X_0=1$ is $0.$

If we simulate only 5000 values of each and uniformly
jitter them (to avoid over-plotting of the discrete points), we can visualize the nature of the association
between $D_1$ and $D_2$ in your example with coins and dice.

R code for figure:

set.seed(220);  m = 5000
x0 = sample(0:1, m, rep=T)
x1 = sample(1:6, m, rep=T)
x2 = sample(1:6, m, rep=T)
j1 = runif(m, -.2,.2);  j2 = runif(m, -.2,.2)
d1 = x1 + x0 + j1;  d2 = x2 + x0 + j2
plot(d1,d2, pch=".")


问:
Question 11.8 Section Conformal mappings ponnusamy and silvermann
I am not able to solve the following question and so I am asking for help here.

Theorem 11.2 : If f(z) is analytic at $z_0$ with $f(z_0) \neq 0$ , then f(z) is 1-1 in some nbd of $z_0$.

Question : Given a complex number $z_0$ and an $\epsilon >0$ , show that there exists a function f(z) analytic at $z_0$, $f'(z_0)\neq 0$ and such that f(z) is not 1-1 for $|z-z_0|< \epsilon$ . Does this contradicts Theorem 11.2?

I am unable to prove the result given in the question (independently) and also I think it will contradict the theorem 11.2 .

Let the complex number be $z_0$ and $f'(z_0)=a $, $a\neq 0$ and given that f(z) is analytic. But How to prove f(z) is not 1-1.

The sizes and shapes of nbd's in both cases can be different but both will have $z_0$ as centre.

So, I am not able to prove what is asked.

Can u please help me ?

答:
Given $z_0 \in \Bbb C$ and $\epsilon > 0$, the function
$$
 f(z) = (z-z_0)(z-z_0+\frac 12 \epsilon)
$$
is holomorphic with $f'(z_0) =  \epsilon/2 \ne 0$. $f$ is not 1-1 on the disk $|z -z_0| < \epsilon$, since $f(z_0) = f(z_0-\epsilon/2)$.

This does not contradict Theorem 11.2. $f$ is still 1-1 in some smaller neighborhood of $z_0$, i.e. in some disk $|z -z_0| < \epsilon'$ with $0<\epsilon' < \epsilon$.

ContentLicense: CC BY-SA 4.0


问:
Proof that a certain fraction is always an integer
Prove that $$\frac{(n+1)(n)^2(n-1)^2...(n-k+2)^2(n-k+1)}{(k+1)(k)^2(k-1)^2...(2)^2(1)}$$ is or is not an integer for $0\leq k \leq n$, where $k$ and $n$ are integer values.

This looks like $\frac{(n+1)!(n)!}{(n-k+1)(n-k)(k+1)!(k)!}$. The above statement is true for k=1 and k=2 as seen by observing modular residues. Not sure how to proceed.

Body:
Easy: it's $\large\color{#c00}{\frac{f_{n+1}f_n}{k+1}}$ for $f_n =\large  {n\choose k}.\,$ $\,\color{#c00}{k\!+\!1}\mid \color{#0a0}{(n\!+\!1)f_n} = (k\!+\!1)\large {n+1\choose k+1}\,$ so $\,\color{#c00}{k\!+\!1\mid f_{n+1}f_n}\,$ by

Lemma $\ \forall n\!: \color{#0a0}{(n\!+\!1)f_n}\equiv 0\,\Rightarrow\, \forall n\!: f_{n+1}f_n\equiv 0,\ $ since

$\ \ \ \ \ f_{n+1}f_n \equiv  \color{#0a0}{(n\!+\!2)f_{n+1}}f_n - \color{#0a0}{(n\!+\!1)f_n} f_{n+1} \equiv 0\ \ $ (all $\bmod \color{#c00}{k\!+\!1}\,$ for above)


问:
Prove that this function define a norm on $\mathbb{R}^2$.
Let $\| \;\|:\mathbb{R}^2\rightarrow\mathbb{R}$ be a function such that
$ \| (x,y)\|=\sqrt{|x|^2+|y|^2}$ for all $(x,y)\in\mathbb{R}^2$.

I need to show that $\|\;\|$ defines a norm. I would like a hint in order to prove that $\parallel \; \parallel$ satisfies the triangle inequality:

$ \sqrt{|x_1+x_2|^2+|y_1+y_2|^2}\leq \sqrt{|x_1|^2+|y_1|^2}+\sqrt{|x_2|^2+|y_2|^2}$

Thanks!

答:
Let $x, y\in \mathbb{R}^2$. Then

\begin{align}
\|x+y\|^2&=\langle x+y, x+y\rangle\\&=\langle x, x\rangle + 2\langle x, y\rangle+\langle y, y\rangle \\ &\le \{\text{Cauchy-Schwarz}\} \\&\le \|x\|^2+2\|x\|\|y\|+\|y\|^2  \\
&=(\|x\|+\|y\|)^2,
\end{align}
which is your result.

ContentLicense: CC BY-SA 3.0


答:
Not an answer, but too long for a comment.

Adding $a$ to both sides means you can define:

$$f(a) =\sum_{k=1}^a (k,a)\tag 1$$

And you want $f(a)\equiv 1\pmod{a-1}\iff a$ is prime.

Then show that:

$$f(a)=\sum_{d\mid a} d\phi(a/d)$$

Thus $f$ is multiplicative.

So then compute $f(p^n)=np^{n-1}(p-1)+p^n$, when $p$ is prime.

So that gives you a general formula for $f(a)$ in terms of the prime factorization of $a.$

But I don’t see where to go from there. I’m not even sure there isn’t a counterexample.

Title: Show that $\sum_{k=1}^{a-1}(k,a)\equiv0\pmod{a-1}\iff a $ is prime

Body:
Denote $\gcd(a,b)$ as $(a,b)$

Let $a\ge 2$, can it be shown that

$$(1,a)+(2,a)+\cdots+(a-1,a)\equiv0\pmod{a-1}$$

Satisfy if and only if $a$ is prime?

Clearly if $a$ is prime then $(1,a)+(2,a)+\cdots+(a-1,a)\equiv1+1+\cdots +1\equiv a-1\equiv0\pmod{a-1}$

Claim's hold true upto $10^4$ source code Pari GP

```<code>forcomposite(a=2,10000,if(sum(k=1,a-1,gcd(k,a))%(a-1)==0,print([a])))
</code>```

Update #1

Sequence1 for composite $a$,  $[a,\sum_{k=1}^{a-1}(k,a)\equiv\pmod{a-1}]$

```<code>[4, 1][6, 4][8, 5][9, 4][10, 8][12, 6][14, 12][15, 2][16, 2][18, 11][20, 14][21, 4][22, 20][24, 7][25, 16][26, 24][27, 2][28, 22][30, 18][32, 18][33, 8][34, 32][35, 14][36, 27][38, 36][39, 10][40, 23][42, 30][44, 38][45, 12][46, 44][48, 4][49, 36][50, 47][51, 14][52, 46][54, 30][55, 26][56, 39][57, 16][58, 56][60, 5][62, 60][63, 24][64, 3][65, 32][66, 54][68, 62][69, 20][70, 5][72, 64][74, 72][75, 28][76, 70][77, 44][78, 66][80, 36][81, 56][82, 80][84, 21][85, 44][86, 84][87, 26][88, 71][90, 32][91, 54][92, 86][93, 28][94, 92][95, 50][96, 84][98, 10][99, 48][100, 24]
</code>```

Edit: link for MO post which asks for such infinitely many composite number.


问:
What does the cross product of the velocity and position vector represent?
This is a theorem from my text:

First, why are we taking the cross product of the position and velocity vectors? What is the physical representation of that? And furthermore what does the derivative of that represent?

答:
The laws of motion are second-order differential equations, which means trajectories are determined by position and velocity at a given moment in time. Thus, if a force field is radial, we can intuitively expect the trajectory to be contained in the plane spanned by a particle's position/velocity vectors at a given point in time (the perpendicular components of the position/velocity are zero, thus stay zero upon solving).

Since the cross product of two vectors is perpendicular to them, we can aim to use the cross product  in proving our intuition correct. If indeed $\mathbf{x}(t)$ and $\mathbf{x}'(t)$ are contained in a plane, then their cross product $\mathbf{x}(t)\times\mathbf{x}'(t)$ never changes direction (although could, in principle, change in magnitude). An even stronger condition would be that the cross product is constant (its derivative is zero) - and that turns out to be true.

Physically, the cross product of momentum and velocity is the angular momentum $\mathbf{L}=\mathbf{r}\times\mathbf{p}$, which is what we're talking about here if we assume unit mass. Its derivative is torque. Thus, what we're concluding here is that a radial force field exerts zero torque (rotational force) on a particle.


问:
Arithmetic operations on numbers represented by prime factors (optimizing calculations)
Shortly, I'm asking for ideas on how to do 2 things:

Given the prime factors of two numbers $x,y$, find the prime factors of $x+y$ without finding $x+y$ and factoring it.

Given the prime factors of two numbers, determine which number is bigger, or at least find a partial check that will determine the answer for a significant amount of the possible cases.

If you're interested in the long story and the bigger picture of what I'm playing with, read on. This is just for fun, I am not doing this with any particular practical applications in mind, but who knows maybe it will turn out to be useful. To speed up calculations with very big numbers and many operations, I was thinking about representing rational numbers by prime factors. I defined some arithmetic operations that are indeed faster with this representation, but I failed defining addition and also failed finding a way to compare numbers without converting them back into standard representation.

First, the representation:

Let $x$ be an infinite ordered tuple of whole numbers, and $p(n)$ be the $n$th prime number. $x$ represents the following number:

$$\prod_{n=1}^{\infty} p(n)^{x_n}$$

For example:

$$(1,1,-2,0,0,0,...) = 2^1 \cdot 3^1 \cdot 5^{-2}$$

But this represents only positive numbers, so let's add another number (a "sign number") to the beginning of the tuple ($0$th position - $x_0$) that must be in $\{-1,0,1\}$. Now the tuple represents the number:

$$x_0\prod_{n=1}^{\infty} p(n)^{x_n}$$

This is the final definition. So now that we have a way to represent all rational numbers, let's look at the arithmetic with this representation.

Let $x,y$ be rational numbers, and $x_i,y_i$ the $i$th digits in the infinite ordered tuples representing these numbers.

Multiplication is easy:

$$x\cdot y = (x_0 \cdot y_0, x_1 + y_1, x_2 + y_2, ..., x_i + y_i, ...)$$

The first numbers are multiplied together, and the rest are summed.

Division is the same but with subtraction instead of addition:

$$\frac{x}{y} = (x_0 \cdot y_0, x_1 - y_1, x_2 - y_2, ..., x_i - y_i, ...)$$

Powers are also easy:

$$x^n = (x_0^{|n|}, nx_1, nx_2, ..., nx_i, ...)\\
n\in \Bbb{Z}$$

Addition is where I'm stuck (I don't want to calculate the actual numbers, add them and then factor, this would defeat the purpose of representing numbers by their prime factors). I guess this is an unsolved problem because solving it would provide an easy way to find all the prime numbers, but I would appreciate any pointers to potentially useful directions.

I did find a way to at least somewhat optimize the calculation when I convert them to standard representation.

First I'll define something that will be useful here and also later on. Let's say I want to get a more convenient representation of $x$ and $y$ (still with tuples). The first thing I'll do is factor out the greatest common divisor, and then I'll also factor out the smallest number that is required to turn both numbers into integers. This leaves me with two integers that have no common factors, and the number I factored out to get these integers.

For example if:

$$x=(1,2,5,4,0,4,0,...)\\ y=(1,3,3,4,-2,4,0,...)$$

I can divide both of them by $(1,2,3,4,-2,4,0,...)$ and get:

$$\frac{(1,2,5,4,0,4,0,...)}{(1,2,3,4,-2,4,0,...)}=(1,0,2,0,2,0,0,...)\\
\frac{(1,3,3,4,-2,4,0,...)}{(1,2,3,4,-2,4,0,...)}=(1,1,0,0,0,0,0,...)$$

It's easy to find this convenient common factor, for every $i>0$, the $i$th number in the tuple representing the common factor is $\min(x_i,y_i)$. I have no better name for it, so let's just call it Convenient Common Factor (CCF for short).

Back to the topic of addition when using the tuple representation. I said I found a way to optimize the calculation despite the need to convert the numbers into standard representation. The idea is to factor out the CCF before the conversion from tuples to standard representation, so I can perform the conversion and addition on only the convenient integers, and once I convert their sum back into tuples I can multiply it by the CCF. This process makes both the addition and the conversion easier, including the factoring to convert back to tuples (simply because the number is smaller), but it's still going to be a ridiculously slow process because big numbers take a long time to factor (at least without quantum computers).

I'm also interested in comparing the size of two numbers. If $a>b$ then dividing or multiplying both of them by the same positive number doesn't change the inequality. This means that I can factor out the CCF and then compare the more convenient numbers. Using the numbers from the CCF example:

$$(1,2,5,4,0,4,0,...) - (1,3,3,4,-2,4,0,...) = (1,2,3,4,-2,4,0,...) \cdot \big( (1,0,2,0,2,0,0,...) - (1,1,0,0,0,0,0,...) \big)$$

While in this example it's obvious that the first number is bigger, I didn't find an algorithm that will give the correct answer in every case without multiplying some numbers in the tuple by their corresponding primes. Intuitively it seems like this problem is easier than the addition problem and might have an easier solution or at least a decent partial solution to narrow down the cases that require conversion into standard representation (by performing a relatively quick check to see if the answer can be found without conversion, like "are $x$'s factors bigger than all of $y$'s factors and at least as numerous?" but hopefully something that covers more cases).

Another way to look at the problem is to divide the numbers by each other and compare the result to 1, in the case of this example we get $(1,-1,2,0,2,0,0,...) > 1$. Not sure if it's helpful, just throwing ideas.

答:
Question 2: partial answer.

I'll start with an example (using the tuple notation described in the question, but without the "sign number", assuming both numbers are positive), let's say I'm trying to figure out which number is bigger:

$$x=(2,4,2,4,0,...)\\
y=(4,2,3,3,0,...)
$$

$x>y \iff \frac xy > 1$

$$\frac{x}{y}=(2-4, 4-2, 2-3, 4-3, 0-0, ...)=(-2,2,-1,1,0,...)$$

I can split this number into numbers that are all obviously greater than 1, and therefore their product is also greater than one, showing that $x>y$:

$$\frac xy = (-2,2,-1,1,0,...) = (-2,2,0,0,0,...) \cdot (0,0,-1,1,0,...) = \left(\frac{3}{2}\right)^2 \cdot \frac{7}{5}$$

The trick is to find for each negative number in the tuple, positive numbers to it's right that will at least match it in value (a positive number can be shared with multiple negative numbers to it's left, as long as it's big enough to be split between them).

The algorithm is:

Let $d=0$.

Start at the first negative number in the tuple.

Let $c$ be the number in the current position.

Set $d$ to $\max(d+c,0)$.

If there are more non zero numbers in the tuple, advance to the next number in the tuple and repeat steps 3-5.

If you finished with $d=0$ then certainly $x>y$, otherwise it is uncertain.

Here's another example:

$$\frac xy = (1,10,-1,3,-2,1,-2,0,4,0,...)$$

Starting from the left, the first negative is -1 so $d=-1$. Next is 3, we add it to $d$ and because $d$ became positive we make it 0. Next we have -2 followed by a 1 so we are now at $d=-1$. The next number is -2, so $d=-3$. The 0 makes no difference, and finally the 4 is big enough to get us back to $d=0$. We finished with $d=0$, so $x>y$.

And a similar check can be done to see if $x<y$, with the negatives and positives switching roles and $d≥0$.

This covers an infinite number of cases, but there is also an infinite number of cases that it won't solve, I'm not sure which kind of case is more common in practice (it also depends on the situation), but this check is very fast compared to calculating $x$ and $y$ by multiplying the prime factors, so when this check works it helps a lot, and when it doesn't it's a negligibly small waste of time (for a computer).

More rules can be added to the check to make it cover more cases (for example a negative 1 preceded immediately by a positive 1 and has another positive 1 anywhere before it, also make a positive fraction), but I'm not sure if any of these rules are worth adding, because they might be useful in relatively few cases and unnecessarily slow down the simple check.

I still didn't find a check that works in all cases.


问:
A limit which exists in polar coordinates but not in Cartesian coordinates?
Let's have look at the function
$$ f(x,y) \begin{cases}
\frac{y(x^2+y^2)}{y^2+(x^2+y^2)^2} & (x,y)\neq(0,0)
\\0 & (x,y)=(0,0)\end{cases}.$$
Switching to polar coordinates gives
$$ f(r,\theta)=\begin{cases}
\frac{r^3 \sin \theta}{r^2\sin^2\theta+r^4} & r\neq0
\\0 & r=0\end{cases}.$$
We'd like to investigate the existence of a limit for $f$ at the origin.
In Cartesian coordinates ($f(x,y)$) one can immeidately see that the limit doesn't exist because for example on the path $y=0$ we have $\lim_{x\rightarrow 0,y=0} f(x,y)=0$ and on the path $y=x^2$ we have
$\lim_{x\rightarrow 0,y=x^2} f(x,y)=\frac{1}{2}$.

However, in polar coordinates we have
$$ f(r,\theta)=\begin{cases}
\frac{r \sin \theta}{\sin^2\theta+r^2} & r\neq0
\\0 & r=0\end{cases} $$
so that $$ \lim_{r\rightarrow 0}f(r,\theta) = \begin{cases}
0 & \sin\theta = 0\\
0 & \sin\theta \neq 0
\end{cases}$$
so the limit exists and is zero regardless of $\theta$. Why does it look the limit doesn't exist in Cartesian coordinates but exists in polar coordinates?

Edit: Thanks to the insightful comments on this page and other similar questions in the site, the unboundedness of the expression with $\sin^2 \theta$ is the key to the failure of the limit existence. $\sin\theta$ can get arbitrarily small, making the whole expression arbitrarily large, effectively counteracting $r\rightarrow 0$.

答:
The limit seems to exist in polar coordinates since you only tested the curves with fixed $\theta$. This is equivalent to only testing the lines $y=mx$ (and the line $x=0$) in Cartesian coordinates.

Indeed for these lines we have:

$$\lim_{(x,y) \to (0,0)}\frac {y(x^2+y^2)}{y^2 + (x^2 + y^2)^2} = \lim_{x\to 0}\frac {mx^3(1+m^2)}{m^2x^2 + x^4(1+m^2)^2}=\lim_{x\to 0}\frac {mx(1+m^2)}{m^2 + x^2(1+m^2)^2} =0$$

Suppose we take another curve: $r = \theta$. Then:

$$\lim_{r\to 0}\frac {r\sin\theta}{\sin^2\theta + r^2} = \lim_{r\to 0}\frac {r\sin r}{\sin^2 r+ r^2} = \lim_{r\to0}\frac {(\sin r)/r}{1 + (\sin^2 r)/r^2} = \frac1{1+1} = \frac12$$

which is not zero, so the limit cannot exist.


问:
How do I refactor this sailboat transform to solve for apparent wind direction for my sailboat plotting algorithm?
The core problem I would like assistance with is this:

How do I refactor this formula to transpose $a$?

$$\sin(a_0)\sin(a) \biggl(\frac{ \sin(\frac{a}{2})}{\sin(a_0 - a)}\biggr) ^2 = VW \cdot \eta$$

For more context, please read on.

I'm in a little over my head, and may be mixing up some terms, so please forgive my ignorance. I am attempting to write a route plotting algorithm that calculates a sailboat's $VMG$ (a measure of how optimal a sailboat's heading or direction of sail is) using live wind velocity and wind direction. The goal is to give the user a tool for optimizing pathfinding in the context of sailing. VMG is calculated using this formula:

$V$ = boat speed

$x$ = angle of wind relative to the front of the boat

$$VMG = V \cdot \cos(x)$$

In order to calculate boat speed from wind speed, I plan to use this formula, which is apparently widely accepted:

$VW$ = wind velocity

$a_0$ = true wind angle relative to the front of the boat

$a$ = apparent wind angle (i.e. wind generated by movement of the boat)

$$VB = VW \cdot \frac{\sin(a_0 - a)}{\sin(a)}$$

In order to solve this, I need to find $a$.

This article by Yoav Raz posits that a can be found by solving for it in his sailboat transform:

VW= wind velocity

$a_0$ = true wind angle relative to the front of the boat

$a$ = apparent wind angle (i.e. wind generated by movement of the boat)

$\eta$ = a complex measure of the boat's resistance to acceleration which for this purpose I will assume to be a low, constant number around 0.01)

$$\sin(a_0) * \sin(a) * \biggl(\frac{ \sin( \frac{a}{2})}{ sin(a_0 - a)}\biggr) ^2 = VW \cdot \eta$$

In practice, I will know the wind velocity and true wind angle, and as I said will be assuming $\eta$. Here is where the trouble starts: I am not very good at math anymore, and I find myself at a loss as to how to refactor this formula for my purposes. In order to use this formula in my algorithm, I need to refactor it into an expression that isolates $a$ given the other parameters( i.e. $a=f(x)$ ).

I've tried to refactor it by using trigonometric identities, which I think is the right path. The farthest I've gotten is this:

$$\sin(a_0) \sin(a)  \biggl( \frac{\sin(\frac{a}{2})}{\sin(a_0)\cos(a)-\cos(a_0)\sin(a)}\biggr)^2 = VW\cdot \eta$$

I know I'm kind of asking "please teach me trigonometry and calculus," so my apologies for that. I'm just hoping that even if I'm barking up the wrong tree that someone can help point me in the  right direction.

Edit:
It now occurs to me that the solution might be to simply iteratively attempt to solve this by trying inputs for a and attempting to solve for 1. The Raz article suggests doing this and starting with values slightly below a0. I could write a model to evaluate this expression with decreasing values until it arrives at a value a such that both sides resolve to 1.

Here are some more relevant resources to this problem space, if you would like to understand a bit more background around this topic:

The Physics of Sailing

Sailboat speed Vs. wind speed

Velocity Made Good

Polar Diagram

Apparent Wind Speed

答:
Your equation is $$\sin(a_0) \, \sin(a) \, \biggl(\frac{ \sin( \frac{a}{2})}{ \sin(a_0 - a)}\biggr) ^2 = VW \, \eta$$ For personal conveniency, I shall change notations : $b=a_0$ , $k=VW\, \eta$ and I shall consider that we look for the zero of function
$$f(a)=\sin ^2\left(\frac{a}{2}\right) \sin (a) \sin (b)-k \sin ^2(a-b)$$
For $a=b$, we have
$$f(b)=\sin ^2\left(\frac{b}{2}\right) \sin ^2(b)$$
$$f'(b)=\sin ^2\left(\frac{b}{2}\right) \sin (b) (1+2 \cos (b))$$
$$f''(b)=\frac{1}{4} (2 \cos (b)+\cos (2 b)-2 \cos (3 b)-8 k-1)$$
$$f'''(b)=-\sin (b)-\frac{1}{4} \sin (2 b)+\sin (3 b)$$

Assuming that $a$ is close to $b$, let us make one single interation of Halley method to get
$$a_{(1)}=b-\frac{2 f(b)\, f'(b)}{2 f'(b)^2-f(b)\, f''(b)}$$

Just to make a test, trying for $b=\frac \pi 6$ and $k=0.5$, the above  would give
$$a=\frac{\pi }{6}-\frac{30 \sqrt{3}-22}{277}\approx 0.415434 $$ while the "exact" solution is $0.399521$. In degrees, $b=30^{\circ}$ leads to an estimate of $a=23.8026^{\circ}$ while the "exact" solution is $a=22.8909^{\circ}$.

If, this is not sufficiently accurate, make one single interation of Householder method to get
$$a_{(1)}=b+\frac{3 f(b) \left(f(b)\, f''(b)-2 f'(b)^2\right)}{f(b)^2 f'''(b)+6 f'(b)^3-6
   f(b)\, f'(b)\, f''(b)}$$
For the worked example, this gives
$$a=\frac{\pi }{6}-\frac{7209 \sqrt{3}-6846}{43739} \approx 0.394644 $$ corresponding to $22.6114^{\circ}$.


问:
Prove $D$ is simply connected if and only if any nonzero analytic function on $D$ has an analytic square root on $D$.
I want to prove that $D$ is simply connected if and only if any nonzero analytic function on $D$ has an analytic square root on $D$.

$\Rightarrow$ Assume $D$ is simply connected. Since $f(z) \neq 0$ on $D$, we can choose an analytic branch for $\log f(z)$ on $D$, then
$$ e^{\frac{\log f(z)}{2}} = \sqrt{f(z)} $$
is an analytic square root of $f(z)$ on $D$.

But I don't know how to prove the other direction. Since there are so many equivalent definition s for the simply connectedness on complex plane, there is no obvious path toward the solution. Can any one give me some help please?

答:
If $D$ is not simply connected then its complement has a bounded component $K$, and there exists a closed path $\gamma$ in $D$ such that the winding number
$$
I(\gamma, a) = \frac{1}{2 \pi} \int_\gamma \frac{dz}{z-a}
$$
is equal to one for all $a \in K$. For those $a$, $f(z) = z-a$ does not have a square root in $D$: Assume that $g(z)^2 = z-a$, then
$$
2 \frac{g'(z)}{g(z)} = \frac{1}{z-a}
$$
and
$$
 I(g\circ \gamma, 0) = \frac{1}{2 \pi} \int_\gamma \frac{g'(z)}{g(z)}
 = \frac 12 I(\gamma, a) = \frac 12 \, ,
$$
contradicting the fact that the winding number is always an integer.


问:
Doubt in $\varepsilon$-$\delta$ proof of continuity of $x^2$
I have one elementary doubt on the proof that $f(x)=x^2$ is continuous for every $a \in \Bbb R$. The initial steps usually presented are: to deduce which $\delta$ will work we write:

$$|x^2-a^2|=|x-a||x+a|$$

Now, we must find some bound for $|x+a|$, so we require that $|x-a|<1$ or some other positive real number. Here comes my first doubt, this trick appears very often, what's the intuition on making $|x-a|<1$?

After that we have that this implies $x < 1 + a$ and this implies that $|x+a| < 1 + 2|a|$. Now it's obvious that if we set $|x-a|< \varepsilon/(1+2|a|)$ and this obviously will make $|f(x)-f(a)|<\varepsilon$. However this was deduced under the hypothesis that $|x-a|<1$, so what if it were not true that $|x-a|<1$? Also the end of the proof is normally saying that we must take

$$\delta = \min\{1, \varepsilon/(1+2|a|)\}$$

However it happens that if the minimum is $1$, it seems to not work, because when we use this $\delta$ the $\varepsilon$ doesn't even appear. I think my problem is that I didn't really get the trick of making $|x-a|<1$.

Thanks very much in advance!

答:
If some particular $\delta$ works for the given $\epsilon$, i.e., if for all $x$ satisfying $0 < |x - a| < \delta $ we have $|f(x) - L| < \epsilon$; then any smaller $\delta' < \delta$ also works for $\epsilon$. This is because $\{x \, :\, 0< |x - a| < \delta' \}$ is a subset of $\{x \, : \, 0< |x - a| < \delta \}$ when $\delta' < \delta$.

So we may take $\delta$ as small as possible as we want, everytime we need to put an upperbound on an expression involving $x$. Then, we can set $\delta$ to be the minimum of the upperbounds for $\delta$.


问:
Clarifying a Statistic Theorem
Given that $\mathbb{E}|X| < \infty$, then the min of $\mathbb{E}|X-a|$ is taken at $a$ = median of X, and nowhere else.

The proof my professor gave is the following:

$\mathbb{E}|X| < \infty $ => $\mathbb{E}|X-a| < \infty$. Assume $0$ is the median of X, then
$$
\mathbb{P}(X\leq 0) \geq 0.5
$$
$$
\mathbb{P}(X\geq 0) \geq 0.5
$$
given that $a>0$
$$\mathbb{E}(|X-a|-|X|) \geq a \cdot \mathbb{P}(X\leq0) - a \cdot \mathbb{P}(X > 0) \geq 0$$
Can someone please elaborate more on this proof? I'm not quite sure where did $a \cdot \mathbb{P}(X\leq0) - a \cdot \mathbb{P}(X > 0)$ comes from.

答:
It comes from the convenient observation that
\begin{align*}
|X-a|-|X| &= \begin{cases}
a, &\text{if } X\le0, \\
a-2X, &\text{if } 0<X0.
\end{cases}
\end{align*}

Title: Clarifying a Statistic Theorem

Body:
It comes from the convenient observation that
\begin{align*}
|X-a|-|X| &= \begin{cases}
a, &\text{if } X\le0, \\
a-2X, &\text{if } 0<X<a, \\
-a, &\text{if } X\ge a
\end{cases} \\
&\ge \begin{cases}
a, &\text{if } X\le0, \\
-a, &\text{if } X>0.
\end{cases}
\end{align*}


问:
Word problems based on probability theory

A player plays a game against a machine. At each round he deposits a coin the machine and flips another coin. The probability of heads appearing is $\frac 13$. If heads comes up, the coin deposited is received back along with an extra coin. If tails comes up, that coin is lost. Find the probability that the player loses all his coins by the thirteenth round or earlier. The player starts with 10 coins.

I don’t know the exact method to do it, but here is my try.

I think all cases have to be manually sorted. I found a few ie. he gets all tails for ten continues attempts, or he gets a heads in the first attempt and then gets tails until all coins are exhausted, or gets 2 heads and then all tails.

I don’t know if there are any more than this. Also is there a methodical way to solve it, by using binomial distribution or something of that kind?

答:
Hint

The final round cannot be the 11th round, nor the  13th round, because you are left with an odd number of coins after an odd number of rounds.

So you only have to consider $10$ and $12$ rounds. You’ve already got the probability of $10$ rounds.


答:
$\vert x-a\vert-\vert x\vert\ge a1_{\{x\le0\}}-a1_{\{x>0\}}$.

Indeed if $x\le0$ then $\vert x-a\vert-\vert x\vert=\vert x-a\vert+x\ge a-x+x=a$ and if $x>0$ then $\vert x-a\vert-\vert x\vert=\vert x-a\vert-x\ge x-a-x=-a$.

So
$$
\mathbb E[\vert X-a\vert-\vert X\vert]\ge\mathbb E[a1_{\{X\le0\}}-a1_{\{X>0\}}]=a\mathbb P(X\le0)-a\mathbb P(X>0).
$$

Title: Clarifying a Statistic Theorem

Body:
Given that $\mathbb{E}|X| < \infty$, then the min of $\mathbb{E}|X-a|$ is taken at $a$ = median of X, and nowhere else.

The proof my professor gave is the following:

$\mathbb{E}|X| < \infty $ => $\mathbb{E}|X-a| < \infty$. Assume $0$ is the median of X, then
$$
\mathbb{P}(X\leq 0) \geq 0.5
$$
$$
\mathbb{P}(X\geq 0) \geq 0.5
$$
given that $a>0$
$$\mathbb{E}(|X-a|-|X|) \geq a \cdot \mathbb{P}(X\leq0) - a \cdot \mathbb{P}(X > 0) \geq 0$$
Can someone please elaborate more on this proof? I'm not quite sure where did $a \cdot \mathbb{P}(X\leq0) - a \cdot \mathbb{P}(X > 0)$ comes from.


答:
Observe that If the player wins 2 or more games he is able to play until the 14-th round.
Therefore the described result is possible only if he wins no game or wins 1 out of the first 10 games and loses all the others.

The probability of this event is

$$\left(\frac23\right)^{10}+10 \frac13\left(\frac23\right)^{11}.$$

Title: Word problems based on probability theory

Body:
A player plays a game against a machine. At each round he deposits a coin the machine and flips another coin. The probability of heads appearing is $\frac 13$. If heads comes up, the coin deposited is received back along with an extra coin. If tails comes up, that coin is lost. Find the probability that the player loses all his coins by the thirteenth round or earlier. The player starts with 10 coins.

I don’t know the exact method to do it, but here is my try.

I think all cases have to be manually sorted. I found a few ie. he gets all tails for ten continues attempts, or he gets a heads in the first attempt and then gets tails until all coins are exhausted, or gets 2 heads and then all tails.

I don’t know if there are any more than this. Also is there a methodical way to solve it, by using binomial distribution or something of that kind?


问:
Prove $ \sum \sqrt{\tan A} \geq \sum \sqrt{\cot\frac{A}{2}}$
Let $ABC$ be acute triangle. Prove that
$$\sum \sqrt{\tan A} \geq \sum \sqrt{\cot\frac{A}{2}}$$
My attempt:
$$\sqrt{\tan A} + \sqrt{\tan B}\geq 2\sqrt[4]{\tan A\cdot\tan B}$$
At here I think I need to prove $$2\sqrt[4]{\tan A\cdot\tan B}\ge2\sqrt{\cot\frac{A}{2}}$$
$$\Leftrightarrow \tan A\cdot\tan B\ge \cot^2\frac{A}{2}$$
And I was stuck here.
Help me... Thanks

答:
This is not an answer, but provides a geometric understanding of the desired inequality.

Let $A,B,C$ be the three angles of the acute triangle, and then let $$A'=\frac{\pi}{2}-\frac{A}{2},\, B'=\frac{\pi}{2}-\frac{B}{2},\, C'=\frac{\pi}{2}-\frac{C}{2}$$

Hence $A', B', C'$ are angles of a new acute triangle. The inequality says that
$$\sqrt{\tan A}+\sqrt{\tan B}+\sqrt{\tan C}\ge \sqrt{\tan A'}+\sqrt{\tan B'}+\sqrt{\tan C'}. $$

The picture can be visualized as follows:

Let $ABC$ be the orginal triangle with vertices $A,B,C$ corresponding to the angles $A,B,C$. (There is no ambiguation here, I think.) Let $l_A,l_b$ be bisector lines starting from $A$ and $B$, and let $l_A',l_B'$ be the lines perpendicular to $l_A, l_B$ and passing through $A$ and $B$ respectively, and thus they intersect at a point $D$. Then the triangle $ABD$ is the triangle $A'B'C'$ constructed above, with $A=A', B=B', D=C'$.

I think the inequality is rather interesting. I'm sure that it can be proved by calculus, but a fundamental geometric proof would be more favourable.


问:
What's the probability of a set of only three digits appearing in a random 9 digit set?
I'd like to know the method for correctly calculating the probability of a random sequence of $9$ numbers only containing $3$ unique, different numbers. For the purpose of this question: there are 10 numbers $0,1,2,3,4,5,6,7,8,9$

i.e. the probability of this: $123123123$ - for all unique combinations of $3$ digits (e.g $071$ in $071717717$)

My initial instinct is $(1/3)^9$ - is this correct?

答:
There are two problems with your solution.  First, there are ${9 \choose 3}$ ways to choose which three digits you pick, so you have to multiply by that.  Second, if the digits are $123$, you have counted sets like $111111111$ and $121212121$ that have only one or two different digits respectively.  It seems you do not want to count them at all, and in fact you have counted them many times.

The easiest way is to start with ${9 \choose 3}3^9$ as the count of digit strings, then subtract the ones with just one or just two digits.  The strings with just one digit have been counted ${8 \choose 2}$ times, and there are $9$ of them.  The ones with exactly two digits have been counted $7$ times each and there are ${9 \choose 2}(2^9-2)$ of them.  So the final count is ${9 \choose 3}3^9-9{8 \choose 2}-7{9 \choose 2}(2^9-2)$ and the probability comes from dividing this by $9^9$


问:
Can a function from an interval to a set of rational numbers be bijective?
I have the next function:
$$g:[0,1]\rightarrow(0,1)\cap\mathbb{Q}$$

Can it be bijective? Or is it at most surjective or one-to-one?

I believe that because there are more elements in the domain than in the range, then it cannot be one-to-one, but it can be surjective. Is that true? I will be glad to get some help.

答: It cannot be one-to-one by  the cardinality argument you gave. It can be surjective: Take $g(x)=x$ if $ x\in (0,1)\cap \mathbb Q$ and $g(x)=\frac1 2 $ for all other $x$.


问:
Solve equation $2^{x} - 2^{-x} = 2*\cos(x/5)$
I'm trying to solve it by log two parts:

$$
\log_2(2^{x}/2^{-x}) = \log_2(2*\cos(x/5))
$$
Simplifying:
$$
2x - 1 = \log_2(\cos(x/5))
$$

And I'm stuck here, I think we could solve it by investigating functions(linear and logarithmic) and trying to find border value. Could you give the right direction?

答:
Consider that you look for the zero of function
$$f(x)=2^{x} - 2^{-x} - 2\cos \left(\frac{x}{5}\right)$$ By inspection, you know that the solution is  somewhere between $x=1.0$ and $x=1.5$ and the function is quite close to a straight line (this is good for root-finding methods).

So, be as lazy as I am and start Newton methods with $x_0=0$. It will give the following iterates
$$\left(
\begin{array}{cc}
n & x_n \\
 0 & 0.0000000 \\
 1 & 1.4426950 \\
 2 & 1.2504695 \\
 3 & 1.2401243 \\
 4 & 1.2400975
\end{array}
\right)$$


答:
A more detailed proof can be derived in an analytical way.

As an example, let's suppose that $X$ is continuous

$$\xi(a)=\mathbb{E}|X-a|=\int_{-\infty}^a (a-x)f(x)dx+\int_a^{\infty} (x-a)f(x)dx$$

Derivating you obtain

$$\frac{d}{da}\xi(a)=\int_{-\infty}^af(x)dx-\int_a^{+\infty}f(x)dx=F_X(a)-\left[1-F_X(a)\right]$$

Setting it =0 you get

$$F_X(a)=0.5$$

that is

$$a=F_X^{-1}(0.5)$$

which is exactly the definition of median

Title: Clarifying a Statistic Theorem


问:
What does $2 \mid 4$, $a\mid b,$ and $b\mid c$ mean in the solution given in my textbook?
I am having trouble in understanding the solution given in my textbook of the following question:

Question: $A$ relation $R$ defined on the set of integers by $R=\{(a, b): a$
divides $b\}$ is

(a) reflexive (b) symmetric (c) transitive (d) equivalence.

Solution: $R$ is not reflexive since $(0,0) \not \subset R,$ as $0$ does not divide $0 .$

$R$ is not symmetric since $2 \mid 4,$ but $4+2.$

$R$ is transitive since $a\mid b,$ $ b\mid c \Rightarrow b=a n, c=bm,$ $ n, m \in
 Z$

$\Rightarrow c=a(n m) \quad(n m \in Z)$

$\Rightarrow a \mid c$

$\therefore \quad R$ is neither reflexive nor symmetric but it is
transitive.

$\therefore \quad R$ is not an equivalence relation.

Hence (c) is correct answer.

I am not able to understand anything after and including the second line i.e. $R$ is not symmetric …. Specifically I am having trouble in understanding what does $2 \mid 4$, $a\mid b,$ and $b\mid c$ mean.

If $a\mid$ b mean "$b$ is divisible by $a$" then I am having trouble in undersding the whole second line i.e. "$R$ is not symmetric since $2 \mid 4,$ but $4+2.$." What does "$4+2$" have to do anything with the question?

答:
Well $a\mid b$ means there exists an integer $c$ such that $ac=b$.

Reflexive: $0\mid 0$ with arbitrary $c$.

Not symmetric, since $2\mid 4$ but not $4\mid 2$.

Transitive

No equivalence relation because of 2.


问:
find the value of $\int \frac {x^2}{({x\sin x+\cos x})^2}\,dx$
In my textbook this question solved in this way:
they take since $$\dfrac{d}{dx}(x\sin x+\cos x)=x\cos x $$  so,

$$\int \dfrac {x^2}{({x\sin x+\cos x})^2}\,dx$$
$$\int \dfrac {x\cos x}{({x\sin x+\cos x})^2}\cdot \dfrac {x}{\cos x}\,dx$$
Is there any other way to do this question? I know substitution, but I have never encountered this type of arrangement on the basis of the differential.

答:
Let $u=x\sin{x}+\cos{x}$ so that $du=x\cos{x}~dx$. Note that we chose this since $u$ is composed within another function. Unfortunately, $x\cos{x}$ doesn't quite appear in the integral, but's let's use wishful thinking and pretend that it did. Thus, we can easily solve an integral of the following form:
$$
\int \dfrac {x\cos x}{({x\sin x+\cos x})^2}\,dx = \int \dfrac {1}{u^2}\,dx =\dfrac{u^{-1}}{-1}+K=\dfrac{-1}{x\sin x + \cos x}+K
$$

Now in order to make the above work useful, we multiply by $1$ in a fancy way so that $x\cos{x}$ appears in the integral:
$$\int \dfrac{x^2}{(x\sin{x}+\cos{x})^2} dx = \int \dfrac{x}{\cos{x}} \cdot \dfrac{x\cos{x}}{(x\sin{x}+\cos{x})^2} dx $$

Now we use integration by parts. By pattern matching, this suggests that we let $f=\dfrac{x}{\cos{x}}$ and $dg=\dfrac {x\cos x}{({x\sin x+\cos x})^2}\,dx$. Then $df=\dfrac{x\sin{x}+\cos{x}}{\cos^2{x}}dx$ and $g=\dfrac{-1}{x\sin x + \cos x}$, which yields:

$$ \begin{align*}
\int \dfrac{x^2}{(x\sin{x}+\cos{x})^2} dx &= \int \dfrac{x}{\cos{x}} \cdot \dfrac{x\cos{x}}{(x\sin{x}+\cos{x})^2} dx \\
&= \dfrac{x}{\cos{x}} \cdot \dfrac{-1}{x\sin x + \cos x} - \int \dfrac{-1}{x\sin x + \cos x} \cdot \dfrac{x\sin{x}+\cos{x}}{\cos^2{x}}dx \\
&= \dfrac{-x}{\cos x (x\sin{x}+\cos{x})} + \int \sec^2 {x}~dx \\
&= \dfrac{-x}{\cos x (x\sin{x}+\cos{x})} + \tan{x} + C \\
&= \dfrac{-x}{\cos x (x\sin{x}+\cos{x})} + \dfrac{\sin{x}}{\cos{x}} + C \\
&= \dfrac{-x + \sin x (x\sin{x}+\cos{x})}{\cos x (x\sin{x}+\cos{x})} + C \\
&= \dfrac{-x(\sin^2 x + \cos^2 x) + \sin x (x\sin{x}+\cos{x})}{\cos x (x\sin{x}+\cos{x})} + C \\
&= \dfrac{(-x\sin^2 x  -x\cos^2 x) + (x\sin^2{x}+\sin{x}\cos{x})}{\cos x (x\sin{x}+\cos{x})} + C \\
&= \dfrac{\sin{x}\cos{x}-x\cos^2 x}{\cos x (x\sin{x}+\cos{x})} + C \\
&= \dfrac{\cos{x}(\sin{x}-x\cos x)}{\cos x (x\sin{x}+\cos{x})} + C \\
&= \dfrac{\sin{x}-x\cos x}{x\sin{x}+\cos{x}} + C \\
\end {align*} $$


问:
Polynomial with coefficients 1.
How can I solve (only for real solutions) an equation of the form $c = x + x^2 + ... + x^n$, where $c \in \mathbb{N}$ and $n \in \mathbb{N}$ are constants.

My first instinct was to rewrite this as:

$c = x(1 + x(1 + ... (x)))$

But I'm not sure if that's of any use.

Thanks :)

Title: Polynomial with coefficients 1.

Body:
$x^n+\ldots+x+1 = \frac{x^{n+1}-1}{x-1}$ and so

$c = x^n+\ldots+x = \frac{x^{n+1}-1}{x-1} - 1$ or

$x^{n+1}-1 = (c+1)(x-1)$, i.e.,

$x^{n+1} - (c+1)x + c = 0$.


问:
Limits coincide distance tends to zero?
$\newcommand{\N}{\mathbb{N}}$
$\newcommand{\max}{\operatorname{Max}}$

Let $(X,d)$, $X \not= \emptyset$, a
metric space and $(x_{n})_{n \in \N}$ and $(y_{n})_{n \in \N}$
sequences in $X$. Show that if there exists a $a \in X$ such that:

$$\lim_{n \to \infty}{x_{n}} = a = \lim_{n \to \infty}{y_{n}}$$
Then:
$$\lim_{n \to  \infty}{d(x_{n},y_{n})} = 0$$

Is the converse also true? (proof or counterexample).

Here is my attempt:

Suppose that:

$$\lim_{n \to \infty}{x_{n}} = a = \lim_{n \to \infty}{y_{n}}$$

We want to see that:

$$\lim_{n \to  \infty}{d(x_{n},y_{n})} = 0$$

Let $\varepsilon > 0$, take $\varepsilon = \frac{\varepsilon}{2}$ so in both cases there exists $N_{1},N_{2} > 0$ such that:

$$\forall_{n > N_{1}}\left[ d(x_{n},a) < \frac{\varepsilon}{2}\right]$$

$$\forall_{n > N_{2}}\left[ d(y_{n},a) < \frac{\varepsilon}{2}\right]$$

Now, set $N = \max{N_{1},N_{2}}$. Then, if we add both equations we have that:

$$\forall_{n > N} [d(x_{n},a) + d(y_{n},a) < \varepsilon]$$

Using the triangular inequality:

$$\forall_{n > N} [d(x_{n},y_{n}) < \varepsilon]$$

In particular:

$$\forall_{n > N} [|d(x_{n},y_{n}) - 0 |< \varepsilon ]$$

In fact we find that:

$$\forall_{\varepsilon}\{\exists_{N > 0} \{\forall_{n > N_{1}}[ |d(x_{n},y_{n}) - 0| <\varepsilon]\}\}$$

So by definitiuon of limit:

$$\lim_{n \to \infty}{d(x_{n},y_{n})} = 0$$

What do you think?

答:
Let $\varepsilon>0$. Let $N_1 \in \Bbb N$ be such that

$$\forall n \ge N_1: d(x_n, a) < \frac{\varepsilon}{2}\tag{1}$$

by $\displaystyle \lim_{n \to \infty} x_n =a$ and $N_2 \in \Bbb N$ such that

$$\forall n \ge N_2: d(y_n, a) < \frac{\varepsilon}{2}\tag{2}$$

by $\displaystyle \lim_{n \to \infty} y_n =a$. Now set $N=\max(N_1,N_2)$ and use

$$\forall n: d(x_n,y_n) \le d(x_n,a) + d(y_n, a)$$

to finish showing that

$$\forall n \ge N: |d(x_n, y_n) - 0| < \varepsilon$$

as is required to show that $\displaystyle \lim_{n \to \infty} d(x_n,y_n) =0$.

The converse need not hold. Let $X$ be the set $\Bbb Q$ and $d(x,y)=|x-y|$ as usual, or even easier $X=\Bbb R\setminus\{0\}$ in that same metric.

Title: Limits coincide distance tends to zero?


问:
Reliability of a system with non-independent parallel components
Consider a system $Z$ that consists of two components $X$ and $Y$, whose failure rates per time unit are $\lambda_x$ and $\lambda_y$ respectively.

Assume that if $X$ fails, then the failure rate of $Y$ doubles.
What is the probability density function of the time to failure of the overall system $Z$?

What I could gather so far is the following:

The failure probability of the single components can be modelled as
$$ F_X(t) = 1-e^{-\lambda_X t} \text{ and } F_Y(t) = 1-e^{-\lambda_Y t},$$
where
$$ F_X(t) = \int_0^t f_X(t) dt, f_X(t) = \lambda_X e^{-\lambda_X t} $$ (and the same for Y) is the cumulative density function of an exponential distribution.

Since the two components that make up the system are not independent, the reliability of the system, defined as $R(t) = 1-F(t)$, should begiven by
$$ R(t) = 1-F(t) =  1 - F_X(t) \cdot F_{Y|X}(t).$$

How can one determined the conditioned cdf $F_{Y|X}(t)$?

答:
Comment:

Clues from simulation of a million such systems:
Let $\lambda_x = 2; \lambda_y = 3.$

Then $P(X < Y) = 2/5 = 0.4.$

```<code>set.seed(2021)
x = rexp(m,2); y = rexp(m,3);  yy = rexp(m,6)
v = pmin(x,y); w = pmax(x,y)
mean(x < y);  mean(x == v)
[1] 0.400608
[1] 0.400608
</code>```

Then, by the no-memory property, the total lifetime of the system is $T$ as shown below.

```<code>t = 0.4*(v + yy) + 0.6*w
summary(t)
    Min.  1st Qu.   Median     Mean  3rd Qu.     Max.
0.003752 0.280261 0.450555 0.526562 0.689709 4.661313

hist(t, prob=T, col="skyblue2", main="System Lifetime")
</code>```

Notes: The CDFs of the minimum (exponential) and maximum (not exponential) are easily
obtained, and their PDFs from them. The density
of the sum of two exponentials with different
rates is nontrivial. But then the PDF of the
mixture distribution is easy.

Body:
Comment:

Clues from simulation of a million such systems:
Let $\lambda_x = 2; \lambda_y = 3.$

Then $P(X < Y) = 2/5 = 0.4.$

set.seed(2021)
x = rexp(m,2); y = rexp(m,3);  yy = rexp(m,6)
v = pmin(x,y); w = pmax(x,y)
mean(x < y);  mean(x == v)
[1] 0.400608
[1] 0.400608

Then, by the no-memory property, the total lifetime of the system is $T$ as shown below.

t = 0.4*(v + yy) + 0.6*w
summary(t)
    Min.  1st Qu.   Median     Mean  3rd Qu.     Max.
0.003752 0.280261 0.450555 0.526562 0.689709 4.661313

hist(t, prob=T, col="skyblue2", main="System Lifetime")

Notes: The CDFs of the minimum (exponential) and maximum (not exponential) are easily
obtained, and their PDFs from them. The density
of the sum of two exponentials with different
rates is nontrivial. But then the PDF of the
mixture distribution is easy.


问:
Let $k \geq 3$; prove $2^k$ can be written as $(2m+1)^2+7(2n+1)^2$
Prove:

If $k \geq 3$, then $2^k$ can be written as $(2m+1)^2+7(2n+1)^2$, where $k, m, n \in \mathbb{N}$.

答:
You need to be careful about just one thing in the induction step. Note that the first case is $$  1^2 + 7 \cdot 1^2 = 8 = 2^3.  $$
The important thing is that
$$ 1 \equiv 1 \pmod 4.   $$

So, we begin with $$   a^2 + 7 b^2 = 2^k   $$
with $k \geq 3$ AND
$$ a \equiv b \pmod 4,   $$ then we do the induction step.

What the formula of Brahmagupta does for you is to allow us to multiply the value $2^k$ by 8, as in
$$ (a - 7 b)^2 + 7 (a+b)^2 = 8 \cdot 2^k = 2^{k+3}.   $$
At this stage, both numbers $a-7b,a+b$  are even, which is bad. On the other hand,
$$  a - 7 b \equiv a+b \pmod 8.  $$ As a result, when we divide by 2, we get
$$ \frac{ a - 7 b}{2} \equiv \frac{a+b}{2} \pmod 4.  $$
Furthermore, as $ a \equiv b \pmod 4,   $ we know that $ a + b \equiv 2 \pmod 4,   $ so that $\frac{a+b}{2} $ is once again ODD.
We have completed the induction step, as
$$ \left( \frac{ a - 7 b}{2} \right)^2 + 7 \left( \frac{a+b}{2} \right)^2 = 2 \cdot 2^k = 2^{k+1}, $$  with both numbers odd and the extra property we need to continue  the induction,$$ \frac{ a - 7 b}{2} \equiv \frac{a+b}{2} \pmod 4.  $$

It may be worth mentioning that we need to allow negative values for $(a,b)$ in order to keep the mod 4 thing going. So the pairs go
$$ (1,1), \; \; (-3,1), \; \; (-5,-1), \; \; (1,-3), \; \; (11,-1), \; \; (9,5),    $$
$$ (-13,7), \; \; (-31,-3), \; \; (-5,-17), \; \; (57,-11), \; \; (67,23), \; \; (-47,45),    $$
$$ (-181,-1), \; \; (-87,-91), \; \; (275,-89), \; \; (449,93), \; \; (-101,271), \; \; (-999,85), \ldots   $$


问:
$\forall \delta> 0 $, if $\mid a - b \mid \le \delta $ then $a = b$

$\forall \delta> 0 $, if $\mid a - b \mid \le \delta $  then $a = b$

proof:

Assume, by contradiction, WLOG   $a > b \to a - b > 0$   Let $d = a-
 b$.

Take $\delta = \frac{d}{2}$. Then we have   $\mid a - b \mid = a - b = d$
is not $\le \delta$. Contradiction

My question is that:

when we prove $p \to q$ statement using contradiction, shouldn't we assume that $p$ is true and show the contradiction to $p$ when we assume $q$ is wrong?
The given proof doesn't assume $p$ is true in the beginning, does it?

If I set $\delta$ to $\frac{d}{2}$, does it satisfy that |a-b| is less or equal to $\delta$?

答:
For a statement $p$, contradiction is $\neg p\rightarrow \text{false}$.

Here $p\rightarrow q$ is equivalent to $\neg p\vee q$.

Thus
$\neg (p\rightarrow q)$ is equivalent to $p\wedge \neg q$ by DeMorgan.


问:
If $a+\sqrt{a}=b+\sqrt{b}$ is $a=b$?
If $a+\sqrt{a}=b+\sqrt{b}$, does this automatically mean that $a=b$?

I first tried to square both sides but that seemed to get me nowhere.

$$a-b=\sqrt{b}-\sqrt{a}$$

Can we just conclude that $a$ has to be equal to $b$ to make this expression to be true?

答: Let $f(x) = x + \sqrt x$. Then, we have $f'(x) = 1 + 1/(2\sqrt x) > 0 ~ (\forall x>0)$. Therefore, $f(x)$ is strictly increasing and $f(a) = f(b) \implies a = b$.

Title: If $a+\sqrt{a}=b+\sqrt{b}$ is $a=b$?


问:
Proving a set is open iff its complement is closed from scratch
We have that a set $F$ is closed if every limit point of $F$ is a point of $F$ and we say that $p$ is a limit point of a set $E$ is every neighborhood $N$ of $p$ contains a point $q \neq p$. In other words, if $N \cap E \neq \varnothing$.

${\bf TASK:}$ Prove that $U$ is open iff $U^c$ is closed.

TRY: Let $U$ be a open set. Let $x$ be a limit point of $U^c$. We need to show that $x \in U^c$. If $x \in U$, then there is a neighboorhood $N$ of $U$ such that $N \cap U = \varnothing$ so that $x$ is not limit point. Therefore, $x$ better be in $U^c$, as desired.

On the other hand, say $U^c$ is closed. Let $x \in U$. We must find a neighborhood of $x$ that is contained in $U$.

If we can show that $x$ is not  limit point of $U^c$, then we will be able to have a neightborhood $N$ that is completely outside $U^c$ (that is, inside of $U$). So if $x$ is a limit point of $U^c$, then $x \in U^c$ by assumption and this contradiction proves that $x$ is not a limit point of $U^c$.

Is this a correct proof?

Thanks

答:
First of all $p$ is a limit point of $E$ iff for every neighbourhood $N$ of $p$ intersects $E\setminus\{p\}$. More succinct.

If $U$ is open, let $x$ be a limit point of $U^\complement$. If $x \in U$ there is a neighbourhood $N$ of $x$ such that $N \subseteq U$ which implies that $N \cap U^\complement = \emptyset$ which a fortiori would imply that $X$ would not be a limit point of $U^\complement$, contradiction. So $x \in U^\complement$ and so $U^\complement$ is closed. ($N \cap U = \emptyset$ in your proof is a mistake!)

Suppose $U^\complement$ is closed. Let $x \in U$. Then $x$ cannot be a limit point of $U^\complement$ (or it would have been in $U^\complement$ by closedness), so there is a neighbourhood $N$ of $x$ such that $$N \cap (U^\complement\setminus\{x\}) = \emptyset = (N\setminus \{x\}) \cap U^\complement \tag{1}$$ Then $N \subseteq U$ follows. (let $y \in N$; if $y=x$ we are done right away as $x \in U$; otherwise $y \in N\setminus \{x\}$ so $y$ cannot also be in $U^\complement$, or it would contradict the empty intersection in $(1)$; in either case $y \in U$) and so all points of $x \in U$ are interior to $U$, so $U$ is open.

QED. This makes the argument stand out more, I think.


问:
Why are G modules using same notations as group actions?
I may be missing something important , but i don't understand why group action and G modules are using the same notation , even in some texts i feel like some authors call "action" a G module that is not precised to be a representation of permutation :
What i am mainly refering to is :

Let's define $(V,p)$ a G-module. Then , p(g)(v) is noted g.v , and i find it completely illegible as for me group actions were already using this main notation , and that for me group actions and a (non permutation representation)  G module are not the same object.

What am i missing ?

答: If $\rho:G\to GL(V)$ is a representation, then the map $G\times V\to V$ defined by $(g,v)\mapsto \rho(g)v$ is a group action, so it's perfectly suitable to adopt the conventional shorthand for group actions. Even if it isn't a permutation representation (that is, it doesn't come from an action of $G$ on a basis), it is still technically permuting the elements of the set $V$, so it is a group action! For this reasons, representations are often called linear actions.


问:
Sum of divisors and prime numbers, short proof
Let $p_i$ denote the $i^{th}$ prime number.

Find the smallest positive integer $k$ such that the product $n = p_1 \cdot p_2 \cdots p_k$ satisfies $\sigma(n) > 3n$.

Is there any positive integer $m < n$ satisfying $\sigma(m) > 3m$?

Taken From (Rosen), at the end of the chapter under challenge problems

答: This should help you out: http://www.mathhelpforum.com/math-help/f7/sum-divisors-function-question-154661.html</p>

OwnerDisplayName: gurk

ContentLicense: CC BY-SA 2.5

OwnerDisplayName: anonymous


问:
Primitive polynomials of finite fields
there are two primitive polynomials which I can use to construct $GF(2^3)=GF(8)$:

$p_1(x) = x^3+x+1$

$p_2(x) = x^3+x^2+1$

$GF(8)$ created with $p_1(x)$:

0

1

$\alpha$

$\alpha^2$

$\alpha^3 = \alpha + 1$

$\alpha^4 = \alpha^3 \cdot \alpha=(\alpha+1) \cdot \alpha=\alpha^2+\alpha$

$\alpha^5 = \alpha^4 \cdot \alpha = (\alpha^2+\alpha) \cdot \alpha=\alpha^3 + \alpha^2 = \alpha^2 + \alpha + 1$

$\alpha^6 = \alpha^5 \cdot \alpha=(\alpha^2+\alpha+1) \cdot \alpha=\alpha^3+\alpha^2+\alpha=\alpha+1+\alpha^2+\alpha=\alpha^2+1$

$GF(8)$ created with $p_2(x)$:

0

1

$\alpha$

$\alpha^2$

$\alpha^3=\alpha^2+1$

$\alpha^4=\alpha \cdot \alpha^3=\alpha \cdot (\alpha^2+1)=\alpha^3+\alpha=\alpha^2+\alpha+1$

$\alpha^5=\alpha \cdot \alpha^4=\alpha \cdot(\alpha^2+\alpha+1) \cdot \alpha=\alpha^3+\alpha^2+\alpha=\alpha^2+1+\alpha^2+\alpha=\alpha+1$

$\alpha^6=\alpha \cdot (\alpha+1)=\alpha^2+\alpha$

So now let's say I want to add $\alpha^2 + \alpha^3$ in both fields. In field 1 I get $\alpha^2 + \alpha + 1$ and in field 2 I get $1$. Multiplication is the same in both fields ($\alpha^i \cdot \alpha^j = \alpha^{i+j\bmod(q-1)}$. So does it work so, that when some $GF(q)$ is constructed with different primitive polynomials then addition tables will vary and multiplication tables will be the same? Or maybe one of presented polynomials ($p_1(x), p_2(x)$) is not valid to construct field (altough both are primitive)?

答:
To more directly answer the questions asked:

Yes, in general using different primitive polynomials will change the operations.  If one uses expressions such as αi to refer to field elements (as is done in GAP and Magma, for instance), then the multiplication table stays the same, and the addition table changes.  However, if one uses expressions like α2+α+1 (as is done in Macaulay2 and Maple, for instance) , then addition table stays the same, and the multiplication table changes.  Zech logarithms are used to efficiently convert between the two representations.

Both of your polynomials p1 and p2 are good.  This is proven in Charles Staats's answer.

Title: Primitive polynomials of finite fields


问:
Square root of $8^3$
I'm only in intermediate algebra. I know that $\sqrt{8^3}$ is equal to $16\sqrt{2}$ but could you simply explain the process on how to get to that? </p>

答:
We can reduce $8^3$ to its prime factors:
$$8^3=512\implies 2\cdot2\cdot2\cdot2\cdot2\cdot2\cdot2\cdot2\cdot2$$
Because this is a square root, we are looking for groups of $2$. Similarly, if this was a cube root we would look for groups of 3:
 $$\boxed{2\cdot2}\boxed{2\cdot2}\boxed{2\cdot2}\boxed{2\cdot2}2$$
We have 4 groups of 2 which we will take out of the radical:
$$2\cdot2\cdot2\cdot2\sqrt{2}$$
We can now simplify this as:
$$\boxed{16\sqrt{2}}$$</p>

Title: Square root of $8^3$


问:
Set notation with subscript and superscript
In the "The Hundred-Page Machine Learning Book", the author uses the following notation to describe the set of all labeled feature vectors.

$$\{(x_i,y_i)\}_{i=1}^N$$

What I understand:

$\{\ldots\}$ denotes a set

$x_i$ and $y_i$ are the feature vector and its label

$i$ starts at $1$ and runs up to $N$

What I do not understand:

Is this a common set notation? I did not find anything like this

答:
I think this is not uncommon, although you more often see the subscript for defining a sequence, e.g. $(a_n)_{n\geq 1}$.

Alternatives, which are more usual for sets, would be
$$\{(\mathbf{x}_i,y_i)\mid 1\leq i\leq N\}\quad\text{or}\quad\{(\mathbf{x}_i,y_i): 1\leq i\leq N\}.$$
(I might write $i\in[N]$, with $[N]$ meaning $\{1,\ldots,N\}$, but I'm not sure how common this notation is outside of combinatorics.)

As for the interpunct, are you sure that's what it is? It looks to me (from the vertical height, level with the baseline of the x) that this expression might simply appear at the end of a sentence, with that being the sentence-ending period.


问:
Solving a Recurrence with a Summation of Exponents as a Term
This is totally a homework problem, but it's due in 27 minutes so I know I won't get anything in time for that. I don't want the answer, I just want to learn the technique. I've started a MS program but it's been over 30 years since my calculus classes.

I'm trying to solve the following recurrence:

$$
T(n) = 3T({n \over 2}) + 8n, \ T(1) = 1\ and \ n=2^k
$$

I have gotten to this point, and cannot get any further despite my most frenetic Googling:

$$
T(n) = 3^k + 8 \sum_{j=0}^{k-1} 3^j {n \over 2^j}
$$

The lectures for the class and all the other videos or pages I've found have either eliminated the initial exponential term completely and/or only have a simple exponential in the summation term (which is then solvable as a geometric summation).

It's now 16 minutes until deadline, but I still want to understand this so any pointers appreciated.

Randy

答:
As

$$
T\left(2^{\log_2 n}\right)=3T\left(2^{\log_2\left(\frac n2\right)}\right)+8n
$$

calling now $\mathcal{T}\left(\cdot\right) = T\left(2^{(\cdot)}\right)$ and $z = \log_2 n$ we have the linear recurrence

$$
\mathcal{T}\left(z\right)=3\mathcal{T}\left(z-1\right)+2^{z+3}
$$

and solving this recurrence we got

$$
\mathcal{T}\left(z\right)=3^{z-1}c_0+2^4(3^z-2^z)
$$

and now going backwards with $z = \log_2 n$ we recover

$$
T\left(n\right) = 3^{\log_2 n-1}(3\cdot 2^4+c_0)-2^4n
$$


问:
Which one is more? diagonalizable matrix or non-diagonalizable matrix?
Are there more diagonalizable matrixes or non-diagonalizable matrixes?</p>

答:
As Gae. S. stated, the answer depends on which field your matrices are defined over.
My answer is concerned with matrices over the field $\mathbb{C}$, the answer for $\mathbb{R}$ is analogous.
Moreover, it depends on how you define "size".
If by size you mean cardinality, the answer is that there are equally many if $n>1$ (if $n=1$, all matrices are diagonal).
This is what I show below.

Let $\mathcal{M}$ be the set of matrices in $\mathbb{C}^{n\times n}$ and $\mathcal{D}\subset \mathcal{M}$ be the set of diagonalizable matrices.
Let $\Lambda\subset\mathcal{D}$ be the set of diagonal matrices and $\Lambda'\subset\mathcal{M}$ be the set of matrices whose entries are zero, besides on the main diagonal and the superdiagonal (the entries above the diagonal).

By definition, matrices in $\mathcal{D}$ are similar to matrices in $\Lambda$.
By the Jordan normal form, matrices in $\mathcal{M}$ are similar to matrices in $\Lambda'$.

Now for the cardinality ("size") argument.
If $n>2$, $\Lambda'\setminus\Lambda$ is nonempty.
We have:
$$
Card(\mathbb{C})=Card(\mathbb{C}^{n-1})=Card(\Lambda'\setminus\Lambda)\leq Card(\mathcal{M}\setminus\mathcal{D})\leq Card(\mathcal{M})=Card(\mathbb{C}^{n^2})=Card(\mathbb{C})
$$
Similarly,
$$
Card(\mathbb{C})=Card(\mathbb{C}^{n})=Card(\Lambda)\leq Card(\mathcal{D})\leq Card(\mathcal{M})=Card(\mathbb{C}^{n^2})=Card(\mathbb{C})
$$
So, we conclude that
$$
Card(\mathbb{C})=Card(\mathcal{M}\setminus\mathcal{D})=Card(\mathcal{D})
$$


问:
Strong operator limit of a sequence of compact linear operators is not compact
The statement of theorem:

Let (Tₙ) be a sequence of compact linear operators from a normed space X into a Banach space Y. If (Tₙ) is uniformly operator converge say ∥Tₙ-T∥→0 then the limit operator T is compact.

if we replace uniform operator convergengence by strong opertor convergence   ∥Tₙx-Tx∥→0 then the above theorem becomes false

indeed i need a counter example to prove that strong limit opertor is not compact .

For this I take following counter example:
Tₙ: l²→l² defined by
Tₙx=(ξ₁,...,ξₙ,0,0,....) where x=(ξᵢ)∈ l² .
since Tₙ is linear and bounded, also dim(Tₙx)<∞ so Tₙ is compact.

but now i am stuck to prove that limit is not compact.
I also know that the identity operator is not compact since diml²=∞ but don't know how to use it
Thanks in advance for any help

答:
Linear and bounded operators need not be compact. The identity operator is a counter-example. Your $T_n$'s are compact because they have finite dimensional range.

$\|T_nx-x\|\to 0$ for every $x \in \ell^{2}$ so the limit in strong operator topology is the identity operator which is not compact.

[$\|T_nx-x\|^{2}=\sum\limits_{k=n+1}^{\infty} |x_k|^{2}$ where $x=(x_1,x_2,...)$. Since $\sum |x_k|^{2} <\infty$ it follows  that $\sum\limits_{k=n+1}^{\infty} |x_k|^{2} \to 0$].


问:
Long division with integers
Consider the long division of 237 with divisor a natural number $K$. If the quotient is $Q$ and the remainder is $R$, find all possible values of $K$, such that $K, Q, R$, not necessarily in this order, form a Geometric Progression (GP).

I have found 15, 78 and 236 but can't think of an analytical approach.
We have $237 = K*Q + R$ and

$1 \leq K \leq 237$
Also $1 \leq Q \leq 237$

and

$1 \leq R \leq 118$ where $118$ is the integer part of $\frac {237}{2}$.

Therefore

$119 \leq K*Q \leq 237$

In order for $K, Q, R$ to be in GP, any of 2 of $\frac {K}{Q}$, $\frac {K}{R}$, $\frac {Q}{R}$ or $\frac {Q}{K}$, $\frac {R}{K}$, $\frac {R}{K}$ must be equal.

Clearly the condition is met if any 2 of $K, Q, R$ are equal.

Can you please provide a full solution?

答:
$$237 = KQ + R$$ Since $R < K$, there are essentially two cases:

Case $1$: $Q < R < K$. Then $KQ = R^2$. Now $237 = KQ + R = R^2 + R$, which is a quadratic equation with no integer roots.

Case $2$: $R < Q < K$. Then $KR = Q^2$. Now $237 < KQ + K = K(Q+1) \le K^2$, so $K \ge 16$.

We also have $Q^2 \ge K$. This gives $237 = KQ + R > K^{3/2}$, so $K < 237^{2/3} \approx 38.29\dots$.

As the largest number in a GP, $K$ cannot be squarefree. Hence the possible $K$'s to test are:

$$16,18,20,24,25,27,28,32,36$$

for which their corresponding $Q$'s are:

$$14,13,11,9,9,8,8,7,6$$

which, weirdly, no GPs are formed. So there are no solutions where $K, R, Q$ are distinct.

It seems that equality is allowed. Even so, we can only have either $R=Q$ or $K=Q$.

For $R = Q$, we have $237 = (K+1)R$ and $K>R$. We also have $237 = 237 \times 1 = 79 \times 3$, so we either have $K = 236$ or $78$.

For $K = Q$, we have $237 = K^2 + R < K(K+1) < (K+1)^2$. This shows that $K < \sqrt{237} < K+1$, so $K = \lfloor\sqrt{237}\rfloor=15$.

Title: Long division with integers


问:
Question on manifold : does $f(r,\theta )$ means implicitely $f(r\cos \theta ,r\sin \theta )$?
I have $\Gamma$ a manifold and $f:\Gamma \to \mathbb R$. We have in $(x,y)$ that $f(x,y)=x^2+y^2$. Now, in my lecture, they denote $(r,\theta )$ the polar coordinates. And after, they wrote : since $$\partial _r =\cos\theta \partial _x +\sin(\theta )\partial _y$$ we have $$\partial _rf(r,\theta )=\cos(\theta )\partial _x f(r,\theta )+\sin(\theta )\partial _y f(r,\theta ).$$

First, the notation $f(r,\theta )$ look strange. Does $f(r,\theta )$ means $f(r\cos \theta ,r\sin \theta )$ ? If yes, is it a common notation ?

Moreover, the notation $\partial _xf(r,\theta )$ looks strange. Shouldn't it be $\partial _x f(x,y)$ ? (same with $\partial _y f(r,\theta )$).

Finally, I have to give the gradient in $(r,\theta )$. My teacher wrote $$\nabla _{(x,y)}f(x,y)=\frac{1}{r}\begin{pmatrix}r\cos \theta &-\sin \theta\\ -r\sin \theta &\cos \theta  \end{pmatrix}\nabla _{r,\theta }f(r,\theta ).$$

For me it doesn't make sense. Why don't we simply don't have : set $h(r,\theta )=f(r\cos \theta ,r\sin \theta )$. We have that $f(r\cos \theta ,r\sin \theta )=r^2$. Therefore

$$\nabla _{r,\theta }h(r,\theta )=(2r,0).$$
Is this wrong ? If yes, why ?

答:
Let be $\varphi(r,\theta) = f(r\cos\theta,r\sin\theta)$. Writing the vectors as column vectors and using the chain rule:
$$
\begin{pmatrix}
\partial_r\varphi(r,\theta)\\
\partial_\theta\varphi(r,\theta)
\end{pmatrix} =
\nabla_{r,\theta}\varphi(r,\theta) =
(\nabla f)(r\cos\theta,r\sin\theta)
\nabla_{r,\theta}
\begin{pmatrix}
r\cos\theta\\
r\sin\theta
\end{pmatrix} =
(\nabla f)(r\cos\theta,r\sin\theta)
\begin{pmatrix}
\cos\theta&-r\sin\theta\\
\sin\theta& r\cos\theta
\end{pmatrix}.
$$
Can you continue?


问:
Best linear unbiased estimates
Problem is : Model given $$Y_i=ib+ e \quad; \, i=1,2,3$$

Mean is $0$ and variance is $\sigma, 2\sigma, 3\sigma$. What will be best linear unbiased estimator for $b$?

Answer given in book is $(y_1+y_2+y_3)/6$? this is unbiased I know, but is it correct?

答:
(W)OLS estimator is the BLUE by the Gauss-Markov theorem, which is given by the normal equation (weighted by the inverse of the noise covariance matrix)

$\hat{b}=(X^T\Sigma^{-1}X)^{-1}X^T\Sigma^{-1}y$

Here we have

$X=
  \left[ {\begin{array}{cc}
   1 & 1 \\
   1 & 2 \\
   1 & 3 \\
  \end{array} } \right]
$

,
$y=
  \left[ {\begin{array}{c}
   y_1 \\
   y_2 \\
   y_3 \\
  \end{array} } \right]
$

and the noise covariance matrix

$\Sigma=
  \left[ {\begin{array}{ccc}
   \sigma & 0 & 0 \\
   0 & 2\sigma & 0 \\
   0 & 0 & 3\sigma \\
  \end{array} } \right]$ (by homoscedasicity and independent noise assumption, all the off-diagonal entries are zeros)

s.t.,

$X^T\Sigma^{-1}X=
  \left[ {\begin{array}{cc}
   \frac{11}{6\sigma} & \frac{3}{\sigma} \\
   \frac{3}{\sigma} & \frac{6}{\sigma} \\
  \end{array} } \right]
$

$(X^T\Sigma^{-1}X)^{-1}=
  \left[ {\begin{array}{cc}
   3\sigma & -\frac{3\sigma}{2} \\
   -\frac{3\sigma}{2} & \frac{11\sigma}{12} \\
  \end{array} } \right]
$

so, we have

$(X^T\Sigma^{-1}X)^{-1}(X^T\Sigma^{-1}y)=
  \left[ {\begin{array}{cc}
   3\sigma & -\frac{3\sigma}{2} \\
   -\frac{3\sigma}{2} & \frac{11\sigma}{2} \\
  \end{array} } \right]
%
  \left[ {\begin{array}{c}
   \frac{y_1}{\sigma}+\frac{y_2}{2\sigma}+\frac{y_3}{3\sigma} \\
   \frac{y_1}{\sigma}+\frac{y_2}{\sigma}+\frac{y_3}{\sigma} \\
  \end{array} } \right]
= \left[ {\begin{array}{c}
   \frac{1}{2}(3y_1 -y_3) \\
   \frac{1}{12}(-7y_1+ 2y_2 + 5y_3) \\
  \end{array} } \right]
$

s.t., $\hat{b_0}=\frac{1}{2}(3y_1 -y_3)$ (intercept) and
$\hat{b_1}=\frac{1}{12}(-7y_1+ 2y_2 + 5y_3)$.

The above derivation was for the WOLS coefficients in the general settings (with a bias term). If we drop the bias term in $X$, we shall have

$b = (X^T\Sigma^{-1}X)^{-1}(X^T\Sigma^{-1}y)=\frac{\sigma}{6}.\frac{y_1+y_2+y_3}{\sigma}=\frac{y_1+y_2+y_3}{6}$

Also, another way, if we want to fit WOLS without an intercept in 1D, we need to minimize the SSE (or MSE) $E = \sum\limits_i e_i^2 = \sum\limits_i\frac{(y_i-\hat{y_i})^2}{\sigma_i^2}=\sum\limits_i\frac{(y_i-ib)^2}{\sigma_i^2}$ w.r.t. $b$.

(here sum of errors $\sum\limits_i e_i = 0$ (with the assumption $\textbf{e} \sim N(0,\sigma^2)$)

Setting $\frac{\partial E}{\partial b} = 2\sum\limits_i\frac{(y_i-ib )(-i)}{\sigma_i^2}=0$,

we have $b=\frac{\sum\limits_{i=1}^{3}\frac{iy_i}{\sigma_i^2}}{\frac{\sum\limits_{i=1}^{3}i^2}{\sigma_i^2}}=\frac{\frac{y_1}{\sigma}+\frac{2y_2}{2\sigma}+\frac{3y_3}{3\sigma}}{\frac{1^2}{\sigma}+\frac{2^2}{2\sigma}+\frac{3^2}{3\sigma}}=\frac{y_1+y_2+y_3}{6}$

Title: Best linear unbiased estimates


问:
Probability from the moment generating function
Let $\lambda>0$ be fixed and let $X$ be a random variable with the moment generating function $M_X(t)$ given by

$M_X(t)$=$1$+$\frac{1}{e^\lambda}$($e^t$ $-1$)

How do we find the probability $\mathbb{P}$($X=0$)?

Any help is much appreciated!

答: For $X$ taking non-negative integer values we have $M_X(t)=\sum P(X=n) e^{nt}$. In this case $M_X(t)=a+be^{t}$ where $a=1-e^{-\lambda}$ and $b=e^{-\lambda}$. Hence, $P(X=0)= a$, $P(X=1)=b$ and $P(X=n)=0$ for all $n \geq 2$. (The fact that $X$ is integer valued follows by uniquness  of the distribution for  agiven MGF).


问:
Split 5-sided regular polygon on triangles
Recently in my geometry class I was asked to solve the following geometry problem:

Split five-sided regular polygon on triangles s.t. every triangle has common segment with exactly three other triangles.

I've wasted too much time on it and still don't understand how to even start solving this.

I found this split for 4-sided polygon

As you can see it is the right split, e.g. every triangle in it has exactly three neighbors.

Do you have any idea, how to solve this?

答: Seems to work for any convex $n$-gon:

Body: Seems to work for any convex $n$-gon:


问:
Show that $\max(2^{K-1}, P - 1) \leq \varphi(n) \leq n \leq P^K$

For any prime $p$ and $n, k_i \in \mathbb{Z}_+$, we have

$$n = \prod_{i = 1}^m p_i^{k_i}.$$

Let $K = \sum_{i = 1}^m k_i$ and $P = \max\{p_i : 1 \leq i \leq m\}$ and $\varphi(n)$ the Euler totient function. Show that

$$\max(2^{K-1}, P - 1) \leq \varphi(n) \leq n \leq P^K.$$

Deduce that
$$\lim_{n \to \infty} \varphi(n) = + \infty.$$

For the first bit, I have said that we can see that $\varphi(n) \leq n$ by defintion of $\varphi(n)$ (which I have already defined in an earlier part of the question. As $P$ is the max prime that can divide $n$ and as $K$ is the sum of all the $k$'s of these primes, we can see that $P^K$ will be $\geq n$.

I'm not stuck on how to prove the final bit, on the left hand side.

Also, for the deduce bit, I said that as we have seen that $\varphi(n) \leq n$, this says that as $n \to \infty$, we get that $\varphi(n) \to \infty \implies \lim_{n \to \infty} (\varphi(n) = + \infty$.

答:
$$\phi(n)=n\prod_{i=1}^m\left(1-\frac{1}{p_i}\right)$$.

$$\phi(n)\geq n\prod_{i=1}^m\frac{(p_i-1)}{p_i}\geq \prod_{i=1}^m (p_i-1)\geq P-1.$$

Think about a similar idea for showing the $2^{K-1}$ part. To show $\phi$ goes to infinity, you need to show that either $2^{K-1}$ or $P-1$ gets arbitrarely large. For example when $n$ is prime, you get $P=n$. In other cases, large numbers have large $k_i$ so then $K$ is big. Try to combine these ideas.


问:
Lower bound for integral of multiplication
I need to show that for any function $x:[0,\infty)\to \mathbb{R}^n$ the following holds
$$
\int_{t-T}^t e^{\tau-t} x(\tau)x^\top (\tau)\, d\tau\geq e^{-T}\int_{t-T}^t  x(\tau)x^\top (\tau)\, d\tau
$$
for any $t>T \geq 0$. Is there any way to show this?

I saw this relation in several books, but there was no explanation nor reference for it.

答:
Let $$H(t):=e^{-T}\int_{t-T}^t x(\tau)x^\top (\tau) d\tau-\int_{t-T}^t e^{\tau-t}x(\tau)x^\top (\tau) d\tau.$$
The goal is to show that $H(t)$ is a negative definite matrix for all $t\geq T$, i.e., we have $v^\top H(t) v\leq 0$ for all $v\ne 0$. Using the definition of $H(t)$, we have
\begin{align}
v^\top H(t) v&=\int_{t-T}^t (e^{-T}-e^{\tau-t}) (v^\top x(\tau))^2 d\tau\\
&=e^{-t}\int_{t-T}^t (e^{t-T}-e^{\tau}) (v^\top x(\tau))^2 d\tau.
\end{align}
Since $t-T\leq \tau \leq t$, the term $e^{t-T}-e^{\tau}$ is nonpositive. Thus we get $v^\top H(t) v\leq 0$.


问:
$\forall \delta> 0 $, if $\mid a - b \mid \le \delta $ then $a = b$

$\forall \delta> 0 $, if $\mid a - b \mid \le \delta $  then $a = b$

proof:

Assume, by contradiction, WLOG   $a > b \to a - b > 0$   Let $d = a-
 b$.

Take $\delta = \frac{d}{2}$. Then we have   $\mid a - b \mid = a - b = d$
is not $\le \delta$. Contradiction

My question is that:

when we prove $p \to q$ statement using contradiction, shouldn't we assume that $p$ is true and show the contradiction to $p$ when we assume $q$ is wrong?
The given proof doesn't assume $p$ is true in the beginning, does it?

If I set $\delta$ to $\frac{d}{2}$, does it satisfy that |a-b| is less or equal to $\delta$?

答:
The proof assumes $p$ is true, where $p$ is the statement

$$\forall \delta>0: |a-b| \le \delta\tag{1}$$

and shows $q$ by contradiction where $q$ is $a=b$.

Assume $a \neq b$.

So $d=|a-b| >0$ by standard properties of the absolute value (in your text the defintiion interms of the ordered field structuree is used, but that amounts to the same thing).

Apply our assumption $(1)$ to $\delta=\frac{d}{2}>0$, which is allowed as we have a universal quantor there. We get $d=|a-b| \le \frac{d}{2} < d$, a contradiction.

The final contradiction shows the first assumption $a \neq b$ was wrong, so $a=b$.

So from assuming $p$ we get $q$ (as $\lnot\lnot q$, so via contradiction).


问:
Trying to understand definition of Lie ideal for C*-algebras
Let $A$ be a $C^*$-algebra. A sub space $I$ of $A$ is called Lie ideal of A if $[I,A]= IA-AI \subset I$

Since I contains $0$, isn’t it this definition equivalent to definition of two sided ideal of $C^*$-algerba?

Most probably I’m missing something in the definition of Lie ideal. Any ideas?

答:
First intended this as a response to a comment, but answering in comments is silly. I'm basically just giving a bit more detail to Dietrich's comment.

The product is closed for $A$, but not necessarily for an arbitrary subspace $I$. So think for example $A = \mathfrak{gl}(n)$ the C*-algebra of all $n \times n$-matrices, and $I = \mathfrak{sl}(n)$ the subspace of matrices with trace zero. Every commutator $XY - YX$ has trace zero, so $IA - AI \subset I$, but the product $XY$ of a matrix with a trace-zero matrix does not necessarily have trace zero again, e.g.

$$\begin{pmatrix} 2 & 0 \\ 0 & 1 \end{pmatrix} \cdot \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} \cdot \begin{pmatrix} 2 & 0 \\ 0 & 1 \end{pmatrix}  = \begin{pmatrix} 2 & 0 \\ 0 & -1 \end{pmatrix}.   $$

Hence $IA$ and $AI$ are not in $I$. So $I$ is a Lie idal in $A$, but not an ideal with respect to multiplication.

I think the confusion might come from the notation $IA - AI$. This should probably be read as the subspace spanned by $\{ ia - ai : i \in I, a \in A\}$, and not by $\{ia - bj : i,j \in I, a,b \in A\}$. If it was the latter, I believe your interpretation would be correct, but then the space would lose its "Lie-algebraic" character.


答:
This is not exactly a proof by contradiction. It rather uses Modus Tollens: that is, given a statement $P$ which implies $Q$, then if we do not have $Q$, we can't have $P$, formally:

$(P \to Q) \iff (\lnot Q \to \lnot P)$.

Translating to your concrete example, this reads:

$(\forall \delta>0: \vert a -b \vert \leq \delta \implies a=b) \iff (a \neq b \implies \exists \delta >0 : \vert a - b \vert > \delta)$

The right hand side is exactly what the proof shows: assuming $a \neq b$ it shows the existence of $\delta = \frac{a-b}{2}$ such that $\vert a - b \vert > \delta$. Of course, you could turn it into a proof by contradiction as follows:

Assume that $\forall \delta > 0: \vert a - b \vert \leq \delta$ and $a \neq b$. W.l.o.g. we can assume that $a > b$. Consider $\delta=\frac{a-b}{2}$. Then $\vert a - b \vert = a - b > \frac{a-b}{2} = \delta$, contradicting our assumption.

Body:
$\forall \delta> 0 $, if $\mid a - b \mid \le \delta $  then $a = b$

proof:

Assume, by contradiction, WLOG   $a > b \to a - b > 0$   Let $d = a-
 b$.

Take $\delta = \frac{d}{2}$. Then we have   $\mid a - b \mid = a - b = d$
is not $\le \delta$. Contradiction

My question is that:

when we prove $p \to q$ statement using contradiction, shouldn't we assume that $p$ is true and show the contradiction to $p$ when we assume $q$ is wrong?
The given proof doesn't assume $p$ is true in the beginning, does it?

If I set $\delta$ to $\frac{d}{2}$, does it satisfy that |a-b| is less or equal to $\delta$?


问:
What's the probability of a set of only three digits appearing in a random 9 digit set?
I'd like to know the method for correctly calculating the probability of a random sequence of $9$ numbers only containing $3$ unique, different numbers. For the purpose of this question: there are 10 numbers $0,1,2,3,4,5,6,7,8,9$

i.e. the probability of this: $123123123$ - for all unique combinations of $3$ digits (e.g $071$ in $071717717$)

My initial instinct is $(1/3)^9$ - is this correct?

答:
From the Twelvefold way, the number of surjective functions from a set of size $n$ to one of size $x$ is $x!\{{n\atop x}\}$, where $\{{n\atop x}\}$ is the Stirling number of the second kind. Here $n=9$ and $x=3$, and this represents the number of $9$-digit numbers containing $3$ (specified) integers. There are ${10\choose 3}$ possibilities of which integers to allow in the number (assuming base 10), so the total probability is

$$P=\frac{3!}{10^9}\left\{{9\atop 3}\right\}{10\choose 3}=\frac{6\cdot3025\cdot120}{1000000000}=\frac{2178000}{1000000000}=0.2178\%$$

which is a bit more than the $3^{-9}\approx.005\%$ originally predicted.

Edit: due to some ambiguities in the OP, I'm also listing the same results as above where the base alphabet only contains $9$ symbols (say $\{0,1,2,3,4,5,6,7,8\}$), per Ross Millikan's analysis. Then we have

$$P=\frac{3!}{9^9}\left\{{9\atop 3}\right\}{9\choose 3}=\frac{6\cdot3025\cdot84}{387420489}=\frac{1524600}{387420489}\approx0.39352\%.$$

In general, if we want to know the proportion of length $n$ strings on an alphabet of $k$ symbols which use exactly $x$ distinct symbols, the formula is $P=\frac{x!}{k^n}\left\{{n\atop x}\right\}{k\choose x}$.


问:
Every superset of an infinite set is infinite proof
This is my proof:

Let X be an infinite set and let Y be a superset of X , i.e. , X$\subseteq$Y.

Then (by Dekekind definition) there exist and injection $f:X\to X$ such that $f(X)\neq X$.

We define a function $g:Y\to Y$ by:

$$g(y) =
\begin{cases}
f(y) & \text{if⠀⠀} y \in X \\
y & \text{if⠀⠀}y \in Y-X
\end{cases}$$
Now if we show that $g:Y\to Y$ is an injection too , our proof ends .

To proof injection,we must proof injection for two cases of $g(y)$ separately.

Case 1:

Thats obvious because of the question's hypothesis .

Case 2:

$$y∈Y-X⇒g(y)=y$$

So for $a,b∈Y-X$:

$$[g(a)=g(b)] ⇒[a=b]$$

Thus the injection is proven.

But when I showed this proof to my teacher, he said that you must add this to your proof:

If ⠀[ $a ∈ X$ and $ b ∈ Y-X$ ] ⇒ $[ a\neq b ]$

why?

答:
It is a necessary case. It is entirely trivial, but must be pointed out to have a full and complete proof.

The definition of injectivity says that if we have $a,b\in Y$ such that $g(a)=g(b)$, then we should have $a=b$. To study this, we split up into every possible case: first $a,b\in X$, second $a,b\in Y-X$, and finally the possibility that one of them is in $X$ and one of them isn't.

Which is to say, if it's an exercise or an exam problem or something similar, you ought to do it. If not, then it's basically up to you and how much you trust your readers to figure out the missing piece on their own.


问:
Why does PGL(2, C) give conformal maps of C?
I'm studying complex analysis and Möbius transformations are introduced.

I understood that those class of mappings are recurring when studying conformal mappings of $\mathbb{C}$ (conformal mappings of the unit disk are Möbius transforms, same for $\mathbb{C}$ extended with the point at infinity, etc.).

I also read that those transformations may be defined using the action of PGL(2, $\mathbb{C}$) on $\mathbb{C}$, a definition that makes their group structure much understandable.

When reading Complex analysis books, it seems like it just happens that PGL(2,$\mathbb{C}$) induces conformal mappings on the Riemann Sphere (because those induced functions happen to be holomorphic). I guess this doesn't just happen randomly and it should be part of a larger theory which explains why elements of PGL(2,$\mathbb{C}$) define conformal maps.

If so, what is this theory and how could that connection be summarized ?

答:
We can examine the conformal automorphism group of $S^n$ and then examine $n=2$ as a special case, where $\mathrm{PGL}_2\mathbb{C}$ is relevant by way of an "accidental isomorphism."

Consider the pseudo-Euclidean space $\mathbb{R}^{p,q}$. Its projectivized null cone is $(S^{p-1}\times S^{q-1})/\mathbb{Z}_2$. Thus, we can identify $S^n$ with the projectivized null cone of $\mathbb{R}^{1,1+n}$. This is acted upon by the split orthogonal group $\mathrm{O}(1,1+n)$. IIRC, the Cartan-Dieudonné guarantees this is generated by pseudo-Euclidean reflections, which correspond to inversions in $S^n$ (a la inversive geometry, where $\mathbb{R}^n$ and $S^n$ can be treated interchangeably via stereographic projection). That these tranformations are conformal then follows from the inversions being conformal, which is arguably easier to see in affine space (and also stereographic projection is also conformal). The theory behind all this is called "Möbius geometry."

[This generalizes to "Lie sphere geometry": the set of hyperspheres in $S^n$ can be identified with the projectivized null cone of $\mathbb{R}^{2,1+n}$, on which $\mathrm{O}(2,1+n)$ acts. But these transformations can turn points on $S^n$ into hyperspheres of nonzero radius.]

For $p+q\le 6$ there are a patchwork of "accidental isomorphisms" between spin groups $\mathrm{Spin}(p,q)$ (double covers of $\mathrm{SO}(p,q)$s) and classical matrix groups over composition algebras - reals, complex numbers, quaternions. There are even more of these if we are willing to be more flexible, e.g. use split complex numbers, split quaternions, octonions and split octonions. The most important one is arguably the one $\mathrm{SL}_2\mathbb{C}=\mathrm{Spin}(1,3)$, relevant to relativity (check out the signature!), which restricts to an equally important one $\mathrm{SU}_2\mathbb{C}=\mathrm{Spin}(3)$, relevant to quantum theory.

It remains to understand how $\mathrm{SL}_2\mathbb{C}$ is relevant. We know $\mathrm{PGL}_2\mathbb{C}$ acts on the complex projective line $\mathbb{CP}^1$ as automorphisms. An element of $\mathbb{CP}^1$ may be represented by a vector $v\in\mathbb{C}^2$, which corresponds to a hermitian matrix $vv^\dagger\in\mathfrak{h}_2\mathbb{C}$ (the corresponding orthogonal projection). This matrix is well-defined up to scalar multiplication, and has determinant zero, so this actually identifies $\mathbb{CP}^1\simeq S^2$ with the null cone of $\mathfrak{h}_2\mathbb{C}$ (which uses the determinant as a real pseudo-Euclidean "inner product," of signature $(1,3)$). We can restrict the action to $\mathrm{SL}_2\mathbb{C}$, since scalars act trivially. Also relevant is that $\mathbb{CP}^1$ may be identified with the Riemann sphere $\mathbb{C}\sqcup\{\infty\}$; if we transport the action of $\mathrm{SL}_2\mathbb{C}$ we get the usual action by Möbius transformations.


问:
How to find the determinant of a matrix using the PA = LU method.
I am currently trying to write a code in matlab for a course I'm taking. My program needs to implement the PA = LU method to solve a matrix and compute it's determinant. I am not allowed to use the lu(A) or any other built in functions.  So far I managed to write the code required to find the matrices P,L,U given matrix A, but I ran into trouble when it came time to compute the determinant.

Since the PA = LU method uses pivoting, the determinant should be the same as the A = LU method, but might be of different sign depending on how many pivoting has been performed. My question is, how can I figure the determinant from the P,L,U matrices? I know that for the A = LU method, the determinant is det(A) = det(L)*det(U), where det(L) = 1, which gives us det(A) = det(U). det(U) is simply the product of it's diagonal elements, which is fairly easy to compute. But in the case of PA = LU, we have det(P)*det(A) = det(L)*det(U). To solve for det(A) I need to find det(P), which I don't know how to compute in an efficient way. I know that det(P) can either be 1 or -1, but given an NxN permutation matrix, how can I figure that out efficiently? I tried to search it on google but I couldn't find anything relevant. I am not asking for the matlab code but for a method to compute a permutation matrix determinant or at the very least figure how many row swaps have been performed from the permutation matrix if that is possible. Thank you.

答: $PA=LU$ and $\det(P)=+1$ or $-1$ depending on the sign of the permutation, so $\det(A)=\det(L)\det(U)\det(P)$. So if $L$ only has $1$'s on the diagonal, $\det(L)=1$ and so you just have to compute $\det(U)$ which is easy (product of diagonal). The $\det(P)$ is easy: start with $p=1$ and with every (row or column) swap (during the $LU$ computation), multiply $p$ by $-1$. The final $p$ is what you need. It's an almost free byproduct.


答:
You have to show in general: $a,b \in Y$ and $a \neq b$ then $g(a)\neq g(b)$.

Because of the definition of $g$ in cases depending on $a \in X$ or $a \in Y\setminus X$ we have a priori $4$ cases:

$a \in X, b \in X$. Covered by $f$ being injective.

$a \in X, b \in Y \setminus X$. Clear as $g(a) = f(a) \in X$ and $g(b)=b \in Y\setminus X$. So $g(a) \neq g(b)$ (or else $b=g(b)= g(a) \in X$ contradiction.)

$ a \in Y\setminus X$, $b \in X$, same argument as previous case with $a$, $b$ swapped. Symmetry...

$ a \in Y\setminus X$, $b \in Y\setminus X$: clear as $g(b)=b, g(a)=a$ in that case..

But all cases are needed, and you just did the first and last. Your teacher pointed out the middle two (with implicit symmetry use).

Title: Every superset of an infinite set is infinite proof

Body:
This is my proof:

Let X be an infinite set and let Y be a superset of X , i.e. , X$\subseteq$Y.

Then (by Dekekind definition) there exist and injection $f:X\to X$ such that $f(X)\neq X$.

We define a function $g:Y\to Y$ by:

$$g(y) =
\begin{cases}
f(y) & \text{if⠀⠀} y \in X \\
y & \text{if⠀⠀}y \in Y-X
\end{cases}$$
Now if we show that $g:Y\to Y$ is an injection too , our proof ends .

To proof injection,we must proof injection for two cases of $g(y)$ separately.

Case 1:

Thats obvious because of the question's hypothesis .

Case 2:

$$y∈Y-X⇒g(y)=y$$

So for $a,b∈Y-X$:

$$[g(a)=g(b)] ⇒[a=b]$$

Thus the injection is proven.

But when I showed this proof to my teacher, he said that you must add this to your proof:

If ⠀[ $a ∈ X$ and $ b ∈ Y-X$ ] ⇒ $[ a\neq b ]$

why?


问:
How do I refactor this sailboat transform to solve for apparent wind direction for my sailboat plotting algorithm?
The core problem I would like assistance with is this:

How do I refactor this formula to transpose $a$?

$$\sin(a_0)\sin(a) \biggl(\frac{ \sin(\frac{a}{2})}{\sin(a_0 - a)}\biggr) ^2 = VW \cdot \eta$$

For more context, please read on.

I'm in a little over my head, and may be mixing up some terms, so please forgive my ignorance. I am attempting to write a route plotting algorithm that calculates a sailboat's $VMG$ (a measure of how optimal a sailboat's heading or direction of sail is) using live wind velocity and wind direction. The goal is to give the user a tool for optimizing pathfinding in the context of sailing. VMG is calculated using this formula:

$V$ = boat speed

$x$ = angle of wind relative to the front of the boat

$$VMG = V \cdot \cos(x)$$

In order to calculate boat speed from wind speed, I plan to use this formula, which is apparently widely accepted:

$VW$ = wind velocity

$a_0$ = true wind angle relative to the front of the boat

$a$ = apparent wind angle (i.e. wind generated by movement of the boat)

$$VB = VW \cdot \frac{\sin(a_0 - a)}{\sin(a)}$$

In order to solve this, I need to find $a$.

This article by Yoav Raz posits that a can be found by solving for it in his sailboat transform:

VW= wind velocity

$a_0$ = true wind angle relative to the front of the boat

$a$ = apparent wind angle (i.e. wind generated by movement of the boat)

$\eta$ = a complex measure of the boat's resistance to acceleration which for this purpose I will assume to be a low, constant number around 0.01)

$$\sin(a_0) * \sin(a) * \biggl(\frac{ \sin( \frac{a}{2})}{ sin(a_0 - a)}\biggr) ^2 = VW \cdot \eta$$

In practice, I will know the wind velocity and true wind angle, and as I said will be assuming $\eta$. Here is where the trouble starts: I am not very good at math anymore, and I find myself at a loss as to how to refactor this formula for my purposes. In order to use this formula in my algorithm, I need to refactor it into an expression that isolates $a$ given the other parameters( i.e. $a=f(x)$ ).

I've tried to refactor it by using trigonometric identities, which I think is the right path. The farthest I've gotten is this:

$$\sin(a_0) \sin(a)  \biggl( \frac{\sin(\frac{a}{2})}{\sin(a_0)\cos(a)-\cos(a_0)\sin(a)}\biggr)^2 = VW\cdot \eta$$

I know I'm kind of asking "please teach me trigonometry and calculus," so my apologies for that. I'm just hoping that even if I'm barking up the wrong tree that someone can help point me in the  right direction.

Edit:
It now occurs to me that the solution might be to simply iteratively attempt to solve this by trying inputs for a and attempting to solve for 1. The Raz article suggests doing this and starting with values slightly below a0. I could write a model to evaluate this expression with decreasing values until it arrives at a value a such that both sides resolve to 1.

Here are some more relevant resources to this problem space, if you would like to understand a bit more background around this topic:

The Physics of Sailing

Sailboat speed Vs. wind speed

Velocity Made Good

Polar Diagram

Apparent Wind Speed

答:
I prefer to make a second answer.

Using the same notations as above, let $\color{red}{a=2\sin^{-1}(x)}$ and expand. Now, we face the problem of the zero's of function
$$f(x)=4 x \sqrt{1-x^2} \sin (b) \left(2 k \left(1-2 x^2\right) \cos (b)+x^2\right)+$$ $$k
   \left(8 x^4-8 x^2+1\right) \cos (2 b)-k$$Isolating the square root and squaring, we get a quartic equation in $y=x^2$

$$A_0+A_1y+A_2y^2+A_3 y^3+A_4y^4=0$$ where
$$A_0=4 k^2 \sin ^2(b) \qquad A_1=-32 k^2$$ $$A_2=16 k \csc ^2(b) (-k \cos (2 b)-\cos (b)+\cos (3 b)+5 k)$$
$$A_3=-16 \left(8 k^2 \csc ^2(b)-12 k \cos (b)+1\right)$$
$$A_4=8 \csc ^2(b) \left(-8 k \sin (b) \sin (2 b)-\cos (2 b)+8 k^2+1\right)$$ which means that $\color{red}{\text{there is an analytical solution to the problem}}$ with very nasty radicals.

Applied to the worked example, this would give (the ridiculous number od decimals is on purpose)
$$y=0.03937627700155306953468549235033823816779707297868$$
$$x=0.19843456604521569476116634159797359301513019509245$$
$$a=0.39952093243881675034376955944379221762172468816265$$
$$\color{blue}{a=22.8908632558755028037653673980262663277334485138902^{\circ}}$$

Edit

Something simpler could be obtained using $\color{red}{a=b-\sin ^{-1}(2 x)}$. This time, we end adain with a quartic in $x$
$$B_0+B_1x+B_2x^2+B_3 x^3+B_4x^4=0$$ where
$$B_0= \sin ^6(b)\qquad B_1=-4 \sin ^5(b)\qquad B_2=-16 k \sin ^2(b) \cos (b)$$
$$B_3=-8 \sin (b) (4 k \cos (b)+\cos (2 b)-1)\qquad B_4=-8 \left(-8 k \sin (b) \sin (2 b)-\cos (2 b)+8 k^2+1\right)$$ where the coefficients are much simpler.

The solution can be approximated using the $[1,4]$ Padé approximant leading to
$$x \sim \frac{\text{numerator}}{\text{denominator}}$$
$$\text{numerator}=-72 \sin ^5(b)-16 k \left(\sin ^3(b) (31 \cos (b)+\cos (3 b))\right)-16 k^2 (\sin
   (b) (3 \cos (2 b)+5))$$
$$\text{denominator}=-192 \sin ^4(b)-128 k \left(\sin ^2(b) (19 \cos (b)+\cos (3 b))\right)-128 k^2 (7
   \cos (2 b)+9)$$

For the worked example, this would lead to
$$x=\frac{4068 \sqrt{3}-785}{100432}$$
$$a=\frac \pi 6-\sin ^{-1}(2 x)=0.39860$$ to be compared to the exact $a=0.39952$. This corresponds to an error of $0.05^{\circ}$.

We could , without any problem, continue with Padé approximants of higher order for a still better accuracy. For example, the next one would give
$$x=\frac{3830+377 \sqrt{3}}{72608}$$
$$a=\frac \pi 6-\sin ^{-1}(2 x)=0.39980$$ which corresponds to an error smaller than $0.02^{\circ}$.


问:
Isomorphism between structures
I have gotten the next structures:
$$M_1=\langle \mathbb{N},S^{M_1}=\{\langle n,k\rangle\in \mathbb{N}^2:\exists m\in \mathbb{Z}(n-k=2m) \} \rangle$$
$$M_2=\langle \mathbb{Z},S^{M_2}=\{\langle a,b\rangle\in \mathbb{Z}^2:\exists m\in \mathbb{Z}(a-b=2m) \} \rangle$$
$$M_3=\langle \mathbb{Q},S^{M_3}=\{\langle x,y\rangle\in \mathbb{Q}^2:\exists m\in \mathbb{Z}(x-y=2m) \} \rangle$$

Now, I have the find the isomorphic structures.

In my opinion, there isn't isomorphism at all between the next structures, because there are negative numbers at $M_2$ and in $M_3$ there are fractions numbers whose difference is an integer and an even number, so I don't see a bijective function between them. I will be glad for some help. Thanks!

答:
$M_1$ and $M_2$ are equivalence relations, where all even integers become equivalent, and likewise for odd integers. So can you find a bijection between $\Bbb N$ and $\Bbb Z$ that preserves parity?

In $M_3$ we also have an equivalence relation, but many more classes.... Can you show that isomorphisms preserve the number of classes under a relation? Or note that in $M_1,M_2$ the statement

$$\forall x,y,z \in M: xSy \lor xSz \lor ySz$$

holds in $\langle M,S\rangle$ and in $M_3$ it does not..

Title: Isomorphism between structures


问:
Is every multiperfect number also pseudoperfect?
It seems like something that should be pretty obvious but I don't quite get why would it be true. For example, in the case of 2-fold perfect numbers, or simply perfect numbers, it is evident because

$$\sigma(n) - n = n$$

so you just add all the divisors except itself.

We call a positive integer $n>1$ multi-perfect , if $k:=\frac{\sigma(n)}{n}$ is an integer , in the case $k=2$ the number is called perfect.

What about the multi-perfect numbers that are not perfect (the case $k>2$) ? Are they all pseudoperfect ?

答:
Here I consider the case of $k$-perfect numbers where $k \geq 3$. (The case $k=2$ was considered in the OP.)

It has been conjectured that $k$-perfect numbers ought to be divisible by $k!$.  From Peter's comment, this then implies that $k$-perfect numbers are also pseudoperfect. (Note that the conjecture mentioned also implies that there are no odd $k$-perfect numbers for $k \geq 2$.)

Update: As correctly pointed out by Peter, $459818240$ is $3$-perfect but not divisible by $6$.  It is however, divisible by $20$, which still makes it pseudoperfect, as had already been pointed by Peter in a comment underneath the OP.


问:
How can I show that this function is a homomorphism?
Let  $f: \mathbb{Z} \to \mathbb{Z}_n$ be the map given by $f(a)$ = the remainder of the division of $a$ by $n$. Show that $f$ is a homomorphism.

I know that $f$ is a homomorphism if $f(x*y)=f(x)·f(y)$ for all $x,y$ in $ \mathbb{Z} $.

My approach is that I set up an equation using $f(a)$,
$Q·n+f(a)=a$, where $Q$ is the quotient of the division.

But what should I do next?

Body:
By division algorithm, write $x*y:=x+y=q_3 n+r_3, x=q_1 n+r_1 (*), y=q_2 n + r_2(**)$, where $0\leq r_1, r_2, r_3<n$. Then $f(x*y)=r_3*n \mathbb{Z}, f(x)=r_1 *n\mathbb{Z}, f(y)=r_2*n\mathbb{Z}$.

Want to show: $f(x*y)=r_3*n \mathbb{Z}=(r_1*n \mathbb{Z})\cdot (r_2*n \mathbb{Z})=f(x)\cdot f(y)$. i.e, $r_3*n \mathbb{Z}=(r_1 * r_2) * n \mathbb{Z}$. i.e, $r_3*(r_1 * r_2)^{-1}\in n\mathbb{Z}$, i.e, $r_3 -(r_1+r_2)=k n$  where $k\in \mathbb{Z}$.

Now multiply (*) and (**) to conclude: $x*y=(q_1 n+r_1)*(q_2 n+r_2)=(q_1+q_2)n+(r_1+r_2)=q_3n+r_3$, hence $r_3 -(r_1+r_2)=(q_1+q_2 -q_3)n$, as desired.


问:
LCM in $\mathbb F_q[T]$
Let $q$ be a power of a prime $p$. We work in $\mathbb F_q[T]$. Put $L_n=\prod_{j=1}^n(T^{q^i}-T)$. Does one have
$$\deg(\mathrm{LCM}(L_{n+1};L^q_n))=\frac{q^{n+2}}{q-1}+o(q^n)$$
when $n\to\infty$?

答:
Let $$h_n = \prod_{d|n} (T^{q^{n/d}}-T)^{\mu(d)} = \prod_{a\in \Bbb{F}_{q^n}, \Bbb{F}_q(a)=\Bbb{F}_{q^n}} (T-a)$$

They are coprime and
$$L_n = \prod_{j=1}^n h_j^{\lfloor n/j\rfloor}$$
Whence
$$lcm(L_{n+1},L_n^q)=L_n^q h_{n+1}$$
has degree $$q\sum_{j=1}^n q^j + \sum_{d|n+1} \mu(d) q^{(n+1)/d}$$

Title: LCM in $\mathbb F_q[T]$