问:
Dependence of Axioms of Equivalence Relation?
This question is problem 11(a) in chapter 1 in 'Topics in Algebra' by I.N. Herstein.

These are the properties of equivalence relation given in this book.

Prop 1 $a \sim a$

Prop 2 $a \sim b$ implies $b \sim a$.

Prop 3 $(a \sim b$ and $b \sim c)$ imply $a \sim c$.

Statement Property 2 of an equivalence relation states that if $a \sim b$ then $b \sim a$. By property 3, we have the transitivity i.e. $a \sim b$, and $b \sim c$ then $a \sim c$. What is wrong with following proof that property 2 and 3 imply property 1? Let $a \sim b$; then $b \sim a$, whence by property 3 (using $a = c$), $a \sim a$.

I think I can prove this to be wrong. Without proving equivalence relation first, one can not use $a = c$. Right? After all, equality is equivalent to 'equivalence relation' and 'axiom of substitution' are satisfied. If this is right, then I have trouble with the next part of this problem.

Part 2 Can you suggest an alternative of property 1 which will insure us that prop 2 and prop 3 do imply 1?

Can one give such a formulation without using the idea of '=' or otherwise?

EDIT : Italics are my comments. Rest is as it appeared in the book.

Notion of Equality

I have read in Terry 'Analysis 1' in Appendix A.7 published by Hindustan Book Agency that there are four axioms of 'equality'. First 3 are same as equivalence relation where $\sim $ in replaced by $ = $. The fourth one is known as axiom of substitution. Given any two objects $x$ and $y$ of some type, if $ x = y $, then $f(x) = f(y) $ for all functions or operations $f$.

答: The problem is that property 1 should hold for any element of the set. Consider a set on which you define an equivalence relation such that an element x of the set is not equivalent to anything. In particular, you won't be able to use 2 and 3 on it. Now property 1 fails since x must be equivalent at least to itself.


问:
Proof that the minimum of a bounded differentiable real function occurs at a stationary point or at an endpoint
I couldn't find a proof for this well-known result on this site...

The minimum of a bounded differentiable real function occurs at a stationary point or at an endpoint.

I prove the contrapositive to this statement in my answer below.

Alternative proofs are most welcome.

答:
Let $f: [0,1] \to \mathbb{R}$ be a differentiable real function, and suppose that $c \in [0,1]$ is neither a stationary point nor an endpoint, but $c$ is a minimum. Then $f'(c)$ exists because $f$ is differentiable, but $f'(c)=\lim_{x \to c}\frac{f(x)-f(c)}{x-c}\neq 0,\ $ because $c$ is not a stationary point. Suppose WLOG that $f'(c)>0$. Then since $c$ is not the left endpoint, namely $0, $ and since $f'(c)>0, \ \exists k\ $ with $\ 0<k<c$ such that $f(k)<f(c)$, contradicting the minimality of $c$.

Admittedly I didn't prove the last line very formally, although I'm not sure how to, to be honest.

ContentLicense: CC BY-SA 4.0


问:
Using Stone-Weierstrass theorem prove that $f\equiv 0$ in $[0,1]$ under certain conditions.

Let $f$ be a continuous function over $[0,1]$ and $\displaystyle \int_0^1 f(x)\,dx=0$. If for any positive integer $n$, $\displaystyle \int_0^1 x^{12+3n}f(x)\,dx=0$ then using Stone-Weiersterass Theorem prove that $f\equiv 0$ in $[0,1]$.

Since $f$ is contnuous on $[0,1]$ so by Stone-Weierstrass Theorem there exists a sequence of polynomials $\{p_n(x)\}_n$ which converges uniformly to $f$ on $[0,1]$.  That is  , $p_n\to f$ , implies  $p_n(x)f(x)\to f^2(x)$ as $n\to \infty$, which implies that $\displaystyle \int_0^1p_n(x)f(x)\,dx \to \int_0^1 f^2(x)\,dx$. But from the given condition I can't say that $\displaystyle \int_0^1 f^2(x)\,dx =0$. So how to proceed to solve this problem ? Any hint. please.

答:
Setting  $g(x)=x^{12}f(x)$,  we know that
$$
  \int_0^1 x^{3n}g(x)\,dx=0,
  $$
for every $n>0$, and hence also
$$
  \int_0^1 p(x^3)g(x)\,dx=0,
  $$
for every polynomial $p$ with vanishing constant term.  Since the set of functions of the form $p(x^3)$, with $p(0)=0$,
is a dense subalgebra of
$$
  C_0((0,1]) = \{h∈   C([0,1]): h(0)=0\}
  $$
by Stone-Weierstrass, we deduce that   $\int_0^1 h(x)g(x)\,dx=0$, for all $h$ in that subalgebra, so $g=0$ on $(0,1]$.

Consequently $f=0$ on $(0,1]$ as well and, since $f$ is continuous, we  conclude that $f$ vanishes everywhere.


问:
Does homeomorphism of finite dimension topological vector space implies completeness
Let $X$ be finite dimension topological vector space,that linear homeomorphic to complete vector space $\mathbb{R}^n$ with Euclidean topology.  Prove $X$ is complete also.

We know $\mathbb{R}^n$ is complete, and $X$ is finite dimension.To show the completeness I do as follows:

First since $X$ is metrilizable(due to $\mathbb{R}^n$ is metrilizable), we just need to check Cauchy sequence converge. Just treat $(x_n)\in X$ likes $(\bar{x}_i)\in \mathbb{R}^n$ which complete the proof.

Is my proof correct?Linear is vital in the proof correct?

答:
Here is a counterexample, which highlights the fact that completeness is not independent of the metric.

Take $X = \mathbb R$, which is a 1-dimensional topological vector space. Use the homeomorphism $f : \mathbb R \to (-\pi/2,\pi/2) $ given by $f(x) = \tan^{-1}(x)$ to transport the metric from $(-\pi/2,\pi/2)$ back to $\mathbb R$, obtaining $d(x,y) = \left|f(x) - f(y)\right|$. Any sequence $(x_n)$ that approaches $+\infty$ is nonconvergent in $\mathbb R$, but it is a Cauchy sequence because $(f(x_n))$ approaches $\pi/2$ and therefore $(f(x_n))$ is a Cauchy sequence.

What this counterexample highlights is that the metric space notion of completeness is not quite what one wants for purposes of studying topological vector spaces; this may be where your confusion lies.

Take a look at the wikipedia page on topological vector spaces, particularly the section on metrizability and the section on completeness, and you will see that the topological vector space notion of completeness is a somewhat different and a somewhat subtler than the metric space notion.


问:
Who was V. Viskovatov?
I'd be interested to learn some biographical detail about Vasilii Viskovatov, whose name is associated with a method for converting (a ratio of) power series to a "corresponding" continued fraction, c.f. Handbook of Continued Fractions for Special Functions, p. 20 (Springer, 2008).

A few Internet hits (prominently Google books links, not wholly accessible) provide the following literature reference to his work, albeit with apparent mis-transliterated initial:

B. Viskovatov: 'De la méthode générale pour réduire toutes sortes des quantités en fractions continues', Memoires de L'Academie Impériale des Sciences de St. Petersburg, 1(1803-1806), pp. 226-247

[Trans.: 'A general method for reducing all types of quantities to continued fractions'.]

The algorithm itself can be described simply.  Given the ratio of two power series $p(z)/q(z)$ with $q(0) = 1$, remove as a constant term $b_0 = p(0)$, and after factoring out the leading term $z$ in the numerator, invert the remaining factor from $p(z) - p(0)q(z)$:

$$ \frac{p(z)}{q(z)} = b_0 + \frac{a_ 1 z \cdot r(z)}{q(z)} = b_0 + \frac{a_1 z}{q(z)/r(z)} $$

where for simplicity I've assumed a single power of $z$ in the numerator.  Continue to apply the process to $q(z)/r(z)$ and a corresponding-type continued fraction emerges.

答:
Putting together some of the findings and references as community wiki.

From Russian Wikipedia article (tweaked Google trans.):

Vasily Viskovatov (December 26 1779 ( 6 January 1780 ), St. Petersburg - 8(20) October 1812, St. Petersburg ) - Russian mathematician. Well-known expert in the field of mathematical analysis and the calculus of variations, one of the most active followers of Simon Guriev in the promotion of new and innovative research ideas.

Released from the Artillery and Engineers Royal Cadet Corps in 1796 as bayonet-cadet in the corps officers.

In 1803 declared a major mathematician, he was elected an academician of the St. Petersburg Imperial Academy of Sciences.

In 1810 - Professor of Pure and Applied Mathematics at the Institute of Railway Engineers 1.

First used the Russian term "derivative". 2

The Free Dictionary entry mostly duplicates the above but cites The Great Soviet Encyclopedia, 3rd Edition (1970-1979). © 2010 The Gale Group, Inc. All rights reserved, so I won't give a quote.  However it names a couple of the "major works" by Viskovatov, albeit in a transliterated form making automatic title translation fail.

From Mark Conrad's Russian Military History:

Major General Aleksandr Vasil’evich Viskovatov, Russian historian

This was V. Viskovatov's only son, "born in St. Petersburg on 22 April 1804."  I presume this is a Julian calendar date, as Russia/Soviet Union did not adopt the Gregorian calendar until 1918 (which is the reason for two sets of dates in the previous Wikipedia article).  It is mentioned that the family descended from a "branch of the Meshcherskii princes."

The son inherited his father's enthusiasm for mathematics, but sadly lost him at an early age (nine years old?).  The date of the father's death is given here as 1813, which differs from that shown in the Wikipedia article, a detail I'll attempt to clarify.

The development of mathematics in Russia in XVIII-XIX centuries

After graduating from military school, he was left there for the teaching of mathematics. At the age of twenty (1799) he was elected corresponding member, and in 1804 an associate of the Academy of Sciences. Later, he was promoted to the extra-ordinary academician. With the establishment of the Institute of Railway Engineerss, he was appointed professor in 1812 but died 34 years old. Viskovatov published several memoirs in the publications of the Academy, and a guide to elementary algebra. He has translated and published "Principles of Mechanics" by Bossu and published a new edition of the Euler's "Algebra". Despite his premature death, Viskovatov already had many disciples.

I.V. Ignatushina.
Formation of differential geometry as an academic subject in Russia in XVIII - the first half of the XIX century: disciples and followers of Leonhard Euler

V.I. Viskovatov, Guriev's student, taught mathematics and mechanics at the Artillery Cadet Corps, and then at the Institute of Railway Engineers and Mining Institute. In 1808 Viskovatov presented a work  "Summary of the famous Lagrange method to interpret the differential calculus and the application thereof to the geometry of curves" (1810). The second part of this work, entitled "On the application of differential calculus to the geometry of curves", is one of the first presentation of the issues of differential geometry of plane curves in Russian. It discusses the concept of a tangent to the curve, convexity,  curve inflection point, multiple points of cusps of the first and second kind, notions of evolute and involute of the curve and the concept of contiguous curves. He derived the equations of the tangent and normal line drawn at a given point of the curve, and the radius of curvature in the cases when the curve is set in a rectangular, oblique and polar coordinate systems.

Title: Who was V. Viskovatov?

ContentLicense: CC BY-SA 3.0


问:
Find the curve whose tangent lines in every point intersect x and y axis with property that sum of intersection lengths are constant a

Find the curve whose tangent lines in every point intersect $x$ and $y$ axis with property that sum of intersection lengths on $x$ and $y$ axis are equal to a constant $a$.

I'll show you my way of solving this problem and I'd be grateful if someone can confirm it's the right way to solve this problem.

Let $M(x,y)$ be the point on the curve where our tangent line crosses and let $L, N$ be two points where tangent line intersects $y$ and $x$ axis respectively.

Let's find coordinates of $L$ and $N$. Write the tangent line equation: $Y - y(x) = y'(x) ( X - x)$

