问:
Efficient way to find the remainder when $2001+ 2002+ 2003+ … + 2015+ 2016$ is divided by $2017$?
I can think of a couple of ways

Notice that unit digit of the first $8$ terms can be added in the last $8$ terms to make them $2017$. Now add the first $8$ terms without their unit digits (i.e. $2000*8$) and find a remainder on that.

Sum of AP series = $4017*8$, now find the remainder

But both would take a lot of computation.
Is there any more efficient way of doing it manually?

Body:
This is equal to:
2016(2017)(1/2)-(2000)(2001)(1/2)
2016(2017)(1/2)≡0(mod 2017)

2000(2001)(1/2)=(1000)(2001)≡(1000)(-16)≡-16000 (mod 2017)
-16000 (mod 2017)≡-136(mod 2017)≡1881(mod 2017)


问:
How to find definite integral of $\sqrt{1-\sin x}$
I tried to solve this.But I end up with two types of antiderivative function.Then how to find the definite integral of this function?
My results are -2(Sin x/2 -Cos x/2) and 2√(1+sinx).Which one should i use to find definite integral?</p>

答:
$\sqrt{1-\sin x}=\sqrt{\dfrac{\cos^2 x}{1+\sin x}}=\dfrac{|\cos x|}{\sqrt{1+\sin x}}$. Let $1+\sin x=t.$

The antiderivative is therefore, $\pm \int\dfrac{dt}{\sqrt{t}}=\pm2\sqrt{1+\sin x}+c$,depending on the sign of $\cos x$.

As far as the definite integral is concerned, split the integral into appropriate ranges: where $\cos x$ is $+$ or $-$, so that you can you use one of $\pm2\sqrt{1+\sin x}$.

ContentLicense: CC BY-SA 4.0


问:
Show that $f'(x) \simeq \frac{1}{12h} [-f(x+2h) + 8f(x+h) -8f(x-h) + f(x-2h)]$?
How would you show that $f'(x) \simeq \frac{1}{12h} [-f(x+2h) + 8f(x+h) -8f(x-h) + f(x-2h)]$?

Here is what I have tried:

It would make sense to me that Richardson extrapolation should/could be used here because the question came up in a chapter about this topic - although it does not have to be. Anyway, so I thought pretty hard but the closest approximation I could come up with was $f'(x) \simeq \frac{1}{12h} [-2f(x+2h) + 8f(x+h) -8f(x-h) + 2f(x-2h)]$. This was derived as follows:

$$
D(n,0) = \frac{1}{2h} [f(x+h/2^n)-f(x-h/2^n)]\\
D(n,k) = \frac{4^k}{4^k-1} D(n,k-1) \frac{1}{4^k-1} D(n-1,k-1)\\
D(0,1) = \frac{4^1}{4^1 - 1} D(0,0) - \frac{1}{4^1-1} D(-1, 0)\\
\Rightarrow D(0,1) = \frac{4}{3} \frac{1}{2h} [f(x+h)-f(x-h)] - \frac{1}{3} \frac{1}{2h} [f(x+2h)-f(x-2h)]\\
= \frac{4}{6h} [f(x+h)-f(x-h)] - \frac{1}{6h} [f(x+2h)-f(x-2h)]\\
= \frac{1}{12h} [-2f(x+2h) + 8f(x+h)-8f(x-h) + 2f(x-2h)]
$$

I was about to get happy but realized that even though it was close, it was not the requested result.

How can I derive $f'(x) \simeq \frac{1}{12h} [-f(x+2h) + 8f(x+h) -8f(x-h) + f(x-2h)]$?

Body:
If you know
$$\frac{f(x+h)-f(x-h)}{2h} \to f'(x)$$
$$\frac{f(x+2h)-f(x-2h)}{4h} \to f'(x)$$
then
\begin{align}
&\frac{1}{12h}[-f(x+2h) + 8f(x+h) - 8f(x-h) + f(x-2h)]
\\
&= -\frac{1}{3} \frac{f(x+2h)-f(x-2h)}{4h}
+ \frac{4}{3} \frac{f(x+h)-f(x-h)}{2h}
\\
&\to f'(x)
\end{align}


问:
Proving that an ideal in a PID is maximal if and only if it is generated by an irreducible

Let $R$ be a PID (Principal Ideal Domain) and $x$ is an element R. Prove that the ideal $\langle x\rangle$ is maximal if and only if $x$ is irreducible.

Ok, so I know what an irreducible is. I'm thinking that this problem is asking us to set up a proof by contradiction but I can't see how. No one in my study group has any clue.

答:
Proof by contradiction is a perfectly good idea.

First, suppose $x = y z$, and neither $y$ nor $z$ are units. Can you find an ideal containing $\left< x \right>$?

Second, suppose $\left< x \right>$ is not maximal, so there is an ideal containing it. Can you find a factor of $x$?

ContentLicense: CC BY-SA 3.0


问:
Proof of the following norm inequality
Let $x,y ∈ \mathbb{R}^n$ be vectors, let $A ∈ \mathbb{R}^{n×n}$ be a regular matrix. We denote $\lambda_{min}$ as the smallest eigenvalue of matrix $A^TA$ and $\lambda_{max}$ as the largest eigenvalue of $A^TA$. Then $
\frac{\| Ay\|^2}{\| Ax\|^2}≤\frac{\lambda_{max}}{\lambda_{min}}\frac{\| y\|^2}{\| x\|^2}$.

I have a problem with this proof since I can't seem to be able to connect eigenvalues of $A^TA$ with norms. Can someone point me in the right direction?

答:
warnning: this is a complete solution to the posted problem.

The hints are already provided in others' answer.

I write this for people who failed to prove the inequality after seeing the hints.

$\forall x\in \mathbb R^n\ \langle Ax,Ax \rangle = x^T(A^TA)x$ where $B=A^T A$ is a symmetric one.

According to the real spectral theorem, we can orthogonally diagonalize $B=A^TA$.

Let's say that there is a orthogonal matrix $P$ which satisfies $P^T(A^TA)P=\mathrm{diag}(\lambda_1,\lambda_2,\lambda_3\dots \lambda_n)$, where $\lambda_i$ are the eigenvalues(counted with multiplicity) in non-decending order($\lambda_i\geq \lambda_{i+1}$).

Then we can make an varible change $x=Py\quad y=P^{-1}x=P^Tx$ (recall that orthogonal matrices are invertible so this is a one-to-one and onto mapping). Therefore

$$\begin{aligned}
\langle Ax,Ax\rangle&=(Py)^T(A^TA)(Py)=y^T\left(P^T(A^TA)P\right)y=y^T\mathrm{diag}(\lambda_i)y
\\
&=\begin{bmatrix}
{y_1}^T\\
{y_2}^T\\
\vdots\\
{y_n}^T
\end{bmatrix}
\begin{bmatrix}
\lambda_1\\
&\lambda_2\\
&&\ddots\\
&&&\lambda_n
\end{bmatrix}
\begin{bmatrix}
{y_1}
&{y_2}
&\dots
&{y_n}
\end{bmatrix}
=\sum_{i=1}^n \lambda_i y_i^2\\
\\
&\lambda_1\sum y_i^2=\lambda_1||y||^2 \leq \sum_{i=1}^n \lambda_i y_i^2\leq \lambda_n\sum y_i^2=\lambda_n ||y||^2\\
&\text{orthogonal matrices preserve norm so }||x||=||Px||=||y||\text{ thus}\\
&\lambda_n||y||^2=\lambda_n||x||^2\leq ||Ax||^2=\langle Ax,Ax\rangle\leq \lambda_1||y||^2=\lambda_1 ||x||^2\\
\implies &\lambda_1||x||\geq ||Ax||^2\geq \lambda_n ||x||
\end{aligned}
$$

Back to the original problem. We have $||Ax||\in \left[\ \lambda_n ||x||,\lambda_1 ||x||\ \right]$ and $||Ay||\in \left[\ \lambda_n ||y||,\lambda_1 ||y||\ \right]$.

$$
\frac{||Ax||^2}{||Ay||^2}\leq \frac{\lambda_1 ||x||^2}{||Ay||}\leq \frac{\lambda_1 ||x||^2}{\lambda_n ||y||^2}
$$

Title: Proof of the following norm inequality


问:
count increasing functions on natural numbers.
I want to count all functions with these two conditions:
it is from {1,2,....,7} to {1,2,....,5}.
it is increasing .

I have some idea to start with f(1) different values but do not know how to organize solution.

答:
If the function is surjective.

Let $a$ denote the number of $x$ such that $f(x)=1$, similarly let $b$ denote the number of $x$ such that $f(x)= 2$..and so on till $f(x)= 5$.

Observe that the question is equivalent to no. of positive integer solutions of $a+ b+ c+ d+e = 7$ which is known.


问:
Continuum Hypothesis within L using Upward Lowenheim-Skolem
Trying to understand the proof of why $\mathit{CH}$ holds within $L$, I've seen that it strongly relies on downward Lowenheim Skolem to define a structure with an $\aleph_0$ cardinality. My question is whether we could use upward lowenheim skolem to define a similar structure with $\aleph_1$ cardinality (or superior), and then see if that structure holds in $L$. Thank you very much in advance.

答:
Generally, set theory focuses on well-founded structures, because we can then use a Mostowski collapse to convert them to transitive sets/classes which have nice absoluteness results.  This idea works with with downward Löwenheim–Skolem: if $N$ is an elementary substructure of $M$ and $M$ is well-founded, then so is $N$ (any infinite $\in^N$-decreasing sequence is $\in^M$-decreasing too).  In the case of $\mathrm{L}$, if we have an elementary substructure of $\mathrm{L}_{\omega_2}$, we get a well-founded structure which can be "collapsed" to a transitive set with nice properties (i.e. being a "small" level of $\mathrm{L}$).

But this is an issue with upward Löwenheim–Skolem: if we start with a well-founded $N$ and $N$ is an elementary substructure of $M$, there's no reason to think $M$ will be well-founded: $M$ might have an infinite $\in^M$-decreasing sequence of elements not in $N$.  We actually always know this can happen if $N$ is infinite: if we take the elementary diagram (so in the language adding constant symbols for every element of $N$)
$$T=\{\phi:\phi\text{ is a formula with parameters in }N\wedge N\models \phi\}\text{.}$$
We know that there are ill-founded models $M\models T$ by compactness (since $N$ is infinite).  But any such model has $N$ as an elementary substructure of $M$. So regardless of whether $N$ is well-founded or not, we have no control over whether its elementary extensions are well-founded, and this means we can't translate these elementary extensions to transitive sets like levels of $\mathrm{L}$.


问:
How can I prove $\int_{0}^{+\infty }\frac{x-sinx}{\sqrt{x^{7}}}dx$ converges/diverges?
I need to determine if the following integral converges/diverges:

$$\int_{0}^{+\infty }\frac{x-\sin x}{\sqrt{x^{7}}}dx$$

We can write the integral as:

$$\int_{0}^{+\infty }\frac{x-\sin x}{\sqrt{x^{7}}}dx=\int_{0}^{a }\frac{x-\sin x}{\sqrt{x^{7}}}dx+\int_{a}^{+\infty }\frac{x-\sin x}{\sqrt{x^{7}}}dx=I_{1}+I_{2}$$

+For $I_{1}=\int_{0}^{a}\frac{x-\sin x}{\sqrt{x^{7}}}dx$.

Since $\sin x= x-\frac{x^{3}}{3!} +O(x^{3})$, I know that $I_{1}$ is convergent.

+For $I_{2}=\int_{a}^{+\infty }\frac{x-\sin x}{\sqrt{x^{7}}}dx$.

I don't know how to use $x-\sin x$ for other ideas such as the comparison test. The only thing I can exploit is $x - \sin x>0 , x>0$.

Can you give me some hints? Thank you very much!

答:
$\sin(x) \le 1$ for all $x \in \mathbb{R}$, so $$ x - \sin(x) \le x+ 1$$

and you can see that $I_2 \le \int_a^\infty \frac{x+1}{x^{7/2}}dx$

Split the fraction and you can conclude that $I_2$ converges.


问:
Why does $\frac{V_n}{A_n}$ represent the concentration of volume around the boundary?
I read this answer about the volume of a ball in $\mathbb{R}^n$ being concentrated around the boundary.

I don't understand why:

$$\frac{V_n}{A_n}$$ is a measure of concentration around the boundary?

$$\frac{V_n}{V_{n-1}}$$ is a measure of concentration around the equator?

$V_n$ and $A_n$ denotes the volume and surface area of a (unit) ball in $\mathbb{R}^n$. We know that $A_n = nV_n$.

Also what exactly is the difference between the equator and the boundary in this context? Is there a diagram that can help me?

Thanks a lot!

答:
I'll try to answer the question in your last paragraph without drawing pictures.

The surface of a disk is a circle; the surface of a ball is a sphere. An $n$-dimensional ball of radius $R$ (centered at the origin) is the set $\{(x_1,x_2,\ldots,x_n)\mid x_1^2+x_2^2+\ldots+x_n^2\le R^2\}$; its surface is the set $\{(x_1,x_2,\ldots,x_n)\mid x_1^2+x_2^2+\ldots+x_n^2=R^2\}$.

In the context of the answer you link to, an equator of a disk is a line segment that cuts it in half (a diameter). An equator of a ball is the cross section you get when you slice the ball in half with a plane. This cross section is a disk—a disk of largest diameter that fits inside the ball. For an $n$-dimensional ball, an equator is the cross section (of dimension $n-1$) you get when you slice the ball into two equal halves. This cross section is a ball of dimension $n-1$ and radius equal to that of the original ball.

Equivalently, an equator is what you get when you do an orthogonal projection of the $n$-dimensional ball onto an $(n-1)$-dimensional hyperplane through its center. An easy way to produce an example is to set one coordinate equal to zero. An equator of the disk $x^2+y^2\le R^2$ is the line segment $x^2\le R^2$ (by setting $y=0$); an equator of the ball $x^2+y^2+z^2\le R^2$ is the disk $x^2+y^2\le R^2$ (by setting $z=0$).

Notice that the equator of a ball is also a ball (of dimension one less). The ratio $V_n/V_{n-1}$ is a length. It tells you how a tall a "cylinder" with an $(n-1)$-dimensional ball as its base would have to be to have the same volume as an $n$-dimensional ball of the same radius. So $V_2/V_1$ is the height a rectangle of base $2R$ would have to have to equal the area of a disk of radius $R$. It is $\pi R^2/(2R)=\frac{\pi}{2}R$. And $V_3/V_2$ is the height a cylinder with base $\pi R^2$ would have to have to equal a ball of radius $R$. It is $\frac{4}{3}\pi R^3/(\pi R^2)=\frac{4}{3}R$.

If $V_n/V_{n-1}$ is a small fraction of $R$, it means that the cylinder doesn't have to be very tall to equal the volume $V_n$; if it is large, then the cylinder does have to be tall. Now if instead of slicing the $n$-dimensional ball in half, we were to slice slightly above and slightly below the midpoint, that is, instead of slicing at, say, $x_n=0$, we sliced at $x_n=\epsilon$ and $x_n=-\epsilon$, where $\epsilon$ is a small positive number, the volume between the slices would be approximately a cylinder with the equator as base. So if $V_n/V_{n-1}$ were small, we could set $\epsilon$ equal to half this ratio, and almost all of the volume $V_n$ would lie between the slices.

