问:
Vector space: $\forall a\in K, v \in E ( a \cdot_E v=0_E \to a=0_K \lor v=0_E)$
I need to prove the following:

let $E$ vector space on $K$, then $\forall a\in K, v \in E ( a \cdot_E v=0_E \to a=0_K \lor  v=0_E)$

Thanks in advance!

答:
It suffices to prove that if $a v = 0_E$ (I take there's a misprint in you formula, and I'm simplifying notation a bit), and $a \ne 0_K$, then $v = 0_E$.

Now if $a \ne 0_K$, then $a$ has an inverse $a^{-1}$ in the field $K$.

Thus
$$
0_E = a^{-1} \cdot 0_E = a^{-1} (a v) = (a^{-1} a) v = 1 v = v.
$$


问:
How do we find the range of $z^z, \: z \in \mathbb{C}$?
I was recently exploring domain colouring, when the transformation $z \mapsto z^z$ changed the complex plane thus:

This made me wonder how we could mathematically describe the coloured 'boomerang' region, which represents the range of the function $z^z$ (the white areas have no values at their corresponding points). Of course, one way to describe the region would be,

$S = \{ \left(x, y \right) : \left(x, y \right) \in \mathbb{R}^2,  x+iy = z^z, z \in \mathbb{C} \}$

Which corresponds to the range $\{ z : z \in \mathbb{C}, z = w^w, w \in \mathbb{C} \}$

But is there any way of finding the range in another form?

答: If $z=\exp W(\ln w)$ with $W$ a branch of the Lambert-$W$ function,$$z^z=\exp(z\ln z)=\exp(\ln w)=w.$$This works for all $w\in\Bbb C\setminus\{0\}$.

ContentLicense: CC BY-SA 4.0


问:
Why do block matrices behave so similarly to regular matrices?
I've been using block matrices a bit in my numerical analysis course. They have many identities that mimic the identities for regular matrices. I understand the proofs, which involve boiling things down into summations. Is there some algebraic structure behind block matrices that is causing these nice theorems? Are block matrices linear maps on the vector space of matrices or something?</p>

答:
Conventional linear algebra defines matrix as elements of a field, which means that they can be added and multiplied with the properties you'd expect from the reals - the relevnt ones here being that multiplicative inverses are guarenteed to exist bar $0^{-1}$, and that both these operations are commutative.

Square matrices do not multiply commutatively, and also not every non-zero matrix has an inverse. However, they have all the other properties required to count as a field, which effectively means that so long as you don't "touch" these exceptions, you'll find the same theorems as you would for matrices over an actual field.

Handily, adding and multiplying matrices themselves rely more on the fact that multiplication is possible at all, and don't involve division by scalars. Addition is easy - it works componentwise, and has no weird edge cases. When multiplying, you have a choice to make about which order you do the multiplications inside the calculation of a product matrix's elements, but since you weren't expecting the "outer" matrix product to be commutative anyway, you can naturally choose to put them in the same order as the factors they came from.

The problems start appearing when you try relating these matrices-over-matrices to the underlying scalars though. For starters, unlike with matrices over fields, $\lambda A \neq A\lambda$ in general for "scalar" - that is, inner matrix - $\lambda$. However, we do have an analogous $kA=Ak$ for a $k$ chosen from the field that the inner matrices range over, because we can define that over the outer matrices componentwise. However, even if they're distinct, $\lambda A $ and $A \lambda$ will both exist.

A lack of inverses of the elements also means that the the matrices can lack inverses, because e.g. the factor $\frac{1}{ad-bc}$ in inverting a 2x2 matric can fail to be defined even if $ad-bc\neq0$. That said, it's not much of a change given that we weren't expecting them to be invertible anyway.


问:
Fundamental points of Cremona plane transformation
The Cremona plane transformation is the birational map $\varphi: \Bbb P^2 \to \Bbb P^2$, defined by $[x:y:z] \mapsto [yz:xz:xy]$ on the every point except for $[0:0:1]$ , $[0:1:0]$ , $[0:0:1]$.

I want to show that $\varphi$ can't be extended to one of the special points, as a morphism from an open subspace of the projective plane, to the projective plane.

I tried lifting the question to $\Bbb A^3$ but did not succeed.

I would love to get an advice or a solution.

Thanks.

答: Let $U = \mathbb{P}^2 \setminus \{P_0, P_1,P_2\}$ where $P_i$ are the points. We try to extend $\varphi$ past $U$. For points $p \in V_p(x_1)$ we have $$\varphi(p) = \varphi([p_0, 0, p_2]) = [0, p_0 p_2, 0] = [0,1,0].$$ For $p \in V_p(x_2)$ we see that the rational map gives $\varphi(p) = [0,0,1]$. Define $r_\lambda = [p, 0, \lambda]$ and $s_\lambda = [p, \lambda, 0]$. Then $$\lim_{\lambda \to 0} \varphi(r_\lambda) = [0,1,0] \text{ and } \lim_{\lambda \to 0} \varphi(s_\lambda) = [0,0,1].$$ But $\lim_{\lambda \to 0} r_\lambda = s_\lambda = [1,0,0]$ so that if $\varphi$ extends to $P_0$ then $\varphi(P_0) = [0,1,0] = [0,0,1]$ which is a contradiction. By symmetry we see that $\varphi$ does not extend to $P_1, P_2$.


问:
What are the possible Clifford functions of a curve?
Let $C$ be some smooth proper curve of genus $g$ over an algebraically closed field $k$. In order to understand special divisors on C one may consider the following function c(r), which I will call Clifford's function. It assigns to a number $0 \leq r \leq g-1$ the (minimal degree of a divisor such that r(D) = dim|D| = r) - 2r. Clifford's theorem states that $c(r) \geq 0$. Looking at a $D \in g^1_d$ we notice that $r(nD) \geq n$ and hence $c(r) \leq rc(1)$. From this I arrive at the guess that $c$ is always concave. In fact I guess that there exists some generic Clifford function $C_{max}$ and that we can characterize all Clifford functions as concave functions $0 \leq c \leq C_{max}$.

In my searches I have only been able to find results on special values of the Clifford function (for instance $c(1)$ corresponds to the gonality of a curve), but none on this function as an object. Is it possible to characterize all functions occurring as the Clifford function of some curve $C$?

答:
This is a partial answer concerning the existence of such a $C_{max}$ and its concavity. The Brill-Noether theorem states that on a generic curve a $g^r_d$ exists iff $g-(r+1)(g-d+r) \geq 0$. This is equivalent to $d \geq g+r-\frac{g}{r+1}$. It follows that the generic Clifford function is $c(r) = g-r-\lfloor\frac{g}{r+1}\rfloor$ which again by Brill-Noether theory is the maximal such function.

It remains to show that this function is concave which is equivalent to showing that $f(r) = \lfloor\frac{g}{r+1}\rfloor$ is concave within the range. In fact it is enough to show that $f(r-1) + f(r+1) \geq 2 f(r)$ for integers $1 \leq r \leq g-2$. Setting $h(r) = \frac{g}{r+1}$, it is enough to show $h(r-1) + h(r+1) -2 \geq 2h(r)$ for such $r$. This is an easy calculation.

To continue it is probably helpful to understand the basics of the intersection of Brill-Noether loci in the moduli space of curves.


问:
Let $\mathcal{D}=\{(0,\frac{1}{n})\mid n\in \mathbb{N}\}.$ Determine $\bigcup\mathcal{D}$ and $\bigcap\mathcal{D}$.

Let $\mathcal{D}=\{(0,\frac{1}{n})\mid n\in \mathbb{N}\}.$ Determine $\bigcup\mathcal{D}$ and $\bigcap\mathcal{D}$.

I found this problem on an introductory set theory pdf, but they did not have any definitions for the notations $\bigcup\mathcal{D}$ and $\bigcap\mathcal{D}$. What might they be representing here?