For $Y = 0$  we can find coordinates of N, putting $Y=0$ in the equation above we get $N(x-\frac{y}{y'},0)$.

Same for $L$ point, if we put $X=0$ we get $L(0,-xy'+y)$.

Now we have $N(x-\frac{y}{y'},0),M(x,y),L(0,-xy+y')$. Let's use the length property.

$|LO|+|NO|=a$, where $O$ is center of coordinate system $(0,0)$. I get the following equation:
$y^2-2xyy'+x^2(y')^2+x^2-2x\frac{y}{y'}+\frac{y^2}{(y')^2}=0$ and if I solve this I'll get the equation of curve.

Can you confirm that this is the right way to solve this problem or are there any easier ways to do this?

答:
The ODE you obtained looks pretty awful. Its solution is the family $(\ell_c)_{c\in{\mathbb R}}$ of lines you worked with, plus a certain "extra" solution $\epsilon$ that can  only be obtained with an extra procedure, even if you could solve this ODE. There is an easier way:

When you draw a few lines $\ell_c$ having axes intercepts summing to the given $a$ you will see that these lines are tangents to a common curve $\epsilon$. This curve, called envelope of the family of lines, is your animal. (It so happens that exactly your example is treated in the linked Wikipedia entry.)

To solve the problem you have to write up the equation of your line family. It is given by
$$\ell_c:\qquad{x\over c}+{y\over a-c}=1\quad(0<c<a)\ ,$$
or
$$(a-c)x+c y-c(a-c)=0\ .\tag{1}$$
There is an "obscure" general procedure to obtain the envelope of a given family of curves. You have to differentiate $(1)$ partially with respect to the parameter $c$, and obtain a second equation $(2)$. Solve the system $(1)\wedge(2)$ for $x$ and $y$ as functions of $c$, and you have a parametrization of the envelope $\epsilon$. This  proceeding of course has theoretic reasons which I don't explain here.

But your example is so simple that we can obtain the envelope without calculus: The family $(\ell_c)_{c\in{\mathbb R}}$ does not cover the full $(x,y)$-plane. There are points $(x,y)$ that are passed by two lines $\ell_{c_1}$, $\ell_{c_2}$, and there are points $(x,y)$ that are not passed by a line $\ell_c$. The boundary between the two parts is exactly the envelope $\epsilon$. We can therefore do the following: Solve the equation $(1)$ for $c$. This is a quadratic equation with  discriminant
$$D(x,y)=(y-x-a)^2-4ax\ .$$
When $D(x,y)>0$ we obtain two real $c$-values $c_1$, $c_2$. When $D(x,y)<0$ there is no real solution $c$. The points of $\epsilon$ are exactly the points satisfying $D(x,y)=0$, so that we can write
$$\epsilon:\quad(y-x-a)^2-4ax=0\ .$$
This is a parabola opening up in direction north-east.


问:
Balancing chemical equations using linear algebraic methods
I know there are already plenty of questions on this site regarding this topic but I am having difficulty with a particular chemical equation.

I am trying to balance the following:

$$
{ C }_{ 2 }{ H }_{ 2 }{ Cl }_{ 4 }\quad +\quad { C }a{ { (OH }) }_{ 2 }\quad \xrightarrow [  ]{  } \quad { C }_{ 2 }{ H }{ Cl }_{ 3 }\quad +\quad Ca{ Cl }_{ 2 }\quad +\quad { H }_{ 2 }{ O }
$$

The system of linear equations produces the following augmented matrix:

$$
\begin{pmatrix} 2 & 0 & -2 & 0 & 0 & 0 \\ 2 & 2 & -1 & 0 & -2 & 0 \\ 4 & 0 & -3 & -2 & 0 & 0 \\ 0 & 1 & 0 & 1 & 0 & 0 \\ 0 & 2 & 0 & 0 & -1 & 0 \end{pmatrix}
$$

With the rows in the following order:
Carbon
Hydrogen
Chlorine
Calcium
Oxygen

In row echelon form this reduces to:

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

Which would indicate that:
x1 = 0; x2 = 0; x3 = 0; x4 = 0; x5 = 0
which is obviously not correct. What have I done wrong?

答:
Automated Balancing of Chemical Equations

Other related questions at Mathematics Stack Exchange (MSE) are
mentioned in MSE publications / references 2020,
which is on my personal website.
Automated Balancing of Chemical Equations is the title of a computer program which has been developed
for the purpose.
Development has taken place as early as in 2004.
However, publications about automatic balancing have already appeared in
1995. So it seems
that I've been reinventing the wheel; or at least parts of it.

Meanwhile, quite a few automatic balancers have become available on the internet; let Google be your friend to find some.
Seemingly a popular one is Wolfram Alpha, as is advertized in
one of the questions.

We decided to elaborate further on the answer given by lynn
and explain a bit about our computer program. Not because it would be better than other "apps" of the kind, but for other
reasons, the most important being that the mathematics involved may not very familiar. By the way, the accompanying
software is CopyLefted open source; there is nothing secret under the hood.

An important remark is in the abstract of an article titled
Generalized matrix inverse approach for automatic balancing of chemical equations. Quote:
Chemical reactions are classified as not feasible, uniquely‐feasible (unique within relative proportions)
and non‐uniquely feasible. We shall arrive at each of these three cases in turn.

From input to matrix

The above equation has been cast into the following form, as plain text input:

```
? C_2 H_2 Cl_4 + ? Ca(O H)_2 ==> ? C_2 H Cl_3 + ? Ca Cl_2 + ? H_2 O
```

An essential statement in our input parser is that it throws out all characters that are not OK, mainly according to:

```
OK := c in ['A'..'Z','a'..'z','0'..'9','+','=','(',')'];   { with Pascal built-in Set Theory }
```

The advantage of this is flexibility of input: most of it is "comment". It leaves us with the following much shorter string, containing only the essentials, to be processed futher:

```
C2H2Cl4+Ca(OH)2=C2HCl3+CaCl2+H2O
```

The end result of input processing is an array that stores the following data structure:

```
  onthou = record
    e : string[2]; { name of chemical element }
    L : integer;   { length of element name (1 or 2) }
    p : integer;   { position in short formula string }
    r : integer;   { numbering of matrix rows }
    m : integer;   { numbering of matrix columns }
    g : integer;   { number of atoms in molecule }
  end;
```

Then comes the computational part. The data stored in the above structure is converted into a matrix and a vector,
essentially according to the answer given by lynn:
$$
\begin{bmatrix}
   2 & 2 & -1 &  0 \\
   2 & 0 & -2 &  0 \\
   0 & 2 &  0 &  0 \\
   4 & 0 & -3 & -2 \\
   0 & 1 &  0 & -1 \end{bmatrix}
\begin{bmatrix} a \\ b \\ c \\ d \end{bmatrix} =
\begin{bmatrix} 2 \\ 0 \\ 1 \\ 0 \\ 0 \end{bmatrix}
$$
Only the numbering of the atoms (matrix rows) is different, which should not come as a surprise.
The above is an overdetermined system which can be solved as:
$$
A^TA x =
\begin{bmatrix}
   24 &  4 & -18 & -8 \\
4 &  9 &  -2 & -1 \\
  -18 & -2 &  14 &  6 \\
   -8 & -1 &   6 &  5 \end{bmatrix}
\begin{bmatrix} a \\ b \\ c \\ d \end{bmatrix} =
\begin{bmatrix} 4 \\ 6 \\ -2 \\ 0  \end{bmatrix} = A^T b
$$
This raises the first question: is the system of equations $A^TAx=A^Tb$ indeed equivalent with $Ax=b$?

Least Squares method

Let a system of (overdetermined) equations $(Ax-r=\,?)$ be squared, summed and minimized:
$$
(Ax-r,Ax-r) = \sum_{k=1}^M \left( \sum_{i=1}^N A_{ki} x_i - r_k \right)^2 = \,\operatorname{residual}(x)
$$
By differentiating to $\,x_i\,$ we get $N$ (symmetric) equations with $N$ unknowns $Sx=b\;$:
$\partial/\partial x_i\, \operatorname{residual}(x) =$
$$
2\sum_{k=1}^M A_{ki} \left( \sum_{j=1}^N A_{kj} x_j - r_k \right) = 0 \quad \Longrightarrow \\ \sum_{j=1}^N
\underbrace{\sum_{k=1}^M A_{ki} A_{kj}}_{\large S_{ij}}\, x_j = \underbrace{\sum_{k=1}^M A_{ki} r_k}_{\large b_i}
$$
It is seen that, with a Least Squares method, the ( numbering of the atoms = row numbering of $A$ ) is effectively eliminated.
That numbering isn't relevant anyway. Instead we have now: row numbering = column numbering = order of molecules
in the chemical equation. Only the latter is relevant. It is also obvious that the matrix $S = A^TA$ is
symmetric. And it is positive definite. Which means that no pivot search is needed: all pivots are on the main
diagonal of the matrix $S$. And the Hessian matrix
of the function $\,\operatorname{residual}(x)\,$ happens to be the same matrix $S$. As a consequence the residual
indeed reaches a local minimum for the solution values $x_j$. It is not guaranteed, though, that the minimum
is zero. Most of the time it will be, but not always. We shall see an example soon. It all means that we always have to
check afterwards if the chemical equation is truly balanced, by multiplying the augmented matrix $A$ with the
coefficients (solution) vector and verify that the result is the zero vector.
So far so good.
The next question is: how are we going to solve these equations? Three strategies have been employed
for the purpose.

Employing Cramer's rule

Proposed recipe. Invert the matrix according to Cramer's rule: compute subdeterminants of the matrix elements
and - do not yet - divide by the determinant of the whole matrix. Then multiply the right hand side vector
with this inverse times the determinant. Divide the outcomes by their greatest common divisor.

An obvious advantage of Cramer's method is that integer arithmetic is preserved. And a matrix sometimes needs not to be (least) squared, namely if it is already a square matrix by itself:
$$
\operatorname{Det}\left(A^TA\right) = \operatorname{Det}\left(A\right)^2 \gt 0 \quad \Longrightarrow \quad \operatorname{Det}\left(A\right) \ne 0
$$
But the disadvantage
is also well known: the method quickly becomes computationally prohibitive, even with moderate values of
the matrix size $n$. That happens because the number of computations involved is proportional to $n!$ (or some such),
as confirmed by Wikipedia and answers to questions at MSE, for example this one:
Is Cramer's rule efficient for computational point of view?

Floating point Gauss solver

Cast all integer values to floating point and use a common Gauss solver. This can be the simplest one,
since our matrix is positive definite and hence all pivots are on the main diagonal. A definite advantage of the floating point method is that it is fast, and accompanying software is (almost) ready for use. Here is the basic template:

```
procedure Oplossen(A : matrix; var b : vector);
{
  Simple Gauss Solver
}
var
  N,i,j,k : integer;
  p,s : double;
begin
  N := Length(b);
{ Elimination }
  for k := 0 to N-1 do
  begin
    p := A[k,k]; { pivot }
    for i := k+1 to N-1 do
    begin
      if A[i,k] = 0 then Continue;
      A[i,k] := A[i,k]/p;
      for j := k+1 to N-1 do
        A[i,j] := A[i,j] - A[i,k]*A[k,j];
      b[i] := b[i] - A[i,k]*b[k];
    end;
  end;
{ Backsubstitution }
  for k := N-1 downto 0 do
  begin
    s := b[k];
    for j := k+1 to N-1 do
      s := s - A[k,j]*b[j];
    b[k] := s/A[k,k];
  end;
end;
```

After having obtained an upper triangular matrix, the product of all main diagonal elements is the determinant.
The solver is part of our open source, so it's easy to expand the output parameter list with a Det.
Due to the integer nature of $A^TA$, the determinant must be an integer as well. Hence multiply the floating
point solution with the determinant. Then, after rounding everything to the nearest integer and using GCD's, we
should obtain the coefficients of the chemical equation.

However, without further modifications of the source, you may run in an error message like the one below:

```
Runtime error 207 at 00405D4E
```

What it means by the way is: division by zero. In order to avoid it, we have modified the source code in such a way that divisions are simply not carried out for pivot values zero. The resulting Garbage Out will do no harm, because we have an overall balance check in the end.

Rational number arithmetic

Instead of using floating point arithmetic, we can define a true rational number (fractions) arithmetic,
with integers in the numerators and integers in the denominators:

```
type
  breuk = record { fraction }
    teller,noemer : integer; { numerator,denominator }
  end;
```

Apologies for using so many Dutch words in my programming. One reason is that it protects us from conflicts with
the (IMHO too many) reserved (and English) words in Pascal.
Anyway, define alternatives for common arithmetic and other common operations.
Mind the Simplify routine which should be present in most of the fraction functions.
Without enduring simplification, the size of numerators and denominators can run quickly out of hand, maybe more quickly than expected. So I've used int64 inside, which is the largest integer type available in Delphi Pascal.

```
function maak(a,b : integer) : breuk; { make }
function vereenvoudig(f : breuk) : breuk; { Simplify }
function afdruk(f : breuk) : string; { print }
function plus(a,b : breuk) : breuk; { addition }
function minus(a,b : breuk) : breuk; { substraction }
function maal(a,b : breuk) : breuk; { multiplication }
function deel(a,b : breuk) : breuk; { division }
function gelijk(a,b : breuk) : boolean; { equality }
function groter(a,b : breuk) : boolean; { greater }
function dubbel(a : breuk) : double; { Double precision }
```

As a next step, take the above open source simple Gauss solver and replace in there all common arithmetic operators
by their rational number equivalents. The "Fractions" module can be designed in such a way that it is insensitive to
division by zero. Which does not mean that you will always have a sensible outcome. But that doesn't matter much,
because we can always check the balancing afterwards and there are no divisions in the latter procedure.

Back to our problem. With rational number arithmetic, matrix and vector may be displayed as follows, after pivoting:
$$
\begin{bmatrix}
   24/1 &  4/1 & -18/1 &  -8/1 & | &   4/1 \\
    & 25/3 &   1/1 &   1/3 & | &  16/3 \\
    &      & 19/50 & -1/25 & | &  9/25 \\
    &      &       & 44/19 & | & 22/19 \end{bmatrix}
$$
Backsubstitution as usual gives the following solution for the coefficients in the chemical equation:
$$
\begin{bmatrix} 1/1 & 1/2 & 1/1 & 1/2 & 1/1 \end{bmatrix}
$$
At last multiply with the maximum of the denominators (GCD is not necessary !) and we are finished:
$$
\mathrm{2\, C_2 H_2 Cl_4 + Ca(OH)_2 \,\rightarrow \, 2\, C_2 H Cl_3 + Ca Cl_2 + 2\, H_2 O}
$$

Multiple solutions

Consider the following input to the program:

```
? Fe + ? O_2 ==> ? Fe O + ? Fe_2 O_3
```

The accompanying balancing equations are:
$$
\begin{matrix} \, O : \\ Fe : \end{matrix}
\begin{bmatrix}
   0 &  2 & -1 & -3 \\
   1 &  0 & -1 & -2 \end{bmatrix}
\begin{bmatrix} p \\ q \\ r \\ 1 \end{bmatrix} = 0
\quad \Longrightarrow \quad
\begin{bmatrix}
   0 &  2 & -1 \\
   1 &  0 & -1 \end{bmatrix}
\begin{bmatrix} p \\ q \\ r \end{bmatrix} =
\begin{bmatrix} 3 \\ 2 \end{bmatrix}
$$
Do the least squares:
$$\begin{bmatrix}
   0 & 1 \\
   2 & 0 \\
  -1 & -1 \end{bmatrix}
\begin{bmatrix}
   0 & 2 & -1 \\
   1 & 0 & -1 \end{bmatrix}
\begin{bmatrix} p \\ q \\ r \end{bmatrix} =
\begin{bmatrix}
   0 & 1 \\
   2 & 0 \\
  -1 & -1 \end{bmatrix}
\begin{bmatrix} 3 \\ 2 \end{bmatrix}
$$ $$
\begin{bmatrix}
1 &  0 & -1 \\
0 &  4 & -2 \\
   -1 & -2 &  2 \end{bmatrix}
\begin{bmatrix} p \\ q \\ r \end{bmatrix} =
\begin{bmatrix} 2 \\ 6 \\ -5 \end{bmatrix}
$$
The matrix is pivoted by hand:
$$
\begin{bmatrix}
1 &  0 & -1 \\
0 &  4 & -2 \\
   -1 & -2 &  2 \end{bmatrix} \sim
\begin{bmatrix}
1 &  0 & -1 \\
0 &  4 & -2 \\
0 & -2 &  1 \end{bmatrix} \sim
\begin{bmatrix}
1 &  0 & -1 \\
0 &  4 & -2 \\
0 &  0 &  0 \end{bmatrix}
$$
It's easily concluded that the system of equations is singular.
Which means that there are multiple solutions. To mention a few of these:
$$
\mathrm{3\, Fe + 2\, O_2 \,\rightarrow \,Fe O + Fe_2 O_3} \\
\mathrm{5\, Fe + 3\, O_2 \,\rightarrow \, 3\,Fe O + Fe_2 O_3} \\
\mathrm{7\, Fe + 5\, O_2 \,\rightarrow \,Fe O + 3\, Fe_2 O_3}
$$

Zero solution

Another pathological case is illustrated by the following input:

```
? Fe S + ? H_2 S O_4 ==> ? Fe S O_4 + ? H_2 O
```

The accompanying (augmented) balancing matrix is pivoted by hand, without least squares though:
$$
\begin{matrix} \text{Fe :} \\ \text{S :} \\ \text{O :} \\ \text{H :} \end{matrix}
\begin{bmatrix}
 1 & 0 & -1 &  0 \\
 1 & 1 & -1 &  0 \\
 0 & 4 & -4 & -1 \\
 0 & 2 &  0 & -2 \end{bmatrix} \sim
\begin{bmatrix}
 1 & 0 & -1 &  0 \\
 0 & 1 &  0 &  0 \\
 0 & 4 & -4 & -1 \\
 0 & 2 &  0 & -2 \end{bmatrix} \sim
\begin{bmatrix}
 1 & 0 & -1 &  0 \\
 0 & 1 &  0 &  0 \\
 0 & 0 & -4 & -1 \\
 0 & 0 &  0 & -2 \end{bmatrix}
$$
The determinant is the product of the main diagonal elements of the last matrix, which is $8$.
Thus it is easily seen that the balancing matrix is non-singular. This would have resulted in
a Least Squares problem with non-zero residual. Therefore it is not allowed to put any of
the unknown coefficients equal to a fixed value (i.e. the last one $=1$). There is no other solution than the zero solution:
$$
\mathrm{0\, Fe S + 0\, H_2 S O_4 \,\rightarrow 0\,Fe S O_4 + 0\, H_2 O}
$$
Herewith all possible cases have been covered.

Body:
Automated Balancing of Chemical Equations

Other related questions at Mathematics Stack Exchange (MSE) are
mentioned in MSE publications / references 2020,
which is on my personal website.
Automated Balancing of Chemical Equations is the title of a computer program which has been developed
for the purpose.
Development has taken place as early as in 2004.
However, publications about automatic balancing have already appeared in
1995. So it seems
that I've been reinventing the wheel; or at least parts of it.

Meanwhile, quite a few automatic balancers have become available on the internet; let Google be your friend to find some.
Seemingly a popular one is Wolfram Alpha, as is advertized in
one of the questions.

We decided to elaborate further on the answer given by lynn
and explain a bit about our computer program. Not because it would be better than other "apps" of the kind, but for other
reasons, the most important being that the mathematics involved may not very familiar. By the way, the accompanying
software is CopyLefted open source; there is nothing secret under the hood.

An important remark is in the abstract of an article titled
Generalized matrix inverse approach for automatic balancing of chemical equations. Quote:
Chemical reactions are classified as not feasible, uniquely‐feasible (unique within relative proportions)
and non‐uniquely feasible. We shall arrive at each of these three cases in turn.

From input to matrix

The above equation has been cast into the following form, as plain text input:

? C_2 H_2 Cl_4 + ? Ca(O H)_2 ==> ? C_2 H Cl_3 + ? Ca Cl_2 + ? H_2 O

An essential statement in our input parser is that it throws out all characters that are not OK, mainly according to:

OK := c in ['A'..'Z','a'..'z','0'..'9','+','=','(',')'];   { with Pascal built-in Set Theory }

The advantage of this is flexibility of input: most of it is "comment". It leaves us with the following much shorter string, containing only the essentials, to be processed futher:

C2H2Cl4+Ca(OH)2=C2HCl3+CaCl2+H2O

The end result of input processing is an array that stores the following data structure:

  onthou = record
    e : string[2]; { name of chemical element }
    L : integer;   { length of element name (1 or 2) }
    p : integer;   { position in short formula string }
    r : integer;   { numbering of matrix rows }
    m : integer;   { numbering of matrix columns }
    g : integer;   { number of atoms in molecule }
  end;

Then comes the computational part. The data stored in the above structure is converted into a matrix and a vector,
essentially according to the answer given by lynn:
$$
\begin{bmatrix}
   2 & 2 & -1 &  0 \\
   2 & 0 & -2 &  0 \\
   0 & 2 &  0 &  0 \\
   4 & 0 & -3 & -2 \\
   0 & 1 &  0 & -1 \end{bmatrix}
\begin{bmatrix} a \\ b \\ c \\ d \end{bmatrix} =
\begin{bmatrix} 2 \\ 0 \\ 1 \\ 0 \\ 0 \end{bmatrix}
$$
Only the numbering of the atoms (matrix rows) is different, which should not come as a surprise.
The above is an overdetermined system which can be solved as:
$$
A^TA x =
\begin{bmatrix}
   24 &  4 & -18 & -8 \\
4 &  9 &  -2 & -1 \\
  -18 & -2 &  14 &  6 \\
   -8 & -1 &   6 &  5 \end{bmatrix}
\begin{bmatrix} a \\ b \\ c \\ d \end{bmatrix} =
\begin{bmatrix} 4 \\ 6 \\ -2 \\ 0  \end{bmatrix} = A^T b
$$
This raises the first question: is the system of equations $A^TAx=A^Tb$ indeed equivalent with $Ax=b$?

Least Squares method

Let a system of (overdetermined) equations $(Ax-r=\,?)$ be squared, summed and minimized:
$$
(Ax-r,Ax-r) = \sum_{k=1}^M \left( \sum_{i=1}^N A_{ki} x_i - r_k \right)^2 = \,\operatorname{residual}(x)
$$
By differentiating to $\,x_i\,$ we get $N$ (symmetric) equations with $N$ unknowns $Sx=b\;$:
$\partial/\partial x_i\, \operatorname{residual}(x) =$
$$
2\sum_{k=1}^M A_{ki} \left( \sum_{j=1}^N A_{kj} x_j - r_k \right) = 0 \quad \Longrightarrow \\ \sum_{j=1}^N
\underbrace{\sum_{k=1}^M A_{ki} A_{kj}}_{\large S_{ij}}\, x_j = \underbrace{\sum_{k=1}^M A_{ki} r_k}_{\large b_i}
$$
It is seen that, with a Least Squares method, the ( numbering of the atoms = row numbering of $A$ ) is effectively eliminated.
That numbering isn't relevant anyway. Instead we have now: row numbering = column numbering = order of molecules
in the chemical equation. Only the latter is relevant. It is also obvious that the matrix $S = A^TA$ is
symmetric. And it is positive definite. Which means that no pivot search is needed: all pivots are on the main
diagonal of the matrix $S$. And the Hessian matrix
of the function $\,\operatorname{residual}(x)\,$ happens to be the same matrix $S$. As a consequence the residual
indeed reaches a local minimum for the solution values $x_j$. It is not guaranteed, though, that the minimum
is zero. Most of the time it will be, but not always. We shall see an example soon. It all means that we always have to
check afterwards if the chemical equation is truly balanced, by multiplying the augmented matrix $A$ with the
coefficients (solution) vector and verify that the result is the zero vector.
So far so good.
The next question is: how are we going to solve these equations? Three strategies have been employed
for the purpose.

Employing Cramer's rule

Proposed recipe. Invert the matrix according to Cramer's rule: compute subdeterminants of the matrix elements
and - do not yet - divide by the determinant of the whole matrix. Then multiply the right hand side vector
with this inverse times the determinant. Divide the outcomes by their greatest common divisor.

An obvious advantage of Cramer's method is that integer arithmetic is preserved. And a matrix sometimes needs not to be (least) squared, namely if it is already a square matrix by itself:
$$
\operatorname{Det}\left(A^TA\right) = \operatorname{Det}\left(A\right)^2 \gt 0 \quad \Longrightarrow \quad \operatorname{Det}\left(A\right) \ne 0
$$
But the disadvantage
is also well known: the method quickly becomes computationally prohibitive, even with moderate values of
the matrix size $n$. That happens because the number of computations involved is proportional to $n!$ (or some such),
as confirmed by Wikipedia and answers to questions at MSE, for example this one:
Is Cramer's rule efficient for computational point of view?

Floating point Gauss solver

Cast all integer values to floating point and use a common Gauss solver. This can be the simplest one,
since our matrix is positive definite and hence all pivots are on the main diagonal. A definite advantage of the floating point method is that it is fast, and accompanying software is (almost) ready for use. Here is the basic template:

procedure Oplossen(A : matrix; var b : vector);
{
  Simple Gauss Solver
}
var
  N,i,j,k : integer;
  p,s : double;
begin
  N := Length(b);
{ Elimination }
  for k := 0 to N-1 do
  begin
    p := A[k,k]; { pivot }
    for i := k+1 to N-1 do
    begin
      if A[i,k] = 0 then Continue;
      A[i,k] := A[i,k]/p;
      for j := k+1 to N-1 do
        A[i,j] := A[i,j] - A[i,k]*A[k,j];
      b[i] := b[i] - A[i,k]*b[k];
    end;
  end;
{ Backsubstitution }
  for k := N-1 downto 0 do
  begin
    s := b[k];
    for j := k+1 to N-1 do
      s := s - A[k,j]*b[j];
    b[k] := s/A[k,k];
  end;
end;

After having obtained an upper triangular matrix, the product of all main diagonal elements is the determinant.
The solver is part of our open source, so it's easy to expand the output parameter list with a Det.
Due to the integer nature of $A^TA$, the determinant must be an integer as well. Hence multiply the floating
point solution with the determinant. Then, after rounding everything to the nearest integer and using GCD's, we
should obtain the coefficients of the chemical equation.

However, without further modifications of the source, you may run in an error message like the one below:

Runtime error 207 at 00405D4E

What it means by the way is: division by zero. In order to avoid it, we have modified the source code in such a way that divisions are simply not carried out for pivot values zero. The resulting Garbage Out will do no harm, because we have an overall balance check in the end.

Rational number arithmetic

Instead of using floating point arithmetic, we can define a true rational number (fractions) arithmetic,
with integers in the numerators and integers in the denominators:

type
  breuk = record { fraction }
    teller,noemer : integer; { numerator,denominator }
  end;

Apologies for using so many Dutch words in my programming. One reason is that it protects us from conflicts with
the (IMHO too many) reserved (and English) words in Pascal.
Anyway, define alternatives for common arithmetic and other common operations.
Mind the Simplify routine which should be present in most of the fraction functions.
Without enduring simplification, the size of numerators and denominators can run quickly out of hand, maybe more quickly than expected. So I've used int64 inside, which is the largest integer type available in Delphi Pascal.

function maak(a,b : integer) : breuk; { make }
function vereenvoudig(f : breuk) : breuk; { Simplify }
function afdruk(f : breuk) : string; { print }
function plus(a,b : breuk) : breuk; { addition }
function minus(a,b : breuk) : breuk; { substraction }
function maal(a,b : breuk) : breuk; { multiplication }
function deel(a,b : breuk) : breuk; { division }
function gelijk(a,b : breuk) : boolean; { equality }
function groter(a,b : breuk) : boolean; { greater }
function dubbel(a : breuk) : double; { Double precision }

As a next step, take the above open source simple Gauss solver and replace in there all common arithmetic operators
by their rational number equivalents. The "Fractions" module can be designed in such a way that it is insensitive to
division by zero. Which does not mean that you will always have a sensible outcome. But that doesn't matter much,
because we can always check the balancing afterwards and there are no divisions in the latter procedure.

Back to our problem. With rational number arithmetic, matrix and vector may be displayed as follows, after pivoting:
$$
\begin{bmatrix}
   24/1 &  4/1 & -18/1 &  -8/1 & | &   4/1 \\
    & 25/3 &   1/1 &   1/3 & | &  16/3 \\
    &      & 19/50 & -1/25 & | &  9/25 \\
    &      &       & 44/19 & | & 22/19 \end{bmatrix}
$$
Backsubstitution as usual gives the following solution for the coefficients in the chemical equation:
$$
\begin{bmatrix} 1/1 & 1/2 & 1/1 & 1/2 & 1/1 \end{bmatrix}
$$
At last multiply with the maximum of the denominators (GCD is not necessary !) and we are finished:
$$
\mathrm{2\, C_2 H_2 Cl_4 + Ca(OH)_2 \,\rightarrow \, 2\, C_2 H Cl_3 + Ca Cl_2 + 2\, H_2 O}
$$

Multiple solutions

Consider the following input to the program:

? Fe + ? O_2 ==> ? Fe O + ? Fe_2 O_3

The accompanying balancing equations are:
$$
\begin{matrix} \, O : \\ Fe : \end{matrix}
\begin{bmatrix}
   0 &  2 & -1 & -3 \\
   1 &  0 & -1 & -2 \end{bmatrix}
\begin{bmatrix} p \\ q \\ r \\ 1 \end{bmatrix} = 0
\quad \Longrightarrow \quad
\begin{bmatrix}
   0 &  2 & -1 \\
   1 &  0 & -1 \end{bmatrix}
\begin{bmatrix} p \\ q \\ r \end{bmatrix} =
\begin{bmatrix} 3 \\ 2 \end{bmatrix}
$$
Do the least squares:
$$\begin{bmatrix}
   0 & 1 \\
   2 & 0 \\
  -1 & -1 \end{bmatrix}
\begin{bmatrix}
   0 & 2 & -1 \\
   1 & 0 & -1 \end{bmatrix}
\begin{bmatrix} p \\ q \\ r \end{bmatrix} =
\begin{bmatrix}
   0 & 1 \\
   2 & 0 \\
  -1 & -1 \end{bmatrix}
\begin{bmatrix} 3 \\ 2 \end{bmatrix}
$$ $$
\begin{bmatrix}
1 &  0 & -1 \\
0 &  4 & -2 \\
   -1 & -2 &  2 \end{bmatrix}
\begin{bmatrix} p \\ q \\ r \end{bmatrix} =
\begin{bmatrix} 2 \\ 6 \\ -5 \end{bmatrix}
$$
The matrix is pivoted by hand:
$$
\begin{bmatrix}
1 &  0 & -1 \\
0 &  4 & -2 \\
   -1 & -2 &  2 \end{bmatrix} \sim
\begin{bmatrix}
1 &  0 & -1 \\
0 &  4 & -2 \\
0 & -2 &  1 \end{bmatrix} \sim
\begin{bmatrix}
1 &  0 & -1 \\
0 &  4 & -2 \\
0 &  0 &  0 \end{bmatrix}
$$
It's easily concluded that the system of equations is singular.
Which means that there are multiple solutions. To mention a few of these:
$$
\mathrm{3\, Fe + 2\, O_2 \,\rightarrow \,Fe O + Fe_2 O_3} \\
\mathrm{5\, Fe + 3\, O_2 \,\rightarrow \, 3\,Fe O + Fe_2 O_3} \\
\mathrm{7\, Fe + 5\, O_2 \,\rightarrow \,Fe O + 3\, Fe_2 O_3}
$$

Zero solution

Another pathological case is illustrated by the following input:

? Fe S + ? H_2 S O_4 ==> ? Fe S O_4 + ? H_2 O

The accompanying (augmented) balancing matrix is pivoted by hand, without least squares though:
$$
\begin{matrix} \text{Fe :} \\ \text{S :} \\ \text{O :} \\ \text{H :} \end{matrix}
\begin{bmatrix}
 1 & 0 & -1 &  0 \\
 1 & 1 & -1 &  0 \\
 0 & 4 & -4 & -1 \\
 0 & 2 &  0 & -2 \end{bmatrix} \sim
\begin{bmatrix}
 1 & 0 & -1 &  0 \\
 0 & 1 &  0 &  0 \\
 0 & 4 & -4 & -1 \\
 0 & 2 &  0 & -2 \end{bmatrix} \sim
\begin{bmatrix}
 1 & 0 & -1 &  0 \\
 0 & 1 &  0 &  0 \\
 0 & 0 & -4 & -1 \\
 0 & 0 &  0 & -2 \end{bmatrix}
$$
The determinant is the product of the main diagonal elements of the last matrix, which is $8$.
Thus it is easily seen that the balancing matrix is non-singular. This would have resulted in
a Least Squares problem with non-zero residual. Therefore it is not allowed to put any of
the unknown coefficients equal to a fixed value (i.e. the last one $=1$). There is no other solution than the zero solution:
$$
\mathrm{0\, Fe S + 0\, H_2 S O_4 \,\rightarrow 0\,Fe S O_4 + 0\, H_2 O}
$$
Herewith all possible cases have been covered.


问:
Finding the determinant of a matrix with $0$s on the diagonal, $1$s in the first row and column, and $x$ elsewhere.
How do you attempt to solve the deterimnant of
$$D_n=\begin{vmatrix}
0 & 1 & 1 & 1 & \cdots & 1 \\
1 & 0 & x & x & \cdots & x \\
1 & x & 0 & x & \cdots & x \\
1 & x & x & 0 & \ddots & \vdots \\
\vdots & \vdots & \vdots & x & \ddots & x \\
1 & x & x & \cdots & x & 0
\end{vmatrix}$$

My approach is to try and create a similar matrix with finite dimensions (something like a $4\times 4$) and then try and simplify it, but I always get stuck in the process of simplifying...

In general, how do you approach these types of questions?

答:
We have $$x^2D_n = \begin{vmatrix}
0 & x & x & \cdots & x \\
x & 0 & x & \cdots & x \\
x & x & 0 & \cdots & x \\
\vdots & \vdots & \vdots & \ddots & \vdots \\
x & x & x & \cdots & 0
\end{vmatrix}  = x^n\begin{vmatrix}
0 & 1 & 1 & \cdots & 1 \\
1 & 0 & 1 & \cdots & 1 \\
1 & 1 & 0 & \cdots & 1 \\
\vdots & \vdots & \vdots & \ddots & \vdots \\
1 & 1 & 1 & \cdots & 0
\end{vmatrix} = x^n\det(J-I)$$

where $J$ is the matrix with all entries equal to $1$. We know that $J$ has eigenvalues $0,0, \ldots, 0, n$ with multiplicity. Indeed, the respective basis of eigenvectors are $$e_2-e_1, e_3-e_2,\ldots, e_n-e_{n-1}, e_1+e_2+\cdots+e_n.$$The matrix $J-I$ therefore has eigenvalues $-1,-1, \ldots, -1, n-1$ with multiplicity. Determinant is the product of eigenvalues so $$\det(J-I)=(-1)^{n-1}(n-1)$$

We conclude $D_n = (-1)^{n-1}(n-1)x^{n-2}$.


问:
Looking for a function that approximates a parabola
I have a shape that is defined by a parabola in a certain range, and a horizontal line outside of that range (see red in figure).

I am looking for a single differentiable, without absolute values, non-piecewise, and continuous function that can approximate that shape. I tried a Gaussian-like function (blue), which works well around the maximum, but is too large at the edges. Is there a way to make the blue function more like the red function? Or, is there another function that can do this?

答:
I would suggest just approximating the $\max(0,\cdot)$ function, and then using that to implement $\max(0,1-x^2)$. This is a very well-studied problem, since $\max(0,\cdot)$ is the relu function which is currently ubiquitous in machine learning applications. One possibility is
$$
  \max(0,y) \approx \mu(w)(y) = \frac{y}2 + \sqrt{\frac{y^2}4 + w}
$$

One way of deriving this formula: it's the positive-range inverse of $x\mapsto x-\tfrac{w}x$.

Then, composed with the quadratic, this looks thus:

Notice how unlike Calvin Khor's suggestions, this avoids ever going negative, and is easier to adopt to other parabolas.

Nathaniel remarks that this approach does not preserve the height of the peak. I don't know if that matters at all – but if it does, the simplest fix is to just rescale the function with a constant factor. That requires however knowing the actual maximum of the parabola itself (in my case, 1).

To get an even better match to the original peak, you can define a version of $\mu$ whose first two Taylor coefficients around 1 are both 1 (i.e. like the identity), by rescaling both the result and the input (this exploits the chain rule):
$$\begin{align}
     \mu_{1(1)}(w,y) :=& \frac{\mu(w,y)}{\mu(1)}
 \\  \mu_{2(1)}(w,y) :=& \mu_{1(1)}\left(w, 1 + \frac{y - 1}{\mu'_{1(1)}(w,1)}\right)
\end{align}$$

And with that, this is your result:

The nice thing about this is that Taylor expansion around 0 will give you back the exact original (un-restricted) parabola.

Source code (Haskell with dynamic-plot):

```<code>import Graphics.Dynamic.Plot.R2
import Text.Printf

μ₁₁, μ₁₁', μ₂₁ :: Double -> Double -> Double
μ₁₁ w y = (y + sqrt (y^2 + 4*w))
             / (1 + sqrt(1 + 4*w))
μ₁₁' w y = (1 + y / sqrt (y^2 + 4*w))
             / (1 + sqrt(1 + 4*w))
μ₂₁ w y = μ₁₁ w $ 1 + (y-1) / μ₁₁' w 1

q :: Double -> Double
q x = 1 - x^2

main :: IO ()
main = do
 plotWindow
  [ plotLatest [ plot [ legendName (printf "μ₂₍₁₎(w,q(x))")
                         . continFnPlot <span class="math-container">$ μ₂₁ w . q
                      , legendName (printf "w = %.2g" w) mempty
                      ]
               | w <- (^1500).recip<$</span>>[1,1+3e-5..]]
  , legendName "max(0,q x)" . continFnPlot
       $ max 0 . q, xAxisLabel "x"
  , yInterval (0,1.5)
  , xInterval (-1.3,1.3) ]
 return ()
</code>```

Body:
I would suggest just approximating the $\max(0,\cdot)$ function, and then using that to implement $\max(0,1-x^2)$. This is a very well-studied problem, since $\max(0,\cdot)$ is the relu function which is currently ubiquitous in machine learning applications. One possibility is
$$
  \max(0,y) \approx \mu(w)(y) = \frac{y}2 + \sqrt{\frac{y^2}4 + w}
$$

One way of deriving this formula: it's the positive-range inverse of $x\mapsto x-\tfrac{w}x$.

Then, composed with the quadratic, this looks thus:

Notice how unlike Calvin Khor's suggestions, this avoids ever going negative, and is easier to adopt to other parabolas.

Nathaniel remarks that this approach does not preserve the height of the peak. I don't know if that matters at all – but if it does, the simplest fix is to just rescale the function with a constant factor. That requires however knowing the actual maximum of the parabola itself (in my case, 1).

To get an even better match to the original peak, you can define a version of $\mu$ whose first two Taylor coefficients around 1 are both 1 (i.e. like the identity), by rescaling both the result and the input (this exploits the chain rule):
$$\begin{align}
     \mu_{1(1)}(w,y) :=& \frac{\mu(w,y)}{\mu(1)}
 \\  \mu_{2(1)}(w,y) :=& \mu_{1(1)}\left(w, 1 + \frac{y - 1}{\mu'_{1(1)}(w,1)}\right)
\end{align}$$

And with that, this is your result:

The nice thing about this is that Taylor expansion around 0 will give you back the exact original (un-restricted) parabola.

Source code (Haskell with dynamic-plot):

import Graphics.Dynamic.Plot.R2
import Text.Printf

μ₁₁, μ₁₁', μ₂₁ :: Double -> Double -> Double
μ₁₁ w y = (y + sqrt (y^2 + 4*w))
             / (1 + sqrt(1 + 4*w))
μ₁₁' w y = (1 + y / sqrt (y^2 + 4*w))
             / (1 + sqrt(1 + 4*w))
μ₂₁ w y = μ₁₁ w $ 1 + (y-1) / μ₁₁' w 1

q :: Double -> Double
q x = 1 - x^2

main :: IO ()
main = do
 plotWindow
  [ plotLatest [ plot [ legendName (printf "μ₂₍₁₎(w,q(x))")
                         . continFnPlot $ μ₂₁ w . q
                      , legendName (printf "w = %.2g" w) mempty
                      ]
               | w <- (^1500).recip<$>[1,1+3e-5..]]
  , legendName "max(0,q x)" . continFnPlot
       $ max 0 . q, xAxisLabel "x"
  , yInterval (0,1.5)
  , xInterval (-1.3,1.3) ]
 return ()


问:
Need explanation on the solution of a combinatorics problem involving squares with parallel sides
Let a finite number of squares with parallel sides in the plane, such that if any $k+1$ squares are chosen, then there exist $2$ intersecting squares among them. Prove that the squares can be grouped into $2k-1$ sets such that any two squares in the same set intersect.

I found this problem on AOPS, but I couldn't understand the solution.

https://artofproblemsolving.com/community/q1h1805602p12209708

This is the link. I couldn't understand properly why "Squares that do intersect with $ABCD$ either contains point $B$ or point $C$ or both." (as it is written in the last comment to the post). Can you please enlighten me? Or if the problem is wrong, could you please help me with a counterexample? Thank you so much!

Need counterexample on a combinatorics problem

答:
There is the additional assumption in the question as posed on AoPS that the squares are all congruent; without loss of generality we may take the side length as $1$. $ABCD$ is, in the solution provided there, (one of) the leftmost squares in the collection; say that its lower-left corner has coordinates $(x,y)$. Then any square $S$ intersecting $ABCD$ must have lower-left corner $(u,v)$ where $x\le u\le x+1$ (since $ABCD$ is the leftmost square) and $y-1\le v\le y+1$.

It is easy to show that if $y-1\le v\le y$ then $S$ contains $C$; if $y\le v\le y+1$ then $S$ contains $B$. Thus $S$ will always contain at least one of $B$ and $C$.


问:
Looking for a source of an infinite trigonometric summation and other such examples.
Question:

If $x \neq 0$, then prove that  $\displaystyle \sum_{n=1}^{\infty}\dfrac1{2^n} \tan\left(\dfrac{x}{2^n}\right) = \dfrac1{x} - \cot x.$

My answer:

I proved this result by using the following identity:

$$ \prod_{k=1}^n \cos\left(\frac{x}{2^k}\right) = \frac{\sin x}{2^n\sin \frac{x}{2^n}}$$

I took natural log on both sides of the above equation and then differentiated both sides to get

$$\sum_{k=1}^n \frac1{2^k} \tan\left(\frac{x}{2^k}\right) = \frac{1}{2^n}\cot \left(\frac{x}{2^n}\right) - \cot x.$$

Now taking the limit of $n$ to $\infty$ I get the required identity. $\blacksquare$

I have never seen the above identity before in my life. I was amused and surprised by this identity. That's because I have never seen an infinite trig series summing up to a rational function like $\dfrac1{x}$ before.

So my questions are the following:

A) First of all, is my derivation correct? Secondly, does anyone know a source for this problem?

B) Are there other 'elementary 'derivations that have an infinite trig series on one side and a rational function on the other?  [I say 'elementary' to avoid Fourier series. I am guessing Fourier series must be full of such results.]

答:
HINT:
Use $$\cot y-\tan y=\frac{\cos^2yx-\sin^2y}{\sin y\cos y}=2\frac{\cos2y}{2\sin y\cos y}=2\frac{\cos2y}{\sin2y}=2\cot2y$$

$$\iff \tan y=\cot y-2\cot2y $$

Putting  $y=\frac x2,\frac x{2^2},\frac x{2^3}\cdots$

$\tan \frac x2=\cot \frac x2-2\cot x $

$\tan \frac x{2^2}=\cot \frac x{2^2}-2\cot \frac x2 $

$\tan \frac x{2^3}=\cot \frac x{2^3}-2\cot \frac x{2^2} $

etc

$$\sum_{1\le r\le n} \frac1{2^r}\tan \frac x{2^r}=\frac 1{2^{n+1}}\cot \frac x{2^{n+1}}-\cot x$$

Now, putting $\frac1{2^{n+1}}=h,$ $$\lim_{n\to\infty}\frac 1{2^{n+1}}\cot \frac x{2^{n+1}}=\lim_{h\to0}\cos hx\cdot\lim_{h\to0}\frac{hx}{\sin hx}\cdot \frac1x=\frac1x$$


问:
Injectivity of affine function
Let $T(x)=Ax + b$, suppose that $T$ is injective and have strictly positive values (ie values in the first orthant).  Then, must $T$ be constant?

I was thinking of somehow using the unboundedness and the analyticity of $T$ that, up to a shift, $T$ has to be identical $0$ on a set connected open subset of its domain.  However, this is as far as I've gotten, and I'm not sure the claim is true.

答:
Unless the original space is zero-dimension, $T$ can't be injective if it has strictly positive values.

Assume $A \neq 0$. Then for some $i$, $j$, $a_{ij} \neq 0$. Then $T(\lambda e_i)_j = a_{ij}\lambda + b_j$ is a non-constant linear function of $\lambda$. Taing $\lambda = {-b_j - 1}{a_{ij}}$ we get $T(\lambda e_i)_j = -1$ - thus $T$ doesn't have strictly posiitve values.

And if $A = 0$ then of course $T$ is constant.

Title: Injectivity of affine function


问:
Points $A,B,C$ lie on a circle with center $O$, radius $7$. The perpendicular bisector of $AB$ meets $BC$ at $P$ and $AC$ at $Q$. Find $OP \cdot OQ$

Points $A,B,C$ lie on a circle centered at $O$ with radius $7$. The perpendicular bisector of $AB$ meets $BC$ at $P$ and $AC$ at $Q$. Find $OP \cdot OQ$ .

What I Tried: Here is a picture :-

I thought about using Power of a Point but that did not help since $S$ does not lie on the circumference of the circle. The only information known is that the radius equals $7$, so I cannot use Pythagorean Theorem either. Joining $OA$,$OB$,$AP$ gives some congruent triangles, but I did not find a good way to use them.

Can anyone help me? Thank You.

答:
Check that $\angle PCO = 90-A$. Also $\angle AQP = 90-A$.

Thus $OC$ is tangent to circumcircle of $\triangle PCQ$ (by converse of alternate segment theorem).

So by power of point, $$OP \cdot OQ = OC^2 = r^2$$

Edit :

$\angle COA = 2B \Rightarrow \angle ACO = 90-B$

$\angle PCO = C - (90-B)=90-A$


问:
Finding the $p$-value from Bernoulli hypothesis test
So I'm told that $X_i \sim Bern(p)$, $Y = \sum_{i=1}^N X_i$ and $H_0: p \geq 0.5$ vs $H_1: p < 0.5$ with $\alpha = 0.05$.

I have to find the $p$-value at $n=30$ and $y=5$.

I'm not sure if this correct, but I figured the $p$-value was simply:

$$P(Y \leq 5) = \sum_{i=1}^5 \binom{30}{y}(0.5)^y (0.5)^{30-y}$$
which works out to be $0.00016$.

If this is correct, then why have I been given $\alpha$?

答:
The p-value you calculated is correct. $\alpha=5\%$ is given to compare the p-value you found with it.

As $p_{value}<\alpha$ you reject $H_0$


问:
How do I write a vector as the sum of a vector in two subspaces?

How do I write vector y as the sum of a vector in each subspace?

I confirmed that the subspaces are orthogonal and any two vectors out of the 4 are orthogonal to each other.

So then I did this:

$$\frac{y\cdot v_1}{\left(v_1\right)^2}\left[v_1\right]+\frac{y\cdot \:v_3}{\left(v_3\right)^2}\left[v_3\right]$$

Which is:

$$\frac{8}{3}\left(1,0,1,1\right)+-\frac{2}{44}\left(1,0,-1,0\right)$$

So I add them and get:

$$\left(\frac{173}{66},0,\frac{179}{66},0\right)$$

Which is the completely wrong answer:

I'm not sure how they got that answer. Any ideas? Thanks in advance.

答:
I'm not sure where you got

$$\frac{y\cdot v_1}{\left(v_1\right)^2}\left[v_1\right]+\frac{y\cdot \:v_3}{\left(v_3\right)^2}\left[v_3\right]$$

from.

You should calculate

$$w_1 = \frac{y\cdot v_1}{\left(v_1\right)^2}\left[v_1\right]+\frac{y\cdot \:v_2}{\left(v_2\right)^2}\left[v_2\right] \in W_1$$

and

$$w_2 = \frac{y\cdot v_3}{\left(v_3\right)^2}\left[v_3\right]+\frac{y\cdot \:v_4}{\left(v_4\right)^2}\left[v_4\right] \in W_2$$

and then you should have $y = w_1 + w_2$.

What you are doing is finding the projection of $y$ onto $W_1$ and $W_2$. And when you have an orthorgonal basis for a subspace with $n$ vectors, you compute the projection onto that subspace by summing $n$ terms that look like $\frac{y\cdot v_i}{\left(v_i\right)^2}\left[v_i\right]$.


问:
Prove by definition that $H_a$ is a Group
I've got this question about groups, I know all definitions of a group that it has to be (Closure, Associativity,   Identity and Inverse), but I have no clue how to start this question. I'll be happy if someone could help.

Let $〈G,*〉$ be a group and $a\in G$, let $H_a=\{a*g*a^{-1} \mid g\in G\}$.

Prove by definition that $H_a$ is a group.

答:
Fix $a\in G$.

Observe that associativity in $H_a$ is inherited from $G$.

Since $e\in G$, we have $a\ast e\ast a^{-1}=a\ast a^{-1}=e\in H_a$.

Let $x=a\ast g\ast a^{-1}, y=a\ast h\ast a^{-1}\in H_a$. Then

$$\begin{align}
x\ast y&=(a\ast g\ast a^{-1})\ast (a\ast h\ast a^{-1})\\
&=a\ast g\ast (a^{-1}\ast a)\ast h\ast a^{-1}\\
&=a\ast g\ast e\ast h\ast a^{-1}\\
&=a\ast (g\ast h)\ast a^{-1}.
\end{align} $$

But $g\ast h\in G$ since $G$ is closed. Hence $x\ast y\in H_a$. Hence $H_a$ is closed.

Consider $x$ as an element of $G$. We have, by the inverse of a product, that

$$\begin{align}
x^{-1}&=(a\ast g\ast a^{-1})^{-1}\\
&=(a^{-1})^{-1}\ast g^{-1}\ast a^{-1}\\
&=a\ast g^{-1}\ast a^{-1},
\end{align}$$

because the inverse of an inverse is the original element. But $g^{-1}\in G$ as $G$ is a group. Hence $x^{-1}\in H_a$. Hence $H_a$ has inverses, which are simply the inverses of each element when considered as an element of $G$.

Hence $H_a$ is a group by definition.


问:
Is there $m,n \in \mathbb Z$ satisfies $m \arctan \frac{1}{2}+n \arctan \frac{1}{5}=\frac{\pi}{4}$?
I know that $\arctan \frac{1}{2}+\arctan \frac{1}{3}=\frac{\pi}{4}$ and $2\arctan \frac{1}{2}-\arctan \frac{1}{7}=\frac{\pi}{4}$.

Is there $m,n \in \mathbb Z$ satisfies $m \arctan \frac{1}{2}+n \arctan \frac{1}{5}=\frac{\pi}{4}$?

答:
Størmer in 1899 (see also Wikipedia's section on this) showed that there are only four two-term Machin-like formulas with unit numerators for arctangent arguments:

the two identities you listed

the identity listed in comments (Machin's classic one)

$2\tan^{-1}\frac13+\tan^{-1}\frac17=\frac\pi4$

So $m\tan^{-1}\frac12+n\tan^{-1}\frac15=\frac\pi4$ has no solution in integers, or even rational numbers.


答:
Note
$$\angle OCP = \frac{180 - \angle BOC }2 = 90 - \angle A = \angle Q$$

Thus, the triangles COP and COQ are similar, yielding

$$OP\cdot OQ = OC^2 =49$$

Title: Points $A,B,C$ lie on a circle with center $O$, radius $7$. The perpendicular bisector of $AB$ meets $BC$ at $P$ and $AC$ at $Q$. Find $OP \cdot OQ$

Body:
Points $A,B,C$ lie on a circle centered at $O$ with radius $7$. The perpendicular bisector of $AB$ meets $BC$ at $P$ and $AC$ at $Q$. Find $OP \cdot OQ$ .

What I Tried: Here is a picture :-

I thought about using Power of a Point but that did not help since $S$ does not lie on the circumference of the circle. The only information known is that the radius equals $7$, so I cannot use Pythagorean Theorem either. Joining $OA$,$OB$,$AP$ gives some congruent triangles, but I did not find a good way to use them.

Can anyone help me? Thank You.


问:
What is the minimal value of n such that the symmetric group Sn that contains an even permutation of order 312?
What is the minimal value of $n$  such that the symmetric group $S_n$ contains an even permutation of order 312?

what I know:
There is an 8-cycle, a 3-cycle and a 13-cycle.
Any help would be appreciated.

答:
Order of permutation is least common multiplier of lengths of it's cycles, and as permutation is even, it has even number of cycles of odd length. $n$ is sum of length of cycles, so we want to make this sum as small as possible.

Can we have cycle of length $pq$ where $p$ and $q$ are coprime numbers greater than $1$?  No - if we replace it with cycles of length $p$ and $q$, we don't change parity nor order of permutation, but reduce it's length - assume $p > q$ and write $p + q = p \cdot (1 + \frac{q}{p}) < p \cdot 2 \leq p \cdot q$. So lengths of all cycles should be powers of primes.

As $312 = 2^3 \cdot 3 \cdot 13$, we need cycles of lengths $2^3$, $3$ and $13$. But we need an even number of cycles of even length, so we need at least one more cycle of even length. It can't have length less than $2$, so $n$ is at least $2^3 + 3 + 13 + 2$. And this is enough.


问:
True or False statements of Splitting Fields
Verify if the following statements is true or false:

A: The splitting field of $X^2-X-1$ is equal to $\mathbb{Q}[\sqrt{5}]$

B: The splitting field of $X^4-5$ is equal to $\mathbb{Q}[\sqrt[4]{5}]$

What have I tried so far?

I have factorised A to give the splitting field $\mathbb{Q}[\frac{1+\sqrt{5}}{2},\frac{1-\sqrt{5}}{2}]$

And for B we get $\sqrt[4]{5}$

Hence I think A is false and B is true.

答: For A: $\Bbb Q[\sqrt 5] = \Bbb Q[\frac{1+\sqrt 5}{2}, \frac{1-\sqrt 5}{2}]$, since $\sqrt 5$ is in $\Bbb Q[\frac{1+\sqrt 5}{2}, \frac{1-\sqrt 5}{2}]$ and $\frac{1\pm\sqrt 5}{2}$ are in $\Bbb Q[\sqrt 5]$.


问:
How to calculate the Fourier transform of the Kaiser-Bessel window?
According to Wikipedia: https://en.wikipedia.org/wiki/Kaiser_window, the Fourier transform of the Kaiser-Bessel window

$w_0(x) :=  \left\{ \begin{array}{**lr**} \frac{I_0(\pi \alpha \sqrt{1-{(2x/L)}^2})}{I_0(\pi \alpha)}, &  |x| \leq \frac{L}{2}\\
             0, & |x| > \frac{L}{2}\\
             \end{array} \right.  $

is

$W(f) := \frac{L\cdot \sinh(\pi\alpha\sqrt{1-(Lf/\alpha)^2})}{I_0(\pi\alpha) \cdot \pi\alpha\sqrt{1-(Lf/\alpha)^2}}$,

where $I_0(x) := \sum\limits_{m=0}^{\infty}\frac{1}{(m!)^2}(\frac{x}{2})^{2m}$ is the zeroth-order modified Bessel function of the first kind (https://en.wikipedia.org/wiki/Bessel_function#Modified_Bessel_functions:_I%CE%B1,_K%CE%B1).

I have made many attempts but fail to deduce the closed-form solution of the Fourier transform of the Kaiser-Bessel window. First, I tried to expand $I_0(x)$, which was quite difficult to calculate since it involved infinite series. Second,  I tried to calculate the Fourier transform from the opposite side, i.e., $W(f)$, but got no result. Finally, I tried to use Mathematica Professional 12, but it failed to offer a result after long time calculation.

I have also found some literature online, e.g.,

[1] On the use of the I0-sinh window for spectrum analysis, IEEE Transactions on Acoustics, Speech, and Signal Processing, J. Kaiser, R. Schafer, 1980, doi: 10.1109/TASSP.1980.1163349.

[2] On the use of windows for harmonic analysis with the discrete Fourier transform, Proceedings of the IEEE, F.J. Harris, 1978, doi: 10.1109/PROC.1978.10837.

[3] https://www.dsprelated.com/freebooks/sasp/Kaiser_Window.html

[4] Verification of Fourier transformation of Io-sinh function (MathStackExchange; No answer yet).

Neither of them deduces the closed form of the Fourier transform of the Kaiser-Bessel window. Some references, e.g., [1] and [3], point to an old unavailable book named "System Analysis by Digital Computer". Kaiser-Bessel window is a widely used window function in signal processing. However, it is really difficult to find relevant literature online. Additionally, I am not sure whether the Fourier transform provided in  https://en.wikipedia.org/wiki/Kaiser_window is a closed-form or an approximation. I deeply appreciate your help or hints.

答:
Using a parity property, the Fourier integral can be written as
\begin{equation}
 K=\frac{2}{I_0(\pi\alpha)}\int_0^{L/2}I_0\left(\pi \alpha \sqrt{1-{(2x/L)}^2}\right)\cos(2\pi fx)\,dx
\end{equation}
We use the quoted series expansion for the modified Bessel function to obtain after swaping integration and summation
\begin{align}
 K&=\frac{2}{I_0(\pi\alpha)}\sum_{m=0}^\infty \frac{1}{(m!)^2}\left( \frac{\pi \alpha}{2} \right)^{2m}\int_0^{L/2}\left( 1-(2x/L)^2 \right)^{m}\cos(2\pi fx)\,dx\\
 &=\frac{L}{I_0(\pi\alpha)}\sum_{m=0}^\infty \frac{1}{(m!)^2}\left( \frac{\pi \alpha}{2} \right)^{2m}\int_0^1\left( 1-t^2 \right)^{m}\cos(t\pi fL)\,dt
\end{align}
This cosine transform is tabulated in Ederlyi (TI 1.3.8) or can be related to an integral representation of the Bessel function:
\begin{equation}
 J_{\nu}\left(z\right)=\frac{2(\tfrac{1}{2}z)^{\nu}}{\pi^{\frac{1}{2}}%
\Gamma\left(\nu+\tfrac{1}{2}\right)}\int_{0}^{1}(1-t^{2})^{\nu-\frac{1}{2}}%
\cos\left(zt\right)\mathrm{d}t
\end{equation}
With $\nu=m+1/2,z=\pi fL$ one obtains
\begin{equation}
 \int_0^1\left( 1-t^2 \right)^{m}\cos(t\pi fL)\,dt=m!\sqrt{\pi}2^{-m+1/2}(\pi fL)^{-m-1/2}J_{m+1/2}(\pi f L)
\end{equation}
Then, after some simplifications,
\begin{equation}
 K=\frac{L}{I_0(\pi\alpha)\sqrt{2fL}}\sum_{m=0}^\infty \frac{1}{m!}\left( \pi \alpha\right)^{2m}2^{-m}(\pi fL)^{-m}J_{m+1/2}(\pi f L)
\end{equation}
Such a series looks similar to the multiplication theorem for the Bessel functions:
\begin{equation}
J_{\nu}\left(\lambda Z\right)=\lambda^{\nu}\sum_{m=0}^{\infty}%
\frac{(- 1)^{m}(\lambda^{2}-1)^{m}(\tfrac{1}{2}Z)^{m}}{m!}J_{\nu+ m}\left(Z\right)
\end{equation}
which is valid for any complex value of $\lambda$. We use $\nu=1/2,Z=\pi fL$ and $\lambda=\sqrt{1-\frac{\alpha^2}{f^2L^2}}$ with $\Im\lambda\ge0$ to write
\begin{equation}
 K=\frac{L}{I_0(\pi\alpha)\sqrt{2fL}}\frac{1}{\left( 1-\frac{\alpha^2}{f^2L^2} \right)^{1/4}}J_{1/2}\left( \pi fL\sqrt{1-\frac{\alpha^2}{f^2L^2}} \right)
\end{equation}
and with the explicit expression for $J_{1/2}$,
\begin{equation}
  K=\frac{L}{I_0(\pi\alpha)}\frac{\sin\left( \pi\sqrt{f^2L^2-\alpha^2} \right)}{\pi\sqrt{f^2L^2-\alpha^2} }
\end{equation}
which is valid for all the values of $f$. In particular, for $f<\alpha/L$, it is convenient to write the above expression as
\begin{equation}
   K=\frac{L}{I_0(\pi\alpha)}\frac{\sinh\left( \pi\alpha\sqrt{1-f^2L^2/\alpha^2} \right)}{\pi\alpha\sqrt{1-f^2L^2/\alpha^2} }
\end{equation}
which is the proposed expression for the Fourier transform.


问:
Constructive logic and Russell's paradox
To show that "naive set theory" doesn't work, Russell devised the famous example of the set $$A := \{ x \ | \ x  \not\in x \},$$ which turns out can't be a set after all, because either

$A \in A$, but then by the property of all members of $A$ it follows that $A \not\in A$

$A \not\in A$, but then again $A$ has to be a member of $A$, so $A \in A$.

Since both of these options yield a contradiction, $A$ can't be a set. But as I understand the whole premise of constructive logic is that it isn't valid to assume that either $A \in A$ or $A \not\in A$ has to hold.

On the other hand, by the above we have shown that $A \in A \iff A \not\in A$, which even in constructive logic can't hold.

So is Russell's paradox valid in constructive logic?

答:
You can formulate the proof constructively as follows.  Suppose $A\in A$.  Then by definition of $A$, we conclude that $\neg(A\in A)$, which is a contradiction.  Since the assumption $A\in A$ led to a contradiction, we conclude $\neg(A\in A)$ (note that this is still valid constructively--constructively, $\neg p$ means the same thing as $p\rightarrow\bot$).

But now since $\neg(A\in A)$, the definition of $A$ implies that $A\in A$.  Thus we have reached a contradiction.


问:
Compounding probability (independent and non independent) for winning team
right now I'm trying to understand and solve this question for the practice purpose to learn the compounding probability and I'm kinda stuck to solve these 2 questions. Any advice and way to solve it is really welcome

You would like to bet on who will win upcoming football match between 2 teams. You have 3 experts giving their prediction on who will win the match. Each expert has probability 0.6 that he will be right. You will decide who to bet on based on poll from the experts (you will bet on team whom 2 or 3 experts say will win). Under assumptions that the experts’ opinions are independent what is the probability that you will win your bet

You would like to bet on who will win upcoming football match between 2 teams. You have 3 experts giving their prediction on who will win the match. Each expert has probability 0.6 that he will be right. You will decide who to bet on based on poll from the experts (you will bet on team whom 2 or 3 experts say will win). Under assumptions that the experts’ opinions are not independent what is the probability that you will win your bet

Edit:
(For the first question) I have tried to separate the calculation to find the probability of 2 experts say win + (because the or statement) the probability of 3 experts say win but I'm stuck how to calculate the probability of 2 experts and 3 experts say win. Is that I need to use some sort of combination technique?

答:
In the first case, the probability that all $3$ experts are right is $.6^3=.216$.  The probability that exactly $2$ are right is $3\cdot.4\cdot.6^2=.432$, because there are $3$ ways to pick the expert who is wrong.  The probability of success is $.216+.432=.648$

It's not possible to answer the second question without more information.  For example, if all three experts always say the say thing, then the probability of success is $.6$, but if they don't always say the same thing, then it's something else, but we don't know what it is unless we know how the opinions depend on one another.


问:
What are the rules for changing indexes and powers in a series?
My TA told me that when I want to change indexes in a series, I can make a substitution just like when I'm doing integral by substitution. But I think I have encountered some cases where this goes wrong. So can anybody tell me what substitutions are allowed if I want to rewrite a series?

As an example, if I have a geometric series:
$$
\sum_{n=2}^{\infty} z^{n-2}=\sum_{k=0}^{\infty} z^{k}
$$
I can change the index and power by substituting k=n-2 and change the limits correspondingly. This substitution is valid.

But If you instead consider a power series of the form:
$$
\sum_{n=0}^{\infty} c_{n} x^{2 n+1} \neq \sum_{k=1}^{\infty} c_{\frac{k-1}{2}} x^{k}
$$
I believe it's generally untrue, that I can just substitute $k=2n+1$, so $n=(k-1)/2$.

A specific case where I think this is wrong is this series, which I tried to rewrite:
$$\sum_{n=0}^{\infty}(-1)^{n} \frac{x^{2 n}}{(2 n) !}= \sum_{k=0}^{\infty}(-1)^{k / 2} \frac{x^{k}}{k !}=\sum_{k=0}^{\infty} \frac{i^{k} x^{k}}{k !}$$
With k=2n.
But I'm pretty certain that the equal sign is wrong (since the first is the cosine series, and the second is some complex series), and thus what my TA told me must be wrong?

The reason why I wanted to learn how to rewrite the series, is that I often have formulas, that only work for specific expressions. For example the sum of a geometric series, or how to find the radius of convergence:

Theorem: Let $\sum_{n=0}^{\infty} a_{n} x^{n}$ Be a power series. The limit
$$
R=\lim _{n \rightarrow \infty}\left|\frac{a_{n}}{a_{n+1}}\right|
$$ is the radius of convergence for the series.

答:
The issue lies in the meaning of the symbol $\sum_{k=a}^\infty$. It means that, in the sum, $k$ takes each of the values $a,a+1,a+2,a+3,...$. If you make a transformation like $n=2k+1$, say with the initial index value  $a=1$, the symbolism doesn't work any more. The first index value can be changed, correctly, to $n=3$, but then already the next index value is wrong: It should be $n=5$, but the summation symbol $\sum_{n=3}^\infty$ makes the next index value $4$ (for which there is no corresponding $k$ value).

The rule is: the summation variable can be changed by a simple shift (e.g. $n=k-1$ or $j=k+2$), when only the first (and perhaps the  last) index values have to be taken care of. Any transformation involving scaling, if possible at all, needs special treatment—for example, dividing the series into sums of odd-indexed and even-indexed terms.


问:
Guides/tutorials to learn abstract algebra?
I recently read up a bit on symmetry groups and was interested by how they apply to even the Rubik's cube. I'm also intrigued by how group theory helps prove that "polynomials of degree $\gt4$ are not generally solvable".
I love set theory and stuff, but I'd like to learn something else of a similar type. Learning about groups, rings, fields and what-have-you seems like an obvious choice.

Could anyone recommend any informal guides to abstract algebra that are written in (at least moderately) comprehensible language? (PDFs etc. would also be nice)

答:
Nathan Carter's Visual Group Theory.

Janet Chen's Group Theory and the Rubik's Cube.
(Available for free but a little more formal)

Wildberger's Informal Introduction to Abstract Algebra.

This question may help you to find out on the unsolvability of polynomials of degrees higher than 4.

Avner Ash's Fearless Symmetry: Perhaps this may be of interest to you, at the end of the chapter 1, the author states: [...] our goal:
mod p linear representations of Galois groups. We explain how
these representations help to clarify the general problem of solving
systems of polynomial equations with integer coefﬁcients, and how
they can sometimes lead to deﬁnitive results in this area.

This is the most informal and written in a moderately comprehensive references I can remember - but you didn't tell us how informal or how comprehensible the references should be, If you can provide us a example book of what should be informal and comprehensible, I can add a little more to the list.


问:
Solving for point P within the edge AC, given points A, B and C, and length from B to P?

(EDIT: one of the comments noted that AC is too short in the image, this is completely my fault for not checking before rounding, therefor replace the magnitude of AC to, say 10)

So given points A B and C we can calculate the magnitudes of AB, AC, and CB, and
we know there is a point in the line of AC that has the distance of, say 60 like in the image,
to the point B. What are the necessary steps to solve for point P?

答:
The 'basic triangle calculus' you are referring to are the Law of Sines and Cosines. In this particular example, we apply the Law of Cosines twice. We have:

$$AB^2 = AC^2+CB^2-2AC\cdot CB \cos\angle ACB$$

which gives

$$\cos \angle ACB = \frac {10^2+58^2-61^2}{2\cdot10\cdot58}=-\frac {257}{1160}$$

Now we also have from Law of Cosines:

$$BP^2 = PC^2+CB^2-2PC\cdot CB\cos\angle ACB$$

with $BP=60, BC =58$, the equation above is just a quadratic equation in $PC$, which we can solve by the quadratic formula. Here is WolframAlpha taking a crack at it.


问:
Difference between $O(|V|+|E|)$ and $O(V+E)$
From CLRS:

Given an adjacency-list representation of a multigraph $G = (V,E)$, describe an $O(V + E)$ time algorithm ...

I am struggling to understand what $O(V+E)$ means. Is it supposed to be $O(|V|+|E|)$, or maybe it's referring to the union of the two sets? Am I missing something?

答: Consider $O(V+E)$ just an abbreviation for $O(|V|+|E|)$. There is no possible confusion since, in this context, the operand of $O(\cdot)$ is supposed to be a function $\mathbb N \to \mathbb N$, not a set.


问:
Normal Hall subgroups of $M$-groups are $M$-groups.
Dornhoff proved this theorem(Theorem 4.1. on page 250) in the paper https://link.springer.com/article/10.1007/BF01109806.

The first few lines of the proof go as follows:

On the contrary, assume $G\triangleleft M$, where $M$ is an $M$-group and $G$ is a normal Hall subgroup of $M$, and $\theta$, an irreducible character of $G$, is not monomial. Clifford's Theorem tells us that $(\theta^M)_G=k(\theta_1+\cdots+\theta_l)$, $\theta_1=\theta$, the $\theta_i$ distinct irreducible characters of $G$, $kl=|M:G|$, $k=((\theta^M)_G,\theta)=(\theta^M,\theta^M)$.

Question:

I do not understand why we can apply the Clifford's theorem in this way, namely, the Clifford's theorem deals with the restriction of an irreducible character to some normal subgroup. But $\theta^M$ is not guaranteed to be irreducible in $M$ above. Then how can we still apply the Clifford's theorem in this case? Also, why is $kl=|M:G|$? $l$ should equal the index of the inertia subgroup of $\theta$ in $M$, so equivalently, why does $k$ equal the index of $G$ in the inertia subgroup of $\theta$ in $M$?

Edit: I am trying to prove this theorem with the ideas from the original proof but using Clifford's theorem in a different way with the author.

Suppose $N$ is a normal Hall subgroup of the $M$-group $G$. Let $\theta\in Irr(N)$, we want to show that $\theta$ is monomial.

Let $T=I_G(\theta)\supseteq N$ be the inertia subgroup of $\theta$ in $G$, then $\theta$ is invariant in $T$. Moreover, $N$ is a normal Hall subgroup of $T$ since $\gcd(|N|,|G/N|)=1$ and $|T/N|\mid |G/N|$. By Theorem 6 of Gallagher, $\theta$ extends to an irreducible character of $T$, i.e., $\theta=\chi|_N$ for some $\chi\in Irr(T)$.

By theorem 6.11 of Isaacs's character theory of representation theory, we know that $\chi^G\in Irr(G)$ and $$ 1=(\theta,\theta)_N=(\chi|_N,\theta)_N=((\chi^G)|_N,\theta)_N $$

Note that
$$((\chi^G)|_N,\theta_i)_N=((\chi^G)|_N,\theta)_N=1, \quad i=1,...,|G:T|\text{ and }\theta_1=\theta$$
where $\theta_i$'s are all the distinct conjugate of $\theta$. By Clifford's theorem, we know that $$(\chi^G)|_N=\sum_{i=1}^{|G:T|}\theta_i.$$

Since $\chi^G\in Irr(G)$, it is monomial, say $\chi^G=\lambda^G$ where $\lambda\in Irr(H)$ for some $H\le G$ and $\lambda(1)=1$. Consider
$$ (\lambda^{NH})|_N=(\lambda|_{N\cap H})^N. $$

(Not finished)

By the Schur–Zassenhaus theorem, we can write $G=NH$. If we can always take $H$ to be the complement of $N$, I think we will be done.

答:
You need the following lemmata.

(I urge you to draw a diagram to depict the different groups and characters.)

Lemma 1 Let $H$ and $K$ be subgroups of $G$ and $\varphi$ a character of $H$. Assume that $(\varphi^G)_K \in Irr(K)$. Then $G=HK$.

Proof Put $\varphi^G=\chi$. Observe that since $(\varphi^G)_K$ is irreducible, both $\varphi$ and $\chi$ must be irreducible. Let $\psi \in Irr(H \cap K)$ be an irreducible constituent of $\varphi_{H \cap K}$.
By Frobenius Reciprocity, $\varphi$ must be an irreducible constituent of $\psi^H$, say $\psi^H=a\varphi+\Delta$, with $a$ a positive integer and $\Delta$ a character of $H$ with $[\Delta,\varphi]=0$  or $\Delta=0$. It follows that $\psi^G=(\psi^H)^G=a\varphi^G+\Delta^G=a\chi+\Delta^G$. So again by Frobenius Reciprocity, $[\psi^G,\chi]=[(\psi^K)^G,\chi]=[\psi^K,\chi_K] \geq a.$

On the other hand, $a=[\varphi,\psi^H]=[\varphi_{H \cap K},\psi]$, so $\varphi_{H \cap K}=a\psi+\Gamma$ with $\Gamma$ a character of $H \cap K$ with $[\Gamma,\psi]=0$  or $\Gamma=0$. Hence $(\varphi_{H \cap K})^K=a\psi^K+\Gamma^K$ and it follows that $[(\varphi_{H \cap K})^K, \chi_K]=[a\psi^K+\Gamma^K,\chi_K]=a[\psi^K,\chi_K]+[\Gamma^K,\chi_K] \geq a^2$, by the last formula of the previous paragraph. This means that the irreducible character $\chi_K$ has at least multiplicity $a^2$ as an irreducible constituent of $(\varphi_{H \cap K})^K$. This implies that
$$(\varphi_{H \cap K})^K(1)=\varphi(1)|K:H \cap K| \geq a^2\chi(1) \geq \chi(1)=\varphi(1)|G:H|$$ It follows that $|G| \leq \frac{|H| \cdot |K|}{|H \cap K|}=|HK|$. Hence, $G=HK$, since $HK \subseteq G$ as a set.$\square$

Notes (1) This is Problem(5.7) in Isaacs' book. (2) From the last part of the proof it follows that in fact $a=1$.

Corollary 1 Let $\chi$ be a monomial character of $G$ and suppose that $K \leq G$ with $\chi_K \in Irr(K)$. Then $\chi_K$ is monomial.

Proof We can find an $H \leq G$ and a linear $\lambda \in Irr(H)$ with $\lambda^G=\chi$. Since $\chi_K$ is irreducible, Lemma 1 guarantees that $G=HK$. But then (see Problem(5.2) in Isaacs's CTFG), $\chi_K=(\lambda^G)_K=(\lambda_{H \cap K})^K$, whence $\chi_K$ is monomial.

Lemma 2 Let $N \unlhd G$ with $G/N$ solvable. Let $\vartheta \in Irr(N)$ and $\chi \in Irr(G|\vartheta)$. Then $\frac{\chi(1)}{\vartheta(1)} \mid |G:N|$.

Proof Use induction on $|G:N|$. We can assume that $G/N$ is non-trivial and hence there exists a subgroup $M/N \lhd G/N$ with $|G/N:M/N|=|G:M|=p$, with $p$ a prime. We can choose a $\varphi \in Irr(M)$ lying under $\chi$ and lying above $\vartheta$. By Clifford's Theorem (hence Corollary (6.19) in CTFG) we have either $\chi_M=\varphi$ or $\chi_M=\sum_{i=1}^p \varphi_i$. Hence either $\chi(1)=\varphi(1)$ or $\chi(1)=p\varphi(1)$. By induction in the first case we get $\frac{\varphi(1)}{\vartheta(1)}=\frac{\chi(1)}{\vartheta(1)}  \mid |M:N| \mid |G:N|$. In the latter case $\frac{\chi(1)}{\vartheta(1)}=\frac{\chi(1)}{\varphi(1)} \cdot \frac{\varphi(1)}{\vartheta(1)}=p\frac{\varphi(1)}{\vartheta(1)} \mid p|M:N|=|G:N|$ and the proof is complete.

Note This is Exercise(6.7) in Isaacs' book CTFG.

Corollary 2 Let $N \unlhd G$ with $G/N$ solvable. Let $\chi \in Irr(G)$ with gcd$(\chi(1),|G:N|)=1$, then $\chi_N \in Irr(N)$.

Proof If $\vartheta \in Irr(N)$ lies under $\chi$, then $\frac{\chi(1)}{\vartheta(1)}$ divides both $\chi(1)$ and $|G:N|$. So $\chi(1)=\vartheta(1)$ and by Clifford's Theorem $\chi_N=\vartheta$.

Theorem (L. Dornhoff) Let $G$ be an $M$-group and $N$ a normal Hall-subgroup. Then $N$ is again an $M$-group.

Proof Let $\vartheta \in Irr(N)$ and $\chi \in Irr(G|\vartheta)$. Then there exists an $H \leq G$ and a linear $\lambda \in Irr(H)$ with $\chi=\lambda^G$. Note that $NH$ is a subgroup ($N$ is normal), also $(\lambda^{NH})^G=\lambda^G=\chi$, implying  $\lambda^{NH} \in Irr(NH)$. Now, $\lambda^{HN}(1)=|NH:H|=|N:N \cap H| \mid |N|$. Note $|NH:N| \mid |G:N|$ is relatively prime to $|N|$, so, since $G$ is solvable (Taketa's Theorem), Corollary 2 yields $(\lambda^{NH})_N \in Irr(N)$. Since $(\lambda^{NH})_N=(\lambda_{N \cap H})^N$, it follows that $(\lambda^{NH})_N$ is monomial. Observe that $(\lambda^{NH})_N$ lies under $\lambda^{NH}$ and in its turn, $\lambda^{NH}$ lies under $\chi$. But $\vartheta \in Irr(N)$ and $\vartheta$ lies under $\chi$, so by Clifford's Theorem, $(\lambda^{NH})_N$ and $\vartheta$ are conjugate in $G$. The monomiality of $(\lambda^{NH})_N$ now implies that of $\vartheta$.


问:
Prove via ultraproducts that the class of algebraic extensions is not axiomatisable in the language of rings
My idea was to take the ultraproduct of $Q_n = \mathbb{Q}(\sqrt[n]{2})$ over some non-principal ultrafilter and then let $T_n$ be the  (first-order) sentence "There are at least $n$ linearly independent elements over $\mathbb{Q}$". The ultraproduct is on one hand an algebraic extension of $\mathbb{Q}$ and on the other hand $T_n$ holds for the ultraproduct for each $n$, so it is of infinite degree of extension. Thus the ultraproduct cannot be an algebraic extension. But I found out that there are algebraic extensions of infinite degree, so this doesn't work at all..

Another idea I could use is the fact that algebraic extension of $\mathbb{Q}$ are countable, and then somehow prove that the ultraproduct is uncountable. But I don't know how to do this, or if it is even true.

答:
I will provide a rough proof, but I will leave some of the details to you. I will indicate whenever I skip some details that you should check.

Suppose, for a contradiction, that there is a first-order theory $T$ in the language of rings axiomatising the algebraic extensions of $\mathbb{Q}$.

First we add a constant symbol $c$ to our language. We build a set $\Sigma$ as follows: for every polynomial $P(x)$ with rational coefficients we add a formula $P(c) \neq 0$. Convince yourself that we can indeed write $P(c) \neq 0$ as a first-order formula in the language of rings (with constant symbol $c$).

Now for any finite $\Sigma_0 \subseteq \Sigma$ there is an algebraic extension $F_{\Sigma_0}$ of $\mathbb{Q}$ with an element $a \in F_{\Sigma_0}$ such that $a$ satisfies all the equations in $\Sigma_0$, when we replace the constant symbol $c$ by $a$ (check this). That is, $F_{\Sigma_0}$ together with $c$ interpreted as $a$ is a model of $T \cup \Sigma_0$.

The idea is now to mimic the proof of the compactness theorem. In fact, if you would have the compactness theorem this would be a lot easier, but you asked for a proof using ultraproducts.

Just to show how this would go with compactness.

Theorem (Compactness theorem). A set of first-order sentences $\Gamma$ has a model if and only if every finite subset $\Gamma_0 \subseteq \Gamma$ has a model.

Now the claim would follow because by the above $T \cup \Sigma$ would have a model $M$. But then $M$ would be an algebraic extension of $\mathbb{Q}$, because $M$ is a model of $T$. At the same time we would have that the interpretation of $c$ in $M$ is transcendental, because $M$ also satisfies $\Sigma$. Contradiction.

So to do this using ultraproducts we do the following. Write $\mathcal{P}_\text{fin}(\Sigma)$ for the set of finite subsets of $\Sigma$. We define $A_{\Sigma_0} = \{ \Sigma_1 \in \mathcal{P}_\text{fin} : \Sigma_0 \subseteq \Sigma_1 \}$. Let $U$ be an ultrafilter on $\mathcal{P}_\text{fin}(\Sigma)$ containing all sets of the form $A_{\Sigma_0}$ (check that this can be done). Consider the ultraproduct
$$
M := \prod_{\Sigma_0 \in \mathcal{P}_\text{fin}(\Sigma)} F_{\Sigma_0} / U
$$
We claim that $M \models T \cup \Sigma$, and then we would be done as discussed before. Since every structure in the ultraproduct is a model of $T$, we clearly have $M \models T$ by Łoś's theorem. Now for $\varphi \in \Sigma$ we note that $A_{\{\varphi\}} \in U$ and for all $\Sigma_0 \in A_{\{\varphi\}}$ we have $F_{\Sigma_0} \models \varphi$. So, again by Łoś's theorem, we have $M \models \varphi$ (check these last two sentences in detail).


问:
How to prove $M\in O^+(n,1)$ can always be decomposed to the product of two matrices
To be specific, I want to prove that for any $M\in \mathbb{R}_{(n+1)\times (n+1)} $ (See update below)
$$
M^T
\begin{bmatrix}
I_n & 0\\
0 & -1
\end{bmatrix}
M=
\begin{bmatrix}
I_n & 0\\
0 & -1
\end{bmatrix}
$$
there exists $Q$ and $B$ that
$$
Q=
\begin{bmatrix}
Q_0 & 0\\
0 & 1
\end{bmatrix},\quad \text{where }Q_0\in O(n)\\
B=
\begin{bmatrix}
I_{n-1} & 0 & 0\\
0 & \cosh t & \sinh t \\
0 & \sinh t & \cosh t
\end{bmatrix}
$$
satisfying $M=QB$.

I don't have any idea. I can only think of writing $M$ in the form of a block matrix.
$$
M=
\begin{bmatrix}
M_0 & \alpha\\
\beta ^T & x
\end{bmatrix}
$$
substitute it into the first equation will come to
$$
M_0^T\alpha=x\beta\\
\alpha^T\alpha-x^2=-1\\
M_0^TM_0-\beta \beta^T=I_n
$$
I don't know how to introduce $Q_0$, not to say B.

Any help please?

Update: Sorry for misstating. $M$ should be $M\in O^+(n,1)$, the subgroup of isometries that are time orientation-preserving (physicists
call it the orthochronous Lorentz group), and $B$ should be any matrix of a Lorentz boost.

答:
The statement is false. The bottom row of your $QB$ has the sign pattern $(0,\ldots,0,\ast,+)$, but this is not necessarily the case for $M$ when $M=-I$ or $$
M=\pmatrix{\cosh t&&\sinh t\\ &I_{n-1}\\ \sinh t&&\cosh t},\ n\ge1,\,t\ne0.
$$

It is true, however, that $M=(Q_1\oplus\pm1)B(Q_2\oplus1)$ for some $Q_1,Q_2\in O(n)$ and some $B$ that takes the form as specified in your question.

Let $M=UP$ be the polar decomposition of $M$, where $U$ is orthogonal and $P$ is positive definite. Let $D=I_n\oplus-1$. From $M^TDM=D$ we infer that
\begin{align}
PU^TDUP&=D,\\
DUP&=UP^{-1}D,\\
(DUP)^TDUP&=(UP^{-1}D)^TUP^{-1}D,\\
P^2&=DP^{-2}D=(DP^{-1}D)^2,\\
P&=DP^{-1}D,\\
\end{align}
where the last line is due to the fact that every positive definite matrix has a unique positive definite square root. Now partition $P$ as $\pmatrix{A&b\\ b^T&c}$ where $A\succ0$ and $c>0$. Then
$$
I=DPDP=\pmatrix{A&b\\ -b^T&-c}\pmatrix{A&b\\ -b^T&-c}=\pmatrix{A^2-bb^T&(A-cI)b\\ b^T(A-cI)&c^2-b^Tb}.
$$
Therefore $c\ge1,\ b=(c^2-1)^{1/2}u$ for some unit eigenvector $u$ of $A$ corresponding to the eigenvalue $c$, and $A^2=I+(c^2-1)uu^T$. Hence $A=I+(c-1)uu^T$ and
$$
P=\pmatrix{I+(c-1)uu^T&(c^2-1)^{1/2}u\\ (c^2-1)^{1/2}u^T&c}
=\pmatrix{Q_2^T\\ &1}\underbrace{\pmatrix{I_{n-1}\\ &\cosh t&\sinh t\\ &\sinh t&\cosh t}}_B\pmatrix{Q_2\\ &1}
$$
where $c=\cosh t$ and $Q_2\in O(n)$ is any orthogonal matrix whose last row is $u^T$.

It follows that $M=QB(Q_2\oplus1)$, where $Q=U(Q_2^T\oplus1)$. So, from $M^TDM=D$, we obtain $Q^TDQ=B^{-1}(Q_2\oplus1)D(Q_2^T\oplus1)B^{-1}=B^{-1}DB^{-1}=D$. Hence $DQ=QD$ and $Q=Q_1\oplus\pm1$ for some orthogonal matrix $Q_1$. Now we are done.

Edit. If you also require $M$ to be a member of the orthochronous group (i.e. $M^TDM=D,\,\det(M)=1$ and $M_{n+1,n+1}\ge1$), then the $Q$ above must take the form of $Q_1\oplus1$ (rather than $Q_1\oplus\pm1$) with $\det(Q_1)=\det(Q_2)$. The matrices $Q_1$ and $Q_2$ can be chosen from $SO(n)$ if $t$ is allowed to be negative.


问:
Using L'Hopital's rule to find the limit of this function
I need to find the limit of this function using L'Hopitals rule and I am not sure about my calculations
$$ \lim_{x\to (-\infty)}\frac{e^\frac{1}{x^3}-1}{\arctan\frac{2}{x^4}}$$
Using Lhopital rule and finding the derivative I get
$$ \lim_{x\to (-\infty)}\frac{e^\frac{1}{x^3}*\frac{-3}{x^4} }{\frac{1}{1+\frac{4}{x^8}}* \frac{-8}{x^5}}$$
but Im not sure how to proceed further I tried simplifying but Im not 100% confident that's correct
$$ \lim_{x\to (-\infty)}\frac{e^\frac{1}{x^3}*\frac{-3}{x^4} }{\frac{1}{1+\frac{4}{x^8}}* \frac{-8}{x^5}} = \frac{e^\frac{1}{x^3}*\frac{-3}{1} }{\frac{1}{1+\frac{4}{x^8}}* \frac{-8}{x}} = \frac{e^\frac{1}{x^3}*-3 }{\frac{-8}{(1+\frac{4}{x^8})x}} = \frac{e^\frac{1}{x^3}*-3 }{\frac{-8}{x+\frac{4}{x^7}}} = e^\frac{1}{x^3}*-3  *{\frac{x+\frac{4}{x^7}}{-8}} = 1*-3 {\frac{-\infty+0}{-8}} = -\infty$$

答:
Hint:

We don't actually need L'Hopital's rule

Set $-\dfrac1x=h\implies h\to0^+$

$$\lim_{h\to0^+}\dfrac{e^{-h^3}-1}{\arctan(2h^4)}=\lim_{h\to0^+}\dfrac{e^{-h^3}-1}{-h^3}\cdot\dfrac1{\lim_{h\to0^+}\dfrac{\arctan(2h^4)}{2h^4}}\cdot\lim_{h\to0^+}\dfrac{-h^3}{2h^4}=?$$


问:
Dependence of Axioms of Equivalence Relation?
This question is problem 11(a) in chapter 1 in 'Topics in Algebra' by I.N. Herstein.

These are the properties of equivalence relation given in this book.

Prop 1 $a \sim a$

Prop 2 $a \sim b$ implies $b \sim a$.

Prop 3 $(a \sim b$ and $b \sim c)$ imply $a \sim c$.

Statement Property 2 of an equivalence relation states that if $a \sim b$ then $b \sim a$. By property 3, we have the transitivity i.e. $a \sim b$, and $b \sim c$ then $a \sim c$. What is wrong with following proof that property 2 and 3 imply property 1? Let $a \sim b$; then $b \sim a$, whence by property 3 (using $a = c$), $a \sim a$.

I think I can prove this to be wrong. Without proving equivalence relation first, one can not use $a = c$. Right? After all, equality is equivalent to 'equivalence relation' and 'axiom of substitution' are satisfied. If this is right, then I have trouble with the next part of this problem.

Part 2 Can you suggest an alternative of property 1 which will insure us that prop 2 and prop 3 do imply 1?

Can one give such a formulation without using the idea of '=' or otherwise?

EDIT : Italics are my comments. Rest is as it appeared in the book.

Notion of Equality

I have read in Terry 'Analysis 1' in Appendix A.7 published by Hindustan Book Agency that there are four axioms of 'equality'. First 3 are same as equivalence relation where $\sim $ in replaced by $ = $. The fourth one is known as axiom of substitution. Given any two objects $x$ and $y$ of some type, if $ x = y $, then $f(x) = f(y) $ for all functions or operations $f$.

答:
The axioms are supposed to hold for all choices of $a, b, c$, and this includes the case where $c$ happens to equal $a$. When you conclude that $a \sim b$ and $b \sim a$ implies $a \sim a$, you are only using transitivity and no other property. </p>

<p>I don't understand what you mean by "the idea of '='." It is pretty hard to do any mathematics without using the notion of equality. </p>

Body:
The axioms are supposed to hold for all choices of $a, b, c$, and this includes the case where $c$ happens to equal $a$. When you conclude that $a \sim b$ and $b \sim a$ implies $a \sim a$, you are only using transitivity and no other property.

I don't understand what you mean by "the idea of '='." It is pretty hard to do any mathematics without using the notion of equality.


问:
Solve $47x \equiv 4 \mod 17$
I don't really understand how to solve the equation $$47x \equiv 4  \mod 17.$$
If someone could help, that would be much appreciated. Thanks!

Title: Solve $47x \equiv 4 \mod 17$

Body:
As $47\equiv-4\pmod{17},$

$$47x\equiv4\pmod{17}\iff-4x\equiv4$$

As $(4,17)=1,$

$$-x\equiv1\iff x\equiv-1$$

$$\implies x\equiv-1+17$$


问:
Decomposition of a topological manifold into sets with low-dimensional intersections
Let $f:M\rightarrow N$ be a continuous function between connected topological manifolds, modelled respectively on $\mathbb{R}^m$ and $\mathbb{R}^n$; $n,m\in \mathbb{Z}^+$.  Can we always find a cover $\{C_i\}_{i \in I}$ of $N$ such that:

$I$ is finite,

The $C_i$ are regular closed subsets, i.e. $\overline{\text{int}(C_i)}=C_i$,

$\text{int}(C_i)\cong \mathbb{R}^n$,

$\text{dim}(C_i\cap C_j)<n$? and $C_i\cap C_j$ is a Borel set?

When $N$ is compact, this is clear, since we just cover $N$ with locally Euclidean neighbourhoods, take their closures, and reduce to a finite set using compactness.  However, what about in general?

答:
I will ignore $M$ and $f$ since they play no role in the question. Here is what I know about the compact case:

If $N$ admits a triangulation or, more generally, a handle decomposition, then the finite collection of subsets $C_i$ does exist.

Every topological manifold of dimension $\le 3$ admits a triangulation.

Every topological manifold of dimension $> 4$ admits a handle decomposition.

It is not known if compact topological 4-manifolds admit structure of CW complexes.

Edit. I just realized that the answer to your question is positive for all connected manifolds. Even two subsets $C_1, C_2$ will suffice. It is an application of Berlanga-Brown theorem which states that every connected topological n-manifold contains an open and dense subset homeomorphic to the open n-ball.

Here are some details:

Berlanga in

R.Berlanga "A mapping theorem for topological sigma-compact manifolds", Compositio Math, 1987, vol. 63, 209-216.

generalizes an earlier work of Morton Brown (in the case of compact manifolds) proves that every connected $n$-dimensional topological manifold $N$ contains an open and dense subset $U$ homeomorphic to $R^n$. I will consider the case $n\ge 2$ since the situation with $n=1$ is clear.

Let $A:= N - U$. Pick a sequence $x_i\in U$ whose accumulation set in $N$ equals $C$. Since $U$ is homeomorphic to $R^n$, there exists a hypersurface $H\subset U$ homeomorphic to $R^{n-1}$, containing the sequence $(x_i)$ and separating $U$ in two open subsets $V_1, V_2$ each homeomorphic to $R^n$. Then the closure $C_i$ of $V_i$ in $N$ will be regular (see below) and the intersection $B=C_1\cap C_2$ has empty interior in $N$. Thus, $\dim(B)=n-1$.  (In general, each closed subset with empty interior in an $n$-dimensional manifold has covering dimension $\le n-1$, this is Menger-Urysohn theorem. But in our case $B$ contains $H$, so $\dim(B)=n-1$.)

To see regularity of $C_i, i=1, 2$ note that the boundary of $C_i$ equals $A\cup H$ and, by the construction, each point of $A\cup H$ is a boundary point of both $V_1$ and $V_2$. Thus, $int C_i= V_i$, while $C_i=cl(V_i)$, $i=1, 2$.


问:
Is $(4+\sqrt{5})$ a prime ideal of $\mathbb{Z} \left[ \frac{1+\sqrt{5}}{2} \right]$?
Consider the integral domain  $\mathbb{Z} \left[ \frac{1+\sqrt{5}}{2} \right]$. Is $(4+\sqrt{5})$ a prime ideal of  $\mathbb{Z} \left[ \frac{1+\sqrt{5}}{2} \right]$?

I know the following elementary facts. We have
\begin{equation}
\mathbb{Z} \left[ \frac{1+\sqrt{5}}{2} \right] = \left\{ \frac{m + n \sqrt{5}}{2} : m, n \in \mathbb{Z} \text{ are both even or both odd} \right\}.
\end{equation}

For every $\frac{m + n \sqrt{5}}{2} \in \mathbb{Z} \left[ \frac{1+\sqrt{5}}{2} \right]$, define its norm as usual:
\begin{equation}
N\left(\frac{m + n \sqrt{5}}{2}\right)=\frac{m^2-5n^2}{4}.
\end{equation}
Since $m, n$ are both even or both odd, it is easy to see that the norm is an integer. From this fact it is easily seen that $\frac{m + n \sqrt{5}}{2}$ is a unit of $\mathbb{Z} \left[ \frac{1+\sqrt{5}}{2} \right]$ if and only if $m^2 - 5n^2=4$ or $m^2 - 5n^2=-4$. Now since $N(4+\sqrt{5})=11$ we easily get that $4+\sqrt{5}$ is an irreducible element of  $\mathbb{Z} \left[ \frac{1+\sqrt{5}}{2} \right]$. If $\mathbb{Z} \left[ \frac{1+\sqrt{5}}{2} \right]$ were a unique factorization domain, we could conclude that $(4+\sqrt{5})$ a prime ideal of  $\mathbb{Z} \left[ \frac{1+\sqrt{5}}{2} \right]$. But I do not know if $\mathbb{Z} \left[ \frac{1+\sqrt{5}}{2} \right]$ is a unique factorization domain. Does someone know if it is?

Thank you very much in advance for your attention.

答:
The number field $K=\Bbb Q(\sqrt{5})$ has class number one because its Minkowski bound satisfies $B_K<2$ . Hence its ring of integers $\mathcal{O}_K=\mathbb{Z} \left[ \frac{1+\sqrt{5}}{2} \right]$ is even a PID and hence a UFD.

On the other hand, it is enough to see that $\mathcal{O}_K/(4+\sqrt{5})$ is a field, so that the ideal $(4+\sqrt{5})$ is prime.


问:
Relation between determinant and matrix rank
Let $A$ a square matrix with the size of $n \times n$.

I know that if the rank of the matrix is $<n$, then there must be a "zeroes-line", therefore $\det(A)=0$.

What about $\text{rank}(A)=n$? Why does it imply $\det(A)\ne0$?

Of course, there is no "zeroes-line", but that doesn't prove it yet.

I've seen a proof in a book which does this conclusion immediately, but IMHO this alone, doesn't prove it.

What's the missing part?

答: I have an idea: if $$rank(A_{nxn}) = n $$ then $$A$$ must be invertible (proof : https://sharmaeklavya2.github.io/theoremdep/nodes/linear-algebra/matrices/full-rank-inv.html) so $$A^{-1} =  \frac{adj(A)}{det(A)}$$ exists and therefore  $$\rightarrow det(A) \neq 0$$


问:
How to solve the pair of equations $4a-11b+12c=22$ and $a+5b-4c=17$ over the integers?
Solve the systems if $a$, $b$, and $c$ are positive integers:

$$4a-11b+12c=22$$

$$a+5b-4c=17$$

The answer is given in the back as $(7,6,5)$ but how can you approach three variables with only two equations?

I tried multiplying the second equation by 3 and adding I got this

$$7a + 4b=73$$

答:
We can rewrite the equations as
\begin{align*}
-11b+12c&=22-4a\\
5b-4c&=17-a
\end{align*}
which gives us
\begin{align*}
b&=\frac{73-7a}4\\
c&=\frac{297-31a}{16}
\end{align*}

We want find $a$'s such that the above expressions will be positive integers. From $297-31a>0$ we get $a<\frac{297}{31}$. For integer $a$'s this means that $a\le9$. (So we do not really have that many possibilities to try, only $a=1,2,\dots,9$.)

If we want $7a\equiv 73 \pmod 4$, this is equivalent to $a\equiv1\pmod4$.

Moreover, we want $31a\equiv297\pmod{16}$, which gives us $a\equiv7\pmod{16}$.

So $b$ and $c$ are integers only if $a=16k+7$.