When $n=2$ or $3$, the ratio is not a small fraction of $R$. (Both $\pi/2$ and $4/3$ are greater than $1$.) But as $n$ grows, it can be shown that $\sqrt{n}V_n/V_{n-1}$ approaches $\sqrt{2\pi}R$; the coefficient of $R$ in $V_n/V_{n-1}$ approaches $\sqrt{2\pi/n}$, which is indeed small when $n$ is large. So most of the volume $V_n$ lies in a narrow slice containing the equator.

The surface calculation is similar. The ratio $V_n/A_n$ is again a length. The difference $V_n(R)-V_n((1-\epsilon)R)$ (where the argument of $V_n$ is the radius of the ball) is the volume of the "spherical shell" of thickness $\epsilon R$. Roughly speaking, it's the part of the volume of the onion that is contained in the onion peel. Since $V_n(R)=C_nR^n$, where $C_n$ does not depend on $R$, we have, using that $A_n(R)=\frac{d}{dR}V_n(R)$,
$$
V_n(R)-V_n((1-\epsilon)R)=C_nR^n(1-(1-\epsilon)^n)\approx C_nR^n\cdot n\epsilon=nC_nR^{n-1}\cdot\epsilon R=A_n(R)\cdot\epsilon R.
$$
So if $V_n(R)/A_n(R)$ is a small fraction times $R$, we can set $\epsilon$ equal to this small fraction, and conclude that the volume of the onion peel is approximately that of the whole onion.

For $n=2$ and $n=3$ we get $\pi R^2/(2\pi R)=\frac{1}{2}R$ and $\frac{4}{3}\pi R^3/(4\pi R^2)=\frac{1}{3}R$. In fact, from the previous paragraph you can see that $V_n(R)/A_n(R)=\frac{1}{n}R$ in general. When $n$ is big, this is indeed a small fraction of $R$.


问:
Calculating expected value of non-empty chambers. What is wrong in my solution?
Instering $5$ different balls to $12$  different chambers, all the options are equally probabable. Let $X$ be the number of non-empty chambers, calculate $\mathbb{E}[X]$

I know that $\mathbb{E}(X)=\sum_{t \in R_{X}} t \cdot \mathbb{P}(X=t)$ so I just need to calculate $\mathbb{P}(X=t)$ for every $1\leq t \leq 5$
$$\mathbb{P}(X=1)= \frac{1}{12^4}$$
$$\mathbb{P}(X=2)= \frac{11 \cdot 2^3}{12^4}$$
$$\mathbb{P}(X=3)= \frac{11\cdot 10\cdot 3^2}{12^4}$$
$$\mathbb{P}(X=4)= \frac{11\cdot 10 \cdot 9 \cdot4}{12^4}$$
$$\mathbb{P}(X=5)= \frac{11\cdot 10 \cdot 9 \cdot8}{12^4}$$

now I just substitute this values in the expression $$\mathbb{E}(X)=\sum_{t \in R_{X}} t \cdot \mathbb{P}(X=t)$$ but I am not getting the right answer. I assume I have mistake in develop the expressions above. The options are:

A. $\displaystyle \frac{161051}{20736}$

B. $\displaystyle \frac{161051}{248832}$

C. $\displaystyle \frac{87781}{20736}$

D. $\displaystyle \frac{87781}{248832}$

答: If this is just a multiple choice question, then all those calculations are unnecessary. Namely, as $1\le X\le 5$, we have $1\le\mathbb E(X)\le 5$, which implies that the only solution that might be correct is C. Namely, A is bigger than $5$, and B and D are smaller than $1$.


问:
How do I evaluate $\iiint_{R} (xy+z^2) \ dV\,$?
The question states:

Sketch the region $$R = \left \{ (x,y,z) : 0 \leq z \leq 1- |x| -|y| \right \}$$

and evaluate the following integral $$\iiint_{R} (xy+z^2) \ dV$$

So my thoughts are that the sketch is straightforward just a pyramid with a square base. But then I get stuck with the limits of the integral. All I know is that we can take the positive segments and double and add on to find R since it's symmetrical but if someone could explain the limits involved.

The answer has been given to be: $$\frac{1}{15}$$

Thank you!

答:
The integral $\int_R xy\>dV=0$ because of symmetry.

The base square of $R$ has side length $\sqrt{2}$. When $R$ is intersected with a horizontal plane at height $z\in[0,1]$ we therefore obtain a square of area $\bigl((1-z)\sqrt{2}\bigr)^2$. It follows that
$$\int_R z^2\>dV=\int_0^1 z^2\>2(1-z)^2 \>dz={1\over15}\ .$$


问:
Find the number of integers $n$ of the form $30a0b03$ that are divisible by $13$.

Find the number of integers $n$ of the form $30a0b03$ that are divisible by $13$.

What I Tried: This problem looks simple but I cannot find it's solution. I recalled all the divisible rules of $13$ and tried to put them here, but none of them really worked. One thing which I got was :-
$$\rightarrow 13 | bo3 - 0a0 + 3$$
I only got this by applying one divisibility rule of $13$.
I might try and test for each values of $a$ and $b$ but there will be $100$ configurations, and I don't want to do that.

Can anyone help me?

Edit: After the hints @Daniel gave me, I figured out the solution and found $7$ solutions, can anyone tell me if this is correct or not?

答:
This can alternately be written as 30,000,003+10,000a+100b

1.30,000,003≡6(mod 13)

Thus, 10,000a+100b≡7(mod 13)

3a+9b≡7(mod 13)

3a+9b=7: No possibilities

3a+9b=20:No possibilities

Now you have to realize that the RHS has to divide 3 by Bezouts lemma. So, 13x+7=3y

3y-13x=7

2x(mod 3)≡1(mod 3). Thus, x≡2(mod 3) and can be represented as 3a+2.

3y-13(3a+2)=7 so 3y-39a=33 and y-13a=11. y=13a+11. y also has to be less than or equal to 9. However, no solutions for y satisfy this.


问:
Almost similar matrices and eigenvalues
Let us consider a Hermitian diagonalizable matrix $A \in M_N(\mathbb{C})$. It is known that a similarity transformation by an invertible matrix $P$ does not change the eigenvalues of $A$, that is

$$
Eig (A) = Eig(PAP^{-1})
$$

My question is: what happens when the matrix $P$ is not a squared $N\times N$ matrix, but, let's say, an $N\times M$ matrix? Notice that in this case $P^{-1}$ would be the Moore-Penrose inverse. Does anyone know how to (at least) tackle the problem?

My interest is focused on the largest eigenvalue of $A$ and $PAP^{-1}$: is there any connection between $\max\{Eig(A)\} $ and $\max\{Eig(PAP^{-1})\}$? Or at least a way to formalize this problem or some mathematical tools to adress it?

答:
In general, it holds that $AB$ and $BA$ have the same non-zero eigenvalues. Thus, $PAP^{-1} = (PA)P^{-1}$ has the same non-zero eigenvalues as $P^{-1}(PA) = (P^{-1}P)A$.

$J := P^{-1}P$ is the orthogonal projection onto the column-space of $P$. If $P$ has full row-rank, then $J$ is the identity matrix. If $P$ has full column-rank, then $P^{-1} = (P^*P)^{-1}P^*$ and it can be shown that $PAP^{-1}$ has the same rank as $P^{-1}PA$.

With the Cauchy interlacing theorem, we can say a bit more. Let $U$ be a matrix with orthonormal columns (i.e. $U^*U = I$) for which $J = UU^*$. Note that $U$ has size $N \times r$, where $r$ is equal to the rank of $P$. We note that $JA = (UU^*)A$ has the same non-zero eigenvalues as the $r \times r$ matrix
$$
U^*AU.
$$
$U^*AU$ is a compression of the matrix $A$, so its eigenvalues interlace the eigenvalues of $A$.

Concretely, we can reach the following two conclusions:

If $P$ has full row-rank $M> N$, then each eigenvalue of $A$ is also an eigenvalue of $PAP^{-1}$ and $0$ is necessarily an eigenvalue of $PAP^{-1}$ (regardless of whether $A$ has $0$ as an eigenvalue). If $A$ has at least one non-negative eigenvalue, then $PAP^{-1}$ and $A$ have the same maximal eigenvalue.

If $P$ has full column-rank $N > M$, then the eigenvalues of $PAP^{-1}$ interlace those of $A$. In particular, if $\mu_1 \leq \cdots \leq \mu_M$ are the eigenvalues of $PAP^{-1}$ and $\lambda_1 \leq \cdots \leq \lambda_N$ are the eigenvalues of $A$, then we have
$$
\lambda_M \leq \mu_M \leq \lambda_N.
$$

Title: Almost similar matrices and eigenvalues


问:
Maximize $\mathrm{tr}(Q^TCQ)$ subject to $Q^TQ=I$
Let $C \in \mathbb{R}^{d \times d}$ be symmetric, and

$$Q = \begin{bmatrix}
      \vert & \vert &    & \vert \\
      q_1   & q_2   & \dots & q_K  \\
      \vert & \vert &    & \vert
      \end{bmatrix} \in \mathbb{R}^{d\times K}$$

where $d \geq K$. Using Lagrange multipliers,

$$\begin{array}{ll} \text{maximize} & \mbox{tr} \left( Q^T C Q \right)\\ \text{subject to} & Q^T Q = I\end{array}$$

I am unfamiliar with these kind of constraints with this method, and after reading another post I believe the same specific and simple result given is also applicable, and therefore the lagrangian would be:

$$\mathcal{L}(Q,\lambda)=\mathrm{tr}(Q^TCQ)-\left<\lambda,Q^TQ-I\right>$$