答:
$\newcommand{\FF}{\mathcal{F}}
\newcommand{\setb}[2]{\left\{ #1 \; \middle| \; #2 \right\}}
\newcommand{\set}[1]{\left\{ #1  \right\}}$Generally for a family of sets $\FF$, we define those symbols as so:

$$\bigcup \FF = \bigcup_{F \in \FF} F \qquad \bigcap \FF = \bigcap_{F \in \FF} F$$

or, more precisely,

$$\bigcup \FF = \setb{x}{x \in F \text{ for some } F \in \FF}$$
$$\bigcap \FF = \setb{x}{x \in F \text{ for every } F \in \FF}$$

An example: let $\FF$ be the collection of sets

$$\Big\{ \set{1}, \set{1,2}, \set{1,2,3}, \set{1,2,3,4}, \cdots \Big\}$$

Then $\bigcup \FF = \Bbb Z^+$ and $\bigcap \FF = \set{1}$. That's because every positive integer will be in some $F \in \FF$ at some point, and $1$ is the only element in every $F \in \FF$.


问:
Prove $0a=0$ in a ring (My Solution)
This post is a Q&A style post on this problem from the beginning of Ring Theory:

Prove $0a=0$ in a ring $R$.

答:
Using these properties of $R$:

existence of additive identity in $(R,+)$

distributivity in $R$

$$0a = (0+0)a = 0a + 0a$$

Then we have

$$0a + (-0a) = 0a + 0a + (-0a)$$

So $$0 = 0a$$

Title: Prove $0a=0$ in a ring (My Solution)


问:
Is there a notation that is after pi product?
I have been wondering that if there is a notation that works with powers.
What I mean is:

How there is addition (+) and after it; is multiplication (x) and after it; is exponentiation (^) and after it; is tetration (^^) and goes so on...

And then there is summation ($\sum$) and after it; is product ($\prod$) and after it; ??? (is there something after it?)

So, summation works like that:

$\sum_{k=1}^{4}{k^2} = 1^2 + 2^2 + 3^2 + 4^2 = 1+4+9+16 = 30$,

And, product works like that:

$\prod_{i=2}^{4}{i^i} = 2^2 \cdot 3^3 \cdot 4^4 = 4 \cdot 9 \cdot 256 = 9216$,

Then, is there something that works with exponents? Like it would work with something like that:

(assume A is the notation in this case) $A_{n=2}^{4}{n} = 2^{3^4} = 2^{81} =$ (too lazy to calculate it, put it in your calculator if you want)

Thanks for answers.

答:
The special case where the concerned operation is applied to the same variable multiple times is often represented using Knuth's up-arrow notation:

$x \uparrow y = x \cdot x \dots \text{(y times)} \dots x \cdot x = x^y \\ x \uparrow \uparrow y = x \uparrow ^2 y = x^{x^{ \text{(y times)}^{x^x}}}$

And so forth. Such repeated operations, originating from the basic operator addition, are known as hyperoperations and are conventionally represented by the letter $H$ :

$H_1 \left( x, y \right) = x+y \\ H_2 \left( x, y \right) = xy \\ H_3 \left( x, y \right) = x \uparrow y = x^y \\ H_4 \left( x, y \right) = x \uparrow^2 y \\ \vdots \\ H_n \left( x, y \right) = x \uparrow^{n-2} y \\ $

Note that for more than two variables, a repeated hyperoperation $H_n$ is no longer commutative after $n=2$, and we must consider right-associativity,

$x^{y^z} \equiv x^{\left( y^z \right)} \neq \left( x^y \right) ^z$

Keeping this in mind, one may devise a general notation for the repeated hyperoperation $H_{n}$ in the following manner. Let us start with three variables $x,y,z$,

$H_1 \left( x,y,z \right) = x + \left( y + z \right) = H_1 \left( x, H_1 \left( y, z \right) \right) \\ H_2 \left( x,y,z \right) = x \left( yz \right) = H_2 \left( x, H_2 \left( y, z \right) \right) \\ H_3 \left( x,y,z \right) = x ^ \left( y^z \right) = H_3 \left( x, H_3 \left( y, z \right) \right) \\ \vdots$

Moving on to four variables $x,y,z,t$,

$H_1 \left( x,y,z,t \right) = x + \left( y + \left( z+t \right) \right) = H_1 \left( x, H_1 \left( y, H_1 \left( z,t \right) \right) \right) \\ H_2 \left( x,y,z,t \right) = x \left( y \left( zt \right) \right) = H_2 \left( x, H_2 \left( y, H_2 \left( z,t \right) \right) \right) \\ H_3 \left( x,y,z,t \right) = x ^ \left( y^ {\left( z^t \right)} \right) = H_3 \left( x, H_3 \left( y, H_3 \left( z,t \right) \right) \right) \\ \vdots$

Therefore, for a general number of arguments $n$,

$$H_k \left( x_1, x_2, \dots , x_n \right) = H_k \left( x_1, H_k \left( x_2, x_3, \dots , x_n \right) \right) = H_k \left( x_1, H_k \left( x_2, H_k \left( x_3, x_4, \dots , x_n \right) \right) \right) = \dots$$

Or,

$$\boxed{H_k \left( x_1, x_2, \dots , x_n \right) = H_k \left( x_1, H_k \left( x_2, \dots \left( x_{n-2}, H_k \left( x_{n-1} , x_n \right) \right) \right) \right)}$$

Using the iterative function composition notation that I have described here, the same equation becomes more structured,

$$\boxed{H_k \left( x_1, x_2, \dots , x_n \right) = \underset{i=1}{\overset{n-2}{\Huge{\kappa}}} \: H_k \left( x_{n-i-1}, H_k \left( x_{n-1}, x_{n} \right) \right)}$$

From this, we learn that $\prod$ is just $H_2$ in the infinite-membered family of hyperoperations.


问:
How to interpret a time varying probability in the context of failure rate analysis?
I am having trouble interpreting a time varying probability in the context of failure rate analysis.

For instance, suppose I define $X(t) \sim \mathcal{N}(\mu,\,\sigma^{2})$, a function $g(t)$ and then a time varying probability as $p(t) = P(X(t) < g(t))$. Now If I call the event $\{X(t) < g(t)\}$ the "failure" that can only happen once, what does the function $p(t) = P(X(t) < g(t))$ represent in this context?

EDIT 1: I am ultimately interested in the failure time distribution, which I suspect can be constructed out of the above function $p(t)$

答: Since $g(t)$ is deterministic and the distribution of $X$ is known, $P\{X<g(t)\}$ is known at all instances $t$. The event you are looking for is the waiting time for the occurrence of $X<g(t)$. It follows an exponential distribution with a time varying rate of $\lambda(t)=P\{X<g(t)\}$.


问:
Proving $x^{nm}-c$ irreducible $\leftrightarrow x^n-c,x^m-c$ irreducible
I've proven the implication $\rightarrow$ so far but I'm out of ideas for $\leftarrow$. I tried to find an approach using Eisenstein's criterion but haven't had much luck.

$x^n-c,x^m-c,x^{nm}-c \in K[x]$ for arbitrary Field $K$

答:
With the condition $gcd(m,n)=1$ we get following proof. Let $d\in\overline K$ such that $d^{mn}-c=0$. Then we have the field $L_{mn}:=K(d)$ and subfields $L_m:=K(d^n); L_n:=K(d^m)$. Here we get the equivalence:

$X^{mn}-c$ is irreducible iff $[L_m\cdot L_n :K]= [L_{mn}:K]=mn$ iff $[L_m:K]=m \land [L_n:K]=n$ iff $X^{m}-c$, $X^{n}-c$ are irreducible.

counterexample for gcd(m,n)>1: Choose $m=n=2$ and $K=\mathbb{R}$. Then $X^2+1$ is irreducible but $X^4+1$ is reducible.


问:
Gradient in Spherical coordinates
I'm trying to derive the gradient vector in spherical polar coordinates: $$\nabla = \left( \frac{\partial}{\partial x}, \frac{\partial}{\partial y},\frac{\partial}{\partial z} \right)$$The method I am trying to use is different from most papers/videos I found and I don't understand why it doesn't work. I am able to get expressions for the cartesian differentials: $dx, dy, dz$. First, I am just trying to find $\frac{\partial}{\partial x}$ in spherical coordinates. I have: $$dx= \cos \theta \sin \phi dr + r \cos \theta \cos \phi d \theta + r \sin \theta \sin \phi d \phi$$ This sounds strange but my first intuition was to say that: $$\frac{\partial}{\partial x} = \frac{ \partial }{ \cos \theta \sin \phi dr + r \cos \theta \cos \phi d \theta + r \sin \theta \sin \phi d \phi} $$ Which doesn't seem to make any sense now :(. If my logic is wrong, could someone explain to me why?

答:
I am not satisfied with vb628's answer. Even after patryan asked for clarification, and vb628 responded, I am still uncertain why the scaling factors are what they are. Therfore, I undertake my own answer here.

$$\boldsymbol{\nabla}{f} =   \mathbf{e}_r\, \frac{\partial{f}}{\partial{r}}
+
\mathbf{e}_\theta\,\frac{1}{r } \,\frac{\partial{f}}{\partial{\theta}}
 +
\mathbf{e}_\phi\,\frac{1}{r\,\sin{\theta}} \,\frac{\partial{f}}{\partial{\phi}}\qquad\text{in spherical coordinates}.$$

To undertake this derivation I need the result that
\begin{equation*}
d\mathbf{s}
=
\mathbf{e}_r\,dr
+
\mathbf{e}_\theta\,r\,d\theta
+
\mathbf{e}_\phi\,r\,  \sin{ \theta} \,d\phi .
\end{equation*}
Please note that $d\mathbf{s}
\cdot d\mathbf{s}
$ gives vb628's result for $ds^2$ found above.
I also need to consider the differential arc length in each of the three directions of the standard spherical basis:
\begin{align*}
ds =
\begin{cases}
d\mathbf{s} \cdot\mathbf{e}_r =dr,
&
\text{when  arc   constrained to   $\mathbf{ e }_r$ direction;}
\\
d\mathbf{s} \cdot\mathbf{e}_\theta =r \,d\theta,
&
\text{when arc constrained to   $\mathbf{ e }_\theta$ direction; and}
\\
d\mathbf{s} \cdot\mathbf{e}_\phi =r\,  \sin{ \theta} \,d\phi,
&
\text{when arc constrained to  $\mathbf{ e }_\phi$ direction.}
\end{cases}
\end{align*}

According to the definition in [1], $\boldsymbol{\nabla}{f}$ in a direction $\mathbf{u}$ is the directional derivative $df/ds$ in that direction. The element of the archlength $ds$ in the $\mathbf{ e }_r$ direction is $dr$, so
$$\boldsymbol{\nabla}{f}\cdot \mathbf{e}_r
= \frac{d{f}}{ds}
= \frac{\partial{f}}{\partial{r}}.$$
Note that I replace  the derivative with the partial derivative to re-enforce  that the arc is constrained to one of the standard basis directions.  Below, I will do the same thing twice more.
Similarly, the element of the archlength $ds$ in the $\mathbf{ e }_\theta$ direction is $r\,d\theta$, so
$$\boldsymbol{\nabla}{f}\cdot \mathbf{e}_\theta
= \frac{d{f}}{ds}
=
\frac{\partial{f}}{r\,\partial{\theta}}.$$
Finaly, the element of the archlength $ds$ in the $\mathbf{ e }_\phi$ direction is $r\,\sin{\theta}\,d\phi$, so
$$\boldsymbol{\nabla}{f}\cdot \mathbf{e}_\phi
=
 \frac{\partial{f}}{r\,\sin{\theta}\,\partial{\phi}}.$$
Thus, in spherical coordinates, we have
$$\boldsymbol{\nabla}{f} =   \mathbf{e}_r\, \frac{\partial{f}}{\partial{r}}
+
\mathbf{e}_\theta\,\frac{1}{r } \,\frac{\partial{f}}{\partial{\theta}}
 +
\mathbf{e}_\phi\,\frac{1}{r\,\sin{\theta}} \,\frac{\partial{f}}{\partial{\phi}}$$

Bibliography

[1] Wikipedia contributors. (2021, January 14). Gradient. In Wikipedia, The Free Encyclopedia. Retrieved 21:38, January 27, 2021, from https://en.wikipedia.org/w/index.php?title=Gradient&oldid=1000232587

Title: Gradient in Spherical coordinates


问:
Infinite sum of Python for loop
I'm a geometry student. Recently we were doing all kinds of crazy circle stuff, and it occurred to me that I don't know why $\pi r^2$ is the area of a circle. I mean, how do I really know that's true, aside from just taking my teachers + books at their word?

So I tried to derive the formula myself. My strategy was to fill a circle with little squares. But I couldn't figure out how to generate successively smaller squares in the right spots. So instead I decided to graph just one quadrant of the circle (since all four quadrants are identical, I can get the area of the easy +x, +y quadrant and multiply the result by 4 at the end) and put little rectangles along the curve of the circle. The more rectangles I put, the closer I get to the correct area. If you graph it out, my idea looks like this:

Okay, so to try this in practice I used a Python script (less tedious):

```<code>from math import sqrt, pi

# explain algo of finding top right quadrant area
# thing with graphics via a notebook

# Based on Pythagorean circle function (based on r = x**2 + y**2)
def circle_y(radius, x):
  return sqrt(radius**2 - x**2)

def circleAreaApprox(radius, rectangles):
  area_approx = 0
  little_rectangles_width = 1 / rectangles * radius

  for i in range(rectangles):
    x = radius / rectangles * i
    little_rectangle_height = circle_y(radius, x)
    area_approx += little_rectangle_height * little_rectangles_width

  return area_approx * 4
</code>```

This works. The more rectangles I put, the wrongness of my estimate goes down and down:

```<code>for i in range(3):
    rectangles = 6 * 10 ** i
    delta = circleAreaApprox(1, rectangles) - pi # For a unit circle area: pi * 1 ** 2 == pi
         print(delta)
</code>```

Output

```<code>0.25372370203838557
0.030804314363409357
0.0032533219749364406
</code>```

Even if you test with big numbers, it just gets closer and closer forever. Infinitely small rectangles circleAreaApprox(1, infinity) is presumably the true area. But I can't calculate that, because I'd have to loop forever, and that's too much time. How do I calculate the 'limit' of a for loop?

Ideally, in an intuitive way. I want to reduce the magic and really understand this, not 'solve' this by piling on more magic techniques (like the $\pi \times radius^2$ formula that made me curious in the first place).

Thanks!

答:
In the limit as your mini squares shrink to no size, the area goes from being a sum of their areas to an integral. Consider the circle $x^2+y^2=r^2$. In the positive quadrant, one quarter of its area is$$\int_0^r\sqrt{r^2-x^2}dx=\int_0^{\pi/2}r^2\cos^2tdt$$(by substituting $x=r\sin t$). The mean values of $\cos^2t$ and $\sin^2t$ sum to $1=\cos^2t+\sin^2t$, and are equal as the functions differ only in a phase shift, so the average of each function is $\tfrac12$, and we're integrating over a half-period of $\cos^2t$, but the full period just reflects this. So the circle's area is $4\tfrac{\pi}{2}\tfrac{r^2}{2}=\pi r^2$.

This isn't how people originally worked it out, it's just what your method points us to. The simplest solution is to cut the circle into thinner and thinner sectors instead, and arrange these alternately into something resembling a rectangle, of height $r$. Its width is a half-circumference $\pi r$.

This argument can be formalised with calculus too; it boils down to the infinitesimal area element being $\rho d\rho d\theta$, with $\rho$ an arbitrary internal point's distance from the centre:$$\int_0^r\rho d\rho\int_0^{2\pi}d\theta=\tfrac12r^22\pi=\pi r^2.$$

But your approach is interesting from the perspective of more recent mathematics. A Monte Carlo method computes probabilities from integrals or vice versa. That the circle comprises a proportion $\tfrac{\pi}{4}$ of the smallest enclosing square's area means a randomly chosen point in that square has probability $\tfrac{\pi}{4}$ of being in the circle.

Title: Infinite sum of Python for loop


问:
Uniformly continuous function - modulus of continuity
Give an example of a uniformly continuous function $f: (X,d) \rightarrow (Y,\rho)$ for which there doesn't exists a modulus of continuity $\omega: \mathbb{R}_+ \rightarrow \mathbb{R}_+$ such that:

$$\forall x,y \in X: \ \ \rho(f(x), f(y)) \le \omega(d(x,y)).$$

I cannot come up with anything. Could you help me with that?

Thank you.

答:
It is easy to come up with many examples if you keep in mind that

if $d$ is the discrete metric, $f$ is already uniformly continuous;

if the modulus of continuity is finite everywhere, then the image of every bounded set is also bounded.

ContentLicense: CC BY-SA 3.0


问:
Linear map, prove that $T^2 = T$ is equivalent to existence of certain matrix representation
I'm trying to prove that if for a linear map $T$ from a finite vector $V$ space to itself we have $T^2 = T$ iff there exists a basis of $V$ such that the matrix representation $A$ of $T$ with regard to that basis looks like:

$$
\begin{pmatrix}
  I & 0 \\
  0 & 0
\end{pmatrix}
$$

Proving that the latter implies the former is easy, but I'm not sure about the other direction. I have tried the following:

Let $\lambda$ be an Eigenvalue of $A$ with corresponding eigenvector $v$, then we have $Av = \lambda v$ and $A^2v = A(Av) = A(\lambda v) = \lambda (Av) = \lambda^2 v$. And since $A^2 = A$ this means that $\lambda^2 = \lambda \implies \lambda \in \{0, 1\}$. That means that all the diagonal elements of $A$ must be zero or one, but how do I show that they are consecutive?

EDIT: Further attempts, is this correct?

Assume $A$ has dimension $n \times n$ and k eigenvalues are one, the rest zero. Then for a Jordan normal form $J$ of $A$, it must be true that $\operatorname{rank} J = k$ and thus $\dim \ker J = \dim \ker{A} = \dim E(0) = n - k$ and $\dim \ker{J -I} = \dim \ker{A - I} = \dim E(1) = k$. Thus the algebraic and geometric multiplicities of the eigenvalues match and $A$ is diagonalisable.

答:
You don't need eigenvalues and eigenvectors and Jordan forms.

Let $u_1,\dots,u_q$ be a basis of $\ker T$ and $w_1,\dots,w_p$ be a basis of $\operatorname{im} T$.

Then the matrix of $T$ with respect to the basis $w_1,\dots,w_p,u_1,\dots,u_q$ is of the desired form because $Tw_i = T^2 v_i = T v_i = w_i$.


答:
Any vector $v$ can be expressed as $(v-T(v))+T(v)$.

Note that $T(v-T(v))=T(v)-T^2(v)=0$ and so $v-T(v)$ is zero or an eigenvector for value $0$.

Whereas $T(T(v))=T^2(v)=T(v)$ and so $T(v)$ is zero or an eigenvector for value $1$.

Hence the eigenvectors span the space and the matrix has the form you require.

Title: Linear map, prove that $T^2 = T$ is equivalent to existence of certain matrix representation

Body:
I'm trying to prove that if for a linear map $T$ from a finite vector $V$ space to itself we have $T^2 = T$ iff there exists a basis of $V$ such that the matrix representation $A$ of $T$ with regard to that basis looks like:

$$
\begin{pmatrix}
  I & 0 \\
  0 & 0
\end{pmatrix}
$$

Proving that the latter implies the former is easy, but I'm not sure about the other direction. I have tried the following:

Let $\lambda$ be an Eigenvalue of $A$ with corresponding eigenvector $v$, then we have $Av = \lambda v$ and $A^2v = A(Av) = A(\lambda v) = \lambda (Av) = \lambda^2 v$. And since $A^2 = A$ this means that $\lambda^2 = \lambda \implies \lambda \in \{0, 1\}$. That means that all the diagonal elements of $A$ must be zero or one, but how do I show that they are consecutive?

EDIT: Further attempts, is this correct?

Assume $A$ has dimension $n \times n$ and k eigenvalues are one, the rest zero. Then for a Jordan normal form $J$ of $A$, it must be true that $\operatorname{rank} J = k$ and thus $\dim \ker J = \dim \ker{A} = \dim E(0) = n - k$ and $\dim \ker{J -I} = \dim \ker{A - I} = \dim E(1) = k$. Thus the algebraic and geometric multiplicities of the eigenvalues match and $A$ is diagonalisable.


问:
How do I solve $x^2 + y^2 + xy = z$ for $y$
How do I solve the following equation for $x$ or $y$ (does not matter because you can swap them):

$$
x^2+y^2+xy=z
$$

答:
Hint: Complete the square in $x$ or $y$. This approach is how you prove the quadratic formula.

Added:

$$x^2+y^2+xy=z \implies  \left(x+\frac{y}{2}\right)^2=z-\frac{3}{4} y^2 \implies \dots. $$


问:
How can I "see" that calculus works for multidimensional problems?
Let's say I have some function f(x) = x^2 + b. I can see what's going on, I can count the slope geometrically even without knowing the rules of derivatives.

When I need to minimize some cost function for linear problem (linear regression with gradient descent), I just need to picture 3d, and I can "see", and be quite confident why and how it works.

How can I "see" or get intuition that calculus works for multidimensional problems? Let's say I have a problem with many variables like:

f(area_km, bedrooms, ...) = theta + theta1 * area_km + theta2 * bedrooms etc

If I want to apply gradient descent, I know I need to calculate partial derivatives and multiply it with a learning rate etc. It works. But it's kinda magical that it works.

I am sorry this is a silly question, I am just beginning.

答:
Consider a single variable function $f(x)$, suppose there exists a maximum for $f(x)$ , then we can find that by the function's derivative has a sign flip at that point, then if we were to take a point $ x>x_o$

$$ \frac{df}{dx}|_{x>x_o} = \text{something negative}$$

Now, the magnitude of the derivative depends on how far you are from the global maximum, so suppose you take a 'step' on the $x$ axis scaled up by the derivative.

$$ \frac{df}{dx}_{x > x_o} \Delta x$$

Then, you will end up walking to the maximum. Now let's say you are at a point $x<x_o$ , then the first derivative is positive and you will still end up walking toward the maximum. Moral of the story? If you walk around the input set keeping your steps scaled up by the function's derivative, then you'll eventually hit a global maximum / minimum.[Edit: It may also turm up that you get stuck in local mini/global minimum :(]

Now, consider a multivariable $f(x,y)$ , by the logic above if it has a local max, say at a point $(x_o,y_o)$, if you take a $x>x_o$, then

$$ \frac{\partial f}{\partial x} = \text{something negative}$$

And similar argument to single variable case can be applied, and we can apply a similar argument for $y$. Ultimate this leads us to idea that the vector given as:

$$ \nabla F = < \frac{\partial F}{\partial x} , \frac{\partial F}{\partial y} >$$

Tells us how to move in the input plane such that our function is maximized.

So, say you are a point $<x_o,y_o>$ , then the point where you should move next to maximize the function is:

$$ <x,y>  = <x_o,y_o> +  < \frac{\partial F}{\partial x}|_{x_o} \Delta x, \frac{\partial F}{\partial y}|_{y_o}  \Delta y>$$

Why? If $z(x,y)$

$$\Delta z= \frac{\partial F}{\partial x} \Delta x + \frac{\partial F}{\partial y} \Delta y= \nabla F \cdot ds$$

$ds$ is the length of step you take in the input plain, clearly for a fixed step length, the most increase in function happens when the angle between step and gradient is zero.

Hence, using that gradient vector as a compass to move, you'll finally reach some kind of extremum point in the input plane.


问:
Symmetric Bilinear Form/ Hermitian Form unique Matrix representation
Given $\mathbb{K} = \mathbb{R} $ or $  \mathbb{C}$ I have $\varphi:\mathbb{K^n}\times\mathbb{K^n}\rightarrow \mathbb{K}$ a symmetric Bilinear Form or complex Hermitian Form/Symmetric sesquilinear form (depending on $\mathbb{K}$) and I have to prove that there exists a unique matrix $A = (a_{i,j})\in \mathbb{K^{n\times n}}$ with $\varphi(x,y) = x^TA\overline{y}$

My attempt:

I'll take $\{{e_1,....,e_n}\}$ so the standard Basis which is also an orthonormal Basis for $\mathbb{K^n}$ and I write $\varphi(e_i,e_j) = B_{i,j}$.

I define $\varphi_A(x,y) = \langle{x,Ay}\rangle$ where $ \langle{.,.}\rangle$ denotes the standard dot product and I prove it is indeed a Bilinear or complex Hermitian Form in respect to $\mathbb{K}$.

Then it follows that $Aej = \sum_{k=1}^{n} B_{k,j}e_k$ and  so $\varphi_A(e_i,e_j)=\langle{x,Ae_j}\rangle = \sum_{k=1}^{n}B_{k,j}\langle{e_i,e_k}\rangle = B_{i,j}$ because $\langle{e_i,e_k}\rangle \neq 0$ only when $k = i$ and so $\varphi_A$ and $\varphi $ are generally equal.

As for uniqueness I suppose there exist $A_1$,$A_2$$\in \mathbb{K}^{n\times n}$ with $\langle{x,A_1y}\rangle =\varphi(x,y) = \langle{x,A_2y}\rangle \forall x,y\in \mathbb{K^n}$
in which case $\langle{x,A_1y-A_2y}\rangle = \langle{x,A_1y}\rangle - \langle{x,A_2y}\rangle = \varphi(x,y) - \varphi(x,y) = 0 \forall x,y\in \mathbb{K^n}$ and for $x = A_1y-A_2y$ $0 =\langle{x,x}\rangle = \langle{A_1y-A_2y,A_1y-A_2y}\rangle$ = $||x||^2 = ||A_1y-A_2y||^2 = ||(A_1-A_2)y||^2 \Rightarrow A_1 - A_2 =0 \iff A_1 = A_2$

Please let me know if there is something I am missing, if this proof isn't formal enough or if there is any easier/more obvious proof that I clearly missed.

答: By choosing $x=e_i$ and $y=e_j$, if you plug in $\phi(x,y)=x^TAy$, you can see that $a_{ij}=\phi(e_i,e_j)$ so the elements of the matrix are uniquely defined by $\phi$. I think this is a shorter proof of uniqueness. You have different matrices for different choices of the basis, of course.


问:
Prove this sequence converge to 0.5?
prove that,
as k -> infinity
$$\sqrt k  \cdot \sqrt {k + 1}  - k \leqslant 0.5$$

I tried following
$$\mathop {\lim }\limits_{k \to \infty } \left( {\sqrt k  \cdot \sqrt {k + 1}  - k} \right) = 0.5$$
$$\forall \varepsilon  > 0,\exists N > 0{\text{ st}}{\text{. }}\left( {N < k < \infty } \right) \to \left( {\left| {\sqrt k  \cdot \sqrt {k + 1}  - k - 0.5} \right| < \varepsilon } \right){\text{ }}$$

How to choose N?

答:
HINT

I would start with noticing that

\begin{align*}
\sqrt{k(k+1)} - k & = \frac{k(k+1) - k^{2}}{\sqrt{k(k+1)} + k}\\\\
& = \frac{k}{\sqrt{k^{2} + k} + k}\\\\
& = \frac{1}{\sqrt{1 + \dfrac{1}{k}} + 1}
\end{align*}

Now you can apply the continuity of the square root function. Can you take it from here?

Title: Prove this sequence converge to 0.5?


问:
How does this alternate construction of the Sierpinski triangle differ from the usual one?
Can you plot the Sierpinski triangle on the Cartesian plane and define the "removal of triangles" in terms of the points being removed? Imagine an equilateral triangle with vertices at
$(-1, 0), (1, 0), (0, \sqrt{3}).$

So for iteration 1, we remove a triangle with vertices at
$(-\frac{\sqrt{3}}{2}, \frac{1}{2}), (\frac{\sqrt{3}}{2}, \frac{1}{2}), (0, 0)$.

This makes sense to me geometrically, but I got to wondering, do these three vertices (and the points on the lines between them) also get removed, or can they stay behind? More casually, can you talk about recursively removing just "open" or just "closed" triangles? It seems each approach would leave behind two very different kinds of fractals.

答:
Visually, it looks like if you remove the blue triangle below, you would also remove the points GHI leaving the line segments of the larger triangle with a discontinuity in their centers. But if you visualize $3$ more triangles (second iteration), there would be no points from the first iteration triangle to remove. However, not removing vertex points would leave "points" in the middle of the now-missing first-iteration triangle's line segments. The removal of the first would be partially undone.

It appears that removing a triangle does remove the points formerly occupied by its vertices (whether or not a point for one vertex exists) and leaves discontinuities in the original triangle with each iteration.

On the other hand, it's like saying
$\quad \{\emptyset,1,2,3,\cdots\}-\{\emptyset,1,2,3\cdots\}=\{\emptyset\}\quad $
Perhaps it is impossible to remove the points that were vetices.


问:
Matrix Derivative Product Rule $\frac{d}{dx} \langle x,y\rangle Ax $
Let $A\in\mathbb{R^{n\times n}}$,$x,y\in\mathbb{R^{n}}$. What is the derivative of the following expression?

$$
\frac{d}{dx} \langle x,y\rangle Ax
$$

What I tried:

Applying the product rule doesn't work because the first term (see next equation) is inconsistent dimensionally, or I am applying it in the wrong way. Let $f(x) = \langle x,y \rangle, g(x) = Ax$, then

$$ \frac{d}{dx} f(x)g(x) = \frac{df(x)}{dx} g(x) +  f(x)\frac{dg(x)}{dx} = xAx + \langle x,y \rangle A$$.

Here the first term in the last equation doesn't make sense dimensionally, any help or suggestion would be appreciated.

答:
Let
$$ f(x)=\langle x,y\rangle Ax.
$$
Then
\begin{eqnarray}
\frac{d}{dx}f(x)(u)&=&\lim_{t\to0}\frac{f(x+tu)-f(x)}{t}\\
&=&\lim_{t\to0}\frac{\langle x+tu,y\rangle A(x+tu)-\langle x,y\rangle Ax}{t}\\
&=&\lim_{t\to0}\left(\langle u,y\rangle Ax+\langle x,y\rangle Au+t\langle u,y\rangle Au\right)\\
&=&\langle u,y\rangle Ax+\langle x,y\rangle Au.
\end{eqnarray}


答: To solve for $x$, say, just consider $y$ and $z$ as constants, and use the usual formula for the quadratic equation.</p>

Title: How do I solve $x^2 + y^2 + xy = z$ for $y$

Body:
How do I solve the following equation for $x$ or $y$ (does not matter because you can swap them):

$$
x^2+y^2+xy=z
$$


问:
How do I show that if $f$ is integrable on $[c,b]$ for all $c \in [a,b]$, then $f$ is integrable on $[a,b]$?
Let $a < b$. Suppose that the function $f: [a,b] \to \mathbb{R}$ is bounded and Riemann integrable on $[c,b]$ for every $a < c < b$. Prove that $f$ is Riemann integrable on $[a,b]$ and that

$$\int_{a}^{b} f(x) dx = \lim_{c \to a} \int_{c}^{b} f(x) dx$$

I can see that it is true, but I honestly have no idea how to prove that.

My thought would be to show that the upper and lower sums are equal:
$$U(f) = L(f) = \int_{a}^{b} f(x) dx$$
In terms of epsilon-delta, I would want to show that $U(f,P) - L(f,P) \leq \epsilon$ for any $\epsilon > 0$.

答: Since the function is bounded say $|f(x)\le M$, then $|\int _a^cf(x)dx|\le \int _a^c|f(x)|dx\le M(c-a)\to 0$


问:
The formulas of prostapheresis: memorization technique
This question is related purely for my students of an high school and indirectly for me. The formulas below are the formulas of prostapheresis,

\begin{cases}
\sin\alpha+\sin\beta=2\,\sin \dfrac {\alpha+\beta}{2}\, \cos \dfrac {\alpha-\beta}{2} \\
\sin\alpha-\sin\beta=2\sin \dfrac {\alpha-\beta}{2} \,\cos \dfrac {\alpha+\beta}{2}\\
\cos\alpha+\cos\beta=2\cos \dfrac {\alpha+\beta}{2}\,\cos \dfrac {\alpha-\beta}{2}\\
\cos\alpha-\cos\beta=-2 \,\sin \dfrac {\alpha+\beta}{2} \,\sin \dfrac {\alpha-\beta}{2}
\end{cases}

and while I am able to find them, I am not able to find a technique to memorize them.

Is there a technique to be able to memorize them?

答:
It is useful to know the principle that sum or difference to sine and cosine can be written in terms of products of sine and cosine. But I never memorize such identities per se. Whenever needed, you can derive them if you remember the formulas for $\sin(a\pm b)$ and $\cos(a\pm b)$. Or you can simply look at the known list: https://en.wikipedia.org/wiki/List_of_trigonometric_identities

If I need to take a close-book exam that requires memorizing these identities, some observations may be useful for a short-term memory.

If you know $\sin(-x)=-\sin(x)$, then the second identity comes immediately from the first one.

For the rest:
$$
\begin{align}
\color{green}{\sin}\alpha+\color{green}{\sin}\beta=2\,\color{green}{\sin}\dfrac {\alpha+\beta}{2}\, \color{green}{\cos}\dfrac {\alpha-\beta}{2} \\
\cos\alpha\color{red}{+}\cos\beta=2\color{red}{\cos} \dfrac {\alpha+\beta}{2}\,\color{red}{\cos} \dfrac {\alpha-\beta}{2}\\
\cos\alpha\color{blue}{-}\cos\beta=\color{blue}{-}2 \,\color{blue}{\sin} \dfrac {\alpha+\beta}{2} \,\color{blue}{\sin} \dfrac {\alpha-\beta}{2}
\end{align}
$$


问:
Integral of the square of the absolute value of a function
I have been trying to solve this question and have looked to see if this has  been asked but it has not.  I am given this assumption:

\begin{equation}
\|f(x)\|^2 = 1
\end{equation}

From there I know to rewrite this given expression as an integral using the definition of a norm of a function.

\begin{equation}
\|f(x)\|^2 = 1 = \sqrt{\int_{-\infty}^{\infty} |f(x)|^2 \,dx  }^2 = \int_{-\infty}^{\infty} |f(x)|^2 \,dx
\end{equation}

After simplifying, the part that I do not know how to do is how to solve:

\begin{equation}
\int_{-\infty}^{\infty} |f(x)|^2 \,dx
\end{equation}

I do not have an expression to replace f(x) with.  I do know that I am supposed to solve using integration by parts but I do not know how.  Any help is appreciated and sorry is this is confusing!

答:
Your question is rather confusing as it stands.  Technically, one could apply integration by parts to this equation by assuming there exists a function $g(x)$ such that $g'(x) = f(x)$.  One could then rewrite this, via integration by parts, as
$$
\int f^*(x) f(x) \, dx = \int f^*(x) g'(x) \, dx = f^*(x) g(x) - \int g(x) {f^*}'(x) \, dx.
$$
(I'm assuming complex-valued functions here.  If they're real-valued, just drop the asterisks.)  Similarly, you could show that
$$
\int f^*(x) f(x) \, dx = x |f(x)|^2 - \int x \left( f^* f' + {f^*}' f \right) \, dx.
$$
But without further knowledge about the form of $f(x)$, it is unlikely that these facts will help you.  If you've been given the hint to use integration by parts to perform this integral for a specific $f(x)$, it seems more likely to me that there is a different decomposition that allows this to be done.


问:
Prove this formula $\frac{1-r\cos(x)}{1-2r\cos(x)+r^2}= 1+\sum_{n=1}^{+\infty}r^{n}\cos\left(nx\right)$
I am trying to use prove, by just simple algebraic manipulation, to prove the equality of this formula.
$$\dfrac{1-r\cos(x)}{1-2r\cos(x)+r^2}= 1+\sum_{n=1}^{+\infty}r^{n}\cos\left(nx\right)$$

I have been given hints and instructions from this thread

Write using Euler’s identity $$\cos(x)=\frac{e^{ix}+e^{-ix}}{2}$$

Factor the denominator

Find the partial fractions decomposition, expand the parts as geometric series, and convert from exponential functions back to trigonometric functions (Euler’s identity again).

This is how I have done:

RHS: $$\dfrac{1-r(\dfrac{e^{ix}+e^{-ix}}{2})}{1-2r(\dfrac{e^{ix}+e^{-ix}}{2})+r^{2}}=\dfrac{1-r(\dfrac{e^{ix}-e^{-ix}}{2})}{1-re^{ix}-re^{-ix}+r^2}$$

Then from this thread, I have learnt how to factorize the denominator (See Jack D'Aurizio answer, first answer of the thread, first line). The trick is to write $1=e^0$.

$$\dfrac{1-r(\dfrac{e^{ix}+e^{-ix}}{2})}{(re^{ix})(r-e^{-ix})}$$

The third step is to decompose the fraction:

$$\dfrac{A}{r-e^{ix}}+\dfrac{B}{r-e^{-ix}}=\dfrac{1-r(\dfrac{e^{ix}+e^{-ix}}{2})}{(r-e^{ix})(r-e^{-ix})}$$

$$A(r-e^{-ix})+B(r-e^{ix})=1-r(\dfrac{e^{ix}+e^{-ix}}{2})$$

I am stuck here, I notice that let $x=0$, we will have

$$A(r-1)+B(r-1)=1-r(\dfrac{e^{ix}+e^{-ix}}{2})$$

I am stuck here, I don't know to find $A$ and $B$

Also, could you provide in details how to finish the part "expand the parts as geometric series, and convert from exponential functions back to trigonometric functions (Euler’s identity again)".

My symbolic manipulation skill is not very good, so a detailed answer is great!

Thanks!

答: Since$$\begin{align}\frac{1-r(e^{ix}+e^{-ix})/2}{(r-e^{ix})(r-e^{-ix})}&=\frac{A}{r-e^{ix}}+\frac{B}{r-e^{-ix}}\\\implies 1-r(e^{ix}+e^{-ix})/2&=A(r-e^{-ix})+B(r-e^{ix}),\end{align}$$the next step is to consider the $r^0$ and $r^1$ terms separately, giving$$1=-e^{-ix}A-e^{ix}B,\,-(e^{ix}+e^{-ix})/2=A+B.$$Now solve simultaneous equations. You should find$$A=-\frac12e^{ix},\,B=-\frac12e^{-ix}.$$


问:
Prove that if sets A and B are subsets of each other that A = B
I'm a CS student that's never taken a class on set theory. The instruction I've received isn't great and I want to make sure I'm approaching this correctly since I don't feel fully comfortable with proofs yet

Problem: We want to prove that if two sets are subsets of each other, then these two sets are equal.

Definitions:

A is a subset of B iff ∀x (x ∈ A $\Rightarrow$ x ∈ B)

Two sets are equal iff ∀x (x ∈ A $\iff$ x ∈ B)

Proof by Contradiction:

We want to prove that A ⊆ B $\land$ B ⊆ A $\iff$ A = B

Suppose A $\neq$ B

This means ∃x such that (x ∈ A $\iff$ x ∈ B) is false

As such, one of the following two conditions must be true:

∃x ∈ A | x is not a member of B meaning A cannot be a subset of B

∃x ∈ B | x is not a member of A meaning B cannot be a subset of A

This contradicts the premise of A ⊆ B $\land$ B ⊆ A

答:
Your proof is correct. Provided below is another proof to hopefully help you understand what JMoravitz said.

Let A and B be any two arbitrary sets where A⊆B and B⊆A.
Using inclusion we have ∀x(x ∈ A ⇒ x ∈ B) and ∀x (x ∈ B ⇒ x ∈ A).
We can combine these two statements to get, ∀x ((x ∈ A ⇒ x ∈ B) ∧ (x ∈ B ⇒ x ∈ A)).
We now use the definition of the double implication that JMoravitz mentioned, i.e.
(P⟺Q) = (P⟹Q)∧(Q⟹P).
We finally get that ∀x (x ∈ A ⟺ x ∈ B).

Happy learning :)


答:
Typically this kind of issue is handled by seeing a stable value emerge, with tolerance under some desired value, from successively finer approximation.

In this case if you double the number of rectangles, you approximately halve the error - this is what you would expect from treating each sub-section of the circle as a straight line section, with the excess of area having a rectangle taken out of it, leaving two triangles of the same area. Anyway, this gives you a way to get extra precision by combining successive estimates.

It's actually quite interesting to look at the difference between this extrapolated estimate and a trapezoidal approach; effectively by this picture of section of the curve:

showing that here the two-rectangles-for-one loses the upper right rectangle of area so extrapolating that forward can be thought of as losing the additional wedges off the top of the two rectangles. For comparison the green trapezoid gives an underestimate of the area under the curve, in this case.

Using your base routines for the "extrapolated area" gives the following :

```<code>rec = 1
est = [circleAreaApprox(1, 1)]  # all estimates on unit circle
for i in range(20):
    rec *= 2
    est.append(circleAreaApprox(1, rec))
    print("rectangles= ",rec, "basic error=",est[-1]-pi,
          "extrapolated error=", 2*est[-1]-est[-2]-pi)
</code>```

which is calculating both $(e_k-\pi)$ and $(2e_k-e_{k-1}-\pi)$, gives

```<code>rectangles=  2 basic error= 0.5904581539790841 extrapolated error= 0.32250896154796127
rectangles=  4 basic error= 0.35411641451264764 extrapolated error= 0.1177746750462112
rectangles=  8 basic error= 0.19822649076738008 extrapolated error= 0.042336567022112526
rectangles=  16 basic error= 0.10666038423794832 extrapolated error= 0.015094277708516568
rectangles=  32 basic error= 0.05600976928733781 extrapolated error= 0.00535915433672729
rectangles=  64 basic error= 0.028954259189892806 extrapolated error= 0.0018987490924478045
rectangles=  128 basic error= 0.014813138806821335 extrapolated error= 0.000672018423749865
rectangles=  256 basic error= 0.007525429367436942 extrapolated error= 0.00023771992805254882
rectangles=  512 basic error= 0.0038047491298613956 extrapolated error= 8.406889228584902e-05
rectangles=  1024 basic error= 0.0019172379492267133 extrapolated error= 2.972676859203105e-05
rectangles=  2048 basic error= 0.0009638743216493495 extrapolated error= 1.0510694071985682e-05
rectangles=  4096 basic error= 0.00048379526796571426 extrapolated error= 3.7162142820790223e-06
rectangles=  8192 basic error= 0.00024255458489719217 extrapolated error= 1.3139018286700832e-06
rectangles=  16384 basic error= 0.00012150956160006388 extrapolated error= 4.6453830293557985e-07
rectangles=  32768 basic error= 6.083690070024517e-05 extrapolated error= 1.642398004264578e-07
rectangles=  65536 basic error= 3.0447484171247652e-05 extrapolated error= 5.806764225013694e-08
rectangles=  131072 basic error= 1.5234007097131297e-05 extrapolated error= 2.053002301494189e-08
rectangles=  262144 basic error= 7.62063280745906e-06 extrapolated error= 7.258517786823404e-09
rectangles=  524288 basic error= 3.8115995590892737e-06 extrapolated error= 2.566310719487319e-09
rectangles=  1048576 basic error= 1.9062534803993003e-06 extrapolated error= 9.074017093269049e-10
</code>```

and by the time you have a lot of rectangles, you are gaining $1000\times$ precision from extrapolation.

Title: Infinite sum of Python for loop

Body:
I'm a geometry student. Recently we were doing all kinds of crazy circle stuff, and it occurred to me that I don't know why $\pi r^2$ is the area of a circle. I mean, how do I really know that's true, aside from just taking my teachers + books at their word?

So I tried to derive the formula myself. My strategy was to fill a circle with little squares. But I couldn't figure out how to generate successively smaller squares in the right spots. So instead I decided to graph just one quadrant of the circle (since all four quadrants are identical, I can get the area of the easy +x, +y quadrant and multiply the result by 4 at the end) and put little rectangles along the curve of the circle. The more rectangles I put, the closer I get to the correct area. If you graph it out, my idea looks like this:

Okay, so to try this in practice I used a Python script (less tedious):

```<code>from math import sqrt, pi

# explain algo of finding top right quadrant area
# thing with graphics via a notebook

# Based on Pythagorean circle function (based on r = x**2 + y**2)
def circle_y(radius, x):
  return sqrt(radius**2 - x**2)

def circleAreaApprox(radius, rectangles):
  area_approx = 0
  little_rectangles_width = 1 / rectangles * radius

  for i in range(rectangles):
    x = radius / rectangles * i
    little_rectangle_height = circle_y(radius, x)
    area_approx += little_rectangle_height * little_rectangles_width

  return area_approx * 4
</code>```

This works. The more rectangles I put, the wrongness of my estimate goes down and down:

```<code>for i in range(3):
    rectangles = 6 * 10 ** i
    delta = circleAreaApprox(1, rectangles) - pi # For a unit circle area: pi * 1 ** 2 == pi
         print(delta)
</code>```

Output

```<code>0.25372370203838557
0.030804314363409357
0.0032533219749364406
</code>```

Even if you test with big numbers, it just gets closer and closer forever. Infinitely small rectangles circleAreaApprox(1, infinity) is presumably the true area. But I can't calculate that, because I'd have to loop forever, and that's too much time. How do I calculate the 'limit' of a for loop?

Ideally, in an intuitive way. I want to reduce the magic and really understand this, not 'solve' this by piling on more magic techniques (like the $\pi \times radius^2$ formula that made me curious in the first place).

Thanks!

Body:
Typically this kind of issue is handled by seeing a stable value emerge, with tolerance under some desired value, from successively finer approximation.

In this case if you double the number of rectangles, you approximately halve the error - this is what you would expect from treating each sub-section of the circle as a straight line section, with the excess of area having a rectangle taken out of it, leaving two triangles of the same area. Anyway, this gives you a way to get extra precision by combining successive estimates.

It's actually quite interesting to look at the difference between this extrapolated estimate and a trapezoidal approach; effectively by this picture of section of the curve:

showing that here the two-rectangles-for-one loses the upper right rectangle of area so extrapolating that forward can be thought of as losing the additional wedges off the top of the two rectangles. For comparison the green trapezoid gives an underestimate of the area under the curve, in this case.

Using your base routines for the "extrapolated area" gives the following :

rec = 1
est = [circleAreaApprox(1, 1)]  # all estimates on unit circle
for i in range(20):
    rec *= 2
    est.append(circleAreaApprox(1, rec))
    print("rectangles= ",rec, "basic error=",est[-1]-pi,
          "extrapolated error=", 2*est[-1]-est[-2]-pi)

which is calculating both $(e_k-\pi)$ and $(2e_k-e_{k-1}-\pi)$, gives

rectangles=  2 basic error= 0.5904581539790841 extrapolated error= 0.32250896154796127
rectangles=  4 basic error= 0.35411641451264764 extrapolated error= 0.1177746750462112
rectangles=  8 basic error= 0.19822649076738008 extrapolated error= 0.042336567022112526
rectangles=  16 basic error= 0.10666038423794832 extrapolated error= 0.015094277708516568
rectangles=  32 basic error= 0.05600976928733781 extrapolated error= 0.00535915433672729
rectangles=  64 basic error= 0.028954259189892806 extrapolated error= 0.0018987490924478045
rectangles=  128 basic error= 0.014813138806821335 extrapolated error= 0.000672018423749865
rectangles=  256 basic error= 0.007525429367436942 extrapolated error= 0.00023771992805254882
rectangles=  512 basic error= 0.0038047491298613956 extrapolated error= 8.406889228584902e-05
rectangles=  1024 basic error= 0.0019172379492267133 extrapolated error= 2.972676859203105e-05
rectangles=  2048 basic error= 0.0009638743216493495 extrapolated error= 1.0510694071985682e-05
rectangles=  4096 basic error= 0.00048379526796571426 extrapolated error= 3.7162142820790223e-06
rectangles=  8192 basic error= 0.00024255458489719217 extrapolated error= 1.3139018286700832e-06
rectangles=  16384 basic error= 0.00012150956160006388 extrapolated error= 4.6453830293557985e-07
rectangles=  32768 basic error= 6.083690070024517e-05 extrapolated error= 1.642398004264578e-07
rectangles=  65536 basic error= 3.0447484171247652e-05 extrapolated error= 5.806764225013694e-08
rectangles=  131072 basic error= 1.5234007097131297e-05 extrapolated error= 2.053002301494189e-08
rectangles=  262144 basic error= 7.62063280745906e-06 extrapolated error= 7.258517786823404e-09
rectangles=  524288 basic error= 3.8115995590892737e-06 extrapolated error= 2.566310719487319e-09
rectangles=  1048576 basic error= 1.9062534803993003e-06 extrapolated error= 9.074017093269049e-10

and by the time you have a lot of rectangles, you are gaining $1000\times$ precision from extrapolation.


答:
Multidimentional optimization task can be presented as the sequence of $\;\text{1D}\;$
tasks.

Really, let we start from the point $\;z=A,\;$ wherein $\text{ grad } f(z)\bigg|_{z=A} = \overrightarrow {g_A}.\;$ Assuming $\;\overrightarrow{\Delta z} = \overrightarrow{g_A}t,\;
$ we get $\;\text{1D}\;$ optimization task for the variable $\;i.$, The final point $B=A+\overrightarrow{g_A}\,t_{opt}\;$ of the current optimization task assumed as the starting point for the next task, with the suitable $\;\text{1D}\;$ vizualization of the each step.

Title: How can I "see" that calculus works for multidimensional problems?

Body:
Let's say I have some function f(x) = x^2 + b. I can see what's going on, I can count the slope geometrically even without knowing the rules of derivatives.

When I need to minimize some cost function for linear problem (linear regression with gradient descent), I just need to picture 3d, and I can "see", and be quite confident why and how it works.

How can I "see" or get intuition that calculus works for multidimensional problems? Let's say I have a problem with many variables like:

f(area_km, bedrooms, ...) = theta + theta1 * area_km + theta2 * bedrooms etc

If I want to apply gradient descent, I know I need to calculate partial derivatives and multiply it with a learning rate etc. It works. But it's kinda magical that it works.

I am sorry this is a silly question, I am just beginning.


问:
Does this addition of matrices work?
Can you do scalar plus a matrice? Such as $2+E$ ($2$ being the scalar and $E$ a matrix) and if you can't why?

答:
In general: No you cannot, because dimension. What is
$$2+\begin{bmatrix} a & b\\ c & d\end{bmatrix}$$
supposed to mean?
$$\begin{bmatrix}a+ 2 & b \\ c & d\end{bmatrix}? \;\; \begin{bmatrix}a+2&b+2\\c+2&d+2\end{bmatrix}? \;\; \begin{bmatrix}a+2&b\\c&d+2\end{bmatrix}?$$

What I want to say is: There is no obvious choice, what scalar + matrix is supposed to mean. If you want to use such notation, you will have to make clear, what kind of choice you made.

Title: Does this addition of matrices work?


问:
Absurd result when attempting to show that the intersection of two subspaces is the zero vector
For two subspaces $U,W = \mathbb{R^2}$ where $U=\operatorname{span}(1,1)$ and $W=\operatorname{span}(2,1)$, I'm trying to show that $U\cap W$ is the zero vector $\{\mathbf{0}\}$. My proof so far:

Let $x\in U\cap W$, then $x\in U$ and $x\in W$. Because $U=\operatorname{span}(1,1)$, then $x=a(1,1)$. Likewise because $W=\operatorname{span}(2,1)$, then $x=b(2,1)$. Therefore $x=a(1,1)=b(2,1)$ for some $a,b \in \mathbb{R}$. So $(a,a)=(2b,b)$ therefore $a=2b$ and $a=b$. But this would imply $1=2$.

Did I do something wrong? Is the absurd result $1=2$ enough to conclude that $U\cap W=\{\mathbf{0}\}$?

答:
"... this would imply 1=2." is incorrect.

The equations
$$
a=2b,\quad a=b
$$
imply that $a=b=0$.


答:
Note that if you want the addition to work like
$$2 + \begin{pmatrix}
a & b\\ c & d
\end{pmatrix} =
\begin{pmatrix}
2+a & 2+b\\ 2+c & 2+d
\end{pmatrix}$$ then what you are really doing is
$$2\begin{pmatrix}
1 & 1\\1 & 1
\end{pmatrix} + \begin{pmatrix}
a & b\\ c & d
\end{pmatrix} =
\begin{pmatrix}
2+a & 2+b\\ 2+c & 2+d
\end{pmatrix}.$$  So no, it's not a good idea to write a scalar plus a matrix because it is ambiguous, but there are simple ways to write what you are trying to accomplish using proper notation.

Title: Does this addition of matrices work?

Body: Can you do scalar plus a matrice? Such as $2+E$ ($2$ being the scalar and $E$ a matrix) and if you can't why?


答:
There is possibly a better way, and I think this was discussed as solved example in tristam needham's book(*). Any who, we begin with geometric series:

$$ \frac{1}{1-x} = \sum_{j=0}^{\infty} x^j$$

Sub: $ x  \to re^{ i \theta}$ and simplfy

$$ \frac{1}{(1- r \cos \theta) - i \sin \theta} = \sum_{j=0}^{\infty} r^j e^{i j\theta} \tag{2}$$

For LHS, by multiplying with complex conjguate

$$ \frac{1}{(1-r \cos \theta) - i r\sin \theta} =  \frac{ (1-r \cos \theta) + i \sin \theta}{ 2 - 2 r \cos \theta+r^2} \tag{1}$$

Equating real part in (1) to real part in (2),

$$ \frac{1 - r \cos \theta}{ 2 - 2r \cos \theta + r^2} = \sum_{j=0}^{\infty} r^j \cos j \theta$$

Done!

Another identity could be made by equating imaginary parts

*: Indeed it was! See page-78, 79 of Visual Complex Analysis to see how this is simply the fourier series corresponding to the geometric series. Simply two ways to view a function: As an infinite trignometric sum or as a infinite polynomial series. Pretty neat.

Title: Prove this formula $\frac{1-r\cos(x)}{1-2r\cos(x)+r^2}= 1+\sum_{n=1}^{+\infty}r^{n}\cos\left(nx\right)$

Body:
I am trying to use prove, by just simple algebraic manipulation, to prove the equality of this formula.
$$\dfrac{1-r\cos(x)}{1-2r\cos(x)+r^2}= 1+\sum_{n=1}^{+\infty}r^{n}\cos\left(nx\right)$$

I have been given hints and instructions from this thread

Write using Euler’s identity $$\cos(x)=\frac{e^{ix}+e^{-ix}}{2}$$

Factor the denominator

Find the partial fractions decomposition, expand the parts as geometric series, and convert from exponential functions back to trigonometric functions (Euler’s identity again).

This is how I have done:

RHS: $$\dfrac{1-r(\dfrac{e^{ix}+e^{-ix}}{2})}{1-2r(\dfrac{e^{ix}+e^{-ix}}{2})+r^{2}}=\dfrac{1-r(\dfrac{e^{ix}-e^{-ix}}{2})}{1-re^{ix}-re^{-ix}+r^2}$$

Then from this thread, I have learnt how to factorize the denominator (See Jack D'Aurizio answer, first answer of the thread, first line). The trick is to write $1=e^0$.

$$\dfrac{1-r(\dfrac{e^{ix}+e^{-ix}}{2})}{(re^{ix})(r-e^{-ix})}$$

The third step is to decompose the fraction:

$$\dfrac{A}{r-e^{ix}}+\dfrac{B}{r-e^{-ix}}=\dfrac{1-r(\dfrac{e^{ix}+e^{-ix}}{2})}{(r-e^{ix})(r-e^{-ix})}$$

$$A(r-e^{-ix})+B(r-e^{ix})=1-r(\dfrac{e^{ix}+e^{-ix}}{2})$$

I am stuck here, I notice that let $x=0$, we will have

$$A(r-1)+B(r-1)=1-r(\dfrac{e^{ix}+e^{-ix}}{2})$$

I am stuck here, I don't know to find $A$ and $B$

Also, could you provide in details how to finish the part "expand the parts as geometric series, and convert from exponential functions back to trigonometric functions (Euler’s identity again)".

My symbolic manipulation skill is not very good, so a detailed answer is great!

Thanks!


问:
How can I solve Lagrange multiplier equation with multi constraints?
This site is really awesome. :)
I hope that we can share our ideas through this site!

I have an equation as below,

$$ min \ \ w^HRw \ \ subject \ \ to \ \ w^HR_aw=J_a, \ w^HR_bw=J_b$$

If there is only one constraint such as $w^HR_aw=J_a$ in above expression, it is easy to convert cost function by using Lagrange multiplier i.e.,

$$
J_0 = w^HRw - \lambda(w^HR_aw-J_a).
$$

Finally, above cost function converts as Eigenvalue problem i.e.,

$$R_a^{-1}Rw = \lambda w$$

If $R_a$ is invertible, there is always a solution.

However, I have more than TWO constraints, it is hard to calculate this by myself.

Can anyone help to solve this Lagrange multiplier problem?

答:
Unfortunately, this problem is not a convex optimization problem (despite the tag :)) due to the presence of nonlinear equality constraints. It is indeed fortunate that you can solve the problem analytically with one quadratic equality constraint. But with two, I am not convinced there is even a tractable numerical method.

There is a heuristic that is sometimes used in the convex optimization community that may be of use to you. Your problem is equivalent to:
$$\begin{array}{ll}
\text{minimize}   & \mathop{\textrm{Tr}}(WR) \\
\text{subject to} & \mathop{\textrm{Tr}}(WR_a) = J_a \\
                  & \mathop{\textrm{Tr}}(WR_b) = J_b \\
                  & W = ww^H
\end{array}$$
This works because $$\mathop{\textrm{Tr}}(WR) =\mathop{\textrm{Tr}}(ww^HR) =\mathop{\textrm{Tr}}(w^HRw) = w^HRw.$$ Now the problem looks convex---except for the last equality constraint. What you do is relax the equality constraint to $W\succeq ww^H$, which means that $W-ww^H$ is positive semidefinite. This in turn can be written as follows:
$$W\succeq ww^H \quad\Longleftrightarrow\quad W-ww^H \succeq 0 \quad\Longleftrightarrow\quad
\begin{bmatrix} W & w \\ w^H & 1 \end{bmatrix} \succeq 0$$
The result is a semidefinite program in $W$ and $w$:
$$\begin{array}{ll}
\text{minimize}   & \mathop{\textrm{Tr}}(WR) \\
\text{subject to} & \mathop{\textrm{Tr}}(WR_a) = J_a \\
                  & \mathop{\textrm{Tr}}(WR_b) = J_b \\
                  & \begin{bmatrix} W & w \\ w^H & 1 \end{bmatrix} ~ \text{p.s.d.}
\end{array}$$
This can be readily solved numerically. In fact, it should be relatively inexpensive to do so, because there are only two equality constraints! If you're a MATLAB jockey you can plug this into my toolbox CVX as follows:

```<code>cvx_begin sdp
    variable W(n,n) hermitian
    variable w(n)
    minimize(trace(W*R))
    subject to
        trace(W*Ra) == Ja;
        trace(W*Rb) == Jb;
        [ W, w ; w', 1 ] >= 0;
cvx_end
</code>```

Again, this is a relaxation of your problem: its optimal value will be less than or equal to the optimal value of the original problem, and the value of $w$ it produces is not guaranteed to even satisfy your original equality constraints. And yet, sometimes, that is exactly what happens: this relaxation actually produces $W=ww^T$. If that happens, $w$ is optimal for your original problem. By all means, try it and see if you get lucky.

On the other hand, if $W\neq ww^H$, what do you do? Here's an idea. Define $\mathop{\textrm{Tr}}(WR)=J_0$ to be the optimal value of the objective. Then try this ``rank reducing'' model:
$$\begin{array}{ll}
\text{minimize}   & \mathop{\textrm{Tr}}(W) \\
\text{subject to} & \mathop{\textrm{Tr}}(WR) \leq (1+\lambda) \cdot J_0 \\
                  & \mathop{\textrm{Tr}}(WR_a) = J_a \\
                  & \mathop{\textrm{Tr}}(WR_b) = J_b \\
                  & \begin{bmatrix} W & w \\ w^H & 1 \end{bmatrix} ~ \text{p.s.d.}
\end{array}$$
where $\lambda\geq 0$. Note that if $\lambda=0$, you get the exact same result as in the original problem. But letting $\lambda$ be small but nonzero allows the value of $\mathop{\textrm{Tr}}(WR)$ to rise a bit, while reducing $\mathop{\textrm{Tr}}(W)$. Minimizing the trace is a common convex heuristic for reducing the rank of a PSD matrix. It doesn't always work either, but it just might. Try a couple of values of $\lambda>0$ and see what happens.

If all else fails, you might be able to use the values of $W$ and $w$ to construct a nearby point that satisfies your equality constraints but is not necessarily optimal.

EDIT: I just thought of a simplification if $R$ is positive definite. Define $v=R^{1/2}w$ and $V=R^{1/2}W^{1/2}$, and solve this alternative model:
$$\begin{array}{ll}
\text{minimize}   & \mathop{\textrm{Tr}}(V) \\
\text{subject to} & \mathop{\textrm{Tr}}(VR^{-1/2}R_aR^{-1/2}) = J_a \\
                  & \mathop{\textrm{Tr}}(VR^{-1/2}R_bR^{-1/2}) = J_b \\
                  & \begin{bmatrix} V & v \\ v^H & 1 \end{bmatrix} ~ \text{p.s.d.}
\end{array}$$
Given the solution $(v,V)$ to this model, you can recover $W=R^{-1/2}VR^{-1/2}$, $w=R^{-1/2}v$. What I like about this alternative is that it combines my two-stage approach above into a single stage. You've got the rank-reducing heuristic $\mathop{\textrm{Tr}}(V)$ right there in the model.

Body:
Unfortunately, this problem is not a convex optimization problem (despite the tag :)) due to the presence of nonlinear equality constraints. It is indeed fortunate that you can solve the problem analytically with one quadratic equality constraint. But with two, I am not convinced there is even a tractable numerical method.

There is a heuristic that is sometimes used in the convex optimization community that may be of use to you. Your problem is equivalent to:
$$\begin{array}{ll}
\text{minimize}   & \mathop{\textrm{Tr}}(WR) \\
\text{subject to} & \mathop{\textrm{Tr}}(WR_a) = J_a \\
                  & \mathop{\textrm{Tr}}(WR_b) = J_b \\
                  & W = ww^H
\end{array}$$
This works because $$\mathop{\textrm{Tr}}(WR) =\mathop{\textrm{Tr}}(ww^HR) =\mathop{\textrm{Tr}}(w^HRw) = w^HRw.$$ Now the problem looks convex---except for the last equality constraint. What you do is relax the equality constraint to $W\succeq ww^H$, which means that $W-ww^H$ is positive semidefinite. This in turn can be written as follows:
$$W\succeq ww^H \quad\Longleftrightarrow\quad W-ww^H \succeq 0 \quad\Longleftrightarrow\quad
\begin{bmatrix} W & w \\ w^H & 1 \end{bmatrix} \succeq 0$$
The result is a semidefinite program in $W$ and $w$:
$$\begin{array}{ll}
\text{minimize}   & \mathop{\textrm{Tr}}(WR) \\
\text{subject to} & \mathop{\textrm{Tr}}(WR_a) = J_a \\
                  & \mathop{\textrm{Tr}}(WR_b) = J_b \\
                  & \begin{bmatrix} W & w \\ w^H & 1 \end{bmatrix} ~ \text{p.s.d.}
\end{array}$$
This can be readily solved numerically. In fact, it should be relatively inexpensive to do so, because there are only two equality constraints! If you're a MATLAB jockey you can plug this into my toolbox CVX as follows:

cvx_begin sdp
    variable W(n,n) hermitian
    variable w(n)
    minimize(trace(W*R))
    subject to
        trace(W*Ra) == Ja;
        trace(W*Rb) == Jb;
        [ W, w ; w', 1 ] >= 0;
cvx_end

Again, this is a relaxation of your problem: its optimal value will be less than or equal to the optimal value of the original problem, and the value of $w$ it produces is not guaranteed to even satisfy your original equality constraints. And yet, sometimes, that is exactly what happens: this relaxation actually produces $W=ww^T$. If that happens, $w$ is optimal for your original problem. By all means, try it and see if you get lucky.

On the other hand, if $W\neq ww^H$, what do you do? Here's an idea. Define $\mathop{\textrm{Tr}}(WR)=J_0$ to be the optimal value of the objective. Then try this ``rank reducing'' model:
$$\begin{array}{ll}
\text{minimize}   & \mathop{\textrm{Tr}}(W) \\
\text{subject to} & \mathop{\textrm{Tr}}(WR) \leq (1+\lambda) \cdot J_0 \\
                  & \mathop{\textrm{Tr}}(WR_a) = J_a \\
                  & \mathop{\textrm{Tr}}(WR_b) = J_b \\
                  & \begin{bmatrix} W & w \\ w^H & 1 \end{bmatrix} ~ \text{p.s.d.}
\end{array}$$
where $\lambda\geq 0$. Note that if $\lambda=0$, you get the exact same result as in the original problem. But letting $\lambda$ be small but nonzero allows the value of $\mathop{\textrm{Tr}}(WR)$ to rise a bit, while reducing $\mathop{\textrm{Tr}}(W)$. Minimizing the trace is a common convex heuristic for reducing the rank of a PSD matrix. It doesn't always work either, but it just might. Try a couple of values of $\lambda>0$ and see what happens.

If all else fails, you might be able to use the values of $W$ and $w$ to construct a nearby point that satisfies your equality constraints but is not necessarily optimal.

EDIT: I just thought of a simplification if $R$ is positive definite. Define $v=R^{1/2}w$ and $V=R^{1/2}W^{1/2}$, and solve this alternative model:
$$\begin{array}{ll}
\text{minimize}   & \mathop{\textrm{Tr}}(V) \\
\text{subject to} & \mathop{\textrm{Tr}}(VR^{-1/2}R_aR^{-1/2}) = J_a \\
                  & \mathop{\textrm{Tr}}(VR^{-1/2}R_bR^{-1/2}) = J_b \\
                  & \begin{bmatrix} V & v \\ v^H & 1 \end{bmatrix} ~ \text{p.s.d.}
\end{array}$$
Given the solution $(v,V)$ to this model, you can recover $W=R^{-1/2}VR^{-1/2}$, $w=R^{-1/2}v$. What I like about this alternative is that it combines my two-stage approach above into a single stage. You've got the rank-reducing heuristic $\mathop{\textrm{Tr}}(V)$ right there in the model.


问:
Let $A \in \mathbb{C}^{3 \times 3}$ with $A^2(A^2 - 4 I) = 0$. What are possible minimal polynomials of $A^3$?
Let $A \in \mathbb{C}^{3 \times 3}$ with $A^2(A^2 - 4 I) = 0$. What are possible minimal polynomials of $A^3$? Give examples of $A$ with their corresponding $A^3$ matrices.

At the moment I know that $f = A^2(A-2)(A+2)= 0$.
Other then that I don't really know how to get the possible minimal polynomials of $A^3$. I was thinking of maybe using the property $a^3-b^3 = (a-b)(a^2 + ab + b^2)$, and thus multiplying the polynomial $f$ by $g = A(A^2 + 2A + 4)(A^2 - 2A + 4)$, so that I get $f\cdot g = A^3(A^3-8)(A^3+8)=0$ (since $f=0$).

Then I can continue looking for $A^3$ with possible eigenvalues 0, 8, -8. But I don't know if this is correct, nor do I know how I would find minimal polynomials for the matrix.

Does anybody know how I can properly find the minimal polynomials and is the method of multiplying it by $g$ a good idea?

答:
HINT

You can greatly reduce your work by noting a couple of simple results.

Since $A^4=4A^2$ you know that $A^{12}=64A^6$. If $B=A^3$, then $B^4=64B^2$ and so $B$s minimal polynomial divides $x^4-64x^2$.

Also, since the matrices are $3\times 3$, the minimal polynomial is at most a cubic.

For each possibility check if you can find a suitable $A$ and $B$.

Addendum

In view of the comments below it might be helpful for me to add some general points about minimal polynomials.

The minimal polynomial $m(x)$ will divide any polynomial satisfied by the matrix. If you can find several polynomials the matrix has to satisfy then that will greatly reduce the possibilities.

Every root of the minimal polynomial is an eigenvalue. Again this could reduce the possibilities.

Every matrix satisfies the characteristic polynomial, $|A-xI|=0$. So $m(x)$ must divide this polynomial. (It might be considerably simpler than the characteristic polynomial.)


答:
I am speaking of the angle summation formulas:
$$
\eqalign{
  & \cos \left( {a \pm b} \right) = \cos a\cos b \mp \sin a\sin b  \cr
  & \sin \left( {a \pm b} \right) = \sin a\cos b \pm \cos a\sin b \cr}
$$
Then e.g. summing the equations for $\cos$
$$\cos(a+b)+ \cos(a-b)=2\cos a \cos b$$
After which you can apply
$$
\left\{ \matrix{
  \alpha  = {{a + b} \over 2} \hfill \cr
  \beta  = {{a - b} \over 2} \hfill \cr}  \right. \Leftrightarrow \left\{ \matrix{
  a = \alpha  + \beta  \hfill \cr
  b = \alpha  - \beta  \hfill \cr}  \right.
$$

Title: The formulas of prostapheresis: memorization technique

Body:
This question is related purely for my students of an high school and indirectly for me. The formulas below are the formulas of prostapheresis,

\begin{cases}
\sin\alpha+\sin\beta=2\,\sin \dfrac {\alpha+\beta}{2}\, \cos \dfrac {\alpha-\beta}{2} \\
\sin\alpha-\sin\beta=2\sin \dfrac {\alpha-\beta}{2} \,\cos \dfrac {\alpha+\beta}{2}\\
\cos\alpha+\cos\beta=2\cos \dfrac {\alpha+\beta}{2}\,\cos \dfrac {\alpha-\beta}{2}\\
\cos\alpha-\cos\beta=-2 \,\sin \dfrac {\alpha+\beta}{2} \,\sin \dfrac {\alpha-\beta}{2}
\end{cases}

and while I am able to find them, I am not able to find a technique to memorize them.

Is there a technique to be able to memorize them?


问:
In the MacLaurin series of $\ln(1+x)$, why must $x$ lie in $(-1,1]$?
On computing the derivatives and substituting $x=0$, I do not see why there is any problem with $x>1$.

Of course I understand that $x>-1$, since the domain of the logarithm is the set of positive real numbers.

So why doesn't the expansion work, for example, when $x=5$?

答:
A valid Taylor expansion also needs the reminder to converge to zero.
Pls check the precise definition of Taylor Therom:

Taylor's theorem： Let k ≥ 1 be an integer and let the function f : R → R be k times differentiable at the point a ∈ R. Then there exists a function hk : R → R such that

${\displaystyle f(x)=f(a)+f'(a)(x-a)+{\frac {f''(a)}{2!}}(x-a)^{2}+\cdots +{\frac {f^{(k)}(a)}{k!}}(x-a)^{k}+h_{k}(x)(x-a)^{k},}\\
{\displaystyle {\mbox{and}}\quad \lim _{x\to a}h_{k}(x)=0}$

https://en.wikipedia.org/wiki/Taylor%27s_theorem#:~:text=In%20calculus%2C%20Taylor's%20theorem%20gives,Taylor%20series%20of%20the%20function.


问:
Infinite sum of Python for loop
I'm a geometry student. Recently we were doing all kinds of crazy circle stuff, and it occurred to me that I don't know why $\pi r^2$ is the area of a circle. I mean, how do I really know that's true, aside from just taking my teachers + books at their word?

So I tried to derive the formula myself. My strategy was to fill a circle with little squares. But I couldn't figure out how to generate successively smaller squares in the right spots. So instead I decided to graph just one quadrant of the circle (since all four quadrants are identical, I can get the area of the easy +x, +y quadrant and multiply the result by 4 at the end) and put little rectangles along the curve of the circle. The more rectangles I put, the closer I get to the correct area. If you graph it out, my idea looks like this:

Okay, so to try this in practice I used a Python script (less tedious):

```<code>from math import sqrt, pi

# explain algo of finding top right quadrant area
# thing with graphics via a notebook

# Based on Pythagorean circle function (based on r = x**2 + y**2)
def circle_y(radius, x):
  return sqrt(radius**2 - x**2)

def circleAreaApprox(radius, rectangles):
  area_approx = 0
  little_rectangles_width = 1 / rectangles * radius

  for i in range(rectangles):
    x = radius / rectangles * i
    little_rectangle_height = circle_y(radius, x)
    area_approx += little_rectangle_height * little_rectangles_width

  return area_approx * 4
</code>```

This works. The more rectangles I put, the wrongness of my estimate goes down and down:

```<code>for i in range(3):
    rectangles = 6 * 10 ** i
    delta = circleAreaApprox(1, rectangles) - pi # For a unit circle area: pi * 1 ** 2 == pi
         print(delta)
</code>```

Output

```<code>0.25372370203838557
0.030804314363409357
0.0032533219749364406
</code>```

Even if you test with big numbers, it just gets closer and closer forever. Infinitely small rectangles circleAreaApprox(1, infinity) is presumably the true area. But I can't calculate that, because I'd have to loop forever, and that's too much time. How do I calculate the 'limit' of a for loop?

Ideally, in an intuitive way. I want to reduce the magic and really understand this, not 'solve' this by piling on more magic techniques (like the $\pi \times radius^2$ formula that made me curious in the first place).

Thanks!

答:
This is an excellent question. You are following in Archimedes' footsteps and starting to invent integral calculus and the idea of a limit.

I will try to address (briefly!) the mathematical and philosophical issues here, not the programming question.

You are right to worry about a process that has to go on forever. The way mathematicians deal with that question is to replace the infinitely many operations it would take to "reach  a limit" by infinitely many inequalities any one of which can be justified in a predictable finite number of steps. If in your picture you calculate the total area of the inscribed slices just as you have calculated the area of the circumscribed ones you can show (with logic, not a program) that the difference between those two areas is as small as you please as long as you are willing to use thin enough rectangles. Then you can argue (though it's not easy) that there is just one number less than all the overestimates and greater than all the underestimates. For a circle of radius $1$ we call that number $\pi$.

The next job is to over and underestimate the circumference of the unit circle with the same kind of argument, using circumscribed and inscribed polygons. There too you can show that they tell you a number for the circumference.

The final step is to show that number is exactly twice the $\pi$ that you found for the area.

For a circle of radius $r$ the circumference will be $r$ times as large, so $2\pi r$, and the area will be $r^2$ times as large, so $\pi r^2$. (Carefully proving those proportionalities for curved shapes like circles requires estimations and limits.)

Title: Infinite sum of Python for loop


问:
Can someone help me understand the steps for getting the surface area of one face of a Reuleaux tetrahedron (spherical tetrahedron)?
To be specific I am talking about the steps used in this article:
http://www.math.unl.edu/~bharbourne1/ST/sphericaltetrahedron.html

Many people don't know what a Reuleaux tetrahedron is, so here's a brief definition of the shape: the intersection of four balls of radius s centered at the vertices of a regular tetrahedron with side length s. The spherical surface of the ball centered on each vertex passes through the other three vertices, which also form vertices of the Reuleaux tetrahedron. Thus the center of each ball is on the surfaces of the other three balls.

I understand, so far, that the entire spherical cap which one face of the spherical tetrahedron rests on, can be calculated using $2\pi*r^2(1-\arccos(\theta))$, and $\theta$ equals 60 degrees so the area of the spherical cap is $\pi*r^2$. Then it goes on to calculate what fraction of that area contains the face, which is the dihedral angle of a tetrahedron divided by $2\pi$ multiplied by the total spherical cap area to get a fractional area. After this comes the issue. The article says it uses the spherical excess formula to calculate T (labelled in the diagram in the article, also attached as an image below) which is a formula saying that a curved triangle constructed from three points of a sphere has a surface area equal to the sum of its interior angles subtracted by $\pi$. However, the article not only sums the interior angles and subtracts $\pi$ from it, but it also multiplies it by $r^2$. Why does the author do that?

(Would also like to mention that multiplying by $r^2$ is not a mistake either. I double checked the final formula with the equation at Wolfram-Alpha https://mathworld.wolfram.com/ReuleauxTetrahedron.html by substituting in $r=1$, and both equations gave the exact same result.)

Labelled Sphere Diagram

答:
Hint:

That's the same as looking for the solid angle of a tetrahedron


问:
Limit of $\lim_{n \to \infty} \ln\bigg(e^{-x\sqrt{n}}\Big(1 - \frac{x}{\sqrt{n}}\Big)^{-n}\bigg)$
I am having problems calculating this limit.

$$
\lim_{n \to \infty} \ln\bigg(e^{-x\sqrt{n}}\Big(1 - \frac{x}{\sqrt{n}}\Big)^{-n}\bigg)
$$
What I tried was to substitute
$$
-\frac{x}{\sqrt{n}} =: \frac{1}{m}  \\
\implies m = - \frac{\sqrt{n}}{x}
$$
So what I got is
$$
\lim_{m \to -\infty} \ln \biggl(e^{xm}\biggl(\Big(1 + \frac{1}{m}\Bigr)^{m}\Big)^{-m}\biggr)
$$
Then I continued but what I see, everything was flawed. I see the right part of the product should become $e$ to the power of something...
The result should be $\frac{x^2}{2}$, yet I can not find the way to it.

答:
Use Taylor's formula at order $2$ for the log:
\begin{align}
\ln\biggl(e^{-x\sqrt{n}}\Bigl(1 - \frac{x}{\sqrt{n}}\Bigr)^{-n}\biggr)&=- x\sqrt n-n\ln\Bigl(1 - \frac{x}{\sqrt{n}}\Bigr) \\
&=-\frac x{\sqrt n}-n\biggl(- \frac{x}{\sqrt{n}}-\frac{x^2}{2n}+o\Bigl(\frac{1}{n}\Bigr)\biggr)\\
&=\frac{x^2}2+o(1).
\end{align}


问:
Is a category one which contains only two objects and **one** morphism between them?
Maybe it is a trivial question, but I'm having a hard time in truly understanding this answer, so I believe I need to clarify to myself some probably obvious things first.

Given this description

it contains two objects

$a$

$b$

it contains 3 morphisms

$id_a: a \to a$

$id_b: b \to b$

$f: a \to b$

Can it represent a category?

I can see the following

it has objects

it has morphisms

it has identity morphisms for each object

composition of morphims are morphisms

So I'd say it is.

答:
Note that composition is part of the data of a category. So in this case we are given a graph consisting of two vertices $A,B$ and three conveniently labeled directed edges $1_A: A \rightarrow A$, $f:A\rightarrow B$, $1_B:B\rightarrow B$. We define composition to be that
$$\begin{align*}
1_A \circ 1_A &= 1_A\\
f \circ 1_A &= f\\
1_B \circ f &= f\\
1_B \circ 1_B &= 1_B
\end{align*}$$
From here on it is straightforward to check that this data indeed satisfies all the axioms of a category (associativity and identity).

This category is important, because it is the free category with an arrow in the following sense. Given any category $\mathcal{C}$ an arrow $\widetilde{f}: \widetilde{A} \rightarrow \widetilde{B}$ in $\mathcal{C}$ induces a unique functor
$$\begin{array}{rcl}
\{A \xrightarrow{f} B\} & \longrightarrow & \mathcal C\\
A & \longmapsto & \widetilde A\\
B & \longmapsto & \widetilde B\\
f & \longmapsto & \widetilde f
\end{array}$$
Conversely any functor $\{A \xrightarrow{f} B\} \longrightarrow \mathcal{C}$ defines a unique morphism $\widetilde f: \widetilde A \rightarrow \widetilde B$ in $\mathcal{C}$ as the image of $f$. These assignments are mutually inverse, so we can deduce that there is a canonical bijection
$$\operatorname{Fun}(\{A\xrightarrow{f}B\},\mathcal{C}) \cong \operatorname{Mor}(\mathcal{C})$$
This makes $\operatorname{Mor}: \mathsf{Cat} \rightarrow \mathsf{Set}$ a representable functor, a concept, which you will either already know or learn soon and which is of utter most importance for category theory.


问:
If the roots of the equation $p(q-r)x^2+q(r-p)x+r(p-q)=0$ are equal, show that $\dfrac {1}{p}+\dfrac {1}{r}=\dfrac {2}{q}$.

If the roots of the equation $p(q-r)x^2+q(r-p)x+r(p-q)=0$ are equal, show that $$\dfrac {1}{p}+\dfrac {1}{r}=\dfrac {2}{q}$$

My Attempt:
$$p(q-r)x^2+q(r-p)x+r(p-q)=0$$
Comapring with $ax^2+bx+c=0$, we get:
$$a=p(q-r)$$
$$b=q(r-p)$$
$$c=r(p-q)$$.
Since the roots are equal:
$$b^2-4ac=0$$
$$(q(r-p))^2-4p(q-r)r(p-q)=0$$
Multipying and simplfying a bit;
$$q^2r^2-2pq^2r+p^2q^2-4p^2qr+4pq^2r+4p^2r^2-4pr^2q=0$$.

答:
Let A=p(q-r), B=q(r-p) & C=r(p-q). A+B+C=0 => B=-(A+C). Since roots are equal, B²-4AC=0 => (A+C)²-4AC=0 => (A-C)²=0 => A=C
=> p(q-r)=r(p-q)
=> (q-r)/qr=(p-q)/pq [Dividing throughout by pqr]
=> 1/r-1/q=1/p-1/q
=> 2/q=1/p+1/r
Hence QED</p>


答:
Define the vector-valued function
$$\eqalign{
f &= (y^Tx)(Ax) \\
}$$
and calculate its differential and gradient
$$\eqalign{
df &= (Ax)(y^Tdx) + (y^Tx)(A\,dx) \\
   &= \Big(Axy^T + (y^Tx)A\Big)\,dx \\
   &= A\Big(xy^T + (y^Tx)I\Big)\,dx \\
\frac{\partial f}{\partial x} &= A\Big(xy^T + (y^Tx)I\Big) \\
}$$
which is another way to derive JG's result while avoiding index notation.

Your error was to assume that the product rule is valid for the gradient of a vector-valued function like $f$, but it isn't.

The problem is that a gradient operation changes the tensorial character of any term to which it is applied (i.e. it turns vectors into matrices), and matrix multiplication is inherently non-commutative. Index notation was developed to handle precisely such calculations, but with standard matrix notation you must proceed very cautiously.

Title: Matrix Derivative Product Rule $\frac{d}{dx} \langle x,y\rangle Ax $

Body:
Let $A\in\mathbb{R^{n\times n}}$,$x,y\in\mathbb{R^{n}}$. What is the derivative of the following expression?

$$
\frac{d}{dx} \langle x,y\rangle Ax
$$

What I tried:

Applying the product rule doesn't work because the first term (see next equation) is inconsistent dimensionally, or I am applying it in the wrong way. Let $f(x) = \langle x,y \rangle, g(x) = Ax$, then

$$ \frac{d}{dx} f(x)g(x) = \frac{df(x)}{dx} g(x) +  f(x)\frac{dg(x)}{dx} = xAx + \langle x,y \rangle A$$.

Here the first term in the last equation doesn't make sense dimensionally, any help or suggestion would be appreciated.


问:
Discrete-time Markov chain properties
A Markov chain in discrete time is irreducible, has state space $\{0,1,\dots\}$
and starts at $1$. It is both a branching process and a martingale.
Determine the probability of hitting $0$.</p>

答:
Under the assumption that this is a birth-and-death reversible MC (rate of inflow=rate of outflow for each state), and the transition probabilities are $p,q,r$ (to go up one state/down one state, remain in the same state) with $p+q+r=1$ and boundary value $h_{0,0}=1$ we can get the following equation:
$$
h_{1,0}=qh_{0,0,}+rh_{1,0}+ph_{2,0}\\
p h_{1,0}=qh_{2,0}
$$
The second equation come from the reversibility property (detailed balance equation). Solving these, we get:
$$
h_{1,0}=\frac{q^2}{p^2-q^2+pq}
$$</p>

Title: Discrete-time Markov chain properties


问:
Is Time scheduling problem np hard or np complete?
I have a set of courses and each courses have a set of classes. Each classes have a set of timings available with some penalty. I wanted to schedule each classes to any of the timings of its with a minimum value of penalty and minimum violation pf soft constraints (because each soft constraints violation gives some penalty).
I am not sure whether this problem is np hard or np complete.

Thanks in advance

答: NP-complete problems are decision problems by definition.  NP-hard problems include decision problems but also encompass search and optimization problems like yours.</p>


问:
How to define a map $V^* \to V$ arising from a non-degenerate Hermitian form on $V$?
I am studying Representation of finite groups from the book by Fulton and Harris. There I found the following statement in the form of lemma $3.35$ page no $:$ $40$ which I failed to understand properly.

Let $V$ be an irreducible representation of $G.$ Let $G$ be a finite group and $B$ be a non-degenerate symmetric bilinear form preserved by $G.$ Let $H$ be any non-degenerate $G$-invariant Hermitian form. Then $$V \xrightarrow {B} V^* \xrightarrow {H} V$$ gives a conjugate linear isomorphism $\varphi$ on $V$ such that given $x \in V$ there exists a unique $\varphi (x) \in V$ with $B(x,y) = H(\varphi (x),y).$ Furthermore $\varphi$ commutes with the action of $G$ so that $\varphi^2 = \varphi \circ \varphi$ is a complex linear $G$-module homomorphism.

Question $:$ How does the map $H$ on $V^*$ defined? How do I get hold of $\varphi\ $?

No proper argument has been given in that worthless book. I don't know how such a book gets so famous. Most of non-trivial results are discussed without proofs as if they are so trivial. BTW, Can anybody please help me understanding the lemma?

Thanks for your time.

答:
Note that $H : V\times V \to \mathbb{C}$ has the following properties:

$H$ is sesquilinear (complex antilinear in the first argument and complex linear in the second)

$H$ is hermitian, i.e. $\overline{H(x, y)} = H(y, x)$, and

$H$ is non-degenerate, i.e. if $H(x, y) = 0$ for all $y \in V$, then $x = 0$.

There is an induced complex antilinear map $V \to V^*$ given by $x \mapsto H(x, \,\cdot\,)$ which is injective since $H$ is non-degenerate, and is therefore a complex antilinear isomorphism (because $V$ is finite-dimensional). So there is an inverse complex antilinear map $V^* \to V$ - this is the map $H$ they are referring to. It sends a linear functional $L$ to the unique vector $x \in V$ such that $L = H(x, \,\cdot\,)$; more precisely, $x$ is the unique vector for which $L(y) = H(x, y)$ for all $y \in V$.

The non-degenerate bilinear form $B$ gives rise to a complex linear isomorphism $B : V \to V^*$ in a similar way: it is given by $x \mapsto B(x,\,\cdot\,)$. The composition $\varphi := H\circ B : V \to V$ is therefore a complex antilinear isomorphism which sends $x$ to the unique vector $\varphi(x) \in V$ for which $B(x, \,\cdot\,) = H(\varphi(x), \,\cdot\,)$; more precisely, $\varphi(x)$ is the unique vector for which $B(x, y) = H(\varphi(x), y)$ for all $y \in V$.


问:
Unifying the connections between the trigonometric and hyperbolic functions
There are many, many connections between the trigonometric and hyperbolic functions, some of which are listed here. It is probably too optimistic to expect that a single insight could explain all of these connections, but is there a holistic way of seeing the parallels between $\sin$ and $\sinh$, $\cos$ and $\cosh$? Can all of these seemingly disparate connections be shown to be essentially the same, or at least very similar?

Geometric connections

Sine and cosine parameterise the unit circle $x^2+y^2=1$, just as hyperbolic sine and cosine parameterise the 'unit hyperbola' $x^2-y^2=1$. Both circles and hyperbolas are conic sections.

The sector of the circle connecting the points $(0,0)$, $(1,0)$, and $(\cos t,\sin t)$ has an area of $t/2$. The region of the hyperbola connecting the points $(0,0)$, $(1,0)$, and $(\cosh t,\sinh t)$ has an area of $t/2$. This can even be used to define the hyperbolic functions geometrically, and many authors do the same with the trigonometric functions.

Sine and hyperbolic sine are odd, whereas cosine and hyperbolic cosine are even. But sine and cosine are periodic functions, unlike the hyperbolic counterparts.

The analogue of the identity $\cos^2x+\sin^2x \equiv 1$ is $\cosh^2x-\sinh^2x \equiv 1$. The compound angle formulae are almost identical to their hyperbolic counterparts, save for a pesky minus sign:
\begin{align}
\sin(x+y) &= \sin(x)\cos(y)+\cos(x)\sin(y) \\
\sinh(x+y) &= \sinh(x)\cosh(y) + \cosh(x)\sinh(y) \\[4pt]
\cos(x+y) &= \cos(x)\cos(y) \color{red}{-} \sin(x)\sin(y) \\
\cosh(x+y) &= \cosh(x)\cosh(y) \color{blue}{+} \sinh(x)\sinh(y) \, .
\end{align}

In general, given a trigonometric function, it is possible to write down the corresponding hyperbolic identity using Osborn's rule: replace every occurrence of $\cos$ with $\cosh$; replace every occurrence of $\sin$ by $\sinh$; but negate the product of two $\sinh$ terms.

Analytic connections

$\sin$ is the unique solution to the initial value problem
\begin{align}
f''(x) &= \color{red}{-}f(x) \\
f'(0) &= 1 \\
f(0) &= 0 \, ,
\end{align}
and the corresponding initial value problem for $\sinh$ is the same, except $f''(x) = \color{blue}{+}f(x)$.

Likewise, the initial value problem for $\cos$ is
\begin{align}
f''(x) &= \color{red}{-}f(x) \\
f'(0) &= 0 \\
f(0) &= 1 \, ,
\end{align}
and again we see a mysterious sign change for $\cosh$: $f''(x) = \color{blue}{+}f(x)$.

It follows that the higher-order derivatives of $\sin$ and $\sinh$ form periodic sequences.

If we solve the initial value problems shown above, we obtain the exponential forms of all $4$ functions:
\begin{align}
\sin x &= \frac{e^{\color{green}{i}x}-e^{-\color{green}{i}x}}{2\color{green}{i}} \quad{} \cos x = \frac{e^{\color{\green}{i}x}+ e^{-\color{green}{i}x}}{2} \\[3pt]
\sinh x &= \frac{e^{x}-e^{-x}}{2} \quad{} \cosh x = \frac{e^x + e^{-x}}{2} \, .
\end{align}

All $4$ functions are analytic, and their Taylor series bear a striking resemblance to each other:
\begin{align}
\sin x &= x \color{red}{-} \frac{x^3}{3!} + \frac{x^5}{5!} \color{red}{-} \frac{x^7}{7!} + \ldots \\[4pt]
\sinh x &= x \color{blue}{+} \frac{x^3}{3!} + \frac{x^5}{5!} \color{blue}{+} \frac{x^7}{7!} + \ldots \\[4pt]
\cos x &= 1 \color{red}{-} \frac{x^2}{2!} + \frac{x^4}{4!} \color{red}{-} \frac{x^6}{6!} + \ldots \\[4pt]
\cosh x &= 1 \color{blue}{+} \frac{x^2}{2!} + \frac{x^4}{4!} \color{blue}{+} \frac{x^6}{6!} + \ldots
\end{align}

And Euler's formula
$$
e^{ix} = \cos x + i \sin x
$$
is replaced by the underwhelming
$$
e^x = \cosh x + \sinh x \, .
$$

答:
Closed relation of the trigonometrical and hyperbolic functions can be demonstrated on the example of the Chebyshev Polyhomials of the First Kind
$$T_n(x) =
\begin{cases}
\cos(n\arccos x),\;\text{if}\;|x|\le 1\\
\cosh(n\text{ arccosh } x),\;\text{otherwize}.
\end{cases}
$$
This example shows that hyperbolic functions can be suitable addition to the trigonometrical ones in the real analysis.


问:
Let $ε$ be the identity of $G$. Prove for $g\in G$ s.t. $g^5=ε$, either $g=ε$, or $ε, g, g^2, g^3, g^4$ are distinct.

Let $\varepsilon$ be the identity of a group $G$. Prove that if $g\in G$ and $g^5=\varepsilon$, then either $g=\varepsilon$ or $\varepsilon, g, g^2, g^3, g^4$ are distinct.

I don't necessarily want an entire proof, I just don't know how to get started with this proof and the direction I should take to complete the proof.

答:
Suppose $\epsilon, g, g^2, g^3, g^4$ are not unique and prove that this implies $g=\epsilon$.

Let's look at an example of how this argument would go, say $g^2=g^4$. Denote this common element by $x$. Then, $$\epsilon=xx^{-1}=(g^4)(g^2)^{-1}=g^2.$$
Now you know that $g^2=g^4=\epsilon$, so $\epsilon=g^5=g^4g=\epsilon g=g$.

Adapt this argument to the case where $g^k=g^\ell$ for $0\leq k<\ell\leq 4$.


问:
How to prove that if T is a formally complete set of sentences, then T ⊢ (R→S)if and only if either T ̸⊢ R or T ⊢ S(or both)?
The question goes as follows:

Prove that if T is a formally complete set of sentences, then
T ⊢ (R→S)if and only if either T ̸⊢ R or T ⊢ S(or both).

does T ̸⊢ R or T ⊢ S need to be assumed in order to construct the proof?

答:
does T ̸⊢ R or T ⊢ S need to be assumed in order to construct the proof?

Yes.   You are asked to prove an equivalence (if-and-only-if), so you need a biconditional proof (ie a two directional implication).   So...

Show that all interpretations where $\mathrm T\vdash R\to S$, will entail at least one of $\mathrm T\nvdash R$ or $\mathrm T\vdash S$.

Show that interpretations where either of $\mathrm T\nvdash R$ or $\mathrm T\vdash S$, will entail $\mathrm T\vdash R\to S$.   (IE: Use a proof by cases approach.)


答:
What you want is a map $k\times M_n(k) \to M_n(k)$. Scalar multiplication is such a map, for example. This wouldn't be considered an operation, but an action. Anyway, not to go into too much details, there is obviously many ways to do it, but you would probably want some axioms to hold as well.

One natural way to do it is pick any matrix $E\in M_n(k)$ and define $$\alpha + A := \alpha E + A$$ where the right hand side operations are the standard ones. Notice that $$(\alpha + \beta) + A = (\alpha + \beta)E + A = \alpha E + (\beta E + A) = \alpha + (\beta + A),\\ 0 + A = 0\cdot E + A = A,$$ so this defines an action of the additive group $(k,+)$.

Title: Does this addition of matrices work?


答:
What you wrote is fine.
For prime $n$ this is equivalent, and perhaps easier to read.

$$
a_n = \{(k, n-k) \, | \, 1 \le k < n\}
$$

If you want it for arbitrary $n$,
$$
a_n = \{(k, n-k) \, | \, 1 \le k < n\text{ and } \gcd(k, n-k) = 1\} .
$$

Title: How to express this sequence $a_n$ in math notation?

Body:
How do I express this sequence $a_n$ in math notation where each pair $(x,y)$ is coprime?

Examples

$a_2=\{(1,1)\}$

$a_3=\{(1, 2), (2, 1)\}$

$a_5=\{(1, 4), (2, 3), (3, 2), (4, 1)\}$

$a_7=\{(1, 6), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)\}$

...

I tried this...

$a_{n}=\{(x,y)\in\mathbb N_{\gt 0}^2, \gcd(x,y)=1 : x+y=n\}$

Thanks.


问:
proving the non-axiomatizable of a class of L-structures
I'm studying the model theory notes of https://faculty.math.illinois.edu/~anush/Courses/2016F.Math571.MT/Henson--van%20den%20Dries.pdf for model theory. I'm finding it difficult with the 6.11 exercise:

Let $L$ be the first order language with two binary function symbols ∩ and ∪, a unary function symbol c, and two constant symbols 0 and 1. For each set S let P(S) denote the $L$-structure based on the power set of S. That is, the underlying set of P(S) is the collection of all subsets of S, we interpret ∩,∪,c as intersection, union, and complement, respectively, and we interpret 0,1 as ∅,S, respectively. Let K be the class of all $L$- structures that are isomorphic to P(S) for some set S. Show that K is not axiomatizable.

I think the solution involves arguing that K is axiomatizable and then finding a contradiction. If anyone can give a comprehensive answer I would appreciate it.

答:
Suppose for a contradiction that the class $K$ is axiomatisable by some first-order theory $T$. Consider the structure $P(\mathbb{N})$, which is in $K$. This structure is infinite (it has cardinality $2^{\aleph_0}$). By the downward Löwenheim-Skolem theorem there is then a countable elementary substructure $A \preceq P(\mathbb{N})$. Being an elementary substructure means in particular that $A$ satisfies the same sentences as $P(\mathbb{N})$. So because $P(\mathbb{N}) \models T$ we also have $A \models T$. That would mean that $A$ is in the class $K$. By definition of $K$ we then have that $A$ is of the form $P(S)$ for some infinite set $S$. Because $|S| \geq \aleph_0$ we have:
$$
|A| = |P(S)| = 2^{|S|}  \geq 2^{\aleph_0}.
$$
But this contradicts that $A$ is countable. So we find our contradiction and conclude that the class $K$ cannot be first-order axiomatisable.


问:
Which positive whole number below 100 has the most number of factors?
Is there a mathematical function that can be done without a computer that accurately outputs the number of factors a number has, then solve this problem?

Or is there a direct way to do so?

答:
This question adresses the question about a mathematical function which outputs the number of factors. The numbers under 100 with most factors are $60=2^2\cdot3\cdot5$, $84=2^2\cdot3\cdot7$, $96=2^5\cdot3$ and $72=2^3\cdot3^2$, which all have 12 factors.

The numbers which have more factors than any smaller number are called highly composite numbers, more info here


问:
Prove that $n-$cube is $n-$connected
The $n-$cube, $Q_n$ , is defined by: $Q_1 = K_2$ and $Q_n = Q_{n+1} \times K_2$ for $n \geq 2$.

I have to prove that for $n \in \mathbf{N} \setminus\{0\}$, $Q_n$ is $n-$connected. I'm
trying to solve it by induction but I don't know how to proceed with the inductive step:

$\textbf{Base Case:}$ For $n = 1$, since $Q_1 = K_2$, $Q_1$ has two vertices, let $v \in V(Q_1)$, we can substract the adyacent vertex of $v$ and we get a trivial graph, then $\kappa(Q_1) = 1$ and $Q_1$ is $1-$connected.

$\textbf{Inductive Hipotesis:}$ For $n > 1$, every vertex $u \in V(Q_n)$ has $n$ neighbors, then $Q_n - N(u)$ is not connected and also, $|N(u)| = \kappa(Q_n)$. Thus $\kappa(Q_1) = n$ and $Q_n$ is $n-$connected.

Any ideas?

答:
We have $\kappa(Q_n) \le \delta(Q_n) = n$; the hard part is proving that $\kappa(Q_n) \ge n$. To do this, we can show that for any two vertices $u,v$ of $Q_n$, there are $n$ vertex-disjoint $u-v$ paths, assuming from the inductive hypothesis that there are $n-1$ such paths in $Q_{n-1}$.

There are two cases for $u$ and $v$:

If there is a copy of $Q_{n-1}$ containing both of them, then we can find $n-1$ paths inside that copy. For the last path, let $u'$ and $v'$ be the neighbors of $u$ and $v$ respectively in the other copy of $Q_{n-1}$. Go from $u$ to $u'$, take some path from $u'$ to $v'$ in the other copy of $Q_{n-1}$ (there's at least $n-1$ to choose from), and then go from $v'$ to $v$.

If there is no such copy, then $u$ and $v$ are opposite vertices of $Q_n$, and this case is symmetric to having $u = (0,0,0,\dots,0)$ and $v = (1,1,1,\dots,1)$. Here, I'm treating the vertices of $Q_n$ as $\{0,1\}^n$. We can explicitly give $n$ vertex-disjoint $u-v$ paths. Let the first path be $(v_0, v_1, \dots, v_n)$ where $v_i = (\underbrace{1,1,\dots,1}_i, \underbrace{0,0,\dots,0}_{n-i})$; for the other paths, cyclically rotate the vertices of this one.

Title: Prove that $n-$cube is $n-$connected


问:
Checking triangle inequality on product of two metric spaces
Suppose p $\in$ [1,∞) and (M1,d1) and (M2,d2) are metric spaces.
Define e(x,y) = ($[d_1(x_1,y_1)]^p +[d_2(x_2,y_2)]^p)^{1/p}$ for each x = (x1,x2) and y = (y1, y2) $\in$ M1 × M2. I need to show that e is a metric on M1 × M2.

I checked first two axioms. But I could not finish triangle inequality for p. I couldn't show $d_1(x_1,y_1)^p \leq d_1(x_1,z_1)^p+ d_1(z_1,y_1)^p$. How can I show that? If I can show that than I can use Minkowsky inequality and finish the proof.

I checked the previous posts as well but any hint will be appreciated.

答: You can't show that $d1(x1,y1)^p≤d1(x1,z1)^p+d1(z1,y1)^p$ because it doesn't hold generally. ($A + B \ge C \not\rightarrow A^x +B^x \ge C^x$. I would suggest showing that $f(x) \ge 0$ for $x \ge 1$ if $f(x) = (A ^x + N^x)^\frac1x + (B ^x + M^x)^\frac1x - ((A + B)^x + (N + M)^x)^\frac1x$.