答: It means that the limit exists, if the limits depends on the angle in (0,0) then your function is indeterminate in (0,0) and the limit doesn't exists, it happens because your function is symmetrical.</p>

Title: If I am solving a limit on 2 variables and after changing to polar coordinates the angle dissapears, what does that mean?

Body:
For example, I have: $\lim_{(x,y)\to(0,0)}\frac{e^{x^2+y^2}\ln(2(x^2+y^2)+1)-\frac{3}{2}(x^2+y^2)-1}{x^2+y^2}$

After a change to polar coordinates: $\lim_{r\to0}\frac{e^{r^2}\ln(2(r^2)+1)-\frac{3}{2}(r^2)-1}{r^2}$

I think that since the angle disappears the function has some sort of radial symmetry, so it doesn't matter how do I approach to $(0,0)$. After that I solved the limit like I would solve a single variable limit using L'Hopital's and the limit was equal to $\frac{3}{2}$ which is correct. Am I correct in assume that every time the angle disappears I can evaluate the limit as if it were one variable? Or what happened there?
(Sorry if I have some spelling mistakes, I'm not english native speaker).


问:
Using a field $k$ which is not algebraically closed to find an example.
Let $A_1$ and $A_2$ be finitely generated $k$-algebras, where $k$ is a field.

If we write $A_1 = k[X_1, \dots, X_m]/I$ and $A_2 = k[Y_1, \dots, Y_n]/J$ where $ I \subset k[X_1, \dots ,X_m]$ and $ J \subset k[Y_1, \dots ,Y_n]$ are ideals, and $m,n \in \mathbb N,$ we know that $A_1 \otimes_k A_2 \cong_k R $ where:

$$R = k[X_1,\dots,X_m,Y_1, \dots,Y_n ]/(I,J)$$

And we did that by defining a biadditive balanced function $\varphi: A_1 \times A_2 \rightarrow R$ to get an algebra homomorphism $A_1 \otimes_k A_2 \rightarrow R.$

Now, I want to give an example where $A_1$ and $A_2$ are integral domains but $A_1 \otimes_k A_2$ is not an integral domain.

I know that if $k$ is algebraically closed, then $A_1 \otimes_k A_2$ is always an integral domain. So I need to use $k$ which is not algebraically closed.

Could someone give me a help to create this example?

答:
Let $A_1=A_2=\mathbb C$ and $k=\mathbb R$. Then, we have the isomorphism
\begin{align}
\mathbb C\otimes_\mathbb R\mathbb C&=\mathbb C\otimes_\mathbb R(\mathbb R[X]/(X^2+1))\cong\mathbb C[X]/(X^2+1)\\
&\cong\mathbb C[X]/(X-i)\times\mathbb C[X]/(X+i)\cong\mathbb C\times\mathbb C,
\end{align}
by the Chinese Remainder Theorem.

This is clearly not an integral domain, since $(0,1)\cdot(1,0)=(0,0)\in\mathbb C\times\mathbb C$.

In fact, the same construction works in general. Let $k$ be a non-algebraically closed field, so there is a monic irreducible polynomial $f(X)\in k[X]$ of degree $>1$. Let $K=k[X]/(f)$ be the splitting field of $f$, so that $K/k$ is a finite extension. Let $f(X)=\prod_{i=1}^n(X-\alpha_i)$ for $\alpha_i\in K$.

We then have the isomorphism $K\otimes_kK=k[X]/(f)\otimes_kK\cong K[X]/(f)$. Here, $X-\alpha_1,\prod_{i=2}^n(X-\alpha_2)\in K[X]/(f)$ are nonzero, but their product is $f=0$. Hence, $K\otimes_kK$ is not an integral domain.

EDIT (the explicit map):

$\mathbb C\otimes_\mathbb R\mathbb C\cong\mathbb C\times\mathbb C:u\otimes v\mapsto(uv,u\overline v)$, where $\overline v$ is the complex conjugate of $v\in\mathbb C$.

ContentLicense: CC BY-SA 4.0


问:
Prove that $(x^2 \equiv y^2 \mod{59} ) \implies ( x \equiv y \mod{59} )$
I have to prove that $(x^2 \equiv y^2 \mod{59} )  \implies ( x \equiv y \mod{59} )$

I figured that $59$ is a prime number and now I have no idea what to do next.

答:
Can't prove what isn't true and as $a^2 \equiv (-a)^2 \pmod {59}$ but $a\not \equiv -a\pmod {59}$ it isn't true.

But it is true that if $x^2 \equiv y^2 \pmod p$ where $p$ is a prime number then $x \equiv \pm y \pmod p$.

$x^2 \equiv y^2 \pmod p\implies$

$x^2 -y^2 = (x-y)(x+y) \equiv 0 \pmod p\implies$

$p\mid (x-y)(x+y)$

Now $p$ is prime so by Euclids lemma either

$p|x-y\implies x-y\equiv 0 \pmod p\implies x\equiv y\pmod p$ or

$p|x+y\implies x+y \equiv 0 \pmod p \implies x\equiv -y\pmod p$.

Note, for this result to be true you must have $p$ to be prime.  Other wise $x^2 \equiv y^2 \pmod n$ would implie that $n|(x-y)(x+y)$ but that wouldn't mean that $n$ divides $x-y$ or $n$ divides $x+y$.

Consider $x^2 \equiv y^2 \pmod {12}$ then $x^2-y^2 = (x-y)(x+y)\equiv 0 \pmod {12}$ so $12|(x-y)(x+y)$ we could have $2|x-y$ and $6|x+y$ and have $x=4; y=2$.

And $4^2 \equiv 16\equiv 4\pmod {12}$ and $2^2 \equiv 4 \pmod {12}$ so the result isn't true if $n$ isn't prime.

Or you could have $4|x-y$ and $3|x+y$ for example if $x=5, y=1$.  Then $5^2 \equiv 25 \equiv 1 \equiv 1^2 \pmod{12}$.


问:
What is the most general form of this theorem: $E[X] = \sum_{n = 0}^{\infty} P(X > n)$
In the properties section of the expected value on wikipedia we can find this short theorem:

For a non-negative integer-valued random variable $X: \Omega \mapsto \mathbb{N}_0$,

$E[X] = \sum_{n = 0}^{\infty} P(X > n)$

I remember this theorem in a more general version used for Lebesgue integrals with some general measure. The problem is that it does not have a commanding name and I can't find the general version anymore. I used this version to calculate the expectation of a stopping time.

So my question: What is the most general version you know and does it have some name?

Of course I would be great to have a proof of the generalization as well.

答:
By now I found the answer thanks to the reference to Fubini's theorem:

Theorem:
Let $(\Omega, \mathfrak{A}, \mu)$ be a $\sigma$-finite measure space and $f: \Omega \to \mathbb{R}_+ $ a measurable, non negative, real function. Further let $\phi: \mathbb{R}_+ \to \mathbb{R}_+$ be a continuous isotone function, which is continuously differentiable at least on $\mathbb{R}_+^* = (0, \infty)$ and satisfies $\phi(0) = 0$. Then

$\int \phi \circ f d\mu = \int_{\mathbb{R}_+^*} \phi(t) \mu(\{f \geq t \})\lambda(dt) = \int_{0}^{+\infty} \phi'(t)\mu(\{f \geq t \})dt$

This is most general version I could find. So it is sufficient for the measure to be $\sigma$-finite; it need not be a probability measure.


问:
Probability of 4 drivers in the same group
Yesterday I asked a question that a colleague quickly answered @mjw but some things were not clear and the question was closed. I will reformulate it and count on everyone's support again.

The problem is this: I have a go-kart group in which 32 drivers participate. In each stage, the drivers are divided into 2 groups (GroupA and GroupB). The names of the 32 drivers (D1, D2, ..., D32) are drawn one by one and distributed in the two groups according to the example below:

1º - I take a name randomly from a box and place it in the "A" group;

2º - I take a name randomly from a box and place it in the "B" group;

3º - I take a name randomly from a box and place it in the "A" group;

...

I will perform these steps until all the drivers are distributed in the groups as shown. Each group will have 16 drivers.

Question: What are the chances of drivers "D1", "D2", "D3", and "D4" being in the same group (GroupA or GroupB) considering that all drivers can be chosen equally?

I tried to think about solving this problem using the inclusion-exclusion theory, or conditional probability, but I failed. If I'm not wrong, the number of possible combinations is

$\binom{32}{16}$

But how can I consider the division into 2 groups?

答:
As you say, there are $\binom{32}{16}$ equiprobable ways to divide the drivers into two groups of $16.$

The number of ways that $4$ specified drivers can be in group A is $\binom{28}{12}$, since the remaining $12$ drivers in the group can be any of the other $28$.  Of course, there are the same number of ways that the $4$ can all end up in group B.

The probability is $$\frac{2\binom{28}{12}}{\binom{32}{16}}=\frac{91}{899}$$


问:
Proving the product of two real numbers is maximum when the numbers are equal given their sum is constant
Let us consider two real numbers $x$ and $y$. How can we prove value of $xy$ is greatest when $x=y$ given the condition $x+y=$ constant?

I have already found a proof, but I am not entirely happy with it yet.

答:
HINT:

Make use of the fact that $xy \leq \left(\dfrac{x+y}2 \right)^2$

ContentLicense: CC BY-SA 3.0


问:
Naming subfunctions of a piecewise function
How do I name the subfunctions of a piecewise function? Is it like this?

\begin{align*}f(x) &\;=\; \begin{cases}f_{1}(x) = x - 1 & \text{if } x \leqslant 1 \\ f_{2}(x) = x^{2} & \text{if } x > 1\end{cases}\end{align*}

答:
This is a pretty subjective question. The answer is more about style than anything. I'd do something like:

Let $f$ be defined by
\begin{align*}f(x) &\;=\; \begin{cases}f_{1}(x) & \text{if } x \leqslant 1 \\ f_{2}(x) & \text{if } x > 1\end{cases}\end{align*}
where $f_1(x) = x-1$ and $f_2(x) = x^2$.

But it's clear what you mean from how you've expressed it too.


问:
Calculation of expected value given cdf
Let $X$ be a continuous random variable with a distribution function.

$F(x) = \begin{cases} 0 &  0 < x  \\
      \alpha x^2  &  0 \le x < 2 \\1&x\ge2\end{cases}$

for some real $\alpha $. Then $E(X )$ is ?

since $F(X)$ is right continuous $F(2)=F(2)^-$

therefor $\alpha=\frac{1}{4}$

$E(X)=\int_{0}^{\infty}
[1-F(x)]dx=\int_{0}^{\infty}
(1-\frac{x^2}{4})dx=\left (x-\frac{x^3}{12}\right)_{0}^{2}=2-\frac{8}{12}=\frac{24-8}{12}=\frac{16}{12}=\frac{4}{3}$

Did I do it right? Can anyone please confirm  my answer?

答:
You cannot find the exact value of $\alpha$ but you can calculate the expectation, as you did

$$\int_0^2(1-F)dx=\dots =2-\frac{8}{3}\alpha$$

Where $0<\alpha \leq \frac{1}{4}$

Title: Calculation of expected value given cdf


问:
Functional calculus - Typo in Blackadar's Operator Algebras?
I was reviewing some C*-algebra theory in Bruce Blackadar's Operator Algebras - Theory of C*-Algebras and von Neumann Algebras, when I came upon what seems to be a typo. On page 61, the following corollary is stated:

Let $A$ be a C*-algebra, and $x$ a normal element of $A$. Then $C^*(x)$ is isometrically isomorphic to $C_0(\sigma_A(x))$ under an isomorphism which sends $x$ to the function $f(t) = t$.

Here, $C^*(x)$ is the C*-subalgebra generated by $x$. My confusion is about the notation $C_0(\sigma_A(x))$. The index of the book refers to page 52 for this notation, where it says $C_0(X)$ is the space of continuous (complex-valued) functions vanishing at infinity. However, in the context of the above result, it seems to me that this should instead be the space of continuous functions with $f(0)=0$.

Question 1: Is this use of notation a typo in Blackadar's book?

I realize my question is similar to this question about the same bad notation, but I thought it was worth drawing attention to this specific typo in this book for others who might be confused.

I would also like to ask a follow-up question to ensure that I have understood this material correctly. As far as I understand, there are two closely related isomorphism theorems for the functional calculus of C*-algebras:

If $A$ is a C*-algebra and $x \in A$ is normal, then $C^*(x) \cong \{f : \sigma_A(x) \rightarrow \mathbb{C}$ continuous, with $f(0)=0$ if $0 \in \sigma_A(x)$ $\}$ via an isomorphism sending $x$ to the function $f(t)=t$.

If $A$ is a unitary C*-algebra (with unit $1$) and $x \in A$ is normal, then $C^*(1,x) \cong \{f : \sigma_A(x) \rightarrow \mathbb{C}$ continuous $\}$ via an isomorphism sending $x$ to the function $f(t)=t$ and sending $1$ to the function $f(t)=1$.

Question 2: Are the above statements correct? If so, is there a reference that states these results explicitly?

答:
I'm not sure if it is a typo, as the notation \ kind of makes sense.

In the unital case, the natural isomorphism that the Gelfand transform gives is not onto $C(\sigma(x))$ but onto $C(\Sigma)$, where $\Sigma$ is the locally compact space of the characters with the weak$^*$-topology. Afterwards, one identifies the characters with the point evaluations.

When $A$ is not unital, the Gelfand transform gives you $A\simeq C_0^{\phantom{0}}(\Sigma)$, where here one indeed means the continuous functions vanishing at infinity. When one identifies the characters with the point evaluations at elements of $\sigma(x)$, $C_0(\Sigma)$ is mapped to $C_0(\sigma(x)\setminus\{0\})$; this in turn can be identified with the functions such that $f(0)=0$. Hence the notation, while not great, kind of makes sense.

You can find this stuff for instance in pages 7 and 8 in Davidson's C$^*$-Algebra by Example.


问:
What is the space BUC$(\mathbf{R})$?
I am reading a PDE paper from the 80's and the author uses the space $\text{BUC}(\mathbf{R})$. My only guess has been "bounded uniformly continuous". Is this correct? Has anyone else run across this notation before?

Paper is: "Regularizing Effects for First-Order Hamilton-Jacobi Equations" by P.L. Lions. I unfortunately do not have a link to it.

答:
In the unpublished preprint "Homogenization of Hamilton-Jacobi equations", Lions et al. define for a metric space $X$:
\begin{equation}
BUC(X) = \left\{ v \in C(X) \text{ s.t. $v$ is bounded and uniformly continuous on X}\right\}.
\end{equation}
Given your paper is by the same author and roughly the same topic, this should be the exact same definition in your case.

Title: What is the space BUC$(\mathbf{R})$?


问:
Example of vector space
In almost all the literature that I have seen, one of the examples of vector space is as follows:

Set of all real-valued functions $f(x)$ defined on the real line

what confuses me here is that the word "linear functions" should be used instead of just "functions" because I think we also have non-linear functions and they (non-linear functions)do not follow the rule of addition and multiplication as:

$ (f + g)(x)=f(x) + g(x) $ and $(kf)(x) = k f(x) $

thus, non-linear functions cannot make a vector space.

am I right or wrong?

答: You are confusing the definition of vector spaces and that of of linear maps between vector spaces. A linear map is compatible with the vector space structures at it input and output, but in defining a vector space of real valued functions, it is irrelevant what kind of domain they are defined on; the vector space nature comes from the fact that the output are real values, which can be added and multiplied by real numbers. You might just as well (and maybe less confusingly) consider the real valued function on $[0,1]$, or on the positive integers, neither of which has a vector space structure so that such function being linear is not even meaningful. Indeed if you take real valued functions $f$ on the finite set $\{1,2,3\}$, then  such an $f$ is completely determined by the triple $(f(1),f(2),f(3))$, and for the sum $f+g$ and scalar multiple $\lambda*f$ the triples would be $(f(1)+g(1),f(2)+g(2),f(3)+g(3))$ respectively $(\lambda f(1),\lambda f(2),\lambda f(3))$, which should remind you of another example of a vector space you have no doubt seen.

Title: Example of vector space


问:
Reference for very basic books in Functional analysis
I'm confused about which books I have to read for Functional analysis for the beginner level.

I need references for  very basic books  in Functional analysis and that book  must contain given Topics below

$1.$ Normed linear spaces,

$2.$ Banach spaces,

$3.$ Hilbert spaces,

$4.$ Compact operators.

$5.$ Properties  of $ C[0;1]$ and $L^p[0;1]$

$6.$ Continuous linear maps (linear operators).

$7.$ Hahn-Banach Theorem, Open mapping theorem,

$8.$ Closed graph theorem and the uniform boundedness principle.

答: Maybe A Friendly Approach to Functional Analysis by A. Sasane?</p>


问:
Stability of an ODE System with a Periodic Forcing Function
Suppose that $\alpha, \beta, \gamma, \rho$ and $\kappa$ are non-negative constants and define $f(t) \geq 0$ to be some forcing function. I have been struggling to get some insight into the following non-linear, first-order, system of differential equations.
\begin{align*}
x'(t) & = f(t) + \alpha \, y(t) - \beta \, x(t), \\
y'(t) & = \gamma \, x(t) - \alpha \, y(t) + \rho \,y(t)\left(1-\frac{y(t)}{\kappa}\right).
\end{align*}
So far, I can show that if $f(t) = a \geq 0$, a stable asymptotic equilibrium point exists. Otherwise, I have been looking at $f(t)=\sin(t)$. Plots show that the system approaches a stable periodic orbit but I am not sure how to show this mathematically. Obviously, if there is a way to obtain a closed-form expression for $\left(x(t),y(t)\right)$ that would be ideal but I am not sure that's possible.

If anyone could provide some insight into how to show that as $t \to \infty$, the system for $f(t)=\sin(t)$ tends to a periodic orbit I would be extremely grateful. Thank you so much for your time.

答:
Think of this system as a linear system $(\rho = 0)$. On those conditions, the stability is governed by the eigenvalues of $M = \left(
\begin{array}{cc}
 -\beta & \alpha \\
 \gamma & -\alpha \\
\end{array}
\right)$ which are $\left\{-\frac{1}{2} \left(\sqrt{(\alpha -\beta )^2+4 \alpha  \gamma }+\alpha +\beta \right),\frac{1}{2}
   \left(\sqrt{(\alpha -\beta )^2+4 \alpha  \gamma }-\alpha -\beta \right)\right\}$. Now if for instance $\alpha=2,\beta = -1,\gamma = -\frac{17}{16}$ both eigenvalues are negative so the homogeneous response goes to zero remaining the forced response describing a periodic orbit after a transient. Incorporating now the nonlinear term $\rho y\left(1-\frac{y}{\kappa}\right)$ the linear theory doesn't help. Perhaps for very small $\rho$. Concluding, this system is nonlinear and depends on $\alpha,\beta, \gamma,\rho,\kappa$ parameters. General considerations are hard to establish. The best way to study is dividing to conquer.


问:
Find a matrix M for an iterative method with spectral radius greater than 1
I have been trying to find a matrix $M$ with a size 3 x 3 for an iterative method $x_k = Mx_k +b$ with a spectral radius of M greater than 1, where in two instances the iteration converges based on the $x_0$ and $b$. And also diverges based on the $x_0$ and $b$. However, I don't really know how to find one that converges, since all the theorems I found state that the spectral radius of M is less than 1, then the iterative method converges. Is there any examples you guys can give me?

答:
Here is an example: take
$$
M = \pmatrix{1/2&0&0\\0&1/2&0\\0&0&2}, \quad b = \pmatrix{1\\0\\0}.
$$
The sequence will converge to the limit $x = 2b$ if and only if the last entry of $x_0$ is $0$.


问:
Is a binary function a set of ordered pairs?
The definition of a function, according to the book I have, is: a function is a set of ordered pairs, no two of which have the same first component. Thus an ordered pair in this set can be expressed as $\pmb{(a,b)}$ or $\pmb{(a, f(a))}$.

However, a binary function, from what I've read, implies a ternary relation, expressed as $\pmb{(a, b, f(a,b))}$, which is not an ordered pair but a triplet. Thus does not satisfy the definition of a function? Shouldn't it be expressed as ($\pmb{(a,b)}$, $\pmb{f(a,b)}$)? Because only then will it become an ordered pair. Makes sense because of the definition. If we defined the relation of sets $\pmb{A}$, $\pmb{B}$ and, let's say, $\pmb{C}$ as the cartesian product, then we get $\pmb{A \times B \times C}$ which implies taking the product of a set of ordered pairs, $\pmb{A \times B}$, and a set, $\pmb{C}$, whose elements aren't ordered pairs, so the possible combinations will be of the form ($\pmb{(a,b)}$, $\pmb{f(a,b)}$) or ($\pmb{(a,b)}$, $\pmb{c}$) where $\pmb{a}$, $\pmb{b}$ and $\pmb{c}$ are elements of $\pmb{A}$, $\pmb{B}$ and $\pmb{C}$ respectively, satisfying the definition previously stated and not ($\pmb{a}$, $\pmb{b}$, $\pmb{c}$), or is it a mere notation meant to simplify ($\pmb{(a,b)}$, $\pmb{f(a,b)}$)?

答:
Yes.

To be properly formal a binary function $f: A \times B \to C$ is a collection of pairs $(x,y)$ with $x \in A \times B$ and $y \in C$ such that each $x$ is the first element of exactly one pair. We write $f(x)$ for the second element of the pair.

Since elements of $A \times B$ have the form $(a,b)$ the function is a collection of pairs $((a,b),y)$. Then to be really REALLY formal you should write the outputs as $f((a,b))$ rather than $f(a,b)$.


问:
If $X_{1}, X_{2}$ is a r.s. from $N(0,\sigma^2)$ (Scale Family) show that $\frac{X_1}{X_2}\sim \operatorname{Cauchy}(0,1)$
If $X_{1}, X_{2}$ is a random sample from $N(0,\sigma^2)$ (Scale Family) show that $\frac{X_1}{X_2}\sim \operatorname{Cauchy}(0,1)$.

Here, I have been trying to use the CDF $F_{\frac{X_1}{X_2}}\left( y_{1} \right)=P\left( \frac{X_1}{X_2}\leq y_{1} \right)$. But I am confused in how to proceed.

答: This is a ratio distribution, where without loss of generality $\sigma=1$ so$$f_{X_1/X_2}(z):=\int_{\Bbb R}|x_2|\tfrac{1}{2\pi}e^{-(1+z^2)x_2^2/2}dx_2=\tfrac{1}{\pi}\int_0^\infty x_2e^{-(1+z^2)x_2^2/2}dx_2=\tfrac{1}{\pi(1+z^2)}.$$


问:
How to simplify $\int_z \left( \frac{1}{z}f(z) \int_y \int_x y~\frac{f(x,y,z) }{f(z)} \,dx\, dy \right)dz$?
I'm trying to simplify the following integral:

$$
\int_z \left( \frac{1}{z}f(z) \int_y \int_x  y~\frac{f(x,y,z) }{f(z)} \,dx\, dy \right)dz \tag{1}
$$

where $f(x,y,z)$ is the joint density function of $x,y,z$, where $x,y,z$ are not independent, and $f(z)= \int_y \int_x f(x,y,z) \,dx\,dy$.

Can I simplify integral $(1)$ by pulling $f(z)$ out of inner the integral and cancel it with the other $f(z)$?

$$\int_z \left( \frac{1}{z} \int_{y}\int_{x} y~f(x,y,z) \,dx\, dy \right)dz $$

答:
To avoid confusion with your univariate and multivariate $f$'s, you might want to write
\begin{equation}
f_Z(z) = \int_{X \times Y} f(x,y,z) \mu(dx,dy),
\end{equation}
where $\mu$ denotes Lebesgue measure. This is standard notation for the marginal density of $Z$. You can definitely pull out $f_Z(z)$ outside of the integral, as it is effectively just a constant in the integration with respect to $x$ and $y$ as it depends on neither. What you should perhaps be more worried about is the potential singularity arising from $f_Z(z_0) = 0$ for some $z_0$, which would lead to blow-up in the interior integrals, and hence by Tonelli's theorem, the expression you have is not integrable. If the set of all such $z_0$ is null then there is no issue, but otherwise you run into problems.


问:
Inequality-constrained quadratic program
I am trying to find the optimal solution to this:
$$\begin{aligned}
\min_{} \quad & x^TAx\\
\textrm{s.t.} \quad & c^Tx \ge 1\\
\end{aligned}$$
where $A \in \mathbb{S}_{+}^{n}$ ($n \times n$ symmetric positive semidefinite matrix) and $c \in \mathbb{R}^n$ is a nonzero vector.

I know I can use the first order optimality condition and would get $2Ax(y-x) \ge 0$ for all feasibly $y$. $x$ is only optimal when this inequality is true for all feasible $y$ but I'm not sure how to get the optimal $x$ knowing the inequality.

答: At optimality $c^Tx=1$ (if $c^Tx>1$, you can always rescale $x$ without making the objective function worse). Minimizing a quadratic function under a linear equality constraint is easy and boils down to solving a linear system.


问:
If $\mathbb{P}(A\cap B) = 1/2$, then why is it impossible that $\mathbb{P}(B | A) = 1 /3$?
I work with statistics and encountered this question. Have read about conditional probability and the formula under says that $\mathbb{P}(B|A)$ is the proportion of $A$ that is also $B$.

$$P(B|A) = \frac{\mathbb{P}(A\cap B)}{\mathbb{P}(A)}$$

done a little research but can not find anything about this formula that gives an impossible answer.

Someone that has a clue?

答: We have that $P(B|A) = \frac{\mathbb{P}(A\cap B)}{\mathbb{P}(A)}$. We are given that $\mathbb{P}(A\cap B) = 1/2$. We must prove that it is impossible to have $\mathbb{P}(B | A) = 1 /3$. Substitute the value we have into the expression to get $P(B|A) = \frac{\mathbb{P}(A\cap B)}{\mathbb{P}(A)} =\frac{1/2}{\mathbb{P}(A)}$. We also have $\mathbb{P}(B | A) = 1 /3$, so our expression becomes  $ 1 /3=\frac{1/2}{\mathbb{P}(A)}$. Solving for $\mathbb{P}(A)$, we get $\mathbb{P}(A)=3/2$. However, we know that is impossible, because probabilities must be between $0$ and $1$. Thus, it is impossible to have $\mathbb{P}(A\cap B) = 1/2$ and $\mathbb{P}(B | A) = 1 /3$ be true at the same time.


问:
Geometric distribution expected number of rolls
A pair of dice are repeatedly rolled until the two sum to ≥10. The expected number of times the pair is rolled is?

I understand how to apply the geometric to get the probability of an event, but I do not understand how to use it to get the expected number of rolls (in this case) to achieve a certain result.

答:
First, the probability that two dice sum up to $\ge 10$ is $\frac16$ since there are six possible events, $\{46, 55, 56, 64, 65, 66\}$. Thus, if $X$ counts the number of rolls, then $\Pr(X = k) = \frac16$. You can now simply use the fact that $\mathbb{E}(X) = \frac1p$ and get 6. Alternatively, here is the calculation:

$$\mathbb{E}(X) = \sum_{k = 1}^\infty k \cdot \Pr(X = k) = \sum_{k = 1}^\infty k (\frac56)^{k-1}\frac16 = \frac16 \sum_{k = 0}^\infty k(\frac56)^{k-1}$$

Let $f(x) = \frac{x}{1-x}$. Then for $x \in (0,1)$, we have $f(x) = \sum_{k = 0}^\infty x^k$. Thus, $\sum_{k = 0}^\infty kx^{k-1} = f'(x) = \frac{1}{(1-x)^2}$. Therefore, $\mathbb{E}(X) = \frac16f'(\frac56) = \frac16 \frac{1}{(\frac16)^2} = 6.$


问:
Where does the Euler-Mascheroni constant come from here?
As you probably know $\int \frac{e^{x}}{x}dx=\operatorname{Ei}(x)+C$. We can solve this using Taylor series:
$$\begin{align}\operatorname{Ei}(x)+C=\int \frac{e^{x}}{x}dx&=\int \frac{\sum_{n=0}^{\infty}\frac{x^{n}}{n!}}{x}dx\\&=\int \sum_{n=0}^{\infty}\frac{x^{n-1}}{n!}dx\\&=\int\frac{1}{x}+\sum_{n=1}^{\infty}\frac{x^{n-1}}{n!}dx\\&=\ln(x)+\sum_{n=1}^{\infty}\int\frac{x^{n-1}}{n!}dx\\&=\ln(x)+\sum_{n=1}^{\infty}\frac{x^{n}}{n!n}\end{align}$$ Now when I plug these values into wolfram alpha I'm off by the Euler-Mascheroni constant. It has a $+C$ in i so I'm not surprised its off by a constant but my question is why the Euler-Mascheroni constant. The true formula is:
$$\operatorname{Ei}(x)=\gamma+\ln(x)+\sum_{n=1}^{\infty}\frac{x^{n}}{n!n}$$

答:
Alright we know that $\operatorname{Ei(x)}=-E_{1}(-x)$. We also know that $E_{1}(x)=\int_{x}^{\infty}\frac{e^{-t}}{t}dt$ So if we find the series representation of $E_1(x)$ We can fint the series representation of $\operatorname{Ei(x)}$ we're golden:
$$E_{1}(x)=\int_{x}^{\infty}\frac{e^{-t}}{t}dt=\int_{x}^{1}\frac{e^{-t}}{t}dt+\int_{1}^{\infty}\frac{e^{-t}}{t}dt=\int_{1}^{\infty}\frac{e^{-t}}{t}dt-\int_{1}^{x}\frac{e^{-t}}{t}+\frac{1}{t}-\frac{1}{t}dt=\int_{1}^{\infty}\frac{e^{-t}}{t}dt-\int_{1}^{x}\frac{e^{-t}-1}{t}dt-\int_{1}^{x}\frac{1}{t}dt=\int_{0}^{1}\frac{e^{-t}-1}{t}dt-\ln(x)-\int_{0}^{1}\frac{e^{-t}-1}{t}dt-\int_{0}^{x}\frac{e^{-t}-1}{t}dt=-\gamma-\ln(x)-\int_{0}^{x}\frac{e^{-t}-1}{t}dt=-\gamma-\ln(x)-\sum_{n=1}^{\infty}\frac{(-1)^nx^{n}}{n!n}$$
Now just substitute and you get our formula for $\operatorname{Ei}(x)$:
$$\operatorname{Ei(x)}=\gamma+\ln(x)+\sum_{n=1}^{\infty}\frac{x^{n}}{n!n}$$


问:
Is it possible to express $f(q,p)= \sum_{n=0}^{\infty} \alpha_{n}(q)\beta_{n}(p) \ $?
Suppose we have a function $f:U\subset {\rm I\!R}^{2} \rightarrow {\rm I\!R}$ with as many derivatives as we want. I'll write $(q,p) \in U$.

I read a result on Quantum Mechanics where the author said he could write this function as:

$$f(q,p)= \sum_{n=0}^{\infty} \alpha_{n}(q)\beta_{n}(p),$$

for some set of functions $\{\alpha_{n}\}$, $\{\beta_{n}\}$.

Is it true?

I thought a possible argument is that we use exactly this form of function in the method of separation of variables used to solve linear PDEs. However, I do not know if this argument really holds.

Thank you, all.

答: While it's difficult to swallow this for an arbitrary $U\subset{\mathbb R}^2$ the Stone-Weierstrass theorem (see "Applications") easily gives it when $U=[a,b]\times[c,d]$, and in similar cases.


问:
Euclidean geometry, Prove that either $X, Y, Z, T$ belong to the same circle or $X, Y, Z, T$ belong to the same line.

Let the quadrilateral $ABCD$ have pairs of non-parallel opposite
sides. $O$ is the intersection of $AC$ and $BD$. The circumcircle of
the triangles $OAB$, $OCD$ intersect at $X$ different from $O$. The
circles The circumcircle of the triangles $OAD$, $OCB$ intersect each
other at $Y$ different from $O$. The circles with diameters $AC$, $BD$
intersect at $Z$, $T$. Prove that either $X, Y, Z, T$ belong to the
same circle or $X, Y, Z, T$ belong to the same line.

This is an assignment from my maths teacher, when i have learned about Harmonic Division.

I can't solve this geometry problem. Any hints are appreciated.

答:
Invert the configuration around $O$ with arbitrary radius, and let $P'$ be the image of the point $P$. The position of the images I will introduce now can be proven with well-known properties of inversion that I will outline, and you might want to look at the diagram below in order to visualize the resulting construction after the inversion.

Notice that $(\triangle OAB), (\triangle OCD), (\triangle OAD), (\triangle OBC)$ will be sent to lines $A'B', C'D', A'D', B'C'$ respectively since the four circumcircles contain the inversion center $O$. Thus, $X'=A'B'\cap C'D'$ and $Y'=D'A'\cap B'C'$. At the same time, the circles $\Gamma_1, \Gamma_2$ with diameters $AC, BD$ respectively will be sent to the circles $\Gamma_1', \Gamma_2'$ with diameters $A'C', B'D'$ since their centers lie on $AC\ni O, BD\ni O$ respectively. Finally, $X,Y,Z,T$ will lie either on a circle or on a line if and only if $X',Y',Z', T'$ do so.

Thus, the equivalent problem reads:

Given a quadrilateral $A'B'C'D'$, define $X'=A'B'\cap C'D'$ and $Y'=D'A'\cap B'C'$. Also, let $T',Z'$ be the intersections of the circles with diameters $A'C'$ and $B'D'$. Prove that $X',Y',Z',T'$ are either concyclic or collinear.

Yet this follows from Gauss-Bodenmiller Theorem.

 For the proof: We will prove that the desired circle has the diameter $X'Y'$. Consider now the orhocenters $H_1,H_2, H_3, H_4$ of triangles $X'A'D', X'B'C', Y'B'A', Y'C'D'$ respectively. The idea is to take any orthocenter and show that it has the same power with respect to all three circles. Hence all four orthocenters lie on all the radical axes. This implies the conclusion.


问:
system of non-linear differential equations $x'=y^2$ and $y'=x^2$
I am working on Exercise 2.90 in Jeffrey M. Lee's book Manifolds and Differential Geometry. To solve it, I need to solve the following system of non-linear differential equations:
$$
\begin{array}{rcl}
\displaystyle \frac{dx}{dt}&=&y^{2} \\
\displaystyle \frac{dy}{dt}&=&x^{2}
\end{array}
$$
Integrating the second equation and substitution into the first equation gives me
$$
dx=\left(\int{}x^{2}\,dt\right)^{2}dt
$$
but I don't know where to go from there.

答: One approach is to guess at the form of solutions.  I tried exponentials and products and that didn't seem to work.  Polynomials went nowhere.  But then I tried power functions.  A solution is $$ x = \frac{-1}{t}, y = \frac{-1}{t}$$


问:
Solve transcendental equation : $\tanh(\alpha x) =\arctan(x)$, at $0<\alpha-1 \ll 1$ and at $\alpha\gg 1$?
To solve this transcendental equations approximately :

Preivous: $\tanh(\alpha x) =\arctan(x)$, at $0<\alpha-1 \leq 1$ and at $\alpha\geq 1$.

Edit: $\tanh(\alpha x) =\arctan(x)$, at $0<\alpha-1 \ll 1$ and at $\alpha\gg 1$.

I need hint on how to start? I'm thinking to use Newton's Method of Iteration but don't know how?

答:
To solve $f(x)=0$ with$$f(x):=\tanh(\alpha x)-\arctan x\implies x-\frac{f}{f^\prime}=x-\frac{\tanh(\alpha x)-\arctan x}{\alpha\operatorname{sech}^2(\alpha x)-\tfrac{1}{1+x^2}}$$by Newton-Raphson, you just need a suitable choice of $x_0$. There's an obvious root at $x=0$ but, as we're not interested in that, we seek positive roots ($f$ is odd, so there's no point looking for negative ones; their locations follow from finding the positive ones). Indeed, for $\alpha>1$ we have a small-$x>0$ behaviour $f\sim(\alpha-1)x>0$, but $\lim_{x\to\infty}f(x)=1-\pi/2<0$, so some positive root exists.

We want $x_0$ to approximate this, so we don't converge to $x_0$ instead. For small $x$,$$\frac{f(x)}{x}\approx\alpha-1-\tfrac13(\alpha^3-1)x^2,$$which is $0$ at $x=x^\ast:=\frac{3}{\alpha^2+\alpha+1}$. @LutzLehmann, who has found this is too small a choice of $x_0$ for $\alpha-1\ll1$, has suggested $x_0=\tan1$, for which $\tanh(\alpha x)\approx1=\arctan x$. For $\alpha\gg1$, I expect $x_0=x^\ast$ to still be unhelpfully small.


答:
Rather than guess, you can also look at $dy/dx = (dy/dt)/(dx/dt)$ which leads to
$$ \frac{dy}{dx} = \frac{x^2}{y^2} \implies y^2 dy = x^2 dx \implies y^3 = x^3 + C. $$

Title: system of non-linear differential equations $x'=y^2$ and $y'=x^2$

Body:
I am working on Exercise 2.90 in Jeffrey M. Lee's book Manifolds and Differential Geometry. To solve it, I need to solve the following system of non-linear differential equations:
$$
\begin{array}{rcl}
\displaystyle \frac{dx}{dt}&=&y^{2} \\
\displaystyle \frac{dy}{dt}&=&x^{2}
\end{array}
$$
Integrating the second equation and substitution into the first equation gives me
$$
dx=\left(\int{}x^{2}\,dt\right)^{2}dt
$$
but I don't know where to go from there.


问:
Finding an Explicit formula using Backtracking
I have just started learning Recurrence Relation and there's this topic where we have to find explicit formula using Backtracking.
There is this one question thats bugging my head a lot, ie.

$$ c_n = c_{n-1} + n \\ c_1 = 4$$

I end up getting the answer $4+(n(n+1))/2$, while the right answer is $3+(n(n+1)/2)$
Can someone please help?

答:
I am not quite sure what the backtracking strategy is, by I have the following solution.

By definition $c_n = c_{n-1} + n$. Let’s continue to expand: $c_n = (c_{n-2} + n-1) + n = \ldots = c_1 + 2 + \ldots + n = 3 + (1 + 2 + \ldots + n) = 3 + \frac{n(n+1)}{2}.$

Here I used the fact that $1 + 2 + \ldots + n = \frac{n(n+1)}{2}$.

One can proof it this way: $n(n+1) = \underbrace{(n+1)+\cdots+(n+1)}_{n\text{ times}} = (n + 1) + ((n - 1) + 2) + ((n-2)+3)+\cdots + (3+(n-2))+(2 + (n-1))+(1 + n) = (n + (n-1) + \cdots + 2 + 1) + (1+ 2 +\cdots+(n-1)+n)=2(1+ 2 +\cdots+(n-1)+n).$


问:
Why are components of vectors scalars?
Lets say we have a vector 1i+2j, I saw that the components of the vectors are said to be scalars, how can that be possible, doesnt 1i have a direction, also if they were a scalar why are the following vector laws of addition,</p>

答:
It's probably inviting down-votes to quote a Physics textbook on the Mathematics Stack Exchange, but at least this book, Principles of Mechanics by Synge and Griffiths, was well-respected in its time. The writers recognise that some people use "components of vector, V" to mean vectors in chosen directions that add (vectorially!) to make V. S and G call these, "vector components of V". These vector components can be thought of as products of unit vectors in the chosen directions, and scalar coefficients. Synge and Griffiths call the coefficients "the scalar components of V".

Distinguishing between "vector components" and "scalar components" removes ambiguity in how the term is being used. Although S and G were dealing exclusively with vectors in 3-dimensional space, the distinction could surely be carried over to more abstract vectors.

Title: Why are components of vectors scalars?


问:
How to find the value of $4\int \frac{1}{y(3y+2)}dy$?
I'm trying to solve:

$4\int \frac{1}{y(3y+2)}dy$

And I got up to:

$-4\int \frac{1}{v^{2}+1}dv$ However, I used symbolab to help me get to this stage. Although, it mentions here:

Is there a proof for common integral in the image?

I though it would have made sense to have $\int \frac{1}{v^{2}+1}= tan^{-1}(v)$, why is this not the case? I know why this does not work now

Whilst practicing from the given hint, I've come this far:

$\frac{-v^{2}-1}{-v^{2}+1}-\frac{1}{-v^{2}+1} = \frac{v^{2}+2}{-v^2+1}$ am I on the right track?

although i'm thinking that I could do:

$4\int\frac{2}{v+1}-\frac{1}{v-1} dv?$ This gets me: $4[2 \ln|v+1| - \ln|v-1|]$ Although, I'm not sure how to derive the fraction $\frac{1}{2}$.

The equation on top is only part of an equation.

The full equation is:

$$\int \frac{3y-4}{y(3y+2)}dy$$

So I split it into:

$\int \frac{3y}{y(3y+2)}dy$ - $4\int \frac{1}{y(3y+2)}dy$ As this was easier.

答:
HINT

\begin{align*}
\frac{1}{y(3y+2)} & = \frac{1}{2}\times\frac{2}{y(3y+2)}\\\\
& = \frac{1}{2}\times\frac{(3y + 2) - 3y}{y(3y+2)}\\\\
& = \frac{1}{2}\times\left(\frac{1}{y} - \frac{3}{3y+2}\right)
\end{align*}

Can you take it from here?


问:
Probability that cubic of integer ends with 11
Let $x$ be an integer between $1$ and $10^{12}$. What is the probability that $x^3$ ends with 11?

I started with expressing $x^3=(a+10b)^3$ and applied binomial theorem to get $$x^3 = a^3+300b^2a+30a^2b+1000b^3 $$
How do I proceed from here?
Thanks.

答:
If $x^3 \equiv 1 \bmod 100$, then $x^2 x \equiv 1$ and so $x$ is a unit mod $100$.
The group of units mod $100$ has order $\phi(100)=40$.
Therefore, since $\gcd(40,3)=1$, the map $x \mapsto x^3$ is a bijection.
Thus, there is exactly one $x$ such that $x^3 \equiv 11 \bmod 100$.


问:
Counting symmetric unitary matrices with elements of equal magnitude
Let $X$ be an $n\times n$ symmetric unitary matrix with elements of equal magnitude and the elements of the first row (and the first column, of course) are $1/\sqrt{n}$, i.e. $X_{j,k} = e^{i \phi_{j,k}}/\sqrt{n}$ with $\phi_{j,k}=\phi_{k,j} \in \mathbb{R}$ and $\phi_{1,k}=0$.
Prove (or disprove) that such matrix is unique up to permutations.

The background here is to get understanding of the set of bases in $\mathbb{C}^n$ with coordinates differ by phase factors only. The orthogonality relation $(v_j, v_k) = n^{-1}\sum_l \exp(i(\phi_{j,l}-\phi_{k,l})) = 0$ for $j \ne k$ is invariant with respect to $\phi_{j,k} \to \phi_{j,k}+\omega_j + \omega_k$. This would be great if the set could be obtained from a particular choice

$$X_{j,k} = \frac{1}{\sqrt{n}}\exp\left(\frac{2\pi i}{n} (j-1)(k-1)\right)$$

by permutations and the symmetry transformation.

The statement seems plausible since the matrix $X$ is determined by $n(n-1)/2$ phases with $n(n-1)/2$ constraints imposed by orthogonality relations. The proof, however, is lacking. I would greatly appreciate help in a form of proof/disproof or a strong hint.

答:
The matrix in question is not unique, at least not in all dimensions.

Consider your chosen matrix $X$ with $n=4$; this is the discrete Fourier matrix
$$X=\frac{1}{2}\begin{pmatrix}1&1&1&1\\
1&i&-1&-i\\
1&-1&1&-1\\
1&-i&-1&i
\end{pmatrix}$$

Another matrix with $n=4$ that satisfies your criteria is the Hadamard matrix
$$H=\frac{1}{2}\begin{pmatrix}1&1&1&1\\
1&1&-1&-1\\
1&-1&-1&1\\
1&-1&1&-1
\end{pmatrix}$$

Because the two matrices share the same first row and column, they cannot be obtained from each other by multiplying rows or columns by phases.

Now, your statement is true when $n=1$ (trivially), $n=2$ (because the condition on the first row and column leaves only a single element to be determined), and $n=3$ (where the two possible matrices are equivalent up to a permutation of the final two rows or columns). The degree of freedom argument that you presented breaks down because all of the phases in $X$ depend on the same root of unity. So, one could still ask whether there are other dimensions for which your statement is true. For example, is it true for prime dimensions?


问:
Regular perturbation for a elliptic equation?
I focus on the following problem
$$u_{xx}+u^3=f+\epsilon g,\quad x\in(0,1),\\u(0)=u(1)=0,\tag{1}$$
If we have known $w$ solves the problem
$$w_{xx}+w^3=f,\quad x\in(0,1),\\w(0)=w(1)=0,\tag{2}$$
and for the small perturbation $\epsilon g$ with $0<\epsilon\ll1$, we set $u=w+v_\epsilon$ is the solution of $(1)$. Is there some standard methods to get the existence of $u$ or $v_\epsilon$, and I also need some smallness bound for the solution $v_\epsilon$ in a certain smooth norm (e.g. Sobolev norm)? Any recommendation and reference wil be appreciated！</p>

答:
What you get is that $v/\varepsilon$ is approximately the solution of the linearized equation
\begin{align*}v_{xx} + 3\,w^2\,v &= g\\v(0) = v(1) &= 0\end{align*}
In particular, you have
$$\lVert u - w - \varepsilon \, v\rVert_{H^1} \, \varepsilon^{-1} \to 0$$
as $\varepsilon \to 0$.
This can be proven by the implicit function theorem.</p>


问:
How to compute $ \lim_{n\rightarrow\infty}{\frac{1+2\cdot2!+\dots+n\cdot n!}{(n+1)!}}$?
I'm asked to find the limit of the following sequence:

$$ \lim_{n\rightarrow\infty}{\frac{1+2\cdot2!+\dots+n\cdot n!}{(n+1)!}}$$

I've tried using the Stolz Theorem with $a_n=1+2\cdot2!+\dots+n\cdot n!$ and $b_n=(n+1)!$. As $\frac{a_{n+1}-a_n}{b_{n+1}-b_n} \rightarrow1$ I concluded that the limit of the sequence is 1.

I wanna know if my result is correct and if there is another way to find this limit.

答:
HINT

You can make use of the following identity, which can be proved through induction:
\begin{align*}
1 + 2\cdot 2! + 3\cdot 3! + \ldots + n\cdot n! = (n+1)! - 1
\end{align*}


问:
$\textit{Why}$ the cases in 4 $\nmid n^2 - 3?$ (bases cases in modular induction)
This question has already been answered here. My question is, when we suppose the hypothesis is not true (proof by contradiction), namely that $4 \mid (n^2 - 3)$, we get $n^2 - 3 = 4k$ for some integer $k$ and then we have two cases. But where does the two cases come from? In addition, why does putting them into two cases work to prove the statment? My thought process would be to try to prove this statement by contradiction and somehow figure out a way to produce a contradiction similar to how $\sqrt{2}$ is proved by contradiction. Any help is great!

Let me know if I need to clarify more!

答: So $n^2\equiv 0,1\pmod 4$. Hence $n^2-3\equiv 1,2\pmod 4$ which is not a multiple of $4$.


问:
What is the dimension of the given vector space?

Let $V$ be the real vector space of all continuous functions $f:[0, 2] \to \mathbb{R}$ such that the restriction of $f$ to the interval $[0, 1]$ is a polynomial of degree less than or equal to $2$, the restriction of $f$ to the interval $[1, 2]$ is a polynomial of degree less than or equal to $3$ and $f(0) = 0$.  Then the dimension of $V$ is equal to $\underline{\qquad}$.

(Original at https://i.stack.imgur.com/ep0s1.jpg)

So I gave an entrance exam and this was one of the questions. I answered that its dimension is 2, as the constant term in each function is 0 and there won't be $x^3$ in V as when restricted to [0,1], it won't be a polynomial of degree $\leq$2. So I am just left with $x$ and $x^2$, hence dimension of V is 2.

Is my reasoning and answer correct?

答:
The answer is $5$.

To see why, observe that $f$ on the interval $[0,1]$ is of the form $ax^2+bx$, and on the interval $[1,2]$, it is of the form $cx^3+dx^2+ex+a+b-c-d-e$. As there are $5$ independent variables here, you can show that the dimension of the resulting space is $5$.


问:
How to solve this combinatorial problem correctly?
Question: Ten different candies are given to three children A, B and C. each child has at least one. How many different ways are there?

I use two different methods to solve this problem:

```<code>    f[1, n_] := n;
    f[n_, 1] := 1;
    f[n_, m_] := f[n, m] = m (f[n - 1, m - 1] + f[n - 1, m])

    f[10, 3]

</code>```
```<code>    Select[Tuples[Range[3], 10], Length[Union[#]] == 3 &] // Length
</code>```

But the result of the first method is not equal to StirlingS2[10, 3] 3!. I want to know how to solve this problem correctly?

答:
Here is how I solve it:

1- Use FrobeniusSolve to find all possible solutions (how many candies each kid gets):

```<code>FrobeniusSolve[{1, 1, 1}, 10]

(*Out: {{0, 0, 10}, {0, 1, 9}, {0, 2, 8}, {0, 3, 7}, ...} *)
(*Output Length: 66 *)
</code>```

2- Since each kid should gets at least one candy, filter the possibilities contain zero:

```<code>ps = DeleteCases[FrobeniusSolve[{1, 1, 1}, 10], l_ /; MemberQ[l, 0]];

(*Out: {{1, 1, 8}, {1, 2, 7}, {1, 3, 6}, {1, 4, 5}, ...} *)
(*Output Length: 36 *)
</code>```

To create a list like yours that specify which candy goes to which kid, I use MapIndexed, for example:

```<code>Flatten[MapIndexed[ConstantArray[#2, #1] &, {1, 8, 1}]]
(*Out: {1, 2, 2, 2, 2, 2, 2, 2, 2, 3} *)
</code>```

For finding out how many ways you can distribute in {1,8,1} format, I use Permutations which produces all the tuples without duplicate:

```<code>Length[Permutations[Flatten[MapIndexed[ConstantArray[#2, #1] &, {1, 8, 1}]]]]
(*Out: 90 *)
</code>```

3- Now just apply previous steps to all the possibilities stored in ps and sum it up:

```<code>Sum[Length[Permutations[Flatten[MapIndexed[ConstantArray[#2, #1] &, i]]]], {i,ps}]

(*Out: 55980 *)
</code>```

OwnerDisplayName: Please correct GrammarMistakes

Body:
Here is how I solve it:

1- Use FrobeniusSolve to find all possible solutions (how many candies each kid gets):

FrobeniusSolve[{1, 1, 1}, 10]

(*Out: {{0, 0, 10}, {0, 1, 9}, {0, 2, 8}, {0, 3, 7}, ...} *)
(*Output Length: 66 *)

2- Since each kid should gets at least one candy, filter the possibilities contain zero:

ps = DeleteCases[FrobeniusSolve[{1, 1, 1}, 10], l_ /; MemberQ[l, 0]];

(*Out: {{1, 1, 8}, {1, 2, 7}, {1, 3, 6}, {1, 4, 5}, ...} *)
(*Output Length: 36 *)

To create a list like yours that specify which candy goes to which kid, I use MapIndexed, for example:

Flatten[MapIndexed[ConstantArray[#2, #1] &, {1, 8, 1}]]
(*Out: {1, 2, 2, 2, 2, 2, 2, 2, 2, 3} *)

For finding out how many ways you can distribute in {1,8,1} format, I use Permutations which produces all the tuples without duplicate:

Length[Permutations[Flatten[MapIndexed[ConstantArray[#2, #1] &, {1, 8, 1}]]]]
(*Out: 90 *)

3- Now just apply previous steps to all the possibilities stored in ps and sum it up:

Sum[Length[Permutations[Flatten[MapIndexed[ConstantArray[#2, #1] &, i]]]], {i,ps}]

(*Out: 55980 *)

OwnerDisplayName: Beny Izd


答:
This is the definition of StirlingS2 (not showing conditions of having positive integers):

```<code>stirling[n_, m_] := (1/m!) Sum[(-1)^(m - k) Binomial[m, k] k^n, {k, 0, m}]
stirling[10,3]
(* 9330 *)
</code>```

Removing the factor (1/m!), you get:

```<code>f[n_, m_] := Sum[(-1)^(m - k) Binomial[m, k] k^n, {k, 0, m}]
f[10,3]
(* 55980 *)
</code>```

Title: How to solve this combinatorial problem correctly?

Body:
Question: Ten different candies are given to three children A, B and C. each child has at least one. How many different ways are there?

I use two different methods to solve this problem:

```<code>    f[1, n_] := n;
    f[n_, 1] := 1;
    f[n_, m_] := f[n, m] = m (f[n - 1, m - 1] + f[n - 1, m])

    f[10, 3]

</code>```
```<code>    Select[Tuples[Range[3], 10], Length[Union[#]] == 3 &] // Length
</code>```

But the result of the first method is not equal to StirlingS2[10, 3] 3!. I want to know how to solve this problem correctly?

Body:
This is the definition of StirlingS2 (not showing conditions of having positive integers):

stirling[n_, m_] := (1/m!) Sum[(-1)^(m - k) Binomial[m, k] k^n, {k, 0, m}]
stirling[10,3]
(* 9330 *)

Removing the factor (1/m!), you get:

f[n_, m_] := Sum[(-1)^(m - k) Binomial[m, k] k^n, {k, 0, m}]
f[10,3]
(* 55980 *)

OwnerDisplayName: Jean-Pierre


问:
How do I prove that the sine function on the domain $[-1/2, 1/2]$ is injective?
How do I prove that the sine function on the domain $[-1/2, 1/2]$ is injective?

I completely understand the concept but I'm having trouble writing a proof for this. Thanks in advance.

答:
If a continuous function $f(x)$ is strictly increasing or decreasing over an interval $N$, then it is injective over $N$.

The derivative of $\sin(x)$ is strictly positive over $[-\frac{1}{2},\frac{1}{2}]$, therefore it is strictly increasing over $[-\frac{1}{2},\frac{1}{2}]$.


Body:
f[1, m_ /; m > 1] = 0;
f[n_ /; n >= 1, 1] = 1;
f[n_, m_] := f[n, m] = m (f[n - 1, m - 1] + f[n - 1, m]); TableForm[
 MapAt[Style[#, Red] &,
  Table[f[m, n], {m, 1, 10}, {n, 1, 10}], {10, 3}],
 TableHeadings -> Automatic]

OwnerDisplayName: cvgmt


问:
Find unitary matrices $M=[m_{ij}]_{N\times N}$ with elements $|m_{ij}|=1/\sqrt{N}$

TL;DR

I'm trying to prove the following conjecture:

For every positive integer $N$, there exists a unitary matrix $M=[m_{ij}]_{N\times N}$ (i.e., $M^* M = MM^* = I$) such that every element of $M$ has absolute value equal to $1/\sqrt{N}$ (i.e., $|m_{ij}|=1/\sqrt{N}$).

I don't know if that statement is true or not, but I have reasons to believe it is. I'm particularly interested in odd values of $N$.

Any kind of insight or reference (Wikipedia article, etc.) is much appreciated.

Examples

I was able to find examples of such matrices for odd $N$ up to $9$:

$N=1$ (trivial):

$$M_1 = \begin{bmatrix}1\end{bmatrix}$$

$N=3$:

$$a = e^{2\pi i/3}$$

$$M_3 = \frac{1}{\sqrt{3}}\begin{bmatrix}1&a&\bar{a}\\
                                       1&\bar{a}&a\\
                                       1&1&1\end{bmatrix}$$

$N=5$:

$$a = e^{2\pi i\cdot1/5}$$
$$b = e^{2\pi i\cdot2/5}$$

$$M_5 = \frac{1}{\sqrt{5}}\begin{bmatrix}1&a&\bar{a}&b&\bar{b}\\
                                       1&\bar{a}&a&\bar{b}&b\\
                                       1&b&\bar{b}&\bar{a}&a\\
                                       1&\bar{b}&b&a&\bar{a}\\
                                       1&1&1&1&1\end{bmatrix}$$

$N=7$:

$$a = e^{2\pi i\cdot1/7}$$
$$b = e^{2\pi i\cdot2/7}$$
$$c = e^{2\pi i\cdot3/7}$$

$$M_7 = \frac{1}{\sqrt{7}}\begin{bmatrix}1&a &\bar{a}&c &\bar{c}&b &\bar{b}\\
      1&\bar{a}&a &\bar{c}&c &\bar{b}&b \\
      1&b &\bar{b}&\bar{a}&a &\bar{c}&c \\
      1&\bar{b}&b &a &\bar{a}&c &\bar{c}\\
      1&c &\bar{c}&b &\bar{b}&\bar{a}&a \\
      1&\bar{c}&c &\bar{b}&b &a &\bar{a}\\
      1&1 &1 &1 &1 &1 &1\end{bmatrix}$$

$N=9$:

$$a = e^{2\pi i\cdot1/9}$$
$$b = e^{2\pi i\cdot2/9}$$
$$c = e^{2\pi i\cdot3/9}$$
$$d = e^{2\pi i\cdot4/9}$$

$$M_9 = \frac{1}{\sqrt{9}}\begin{bmatrix}1&a &\bar{a}&d &\bar{d}&\bar{b}&b &c &\bar{c}\\
      1&\bar{a}&a &\bar{d}&d &b &\bar{b}&\bar{c}&c \\
      1&b &\bar{b}&\bar{a}&a &\bar{d}&d &\bar{c}&c \\
      1&\bar{b}&b &a &\bar{a}&d &\bar{d}&c &\bar{c}\\
      1&c &\bar{c}&c &\bar{c}&c &\bar{c}&1 &1 \\
      1&\bar{c}&c &\bar{c}&c &\bar{c}&c &1 &1 \\
      1&d &\bar{d}&\bar{b}&b &a &\bar{a}&c &\bar{c}\\
      1&\bar{d}&d &b &\bar{b}&\bar{a}&a &\bar{c}&c \\
      1&1 &1 &1 &1 &1 &1 &1 &1\end{bmatrix}$$

It took me a long time to find those matrices and I can't see any pattern that would make it easy to generalize the construction for arbitrary odd values of $N$.

Context

I was studying the solution to the Schrödinger equation for the hydrogen atom and I noticed that the usual expressions for the probability distribution for the orbitals higher than s didn't have spherical symmetry:

This is perfectly reasonable if you measure the angular momentum of an electron and choose a reference frame such that one of the axis is aligned with the angular momentum vector. But before measuring anything, the system has spherical symmetry, so the probability distribution also has to be spherically symmetric.

For a single electron, it's easy to see how this works: the electron is in a superposition of all the orbitals of the same type. For example, for the orbital $2p$:

$$\Psi_{2p} = \frac{1}{\sqrt{3}}|2p_x\rangle + \frac{1}{\sqrt{3}}|2p_y\rangle + \frac{1}{\sqrt{3}}|2p_z\rangle$$

where the wave functions for each state $|2p\rangle$ are given by:

$$\Psi_{2p_x}(r,\theta,\phi) = R(r)\sqrt{\frac{3}{8\pi}}\sin\theta \;e^{-i\phi}$$

$$\Psi_{2p_y}(r,\theta,\phi) = R(r)\sqrt{\frac{3}{8\pi}}\sin\theta \;e^{i\phi}$$

$$\Psi_{2p_z}(r,\theta,\phi) = R(r)\sqrt{\frac{3}{4\pi}}\cos\theta$$

where

$$R(r) = \frac{1}{\sqrt{24a_0^3}}\cdot\frac{r}{a_0}\cdot e^{-r/2a_0}$$

The probability distribution is given by:

$$\begin{array}{} P_{2p}(r,\theta,\phi) &= \langle\Psi_{2p}|\Psi_{2p}\rangle \\
 &= \frac{1}{3}\langle\Psi_{2p_x}|\Psi_{2p_x}\rangle + \frac{1}{3}\langle\Psi_{2p_y}|\Psi_{2p_y}\rangle + \frac{1}{3}\langle\Psi_{2p_z}|\Psi_{2p_z}\rangle \\
 & = R^2(r)\end{array}$$

So the electron is indeed spherically distributed around the nucleus.

For more electrons, things get much more complicated. Because of the Pauli exclusion principle, the wave functions need to be orthogonal to each other (ignoring spin):

$$\langle\Psi_{i}|\Psi_{j}\rangle = \delta_{ij}$$

For the $2p$ orbital with 3 electrons (ignoring spin), one solution is:

$$\Psi_{2p_1} = \frac{1}{\sqrt{3}}|2p_x\rangle + \frac{e^{2\pi i/3}}{\sqrt{3}}|2p_y\rangle + \frac{e^{-2\pi i/3}}{\sqrt{3}}|2p_z\rangle$$

$$\Psi_{2p_2} = \frac{1}{\sqrt{3}}|2p_x\rangle + \frac{e^{-2\pi i/3}}{\sqrt{3}}|2p_y\rangle + \frac{e^{2\pi i/3}}{\sqrt{3}}|2p_z\rangle$$

$$\Psi_{2p_3} = \frac{1}{\sqrt{3}}|2p_x\rangle + \frac{1}{\sqrt{3}}|2p_y\rangle + \frac{1}{\sqrt{3}}|2p_z\rangle$$

You can see that the problem of finding the coefficients for each eigenfunction is the same as finding the matrices $M$ described above. In the case of the $2p$ orbital, for example, the coefficients are the elements of $M_3$:

$$\begin{bmatrix} \Psi_{2p_1}\\\Psi_{2p_2}\\\Psi_{2p_3}\end{bmatrix} = M_3 \begin{bmatrix} |2p_x\rangle\\|2p_y\rangle\\|2p_z\rangle \end{bmatrix}$$

Related Questions

Counting symmetric unitary matrices with elements of equal magnitude

Unitary matrix with unit entries

答: These matrices are known as complex Hadamard matrices. In many dimensions, multiple different families of such matrices are known in addition to the discrete Fourier transform  (tabulated here).</p>


问:
Determine if the sets $A=\{(x,y) \mid x <1\}$ and $B=\{(x,y)\mid y=x^2\}$ are closed?

Determine if the sets $A=\{(x,y) \mid x <1\}$ and $B=\{(x,y)\mid y=x^2\}$ are closed?

For $A$ I have that the complement $A^c=\{(x,y) \mid x \geqslant1\}$ which is closed so this would imply that $A$ is open? For $B$ I'm not entirely sure how to determine this. $B$ seems to be closed, but I'm not sure how to formalize this?

答:
Take the sequence of elements in $ A $  defined by
$$u_n=(1-e^{-n},0).$$

$$\lim_{n\to+\infty}u_n=(1,0)\notin A$$
$$\implies A \text{ is not closed}$$


答:
Your answer is not correct because the polynomials on $[0,1]$ and $[1,2]$ are not supposed to be the same.

The dimension of the space of the functions, without the conditions of continuity and $f(0)=0$ is equal to $3+4=7$. The conditions $f(0)=0$ and the continuity over $[0,2]$ impose two linearly independent conditions. Finally the dimension is equal to $5$.

Title: What is the dimension of the given vector space?

Body:
Let $V$ be the real vector space of all continuous functions $f:[0, 2] \to \mathbb{R}$ such that the restriction of $f$ to the interval $[0, 1]$ is a polynomial of degree less than or equal to $2$, the restriction of $f$ to the interval $[1, 2]$ is a polynomial of degree less than or equal to $3$ and $f(0) = 0$.  Then the dimension of $V$ is equal to $\underline{\qquad}$.

(Original at https://i.stack.imgur.com/ep0s1.jpg)

So I gave an entrance exam and this was one of the questions. I answered that its dimension is 2, as the constant term in each function is 0 and there won't be $x^3$ in V as when restricted to [0,1], it won't be a polynomial of degree $\leq$2. So I am just left with $x$ and $x^2$, hence dimension of V is 2.

Is my reasoning and answer correct?


问:
Is there a general rule for when $dx$ is appropriate?
I was watching the Numberphile's episode on Gabriel's Horn paradox where they separately calculated

the volume of the horn

and its surface

The volume was calculated by slicing the horn into small pieces of width $\textrm{d}x$ and assuming that for infinitesimally small $\textrm{d}x$ they can be modeled by cylinders, yielding

$$V = \pi \int_1^\infty \frac{1}{x^2} \textrm{d}x  = \pi$$

For the surface, however, they did not pretend the same - the infinitesimal parts were not modeled as rings (and then follow the same path to find the area).

There was a very short handwaving mention of why looking at them as conical frustra instead is important but that was it.

My question (please note that the Gabriel's Horn paradox is just an illustration of the general question which follows): is there a general rule for when taking infinitesimal parts of [whatever] and pretending that they are [something easy to calculate] is the proper approach, and when not?

答:
A general rule is "if it works in the linear case, you can use it."

Using solid cylinders for volume of revolution gives the correct answer when you apply it to a right circular cone, that is, when the bounding curve is a line.

Using the boundaries of those disks for the surface area fails because it understates the area of the right circular cone by a constant factor -- $\sec^2 \theta$ where $\theta$ is the angle between the horizontal and the bounding line.

A more sophisticated way to show this is to show that the error in using the approximation goes to zero as the fineness of partitioning the Riemann sums improves.  For the volume, the error goes to zero in the limit as the partition is refined.  For the surface area, the error does not go to zero, unless the disks are replaced with conical frusta.


问:
Rank of submatrices: clarify an apparent contradiction
Consider the matrix
$$
A\equiv \begin{pmatrix}
B & C & D\end{pmatrix}^\top \begin{pmatrix}
B & C & D\end{pmatrix}= \begin{pmatrix}
B^\top B & B^\top C &  B^\top D \\
C^\top B & C^\top C &  C^\top D \\
D^\top B & D^\top C &  D^\top D \\
\end{pmatrix}
$$

Consider the following three observations. It seems to me that they lead to a contradiction. Hence, some (all) of them should be wrong. Could you point out the mistake?

(1) If $A$ is invertible, then it does not imply that every square submatrix of $A$ is invertible. For example, we could have that $A$ is invertible but the submatrix
$$
Q\equiv \begin{pmatrix}
B^\top B  &  B^\top D \\
D^\top B  &  D^\top D \\
\end{pmatrix}
$$
is not invertible.

(2) $A$ is invertible if and only if $\begin{pmatrix}
B & C & D\end{pmatrix}$ is full column rank.

(3) If $\begin{pmatrix}
B & D \end{pmatrix}$ is not full column rank, then $\begin{pmatrix}
B & C& D \end{pmatrix}$ is not full column rank.

The contradiction is the following:

If $\begin{pmatrix}
B & D \end{pmatrix}$ is not full column rank (which holds if and only if $Q$ is invertible), then by (3) $\begin{pmatrix}
B & C& D \end{pmatrix}$ is not full column rank. In turn, by (2), $A$ is not invertible. This contradicts (1).

答:
Note. The first version of this answer was written under the misunderstanding that  full column rank means
that the columns generate the space where they live.  The OP has later called my attention to the fact that some people take it to
mean that instead, the columns are linearly independent.   I must say I find the latter terminology a bit misleading, so
I would try to avoid it by  refering to it by what it means.  Nevertheless, should  you like to further investigate
the terminology issue, I invite you to
compare

https://en.m.wikipedia.org/wiki/Rank_(linear_algebra)

and

https://www.cds.caltech.edu/~murray/amwiki/index.php/FAQ:_What_does_it_mean_for_a_non-square_matrix_to_be_full_rank%3f

Statement 1.  Every submatrix of an invertible matrix is invertible.

Verdict: False.

Counter example: Let  $A$ be the $3×3$ identity matrix, and consider the  $2×2$ submatrix
$$
  \pmatrix{0 & 1\cr 0 & 0}
  $$
obtained by removing  the first row and the last  column of $A$.  It is obviously not invertible.

Statement 1 (bis).  Every principal submatrix of a positive invertible matrix is invertible.

Verdict: True.

Proof: Let  $A$ be a positive invertible $n×n$ matrix.  A principal submatrix of $A$ is one that is obtained by removing some
rows, say the ones indexed by
$$
  k_1,k_2,…,k_p,
  $$
as well as some columns, but not just any columns, rather the columns indexed by the very same $k_1,k_2,…,k_p$.

Letting $R$ be the $n×(n-p)$ matrix whose columns  are the canonical basis vectors corresponding to the columns of $A$ which were not
removed, the corresponding submatrix may be expressed as $R^TAR$.

In order to prove that $R^TAR$ is invertible, it is enough to prove it is injective, so suppose $x$ is a ($n-p)$-column
matrix such that $R^TARx=0$.  Then
$$
  0 = ⟨R^TARx,x⟩ =
  ⟨A^{1/2}Rx,A^{1/2}Rx⟩ =
  \|A^{1/2}Rx\|^2,
  $$
so $A^{1/2}Rx=0$, and hence $ARx=0$, as well.  Since $A$ is injective, then $Rx=0$, but $R$ is also injective, so
$x=0$.  QED

Statement 2.  $A$ is invertible if and only if $\pmatrix{B & C & D}$ has linearly independent columns.

Verdict: True.

Proof: Denoting by the matrix $\pmatrix{B & C & D}$ simply by $E$, suppose that
$Ax=0$.  Then
$$
  0 = ⟨Ax,x⟩ = ⟨E^TEx,x⟩ =
  ⟨Ex,Ex⟩ = \|Ex\|^2,
  $$
so $Ex=0$, but since the columns of $E$ are linearly independent, one deduces that $x=0$.  QED

Statement 3.  If $\pmatrix{B & C}$ does  not have linearly independent columns then  $\pmatrix{B & C & D}$
does not have linearly independent columns.

Verdict: True.

Proof: Easy exercise.


问:
Cyclic vectors in a real vector space
Let $V$ be an n-dimensional vector space over $\mathbb{R}$ and $T:V \rightarrow V$ be linear. Call a vector $v \in V$ cyclic if $V$ is spanned by $\{v, \ Tv, \ T^2v,..\}$.

Question:

Show that $v$ is cyclic for $T$ then there is some $k \geq 1$ such that

$$B=\{v, \ Tv,..T^{k-1}v \}$$ is linearly independent in $V$ and that $T^kv$ lies in  the span of $B$.

Thoughts:

If we suppose that no such $k$ exists, then every subset of the form $\{v, \ Tv,..T^{l-1}v \}$ is linearly dependent, or it is linearly dependent with $T^lv$ not lying in it span.

There are in effect then two cases to consider.

Suppose every subset of the form $\{v, \ Tv,..T^{l-1}v \}$ is linearly dependent. Then $T^{l-1}$ can be expressed as a linear combination of $v,...,T^{l-2}v$. Now, $\{v, \ Tv,..T^{l-2}v \}$ is also linearly dependent by assumption and so we can express $T^{l-2}$ as a linear combination of  $v,...,T^{l-3}v$ etc...
Continuing in this way, we show that $T^{l-1}v= \lambda v$ for some $\lambda \in \mathbb{R}$. Thus $$B=\{ \mu v \ | \ \mu \ \text{is an eigenvalue of} \ T^mv \ \text{for some} \ m \}$$ This is 'at best' countably infinite, and therefore could not span $V$ even if it were 1-dimensional, wince our base field is $\mathbb{R}$, which is uncountable.

Suppose then that $B$ is linearly independent for some $k$ but that $T^kv$ does not lie in its span. I can't see how to progress this argument.

Note: This question is for second year Undergraduates, and I think there must be some more simple approach; even the first part surprises me if we need to argue using the uncountability of $\mathbb{R}$, so any alternative approaches are also appreciated.

答: For the question mentioned the fact that $v$ is a cyclic vector is irrelevant, it just needs to be nonzero (and that only because you insisted that $k\geq1$). Since $V$ is finite dimensional, the infinite sequence $v,Tv,T^2v,\ldots$ cannot remain linearly independent forever; taking $k$ minimal so that $v,Tv,\ldots,T^kv$ is linearly dependent, the conclusion of you question will be satisfied. Moreover the subspace $W$ spanned by $B$ will be stable under $T$ (that is, $T(W)\subseteq W$) so that it makes sense to restrict $T$ to a map $T|_W: W\to W$, and (and this is where the notion of cyclic vector comes in) $v$ is a cyclic vector in the subspace $W$ for the linear operator$~T|_W$.

Title: Cyclic vectors in a real vector space


问:
Why is this a valid condition for convergence?
We know that $\sum_{i=1}^nx^n=\frac{1-x^{n+1}}{1-x}$, for $n\neq 1$. Why are we allowed to say that as $n\rightarrow\infty$, the terms $x^n\rightarrow 0$ if and only if $|x|<1$, so the sum converges iff $|x|<1$? Obviously in order to converge the terms must go to zero but how is that a sufficient condition? For example, in the harmonic series the terms go to zero but the sum diverges.

Body:
hint

$$x>0\implies x^n=e^{n\ln(x)}$$
So,
$$\lim_{n\to+\infty}x^n=0\iff \ln(x)<0$$
$$\iff x<1$$

and
$$x<0\implies x^n=(-1)^ne^{n\ln(-x)}$$


答:
The complement of $A$ is not open as any open disk centered on $(1,0)$ has a non empty intersection with $A$. Hence $A$ is not closed.

$B$ is the inverse image of the closed subset $\{0\}$ of $\mathbb R$ under the continuous map $f : (x,y) \mapsto y-x^2$. Hence it is closed.

Body:
Determine if the sets $A=\{(x,y) \mid x <1\}$ and $B=\{(x,y)\mid y=x^2\}$ are closed?

For $A$ I have that the complement $A^c=\{(x,y) \mid x \geqslant1\}$ which is closed so this would imply that $A$ is open? For $B$ I'm not entirely sure how to determine this. $B$ seems to be closed, but I'm not sure how to formalize this?


答:
$$\sum_{i=0}^n x^i = \frac{1-x^{n+1}}{1-x}$$

This means that the value of the right is exactly equal to that on the right and most importantly the right converges if and only if the left converges.

For any x, $\frac{1-x^{n+1}}{1-x} = \frac{1}{1-x} - \frac{x^{n+1}}{1-x}$ so $\frac{1-x^{n+1}}{1-x}$ converges if and only if both $\frac{1}{1-x}$ and $\frac{x^{n+1}}{1-x}$ converge. $\frac{1}{1-x}$ obviously converges for all x as it is independent of n so $\frac{1-x^{n+1}}{1-x}$ converges if and only if $\frac{x^{n+1}}{1-x}$ converges

$$ \lim_{n \rightarrow \infty} \frac{x^{n+1}}{1-x} = \frac{1}{1-x}\lim_{n \rightarrow \infty} x^{n+1}$$

So $\frac{x^{n+1}}{1-x}$ converges if and only if $x^{n+1}$ converges which converges for $|x| \lt 1$. So to answer the last question, it isn't a sufficient condition but in this specific case the condition for the terms to approach 0 happens to be the same as the condition for the closed form of the sum to converge

Title: Why is this a valid condition for convergence?

Body: We know that $\sum_{i=1}^nx^n=\frac{1-x^{n+1}}{1-x}$, for $n\neq 1$. Why are we allowed to say that as $n\rightarrow\infty$, the terms $x^n\rightarrow 0$ if and only if $|x|<1$, so the sum converges iff $|x|<1$? Obviously in order to converge the terms must go to zero but how is that a sufficient condition? For example, in the harmonic series the terms go to zero but the sum diverges.


问:
Do you need the axiom of choice if the non-empty sets in question are defined recursively?
Suppose I pick (using a single choice) an element $q_1$ from a nonempty set $U$. I then pick $q_2$ from the set $U/\{q_1\}$, $q_3$ from the set $U/\{q_1, q_2\}$ and so on. At each stage, the set in question is guaranteed to be non-empty. Thus, I have constructed a sequence $(q_n)_{n\in\mathbb{N}}$ using a single choice each time. Thus, I can safely assume that no (countably infinite) axiom of choice was used in the construction of this sequence, right?

答: You have in fact used a weak form of the axiom of choice, specifically, the axiom of dependent choice. Without choice you can make any finite number of arbitrary choices, but you cannot in general make an infinite sequence of them.


问:
Show that every maximal solution to $x'=G(x)$ is defined in an interval $(a,\infty)$
There is a function $G:\mathbb{R}^d\to\mathbb{R}^d$ locally lipschitz, suppose there exists $R>0$ such that $x\cdot G(x)\leq 0 , \forall x\in \mathbb{R}^d$ with $||x||\geq R$. Show that every maximal solution to $x'=G(x)$ is defined in an interval $(a,\infty)$.

By the Picar's theorem I know there exists a solution to $x'=G(x)$ on the shape of $\gamma:(a,b)\to \mathbb{R}^d$. And $a,b$ can be infinite. I don't know how to get to the proof.
Any help is appreciated.

答: Hint: For the existence of the solution define $x'=f(t,x)=G(x)$, since $G$ is Lipschitz on $x$ it follows that $f$ is Lipschitz on the second variable, so the Theorem of Picard applies. This solution is maximal, on the interval $(a,\infty)$ because the norm of $x$ is decreasing for $\|x\|\geq R$. To see this, notice that $$\frac{d}{dt}\langle\, x,x\rangle = 2\langle\,x,x'\rangle = 2\langle\,x,G(x)\rangle=2x\cdot G(x)\leq 0 $$


问:
Show that $\|B\varphi\| \le C(\|A \varphi\| + \|\varphi\|)$ extends from a core to entire domain of $A$
Let $A$, $B$ be two densely defined operators on a Hilbert space $H$. Suppose the domains obey $D(B) \supseteq D(A)$, and suppose $A$ is a closed operator with $\mathcal{D} \subseteq D(A)$ a core for $A$ (i.e., $\overline{A\rvert_{\mathcal{D}}} = A$). Assume that for some $C > 0$,

$$\|B \varphi \| \le C\|A\varphi \| + C\|\varphi\|, \qquad \text{all $\varphi \in \mathcal{D}$} \tag{1} \label{est on core}.$$

I would like to show that the estimate \eqref{est on core} holds more generally for any $\varphi \in D(A)$ (not just for $\varphi \in \mathcal{D}$).

I can prove this result under the additional assumption that $B$ is a symmetric operator. However, according to page 162 of Reed and Simon vol. 2 (which leads into the proof of the Kato-Rellich Theorem), the result holds without this assumption.

For arbitrary $\varphi \in D(A)$, using that $\overline{A\rvert_{\mathcal{D}}} = A$, we get a sequence $\psi_j \in \mathcal{D}$ so that

$$\psi_j \to \varphi, \, A \psi_j \to A \varphi.$$

We have

$$\|B\varphi\| = \sup_{\eta \in D(A) : \|\eta\|= 1} |\langle B \varphi, \eta \rangle| =  \sup_{\eta \in D(A) : \|\eta\|= 1} |\langle \varphi, B\eta \rangle|,  $$

by symmetricity of $B$. But for each $\eta \in D(A)$ with $\|\eta\| = 1$, using symmetricity again.

$$ |\langle \varphi, B\eta \rangle| = \lim_{j \to \infty} |\langle \psi_j, B\eta \rangle| =  \lim_{j \to \infty} |\langle B \psi_j, \eta \rangle| \le \lim_{j \to \infty} C\|A\psi_j| + C\|\psi_j\| = C\|A\varphi| + C\|\varphi\|. $$

Is there a way to reach the same conclusion without assuming $B$ is symmetric? Hints or solutions are greatly appreciated.

答:
The symmetricity of $B$ is not needed. Since $A$ is assumed to be self-adjoint, it is a closed operator, hence complete with respect the to "graph" norm
$$ \|\varphi_1\|_1 = a \| A \varphi \| + b\| \varphi \|.$$

So, by the BLT theorem, the estimate will hold for all of $D(A)$ if it holds on a core for $A$.


问:
$\epsilon$-proof for the limit $f(x)=\frac{1}{\cosh{(x)}}+\log{\left ( \frac{\cosh{(x)}}{1+\cosh{(x)}} \right )}$ as $x$ goes to $\pm \infty$
I want to use a $\epsilon,\delta$-proof for the existence and value for the limit of $$f(x)=\frac{1}{\cosh{(x)}}+\log{\left ( \frac{\cosh{(x)}}{1+\cosh{(x)}} \right )}$$
for $x \rightarrow \pm\infty$.

Now, I know the definition for such proof to be:

1. Limit as $x \to +\infty$

$$\lim_{x \ \to \  +\infty} f(x) = L \Leftrightarrow
  \forall \ \epsilon>0\; (\exists \ \delta : (\;x>\delta\implies |f(x) - L|\leq\epsilon))
$$

2. Limit as $x \to -\infty$

$$\lim_{x \ \to \  -\infty} f(x) = L \Leftrightarrow
  \forall \ \epsilon>0\; (\exists \ \delta : (\;x<\delta\implies |f(x) - L|\leq\epsilon))
$$

3. Limit evaluating to +$\infty$

$$\lim_{x \ \to \  a} f(x) = +\infty \Leftrightarrow \forall M  > 0 \ (\exists \  \delta > 0  \ : \ (0<|x-a|<\delta \implies f(x) >M)$$

4. Limit evaluating to -$\infty$

$$\lim_{x \ \to \  a} f(x) = -\infty \Leftrightarrow \forall  N  < 0 \ (\exists \  \delta > 0  \ : \ (0<|x-a|<\delta \implies f(x)  < N)$$

I am struggeling to approach this problem as;

Wouldn't I need to know what the limit is before doing the actual proof and thus not being able to know which method to use?

This one seems rather complex and I am completly lost. Can someone explain to me how to identify and "attack" such a problem?

答:
HINTS:

Note that the hyperbolic cosine function is even and so we need only examine the case $x\to +\infty$.

Then, apply the inequalities

$$\frac{y}{1+y}\le \log(y)\le y-1$$

and

$$0<\frac1{\cosh(x)}\le 2e^{-x}$$


问:
Projecting a subgrid of a spherical surface on the plane
Repost from StackOverflow, where I was advised to seek help here :D

I'm neither a geometry student or a native speaker, so apologies if my question isn't clear enough.

As part of my master's thesis, I have to plot bounded regions of the night sky onto a 2D plane. My current solution consists of a rectangular mapping where (ra, dec) values are plotted to (x,y) coordinates. While this approach works well enough for small regions in relatively low ascension values, the resulting plots get progressively distorted for higher ||dec|| values, as expected.

At some point I'll have to change this to a more versatile approach. Thing is, I'm not exactly clear on what to search for. I guess I have to be able to map angular coordinates to a square (or hexagon) subgrid, but most search results I get are concerned with full-surface mapping.

I know I won't be able to achieve a perfect, distortion-free plotting, but I don't require perfect solutions; only a more general projection that will work well near the poles. Something like this, where I put my Photoshop skills to work and try to simulate a 20º region under my current approach and the one I'm looking for:

What I have

What I want

TL;DR: how do I convert between coordinates on a sphere (ra/dec) to cartesian coordinates on a locally-defined grid?

答:
I think that near the poles this may work:

The complement of the declination $d$, so $90^\circ - d$, is proportional to the great circle distance from the pole. Scale that distance to whatever units you need; call the answer $r$.

The right ascension measures the longitude, as an angle $\theta$.

Then use $(r, \theta)$ as the polar coordinates of a point on your plane. If you need rectangular coordinates, just do the standard polar to rectangular conversions.

You'll have to decide whether the distortions are too bad $20^\circ$ from the pole. If they are, you need a more sophisticated projection. Consult a cartographer.


答:
I had some trouble following your argument.  You write

Suppose every subset of the form $\{v,Tv,\ldots,T^{\ell-1} v \}$ is linearly dependent.

If we are allowed to take $\ell = 1$ here then in particular you are assuming that $\{v \}$ is linearly dependent, and thus $v = 0$ so $V = 0$.  Otherwise $\{v,Tv\}$ is linearly dependent so either $v = 0$ or $Tv = \alpha v$ for some scalar $\alpha$.  If this is the case then $T^{\ell} v = \alpha^{\ell} v$ for all $\ell$, and the space $V$ must be one-dimensional, spanned by $v$.  Nothing like the uncountability of the scalar field is needed for this.

But why have you started the argument this way?  As the above analysis shows, you've done only a trivial case and an almost trivial case, so you're certainly less than halfway to a complete proof.

I suggest rather the following: let $\ell$ be the least positive integer such that $\{v,Tv,\ldots,T^{\ell} v \}$ is linearly dependent.  Such an $\ell$ exists because $V$ is assumed to be finite-dimensional -- it need not exist otherwise.  (We've handled the $\ell = 1$ case above.)  This implies that $T^{\ell} v$ lies in the span of $1,Tv,\ldots,T^{\ell-1} v$, answering your question.

Note also that for all $L \geq \ell$, $T^{L} v$ lies in the span of $1,Tv,\ldots,T^{\ell-1} v$, so that $V$ itself is spanned by $1,Tv,\ldots,T^{\ell-1} v$.  (At first glance I thought that this was your question.  It turns out that it isn't, but it is the natural next thing to say, so you will surely be encountering it soon.)

The conclusion holds over any field of scalars; the real numbers have nothing to do with it.

Title: Cyclic vectors in a real vector space

Body:
Let $V$ be an n-dimensional vector space over $\mathbb{R}$ and $T:V \rightarrow V$ be linear. Call a vector $v \in V$ cyclic if $V$ is spanned by $\{v, \ Tv, \ T^2v,..\}$.

Question:

Show that $v$ is cyclic for $T$ then there is some $k \geq 1$ such that

$$B=\{v, \ Tv,..T^{k-1}v \}$$ is linearly independent in $V$ and that $T^kv$ lies in  the span of $B$.

Thoughts:

If we suppose that no such $k$ exists, then every subset of the form $\{v, \ Tv,..T^{l-1}v \}$ is linearly dependent, or it is linearly dependent with $T^lv$ not lying in it span.

There are in effect then two cases to consider.

Suppose every subset of the form $\{v, \ Tv,..T^{l-1}v \}$ is linearly dependent. Then $T^{l-1}$ can be expressed as a linear combination of $v,...,T^{l-2}v$. Now, $\{v, \ Tv,..T^{l-2}v \}$ is also linearly dependent by assumption and so we can express $T^{l-2}$ as a linear combination of  $v,...,T^{l-3}v$ etc...
Continuing in this way, we show that $T^{l-1}v= \lambda v$ for some $\lambda \in \mathbb{R}$. Thus $$B=\{ \mu v \ | \ \mu \ \text{is an eigenvalue of} \ T^mv \ \text{for some} \ m \}$$ This is 'at best' countably infinite, and therefore could not span $V$ even if it were 1-dimensional, wince our base field is $\mathbb{R}$, which is uncountable.

Suppose then that $B$ is linearly independent for some $k$ but that $T^kv$ does not lie in its span. I can't see how to progress this argument.

Note: This question is for second year Undergraduates, and I think there must be some more simple approach; even the first part surprises me if we need to argue using the uncountability of $\mathbb{R}$, so any alternative approaches are also appreciated.


问:
How to assign values to letters to create unique values per word when all letters are added together?
I'm writing a program to match anagrams in order to practice coding. One way I want to try this is to assign values to letters such that adding up the letters in the individual words creates a unique value. This will allow me to match words without worrying about the order of the letters. I think I can do this by playing around with different approaches but I really want to know how to do this mathematically. Assume all letters will be uppercase (so 26 total letters) and, for this example, I don't want to worry about any kind of character other than A-Z.</p>

答: Every letter is a different prime number, multiply them all together for a word. MAY and YAM should result in the same value.</p>


问:
finite length is stronger than finiteness of a module
Let $A$ be a commutative ring and $M$ an $A$-module.
I realized recently that the property of $M$ having finite length is stronger than $M$ being finitely generated.
Here is my reasoning: Suppose $M$ has finite length but it is not finitely-generated. Let $\left\{x_i\right\}_{i \in I}$ be an infinite set of generators. Let $J$ be a countable subset of $I$. Define $M_i=Ax_{a_1}+ \cdots +A_{a_i}, a_k \in J$. Then we have chains of length $i$ of the form $M \supset M_{i-1} \supset M_i \supset \cdots \supset M_1 \supset M_0=0$ and $i$ can grow arbitrarily large. This contradicts the finite length assumption. Hence $M$ must be finitely generated.

Can anyone think of a counterexample, where we have a module that is finitely generated but does not have finite length?

答: A module has finite length if and only if it is Noetherian and Artinian.  So any commutative ring that isn't Artinian does not have finite length over itself and is obviously finitely generated over itself.</p>


答: With $y:=\operatorname{sech}x>0$ this becomes $f=y-\ln(1+y)\sim\tfrac12y^2$, so the limit is $0$. We wish to prove $\forall\varepsilon>0\exists\delta>0\forall y(y<\delta\implies|f|<\varepsilon)$. Since $0<f<\tfrac12y^2$, we can choose $\delta=\sqrt{2\varepsilon}$. In particular, $\tfrac12y^2-y+\ln(1+y)=\int_0^y\tfrac{z^2}{1+z}dz>0$. The bound $y<\sqrt{2\varepsilon}$ is, of course, equivalent to $|x|>\operatorname{arcosh}\tfrac{1}{\sqrt{2\varepsilon}}$.

Title: $\epsilon$-proof for the limit $f(x)=\frac{1}{\cosh{(x)}}+\log{\left ( \frac{\cosh{(x)}}{1+\cosh{(x)}} \right )}$ as $x$ goes to $\pm \infty$

Body:
I want to use a $\epsilon,\delta$-proof for the existence and value for the limit of $$f(x)=\frac{1}{\cosh{(x)}}+\log{\left ( \frac{\cosh{(x)}}{1+\cosh{(x)}} \right )}$$
for $x \rightarrow \pm\infty$.

Now, I know the definition for such proof to be:

1. Limit as $x \to +\infty$

$$\lim_{x \ \to \  +\infty} f(x) = L \Leftrightarrow
  \forall \ \epsilon>0\; (\exists \ \delta : (\;x>\delta\implies |f(x) - L|\leq\epsilon))
$$

2. Limit as $x \to -\infty$

$$\lim_{x \ \to \  -\infty} f(x) = L \Leftrightarrow
  \forall \ \epsilon>0\; (\exists \ \delta : (\;x<\delta\implies |f(x) - L|\leq\epsilon))
$$

3. Limit evaluating to +$\infty$

$$\lim_{x \ \to \  a} f(x) = +\infty \Leftrightarrow \forall M  > 0 \ (\exists \  \delta > 0  \ : \ (0<|x-a|<\delta \implies f(x) >M)$$

4. Limit evaluating to -$\infty$

$$\lim_{x \ \to \  a} f(x) = -\infty \Leftrightarrow \forall  N  < 0 \ (\exists \  \delta > 0  \ : \ (0<|x-a|<\delta \implies f(x)  < N)$$

I am struggeling to approach this problem as;

Wouldn't I need to know what the limit is before doing the actual proof and thus not being able to know which method to use?

This one seems rather complex and I am completly lost. Can someone explain to me how to identify and "attack" such a problem?


问:
Convergence of an integral over the primes
Does the following integral converge? If so, is it nonzero? What can we say about the integral as $x\to \infty?$

$$\int_{I} \frac{u-u\log{p_u}}{(p_u)^2}du$$
where $I= \{p \leq x | p\text{ prime}\}$ for some $x$.

Here $p_u$ denotes the $u$:th prime

答:
Hint

for $u\ge 6$

$$u (\log (u)+\log (\log (u))-1)\le p_u\le u (\log (u)+\log (\log (u)))$$

thus
$$\frac{u(1-\log p_u)}{p_u^2}\sim -\frac{1}{u\log u}$$

see here. First answer.


问:
$A \in M_n(\mathbb{C})$ invertible and $A^2$ is diagonalizable. Prove $A$ is diagonalizable
I'm interested to know if it's true because I saw that if $A^2$ is diagonalizable then $A$ is not necessary Diagonalizable.

I have a feeling it's true but I'm not sure how to prove it.

This is my proof but I'm not sure if it's good to assume that :

My try

By Diagonalizable we know that exist invertible matrix $P$ such that :

$P^{-1}AAP=diag(\lambda_1,...,\lambda_n)$

$AA=Pdiag(\lambda_1,...,\lambda_n)P^{-1}$

Set $D=Pdiag(\sqrt{\lambda_1},...,\sqrt{\lambda_n})P^{-1}$

So : $D^2=(Pdiag(\sqrt{\lambda_1},...,\sqrt{\lambda_n})P^{-1})(Pdiag(\sqrt{\lambda_1},...,\sqrt{\lambda_n})P^{-1})=Pdiag(\lambda_1,...,\lambda_n)P^{-1}=AA$

Here I wonder - $A=D=Pdiag(\lambda_1,...,\lambda_n)P^{-1} \rightarrow A$ is diagonalizable.

答:
Here is a relatively quick proof. Note that a matrix is diagonalizable if and only if its minimal polynomial is a product of distinct linear factors. Because $A^2$ is diagonalizable, its minimal polynomial can be written as
$$
p(x) = (x - \lambda_1) \cdots (x - \lambda_n)
$$
where the eigenvalues $\lambda_i \in \Bbb C$ are distinct. Notably, each $\lambda_j$ is non-zero because $A$ is invertible. Thus, $A$ satisfies $q(x) = 0$, where
$$
q(x) = p(x^2) = (x^2 - \lambda_1) \cdots (x^2 - \lambda_n)
\\ = (x - \sqrt{\lambda_1})(x + \sqrt{\lambda_1}) \cdots (x - \sqrt{\lambda_n})(x + \sqrt{\lambda_n}).
$$
The polynomial $q(x)$ has no repeating factors. The minimal polynomial of $A$ must divide $q(x)$, so the minimal polynomial of $A$ cannot have any repeating factors. Thus, $A$ must be diagonalizable.


问:
Can an uncountable set be constructed in countable steps?
I know there is a flaw somewhere in my reasoning, but haven't been able to find it.   I have looked at several things, including Cardinality of sets related to infinite tree .
I understand Cantors diagonalization argument with respect to the natural numbers and real numbers, that makes sense to me.

However, it seems an Aronszajn tree can be constructed in countable time, however it has uncountable branches.  I don't think this should be possible.
Here's the construction method I am thinking of, just look at all infinite binary strings that end with 0.  That's an uncountable set.    To represent them in tree form

```<code>
Step 1                                    0
                                       /     \
Step 2                                0       1
                                     / \     / \
Step 3                              0   1   0   1
.
.
</code>```

Each row has twice as many nodes as the row above, so row n has $2^n$ nodes.

This won't map the infinite strings to the natural numbers, so it doesn't contradict the diagonalization argument.  However, within a countably time, a tree representing an uncountable number of nodes will have been created.   So, what am I missing?  Thank you for your help.

答:
This tree has countably many nodes, corresponding to the finite strings of $0$'s and $1$'s. There are no nodes "infinitely far down".

Each path from the root corresponds to a countably infinite string of $0$'s and $1$'s. There are uncountably many of those, which is what Cantor's diagonal argument demonstrates.

You can think of the nodes as representing the rational numbers in the unit interval whose denominators are powers of $2$. The paths correspond to the binary infinite "decimal" representations of the real numbers in that interval.


问:
Proving the product of two real numbers is maximum when the numbers are equal given their sum is constant
Let us consider two real numbers $x$ and $y$. How can we prove value of $xy$ is greatest when $x=y$ given the condition $x+y=$ constant?

I have already found a proof, but I am not entirely happy with it yet.

答:
First prove that
$$ xy = \frac{1}{4} \left( (x + y)^2 - (x - y)^2 \right)$$
How can you maximize $xy$ given this?</p>


问:
Find all sets $A$ that satisfy condition $a+b \in A \implies ab\in A$.
Find all subsets from $ \mathbb N$ such that:

We say that a subset from $\mathbb N$ that it is complete (let’s call it $A$) if :

$a+b \in A \implies ab\in A$.
With $a,b \in \mathbb N$

Find all complete subsets from $\mathbb N$.

So far I’ve found some:
$A=\{0,1,2\}, \{0,1\}$

答:
If

$1+(x-1)\in A \Rightarrow 1×(x-1)\in A$

$1+(x-2)\in A \Rightarrow 1×(x-2)\in A$

$1+(x-3)\in A \Rightarrow 1×(x-3)\in A$

Etc.

By infinite descent if $x\in A$ then all natural numbers less than $x$ is also in $A$.

If

$2+(y-2)\in A \Rightarrow 2×(y-2)=2y-4$

$2y-4>y\iff y>4$

This means if one element greater than 4 is in $A$ then there is another element greater than that one.

$2+(2y-6)\in A \Rightarrow 2×(2y-6)=4y-12$

$2+(4y-14)\in A \Rightarrow 2×(4y-14)=8y-28$

By induction if there is an element in $A$ that is greater than 4 then there is no greatest element in $A$ (infinitely many elements). This combined with the decent rule implies that if there is an element greater than 4 in $A$ then all elements of $\Bbb{N}$ are in $A$.

What's left is the null set and sets that have all the natural numbers less than or equal to $k$. Where $k$ is $0\le k\le 4$. It can be easily verified that all five sets from each the five values of $k$ satisfies the condition that $a+b\in A\Rightarrow ab\in A$

This means there are seven subsets that satisfy the criterion.

$\emptyset$

$\lbrace 0\rbrace$

$\lbrace 0,1\rbrace$

$\lbrace 0,1,2\rbrace$

$\lbrace 0,1,2,3\rbrace$

$\lbrace 0,1,2,3,4\rbrace$

$\Bbb{N}$


问:
Calculating the Angle of Reflection from Co-ordinates
I've been attempting to build a rudimentary physics engine that handles the collision of a ball on an angled surface but I have run into issues with understanding the maths behind calculating the angle of reflection.

I have the (x,y) coordinates for the current position of the ball, the velocity of the ball in (velX,velY) and I have the start and end (x,y) coordinates of the line the ball is colliding with. I'm able to calculate the collision correctly but I am unable to understand how to calculate the angle of reflection from the data I have. I've been able to find the following equations and pictures describing the problem but been unable to piece it all together.

I was hoping someone would be able to explain and maybe show examples of how to calculate the various parts of the below example.

Example of Angle of Reflect

What form does "d" need to take? (Need to convert from (x,y) format?)

How do you calculate "n"? (and then normalize it)

I had found another post that stated the following equation to find "r", so hopefully, with your help I'll be able to use this to calculate the angle of reflection of the ball.

$$r = d - 2 (d \cdot n) n$$

"where d⋅n is the dot product, and n must be normalized."

Apologies if this has already been clearly explained elsewhere, I haven't been able to find a clear explanation yet, but if one exists please just link me to it.

Thanks in advance for the help :)

答:
This post is old but I came across the same problem so I thought I would post my solution. I couldn't find an answer in vector format so I had to expand vectors as follows

d = [d1, d2, d3]

r = [r1, r2, r3]

n = [x, y, z]

r - d = -2(d . n) n

solve for x y z using the following equations

```<code>r1-d1 = -2*(d1*x^2 + d2*x*y+d3*x*z)

r2-d2 = -2*(d2*y^2 + d1*x*y+d3*y*z)

r3-d3 = -2*(d3*z^2 + d2*z*y+d1*x*z)
</code>```

The algebra got pretty hairy real quick but here were the solutions I got

```<code>n1 = (d1 - r1)/(sqrt(2) * sqrt(d1**2 + d2**2 + d3**2 - d1 * r1 - d2 * r2 - d3 * r3))
n2 = (d2 - r2)/(sqrt(2) * sqrt(d1**2 + d2**2 + d3**2 - d1 * r1 - d2 * r2 - d3 * r3))
n3 = (d3 - r3)/(sqrt(2) * sqrt(d1**2 + d2**2 + d3**2 - d1 * r1 - d2 * r2 - d3 * r3))
</code>```

Body:
This post is old but I came across the same problem so I thought I would post my solution. I couldn't find an answer in vector format so I had to expand vectors as follows

d = [d1, d2, d3]

r = [r1, r2, r3]

n = [x, y, z]

r - d = -2(d . n) n

solve for x y z using the following equations

r1-d1 = -2*(d1*x^2 + d2*x*y+d3*x*z)

r2-d2 = -2*(d2*y^2 + d1*x*y+d3*y*z)

r3-d3 = -2*(d3*z^2 + d2*z*y+d1*x*z)

The algebra got pretty hairy real quick but here were the solutions I got

n1 = (d1 - r1)/(sqrt(2) * sqrt(d1**2 + d2**2 + d3**2 - d1 * r1 - d2 * r2 - d3 * r3))
n2 = (d2 - r2)/(sqrt(2) * sqrt(d1**2 + d2**2 + d3**2 - d1 * r1 - d2 * r2 - d3 * r3))
n3 = (d3 - r3)/(sqrt(2) * sqrt(d1**2 + d2**2 + d3**2 - d1 * r1 - d2 * r2 - d3 * r3))


问:
Solve this by converting sentences to clausal form?
If:

$E\land R \implies B$

$E\implies R\lor P\lor L$

$K\implies B$

$\lnot(L\land B)$

$P\implies \lnot K$

Which of the following can't be deducted?

$E\land P$

$K \land E \implies R$

$L \land P \implies\lnot K$

$L \implies\lnot(K \land E)$

答:
Let's use the following resolution rule

$\frac{a \vee b, \quad \neg a \vee c}
{b \vee c}$

multiple times to deduce 2, 3, 4 from the following (given) knowledgebase

(a) $\lnot E\lor \lnot R \lor B$

(b) $\lnot E \lor R\lor P\lor L$

(c) $\lnot K \lor B$

(d) $\lnot L \lor  \lnot B$

(e) $\lnot P \lor \lnot K$

From (c) and (d) we can deduce (f), i.e.,

$B \lor \lnot K, \quad \lnot B \lor  \lnot L$

(f) $\lnot K \lor \lnot L$

From (f) we can deduce $\lnot K \lor \lnot L \lor \lnot P$,
which means we can deduce $\lnot (L \land P) \lor \lnot K$, i.e.,

$L \land P \implies\lnot K$

Also, From (f) we can deduce $\lnot K \lor \lnot L \lor \lnot E$,
which means we can deduce $\lnot L \lor \lnot (K \land E)$, i.e.,

$L \implies\lnot (K \land E)$

Again, from (b) and (f) we can deduce (g)

$L\lor \lnot E \lor R\lor P,  \quad \lnot L \lor \lnot K$

(g) $\lnot E \lor R\lor P\lor \lnot K$

Now, from (g) and (e)

$P\lor \lnot E \lor R\lor \lnot K, \quad \lnot P \lor \lnot K$

$\lnot E \lor R\lor \lnot K$

which means we have deduced $\lnot (K \land E) \lor R$, i.e.,

$K \land E \implies R$

Thus we have proved that 2, 3, 4 can be deduced from the knowledgebase provided.

We can see 1 is not necessarily TRUE even if (a)-(e) holds TRUE,
e.g., Let K=False, L=False, E=False, P=False, then (a)-(e) holds TRUE but 1 does not hold TRUE.


问:
Proof of unit digit of $a^2$ Using Modular arithmetic.
We know whenever you square a given number $a$ The last digit of $a^2$ would be in the set :$$\{0,1,4,5,6,9\}$$
I didn’t quite understand the proof that was in my number theory book.

I will present it here:
$$10 \equiv 0 \mod 10 \implies a=\sum_{i=0}^{n} a_i 10^i \equiv a_o \mod 10$$
$$\implies a^2\equiv a_o^2 \mod 10$$
But $a_o \in \{0,1,2,3...9\} \implies a_o^2 \mod 10 \in \{0,1,4,5,6,9\}$.

So the unit digit of $a^2$Is in the set $ \{0,1,4,5,6,9\} $ .

My problem is in the first line because if you call a function $$f(x)=\sum_{i=0}^{n} a_i x^i \implies f(0)=0$$

So why did the book named $a_o$ instead of $0$

答: Note that when $f(x) = \sum_{j = 1}^n a_j x^j$, we have $f(0) = \mathbf{a_0}$, not $0$. Here $a_0$ represents the ones digit of the number $a$, where $a = a_n 10^n + \dots + a_1 10 + a_0$ in base $10$. Taking that last expression modulo $10$ kills all terms except the last, leaving $a \equiv a_0 \pmod{10}$.


问:
Proving that $f(x)=\frac{\sin(\frac{1}{x})}{\frac{\pi}{2}-\arctan x}$ is not uniformly continuous in $(0,1)$
I have the following function: $f(x)=\frac{\sin(\frac{1}{x})}{\frac{\pi}{2}-\arctan x}$. I'm trying to prove that it's not uniformly continuous in $(0,1)$. As I understand, I need to show that $\lim_{x\to 0^+} f(x)$ does not exist. But I'm struggling to show it. I tried to use some sequences in order to get to some different answers but it looks to difficult to find the limit. How can I do it?

答:
Take two sequences
$$a_n=\frac{1}{n\pi}$$
and
$$b_n=\frac{1}{\frac{\pi}{2}+2n\pi}$$

then

$$\lim a_n=\lim b_n=0$$
but
$$\lim_{n\to+\infty}f(a_n)=0\ne$$
$$\lim_{n\to+\infty}f(b_n)=\frac{2}{\pi}$$

So, by sequential caracterisation of the limit,
$\lim_{x\to 0^+}f(x) $ cannot exist.

You can also say
$$\Bigl(\lim_{n\to+\infty}(a_n-b_n)=0\text{ and } \lim_{n\to+\infty} (f(a_n)-f(b_n))\ne 0\Bigr)$$
$$\implies f \text{ is not U continuous at } (0,1)$$


问:
Apply master theorem work for binary search with linear operation at each level
I'm working on the problem from the Introduction to Algorithms book, where there is the following recurrence relation $T(n) = T(\frac{n}{2}) + \Theta(N)$, where $N$ is the size of the array we are searching for.

So the idea here is that on each level of the recursion we're copying each element of the initial array when passing it to solve a subproblem. I understand that the running time here is $\Theta(N\lg{N})$, because on each level we have to copy N elements which is $\Theta(N)$ and there are $\lg{N}$ such levels.

My question is can we apply the master theorem here? I tried to do this and either the theorem can't be applied here or I did something incorrectly. Here is my attempt:

For our recurrence we have $a = 1$, $b = 2$, $f(n) = \Theta(N)$, $N^{\log_b{a}} = N^{log_2{1}} = 1$. So we have that $f(n) = \Omega(1 * N^k)$, where $k = 1$. This is the third case, therefore we check the additional condition that $af(\frac{N}{b}) = \Theta(\frac{N}{2}) \le c \cdot \Theta(N) = \Theta(N)$, so that $c = 1$. So it seems that the solution can be $\Theta(N)$.

I understand that my solution via the master theorem is completely wrong and we probably can't use it to solve this recurrence, but I would like to understand why we can't and what's exactly wrong in my solution?

I'd be very grateful for any help or hints.

答:
Notice $\Theta(N)$ is constant, so the inhomogeneous term, $f(n)$ in the theorem, is $O(n^0)$.  The critical exponent is $\log_b a = 0$.  This equals the power of $n$ in the inhomogeneous term, so you are in case 2.

In case 2, we write $f(n) = \Theta(n^0 \log^0 n)$.  The result of the master theorem is $T(n) = \Theta(n^0 \log^1 n)$.  Which is correct, you expect to get $\log_2 n$ copies of $\Theta(N)$.

Here's a potentially more useful way to approach this problem, that highlights more of the theory...

We don't actually have $T(n) = T(n/2) + \Theta(N)$ because that explicitly makes $T$ dependent on $n$ and $N$ (and two constants about which we will have more to say).  So, really, we have
$$  T(n,N) = T(n/2,N) + \Theta(N)  \text{.}  $$
That is, for each choice of $N$, there is a recurrence in $n$.  If $N$ is chosen, we can suppress "$N$" in the recursive function $T$, which is what was done in the problem statement, but it is worth remembering that each choice of $N$ gives a different recursion.  For each choice of $N$, we should think of this as an infinite list of facts: \begin{align*}
T(2,N) &= T(1,N) + c(2,N)  \text{,}  \\
T(4,N) &= T(2,N) + c(4,N)  \text{,}  \\
T(6,N) &= T(3,N) + c(6,N)  \text{,}  \\
    &\vdots
\end{align*}
We have some bounds on the $c$s and there are two forms these bounds can take.

There are (universal) contants, $k_1 > 0$, $k_2 > 0$, and $n_0 > 0$ such that for all $n > n_0, $
$$  k_1 N \leq c(n,N) \leq k_2 N  \text{.}  $$

For each choice of $N$, there are constants (where we do not suppress the dependence on $N$) $k_1(N) > 0$, $k_2(N) > 0$, and $n_0(N) > 0$ such that for all $n > n_0$
$$  k_1(N) N \leq c(n,N) \leq k_2(N) N  \text{.}  $$

Which of these two is the case, if it is established at all, is established prior to the portion of the problem statement that is recited in the Question.  For our purposes, it doesn't actually matter which is the case, so we assume the latter.  If the former is the case, then each of the functions $k_1$, $k_2$, and $n_0$ become constant functions.

So now we know: for each choice of $N$, we have an infinite list of recursion facts.  Each of these has a $c(n,N)$ and those $c(n,N)$ are bounded below and bounded above by bounds that are independent of $n$.  These bounds only depend on $N$.  Once $N$ has been chose, the bounds on the $c(n,N)$ are fixed and have no dependence on $n$ -- every $c$ on the list has the same bounds.  (It is a useful exercise to show that the $n_0$ in the definition of $\Theta$ used above can be reduced to $0$.  The short version is that the finite beginning of the list with $n \leq n_0$ is automatically bounded by multiples of $N$ and then the infinite rest of the list is bounded by multiples of $N$.  If you choose the looser of the lower bounds and the looser of the upper bounds, you have bounded the entire list by mutiples of $N$, so the whole sequence is $\Theta(N)$.)

Let's look at what happens when we don't choose $N$ but compute $T(8,N)$.
\begin{align*}
T(8,N) &= T(4,N) + c(8,N)  \text{,}  \\
    &= T(2,N) + c(4,N) + c(8,N)  \text{, and}  \\
    &= T(1,N) + c(2,N) + c(4,N) + c(8,N)  \text{.}  \\
\end{align*}

We know that
\begin{align*}
k_1(N) N &\leq c(2,N) \leq k_2(N) N  \text{,}  \\
k_1(N) N &\leq c(4,N) \leq k_2(N) N  \text{, and }  \\
k_1(N) N &\leq c(8,N) \leq k_2(N) N  \text{.}
\end{align*}
From these,
$$  3 k_1(N) N \leq c(2,N) + c(4,N) + c(8,N) \leq 3 k_2(N) N  \text{.}  $$
(This inequality is what we mean when we write "$3\Theta(N)$" -- the sum of three, likely different, bounded numbers.)

Notice that the bounds on $c$ are independent of $n$.  Whether $n$ is big or small, $c$ has the same bounds, so $\Theta(N)$ is both notationally and actually independent of $n$.  That means $\Theta(N) \in O(n^0)$ (relative to $n$).

When we choose an $N$ and apply the master theorem to $T(n)$ (with the dependence on $N$ suppressed because we have already chosen $N$), we treat $n$ as the independent variable.  Consequently, $\Theta$ and $O$ are relative to $n$.  As we have shown $\Theta(N)$ is independent of $n$ -- the upper and lower bounds implicit in "$\Theta(N)$" are independent of $n$.  We may replace $\Theta(N)$ with either the constant $k_1(N)N$ or the constant $k_2(N)N$, whichever leads to the worst case, and apply the master theorem to this recursion with constant inhomogeneous term.  The result is described in the very first part of this Answer.