where $\lambda\in\mathbb{R}^{K\times K}$, and $\left<\cdot,\cdot\right>$ is the element wise inner product (what kind of makes sense to me since we're actually adding as many constraints as there are elements in these matrices.

In attempting to do that I start taking $\frac{\partial \mathcal{L}}{\partial Q}=O\in\mathbb{R}^{d\times K}$, and compute that LHS element by element; for the $(l,m)$ one:

\begin{equation}
0=\frac{\partial \mathcal{L}}{\partial Q_{lm}}=(CQ+C^TQ)_{lm}-\underbrace{\frac{\partial}{\partial Q_{lm}}\sum_{i,j}\lambda_{i,j}(Q^TQ-I)_{ij}}_{=\lambda_{lm}\frac{\partial (Q^TQ)_{lm}}{\partial Q_{lm}}}=2(CQ)_{lm}-\lambda_{lm}\frac{\partial (q_l^Tq_m)}{\partial q_m(l)}
\tag{1}\end{equation}

where in the last step I've used the definition I made at the beginning for $Q$, and $q_m(l)$ denotes the $l$-th component of the column vector $q_m$.

In trying to compute the very last term:
$$\frac{\partial (q_l^Tq_m)}{\partial q_m(l)}=\frac{\partial \left[q_l(1)q_m(1)+ \ldots + q_l(d)q_m(d)\right]}{\partial q_m(l)}=
\begin{cases}
    q_l(l)\equiv Q_{ll}    & \text{if } l\neq m\\
    2q_l(l)\equiv 2Q_{ll}  & \text{if} l=m
\end{cases}$$

The whole equality (1) then can be written:

$$0=2(CQ)_{lm}-\lambda_{lm}Q_{ll}(1+\delta_{lm})$$

where $\delta_{lm}$ is the Kronecker delta.

The equation for the other stationary point of the lagrangian, $\frac{\partial \mathcal{L}}{\partial \lambda}=O\in\mathbb{R}^{K\times K}$, for the $(l,m)$ element as well:

$$ 0=\frac{\partial \mathcal L}{\partial \lambda_{lm}}= \frac{\partial }{\partial \lambda_{lm}}\sum_{i,j}\lambda_{i,j}(Q^TQ-I)_{ij}=(Q^TQ-I)_{lm}\tag{2}$$

what obviously leads to $(Q^TQ)_{lm}=\delta_{lm}$.

All this should tell that the columns of $Q$ are eventually the $K$ first eigenvectors of $C$, but I don't know how to continue from here to prove that, supposing I didn't make a mistake. Please I would sincerely appreciate any help.

Edit:

I have rewritten the inner product as a trace of a product of matrices (after seeing this question):

$$\left<\lambda,Q^TQ-I\right>=\sum_{i,j}\lambda_{i,j}(Q^TQ-I)_{ij}=\mathrm{tr}(\lambda^TQ^TQ) $$

and have thus managed to do the derivative without losing the matrix format (using formulas from the Matrix Cookbook):

\begin{align}
O=&\frac{\partial \mathcal{L}}{\partial Q}=\frac{\partial}{\partial Q}\mathrm{tr}(Q^TCQ)-\frac{\partial}{\partial Q}\underbrace{\mathrm{tr}(\lambda^T(Q^TQ-I))}_{\mathrm{tr}(\lambda^TQ^TQ)-\mathrm{tr}(\lambda^T)}\\=&(CQ+C^TQ)-(Q(\lambda^T)^T+Q\lambda^T)=2CQ+Q(\lambda+\lambda^T)
\end{align}

And this leads to:

$$CQ=Q\underbrace{\left(-\frac{\lambda+\lambda^T}{2}\right)}_{:=\widetilde{\lambda}};\quad CQ=Q$$

If the defined matrix $\widetilde{\lambda}=Q^TCQ$ were diagonal we would already have the result.

答:
Here's a slightly shorter and, hopefully, more transparent version of copper.hat's answer:

Let $e_j$ be the eigenvectors of $C$, with eigenvalues $\lambda_j$. Then
\begin{align}\mathrm{tr}Q^TCQ&=\sum_{i=1}^k\langle q_i,Cq_i\rangle\\
&=\sum_{i=1}^k\sum_{j=1}^d\langle q_i,e_j\rangle\langle e_j,Cq_i\rangle\\
&=\sum_{i,j}\lambda_j|\langle e_j,q_i\rangle|^2=\sum_{j=1}^d\lambda_j\alpha_j^2
\end{align} where $0\le\alpha_j^2=\sum_i|\langle e_j,q_i\rangle|^2\le\|e_j\|^2=1$ and $\sum_{j=1}^d\alpha_j^2=\sum_{i,j}|\langle e_j,q_i\rangle|^2=\sum_{i=1}^k\|q_i\|^2=k$.

It then follows that the maximum is achieved at $\lambda_1+\cdots+\lambda_k$ with $q_i=e_i$.


答:
Just to say, Linearity of expectation works well here.

The probability that a given chamber is non-empty is $$p=1-\left(\frac {11}{12}\right)^5=\frac {87781}{248832}$$.

As there are $12$ chambers, the answer is then $$12p=12\times \frac {87781}{248832}=\boxed {\frac {87781}{20736}}$$

Title: Calculating expected value of non-empty chambers. What is wrong in my solution?

Body:
Instering $5$ different balls to $12$  different chambers, all the options are equally probabable. Let $X$ be the number of non-empty chambers, calculate $\mathbb{E}[X]$

I know that $\mathbb{E}(X)=\sum_{t \in R_{X}} t \cdot \mathbb{P}(X=t)$ so I just need to calculate $\mathbb{P}(X=t)$ for every $1\leq t \leq 5$
$$\mathbb{P}(X=1)= \frac{1}{12^4}$$
$$\mathbb{P}(X=2)= \frac{11 \cdot 2^3}{12^4}$$
$$\mathbb{P}(X=3)= \frac{11\cdot 10\cdot 3^2}{12^4}$$
$$\mathbb{P}(X=4)= \frac{11\cdot 10 \cdot 9 \cdot4}{12^4}$$
$$\mathbb{P}(X=5)= \frac{11\cdot 10 \cdot 9 \cdot8}{12^4}$$

now I just substitute this values in the expression $$\mathbb{E}(X)=\sum_{t \in R_{X}} t \cdot \mathbb{P}(X=t)$$ but I am not getting the right answer. I assume I have mistake in develop the expressions above. The options are:

A. $\displaystyle \frac{161051}{20736}$

B. $\displaystyle \frac{161051}{248832}$

C. $\displaystyle \frac{87781}{20736}$

D. $\displaystyle \frac{87781}{248832}$


问:
Why is it important to have a discrepancy between image and codomain?
A function $f:\mathbb{R}\rightarrow \mathbb{R}$ given by $f(x)=x^2$ has $\mathbb{R}_{\geq0}$ as its image and $\mathbb{R}$ as its codomain.

What's the need for this discrepancy? Why don't we just write $f:\mathbb{R}\rightarrow \mathbb{R}_{\geq0}$?

I believe the reason for this is that there may be some functions in which stating the image this way may be impractical - if this hypothesis is true, what is this class of functions? If yes or no, is there any other reason for this?

答: You cannot speak about surjectivity (that is, whether it is onto) otherwise. If we would define the codomain of every function to be its image, then every function would be surjective.</p>


问:
$\sum_{n=0}^\infty \frac{1}{(2n)!}=\cosh(1)$
Is there any way to show that $$\sum_{n=0}^\infty \frac{1}{(2n)!}=\cosh(1) = \frac{1+e^2}{2e}$$ knowing that $$\sum_{n=0}^\infty \frac{1}{n!}=e$$
I guess that we can also show that $\sum_{n=0}^\infty \frac{1}{(2n-1)!}=\sinh(1) $ but I have no clue of how to get rid of the "2" in the factorial...

答:
Let $\sum_{n=0}^\infty \frac{1}{n!} = e$, and $\sum_{n=0}^\infty \frac{(-1)^n}{n!} = x$.
I claim that $x = 1/e$.  Since the series converge absolutely, we can rearrange

$$ \eqalign{e x &= \sum_{n=0}^\infty \sum_{m=0}^\infty \frac{1}{n!} \frac{(-1)^m}{m!}\cr
&= \sum_{k=0}^\infty \sum_{n=0}^k \frac{1}{n!} \frac{(-1)^{k-n}}{(k-n)!}\cr
&= \sum_{k=0}^\infty \frac{1}{k!} \sum_{n=0}^k  {k \choose n} (-1)^{k-n}\cr
&= \sum_{k=0}^\infty \frac{1}{k!} (1-1)^k}$$
where the last equality uses the binomial theorem.  But $(1-1)^k = 0^k = 1$ for $k=0$
(check the sum explicitly for the case $k=0$ if you're uncomfortable with this)
and $0$ for $k > 0$, so we conclude that $ex = 1$.

And now, as others have mentioned,
$$\sum_{n=0}^\infty \frac{1}{(2n)!} = \frac{1}{2} \sum_{n=0}^\infty \frac{1 + (-1)^n}{n!} = \frac{e + 1/e}{2} = \cosh(1)$$


问:
Find the remainder using Fermat's little theorem when $5^{119}$ is divided by $59$.

Find the remainder using Fermat's little theorem when $5^{119}$ is divided by $59$.

Fermat's little theorem states that if $p$ is prime and $\operatorname{gcd}(a,p)=1$,then $a^{p-1} -1$ is a multiple of $p$.

For example, $p=5,a=3$. From the theorem, $3^5-1 -1$ is a multiple of $5$ i.e $80$ is a multiple of $5$.

Similarly, I need to find the remainder  when $5^{119}$ is divided by $59$.

My approach:

Using theorem I solve:

$5^{119-1} -1=5^{118} - 1 \Rightarrow 5^{118}=59k+1$, where $k$ is a natural number.

How do I proceed?

答: By FLT, $5^{58} \equiv 1 \pmod{59}$. Therefore, $(5^{58})^2 \equiv 1\pmod{59}$. We now need to compute $5^3 \pmod{59}$ which is a small computation that results in a remainder of $7$.


问:
If we have a congruence a≡b (mod m), does it follow that a≡b(mod prime factor of m)
Consider a≡b (mod m)
By the divison lemma, a = km+r (0<r<m)

Consider a≡b (mod p, a prime factor of m)

By the division lemma, a = gp + r' (0<r'<p)

```<code>m = px (as a prime factor of m)

gp + r' = km + r
((gm)/x) + r' = km + r
m((g/x)-k) = r - r'
</code>```

Now if the remainders were the same, then (g/x)-k = 0.
I'm not sure how to prove this, or where to go from here..

答:
The answer to the title question is yes.

$a\equiv b\pmod m\iff a-b=km$ for some $k\in\mathbb Z.$

Now if $m=pq$ for some $q\in\mathbb Z$, then $a-b=kqp=jp$ for some $j=kq\in\mathbb Z$,

so $a\equiv b\pmod p$.


问:
Find the remainder when $45!$ is divided by $47$?

Find the remainder when $45!$ is divided by $47$?

My approach

I am using Wilson's theorem to solve the problem.

I reduced the expression into ($47$-$1$-$1$)!/$47!$=$(47$-$1$)/$47$!-$1$/$47!$=-$1$-$1$=-$2$

Am I right in my approach.Please correct me if I am wrong?

Please correct me how to approach towards the problem.

Body:
By Wilson's Theorem: 46!≡-1(mod 47)≡46(mod 47).

46!≡46 x 45!≡46(mod 47).

Thus, 45!≡1(mod 47)


问:
show that f : [a;b] $\rightarrow \mathbb{R}$ , an increasing function such that Im f = [f(a);f(b)] is continuous
As said in the title I want to show that  f : [a;b] $\rightarrow \mathbb{R}$ an increasing function such that Im f = [f(a);f(b)] is continuous.
In order to do that I proceed by the absurd assuming that f is not continuous on a point c $\in$ [a;b] and  then I defined :

B : = f(a) (if c=a) , B= $lim_{x \rightarrow c^-}$ f(x) = $sup_{x \in [a;b]}$ f(x) (if c $\neq$ a )

and C :=  f(b) (if c=b) , C= $lim_{x \rightarrow c^+}$ f(x) = $inf_{x \in [a;b]}$ f(x) (if c $\neq$ b )

as f is increasing we have f(a) $\leq$ B < C $\leq$ f(b).
But then, I have a hard time expressing the contradiction, I see that there is a problem with ]B;C[ $\cap$ Im f , but not clearly why.

Thank you by advance for your help!

答:
Let's set aside the extremes of the interval, for the moment. As you say, if $c\in(a,b)$, then both the limits from the left and from the right exist and
$$
\lim_{x\to c^-}f(x)=\sup\{f(x):a<x<c\},\qquad
\lim_{x\to c^+}f(x)=\inf\{f(x):c<x<b\}
$$
Also, since $f$ is increasing, we have
$$
\lim_{x\to c^-}f(x)\le f(c)\le \lim_{x\to c^+}f(x)
$$
because $f(c)$ is certainly an upper bound of $\{f(x):a\le x<c\}$ and a lower bound of $\{f(x):c<x\le b\}$.

Suppose $f$ is not continuous at $c$. Then one of the limits above is unequal to $f(c)$. Suppose it is the limit from the left. Then we have
$$
\lim_{x\to c^-}f(x)<f(c)
$$
Take $y$ such that $\lim_{x\to c^-}f(x)<y<f(c)$. We want to prove that $y$ is not in the range of $f$, after noticing that $f(a)<y<f(b)$, so $y\in[f(a),f(b)]$, which would lead to the desired contradiction.

If $y=f(r)$, for some $r\in[a,b]$, then $r\ne c$, because $f(r)=y<f(c)$. Hence we have either $a \le r<c$ or $c<r \le b$. In the first case $f(r)\in\{f(x):a\le x<c\}$, so $y\le\lim_{x\to c^-}f(x)$: a contradiction. In the second case $f(c)<f(r)=y$: a contradiction.

Analogously in the case $f(c)<\lim_{x\to c^+}f(x)$. Fix yourself the cases of $a$ and $b$.


问:
Checking exercise on uniform convergence and differentiation
I have solved the following exercise and I would like to know if there are any mistakes. Thank you.

Consider the sequence of functions defined by $g_n(x)=\frac{x^n}{n}$.

(a) Show $(g_n)$ converges uniformly on $[0,1]$ and find $g=\lim g_n$. Show that $g$ is differentiable and compute $g'(x)$ for all $x\in [0,1]$.

(b) Now, show that $(g_n')$ converges on $[0,1]$. Is the convergence uniform? Set $h=\lim g_n'(x)$ and compare $h$ and $g'$. Are they the same?

My solution:

(a) Let $\varepsilon>0$: then $|g_n(x)-0|=|\frac{x^n}{n}|\leq\frac{1}{n}$ for $x\in [0,1]$ so it suffices to choose $N>\frac{1}{\varepsilon}$ to guarantee that $|g_n(x)-0|<\varepsilon$ for all $n\geq N$ and $x\in [0,1]$ so $(g_n)$ converges uniformly to $0\equiv g(x)$ which, being a constant function, is differentiable and has $g'(x)\equiv 0$ too.

(b) $g_n'(x)=x^{n-1}$ converges pointwise to $0$ for $x\in [0,1)$ and to $1$ for $x=1$, so $h(x)=\lim g'_n(x)=\begin{cases}
                                0 & \text{if $x\in [0,1)$}\\
                                1 & \text{if $x=1$}
\end{cases}\neq g'(x)$ and the convergence is not uniform: by the Continuous Limit Theorem) since $(g'_n)$ is a sequence of continuous functions, if it converged uniformly its limit $h$ would be continuous too and that is not the case.

答: Yes, that's right. It's well written too. However, I think it's clearer for (a) to let $\epsilon > 0$ and then choose $N > 1/\epsilon$ and then proceed as you have.


问:
Inverse of Multivariable Functions on Manifolds
Consider the unit circle, $S=${$(x,y) | x^2 + y^2 =1$} with the stereographic charts $(U_N,\phi_N)$, $(U_S,\phi_S)$

i.e. $U_N=S$ \ {$(0,1)$}, $\phi_N((x,y))=\frac{x}{1-y}$

$U_S=S$ \ {$(0,-1)$}, $\phi_S((x,y))=\frac{x}{1+y}$

How would I find ${\phi_N}^{-1}$ and ${\phi_S}^{-1}$?
These functions are bijective on their domains ($U_N$ and $U_S$ respectively) so their inverses exist.

For ${\phi_N}^{-1}$, I have considered a point $z$ in $\phi_N(U_N)$ and set $\frac{xy}{1-y}=z$. I believe I need to write both x and y in terms of $z$ to get something like ${\phi_N}^{-1}(z)=(f(z), g(z))$ where I need to find $f(z)$ and $g(z)$. And then similarly for $\phi_S$.

How would I do this? Thank you for any help!

答:
Let $\phi_N((x,y))=z=\frac{x}{1-y}$

Then $x=z(1-y)$

Substituting this into $x^2+y^2=1$ we have $z^2{(1-y)}^2+y^2=1$

Then, solving this for $y$, (I used the quadratic formula) $$(1+z^2)y^2-2z^2y+z^2-1=0$$
$$y=\frac{2z^2\pm\sqrt{4z^4-4(1+z^2)(z^2-1)}}{2(1+z^2)}$$
$$y=\frac{2z^2\pm2\sqrt{z^4-(z^4-1)}}{2(1+z^2)}$$
$$y=\frac{z^2\pm1}{1+z^2}$$

Now, if we had $y=\frac{z^2+1}{z^2+1}=1$, then this is not actually in the domain of $\phi_N$, since $(x,1)\notin$ $U_N$ for any x.

So we must have $$y=\frac{z^2-1}{z^2+1}$$

Then, from $x=z(1-y)$, we can just substitute our expression for y in to get
$$x=\frac{2z}{z^2+1}$$

Thus, $${\phi_N}^{-1}(z)=(\frac{2z}{z^2+1}, \frac{z^2-1}{z^2+1})$$

Similar procedure for finding ${\phi_S}^{-1}$


问:
Show that $f'(x) \simeq \frac{1}{12h} [-f(x+2h) + 8f(x+h) -8f(x-h) + f(x-2h)]$?
How would you show that $f'(x) \simeq \frac{1}{12h} [-f(x+2h) + 8f(x+h) -8f(x-h) + f(x-2h)]$?

Here is what I have tried:

It would make sense to me that Richardson extrapolation should/could be used here because the question came up in a chapter about this topic - although it does not have to be. Anyway, so I thought pretty hard but the closest approximation I could come up with was $f'(x) \simeq \frac{1}{12h} [-2f(x+2h) + 8f(x+h) -8f(x-h) + 2f(x-2h)]$. This was derived as follows:

$$
D(n,0) = \frac{1}{2h} [f(x+h/2^n)-f(x-h/2^n)]\\
D(n,k) = \frac{4^k}{4^k-1} D(n,k-1) \frac{1}{4^k-1} D(n-1,k-1)\\
D(0,1) = \frac{4^1}{4^1 - 1} D(0,0) - \frac{1}{4^1-1} D(-1, 0)\\
\Rightarrow D(0,1) = \frac{4}{3} \frac{1}{2h} [f(x+h)-f(x-h)] - \frac{1}{3} \frac{1}{2h} [f(x+2h)-f(x-2h)]\\
= \frac{4}{6h} [f(x+h)-f(x-h)] - \frac{1}{6h} [f(x+2h)-f(x-2h)]\\
= \frac{1}{12h} [-2f(x+2h) + 8f(x+h)-8f(x-h) + 2f(x-2h)]
$$

I was about to get happy but realized that even though it was close, it was not the requested result.

How can I derive $f'(x) \simeq \frac{1}{12h} [-f(x+2h) + 8f(x+h) -8f(x-h) + f(x-2h)]$?

答:
It results from a short computation with Taylor-Young's formula:  $\;f(x+h)=f(x)+f'(x)h+o(h).$
Therefore, using the basic rules of asymptotic calculus,
\begin{align}
&-f(x+2h) + 8f(x+h) -8f(x-h) + f(x-2h)=\\
={}&-f(x)-f'(x)\bigl(2h\bigr)+8f(x)+8f'(x)h -8f(x)-8f'(x)\bigl(-h\bigr)+f(x)+f'(x)\bigl(-2h\bigr)+o(h)\\={}&(-1+8-8+1)f(x)+(-2+8+8-2)f'(x)h+o(h) = 12f'(x)h+o(h)
\end{align}
and ultimately
$$\frac{1}{12h} [-f(x+2h) + 8f(x+h) -8f(x-h) + f(x-2h)]=\frac{12f'(x)h+o(1)}{12h}=f'(x)+o(1).$$


答:
You are undercounting. I presume the idea with:

$$\mathbb P(X=k)=\frac{12\cdot 11\cdot\ldots\cdot (12-k+1)\cdot k^{5-k}}{12^5}$$

is this: the first ball can go into one of $12$ chambers, the second goes into one of $11$ remaining etc. - until we fill the $k$ chambers - and then the remaining $5-k$ balls go freely into those already defined $k$ chambers.

This neglects the possibility that the first $k$ balls don't all go into different chambers. For example, for $k=2$, you can have the second ball go into the same chamber as the first - and only the third ball goes to a different chamber. This event is not counted.

As a result, your probabilities are smaller than needed and don't add up to $1$.


问:
Proving or disproving a statement about continuity and limits

So I've spent a few hours trying to find a counter example to this statement, and then gave up and spent additional few hours trying to prove it and Ive finally became frustrated with this problem. :)
I seem to get stuck in the scenario where $f\left(\frac{1}{x}\right)$ < 0, I'm just unable to find an epsilon that will satisfy all the conditions.. plus I'm not even sure if the statement is true or false anymore..

答:
Take the limit in your inequality as $x \to 1$, which gives
$$
\lim_{x \to 1} f(x) f(1/x) = f(1)^2 \leq 0,
$$
where the equality uses the continuity of $f$ at $1$. Since a square is nonnegative, the only possibility that remains is $f(1) = 0$.


答:
Take $ (x_n) \to 1 $. Can you find the limit of $ \left( \dfrac{1}{x_n} \right) $. Now assume $ f(1) \ne 0 $, so without loss of generality we can claim $ f(1) > 0 $.
Try reaching a contradiction using $ f(x_n) $ and $ f(\frac{1}{x_n}) $.

Title: Proving or disproving a statement about continuity and limits

Body:
So I've spent a few hours trying to find a counter example to this statement, and then gave up and spent additional few hours trying to prove it and Ive finally became frustrated with this problem. :)
I seem to get stuck in the scenario where $f\left(\frac{1}{x}\right)$ < 0, I'm just unable to find an epsilon that will satisfy all the conditions.. plus I'm not even sure if the statement is true or false anymore..


问:
Calculate the new average using standard deviation?
This is for a programming exercise. I have:

the last average value

the last standard deviation

the total number of values

I need to be able to add a new value to my average without knowing the preceding ones but I can't figure out how to do this.

Can anybody help me on this?

答:
Hint:  If you know the number of preceding values and also their average, then you know their sum.  Then you can calculate the new sum.

(Note that the standard deviation is irrelevant to all of this.)


Title: Remainder when $\frac{f(x)}{x^3+4x^2+x-6}$ and given two other remainders

Body:
Determine the remainder $r$ when $$\frac{f(x)}{x^3+4x^2+x-6}\rightarrow remainder \ r$$.

The following is known $$\frac{f(x)}{x^2+2x-3}\rightarrow remainder\ (x+2)\\
\frac{f(x)}{x+2}\rightarrow remainder\ (1)\\$$

My work:

$$(x^3+4x^2+x-6)=(x^2+2x-3)(x+2)\\(x^2+2x-3)=(x-1)(x+3)\\
(x+2)\\
f(x)=(x^3+4x^2+x-6)g(x)+(Ax+B)\\
f(1)=A+B=x+2\\
f(-3)=-3A+B=x+2\\
f(-2)=-2A+B=1\\
\left\{\begin{matrix}
 A+B=x+2& x=-1\\
 -3A+B=x+2& B=1\\
 -2A+B=1& A=0
\end{matrix}\right.\\
r=(-1)(0)+1=1$$

Can the remainder really be $r=1$? My intuition says it's wrong.

EDIT:
$$f(x)=(x^3+4x^2+x-6)g(x)+(Ax^2+Bx+C)\\
f(1)=A+B+C=x+2\\
f(-3)=9A-3B+C=x+2\\
f(-2)=4A-2B+C=1\\
\left\{\begin{matrix}
 A+B+C=x+2& A=\frac{x+3}{6}\\
 9A-3B+C=x+2& B=\frac{3x+5}{6}\\
4A-2B+C=1 &C=\frac{4-2x}{6}
\end{matrix}\right.\\
r=\frac{x+3}{6}x^2+ \frac{3x+5}{6}x+\frac{4-2x}{6}=\frac{x^3+6x^2+3x+9}{6}$$

Body:
$$f(x)=\left(x^3+4 x^2+x-6\right) q(x)+a x^2+b x+c=\\=(x^2+2 x-3) (x+2)  q(x)+a x^2+b x+c\tag{1}$$
$$r(x)=a x^2+b x+c$$
We know that
$$\frac{f(x)}{x+2}$$
gives remainder $r=1$, which means that $f(-2)=1$

then we know that
$$\frac{f(x)}{x^2+2 x-3}$$
gives remainder $r=x+2$, which means that
$$f(x)=p(x)(x^2+2x-3)+x+2=p(x)(x-1)(x+3)+x+2$$
so we have $f(1)=3$ and $f(-3)=-1$

Now back to
$$f(x)=\left(x^3+4 x^2+x-6\right) q(x)+a x^2+b x+c=(x-1) (x+2) (x+3)q(x) +ax^2+bx+c$$
we plug $x=-2;\;x=1;\;x=-3$ and get
$$
\begin{cases}
4 a-2 b+c=1\\
a+b+c=3\\
9 a-3 b+c=-1\\
\end{cases}
$$
solution should be $$\left(a= -\frac{1}{3},b= \frac{1}{3},c= 3\right)$$

Remainder should be $$r(x)=-\frac{x^2}{3}+\frac{x}{3}+3$$


答:
By Taylor's theorem, if $f$ is nice, then for fixed $x$, we can write
$$f(x+h)=f(x)+f'(x)h+f''(x)h^2/2 +h'''(x)h^3/6 +f^{(4)}(x)h^4/4!+o(h^4).$$ This yields that $$(f(x+h)-f(x-h))/(2h)=f'(x)+f'''(x)h^2/6+O(h^4).$$

For ease of notation, let us write $g(h)=(f(x+h)-f(x-h))/(2h)$. For any choice of $a_i,b_i$ such that $\sum a_i=1$, we have that $\sum a_i g(b_ih)=f'(x)+h^2f'''(x)/6\sum a_i b_i^2+O(h^4)$, and the question is whether we can find choices that cause the second term to cancel.

A natural choice of $b_i$ is $b_1=1, b_2=2$, in which case we get the system of equations $a_1+a_2=1, a_1+4a_2=0$, which has solution $a_1=4/3$, $a_2=-1/3$.  Rearranging yields your approximation.

For another approach that invokes Richardson extrapolation, we start with $g(h)=f'(x)+O(h^2)$.  Then, using the formula from the Wikipedia page with $t=1/2$, we get that $((1/4)g(2h)-g(h))/(1/4-1)=(4g(h)-g(2h))/3=f'(x)+O(h^3)$.  However, because $g(h)$ is an even function, if it is $O(h^3)$ then it is $O(h^4)$.  Simplifying the expression, we get
$$(4g(h)-g(2h))/3=8\frac{f(x+h)-f(x-h)}{12h}-\frac{f(x+2h)-f(x-2h)}{12h}$$

Title: Show that $f'(x) \simeq \frac{1}{12h} [-f(x+2h) + 8f(x+h) -8f(x-h) + f(x-2h)]$?

Body:
How would you show that $f'(x) \simeq \frac{1}{12h} [-f(x+2h) + 8f(x+h) -8f(x-h) + f(x-2h)]$?

Here is what I have tried:

It would make sense to me that Richardson extrapolation should/could be used here because the question came up in a chapter about this topic - although it does not have to be. Anyway, so I thought pretty hard but the closest approximation I could come up with was $f'(x) \simeq \frac{1}{12h} [-2f(x+2h) + 8f(x+h) -8f(x-h) + 2f(x-2h)]$. This was derived as follows:

$$
D(n,0) = \frac{1}{2h} [f(x+h/2^n)-f(x-h/2^n)]\\
D(n,k) = \frac{4^k}{4^k-1} D(n,k-1) \frac{1}{4^k-1} D(n-1,k-1)\\
D(0,1) = \frac{4^1}{4^1 - 1} D(0,0) - \frac{1}{4^1-1} D(-1, 0)\\
\Rightarrow D(0,1) = \frac{4}{3} \frac{1}{2h} [f(x+h)-f(x-h)] - \frac{1}{3} \frac{1}{2h} [f(x+2h)-f(x-2h)]\\
= \frac{4}{6h} [f(x+h)-f(x-h)] - \frac{1}{6h} [f(x+2h)-f(x-2h)]\\
= \frac{1}{12h} [-2f(x+2h) + 8f(x+h)-8f(x-h) + 2f(x-2h)]
$$

I was about to get happy but realized that even though it was close, it was not the requested result.

How can I derive $f'(x) \simeq \frac{1}{12h} [-f(x+2h) + 8f(x+h) -8f(x-h) + f(x-2h)]$?


问:
Count the anagrams from ARARAQUARA, in such a way that there are not 2 As adjacent?

How many anagrams can be made from the word ARARAQUARA, in such a way that  there are not 2 As adjacent?

My proposed solution: There are 10 letters, 5 As, 3 Rs,1 Q and 1 U. The general approach will be positioning the 5 As with spaces separating them (or before or after them) and counting the ways to fill these spaces with one or two letters.

I divided the problem in 2 cases:

(a) there is only 1 letter different from A between A's. There are two cases here, starting with non-A, or finishing with non-A. Total number of possibilities for the 2 cases, considering the 3 repeated Rs:
$$2\times \frac{5!}{3!}=40.$$

(b) there is one pair of non-A letters between 2 A's (only one pair is possible). Cases for the pairs (considering order): RR, RQ, QR, RU,UR, QU, UQ.

So the anagram possibilities for each pair is given by:
RR - $4!=24$ possibilities;
RQ - $4!/2!=12$ possibilities;
QR - $4!/2!=12$ possibilities;
UR - $4!/2!=12$ possibilities;
RU - $4!/2!=12$ possibilities;
UQ - $4!/3!=4$ possibilities; and,
QU - $4!/3!=4$ possibilities.

So the total number of anagrams considering restrictions is: 40+24+412+24=120.

My problem: the answer given is 128. Am I missing cases? or the answer is wrong?

答:
You can arrange the other letters $RRRQU$ in $\frac{5!}{3!}=20$ ways, and then you can insert $AAAAAX$ (where $X$ means no $A$ is inserted) into the six spaces before between and after the these non-$A$s in 6 ways.

So the total is $120$ as you suspect


问:
Remainder when $26^{3008} + 3008^{26}$ is divided by $4$
I want to find the  Remainder when $26^{3008} + 3008^{26}$ is divided by $4$.

What should I do?

Even though I've included the tag modular arithmetic I've very limited knowledge about it.

How should I approach this problem?

答: Both 26 and 3008 contain factors of 2, so if they are raised to any power they will be divisible by 4. Thus, the remainder is 0.</p>


答:
Your answer is correct.  We will confirm your answer with a different approach.

We first arrange the five letters R, R, R, Q, U, then insert the five As in the six spaces this creates so that no two As are adjacent.

Arrangements of R, R, R, Q, U:  We have five positions to fill.  There are
$$\binom{5}{3}2!$$
arrangements of the letters R, R, R, Q, U since we must select three of the five positions for the three Rs, then arrange the distinct letters Q and U in the remaining two positions.

An arrangement of the letters R, R, R, Q, U creates six spaces in which we can place the As, four between successive letters and two at the ends of the row.
$$\square L \square L \square L \square L \square L \square$$
To ensure that no two of the As are adjacent, we choose five of these spaces in which to place an A, which can be done in
$$\binom{6}{5}$$
ways.

Hence, the number of anagrams of ARARAQUARA in which no two As are adjacent is
$$\binom{5}{3}2!\binom{6}{5} = 120$$
as you found.

Title: Count the anagrams from ARARAQUARA, in such a way that there are not 2 As adjacent?

Body:
How many anagrams can be made from the word ARARAQUARA, in such a way that  there are not 2 As adjacent?

My proposed solution: There are 10 letters, 5 As, 3 Rs,1 Q and 1 U. The general approach will be positioning the 5 As with spaces separating them (or before or after them) and counting the ways to fill these spaces with one or two letters.

I divided the problem in 2 cases:

(a) there is only 1 letter different from A between A's. There are two cases here, starting with non-A, or finishing with non-A. Total number of possibilities for the 2 cases, considering the 3 repeated Rs:
$$2\times \frac{5!}{3!}=40.$$

(b) there is one pair of non-A letters between 2 A's (only one pair is possible). Cases for the pairs (considering order): RR, RQ, QR, RU,UR, QU, UQ.

So the anagram possibilities for each pair is given by:
RR - $4!=24$ possibilities;
RQ - $4!/2!=12$ possibilities;
QR - $4!/2!=12$ possibilities;
UR - $4!/2!=12$ possibilities;
RU - $4!/2!=12$ possibilities;
UQ - $4!/3!=4$ possibilities; and,
QU - $4!/3!=4$ possibilities.

So the total number of anagrams considering restrictions is: 40+24+412+24=120.

My problem: the answer given is 128. Am I missing cases? or the answer is wrong?


Body:
Since:

$f(x) \equiv x+2 \ (mod \ x^2+2x-3)$

$f(x) \equiv 1 \ (mod \ x+2)$

$x^2+2x-3 \equiv -3 \ (mod \ x+2)$

We have that:

$f(x)=(-1/3x^2-2/3x+1)+(x+2)+k \ (x^3+4^2x+x-6)$

so the remainder is: $(-1/3x^2-2/3x+1)+(x+2)$


问:
Finding a nice solution to $\sum_{a,b,c\ge 1, a+b+c=9}\frac{9!}{a!b!c!}=18150$
I am trying to find a nice way to solve for
$$\sum_{a,b,c\ge 1, a+b+c=9}\frac{9!}{a!b!c!}=18150$$
I managed to solved it (and  verified by computer) by doing manually (on paper) on $7$ cases and got a "nice" answer of $216+1512+3024+2268+1890+7560+1680=18150=2\cdot 3\cdot5^2 \cdot11^2$.

答: Given $a,b,c$, each summand can be thought of as the number of ways to fill $9$ slots with $a$ blue marbles, $b$ red marbles, and $c$ yellow marbles.  Therefore, the sum is the total number of ways to fill $9$ slots with blue, red, and yellow marbles assuming at least one of each.  You can solve this with the inclusion/exclusion principle as $$3^9-3\cdot2^9+3\cdot1^9=18150$$


问:
Problem in proof that $ \lim_{x\to0}\frac{\sin(x)}{x}$=$1$
I'm having some confusion on understanding the proof that

$$\lim_{x\to 0}\frac{\sin x}{x}=1.$$

In the proof on khanacademy and on other various sources we always end up with the inequality
$$\cos(x)\le\frac{\sin(x)}{x}\le1\
$$
And then we apply the squeeze theorem.

However in the proof we always say that it is valid for any non zero x however if this is true how can we ever say that the inequality is less than or equal to each other my question is why isn't the inequality this instead

$$\cos(x)<\frac{\sin(x)}{x}<1
$$
No one seems to explain how they make the less than or equal to statement true so which one is correct?

答: $a<b$ is obviously not the same as $a \leq b$.  However, if we know that $a<b$, then it is of course true that $a \leq b$.


答:
$$a\le b$$ means $$a<b\text{ or }a=b.$$

It suffices that one of the conditions be true for the whole expression to be true.

You seem to interpret that $a\ne b$ invalidates it, but this is wrong.

Title: Problem in proof that $ \lim_{x\to0}\frac{\sin(x)}{x}$=$1$

Body:
I'm having some confusion on understanding the proof that

$$\lim_{x\to 0}\frac{\sin x}{x}=1.$$

In the proof on khanacademy and on other various sources we always end up with the inequality
$$\cos(x)\le\frac{\sin(x)}{x}\le1\
$$
And then we apply the squeeze theorem.

However in the proof we always say that it is valid for any non zero x however if this is true how can we ever say that the inequality is less than or equal to each other my question is why isn't the inequality this instead

$$\cos(x)<\frac{\sin(x)}{x}<1
$$
No one seems to explain how they make the less than or equal to statement true so which one is correct?


问:
Compute $\sup_{n\in\mathbb N}\mathbb ES_n$ and $\mathbb E\sup_{n\in\mathbb N}S_n$, where $(S_n)$ a Markov chain.
Let $(S_n)$ a Markov chain on $\mathbb N$ such that $S_0=1$ almost surely and $$\mathbb P(S_{i+1}=k\mid S_i=j)=p(j,k)=\begin{cases}\frac{1}{2}&k\in\{j-1,j+1\}\text{ and }j\neq 0\\ 1&k=j=0\\0&\text{otherwise.}\end{cases}.$$

Prove $\sup_{n\in\mathbb N}\mathbb E( S_n)<\infty $ and $\mathbb E(\sup_{n\in\mathbb N}S_n)=\infty $.

I have some difficulties to do it.

What I tried for the first one is :

$$\mathbb E(S_n)=\sum_{k=1}^\infty k\mathbb P(S_n=k)=\sum_{k=1}^{n+1}k\mathbb P(S_n=k),$$

because after time $n$, the process $S_n$ is at state $n+1$ at most. Then I tried to compute $\mathbb P(S_n=k)$, and I have difficulties with that. Let denote $P_p(i)=\mathbb P\{S_p=i\}$. What I see is
\begin{align*}
\mathbb P(S_n=k)&=p(k-1,k)P_{n-1}(k-1)+p(k+1,k)P_{n-1}(k+1)\\
&=\frac{1}{2}(P_{n-1}(k-1)+P_{n-1}(k+1))\\
&=\frac{1}{2}(p(k-2,k-1)P_{n-2}(k-2)+p(k,k-1)P_{n-2}(k)+p(k,k+1)P_{n-2}(k)+p(k+2,k+1)P_{n-2}(k+2))\\
&=\frac{1}{2^2}(P_{n-2}(k-2)+2P_{n-2}(k)+P_{n-2}(k+2))
\end{align*}

but when I continue, things become more and more complicated. So, I guess there is a trick. Any idea ?

For the other one, I don't really know. What I tried is to compute $\mathbb P(\sup_{n\in\mathbb N}S_n\geq k)$, and then use the fact that $\mathbb E[\sup_{n\in\mathbb N}S_n]=\sum_{k=0}^\infty \mathbb P(\sup_{n\in\mathbb N}S_n\geq k)$, but I couldn't find $\mathbb P(\sup_{n\in\mathbb N}S_n\geq k)=\mathbb P\{\exists m\leq n: S_m=k\}$.

Any idea ?

答:
You need to go step-by-step. Specifically:

Observe that $S_{k+1} = S_k + {\bf 1}_{\{S_k >0\}} X_{k+1}$, where $X_{k+1}$ is $1$ or $-1$ w.p. $1/2$ each, and is independent of $S_0,\dots,S_k$. It therefore follows that $E[S_{k+1}] =E[S_k]  + P(S_k>0)*0 = E[S_k]$. Therefore $E[S_k]$. Since we assume $E[S_0]=0$, it follows that $E[S_k]=0$ for all $k\ge 0$.

Now look at the partial sums of the $X_k$'s. Let $1+Y_n = \sum_{k=1}^n X_k$. By construction, $Y_n=S_n$ for $n=1,2,\dots$, until the first time $Y$ hits zero, from  which time $S$ remains at zero.  Because $Y$ is simple symmetric random walk on ${\mathbb Z}$ we know this time is finite a.s. Let $M =\sup S_n$. Then $0\le S_n\le M$ for all $n \ge 0$, and, as argued above, $\lim_{n\to\infty} S_n = 0$ a.s. Therefore, if $E[M]<\infty$, it follows from dominated convergence that $\lim_{n\to\infty} E[S_n]=E[ 0] =0$. This contradicts the first part, as $E[S_n]=1$ for all $n\ge 0$.

Hope this helps!


问:
Finding the steady state error in the Laplace domain
I have the following block diagram:

Now I like to find the steady state error for theta_ref being a step input and for several values of n, Td, K1 and K2.

For the moment we can assume all gains are simple scalars, so no vectors and matrices involved.

I like to find an expression for e(s) so that I can apply Laplace's final value theorem.

I came up with:

$e(s) = \theta_{ref}(s) - \theta(s)$

$\theta(s) = (e(s)K_2-n\cdot M)N^{-1}....$

But I don't know how to handle the inner loop.

I have Matlab / Simulink on my computer, so if I can obtain steady state error information using this software it is find with me.

答:
For every integrator block (you have two), you have one state ($\omega$ and $\theta$). Then you can find the relations between all the states, and construct the matrices for the state space representations. From A, B, C, D, you can find the transfer function for your system. If it is type 0, you will have a steady state error for step inputs, otherwise the error will be zero.

For omega, just starting at the right of the integrator (which correspond to $\omega$), following the inner loop and finishing at the left of the integrator (which corresponds to $\dot\omega$).

$\dot{\omega} = (\omega_r - \omega)K_1 + T_dJ^{-1}$.

Do the same for $\dot\theta$ and construct the matrices A and B of the whole system. Just checking out your system, $D = 0$ (there is not a feed-forward component) and $y = Cx = [1 \quad0][\theta \quad \omega]^T$ (the output is just $\theta$).


问:
Continuous (Smooth) Fractal Zoom
This is my first ever post, I made an account to ask this question. Could have put it on a code forum but thought this challenge would be better suited to a mathematician with a programming foundation.

I'm looking for an implementation of a fractal rendering program that efficiently allows for smooth zooming. I imagine this would require some components of the frame (those already rendered that are still at pixel scale) to simply be scaled linearly in the frame, while new components (those either out of frame or less than pixel size) to be rendered dynamically.

This seems like an interesting problem in dynamic programming, if nothing else. I kind of hope someone can find an existing implementation and share it - if not I'd love some help in constructing one! Ideally python or Julia.

Thanks in advance

答:
I have used this link to write a script on python that generates images of Julia sets. Unfortunately, you cannot zoom in and have the image change.

I really like this algorithm because I find it super intuitive. Essentially, every pixel takes a complex numbered value, and you then apply the iterative function to each pixel. You can also choose the location of the image you are creating.

Here are some images I have made:

Here is a small snippet of code:

```<code>max_iter = 100

def mandelbrot(c):
    z=0
    n=0
    while abs(z)<=2 and n <= max_iter:
        z = z**2 + c
        n += 1
    return n

for a in range(5):
    for b in range(5):
        d = complex(a/10, b/10)
        print(d, mandelbrot(d))

from PIL import Image, ImageDraw

# Image size (pixels)
Width = 600
Height = 400

#Plot window: visible domain and range. Re and Im
RE_START = 1.4
RE_END = 1.6
IM_START = -0.1
IM_END = 0.1

#Making new image object
mandelbrot_graph = Image.new('RGB', (Width, Height), (0, 0, 0))
draw = ImageDraw.Draw(mandelbrot_graph)

for x in range(0,Width):
    for y in range(0,Height):
        # Convert pixel coordinate to complex number
        c = complex(RE_START + (x/Width) * (RE_END - RE_START), IM_START + (y/Height) * (IM_END - IM_START))
        num_it = mandelbrot(c)
        # The color depends on the number of iterations, Rgb scale which I do not know
        color = 255 - int(num_it * 255 / max_iter)
        # Plot the point
        draw.point([x, y], (color, color, color))

mandelbrot_graph.save('NEW.png', 'PNG')
mandelbrot_graph.show()
</code>```

Title: Continuous (Smooth) Fractal Zoom

Body:
I have used this link to write a script on python that generates images of Julia sets. Unfortunately, you cannot zoom in and have the image change.

I really like this algorithm because I find it super intuitive. Essentially, every pixel takes a complex numbered value, and you then apply the iterative function to each pixel. You can also choose the location of the image you are creating.

Here are some images I have made:

Here is a small snippet of code:

max_iter = 100

def mandelbrot(c):
    z=0
    n=0
    while abs(z)<=2 and n <= max_iter:
        z = z**2 + c
        n += 1
    return n

for a in range(5):
    for b in range(5):
        d = complex(a/10, b/10)
        print(d, mandelbrot(d))

from PIL import Image, ImageDraw

# Image size (pixels)
Width = 600
Height = 400

#Plot window: visible domain and range. Re and Im
RE_START = 1.4
RE_END = 1.6
IM_START = -0.1
IM_END = 0.1

#Making new image object
mandelbrot_graph = Image.new('RGB', (Width, Height), (0, 0, 0))
draw = ImageDraw.Draw(mandelbrot_graph)

for x in range(0,Width):
    for y in range(0,Height):
        # Convert pixel coordinate to complex number
        c = complex(RE_START + (x/Width) * (RE_END - RE_START), IM_START + (y/Height) * (IM_END - IM_START))
        num_it = mandelbrot(c)
        # The color depends on the number of iterations, Rgb scale which I do not know
        color = 255 - int(num_it * 255 / max_iter)
        # Plot the point
        draw.point([x, y], (color, color, color))

mandelbrot_graph.save('NEW.png', 'PNG')
mandelbrot_graph.show()


问:
What is the remainder of $314^{164}$ divided by 165?

What is the remainder of $314^{164}$ divided by 165?

Since 165 is not a prime, we cannot apply Fermat's Little Theorem directly. However since $165=3\times 5\times 11$, we could try to divide $314^{164}$ by each of the prime factors and hope things will work out.

After some calculations, I got:

$314^{164}\cong1(\mod 5)$

$314^{164}\cong1(\mod 3)$

$314^{164}\cong9(\mod 11)$

But then I don't see how to continue? A system of linear congruences reminds me of the Chinese Remainder Theorem though.

答: Since 314 is relatively prime to 165, we can apply Euler's Theorem. By Euler's Theorem, 314^(phi of 165)≡1(mod 165). Phi of 165=80, therefore, 314^80 are 1(mod 165). 3^160 is also  1(mod 165). Now we have to compute 314^4 (mod 165). 314^4 is equal to 2^4 x 157^4. 2^4=2^4 mod 165. 157≡-8(mod 165), so 157^4≡(-8)^4(mod 165)≡2^12 (mod 165). Thus, we need to find 2^4 x 2^12(mod 165), which is 2^16(mod 165). Some computation gives a quotient of 397 and a remainder of 31.


问:
Independent and uniformly distributed on $(\frac{1}{2},1]$
I have two random variables $X,Y$ which are independent and uniformly distributed on $(\frac{1}{2},1]$. Then I consider two more random variables, $D=|X-Y|$ and $Z=\log\frac{X}{Y}$. I would like to calculate both, the disitrbution functions $F_D(t), F_Z(t)$ and the the density functions $f_D(t),f_Z(t)$

To do that I think the first thing we need to do is to evaluate the density of the common distribution of $X$ and $Y$, but I do not know how to do that.

The only thing which is clear to me is the density and distribution function of $X$ and $Y$ because we know that they are uniform.

EDIT: Please read my own answer to this question. I need someone who can show me my claculation mistakes.

答:
Let's try for $D = |X-Y|$:
We have, for $t\geq 0$,
$$F_D(t) = P[D\leq t] = P[|X-Y|\leq t] = P[-t\leq X-Y \leq t] = P[-t+Y\leq X \leq t+Y] =\int_\mathbb{R}P[-t+y\leq X \leq t+y | Y=y]f_Y(y)dy =\int_\mathbb{R} P[-t+y\leq X \leq t+y]f_Y(y)dy= \\ = \int_\mathbb{R}\int_{-t+y}^{t+y} f_X(x)dx f_Y(y)dy= \dots$$
And you can calculate the rest using what is known about $X$ and $Y$. Note that we needed the independence for this calculation! Of course, $F_D(t) = 0$ for $t<0$. Now the density function:

$$f_D(t)=P[D=t]=P[|X-Y|=t]=\int\int_{\{(x,y);|x-y|=t\}}f_{XY}(x,y)dxdy = \\=\int\int_{\{(x,y);|x-y|=t\}}f_{X}(x)\cdot f_{Y}(y)dxdy = ...$$

And you can again calculate this. Note that we have used the independence again to write the joint density as the product of the densities.

You should be able to deal with $Z$ in an analogous fashion.


问:
How do I calculate the probability of drawing certain cards from a deck?
I have a deck of $40$ cards. They are equally numbered one to five. This means that there are $8$ ones, twos, threes, fours and fives. I will draw $5$ cards from the deck.

I want to find the probability that one of those cards is a three.

I want to find the probability that all five of the cards are threes.

How do I do this?

答:
The second is easier. How many possible ways are there to pick a group of $5$ cards from a set of $40$? How many of these groups are all threes?

For the first, the answer is $$5\times\frac{8}{40}\times\frac{32}{39}\times\frac{31}{38}\times\frac{30}{37}\times\frac{29}{36}.$$
Can you see how each of these fractions arise?


答:
There are $5$ cards $3$ and $40$ cards in total.

The probability to get exactly one $3$ is $p = 5\cdot \frac{8\cdot 32 \cdot 31 \cdot 30 \cdot 29 }{40\cdot 39\cdot 38\cdot 37 \cdot 36} $.

The probability to get $5$ $3$ is $p = \frac{8\cdot 7\cdot 6\cdot 5\cdot 4}{40\cdot 39\cdot 38\cdot 37\cdot 36}$.

Title: How do I calculate the probability of drawing certain cards from a deck?

Body:
I have a deck of $40$ cards. They are equally numbered one to five. This means that there are $8$ ones, twos, threes, fours and fives. I will draw $5$ cards from the deck.

I want to find the probability that one of those cards is a three.

I want to find the probability that all five of the cards are threes.

How do I do this?


问:
Is $x=2,y=13$ the unique solution?
Problem:
Find all positive integers $x$ and $y$ satisfying:
$$12x^4-6x^2+1=y^2.$$

If $x=1, 12x^4-6x^2+1=12-6+1=7,$ which is not a perfect square.

If $x=2, 12x^4-6x^2+1=192-24+1=169=13^2$, which is a perfect square. Thus, $x=2,y=13$ is a solution to the given Diophantine equation.

However, after testing a few more small cases, it seems as if $12x^4-6x^2+1$ can never be a perfect square if $x>2$. I have tried to prove this, but to no avail. Here is the gist of what I considered:

$12x^4-6x^2+1=y^2 \iff 12x^4-6x^2 = (y+1)(y-1)$. Since the L.H.S. is a multiple of $2$, it follows that $2 \mid (y+1)(y-1) \Rightarrow y$ is odd $\Rightarrow y+1$ and $y-1$ are both even.

Hence, $4 \mid (y+1)(y-1) \Rightarrow 4 \mid  12x^4-6x^2 \Rightarrow 4 \mid 6x^2 \Rightarrow x $ is even. Let $x=2m$ and $y+1=2k$, so $12x^4-6x^2=192m^4-24m^2=4k(k-1) \Rightarrow 48m^4-6m^2=k(k-1)$. At this point, I am at a loss of how to continue. We could continue with divisibility arguments, but it seems to be a never-ending process?

Another method I tried was to let $y=x+k$, thus $12x^4-6x^2+1 = x^2 + 2xk+k^2 \iff k^2+2xk-(12x^4-7x^2+1)=0$, which is a quadratic in terms of $k$. However, stuff like the discriminant or sum and product of roots did not seem to yield any important information.

Any hints provided to point me in the right direction will be much appreciated.

答:
This is an addition to my previous answer, which by pointed out by Mike doesn't sufficiently solve the problem.

We use the result, $$3(2x-1)^2(2x+1)^2 = (2y-1)(2y+1).$$

We have that $\gcd(2a-1,2a+1)=1$ for positive integer $a$ (by Euclidean Algorithm if you need convincing, however this is trivial enough to state).

It follows that $2y-1$ cannot be divisor to $2x-1$ or $2x+1$ without being divisor to the full square term (in other words, if $2y-1 \vert 2x-1,$ then $2y-1 \vert (2x-1)^2$ and similar). Since it also applies the other way around, it follows that one of the following are true:

$2y-1 = 1$ or $2y-1 = 3$

$2y-1 = (2x-1)^2$ or $2y-1 = 3(2x-1)^2$

$2y-1 = (2x+1)^2$ (cannot be $3(2x+1)^2$ as we must have $2y+1 > 2y-1$)

For the first, we have $y = 1$ or $y=2.$ No $x$ makes this true, so we can simply ignore this case.

The second case (after making $y$ in terms of $x$ and rearranging)

$2y-1 = (2x-1)^2$ gives us the polynomial $4x^4 + 4x^3 - 7x^2 +2x = 0,$ which has roots $-2, 0, 1/2, 1/2.$ None of these are positive integers.

$2y-1 = 3(2x-1)^2$ gives a polynomial with rational roots $1/2,0$ and the rest are irrational.

$2y -1 = (2x+1)^2$ gives us rational roots (-1/2, 0, 2). 2 is thus an answer!

I may have some cases I overlooked but it seems that this can solve it, albeit in a depressingly bashy way.

Title: Is $x=2,y=13$ the unique solution?


问:
derivation of the logarithm by hands, not by formula table
I trying to find any good example of derivation of $\lg (x)$ from the very begining.
I know that $(\lg (x))' = \frac{1}{x}$ but WHY?
I cannot get the same answer by calculating it by my hands.

$$
\lim_ {h \to 0} \dfrac{\lg (x+h) - \lg (x)}{h}
$$

How should i solve this limit?

答: $\log_{10}(x)=\frac1{\ln 10}\ln x$, therefore $\log_{10}'(x)=\frac1{x\ln 10}$ by what you've already established for $\ln$. If you haven't established what the derivative of $\ln$ is, apply identity $(f^{-1})'=\frac1{f'\circ f^{-1}}$ to $f(x)=\exp(x)$, obtaining $$\ln'(x)=\frac1{\exp'(\ln x)}=\frac1{\exp(\ln x)}=\frac1x.$$


答:
Your method is fine and your only mistake is at
$$D(-1,0)=\frac{f(x+2h)-f(x-2h)}{\color{red}{4}h}$$
You didn't correctly assess the distance between the data points!


问:
Find distance on the side of polygon to create angle
I'm trying to develop an application (with programming languages) where I can create 6 sided polygons with the same angle, wich is 60º deg, for example, to create the sides, like the image below. The only thing I know is the height of this object and the angle to be used.

This is an example of the result I expect to achieve:

Is there a formula to calculate the distance the point needs to be from the left side to achieve that angle? See image below.

I want to be able to change the height of the element, but keep the proportion of the polygon in all elements, wich is 60º.

I tried to use this formula, but it's not working:

$$x = tan(60º) * h$$

答:
So this is what I did, it gives you $x = 20/\sqrt{3}$.

So more generally for a $n$-agon then you have the angle $\alpha = 180°-360°/n$ (on the sketch $\alpha = 120°$) and therefore $x = \tan((180°-\alpha)/2) \times \frac{h}{2}$ hence:

$$\boxed{x = \tan\left(\frac{180°}{n}\right)\times \frac{h}{2}}$$


问:
Show that $HB^2 + HC^2 + 5DM^2 = 2DB^2 + 2DC^2$ as follows.
Edit

Let $ABC$ be triangle with the orthocenter $H$, the circumcenter $O$, and $M$ be the midpoint of $BC$. Let $D$ lies on $BC$ such that $AD \perp BC$. Let $\omega$ be the circle with diameter $OH$. If $BC$ is tangent to
$\omega$, then show that
\begin{equation*}
HB^2 + HC^2 + 5DM^2 = 2DB^2 + 2DC^2.
\end{equation*}

I have tried, but get stuck and always back to the start because only using the Pythagorean theorem and not using the given circle $\omega$. How to show it?

答:
Let the centre of the circle with diameter $OH$ be $P$ and let its point of tangency with $BC$ be $K$. Extend $AD$ to meet the circumcircle of $\triangle ABC$ at $L$. Draw $HK$,  $KO$, $PK$, $HB$, $HC$ & $BL$. $PK\perp BC$ & $HP=PK=PO$.

Since the parallel lines $HD$, $PK$ and $OM$ divide the transversal $HPO$ into two equal segments $HP$ and $PO$, they must divide $DKM$ in a similar way.

$\Rightarrow   DK=KM=\frac{DM}{2}$

The circle with diameter $OH$ touches $BC$ at $K$; Hence $\triangle HKO$ is right angled at $K$.

Observe that, $\triangle HDK\sim \triangle KMO$

$\Rightarrow   \frac{HD}{DK}=\frac{KM}{OM}$        $\Rightarrow   \left(\frac{DM}{2}\right)^2 = HD\cdot OM$

$DM=\frac{BC}{2}-BD=DC-\frac{BC}{2}$    $\Rightarrow  DM=\frac{\left(\frac{BC}{2}-BD\right)+\left(DC-\frac{BC}{2}\right)}{2} = \frac{1}{2}\left(DC-BD\right)$

Since $\angle HBD=90-\angle C=\angle DAC=\angle LAC=\angle LBC=\angle LBD$ and $BD\perp HL$, $HD=DL$.

$\Rightarrow AD\cdot HD=AD\cdot DL=BD\cdot DC$

Hence, $HB^2+HC^2+5DM^2$

$=\left(HD^2+BD^2\right)+(HD^2+DC^2)+20HD\cdot OM$

$=\left(BD^2+DC^2\right)+2HD^2+20HD\cdot OM$

$2HD^2+20(HD\cdot OM)$

$=2HD\left(HD+10OM\right)$

$=2HD\left(HD+2OM+8OM\right)$

Since, $O$,$G$ & $H$ lie on the Euler line and $\frac{AG}{GM}=2$, $AH=2OM$.

Thus, $2HD\left(HD+AH+8OM\right)$

$=2HD\left(AD+8OM\right)$

$=2HD\cdot AD+16HD\cdot OM$

$=2BD\cdot DC+\left(2DM\right)^2$

$=2BD\cdot DC+\left(DC-BD\right)^2 =BD^2+DC^2$

Therefore, $HB^2+HC^2+5DM^2$

$=(BD^2+DC^2)+2HD^2+20HD\cdot OM=\boxed {2(BD^2+DC^2)}$.


问:
Continuum Hypothesis within L using Upward Lowenheim-Skolem
Trying to understand the proof of why $\mathit{CH}$ holds within $L$, I've seen that it strongly relies on downward Lowenheim Skolem to define a structure with an $\aleph_0$ cardinality. My question is whether we could use upward lowenheim skolem to define a similar structure with $\aleph_1$ cardinality (or superior), and then see if that structure holds in $L$. Thank you very much in advance.

答:
JunderscoreH gave an excellent answer. But let me give another perspective.

The use of the downwards Löwenheim–Skolem theorem (+ the condensation lemma) is meant to show that every subset of $\omega$ was added in some countable stage of the hierarchy. Therefore $L\models\mathcal P(\omega)\subseteq L_{\omega_1}$, and therefore the Continuum Hypothesis holds.

But the upwards theorem is not enough to control the idea "every subset was captured at a countable stage". As Skolem's paradox teaches us, first-order logic is really not strong enough to distinguish countable and uncountable.

For example, suppose that $A\subseteq\mathcal P(\omega)$ and $|A|=\aleph_2$, then $L[A]$ the continuum hypothesis fails. Now look at $L_{\omega_2}[A]$, and consider any elementary submodel of size $\aleph_1$, it will satisfy $V=L[A']$ for some $A'\subseteq A$, and it will satisfy "There is no bijection between $\omega_1$ and $\mathcal P(\omega)$", but nevertheless the structure has size $\aleph_1$, and it is elementary.

So unless you a priori know that $\sf CH$ holds, you can't quite prove this way. In summary, the goal of using downwards Löwenheim–Skolem is a sort of "divide and conquer", which is incompatible with the upwards version of the theorem.


问:
Proving or disproving a statement about continuity and limits

So I've spent a few hours trying to find a counter example to this statement, and then gave up and spent additional few hours trying to prove it and Ive finally became frustrated with this problem. :)
I seem to get stuck in the scenario where $f\left(\frac{1}{x}\right)$ < 0, I'm just unable to find an epsilon that will satisfy all the conditions.. plus I'm not even sure if the statement is true or false anymore..

答:
Let's attempt a formal approach:

Let $f(1) = a \gt 0$.

Then for $\epsilon > 0, \exists \delta > 0: |x-1| < \delta \implies |f(x) - a| < \epsilon$.

Taking $\epsilon = a/2; f(x) \in (a/2, a), \forall x \in (1-\delta,1+\delta) $.

But we can choose $\alpha: \alpha, 1/\alpha \in (1-\delta, 1+\delta)$. Thus $f(\alpha)f(1/\alpha)>0$.

This gives us a contradiction. And hence $ f(1)\ngtr 0$.

Similarly we can show $f(1) \nless 0$.

And hence $f(1)=0$.

Additionally, it can be shown that $1 \lt \alpha \lt \min(1+\delta, \frac 1 {1-\delta})$ suffices above. Here's how:

One way of choosing $\alpha: \alpha, 1/\alpha \in (1-\delta, 1+\delta)$ is,

$1< \alpha < 1+\delta; 1-\delta<1/\alpha<1$ (we take $\alpha>1; \implies 1/\alpha < 1$)

$\implies 1< \alpha < 1+\delta; 1<\alpha<\frac{1}{1-\delta} \implies 1<\alpha < \min(1+\delta, \frac 1 {1-\delta})$

(you can take $\alpha<1$ and find another possible choice for $\alpha$)


问:
The distribution of the limit random variable
Produce a sequence of random variables $\left\{X_{n}\right\}_{n \geq 0}$ as follows: Let $X_{0}=q$ with probability 1, where $q \in(0,1)$ is some constant. For $n \geq 1,$ let $X_{n}=X_{n-1}^{2}$ with probability $1 / 2$ and $X_{n}=2 X_{n-1}-X_{n-1}^{2}$ with probability $1 / 2 .$ Prove that $\left\{X_{n}\right\}_{n \geq 0}$ converges almost surely, and find the distribution of the limit random variable.

Thanks for your help!

答:
In order to talk about almost sure convergence we need the sequence $\{X_n\}_{n\geq 0}$ to live on the same probability space. So to formalize your question let $(\Omega,\mathcal{F}, \mathbb{P})$ be a probability space and let $\{Z_n\}_{n\geq 1}$ be an i.i.d sequence such that $\mathbb{P}(Z_n=1)=1/2=\mathbb{P}(Z_n=0)$. Your sequence can now be defined as:
$$
\begin{align}X_0:&=q\\
X_n:&=\mathbf{1}_{\{Z_n=1\}}X_{n-1}^2+\mathbf{1}_{\{Z_n=0\}}(2X_{n-1}-X_{n-1}^2)
\end{align}
$$

Can we use some symmetry of the random walk from  $X_{n-1}$ to $X_{n}$? (hint: martingale convergence theorem)

We now assume $X_n\longrightarrow X$ a.s. on $\Omega$. Is it possible for some $\omega\in\Omega$ that $X(\omega)\in(0,1)$? What does this tell us about the distribution of $X$?


问:
Given two vector spaces $V,W$ with finite dimension,show that they are isomorphic if and only if $\text{dim(V)}=\text{dim(W)}$.
Given two vector spaces $V,W$ over the field $\mathbb F$ with finite dimension,show that they are isomorphic if and only if $\text{dim(V)}=\text{dim(W)}$.

$\Longrightarrow$

This this direction looks pretty straightforward to me,since if the two vector spaces are isomorphic then it means that an isomorphic exists between them,which is a bijective homomorphism,and we know that if there exist a bijection between two sets then their cardinality is the same and if they are finite then $$\text{dim(V)}=\left|V\right|=\left|W\right|=\text{dim(W)}$$

$\Longleftarrow$

One can  use the fact that every finite dimension vector space $V$ with $\text{dim (V)}=n$ is isomorphic to $\mathbb F^n$ and use the fact that the composition of isomorphism is another isomorphism.

I'm not sure if my proof is right,it would be nice if someone checks that,thanks.

答:
Hints:

$\implies:$ Show that an injective linear map $\;T:V\to W\;$ sends linearly independent (=l.i.) sets to l.i. sets, and thus an isomorphism $\;T\;$ as above maps a basis $\;A\;$ of $\;V\;$ to a l.i. set $\;B\;$  in $\;W\;$ . That $\;B\;$ is in fact a basis of $\;W\;$ follows from the fact that $\;T\;$ is also surjective and thus maps generating sets to generating sets, and thus $\;B\;$ is in fact l.i. generating set = a basis, with the very same of elements as $\;A\;$ , and thus $\;\dim V=\dim V\;$

$\;\Longleftarrow\;:$ If $\;\dim V=\dim W\;$ then choosing basis $\;A=\{a_i\}_{i\in I}, B=\{b_j\}_{j\in J}\;$ in $\;V, W\;'$ resp., define $\;T:V\to W\;$ by $\;Ta_i:=b_{\phi(i)}\;$, where $\;\phi:A\to B\;$ is a bijective map (which exists by assumption). Thus...continue and finish the proof.

Observe that the above proof works for any cardinality of $\;\dim V=|A|\,,\;\;\dim W=|B|\;$, and it can be slightly less messy if we assume finite dimensionality of all the vector spaces involved.


问:
Why is it important to have a discrepancy between image and codomain?
A function $f:\mathbb{R}\rightarrow \mathbb{R}$ given by $f(x)=x^2$ has $\mathbb{R}_{\geq0}$ as its image and $\mathbb{R}$ as its codomain.

What's the need for this discrepancy? Why don't we just write $f:\mathbb{R}\rightarrow \mathbb{R}_{\geq0}$?

I believe the reason for this is that there may be some functions in which stating the image this way may be impractical - if this hypothesis is true, what is this class of functions? If yes or no, is there any other reason for this?

答:
The most obvious reason is just that it's impractical.  The image may be difficult to write down.  Say for example we consider $f(x) = \frac{x^3}{1+e^x}$.

In order to define the image I have to work out the maximum, which involves solving $f'(x) = 0$. But I can't differentiate $f(x)$ until I've defined it.  So I need to define a co-domain before the image makes sense.

The other good reason is that we're often interested in sets of functions.  So I might talk about $C^1(\mathbb R)$ which is the set of functions $\mathbb R\to\mathbb R$ with a continuous first derivative.

To construct the set I'm interested in we need to talk about the co-domain. My function $f\in C^1(\mathbb R)$ but it wouldn't be if I had to define $C^1(\mathbb R)$ as functions whose image was $\mathbb R$.

So although the image can be important the co-domain is necessary too.


问:
Integrate $x^3\sqrt{x^2-9}\,dx$ with trig substitution
$\newcommand{\arcsec}{\operatorname{arcsec}}$This expression can be integrated without trig substitution, but I wanted to try using it anyways and got a different answer.

Starting with finding the indefinite integral $$\int x^3\sqrt{x^2-9} \, dx$$
I then substituted $x = 3\sec\theta$, $\theta = \arcsec(\frac{x}{3})$, and $d\theta = \frac{3}{\sqrt{x^2-9} |x|} \, dx$.
Plugging these values into the original integral,
$$\int 27\sec^3\theta\sqrt{9\sec^2\theta - 9}\frac{3}{\sqrt{9\sec^2\theta-9} |3\sec\theta|} \, d\theta$$
$$\int \frac{81\sec^3\theta3\tan\theta}{3\tan\theta |3\sec\theta|} \, d\theta$$
$$\int \frac{81\sec^3\theta}{|3\sec\theta|} \, d\theta$$
$$\int 27\sec^2\theta \, d\theta$$
$$27\tan\theta + C$$
Now substituting $x$ back in and simplifying:
$$27\tan(\arcsec(\frac{x}{3})) + C$$
$$9\operatorname{sgn}(x)\sqrt{x^2-9} + C$$

This does not seem close at all to the solution I found by $u$-substitution,
$$\frac{(x^2-9)^\frac{3}{2}(x^2+6)}{5} + C$$

I am relatively new to integration so I think I made a mistake. What did I do wrong? Any help appreciated.

答:
Wouldn't be integration by parts much easier?  Start with
$$\frac12\int x^2\cdot2x\sqrt{x^2-9}\,dx.$$


问:
Why is there a split in the second last root of the Dn Dynkin diagram?
I basically understand the rules of how to draw a Dynkin diagram but I couldn't find any rule for when I have to split edges like for the second last root of the $D_n$ diagram.
Would be nice if somebody could give me an explanation.

答: The Dynkin diagram of a root system $D_n$ represents a set of $n$ vectors in Euclidean space.  Any two roots not joined by an edge are perpendicular.  Any two roots joined by a single edge have angle $2\pi/3$.  So, in $D_n, n\ge 4$, there is a certain root making angle $2\pi/3$ with each of three other roots, and the three other roots are all mutually perpendicular.  Of course this does not fit in $\mathbb R^3$, but in some space of high enough dimension.


问:
Need some clarification for $\frac{d}{dt} [\det A(t)]=\det A(t) \cdot \operatorname*{tr}[A^{-1}(t)\cdot \frac{d}{dt} A(t)]$.
I was reading this post that explains why $$\frac{d}{dt} [\det A(t)]=\det A(t) \cdot \operatorname*{tr}[A^{-1}(t)\cdot \frac{d}{dt} A(t)]$$ However I don't understand exactly the following step :

$$\det A (t) \lim_{h \to 0}  \frac{\det \bigl(A (t)^{-1} A (t + h)\bigr) - 1}{h}=\det A (t) \operatorname{tr} \Bigl(A (t)^{-1}\frac{d A}{dt} (t) \Bigr)$$

答:
The post you mentioned takes for granted that the derivative of the determinant at the identity equals trace.  That is,
\begin{equation*}
\det(\text{Id} + A) = 1 + \text{tr}(A) + o(\|A\|) \quad \text{as} \, \, \|A\| \to 0.
\end{equation*}

From this, we see that
\begin{align*}
\det(A(t)^{-1}A(t +h)) &= \det(\text{Id} + (A(t)^{-1}A(t+h) - \text{Id})) \\
&= 1 + \text{tr}(A(t)^{-1}A(t +h) - \text{Id}) + o(\|A(t)^{-1}A(t+h) - \text{Id}\|)
\end{align*}
Now observe that $A(t+h) = A(t) + h \frac{d}{dt}A(t) + o(h)$ as $h \to 0$.  Thus,
\begin{align*}
\text{tr}(A(t)^{-1}A(t+h) - \text{Id}) = h \text{tr}\left(A(t)^{-1} \frac{d}{dt}A(t)\right) + o(h)
\end{align*}
and
\begin{equation*}
o(\|A(t)^{-1}A(t+h) - \text{Id}\|) = o(h).
\end{equation*}
Putting it all together, we deduce that
\begin{equation*}
\text{det}(A(t)^{-1}A(t+h)) = 1 + h \text{tr} \left(A(t)^{-1} \frac{d}{dt}A(t) \right) + o(h),
\end{equation*}
or, equivalently,
\begin{equation*}
\lim_{h \to 0} \frac{\text{det}(A(t)^{-1}A(t+h)) - 1}{h} = \text{tr} \left(A(t)^{-1} \frac{d}{dt}A(t) \right).
\end{equation*}


答:
In $\Longrightarrow$, $\text{dim(V)}=\left|V\right|=\left|W\right|=\text{dim(W)}$ is false since dimension of a finite dimensional vector space is the size of a basis for that vector space, not the cardinality (or size) of the vector space itself.

To prove this part, first define $B_V = \{v_1,...,v_n\}$ as a basis for $V$ with $\dim(V) = n$. Then, since $V$ and $W$ are isomorphic, there exists a linear transformation $T:V \to W$ such that $T$ is a bijection. Then, since $T$ is a linear transformation, it is uniquely determined by where it sends $v_1,...,v_n$ to. Now, you can show that $B_W = \{T(v_1),...,T(v_n)\}$ is a basis for $W$ by using the assumption that $T$ is bijective (injectivity will be useful for showing linear independence of $B_W$ and surjectivity will be useful for showing $\text{Span}(B_W) = W$).

For $\Longleftarrow$, I think your second argument is fine.

Title: Given two vector spaces $V,W$ with finite dimension,show that they are isomorphic if and only if $\text{dim(V)}=\text{dim(W)}$.

Body:
Given two vector spaces $V,W$ over the field $\mathbb F$ with finite dimension,show that they are isomorphic if and only if $\text{dim(V)}=\text{dim(W)}$.

$\Longrightarrow$

This this direction looks pretty straightforward to me,since if the two vector spaces are isomorphic then it means that an isomorphic exists between them,which is a bijective homomorphism,and we know that if there exist a bijection between two sets then their cardinality is the same and if they are finite then $$\text{dim(V)}=\left|V\right|=\left|W\right|=\text{dim(W)}$$

$\Longleftarrow$

One can  use the fact that every finite dimension vector space $V$ with $\text{dim (V)}=n$ is isomorphic to $\mathbb F^n$ and use the fact that the composition of isomorphism is another isomorphism.

I'm not sure if my proof is right,it would be nice if someone checks that,thanks.


答:
Both implications of your proof seem to misuse the definition of vector space dimension.  Vector space dimension is not the same as cardinality of the vector space.  Rather, the dimension of a vector space is the number of elements of a basis in that vector space.

$\Leftarrow$:

Let $n =\operatorname{Dim} V$.  This means that there is a basis of $V$ consisting of $n$ elements.  Let $v_1, ... , v_n$ be such a basis.  Then every element of $V$ is equal to $c_1v_1 + \cdots +c_nv_n$ for unique scalars $c_i$.

If $\operatorname{Dim}V = \operatorname{Dim}W$, then there is a basis $w_1, ... , w_n$ of $W$ also consisting of $n$ elements.  Define a function

$$T: V \rightarrow W$$

by $T(c_1v_1 + \cdots + c_nv_n) = c_1 w_1 + \cdots + c_nw_n$.

You are done if you can show that $T$ is an isomorphism.  In other words, if you can show that $T$ is a linear transformation, and that it is a bijection from $V$ onto $W$.


问:
How to calculate $\int_0^{2\pi} \sqrt{1 - \sin^2 \theta}\;\mathrm d\theta$
How to calculate:

$$ \int_0^{2\pi} \sqrt{1 - \sin^2 \theta}\;\mathrm d\theta $$

答: Hint: note that $$\sqrt{1-\sin^2\theta}=\sqrt{\cos^2\theta}=|\cos\theta|.$$


问:
Factor of a product is product of factors
I'm trying to prove the uniqueness of prime factorization of any natural number $n\ge 2$ (I take $0\in\mathbb N$). I've shown the existence of a prime factorization for any such number (by infinite descent on the statement that 'for each $n\ge 2$, there exists a greatest prime that divides $n$').

To show uniqueness, I realize that I will be done if I can show that
$$
\forall a\;\forall b\;\forall c\;\left(c\text{ divides } ab\implies\exists m\;\exists n\; (m\text{ divides } a\;\wedge\; n\text{ divides } b\;\wedge\; c=mn)\right).
$$

But after a lot of futile attempts, I'm not able to "see" any path leading me to this statement. Any help?

Note: I haven’t proven Euclid’s division lemma, and am not working with gcd’s. Hence I’ll appreciate a way that avoids these.

答: You can prove your displayed assertion by strong induction on $c$.  The assertion is clearly true for the base case $c=1$ (with $m=n=1$).  So assume it's true for all $c'\lt c$, where $c\gt1$. Let $p$ be any prime divisior of $c$ and write $c=pc'$, noting that $p\gt1$ implies $c'\lt c$.. Since $p\mid c\mid ab$, we know (by Euclid's lemma) that $p\mid a$ or $p\mid b$. Without loss of generality, let's assume it's $p\mid a$, and write $a=pa'$. We find now that $c'\mid a'b$, hence, by the strong induction hypothesis, there exist integers $m'$ and $n$ such that $m'\mid a'$, $n\mid b$, and $m'n=c'$. Now simply let $m=pm'$ and note that $m'\mid a'\implies m=pm'\mid pa'=a$ and $c=pc'=pm'n=mn$.


答:
Continuing from your work, we can use logarithm rules, and get

$$
\lim_{h \to 0} \frac{1}{h} \ln \left ({\frac{x+h}{x}} \right ) = \ln \left ( 1 + \frac{h}{x} \right )^\frac{1}{h}
$$

We can do a switch of variables, e.g. $k = \frac{1}{h}$ and get

$$
\lim_{k \to \infty} \ln \left (1 + \frac{1}{kx} \right )^k
$$

You can see that whats inside the $\ln$ approaches $e^{\frac{1}{x}}$. Therefore,
$$ (\ln x)' = \ln e^{\frac{1}{x}} = \frac{1}{x}$$

Anyway, this is a "crude" way to prove the derivative of $\ln$. For the derivative of any logarithm with a different base, simply note that
$$ \log_a (x) = \ln(x) \cdot \frac{1}{\ln a} $$

Finally, also check out this.

Title: derivation of the logarithm by hands, not by formula table

Body:
I trying to find any good example of derivation of $\lg (x)$ from the very begining.
I know that $(\lg (x))' = \frac{1}{x}$ but WHY?
I cannot get the same answer by calculating it by my hands.

$$
\lim_ {h \to 0} \dfrac{\lg (x+h) - \lg (x)}{h}
$$

How should i solve this limit?


问:
Does Krull's theorem hold for left weakly reductive rings?
Let $(R, +, \cdot)$ be a ring (non-unital, non-commutative). We call it left weakly reductive, or lwr, if the following property holds: $xa = 0$ for all $x$ implies $a = 0$. This is equivalent to $xa = xb$ for all $x$ implying $a = b$.

An lwr ideal in a lwr ring is an ideal $J$ such that $R\cdot A \subseteq J \implies A\subseteq J$.

Does the following generalization of Krull's theorem hold for lwr rings?

Conjecture. Suppose that $R$ is a non-trivial lwr ring. Then there is a maximal (proper) lwr ideal in $R$.

Note that if the conjecture holds, $I\subset R$ is a proper lwr ideal, then we can find maximal lwr ideal $J\subset R/I$. Then, letting $\pi:R\to R/I$ be the canonical map, $\pi^{-1}(J)$ will be a lwr ideal, for $R\cdot a \subseteq \pi^{-1}(J)$ would imply $(R/I)\cdot \pi(a)\subseteq J$, from which $\pi(a)\in J$, hence $a\in \pi^{-1}(J)$. Then, since $\pi$ induces a lattice isomorphism between ideals of $R$ containing $I$ and ideals of $R/I$, $\pi^{-1}(J)$ would necessarily be a maximal lwr ideal. So that any proper lwr ideal in $R$ is contained in some maximal lwr ideal.

Also note that lwr ideals are precisely ideals $I$ for which $R/I$ is an lwr ring.

答:
No. Let $R$ be the (nonunital) subring of the Levi-Civita field over some field $F$ consisting of elements of positive valuation i.e. we permit sums of the form $a=\sum_{n=0}^\infty a_nT^{e_n}$, where $e_n$ is an increasing sequence of positive rationals tending to infinity. The valuation of a nonzero element like this is defined to be $v(a)=e_n$ for the least $n$ such that $a_n\neq 0$. Using the fact Levi-Civita field is a field we easily verify the following claim: if $a,b\in R$ and $v(a)>v(b)$, then $a=bc$ for some $c\in R$.

$R$ is an integral domain, so is lwr. I claim $R$ has no maximal lwr ideal. Indeed, suppose $I$ is any maximal lwr ideal in $R$. Let $e$ be the infimum of valuations of elements of $I$. If $e=0$, then for any $a\in R$ there is $b\in I$ such that $v(a)>v(b)$, and then $b$ divides $a$ by the claim above and hence $a\in I$, contradicting the fact $I$ is proper. Hence $e>0$. Pick some rational $0<d<e$ and let $J$ be the ideal of $R$ consisting of elements of valuation at least $d$. We then check $J\supsetneq I$ and $J$ is an lwr ideal, contradicting maximality of $I$.


问:
How to read $( x^{2x^{-1/5}})^{-1}=\frac{1}{25}$
I saw the following problem

$$\left( x^{2x^{-\frac{1}{5}}} \right)^{-1}=\frac{1}{25}$$

and I was curious whether I should read it as

$$\left( (x^{2x})^{(-\frac{1}{5})} \right)^{-1}$$

or
$$\left( x^{(2x^{\frac{1}{5}})} \right)^{-1}$$

to clarify, am I to raise 2x to the -1/5 power first, or raise $x^{2x}$ to the -1/5 power?

答:
The first thing I would do is take the reciprocal of both sides:
$x^{2x^{-1/5}}= 25$.  From there, because you have "$x$" both as the base and in the exponent I expect you will need the "W function".


问:
Is this property true for all $p$ or for all primes?
In my textbook the following property is stated:

Let $p$ be a prime number. For any $a_1,...,a_k\in \mathbb Z$ we have that:
$$p|a_1...a_k \implies \exists i\in\{1,...,k\}:p|a_i$$
In particular, for any $a,b \in \mathbb Z$:

$p|ab \implies (p|a \vee p|b)$

$p|a^k \implies p|a$

I was able to prove this for but, In my proof, I never used the fact that $p$ is prime. Because of this, I don't know if my proof is valid but this got me wondering: Is this property also valid for any $p$ or only if $p$ is prime?

Edit: I'll show the proof I made for this.

Let $p$ be a prime number and $a_1,...,a_k \in \mathbb Z$ such that:

$$p|\prod_{n=1}^k a_n$$

The proof is by contradiction. Let's assume that $\forall i \in \{1,...,k\}, p \not | a_i$

Now, let's use mathematical induction:

$p \not | a_1$

Now let's assume that $p \not | \prod_{n=1}^{k-1} a_n$:

We have that $p \not | a_k \iff \gcd(p,a_k) = 1$ and $p \not | \prod_{n=1}^{k-1} a_n \iff \gcd(p,\prod_{n=1}^{k-1} a_n)=1$.

Since $\gcd(p,\prod_{n=1}^{k-1} a_n)=1$ and $\gcd(p,a_k) = 1$ we conclude that: $\gcd(p,a_k \cdot \prod_{n=1}^{k-1} a_n)=1 \iff p \not | \prod_{n=1}^{k} a_n$

This is a contradiction, hence $\exists i \in \{1,...,k\}: p | a_i$

答: $6|6=2\cdot 3$, but $6$ divides neither $3$ nor $2$.


答:
Only if $p$ is prime.

Let's see counterexamples to this, to

$n \vert ab \Longrightarrow n \vert a \vee n \vert b.$

If $n = ab,$ then $ab \not \vert a$ and $ab \not \vert b.$ The property works for primes because the prime factors cannot be split into further non 1 prime factors.

$n \vert a^k \Longrightarrow n \vert a.$ This is not true: suppose $k > 2$ and $n = a^2.$ It follows that this doesn't hold.

Title: Is this property true for all $p$ or for all primes?

Body:
In my textbook the following property is stated:

Let $p$ be a prime number. For any $a_1,...,a_k\in \mathbb Z$ we have that:
$$p|a_1...a_k \implies \exists i\in\{1,...,k\}:p|a_i$$
In particular, for any $a,b \in \mathbb Z$:

$p|ab \implies (p|a \vee p|b)$

$p|a^k \implies p|a$

I was able to prove this for but, In my proof, I never used the fact that $p$ is prime. Because of this, I don't know if my proof is valid but this got me wondering: Is this property also valid for any $p$ or only if $p$ is prime?

Edit: I'll show the proof I made for this.

Let $p$ be a prime number and $a_1,...,a_k \in \mathbb Z$ such that:

$$p|\prod_{n=1}^k a_n$$

The proof is by contradiction. Let's assume that $\forall i \in \{1,...,k\}, p \not | a_i$

Now, let's use mathematical induction:

$p \not | a_1$

Now let's assume that $p \not | \prod_{n=1}^{k-1} a_n$:

We have that $p \not | a_k \iff \gcd(p,a_k) = 1$ and $p \not | \prod_{n=1}^{k-1} a_n \iff \gcd(p,\prod_{n=1}^{k-1} a_n)=1$.

Since $\gcd(p,\prod_{n=1}^{k-1} a_n)=1$ and $\gcd(p,a_k) = 1$ we conclude that: $\gcd(p,a_k \cdot \prod_{n=1}^{k-1} a_n)=1 \iff p \not | \prod_{n=1}^{k} a_n$

This is a contradiction, hence $\exists i \in \{1,...,k\}: p | a_i$


问:
SVD decomposition of diagonal matrix $A = \begin{pmatrix}0 & C^T \\ C & 0 \end{pmatrix}$
Assume I have a matrix

$A = \begin{pmatrix}0 & C^T \\ C & 0 \end{pmatrix}$

I want to do sigular value decomposition of $A$. Can I take the benefit of the diagonal property if $A$?  like only SVD of $C$ ?

Thanks.

答:
The answer is yes. Suppose that we have the SVD
$$
C = U_1\Sigma_1 V_1^T
$$
where $U_1,V_1$ are orthogonal matrices. It follows that $A = U_2 \Sigma_2 V_2^T$, where
$$
U_2 = \pmatrix{0&V_1  \\U_1 & 0}, \quad \Sigma_2 = \pmatrix{\Sigma_1 & 0\\ 0 & \Sigma_1^T}, \quad
V_2 = \pmatrix{V_1 & 0\\0 & U_1}.
$$
Or, you could also take
$$
U_2 = \pmatrix{V_1&0  \\0&U_1}, \quad \Sigma_2 = \pmatrix{\Sigma_1^T & 0\\ 0 & \Sigma_1}, \quad
V_2 = \pmatrix{0 & V_1\\U_1 & 0}.
$$
Note that we have $\Sigma_1 \neq \Sigma_1^T$ if $C$ is not square.


问:
What is the sum of this infinite series? Which one is it, Taylors? Binomial?
I am trying to figure which formula to use for this one.
$$\displaystyle\sum\limits_{x=-1}^{-\infty} -x(1-y)p(1-p)^{-x}+\sum\limits_{x=1}^\infty xyp(1-p)^x$$
where $0<y<1$, and $0<p<1$.

My work:
$$=\displaystyle\sum\limits_{x=1}^{\infty} -x(1-y)p(1-p)^{x}+\sum\limits_{x=1}^\infty xyp(1-p)^x$$
next step,
$$=\displaystyle\sum\limits_{x=1}^{\infty} p(1-p)^{x}(2xy-x)$$
This doesn't look like anything.  Does anyone recognize this?

答:
First, this sum is an instance of the binomial theorem and $\binom{k}{k-1}=(-1)^{k-1}\binom{-2}{k-1}$
$$
\begin{align}
\sum_{k=1}^\infty kx^k
&=\sum_{k=1}^\infty\binom{k}{1}x^k\\
&=\sum_{k=1}^\infty\binom{k}{k-1}x^k\\
&=\sum_{k=1}^\infty(-1)^{k-1}\binom{-2}{k-1}x^k\\
&=\sum_{k=0}^\infty(-1)^k\binom{-2}{k}x^{k+1}\\
&=x\sum_{k=0}^\infty\binom{-2}{k}(-x)^k\\[4pt]
&=x(1-x)^{-2}\\[9pt]
&=\frac{x}{(1-x)^2}\tag{1}
\end{align}
$$
Now to apply $(1)$, we simply reindex to positive indices ($k\mapsto-k$). I believe that this was done incorrectly in the question. Here $x=1-p$.
$$
\begin{align}
&\sum\limits_{k=-1}^{-\infty} -k(1-y)p(1-p)^{-k}+\sum\limits_{k=1}^\infty kyp(1-p)^k\\
&=\sum\limits_{k=1}^{\infty} k(1-y)p(1-p)^k+\sum\limits_{k=1}^\infty kyp(1-p)^k\\
&=\sum\limits_{k=1}^{\infty} kp(1-p)^k\\
&=\frac{p(1-p)}{(1-(1-p))^2}\\
&=\frac{1-p}{p}\tag{2}
\end{align}
$$</p>


问:
How to solve equation for a variable that is inside and outside an exponent?
I have this equation

$$y=x\exp\big(a(1−xk)\big).$$

It is possible to solve for $x$?
I can see from this post that sometimes there is no solution. Is this also the case? Is there a numerical approach that can be used?
Thank you

答: The Lambert $W$ function $W(z)$ satisfies $We^W=z$. Since $-akye^{-a}=-akx\exp(-akx)$, each solution comes from one branch of $W$ viz. $x=-\tfrac{1}{ak}W(-akye^{-a})$.


问:
$U \cap \operatorname{cl}(A) \neq \emptyset$ implies $U \cap A \neq \emptyset$, is $U$ open?
In a metric space $(X,d)$, let $U\subseteq X$. If $$U \cap \operatorname{cl}(A)\neq \emptyset \implies U\cap A\neq \emptyset$$ for all set $A\subseteq X$ , is $U$ open? (Notation: $\operatorname{cl}(A)$ is the closure of $A$)

I am currently stuck at this problem for a long time, the converse is easy and there are many similar ones out there.

Any proofs or hints? Or any counter examples if not true? Thanks in advance.

答:
Specializing the property to $A=X\setminus U$, we have $$X\setminus\operatorname{cl}(X\setminus U)\subseteq X\setminus (X\setminus U)=U\stackrel{\text{because }U\cap(X\setminus U)=\emptyset}{\subseteq} X\setminus\operatorname{cl}(X\setminus U)$$

And therefore $U=X\setminus\operatorname{cl}(X\setminus U)$, which is open.


问:
smooth functions associated to vector fields X associated to charts is well defined
I am confused. I am reading this book. Given manifold $(M^n,x)$. First he defines tangent space in the following steps.

Step 1:

Construct $\alpha : (-\epsilon,+\epsilon) \rightarrow M$ continuous such that $\alpha(0) = p$.

$T_pM$ is defined as equivalence class of curves where the relation is defined as

$$\alpha \sim \beta \iff (x \circ \alpha)(0)^{\prime} = (x \circ \beta)(0)^{\prime}$$

A vector field X assigns to each point in the manifold p a vector in the tangent space.

In a coordinate neighborhood (U,x) can be expressed as $\Sigma h_i \frac{\partial}{\partial x_i}$ where $h_i$ is a function on U. Those $h_i$ is independent of the choice of $(U,x)$.

I don't understand this. How can we compute that it is independent of choice of $(U,x)$.

答:
Note that on the coordinate patch $(U, x)$ for all $i$,
$$X(x_i) = \sum_{j=1}^n h_j\dfrac{\partial x_i}{\partial x_j} = h_i$$

So $h_i = X(x_i)$. Because both $X$ and $x_i$ are smooth, so is $h_i$. This is true regardless of the particular coordinate system $(U, x)$ used.


问:
derivation of the logarithm by hands, not by formula table
I trying to find any good example of derivation of $\lg (x)$ from the very begining.
I know that $(\lg (x))' = \frac{1}{x}$ but WHY?
I cannot get the same answer by calculating it by my hands.

$$
\lim_ {h \to 0} \dfrac{\lg (x+h) - \lg (x)}{h}
$$

How should i solve this limit?

答:
You can grind through it like this:

$$\lim_{h \to 0} \frac{\ln(x+h)-\ln (x)}{h} = \lim_{h\to 0} \frac{\ln\left(\frac{x+h}{x}\right)}{h}  $$

$$=\lim_{h\to 0} \frac{\ln\left(1+\frac{h}{x}\right)}{h} =
 \lim_{h\to 0} \ln\left(\exp\left( \frac{\ln\left(1+\frac{h}{x}\right)}{h}\right)\right)$$

$$= \lim_{h\to 0} \ln\left( \left(1+\frac{x}{h}\right)^{1/h}\right).  $$

Now substitute $y =x/h$, so when $h\to 0$, then $y\to \infty.$  Also $h = x/y$.  The above

$$ = \lim_{y\to \infty} \ln\left( \left(1+\frac{1}{y}\right)^{\frac{y}{x}}\right). $$

Since the (or one) definition of $e$ is $e=\lim_{y\to \infty} \left(1+\frac{1}{y}\right)^y,$  and since $\ln x$ is continuous, we have

$$= \ln\left( \left(\lim_{y\to \infty}\left(1+\frac{1}{y}\right)^y\right)^{1/x}\right)=\ln e^{1/x} = \frac{1}{x}.   $$


问:
The small concrete category $C = (\mathbb{Z_2}, +)$?
I'm grappling with the question of viewing a group as a category, which as I understand it means that if $(G,+)$ is the group in question, then the group can also be thought of as a small concrete category $C$ in which ${\rm Ob}(C) =\{ \bullet \}$ and ${\rm Hom}(C,C)$ is just the elements of $G$.

But that's still pretty vague, so I'm trying to construct the specific category $C=(\mathbb{Z_2},+)$, i.e., the integers modulo $2$ under plus, but viewed as a category. What I have so far is that ${\rm Ob}(C) =\{ \bullet \}$ and ${\rm Hom}(C,C)=\{0,1\}$ where $0$ is the identity morphism so that whatever $1$ is (and that part isn't really clear yet), $0 \circ 0 =0 $ and $ 0 \circ 1 = 1 \circ 0 = 1.$ So far, so good. For this category to properly mimic the group, it must be the case that $1 \circ 1=0$.

So can I just define $1$ as a morphism that is an its own inverse? If not, what would be the next step?

Thanks for any advice.

答:
Yes, you can define composition of morphisms as you like, as long as they satisfy the correct axioms.

Notice that in your case ($G=\mathbb Z/2\mathbb Z$) you don't even have to specify this: if you see $G$ as a category with one object (a monoid), all your morphisms will have to be isomorphisms (so that your only hom-set behaves just like the group).

If you have only two morphisms $\{0,1\}$, and $0$ is the identity, what will the inverse of $1$ be?

(Of course, you could also define $1\circ 1$ to be $1$; but as such it wouldn't be an isomorphism, and your monoid wouldn't represent a group anymore.

Conversely, $1\circ0=1=0\circ1$ are forced by the identity axiom.)