答:
There are many techniques that will work. Perhaps the most elementary is simply to ‘unwind’ the recurrence. For convenience let $a=\sqrt2$ and $b=\sqrt3$. Then

$$\begin{align*}
x_n&=\sqrt2 x_{n-1}+\sqrt3\\
&=ax_{n-1}+b\\
&=a(ax_{n-2}+b)+b\\
&=a^2x_{n-2}+ab+b\\
&=a^2(ax_{n-3}+b)+ab+b\\
&=a^3x_{n-3}+a^2b+ab+b\\
&\;\vdots\\
&=a^kx_{n-k}+a^{k-1}b+a^{k-2}b+\ldots+ab+b\\
&\;\vdots\\
&=a^nx_0+a^{n-1}b+a^{n-2}b+\ldots+ab+b\\
&=a^n+b\sum_{k=0}^{n-1}a^k\;.
\end{align*}$$

That last summation is just a geometric series, so you can evaluate it in closed form to get an expression for $x_n$ in closed form. To finish up, you should then prove by induction on $n$ that your expression is correct: the calculation above isn’t fully rigorous. The step between the two vertical ellipses is a matter of spotting a pattern, but it doesn’t actually prove that the pattern is there.

Title: Solve recurrence equation

Body:
Could you Show me how to solve this equation:

$$x_n = \sqrt2x_{n-1} + \sqrt3$$

for $n \ge 1$ with $x_0 = 1$.


问:
$\int_{0}^{\pi^2}\int_{x^{1/2}}^{\pi} \sin ( x/y)\, dy\,dx$
I need to solve this integral and I don't know

Please, I can't change the order of integration.

I feel like it's impossible.
$$\int_0^{\pi^2}\int_{x^{1/2}}^\pi\sin\frac xy\,dy\,dx$$

答: The variable $x$ can take values from $0$ to $\pi^2$. For each such $x$, $y$ can take values from $\sqrt x$ to $\pi$. So, $y$ can take any value from $0$ to $\pi$ and, for each such $y$, $x$ can take any value from $0$ to $y^2$. So, your integral is equal to$$\int_0^\pi\int_0^{y^2}\sin\left(\frac xy\right)\,\mathrm dx\,\mathrm dy,$$which is equal to$$\int_0^\pi y-y\cos(y)\,\mathrm dy=\frac{\pi^2}2+2.$$

ContentLicense: CC BY-SA 4.0


问:
How to evaluate $\int _0^1\frac{\ln \left(1+\sqrt{x}\right)}{1+x^2}\:dx$
How can I approach:
$$\int _0^1\frac{\ln \left(1+\sqrt{x}\right)}{1+x^2}\:dx$$
I tried the usual differentiation under the integral sign but it didn't work so well.

I also tried to rewrite it the following 2 ways:
$$\int _0^1\frac{\ln \left(1+\sqrt{x}\right)}{1+x^2}\:dx=\int _0^1\frac{\ln \left(\sqrt{x}+x\right)}{1+x^2}\:dx-\frac{1}{2}\underbrace{\int _0^1\frac{\ln \left(x\right)}{1+x^2}\:dx}_{-G}$$
$$\int _0^1\frac{\ln \left(1+\sqrt{x}\right)}{1+x^2}\:dx=\underbrace{\int _0^1\frac{\ln \left(1-x\right)}{1+x^2}\:dx}_{\frac{\pi }{8}\ln \left(2\right)-G}-\int _0^1\frac{\ln \left(1-\sqrt{x}\right)}{1+x^2}\:dx$$
Yet I'm still stuck with those other integrals, any help is appreciated.

Managed to numerically find that:
$$\int _0^1\frac{\ln \left(1+\sqrt{x}\right)}{1+x^2}\:dx=\frac{\pi }{16}\ln \left(2\right)+\frac{\pi }{4}\ln \left(1+\sqrt{2}\right)-\frac{1}{2}G$$
But I still dont know how to approach it.

答:
I do not think that I should arrive to the result but here are my attempts.

Trying to work the antiderivative
$$\int \frac{\log \left(1+\sqrt{x}\right)}{1+x^2}\,dx=2\int \frac{ t \log (t+1)}{t^4+1}\,dt$$ Using partial fractions
$$\frac{ t }{t^4+1}=\frac{ t }{(t-a)(t-b)(t-c)(t-d)}$$ where $(a,b,c,d)$ are the roots of unity
$$\frac{ t }{t^4+1}=\frac A{t-a}+\frac B{t-b}+\frac C{t-c}+\frac D{t-d}$$
$$A=\frac{a}{(a-b) (a-c) (a-d)} \qquad \qquad B=\frac{b}{(b-a) (b-c) (b-d)}$$
$$C=\frac{c}{(c-a) (c-b) (c-d)} \qquad \qquad D=\frac{d}{(d-a) (d-b) (d-c)}$$
So, four integrals
$$I_k=\int \frac{\log(t+1)}{t-k}\,dt=\text{Li}_2\left(\frac{t+1}{k+1}\right)+\log (t+1) \log
   \left(1-\frac{t+1}{k+1}\right)$$
$$J_k=\int_0^1 \frac{\log(t+1)}{t-k}\,dt=\log (2) \log \left(\frac{k-1}{k+1}\right)+\text{Li}_2\left(\frac{2}{k+1}\right)-\text{Li}_2\left(\frac{1}{k+1}\right)$$ Now, starts the nightmare !

Since @Quanto provided a nice answer, I give up.


问:
Quadratic Form of $A^2, A^3$
Assume $A\in \mathbb{S}^n$ is a positive semi-definite matrix, and denote its eigenvalues by $\lambda_1 > \lambda_2 \ge ... \ge \lambda_n \ge 0$. Let $w\in \mathbb{R}^n$ be a unit vector such that
$$w^TAw=\lambda$$
I would like to upper-bound and lower-bound the quadratic form of $w$ with respect to $A^k$
$$w^TA^kw$$
in terms of $\lambda, \lambda_1, ..., \lambda_n$.
More specifically, I would like to obtain a bound for the cases of $k=2,3$.

I've managed to find the following bound
$$\lambda_n^{k-1} \cdot \lambda \le w^TA^kw \le \lambda_1^{k-1} \cdot \lambda$$
Proof

Denote the spectral decomposition of $A$ by $A = \sum_{i=1}^n \lambda_i u_i u_i^T$. It is easy to show that the spectral decomposition of $A^k$ is $A = \sum_{i=1}^n \lambda_i^k u_i u_i^T$. And thus
$$w^TA^kw = w^T \left( \sum_{i=1}^n \lambda_i^k u_i u_i^T \right) w$$
$$= \sum_{i=1}^n \lambda_i^k w^T u_i u_i^T w$$
$$\le \sum_{i=1}^n \lambda_1^{k-1} \lambda_i w^T u_i u_i^T w$$
$$= \lambda_1^{k-1} \sum_{i=1}^n \lambda_i w^T u_i u_i^T w$$
$$= \lambda_1^{k-1} \cdot \lambda$$
And similarly for the second inequality.

Is there a tighter bound to be obtained? Or one that is expressed solely with $\lambda$? I'm interested specifically in the cases where $k=2,3$.

答:
A positive semidefinite matrix is a Hermitian matrix all of whose eigenvalues are nonnegative.

The finite-dimensional spectral theorem says that any Hermitian matrix can be diagonalized by a unitary matrix, and that the resulting diagonal matrix has only real entries. This implies that all eigenvalues of a Hermitian matrix A with dimension n are real, and that A has n linearly independent eigenvectors. Moreover, a Hermitian matrix has orthogonal eigenvectors for distinct eigenvalues. Even if there are degenerate eigenvalues, it is always possible to find an orthogonal basis of $C^{n}$ consisting of n eigenvectors of A.

So Diagonalizing the matrix by the Unitary matrix U:

$$w^{T}A^{k}w = w^{T}UD^{k}U^{-1}w = w^{T}UD_{k}U^{-1}w$$

Where $D_{k} = D^{k}$ is another diagonal matrix.

If none of the eigenvalues are degenerate you can push the $w$ through $U$ and consider that

$$w^{T}A^{k}w = w^{T}UD_{k}U^{-1}w = v^{T}D_{k}v$$

Where $v = U^{-1}w$. This works since $U$ is unitary and so the adjoint transpose of U is $U^{-1}$.

You can get (possibly in some cases) stronger bounds $v^{T}D_{k}v$ based on what v is here, which should be clear.

Title: Quadratic Form of $A^2, A^3$


问:
Two answers of $\frac{\mathrm d}{\mathrm dx}\{\cot ^{-1}\left(\frac{1+x}{1-x}\right)\}$

If $$y=\cot ^{-1}\left(\frac{1+x}{1-x}\right)$$ then $\dfrac{\mathrm d y}{\mathrm d x}=?$

By taking $x=\tan y$  ,then

$y=\cot ^{-1}\left(\dfrac{1+\tan y}{1-\tan y}\right)$

$y=\cot ^{-1}\left(\dfrac{\cot y+1}{\cot y-1}\right)$

$y=\cot ^{-1}\left(\cot\left(y-\dfrac{\pi}{4}\right)\right)$

$y'=\dfrac{1}{1+x^2}$

But if we differentiate directly(by chain rule) then we get answer $-\dfrac{1}{1+x^2}$ ?

thankyou

答:
Hint:

$$\cot^{-1}\dfrac{1+x}{1-x}=\dfrac\pi2-\tan\dfrac{1+x}{1-x}$$

Now use Inverse trigonometric function identity doubt: $\tan^{-1}x+\tan^{-1}y =-\pi+\tan^{-1}\left(\frac{x+y}{1-xy}\right)$, when $x<0$, $y<0$, and $xy>1$


问:
Show that a ball in Euclidean space is convex.
Let $B(x,r)$ be the ball cantered at $x$ with radius $r$, in the Euclidean space,  prove that it is convex.

The notes I have give the following proof:

Take $y,y' \in B(x,r)$ and set $z=ay +(1-a)y'$ for $0 \leq a \leq 1$
So $$d(x,z) =d(x,ay +(1-a)y') \leq d(x,ay)+d(x,(1-a)y')=ad(x,y)+(1-a)d(x,y')$$

I don't understand why it's the case that $d(x,ay)=ad(x,y)$, for example, if the metric was the absolute value I can't see how $|x-ay|$ can be equal to $a|x-y|$.

Can you explain why $d(x,ay)=ad(x,y)$ holds?

答:
It's easier to see that $B(0,1)= \{x\mid \|x\| \le 1\}$ is convex in any normed space: if $y,z \in B(0,1)$, and $t \in [0,1]$, then

$$\|ty + (1-t)z\| \le \|ty\| + \|(1-t)z\| = t\|y\| + (1-t)\|z\| \le t\cdot 1 + (1-t)\cdot 1 = 1$$

so that $ty + (1-t)z \in B(0,1)$ as well. Homogeneity of the norm w.r.t positive scalars is used essentially.

All other balls in a normed space are just translations ( $x \to x+y$ ) and scalings ($x \to rx$) of $B(0,1)$ so are also convex (being linear isomorphisms).


问:
If $x\geq 1$, then $x^{x^{\cos(x)}}\geq (1-\sqrt{x}+x)^{(x+1)^{\cos(x)}}$
Hi it's a curious problem that I really don't understand :

Let $x\geq 1$ then we have :
  $$x^{x^{\cos(x)}}\geq (1-\sqrt{x}+x)^{(x+1)^{\cos(x)}}$$

It's very curious for me because the accuracy of the inequality increase when $x$ increase

But clearing the expression or taking both side logarithm we get :

$$x^{\cos(x)}\ln(x)\geq \ln(1-\sqrt{x}+x)(x+1)^{\cos(x)}$$

But it doesn't help at all to explain this mystery .

It seems that there is similarity between the graphic of $f(x)=x^n$ $n$ a natural number and $g(x)=x^{x^{\cos(x)}}- (1-\sqrt{x}+x)^{(x+1)^{\cos(x)}}$

I think furthermore that our function is quasiperiodic
but it's too fuzzy as definition .

That's all for me If you have nice ideas it would be great .

Thanks a lot for sharing your time and knowledge .

答:
Alternative solution:

It suffices to prove that
$$x^{\cos x}\ln x \ge (x+1)^{\cos x}\ln (1 - \sqrt{x} + x)$$
which is written as
$$ \ln x
\ge \left(1 + \frac{1}{x}\right)^{\cos x}\ln (1 - \sqrt{x} + x). $$
It suffices to prove that
$$ \ln x
\ge \left(1 + \frac{1}{x}\right)\ln (1 - \sqrt{x} + x). $$
It suffices to prove that
$$ x\ln x
\ge (x+1)\ln (1 - \sqrt{x} + x). $$
Let $f(x) = x\ln x - (x+1)\ln (1 - \sqrt{x} + x)$. We have
\begin{align}
f'(x) &= \ln \frac{x}{1 - \sqrt{x} + x} - \frac{x-1}{2(1 - \sqrt{x} + x)\sqrt{x}}\\
&\ge \frac{2(\frac{x}{1 - \sqrt{x} + x}-1)}{\frac{x}{1 - \sqrt{x} + x}+1}
 - \frac{x-1}{2(1 - \sqrt{x} + x)\sqrt{x}}\\
&= \frac{(2\sqrt{x} - 1)(\sqrt{x} - 1)^3}{2(1 - \sqrt{x} + x)\sqrt{x}(2x + 1 - \sqrt{x})}\\
&\ge 0
\end{align}
where we have used $\ln u \ge \frac{2(u-1)}{u+1}$ for all $u \ge 1$ (Note:
$\frac{\mathrm{d}}{\mathrm{d} u}(\ln u - \frac{2(u-1)}{u+1}) = \frac{(u-1)^2}{u(u+1)^2}$).
Also, $f(1) = 0$. Thus, $f(x)\ge 0$ for all $x\ge 1$.

We are done.


问:
Solve recurrence equation
Could you Show me how to solve this equation:

$$x_n = \sqrt2x_{n-1} + \sqrt3$$

for $n \ge 1$ with $x_0 = 1$.

答:
A linear recurrence of the first order. Foor simplicity, call $a = \sqrt{2}$, $b =  \sqrt{3}$. Then, dividing through by $a^{n + 1}$:
$$
\begin{align*}
x_{n + 1} - a x_n &= b \\
\frac{x_{n + 1}}{a^{n + 1}} - \frac{x_n}{a^n} &= b a^{-n}
\end{align*}
$$
Sum for $0 \le n < k$ to get:
$$
\frac{x_k}{a^k} - x_0 = b \sum_{0 \le n < k} a^{-n}
$$
The sum is geometric, finishing this off is routine.</p>

ContentLicense: CC BY-SA 3.0

Title: Solve recurrence equation


问:
Discrete Math Relations
could you please help me in that question?

Let N[x] be the set of all polynomials with coefficients in N. Prove that N[x] is countably infinite.

答:
You are looking for a bijection from $N[x]$ to $N$.

Consider the mapping $\pi$ which takes 1 to the smallest prime, 2 to the second smallest prime, and so on.

Show that $\pi$ is a bijection from the set N to the set of primes $\Pi$.

Take a polynomial $p\in N[x]$, $p = \sum a_{i}x^{i}$.

Consider the mapping $f$ defined so that:

$$f(p) = f(\sum a_{i}x^{i}) = \prod \pi(i)^{a_{i}}.$$

This is a bijection from $N$ to N \ {1} by the existence of a unique prime factorization for all integers bigger than 1.

It should be clear now, but to get a perfect bijection consider $g(n) = n - 1$.

Then $$g(f(p))= g(f(\sum a_{i}x^{i})) = \prod \pi(i)^{a_{i}} -1$$

is a bijection from $N[x]$ to $N$.

Title: Discrete Math Relations


答: No, you cannot deduce from what you wrote that that set is a basis of $V$. Actually, none of those vectors actually belong $V$. But it follows from what you did that the $3$ vectors are linearly independent and that therefore they form a basis of $V$, and that therefore $\dim V=3$.

Title: Let $v_1 = (1, 1, 0, 3)$, $v_2=(1,2,1,1)$ and $v_3 = (0,2,1,0)$ be in $\mathbb{R^4}$. What is the dimension of the subspace span$(v_1,v_2,v_3)$?

Body:
Let $v_1 = (1, 1, 0, 3)$, $v_2=(1,2,1,1)$ and $v_3 = (0,2,1,0)$ be in $\mathbb{R^4}$. What is the dimension of the subspace $V=\text{span}(v_1,v_2,v_3)$?

Row reducing $[v_1^Tv_2^Tv_3^T]$ I get that $$\begin{bmatrix}1 & 0 & 0 \\ 0 & 1 & 0  \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end{bmatrix}$$ so the basis would be the set $\{(1,0,0,0), (0,1,0,0), (0,0,1,0)\}$? which has size $3$?


问:
Solving $\sqrt{7x-4}-\sqrt{7x-5}=\sqrt{4x-1}-\sqrt{4x-2}$
Where do I start to solve a equation for x like the one below?

$$\sqrt{7x-4}-\sqrt{7x-5}=\sqrt{4x-1}-\sqrt{4x-2}$$

After squaring it, it's too complicated; but there's nothing to factor or to expand?

Ideas?

答:
1.Rewrite the equasion as:
$$
\sqrt {7x-4} + \sqrt {4x-2} = \sqrt {7x-5} + \sqrt {4x -1}
$$

2.Function $\sqrt {7x-4} + \sqrt {4x -2} $ is strictly increasing (i.e always increasing).

3.Function $\sqrt {7x-5} + \sqrt {4x -1} $ is strictly increasing (i.e always increasing) too.

Plotting a graph will show that there will be only one interception. With the help of this graph or by knowlegable guessing one can find that $x=1$.


答:
The very first thing you did wrong was substituting $x=\tan y$. How can you do that when $y$ is itself a function of $x$?

Secondly, when you apply the chain rule, you should get it's derivative as $y'=-\dfrac{1}{1+x^2}$.

Now if you want to proceed via a substitution, substitute $x=\tan \theta$ and since $x \in \mathbb{R}-\{1\}$, we have $\theta \in \left(-\dfrac{\pi}{2},\dfrac{\pi}{2}\right)-\{\dfrac{\pi}{4}\}$ so that you finally get $$y=\cot ^{-1}\left(\cot\left(\dfrac{\pi}{4}-\theta\right)\right)=\begin{cases}\dfrac{\pi}{4}-\theta~~~~ \text{for} ~\theta\in \left(-\dfrac{\pi}{2},\dfrac{\pi}{4}\right) \\
\dfrac{5\pi}{4}-\theta ~~~~\text{for} ~\theta \in \left(\dfrac{\pi}{4},\dfrac{\pi}{2}\right)\end{cases}$$ and since we have $\dfrac{\mathrm d y}{\mathrm d \theta}=-1$ for both situations and we had from $x=\tan \theta$, $\dfrac{\mathrm{d}x}{\mathrm{d}\theta}=1+x^2$, we get $y'=-\dfrac{1}{1+x^2}$.

Title: Two answers of $\frac{\mathrm d}{\mathrm dx}\{\cot ^{-1}\left(\frac{1+x}{1-x}\right)\}$

Body:
If $$y=\cot ^{-1}\left(\frac{1+x}{1-x}\right)$$ then $\dfrac{\mathrm d y}{\mathrm d x}=?$

By taking $x=\tan y$  ,then

$y=\cot ^{-1}\left(\dfrac{1+\tan y}{1-\tan y}\right)$

$y=\cot ^{-1}\left(\dfrac{\cot y+1}{\cot y-1}\right)$

$y=\cot ^{-1}\left(\cot\left(y-\dfrac{\pi}{4}\right)\right)$

$y'=\dfrac{1}{1+x^2}$

But if we differentiate directly(by chain rule) then we get answer $-\dfrac{1}{1+x^2}$ ?

thankyou


问:
Logarithm of null-homotopic maps
The logarithm of a $\mathbb{C}^*$-valued function on a smooth manifold $M$ can be defined locally (up to a choice) but in general we cannot patch up these choices so to define it the whole space $M$, what we can always do though is define it globally on its universal cover $\tilde{M}$. However sometimes a function admits a globally defined logarithm (up to a choice) even when the domain is not simply connected, e.g. the constant function.

Question: How can I prove that a null-homotopic map from $M$ to $S^1\subset\mathbb{C}^*$ admits a globally defined logarithm?

If the manifold $M$ has the homotopy lifting property with respect to the exponential map $e:\mathbb{C}\to\mathbb{C}^*$ I would be done, but I don't know if this is true. Maybe this property holds trivially for null-homotopies?

答:
This is just the lifting property for covering spaces. If $p:(C, c_0) \rightarrow (X,x_0)$ is a covering space and $f:(Z,z_0) \rightarrow (X,x_0)$ any pointed map from a path connected and locally path connected space $Z$. Then there exists a lift $g: Z \rightarrow C$ of $f$ iff $f_*(\pi_1(Z,z_0)) \subset p_*(\pi_1(C,c_0))$.

$f(z_0) = c_0$.

This lift $g$ is also unique up to choice of element of $p^{-1}(x_0)$ that $z_0$ gets mapped to under $g$.

Apply this to the situation $p = exp:(\mathbb C,0) \rightarrow (\mathbb C ^*,1)$ and $Z = M$ and you shall see that since $f$ is nullhomotopic that inclusion of fundamental groups holds trivially since $f_* = 0$, so there is indeed a lift $M \rightarrow \mathbb C$ by this covering theorem.

Title: Logarithm of null-homotopic maps


问:
The existence of primitive function and Cauchy's integral theorem.
domain $D:=\mathbb{C} - \{ 1, e^{\frac{2}{3}\pi i},  e^{\frac{4}{3}\pi i} \}$.

Here is the proof of the fact that the primitive function of $f(z):=\dfrac{1}{z^3-1}$ doesn't exist on $D$.

Proof

Suppose there exists $g(z)$ such that $g(z)$ is regular on $D$ and $g'(z)=f(z)$.

Let $C:=\{z\in \mathbb{C} \ | \ |z-1|=r \}$, where $r$ is small enough.

From the residue theorem, $\displaystyle\int_C f(z)dz=2\pi i \text{Res}(f, 1)=\dfrac{2}{3} \pi i$.

On the other hand, from the Cauchy's integral theorem,
$\displaystyle\int_C f(z) dz
=\displaystyle\int_C g'(z) dz
=0. \cdots \ast$

This is contradictory.　■

I cannot understand why $\ast$ holds.
On the domain $D$, the internal of $C$ is not simply connected, so I think that we cannot use the Cauchy's integral theorem.

Body: It follows from the fact $$\int_{|z-1|=r} g'(z) dz =\int_0^{2\pi } g'(1+re^{it} ) ire^{it} dt =g(1+re^{it} )|_0^{2\pi  } = g(1+re^0 ) -g(1+re^{2\pi i }) =g(1+r) -g(1+r) =0 $$


问:
How Jacobian is defined for the function of a matrix?
Let $f: \mathbb{R}^{m\times n} \rightarrow \mathbb{R}^m$ where $f(W)=Wx$.

Question1: How is the Jacobian matrix defined for a vector-valued function whose variable is a matrix?

Question2: Using the answer to the above, how one can generalized the Jacobian formula of a composition functions whose variables are matrices? By generalization I mean how the Jacobian of a function like $g(x)=h(u(x))$ where $x \in \mathbb{R}^n$, $u: \mathbb{R}^n \rightarrow \mathbb{R}^l$, and $h: \mathbb{R}^l \rightarrow \mathbb{R}^m$  as follows:

$$
J_x(g) = J_u(h) J_x(u)
$$
and $J_x(g)$ is the Jacobian of $g$ with respect to $x$ can be handle when $x$ becomes a matrix.

The above simply says the Jacobian of a composition function is the product of the Jacobians. How can one mimic this when the variable is a matrix?

My thoughts:
For the given function $f(W)=Wx$ one can write the following:

$$
f(W)=Wx
=
\begin{bmatrix}
W_{1\bullet}x\\
\vdots\\
W_{m\bullet}x
\end{bmatrix}
$$
where $W_{m\bullet}$ is the m-th row of $W$. Now the Jacobian could be either
$\begin{bmatrix}
x^T\\
\vdots\\
x^T
\end{bmatrix}
\in \mathbb{R}^{m \times n}
$
or
$\begin{bmatrix}
x&
\dots&
x
\end{bmatrix}
\in \mathbb{R}^{n \times m}.
$

答:
As peek-a-boo commented, the concept doesn't change even whether the input is a matrix or a vector. If the notation is confusing, then I suggest having a kind of a mapping to "flatten" the matrix into a vector.

For $f: \mathbb{R}^n \to \mathbb{R}^m$, its Jacobian is $J(f)\in\mathbb{R}^{m\times n}$.  So if $f: \mathbb{R}^{m\times n} \to \mathbb{R}^m$, it should follow that that $J(f) \in \mathbb{R}^{m\times m\times n}$. What was missing from your attempted solution? Well, you only derived against $W_i$ for each row $i$, while for a Jacobian you need to derive against all inputs, e.g. $W_1 x$ needs to be derived against $W_2, W_3,\dots$ as well.

For your function $f(W)=Wx$, the Jacobian is
$$
J_W(f) = \frac{\partial}{\partial W}f(W)=\frac{\partial}{\partial W}Wx = I_m\otimes x
$$
where $I_m$ is the identity matrix of size $m\times m$ and $\otimes$ is the Kronecker product. If you have to express this in terms of matrix notation, then I guess it will look like this

$$
J_W(f)
=\left[\begin{matrix}
\left[\begin{matrix}\frac{\partial}{\partial W_1}W_1\cdot x \\
\frac{\partial}{\partial W_2}W_1\cdot x \\
\dots\end{matrix}\right]\\
\left[\begin{matrix}\frac{\partial}{\partial W_1}W_2\cdot x \\
\frac{\partial}{\partial W_2}W_2\cdot x \\
\dots\end{matrix}\right] \\
\dots
\end{matrix}\right]
=\left[\begin{matrix}
\left[\begin{matrix}x^T \\
\mathbf{0}^T \\
\dots\end{matrix}\right]\\
\left[\begin{matrix}\mathbf{0}^T \\
x^T \\
\dots\end{matrix}\right] \\
\dots
\end{matrix}\right]
$$
This is going to be very cumbersome to write, so it's probably easier if you express it in terms of indices instead.
$$
[J_W(f)]_{ijk} = \begin{cases}x_k & (i=j)\\0 & (i\neq j)\end{cases}
$$
Or perhaps with Kronecker delta
$$
[J_W(f)]_{ijk} = \delta_{ij}x_k
$$

Regarding your second question $g = h\circ u$, you got it close, except that the second term should $x$ as its subscript.
$$
J_x(g) = J_u(h) J_x(u)
$$
Just as we earlier had $J(f)\in\mathbb{R}^{m\times n}$ for $f:\mathbb{R}^n \to \mathbb{R}^m$, the dimensions for $u$ and $h$ can also be similarly be determined. Let's say $u$ is a mapping from a matrix to a matrix e.g. $g:\mathbb{R}^{m\times n\to k\times l}$. Then $J(u)\in\mathbb{R}^{k\times l\times m\times n}$, and its components written as
$$
[J_X(u)]_{abcd} = \frac{\partial}{\partial X_{ab}}u_{cd}(X)
$$
When writing $J(h)$ you probably would want to use a placeholder matrix $Y$ to represent the input of $h$ (which again, is assumed to be matrix to matrix mapping, but feel free to change it), so that you have
$$
[J_Y(h)]_{cdpq} = \frac{\partial}{\partial Y_{cd}}h_{pq}(Y)\big|_{Y=u(X)}
$$
so that we finally have
$$
\begin{aligned}{}
[J_X(g)]_{abpq} &= [J_Y(h)]_{cdpq}[J_X(u)]_{abcd} \\
&= \frac{\partial}{\partial Y_{cd}}h_{pq}(Y)\big|_{Y=u(X)}\frac{\partial}{\partial X_{ab}}u_{cd}(X)
\end{aligned}
$$


问:
Question related to Laplace transformation and it's final value theorem.
I have been solving problems related to Laplace transformation involving the initial/final value theorem but got stuck at a step. The question is as follows:

Given $L{[\int^{\infty}_{t}\frac{e^{-x}}{x}}dx](s)=sf(s)$,for s>0. Then find $f(s)$ using the final value theorem.

Here are the steps which followed:

$L[f(t)]=\int^{\infty}_{0}f(t)e^{-st}dt$ where $f(t)=\int^{\infty}_{t}\frac{e^{-x}}{x}dx$

$L[f(t)]=\int^{\infty}_{0}[\int^{\infty}_{t}\frac{e^{-x}}{x}dx]e^{-st}dt$

Using the change of order of integral, we can write:

$L[f(t)]=\int^{\infty}_{0}[\int^{x}_{0} e^{-st}dx]\frac{e^{-x}}{x}dt$

$L[f(t)]=\frac{-1}{s}\int^{\infty}_{0}[e^{-sx}-1]\frac{e^{-x}}{x}dx$

$L[f(t)]=\frac{-1}{s}\int^{\infty}_{0}[\frac{e^{-x(s+1)}}{x}-\frac{e^{-x}}{x}]dx$

I am not able to perform the Laplace transformation on the above last expression as it is not integrable. The final value theorem states the if we know Laplace transform$f(s)$ of any function $f(t)$ then we can find $f(\infty)$ by solving, $$f(\infty)=\lim_{s\to 0} s.f(s)$$ But I have no idea how I can use this theorem to find $f(s)$.

Am I solving it wrongly? Should I approach in a different way? What can I do to find $f(s)$?

Please clarify my doubts.

Thank you!

答:
Your approch leads to the final answer.
After your last step, apply Proof of Frullani's theorem,
$$\int_0^{+\infty}  {\frac{{f\left( {ax} \right) - f\left( {bx} \right)}}
{x}}\,dx  = f\left( 0 \right) {\ln\left( \frac{b}
{a}\right)} $$
with $f(x)=e^{-x}$, $a=s+1$, $b=1$. It follows that
$$L\left[\int^{\infty}_{t}\frac{e^{-x}}{x}\,dx\right](s)=\frac{\ln(s+1)}{s}.$$
However I don't know how to use the Final Value Theorem in order to get the same answer. Maybe you can take a look at this answer Proving of Integral $\int_{0}^{\infty}\frac{e^{-bx}-e^{-ax}}{x}dx = \ln\left(\frac{a}{b}\right)$ where the Frullani's theorem is proved by using the Laplace transform.


问:
Directional derivatives at $P$ are all derivations at $P$
Hi i am reading An introduction to Manifolds by Loring. And have one doubt under section 2.3 Derivations at a point. It is written that

we know that directional derivatives at $p$ are all derivations at $p$, so there is a map $$\phi:T_{p}\mathbb{R}^n\to D_{p}\mathbb{R}^n\\
v\mapsto D_v=\Sigma v^i \left.\frac{\partial}{\partial x^i}\right|_p$$

My doubt is that how is there a map as defined above. For example i know that $D_v f=\Sigma v^i \left.\frac{\partial f}{\partial x^i}\right|_p$ but how does this tell us that there is a map $\phi$ from $T_{p}\mathbb{R}^n\to D_{p}\mathbb{R}^n$ ? Note that $D_{p}\mathbb{R}^n$
is the set of all derivations at $p$ and $T_{p}\mathbb{R}^n$ is the set of all tangent vectors at point $p$. For reference i am attaching the screenshot of the portion where i have highlighted the part where this is mentioned. And what does it mean to have a map $\phi$ from $T_{p}\mathbb{R}^n$ to $D_{p}\mathbb{R}^n$?

答:
It is explained in the beginning of the paragraph "Tangent Vectors in $\mathbb R^n$ as Derivations / The Directional Derivative". Tu introduces the tangent space $T_p(\mathbb R^n)$ at $p$ in $\mathbb R^n$ as the vector space of all arrows emanating from $p$. Formally it is the set of all pairs $(p,q)$ with $q \in \mathbb R^n$, that is $T_p(\mathbb R^n) = \{p\} \times \mathbb R^n$. It can be identified with $\mathbb R^n$: To any $v \in \mathbb R^n$ we can associate the arrow from $p$ to $p+v$. Conversely, to any arrow from $p$ to $q$ we can associate the vector $q - p \in \mathbb R^n$.

For each $v \in \mathbb R^n$ we have the usual directional derivative $D_v = D_v \mid_p$ at $p$. This is the map which associates to any smooth $f : U \to \mathbb R$ defined on an open  neigborhood $U$ of $p$

$$D_v(f) = \lim_{t \to 0}\frac{f(p +tv)-f(p)}{t} .$$

Tu formalizes this and gets a map
$$D_v : C^\infty_p \to \mathbb R$$
defined on the set $C^\infty_p$ of germs of smooth functions $p$. This set is an $\mathbb R$-algebra (i.e. a vector space with a compatible multiplication of its elements). Tu shows that each $D_v$ is a derivation and thus gets his linear map
$$\phi : T_p(\mathbb R^n) \to \mathcal D_p(\mathbb R^n), \phi(v) = D_v.$$
The formula $D_v =  \sum v^i \dfrac{\partial}{\partial x_i} \mid_p$ follows from the fact that $D_{e_i} = \dfrac{\partial}{\partial x_i} \mid_p$.


问:
Initial value problems for $y'=\frac{x+y}{x-y}$
The solutions of the differential equation $y'=\frac{x+y}{x-y}$, are given implicitly by the relation $$\ln x = \arctan\frac{y}{x}-\frac{1}{2}\ln(1+\frac{y^2}{x^2})+c,\enspace c\in\Bbb{R}.$$

I'm considering the existence and uniqueness of arbitrary initial value problem $y(x_0) = y_0$. Let's say we write the equation as $f(x,y)=0$. The function will be continuously differentiable in $\Bbb{R^2}$. Then by the implicit mapping theorem, if we have points $a\in A$, $b\in B$ such that $f(a,b)=0$ where $A,B$ are open sets. Then for each $x_0\in A$ there will be unique solution $y(x_0)\in B$, which is differentiable and therefore continuous. Am I missing some key insights here?

答:
Does this help:

One additional thing remains to do. Take $y=vx$, where $v$ is constant. The ODE gives $$v=\frac{1+v}{1-v} \implies v^2=-1, so this gives no real solution.

The general solution:
Ley $y=v(x)x$, where $v(x)$ is non constant. then $y'=v+xv'$ then the ODE becomes
$$v+xv'=\frac{1+v}{1-v}\implies xv'=\frac{1+v}{1-v}-v$$
$$\implies \int\frac{(1-v)dv}{1+v^2}=\int\frac{dx}{x}$$
$$\tan^{-1}v-\frac{1}{2}\ln (1+v^2)=\ln x +\ln C$$
$$\implies \tan^{-1}v=\ln Cx+\ln\sqrt{1+v^2}$$
$$\tan^{-1}(y/x)=D+\ln \sqrt{x^2+y^2}$$
which can be re written as
$$\ln x=\tan^{-1}(y/x)-\frac{1}{2} \sqrt{1+y^2/x^2}+D$$


问:
Can we make a theory of small categories?
I'm starting Model Theory: An Introduction by David Marker. After reading about an $\mathcal{L}$-theory for a language $\mathcal{L}$, I wanted to try to make a theory of small categories. Can this be done?

My instinct for an approach is to start with a set $X$ of objects and actually create a theory for the morphisms of the category. So I want some "partial operation" $\circ$, which I was going to do by adding a constant symbol $u$, for undefined, and create rules for when I can compose morphisms. I think I could figure that out, but I also really want an axiom like $\forall f \:\exists x\in X\: f\circ 1_x = f$. But of course, I am not allowed to quantify over this random set $X$. Even if I put constants $1_x$ in my language, I also cannot quantify over subsets of the universe. Thoughts?

答:
Giving a theory of the morphisms is a good idea.  One way to see this is that you want the structure-preserving maps between categories to be functors, and a functor is a functional relationship on objects and morphisms.  But notice that a functor $F : \mathcal{C} \to \mathcal{D}$ has to satisfy $1_{F(x)} = F(1_{x})$ for all $x \in \mathcal{C}$, so really you only have to specify how a structure-preserving map between categories acts on arrows: if you want to know how it acts on an object $x$, you just have to look at how it acts on $1_{x}$.  Moreover, the category axioms imply that there is a bijection between objects and identity morphisms.

So one thing we could do is to forget about the objects entirely, and cook up a theory whose domain $M$ is intended to be the set of morphisms in a category.  We want to give a partially-defined composition relation and impose some axioms on it.  Let's use your suggestion, and introduce a constant $u$ representing the "undefined morphism" and a function symbol $\circ : M \times M \to M$.  I guess you will have to give some axioms involving $u$, like $\forall f\, (f \circ u = u)$ and such.  Alternatively, you could introduce a relation $C \subseteq M \times M$ and make the signature of your function symbol $\circ : C \to M$.

For the identity axiom, we want to make sure there is an identity morphism for every object in the category.  But we want to avoid talking about objects directly.  But objects are just the things that serve as domains and codomains for morphisms.  And (co)domains are used to say which morphisms are composable.  The identity axiom says that for every morphism $f : x \to y$ there is a morphism $1_{x} : x \to x$ that's composable with $f$ and such that $f \circ 1_{x} = f$.  So we can just say that:
$$
\forall f\, \exists e\, (\{f \circ e = f\} \land \forall g\, \{[(g \circ e \not= u) \to (g \circ e = g)] \land [(e \circ g \not= u) \to (e \circ g = g)]\})
$$
and a similar axiom involving things like $e \circ -$.  Informally, this says that for every $f$ there is an $e$ that acts like the identity of the domain of $f$.
There's no reason to quantify over objects here, because what we're really after is the identity morphism, and that's just a morphism that acts as a unit.  Then all that's left is associativity.  You can formalize this as the statement that the following are equivalent:

$h \circ g \not= u$ and $g \circ f \not= u$

$(h \circ g) \circ f \not= u$

$h \circ (g \circ f) \not= u$

$(h \circ g) \circ f \not= u$ and $(h \circ g) \circ f = h \circ (g \circ f)$.

Of course, there's always more than one way to give a theory of some mathematical object.  For example, you could have a theory with a predicate $O$ that applies to objects and a predicate $M$ that applies to arrows, and ensure identity arrows with a function symbol $1 : O \to M$, or something like this.  There are lots of options.


问:
Why is the dimension of $SL(2,\mathbb{H})$ equal to $15$?
Let me ask a very basic question which is inspired by reading M. Atiyah's "Geometry and physics of knots". Could you explain me (or give a reference to) the definition of the special linear group $SL(2,\mathbb{H})$?

What I don't understand is how to compute the determinant of a matrix with noncommutative entries. Further, even if there was some way to define it, the naive counting gives $12$ for the dimension of $SL(2,\mathbb{H})$, whereas it is clear from the context that it should be equal to $15$.

To solve the contradiction I thought that, probably, $SL(2,\mathbb{H})$ is not defined as a matrix group with determinant equal to $1$, but rather as a group of fractional linear transformations of $\mathbb{HP}^1$. Could someone please confirm if this is correct?

Thank you in advance.

答:
Lie algebra $sl_2(\mathbb H)$ is easier to define: it's the Lie algebra generated by traceless matrices. In non-commutative case the space of traceless matrices is not closed under Lie bracket — that's why dim>12. In fact, $sl_2(\mathbb H)$ is the Lie algebra of matrices with pure imaginary trace.

$SL(2,\mathbb R)\cong Spin(2,1)$, $SL(2,\mathbb C)\cong Spin(3,1)$. Now $Spin(5,1)$ is connected and 1-connected, has Lie algebra $sl_2(\mathbb H)$ (and acts by conformal transformations on $\mathbb HP^1$, btw) — so $SL(2,\mathbb H)\cong Spin(5,1)$ (and is 15-dimensional). (All this is explained somewhere in Baez's Octonions, I believe.)

It seems (after googling) that $SL_2(\mathbb H)$ can also be defined as the commutator subgroup of $GL_2(\mathbb H)$ and this is exactly the subgroup of matrices with Dieudonné determinant equal to 1.


问:
Why is $A ∪ B$ called "A or B" when $A ∪ B$ means all elements in $A$, $B$ and their intersection?
Definition: $A ∪ B$ is the set of elements that is contained in either $A$ or $B$, or in both.

My question: why is $A ∪ B$ called "A or B" when $A ∪ B$ is literally everything that is in $A$,$B$ and their intersection.

For example, a Venn diagram of $A ∪ B$ is having both circles A and B shaded in: $A$, $B$, and  $A ∩ B$. However, my confusion is that I interpret the definition above as selecting only one of the following, since it says "or":

$A = A ∩ B^{c}$

$B = A^{c} ∩ B$

"in both" = $A ∩ B$

It is clear that if I combine all three subsets above, then I will have $A ∪ B$. But the definition says "or" which makes me think I am selecting strictly one of the three possible subsets above. So why is $A ∪ B$ called "A or B" rather than "A,B, A and B"

答:
That's because, in logic terms, it means "$A$ or $B$".

Imagine you have the universe $U$ that contains the sets $A$ and $B$, and imagine you are going to choose a random point of the universe $U$. After you have chosen it, you will obtain a TRUE result if that point verifies that it's contained in $A$. Also, if that point is contained in $B$, the result will also be TRUE, and a FALSE result if none of these conditions are verified. Obviously, when choosing a point that belongs both to $A$ and $B$, the outcome will be true because it verifies it's in $A$. Then, it's clear that the set that will lead you to TRUE results is $A\cup B$, to be said, "$A$ or $B$" not excluding intersection. The other possible definitions you're trying to give to it are assuming that your "OR" condition is exclusive, but the operator does not mean that.

To be said, the logical operator $\cup$ equals the operator "OR" and that's not excluding the intersection. If you wanted to exclude the intersection, $(A\setminus B)\cup(B\setminus A)$ is the correct expression, since $\cup$ will include any point that belongs to $A$ or $B$ not caring about intersection (a point that belongs to $A\cap B$ belongs to $A$, so it must be inside $A\cup B$).


问:
How is the uniform boundedness principle compatible with this seemingly weak convergent sequence?
In showing that $(x_i\rightharpoonup x)\not\Rightarrow(x_i\to x)$ or similar noncorallaries, one frequently uses the counterexample
$$
  (u_i)_{i\in\mathbb{N}}\in \ell^2\colon \quad u_i = (\underbrace{0,\ldots,0}_{i-1},1,0,\ldots)
$$
This, if I can trust my professor, is a weak convergent sequence in $\ell^2$, because it is bounded (I apparently missed that bit, this was the cause of the confusion) and for each $\varphi_j=(0,\ldots,1,0,\ldots)$, there exists an $N\in\mathbb{N}$, namely $N=j$, such that for every $i>N$,
$$
  \langle u_i, \varphi_j \rangle_{\ell^2} = 0 + \ldots + 0\cdot1 + 0 + \ldots + 1\cdot 0 + 0\ldots = 0 < \varepsilon
$$
for all $\varepsilon>0$. Because the $\varphi_j$ form a complete orthonormal system in $\ell^2$, this is sufficient for $(u_i)_i$ to be weakly convergent.

The problem is now: consider the sequence
$$
  (v_i)_{i\in\mathbb{N}}\in \ell^2\colon \quad v_i = (\underbrace{0,\ldots,0}_{i-1},i,0,\ldots).
$$
You could show that this is weakly convergent in exactly the same way as I just did for $(u_i)_i$, but on the other hand, $(v_i)_i$ is obviously an unbounded sequence and according to the principle of uniform boundedness (which I don't quite understand) every weak convergent sequence is bounded.

So what's wrong here?

Well, as the answers pointed out that it was the requirement of $(u_i)$ being bounded which was necessary for using just the $\varphi_j$ to show weak convergence.

答:
I must say that I don't like the way you phrase your professor's proof at all, as there is a crucial ingredient missing (either this was a major mistake on your professor's side, or you forgot something). Namely boundedness of the sequence $(u_i)$.

First recall Bessel's inequality: For an orthonormal system $(u_{i})$ and all $x \in H$ the inequality
$$\sum_{i} |\langle x, u_{i} \rangle|^2 \leq \Vert x \Vert^2$$
holds. This implies that we must have $\langle x, u_i \rangle \to 0$ for all $x$, and hence an orthonormal system converges weakly to zero. (that's my preferred way of showing that an orthonormal system converges weakly to zero). Note also that an orthonormal system is bounded, as $\|u_{i}\| = 1$.

Now there is the following result (which I guess was what your professor was referring to):

A sequence $(u_{i})$ converges weakly to zero if and only if it is bounded and there exists an orthonormal basis $(\phi_{n})$ such that $\langle u_{i}, \phi_{n} \rangle \to 0$ as $i \to \infty$ for all $n$.

Indeed, if $u_{i}$ converges weakly to zero then the condition is clearly fulfilled for any orthonormal basis by Bessel's inequality and the sequence is bounded by the uniform boundedness principle.

Conversely, assume that $\Vert u_{i} \Vert \lt C$ for all $i$ and assume that there exists an orthonormal basis such that $\langle u_{i}, \phi_{n} \rangle \to 0$ as $i \to
\infty$ for all $n$. Fix $\varepsilon \gt 0$. Bessel's inequality tells us that for every $x \in H$ there exists $N$ such that $\langle x, \phi_{n} \rangle \leq \varepsilon$ for all $n \geq N$. Choose $i$ so large that $\langle \phi_{k}, u_{i} \rangle \leq \varepsilon$ for all $k \lt N$. Then we can estimate
$$|\langle u_{i}, x \rangle| = \left\vert \langle u_{i}, \sum_{n} \langle x_{i}, \phi_{n} \rangle \phi_{n} \rangle  \right\vert\leq \sum_{k \lt N} \underbrace{|\langle u_{i}, \phi_{k}\rangle|}_{\leq \varepsilon}\, \underbrace{|\langle x, \phi_{k} \rangle|}_{\leq \|x\|} + \sum_{n \geq N} \underbrace{|\langle u_{i}, \phi_{n}\rangle|}_{\lt C}\, \underbrace{|\langle x, \phi_{n} \rangle|}_{\leq \varepsilon} $$
so that $|\langle u_{i}, x \rangle| \lt (\|x\| + C)\varepsilon$ for all large enough $i$. As $\varepsilon \gt 0$ was arbitrary this means that $|\langle u_{i}, x \rangle| \to 0$ for all $x$, and hence $u_{i}$ converges weakly to zero.

As Luboš pointed out, your sequence $(v_i)$ does not converge weakly to zero. The above criterion is not applicable, as your sequence is not bounded. Indeed, it's the canonical example showing that assuming boundedness is indeed necessary in that criterion.

Since you said that the uniform boundedness principle is still a bit of a mystery to you, I can't do better than recommend Alan Sokal's recent article A really simple elementary proof of the uniform boundedness theorem in which he gives a proof that gets away without using any Baire-trickery.


答: Well, two statements, first statement ($p$) "$x$ in $A$", second statement ($q$) $x$ in $B$. $p$ or $q$ true iff at least one of them true.

Title: Why is $A ∪ B$ called "A or B" when $A ∪ B$ means all elements in $A$, $B$ and their intersection?

Body:
Definition: $A ∪ B$ is the set of elements that is contained in either $A$ or $B$, or in both.

My question: why is $A ∪ B$ called "A or B" when $A ∪ B$ is literally everything that is in $A$,$B$ and their intersection.

For example, a Venn diagram of $A ∪ B$ is having both circles A and B shaded in: $A$, $B$, and  $A ∩ B$. However, my confusion is that I interpret the definition above as selecting only one of the following, since it says "or":

$A = A ∩ B^{c}$

$B = A^{c} ∩ B$

"in both" = $A ∩ B$

It is clear that if I combine all three subsets above, then I will have $A ∪ B$. But the definition says "or" which makes me think I am selecting strictly one of the three possible subsets above. So why is $A ∪ B$ called "A or B" rather than "A,B, A and B"


问:
Ideas on how to integrate $\int \frac{dx}{\sqrt{(a-x)(x-b)(x^2+q+px)}}$ where $a>b$
I am trying to integrate $$\int \frac{dx}{\sqrt{(a-x)(x-b)(x^2+q+px)}},$$ where $a>b$, and $p$ and $q$ are real positive constants.

I would be very grateful if I can get some hints on how to proceed. Wolfram Mathematica tells me that this will be giving me an ellpitic integral.

答:
Yes, it has the structure of an Elliptic integral. You cannot solve it in terms of elementary functions, so you have to accept W. Mathematica's result, which is the only "true" result you can get.

By the way, for the curious people, the result is:

$$\frac{2 (a-x) \left(a \left(x-\sqrt{-\text{px}-q}\right)+x \sqrt{-\text{px}-q}+\text{px}+q\right) \sqrt{\frac{a \left(-x \sqrt{-\text{px}-q}+\text{px}+q\right)-(\text{px}+q) \left(\sqrt{-\text{px}-q}+x\right)}{(a-x) (\text{px}+q)}} \sqrt{\frac{(b-x) \left(a^2+\text{px}+q\right)}{(a-x) \left(a \left(b-\sqrt{-\text{px}-q}\right)+b \sqrt{-\text{px}-q}+\text{px}+q\right)}} F\left(\sin ^{-1}\left(\frac{\sqrt{\frac{(\text{px}+q) \left(\sqrt{-\text{px}-q}-x\right)+a \left(\text{px}+q+x \sqrt{-\text{px}-q}\right)}{(\text{px}+q) (a-x)}}}{\sqrt{2}}\right)|-\frac{2 (a-b) \sqrt{-\text{px}-q}}{\text{px}+q+a \left(b-\sqrt{-\text{px}-q}\right)+b \sqrt{-\text{px}-q}}\right)}{\left(a^2+\text{px}+q\right) \sqrt{\frac{a \left(x \sqrt{-\text{px}-q}+\text{px}+q\right)+(\text{px}+q) \left(\sqrt{-\text{px}-q}-x\right)}{(a-x) (\text{px}+q)}} \sqrt{(a-x) (x-b) \left(\text{px}+q+x^2\right)}}$$

EDIT

As suggested by @Claude Leibovici, one can write $x^2+px+q$ as $(x-c)(x-d)$ (in a way such that $q = cd$ etc...), and get the more suitable solution:

$$\frac{2 (x-b) (x-d) \sqrt{\frac{(a-b) (c-x)}{(a-x) (c-b)}} F\left(\sin ^{-1}\left(\sqrt{\frac{(a-d) (b-x)}{(b-d) (a-x)}}\right)|\frac{(a-c) (b-d)}{(b-c) (a-d)}\right)}{(b-d) \sqrt{\frac{(a-b) (a-d) (b-x) (x-d)}{(a-x)^2 (b-d)^2}} \sqrt{(a-x) (x-b) (x-c) (x-d)}}$$

EDIT 2

Due to some considerations, we can simplify the non Elliptic terms to get

$$-\frac{2 (b-x) (x-d) \sqrt{\frac{x-c}{(x-a) (c-b)}}}{\sqrt{\frac{(a-d) (x-b) (d-x)}{(a-x)^2}} \sqrt{(x-a) (b-x) (x-c) (x-d)}} \times \text{Elliptic Term}$$

Due to the unknown nature of $x$ and of $a$ wrt $b$ and $c$ wrt $d$, we cannot simplify it more, I believe.

EDIT 3 - A Very Special Case

If we assume that $x>c$, $x>a$, $c>b$, $d>a$, we get

$$\frac{-2\text{sgn}(d-x) F\left(\sin ^{-1}\left(\sqrt{\frac{(a-d) (b-x)}{(b-d) (a-x)}}\right)|\frac{(a-c) (b-d)}{(b-c) (a-d)}\right)}{\sqrt{(a-d) (-(b-c))}}$$


问:
Show that if $a$ and $b$ are positive integers and $a\mid b$, then $a\leq b$
I know that the direct proof is pretty straightforward but I wanted to try proving by the contrapositive. So I would like a proof-verification but also I would like some feedback on the proof-writing because sometimes I feel like I might be a bit to long-winded. Thanks in advance!

Proceeding by the contrapositive we suppose $a>b$ and show that $a\nmid b$. Dividing through the inequality by $a$ (okay since $a\in \mathbb{Z^{+}}$) we get that $\dfrac{b}{a}<1$. In particular we have that $0<\dfrac{b}{a}<1$ since both $a$ and $b$ are positive integers. This implies that $a\nmid b$, which we wanted to show.

答:
You asked for comments on your proof, so I hope the following is of interest.

While the proof is valid (assuming knowledge about rational numbers) I don’t feel this kind of argument to be compelling, as it uses much more machinery than needed (why can you divide through $a$ if $a$ doesn’t divide $b$? Why can you divide inequalities? why is positive/positive again positive? etc. etc.). The far more immediate contrapositive is (using $an\geq a \forall n\in \Bbb N$) that if $a>b$ any multiple $an > b$, so $a\not\mid b$... This argument uses nothing more than monotonicity of multiplication in $\Bbb N$!


问:
What is the expected cost of using LDA?
Suppose that you observe $(X_1,Y_1),...,(X_{100}Y_{100})$, which you assume to be i.i.d. copies of a random pair $(X,Y)$ taking values in $\mathbb{R}^2 \times \{1,2\}$.

I have that the cost of misclassification are equal, $c_1=c_2=1$.

The distributions $X|Y=1$ and $X|Y=2$ are each rotationally symmetric.

I would like to perform LDA to classify the data points.

I have that $a=\hat\Sigma^{-1}_p(\hat{\mu}_1-\hat{\mu}_2)=(0.132-0.0732)$ and $\frac{1}{2}a^T(\hat{\mu}_1+\hat{\mu}_2)\approx 0$

And now I would like to calculate the approximate expected cost of using LDA.

So, in the textbook i'm using, the expected cost of misclassification is defined as:

Suppose we use the classification rule $g:\mathbb{R}^p\rightarrow \{1,2\}$, that assigns to group $1$ when $x \in R_1$ adnto group $2$ when $x\in R_2$. The expected cost of misclassification associated to the rule $g$ is $$\mathbb{E}[\text{cost}(Y,g(X))]=c_2\mathbb{P}(x\in R_1 | Y=2)\pi_2+c_1\mathbb{P}(x\in R_2 | Y=1)\pi_1$$
Where $\pi_1=\mathbb{P}(Y=1|x)$ and $\pi_2=\mathbb{P}(Y=2|x)$

And so my attempt is:

$$\mathbb{E}[\text{cost}(Y,g(X))]=c_2\mathbb{P}(x\in R_1 | Y=2)\pi_2+c_1\mathbb{P}(x\in R_2 | Y=1)\pi_1=\mathbb{P}(0.132x_1-0.0732x_2\gt 0|Y=2)\pi_2+\mathbb{P}(0.0132x_1-0.0722x_2 \lt 0|Y=1)\pi_1$$

And i'm stuck here. I'm not sure how to continue from here. In particular, I don't know what $\mathbb{P}(0.0132x_1-0.0722x_2 \lt 0|Y=1)$ and $\mathbb{P}(0.132x_1-0.0732x_2\gt 0|Y=2)$ are equal to, also $\pi_1,\pi_2$.

答:
Your description makes it seem like we assume $E[x\mid y=c_1] = E[x\mid y=c_2]=0$ (otherwise, let me know). Then from the statement

The distributions X|Y=1 and X|Y=2 are each rotationally symmetric.

We can conclude that any decision boundary that's just a straight line through the origin will have an accuracy of precisely 50%. We can prove this intuitive observation as follows: Since the distributions are rotationally symmetric,  there exists $g_i\colon\mathbb R_{\ge 0}\to\mathbb R_{\ge 0}$ such that $p(x\mid y=c_i) = g_i(\|x\|_2)$.

In particular, note that $\|Rx\|_2^2 =x^TR^TRx=x^T x = \|x\|_2^2$ for any rotation matrix $R$.

Now, we want to figure out

$$Pr(a^T x>0\mid y=c_i)
= \int\limits_{\{x:a^Tx>0\}} p(x\mid y=c_i) dx
= \int\limits_{\{x:a^Tx>0\}} g_i(\|x\|_2) dx$$

Now, we can rotate the coordinate system by 180 degree such that $a$ is mapped onto $-a$, by substituting $x= Rz$, were $R=\big(\begin{smallmatrix}\cos(\theta)&-\sin(\theta)\\ +\sin(\theta)&\cos(\theta)\end{smallmatrix}\big)$ for $\theta=\pi$.

$$\int\limits_{\{x:a^Tx>0\}} g_i(\|x\|_2) dx
=\int\limits_{\{z:a^TRz>0\}} g_i(\underbrace{\|Rz\|_2}_{=\|z\|_2}) \underbrace{|\det(R)|}_{=1}dz
=\int\limits_{\{z:a^Tz<0\}} g_i(\|z\|_2)dz
$$

Which is the same as $Pr(a^T x<0\mid y=c_i)$, and thus

$$ 1 = Pr(a^T x<0\mid y=c_i) + Pr(a^T x>0\mid y=c_i) = 2Pr(a^T x>0\mid y=c_i)$$

so $Pr(a^T x>0\mid y=c_i)=\frac{1}{2}$ for any $a\neq 0$

Title: What is the expected cost of using LDA?


问:
Determine all complex numbers for which: Arg(z^5 ) = π/2 an |z| = 2.
I came across this question on a complex analysis course, and my idea of the solution starts with Arg(z^5)=Arg(zzzzz)=Arg(z+z+z+z+z)=π/2 =>Arg(z)=π/10. But i cant describe the |z|=2.

答:
Assume $z=\rho e^{i\theta}$, that means $|z|=\rho$ and $\arg(z)=\theta$. Then $\rho=2$, and
$$\arg(z^5)=\arg(\rho^5e^{i 5\theta})=5\theta=2k\pi+\dfrac{\pi}2, \quad k=0,1,2,\dots$$
then
$$\theta=\dfrac25k\pi+\dfrac{\pi}{10}=\dfrac1{10}\pi,\dfrac12\pi,\dfrac{9}{10}\pi,\dfrac{13}{10}\pi,\dfrac{17}{10}\pi.$$


答:
If $z = re^{i\theta}$ then $z^5 = r^5 e^{5i\theta}$.

$r$ is already given as $|2|$, so the problem reduces to finding all possible values of $\theta$, within a modulus of $(2\pi)$, such that

$$5\theta \equiv (\pi/2) \pmod{2\pi}.$$

One easy approach is to presume that $(5 \theta)$ must be an element in

$$\{(\pi/2), (2\pi + \pi/2), (4\pi + \pi/2), (6\pi + \pi/2), (8\pi + \pi/2)\}.$$

This results in [within a modulus of $(2\pi)$],

$$\pi \in \{(\pi/10), (\pi/2), (9\pi/10), (13\pi/10), (17\pi/10)\}.$$

Title: Determine all complex numbers for which: Arg(z^5 ) = π/2 an |z| = 2.

Body: I came across this question on a complex analysis course, and my idea of the solution starts with Arg(z^5)=Arg(zzzzz)=Arg(z+z+z+z+z)=π/2 =>Arg(z)=π/10. But i cant describe the |z|=2.


问:
minimum distance between a point and a compact set
Let $(X,d)$ be a metric space and $Y$ be a compact subset of $X$. Show that if $x \notin Y$, then

$$ d(x,Y) = \inf_{y \in Y} \{d(x,y)\} >0$$

The statement seems quite simple to imagine but I do not know how to prove it. Any suggestion?

答:
Hint

Suppose $\inf_{y\in Y}d(x,y)=0$. Let $(y_n)\in Y^{\mathbb N}$ s.t. $$\lim_{n\to \infty }d(x,y_n)=0.$$

Use compactness of $Y$ (or rather the fact that $Y$ is closed) to prove that $x\in Y$, what will be a contradiction.

An other proof

Since $Y^c$ is open, there is $\delta >0$ s.t. $B_d(x,\delta )\subset Y^c$, where $B(x,\delta )$ denotes the ball centered at $x$ and of radius $\delta $). Therefore $d(x,Y)\geq \delta >0$.


问:
Complex roots for a 5th root
I'm asked to find all 5th roots of the complex number $z=-243$.

For this question. I got the complex roots as $3e^{\frac{i \pi}{5}}$,$3e^{\frac{3i \pi}{5}}$,$3e^{\pi}$,$3e^{\frac{7 i \pi}{5}}$,$3e^{\frac{9 i \pi}{5}}$.

However, wolfram alpha is giving me negative angles for the last two roots. Why is that? Is it wrong to use $\frac{7 \pi}{5}$ and $\frac{9 \pi}{5}$ for my angles?

Wolfram alpha says $3e^{\frac{-i \pi}{5}}$,$3e^{-\frac{3i \pi}{5}}$ as the last two values instead of $3e^{\frac{7 i \pi}{5}}$,$3e^{\frac{9 i \pi}{5}}$.

I get that the range of $\arctan(x)$ is between $\left(\frac{-\pi}{2},\frac{\pi}{2}\right)$ and I notice that subtracting $2 \pi$ from $\frac{7 \pi}{5}$ and $\frac{9 \pi}{5}$ I get the angles from wolfram alpha but I'm not sure how that works.

Aren't the angles for $\arctan(x)$ suppose to fall between $\left(\frac{-\pi}{2},\frac{\pi}{2}\right)$ or quadrant $\text{IV}$ and $\text{I}$? The angles I get aren't falling in that range should would I not subtract $\pi$ and not $2\pi$?

答: Both answers are correct, since $e^{7\pi i/5}=e^{-3\pi i/5}$ and $e^{9\pi i/5}=e^{-\pi i/5}$.

Title: Complex roots for a 5th root


答:
Welcome to MSE!

While people have studied notions of model theory with partial functions (though in my experience, the universal algebraists tend to be slightly more excited by these things), there are two possibilities for a cleaner approach. For completeness sake, you can find some information about "partial algebras" here, and "free logic" here.

The first cleaner approach is to simply make composition a relation. After all, a partial function is still a relation, and model theory is perfectly well equipped to handle relations with certain axioms!

Then we might formulate a first order notion of a category as a $2$-sorted theory (with a set $\mathsf{Ob}$ of objects and a set $\mathsf{Mor}$ of morphisms) equipped with three function symbols

$\text{dom} : \mathsf{Mor} \to \mathsf{Ob}$

$\text{cod} : \mathsf{Mor} \to \mathsf{Ob}$

$\text{id} : \mathsf{Ob} \to \mathsf{Mor}$

and one relation symbol

$\text{comp} \subseteq \mathsf{Mor} \times \mathsf{Mor} \times \mathsf{Mor}$

Then one can include axioms like

$$
\forall x : \mathsf{Ob} .
\forall f : \mathsf{Mor} .
\text{dom}(f) = x \to \text{comp}(f,\text{id}(x),f)
$$

This axiom says that, if the domain of $f$ is $x$, then $f \circ \text{id}(x)$ is defined and equals $f$.

You might also want an axiom

$$
\forall f : \mathsf{Mor} .
\forall g : \mathsf{Mor} .
\text{dom}(f) = \text{cod}(g) \to
\exists h : \mathsf{Mor} . \text{comp}(f,g,h)
$$

This axiom says that for any two composable morphisms, a composite actually exists.

You can imagine similar axioms asserting composition is associative, etc.

As a (fun?) exercise, you should try to list all the axioms in this way. Keep in mind you'll need to add some silly looking axioms like
$\forall x : \mathsf{Ob} . \text{dom}(\text{id}(x)) = x$ and an axiom saying that for noncomposable morphisms, a composite doesn't exist.

The other way to handle a theory of categories is to move to something slightly more expressive than first order logic. This is the approach taken by many categorical logicians, as it lets us talk about a theory of categories "internal" to another category. It's a little bit more complicated, so I won't say much about it, but you can find a good discussion in Awodey's Lecture Notes on Categorical Logic. In particular in catlog2a, section 2.3.1.

The idea is to work with a theory that allows "subtypes". This gives us the power to quantify over definable subsets, which is all we need to handle composition. After all, if we have two basic sorts $\mathsf{Ob}$ and $\mathsf{Mor}$, then we can define a new sort

$$
C \triangleq \{ (f,g) : \mathsf{Mor} \times \mathsf{Mor} ~|~ \text{dom}(f) = \text{cod}(g) \}
$$

and a function $\circ : C \to \mathsf{Mor}$ denoting composition.

Again, as a (fun?) exercise, you might try to explicitly write down the axioms with this new power at your disposal.

I hope this helps ^_^

Title: Can we make a theory of small categories?

Body:
I'm starting Model Theory: An Introduction by David Marker. After reading about an $\mathcal{L}$-theory for a language $\mathcal{L}$, I wanted to try to make a theory of small categories. Can this be done?

My instinct for an approach is to start with a set $X$ of objects and actually create a theory for the morphisms of the category. So I want some "partial operation" $\circ$, which I was going to do by adding a constant symbol $u$, for undefined, and create rules for when I can compose morphisms. I think I could figure that out, but I also really want an axiom like $\forall f \:\exists x\in X\: f\circ 1_x = f$. But of course, I am not allowed to quantify over this random set $X$. Even if I put constants $1_x$ in my language, I also cannot quantify over subsets of the universe. Thoughts?


问:
Prove that $\left \lfloor \frac{1+\lfloor na+1/a\rfloor}{a} \right \rfloor=n$
If $a \geq \frac{1+\sqrt{5}}{2}$ and $n \in \Bbb W$, prove that
$$\left \lfloor \frac{1+\left\lfloor \frac{1+na^2}{a}\right\rfloor}{a} \right \rfloor=n.$$

I could prove only when $a$ is an integer, that is $a \geq 2$. If $a \in \Bbb Z$ we have: $$\left \lfloor \frac{1+na^2}{a} \right \rfloor=na+\left\lfloor \frac{1}{a} \right\rfloor=na$$ so we get: $$\left \lfloor \frac{1+\left\lfloor \frac{1+na^2}{a}\right\rfloor}{a} \right \rfloor=\left \lfloor \frac{1+na}{a} \right \rfloor=n+\left\lfloor \frac{1}{a} \right\rfloor=n.$$ But what if $a \notin \Bbb Z$?

答:
We need to prove

$$ \frac{1+\lfloor \frac{1+na^2}{a}\rfloor}{a} \geqslant n $$

$$ \frac{1+\lfloor \frac{1+na^2}{a}\rfloor}{a} < n+1 $$

$$ 1+\left\lfloor \frac{1+na^2}{a}\right\rfloor  > \frac{1+na^2}{a} > an$$

so dividing by $a$ we obtain what we wanted to.

$$ \frac{1+\lfloor \frac{1+na^2}{a}\rfloor}{a} \leqslant \frac{1+\frac{1+na^2}{a}}{a}$$

and

$$ 1+na^2 \leqslant na^2+a^2-a $$

since $0 \leqslant a^2 - a-1 = \left(a - \frac{1+\sqrt{5}}{2}\right)\left(a - \frac{1-\sqrt{5}}{2}\right)$, so after some transformations we arrive at

$$ \frac{1+\lfloor \frac{1+na^2}{a}\rfloor}{a} \leqslant n+1 $$

Now, the equality may hold only if both inequalities we used are actually equalities, so $a = \frac{1+\sqrt{5}}{2}$ and $\frac{1+na^2}{a}$ is an integer. But since $a^2=a+1$,

$$ \frac{1+na^2}{a} = \frac{(n+1) + na}{a} = \frac{n+1}{a} + n, $$

which is irrational, in particular it can't be integer.


问:
Switching rows and switching columns in an $n\times n$ chessboard leaves the board unchanged if the first row and first column are unchanged
Consider an $n\times n$ matrix, over $\mathbb{F}_2$, arranged in a chessboard like manner: the neighbors of a $1$ are all $0$'s, and vice versa. Here's an example with $n=3$
$$
\begin{bmatrix}
1 & 0 & 1\\
0 & 1 & 0\\
1 & 0 & 1
\end{bmatrix}
$$
We'll say such a matrix is ordered.

Define a shuffle of such a matrix to be the resulting matrix after a finite number of row switching $R_i \leftrightarrow R_j$, and column switching $C_i \leftrightarrow C_j$ have been applied to an ordered matrix.

It seems reasonable that if a shuffle has both its first row and its first column in order, then the matrix is ordered (likewise for any row and column). I need help in proving it, or finding a counter-example.

答:
If the same permutation is applied to identical sequences, they remain identical; if the same permutation is applied to complementary sequences, they remain complementary. So permuting columns doesn't change which rows are identical and which are complementary; and permuting rows doesn't change which columns are identical and which are complementary.

Furthermore, two rows are identical precisely when their first-column elements are the same, and complementary precisely when their first-column elements differ. The analogous statements hold for columns.

So if, after permutation of rows and columns, row $1$ looks like
$$
\begin{bmatrix} 1 & 0 & 1 & 0 & 1 & \ldots\end{bmatrix}
$$
then columns $3,\ 5,\ 7, \ldots$ are identical to column $1$ and columns $2,\ 4,\ 6,\ \ldots$ are complementary to it. And if column $1$ looks like
$$
\begin{bmatrix} 1 & 0 & 1 & 0 & 1 & \ldots\end{bmatrix}^T
$$
then rows $3,\ 5,\ 7, \ldots$ are identical to row $1$ and rows $2,\ 4,\ 6,\ \ldots$ are complementary to it.


问:
Can't understand homework assignment
Let $p\in\mathbb{N}$ be an odd prime. Prove that if $p \equiv 3 \pmod 4$ then $−1$ is not a square modulo $p$.

$\textbf{Hint}$ : recall that $\mathbb{Z}/p\mathbb{Z}$ is a ﬁeld, so that its multiplicative group is a cyclic group
of order $p − 1$. Prove that in any such group the order of $−1$ is $(p − 1)/2$, that the
order of any square is even and deduce that the equation $x
^2 = −1$ cannot be solved
if $p \equiv 3 \pmod 4$.

I can't understand the Hint. What does it mean "in any such group"? I mean, what is $-1$ in a generic cyclic group of order $p-1$? Suppose the group is the multiplicative group of $\mathbb{Z}/p\mathbb{Z}$. Why the order is claimed to be $(p-1)/2$?? Isn't the order of $-1$ always equal to $2$?

答:
That hint seems to be using a very different definition of "order" than many of use would use, since clearly $\;(-1)^2=1\,$ in any field, but as suggested it maybe the power to which a primitive element$\,w\,$ must be raised to get $\,-1\,$ , which is then clearly $\,\displaystyle{\frac{p-1}2}\,$ . Now

$$x^2=-1=w^{\frac{p-1}2}\implies x^4=w^{p-1}=1$$

from where we'd get $\,4\mid p-1\,$ , which is absurd since $\,p=3k+4\implies p-1=3k+2\,$ , and this isn't divisible by four...

Title: Can't understand homework assignment


问:
Using 6 Sided Dice to Get an Even Distribution of Numbers $1$ to $50$
Is this possible?

I have a $6$ sided dice (call it a $d6$).

I want a way of getting an even distribution of the numbers $1$ to $50$ using that dice with no or minimal rerolls.

A way with a lot of rerolls.

A. Roll d6. $1 - 3 $means use table $A$, $4 - 6$ means use table $B$.

B. Table $A$ needs you to roll $2$ dice. First Dice gives you the column and second dice gives you the row. The numbers $1$ to $25$ are in the table, with the other $11$ spaces telling you to reroll. (Table B is similar, but with numbers $26$ to $50$).

The only problem with this is there are $22$ reroll spaces.

What I want is a way to get an even distribution, but with no rerolls or very few.

答: Probably the best you can do is to convert any $3$ rolls to a number $1-50$ as follows : If the rolls give $a,b,c$ , then the number is $$36(a-1)+6(b-1)+c$$ If $a>2$ , then you can stop since the number must then exceed $50$, so you can ignore all trials where the first roll is more than $2$. If we have $a=2$ , the second roll is not allowed to exceed $3$, again you can save a roll if $3$ is exceeded.


答:
The function $y \to d(x,y)$ is continuous on $Y$, only assumes values in $(0,+\infty)$, and so by compactness has a minimal value $m_0 >0$. Then $d(x,Y)=m_0>0$.

Or assume $d(x,Y)=0$ so that for each $n \in \Bbb N^+$ we have some $y_n \in Y$ such that $d(x,y_n) < \frac1n$.

As $Y$ is compact we have some subsequence $(y_{n_k})_k$ and some $y_0 \in Y$ such that $y_{n_k} \to y_0$ as $k\to \infty$.

But then $d(x,y_0) \le d(x,y_{n_k}) + d(y_{n_k}, y_0) < \frac{1}{n_k} + d(y_{n_k}, y_0) \to 0 (k \to \infty)$, so that $d(x,y_0)= 0$ and this would implies $x=y_0$ contradiction as $x \notin Y$. So $d(x,Y) >0$.

Title: minimum distance between a point and a compact set

Body:
Let $(X,d)$ be a metric space and $Y$ be a compact subset of $X$. Show that if $x \notin Y$, then

$$ d(x,Y) = \inf_{y \in Y} \{d(x,y)\} >0$$

The statement seems quite simple to imagine but I do not know how to prove it. Any suggestion?


答: We wish to show that $\exists\epsilon\in[0,1)$ such that $$1+\left\lfloor\frac1a+na\right\rfloor=a(n+\epsilon)=na+\epsilon a\implies\left\lfloor\frac1a+\{na\}\right\rfloor=\{na\}+b$$ where $b=\epsilon a-1\in[-1,a-1)$. As the LHS is either $0$ or $1$, either $b=-\{na\}$ or $1-\{na\}$ so we will always find an $\epsilon\in(0,1)$ except the case where $$b=1-\{na\}>a-1\implies\{na\}<2-\phi$$ as $a\ge\phi$. This means that $$\frac1a+\{na\}<\frac1a+2-\phi\le\frac1\phi+2-\phi=1\implies\left\lfloor\frac1a+\{na\}\right\rfloor=0$$ which is a contradiction as $b=1-\{na\}$.

Title: Prove that $\left \lfloor \frac{1+\lfloor na+1/a\rfloor}{a} \right \rfloor=n$

Body:
If $a \geq \frac{1+\sqrt{5}}{2}$ and $n \in \Bbb W$, prove that
$$\left \lfloor \frac{1+\left\lfloor \frac{1+na^2}{a}\right\rfloor}{a} \right \rfloor=n.$$

I could prove only when $a$ is an integer, that is $a \geq 2$. If $a \in \Bbb Z$ we have: $$\left \lfloor \frac{1+na^2}{a} \right \rfloor=na+\left\lfloor \frac{1}{a} \right\rfloor=na$$ so we get: $$\left \lfloor \frac{1+\left\lfloor \frac{1+na^2}{a}\right\rfloor}{a} \right \rfloor=\left \lfloor \frac{1+na}{a} \right \rfloor=n+\left\lfloor \frac{1}{a} \right\rfloor=n.$$ But what if $a \notin \Bbb Z$?


问:
Global maximum and minimum on a sphere
I have a sphere $x^2+y^2+z^2=R^2$ and i have $T=C(x^2+2y^2+3z^2+2xy+2xz)$ temperature function. I need to find maximum and minimum of this temperature function.
First i tried to calculate $\partial_x f=2x$,
$ \partial_y f=2x$,
$ \partial_z f=2z $

$\partial_x T=2x+2y+2z $, $\partial_y T=4y+2x $, $\partial_z T=6z+2x $

Then I equate them $2x=\lambda(2x+2y+2z)$, $2y=\lambda(4y+2x)$, $2x=\lambda(6z+2x)$

But I cannot find lambda from here. What am I doing wrong?

答:
$T=C(x^2+2y^2+3z^2+2xy+2xz)$

As $C$ is a constant, we take $f(x,y,z) = x^2+2y^2+3z^2+2xy+2xz$

where $g(x,y,z) = x^2+y^2+z^2 - R^2 = 0$

$f(x,y,z) = \lambda g(x,y,z)$

Taking derivatives wrt $x,y,z$,

$(1-\lambda)x+y+z = 0$ ...(i)

$x + (2-\lambda)y = 0$ ...(ii)

$x + (3-\lambda)z = 0$ ...(iii)

From $(ii)$ and $(iii)$,

$y = -\frac{x}{2-\lambda}, z = -\frac{x}{3-\lambda}$ (for $\lambda \ne 2,3$)

Plugging into $(i)$,

$((1-\lambda)(2-\lambda)(3-\lambda) + 2\lambda - 5)x=0$

So either $x=0$ or

$-\lambda^3+6\lambda^2-9\lambda+1=0$ ($x\ne 0$)

$\lambda \approx 0.12061, 2.3473, 3.5321$.

We already know $y, z$ in terms of $x$ and $\lambda$. Plugging these values and using the constraint $x^2+y^2+z^2=R^2$ will give us possible values of $x$ and from there onx, values of $y, z$. We then need to check these critical points for maxima and minima.

Title: Global maximum and minimum on a sphere


问:
Differential 2-form has a primitive...
Can anybody show me a proof of this theorem? : If a differential form of degree $2$ in $R^3$ has a primitive form of degree $1$ of class $C^2$, it also has a primitive form: $u \, dx + v \, dy$ where $u,v :R^3 \rightarrow R$.</p>

答:
Sorry for the delay. I had this solution half typed out and then thought I had a counterexample. I don't. It's correct, although, interestingly, I've never seen this in my long career :)

I'm going to use subscripts for partial derivatives for ease of typing. I'm going to assume we're on all of $\mathbb R^3$ or at least a convex open subset.

Given $\eta = P\,dx+Q\,dy+R\,dz$, we want $\phi = u\,dx + v\,dy$ with $d\phi=d\eta$. So we need to find $u,v$ with
$$u_z = P_z - R_x\,, \quad v_z = Q_z-R_y\,, \quad \text{and} \quad v_x-u_y = Q_x-P_y\,.$$
We integrate the first two equations with respect to $z$, getting
\begin{align*}
u &= P - \int R_x\,dz + A \quad\text{ for some function }A=A(x,y) \text{ and}\\
v &= Q - \int R_y\,dz + B \quad\text{ for some function }B=B(x,y)\,.
\end{align*}
Then
$$v_x-u_y = Q_x - P_y - \int [R_{yx}-R_{xy}]\,dz + B_x-A_y\,.$$
By equality of mixed partials (here I'm using $\eta\in C^2$, hence $R\in C^2$), by choosing $B=A=0$, we see that we're done.

Title: Differential 2-form has a primitive...


问:
Is there an efficient systematic way to find relations between powers of Matrices?
Hi I have a 3 by 3 matrix of the following form:
$$
A=\begin{bmatrix}
a & b & 0 \\
-b & a & c \\
0 & -c & d \\
\end{bmatrix}
$$
$$a,b,c,d\in\Re $$
I'm trying to explore special relations between powers of this matrix of the form:
$$
A^n = \alpha A^m
$$
or even for the simpler case where $$a=d=0$$
The motivation is to use one of the closed form special cases for the matrix exponential, I didn't find anything so far from exploring the literature, and I wonder if there is a systematic efficient way to go about it?

Thanks!

答:
This answer is restricted to the case $a=d=0$. Then one can check that $$A^3=(b^2+c^2)A$$ So writing $\beta:=\sqrt{b^2+c^2}$, then \begin{align}
e^A&=I+A+\frac{A^2}{2!}+\cdots+\frac{A^n}{n!}+\cdots\\
&=I+\left(1+\frac{\beta^2}{3!}+\frac{\beta^4}{5!}+\cdots\right)A+\left(\frac{1}{2!}+\frac{\beta^2}{4!}+\cdots\right)A^2\\
&=I+\frac{\sinh\beta}{\beta}A + \frac{\cosh\beta-1}{\beta^2}A^2\\
&=I+uA+vA^2\\
&=\begin{pmatrix}1-vb^2&ub&vbc\\-ub&1-\beta^2v&uc\\vbc&-uc&1-vc^2\end{pmatrix}
\end{align}


问:
Find the value of k such that P(X<k)=1/3 With additional information in description
f(x)= 2(x-1)/3 in the interval 1<x<2 and 4-x/3 in the intervals 2<x<4 and 0 otherwise there are 3 f(x) and I am familiar with finding the unknown variable k when there is one f(x) but in this problem there is 2 main ones the 0 is useless but I don't know which equation to fill in the numbers I tries both but they were wrong the answers spouse to be 2 but I don't know how to get it . Any help is really appreciated! This is in the topic continuous random variables in statistics and probbaility.

答: For $x\in[1,\,2]$, the CDF is $\int_1^xf(t)dt=\tfrac13(x-1)^2$, so $P(X\le2)=\tfrac13$. You needn't consider the CDF on $(2,\,4]$, as clearly $k=2$.


答: Notice that $f(1)=0$ and $f(2)=\frac{2}{3}$. Hence for $1<x\leq2$, the region under the graph of $y=f(x)$ is a triangle with area $\frac{1}{2}\cdot\frac{2}{3}=\frac{1}{3}$. Hence $k=2$.

Title: Find the value of k such that P(X<k)=1/3 With additional information in description

Body: f(x)= 2(x-1)/3 in the interval 1<x<2 and 4-x/3 in the intervals 2<x<4 and 0 otherwise there are 3 f(x) and I am familiar with finding the unknown variable k when there is one f(x) but in this problem there is 2 main ones the 0 is useless but I don't know which equation to fill in the numbers I tries both but they were wrong the answers spouse to be 2 but I don't know how to get it . Any help is really appreciated! This is in the topic continuous random variables in statistics and probbaility.


问:
Can we simplify $\int_{0}^{\infty}\frac{{\sin}^px}{x^q}dx$?
We know the followings :
$$\int_{0}^{\infty}\frac{{\sin}x}{x}dx=\int_{0}^{\infty}\frac{{\sin}^2x}{x^2}dx=\frac{\pi}{2},\int_{0}^{\infty}\frac{{\sin}^3x}{x^3}dx=\frac{3\pi}{8}.$$
Also, we can get
$$\int_{0}^{\infty}\frac{{\sin}^3x}{x^2}dx=\frac{3\log 3}{4},\int_{0}^{\infty}\frac{{\sin}^4x}{x^3}dx=\log 2.$$
Then, I got interested in their generalization.

Question : Letting $p,q\in\mathbb N$, can we simplify the following?
  $$\int_{0}^{\infty}\frac{{\sin}^px}{x^q}dx$$

I don't have any good idea. Could you show me how to simplify this?

Update : I crossposted to MO.

答:
Let's consider $$I(k,q)=\int_0^\infty\frac{\sin^k(x)}{x^q}dx$$ where $k$ is positive integer and $q$ is rational (not necessarily an integer).

Using the formula $\frac{1}{x^q}=\frac{1}{\Gamma(q)}\int_0^\infty{t}^{q-1}e^{-xt}dt$

we get $I(k,q)=\frac{1}{\Gamma(q)}\int_0^\infty{t}^{q-1}dt\int_0^\infty\sin^k(x){e}^{-xt}dx$, where $\Gamma(x)$ is Gamma-function.

Integrating by part and grouping the terms with the same power of $\sin(x)$ we can get that

$$I(k,q)=\frac{k!}{\Gamma(q)}\int_0^{\infty}\frac{t^{q-2}}{(t^2+2^2)(t^2+4^2)...(t^2+k^2)}dt, k=2n, q>1, n=1, 2,3...$$

$$I(k,q)=\frac{k!}{\Gamma(q)}\int_0^{\infty}\frac{t^{q-1}}{(t^2+1^2)(t^2+3^2)...(t^2+k^2)}dt, k=2n-1, q>0, n=1, 2,3...$$

To evaluate the integrals let's consider the following contour: along the cut from $0$ to ${\infty}$ (along the $X$ axis), big circle of radius $R$ (counter clockwise), along the other bank of the cut back to $0$ and along a small circle $r$ around $0$ (around a brunch point of $t^q$ - $q$ is rational) to the starting point.

Making a full round in the positive direction, on the lower bank of the cut the integrand gets additional factor $e^{2\pi{iq}}$. Integral along this closed contour is equal to the sum of residuals in simple poles, and integrals along big and small circle set to zero as $R\to\infty$ and $r\to0$. So,
$$I(k,q)(1-e^{2\pi{iq}})=2\pi{i}\frac{k!}{\Gamma(q)}\sum{Res}\frac{t^{q-2}}{(t^2+2^2)(t^2+4^2)...(t^2+k^2)}, k=2n$$
$$I(k,q)(1-e^{2\pi{iq}})=2\pi{i}\frac{k!}{\Gamma(q)}\sum{Res}\frac{t^{q-1}}{(t^2+1^2)(t^2+3^2)...(t^2+k^2)}, k=2n-1$$
Finally, for even ($k=2n$), $q>1$ ($q$ - rational); $a=2, b=4, ...=k$
$$I(k,q)=\frac{-\pi{k!}}{2\Gamma(q)\cos\frac{\pi{q}}{2}}\left(\frac{a^{q-3}}{(b^2-a^2)(c^2-a^2)..(k^2-a^2)}+\frac{b^{q-3}}{(a^2-b^2)(c^2-b^2)..(k^2-b^2)}+..\right)$$
Or, after slight further simplification,
$$I(k,q)=\frac{-\pi{k!}2^{q-2n-2}}{\Gamma(q)\cos\frac{\pi{q}}{2}}\left(\frac{a^{q-3}}{(b^2-a^2)(c^2-a^2)..((\frac{k}{2})^2-a^2)}+\frac{b^{q-3}}{(a^2-b^2)(c^2-b^2)..((\frac{k}{2})^2-b^2)}+..\right)$$ where $a=1, b=2, c=3…=\frac{k}{2}(=n)$

For odd ($k=2n-1$), $q>0$, $a=1, b=3, ...=k$
$$I(k,q)=\frac{\pi{k!}}{2\Gamma(q)\sin\frac{\pi{q}}{2}}\left(\frac{a^{q-2}}{(b^2-a^2)(c^2-a^2)..(k^2-a^2)}+\frac{b^{q-2}}{(a^2-b^2)(c^2-b^2)..(k^2-b^2)}+..\right)$$

The formulas are practical for calculations, and any integral $I(k,q)=\int_0^\infty\frac{\sin^k(x)}{x^q}dx$ for not too big integer $k$ can easily be evaluated.
Just few examples:

$I(k=4,q=2)=\int_0^\infty\frac{sin^4(x)}{x^2}dx$,
$k=4$ ($k$ is even), and we have only $a=2, b=4$. Therefore,
$$I(4,2)=-\frac{\pi{4!}}{2\Gamma(2)\cos\frac{\pi{2}}{2}}\left(\frac{2^{-1}}{(4^2-2^2)}+\frac{4^{-1}}{(2^2-4^2)}\right)=\frac{12\pi}{4^2-2^2}(\frac{1}{2}-\frac{1}{4})=\frac{\pi}{4}$$

$I(k=4,q=4)=\int_0^\infty\frac{\sin^4(x)}{x^4}dx=-\frac{4!\pi2^2}{2^4\Gamma(4)}\left(\frac{1}{2^2-1^2}+\frac{2}{1^2-2^2}\right)=-\frac{\pi}{3}(1-2)=\frac{\pi}{3}$

$I(k=3,q=\frac{1}{2})=\int_0^\infty\frac{\sin^3(x)}{\sqrt{x}}dx=\frac{6\pi\sqrt{2}}{2\sqrt{\pi}}\left(\frac{1^-\frac{3}{2}}{3^2-1^2}+\frac{3^-\frac{3}{2}}{1^2-3^2}\right)=-\frac{\sqrt\pi}{4\sqrt6}(3\sqrt3-1)$

$I(k=5,q=\frac{3}{2})=\int_0^\infty\frac{\sin^5(x)}{x^\frac{3}{2}}dx=\frac{5!\pi}{2\Gamma(\frac{3}{2})\sin\frac{3\pi}{4}}\left(\frac{1}{\sqrt1(3^2-1^2)(5^2-1^2)}+\frac{1}{\sqrt3(1^2-3^2)(5^2-3^2)}+\frac{1}{\sqrt5(1^2-5^2)(3^2-5^2)}\right)=\sqrt{\frac{5\pi}{2}}\frac{2\sqrt5-\sqrt15+1}{24}$

At some $q$ there are uncertainties (when $\cos\frac{\pi{q}}{2}$ or $\sin\frac{\pi{q}}{2}=0$ in the denominators) that need to be evaluated. For instance, $I(k=3,q=2)=\int_0^\infty\frac{\sin^3(x)}{x^2}dx$. We have $a=1, b=3$, we set
$q=2+\epsilon$ and $$I(3,2)=\lim_{\epsilon\to0}\frac{6\pi}{2}\frac{1}{\sin\frac{\pi(2+\epsilon)}{2}}\left(\frac{1^\epsilon}{3^2-1^2}+\frac{3^\epsilon}{1^2-3^2}\right)=$$$$=-\lim_{\epsilon\to0}\frac{6}{\epsilon}\left(\frac{1^0}{3^2-1^2}+\frac{\epsilon\log(1)}{3^2-1^2}+\frac{3^0}{1^2-3^2}+\frac{\epsilon\log(3)}{1^2-3^2}\right)=\frac{3\log3}{4}$$


问:
How to compute Trigonometric functions based on Inverse Square Root
I am writing a rational number library for performing fast math on integer-only microcontrollers. So far, I have all the basic operations, as well as a first-step estimation function for square root. It takes a positive integer input and returns a rational number approximating the square root (accurate to roughly 4 bits of precision; to be refined further by Newton-Raphson or similar method). Obviously, inverse (reciprocal) square root comes for free since the answer is a fraction that can be trivially inverted.

I read somewhere that other functions (e.g. trigonometric functions) can be calculated in terms of inverse square root (can't find the link now), but I am having a hard time finding any algorithms since search results are almost entirely about inverse trigonometric functions (mostly high school help stuff).

Does anyone have a handy resource where I can find efficient methods for calculating sin, cos, tan, atan, etc. in terms of square root or inverse square root? Is it possible or am I imagining things?

I know this is not a "code" StackExchange but I believe this is fundamentally a math question. If you're interested in my code, it's here. The sqrt_est() function is somewhat remarkable in that it is very short, uses only shifts and adds, no looping or iteration, or even multiplies or divides! (core implementation is on lines 39-45.)

答:
I personally am not aware of any method utilizing the inverse square root for evaluating trig functions and without a reference, it's really hard to understand what you're referring to. With such implementations, the general idea is to go with ready-made, optimized and tested implementations, but that probably won't answer your question.

Taylor Series is certainly a good starting point and although it technically has a time complexity of $O(n)$ it converges really fast (you can achieve really good precision by calculating a few terms) so depending on the scope of your library it may actually be ok. Chebyshev approximation is usually prefered since it converges faster and I haven't seen many real-world applications favouring Taylor expansions over it.

Another "dirtier" option is to simply use a look-up table and either do closest-match or interpolate, losing some precision along the way. You don't need to create a particular big look-up table either, just create one for many steps along the interval $[0, x]$ and then partition $[0, \pi]$ with a step of x. Then you can calculate $\sin(y)$ and $\cos(y)$ by writing them as:

$$\sin(y_1 + \delta_1) = \sin(y_1)\cos(\delta_1) + \cos(y_1)\sin(\delta_1)$$

$$\cos(y_2 + \delta_2) = \cos(y_2)\cos(\delta_2) + \sin(y_2)\sin(\delta_2)$$

where $\delta_1,\ \delta_2 < x$.

For $\arctan$ the basic idea is quite similar. You again usually end up partitioning an interval $[0, N]$ (for $x>N$ you assume the answer to simply be $\frac{\pi}{2}$ or use some rough and cheap approximation method) and approximate your function in each part using something like a Chebyshev series. You again use trig identities to try to bring your argument down to $[0, N]$ and evaluate according to your polynomial in that range. The specifics of this can be quite tricky without an FPU so I don't know if you would want to bother with that.

An alternative solution, is to try to solve the integrals in each interval instead of evaluating the series. For example, we know that $\arctan(x) = \int_0^x\frac{1}{1+x^2}$. You can again create a LUT and then either use a numerical integration method (like Newton-Cotes) which would require several evaluations of $\frac{1}{1+x^2}$ depending on the target precision, which I'm not sure you can afford. You could also utilize the much simpler to calculate Simpson's Rule. I haven't seen those methods used though, so it's probably not worth it in terms of efficiency, ease of implementation and precision. Just throwing this in in case it  might be worth considering.

Another cheap way is using the CORDIC algorithm which intuitively works by doing successive rotations around the imaginary unit circle. You can find a surprisingly in-depth explanation in Matlab's documentation

Of course this is all math. If you asked in StackOverflow they would let you know about a myriad other things that factor in your implementation like cache misses, utilizing SIMD intrinsic and other stuff this answer didn't touch on ;)


问:
Positiveness of Limit Superior
Let $f:(0,1] \to \mathbb R$ be a bounded non negative integrable function. Assume the limit $$\lim_{x \to 0+} \frac{1}{|\ln(x)|} \int_x^1 \frac{f(t)}{t} \mathrm dt$$ exists and has a positive value. How to show (or give a counterexample) that $\limsup_{t \to 0+} f(t)$ also has a positive value?</p>

答:
Here is a calculation you can do if L'Hopital rule applies:
$$0  \le M = \lim_{x \to 0} -\frac{1}{\ln x}\int_x^1\frac{f(t)}{t}dt = \lim_{x \to 0}\frac{1}{\ln x}\int_1^x\frac{f(t)}{t}dt = \lim_{x \to 0}\frac{1}{\frac{1}{x}}\frac{f(x)}{x} = \lim_{x \to 0}f(x)$$</p>

Title: Positiveness of Limit Superior


答:
From the well known
$$x-1<\lfloor x\rfloor  \leq x \tag{1}$$
Thus
$$\frac{1+na^2}{a}-1<
\left\lfloor \frac{1+na^2}{a}\right\rfloor\leq
\frac{1+na^2}{a}$$
and
$$n<n+\frac{1}{a^2}<
\frac{1+\left\lfloor \frac{1+na^2}{a}\right\rfloor}{a}\leq
n+\frac{1}{a^2}+\frac{1}{a}\tag{2}$$

Finally, for $\color{red}{a>\phi}$
$$\frac{1}{a}+\frac{1}{a^2} <\frac{2}{1+\sqrt{5}}+\frac{4}{(1+\sqrt{5})^2}=
\frac{2+2\sqrt{5}+4}{(1+\sqrt{5})^2}\\
=\frac{6+2\sqrt{5}}{6+2\sqrt{5}}=1$$
and from $(2)$
$$n<
\frac{1+\left\lfloor \frac{1+na^2}{a}\right\rfloor}{a}<
n+1\tag{3}$$
the result follows from $(3)$.

The corner case for $\color{red}{a=\phi}$ leads to
$$\left\lfloor \frac{1+n\phi^2}{\phi}\right\rfloor=
\left\lfloor \frac{\sqrt{5}-1}{2}+n\cdot\frac{\sqrt{5}+1}{2}\right\rfloor=\\
\left\lfloor (n+1)\cdot\frac{\sqrt{5}}{2}+\frac{n+1}{2}-1\right\rfloor=
\left\lfloor (n+1)\cdot\frac{\sqrt{5}+1}{2}-1\right\rfloor=\\
\left\lfloor (n+1)\cdot\phi-1\right\rfloor < ...$$
because $\phi$ is irrational, thus $(n+1)\cdot\phi-1$ can never be an integer
$$...< (n+1)\cdot\phi-1$$
Then $(2)$ becomes
$$n<
\frac{1+\left\lfloor \frac{1+n\phi^2}{\phi}\right\rfloor}{\phi}<
n+1$$

I wanted to make it a short answer, but the corner case and the explanatory notes spoiled the effort.


问:
To cut a line in two so that the squares of ... (geometric construction)

Cut a given straight line so that the sum of the square of one part and twice the square of the other part equals a given size.

Given a line of length $L$ which is cut in two pieces, lengths $x$ and $L-x$, I first thought of constructing the squares with sides $x$ and $\sqrt{2}(L-x)$ but I cannot relate the total area to a given length.

If $M$ is the given length the length to construct is
$$\frac{2L\pm\sqrt{3M-2L^2}}{3}$$
but I assume there is an easier way to solve this problem using only straight-edge and compass.

Any idea how to solve this problem? TIA.

答:
Let the segment lengths be $(x,L-x)$ for total length $L.$

Total area
$$ A=x^2+2(L-x)^2= 3x^2-4xL+2L^2 \tag 1 $$

should be a constant or minimum / maximum when segmented at some $x$.

Differentiating to find location of partition,

$$ 6x-4L=0, x=\dfrac{2L}{3} \to A_{min}= \dfrac{2L^2}{3};$$

which is a function of $L.$ It is easy to divide a line length  L =  OB into three equal parts. (A line drawn through any one end parallel lines from three equal segments as shown, take line trisected through D).

However in this problem the minimum is a priori specified to have  a given size =S, but not derivative driven $2 L^2/3$ minimum.  This is not possible without any modification of area expression in (1) accordingly, like in ..

$$  A=x^2+2(L-x)^2- \dfrac{2L^2}{3} +S  \tag2 $$

A numerical example for $ L=100, S=10000 $ gives desired area $=S$ at the calculated two thirds length.

Geometric construction for physical Area Check

Total area $ S= 10,000$ square units is fully accounted for as one square of $2L/3$ side and another five of $L/3$ side in rough sketch.


问:
lcm and polynomials
I have the polynomials:

$p\left(x\right)=x^3-6x^2+14x-15$

$q\left(x\right)=x^3-8x^2+21x-18$

the LCM is :
$d\left(x\right)=\left(x-3\right)^2\left(x-2\right)\left(x^2-3x+5\right)$

I'm trying to figure out how to find:

$d(x)=a(x)*p(x)+b(x)*q(x)$

I need something like Euclidean algorithm but for LCM not GCD.

Thank you

答:
As in any Euclidean domain, you simply add one step to the extended Euclidean algorithm: all remainders  in the Euclidean algorithm satisfy a Bézout's relation $r_k=u_kp+v_kq$, with coprime coefficients $u_k,v_k$ calculated recursively.

The g.c.d. is the last nonzero remainder $r_n$, so  $d=u_np+v_nq$. Proceeding one step further, the remainder is $0$, and we obtain $\; 0=u_{n+1}p+v_{n+1}q$,  so that the l.c.m. (defined up to a unit factor) is
$$\operatorname{lcm}(p,q)=u_{n+1}p=-v_{n+1}q .$$

Added: Here is how it goes with your example.

$$\begin{array}{rccl}
r_k(x) & u_k & v_k & Q_k(x) \\ \hline
p(x) & 1 & 0 \\
q(x) & 0 & 1 & Q_1=1 \\ \hline
r_1=2x^2-7x+3 & 1 & -1 &  Q_2=\frac14(2x-9) \\
r_2=\frac{15}4(x-3) & -Q_2 & 1+Q_2 & Q_3=\frac 4{15}(2x-1) \\
r_3=0 & 1+Q_2Q_3 & -1-(1+Q_2)Q_3
\end{array}$$
Therefore, we obtain both that $\gcd\bigl(p(x),q(x)\bigr)=\color{red}{x-3}$ (we simplify by the factor $\frac{15}4$, which is a unit in the polynomial ring), and \begin{align}
\operatorname{lcm}\bigl(p(x),q(x)\bigr)&=\bigl(1+\tfrac14(2x-9)\tfrac4{15}(2x-1)\bigr)(x^3-6x^2+14x-15) \\
&= \tfrac 4{15}(\underbrace{x^2-5x+6}_{(x-2)(x-3)})(\underbrace{x^3-6x^2+14x-15}_{(x-3)(x^2-3x+5)}) \\[1ex]
&=\tfrac 4{15}\color{blue}{(x-2)(x-3)^2(x^2-3x+5)}
\end{align}

Title: lcm and polynomials


答: So if you check this $f$ given would be a density function for a random variable $X$ What this would mean $$\int_1^4 f(x)dx = 1$$ So what you want is to find a $k$ s.t. $$\int_1^k f(x)dx \le 1/3$$ Now the form of $f$ is given. So if $f$ was defined in the same way over the entire domain then you could replace $f$ with that definition and performed an integration with $k$ being solved as an unknown. However as $f$ is defined over 2 intervals you should take care and take 2 cases. One when $k$ belongs to the first and the other when $k$ belongs to the second and proceed in the manner similar to if there was only a single equation. Ofcourse since $f$ is a density function the value of $k$ would be unique. So you have to eliminate one of the choices of $k$ you get from considering the 2 equations using the definition of the function.


问:
The resolvent of an operator is an analytic function
Let $X$ be a $\mathbb C$-Banach space, $A\in\mathfrak L(X)$ and $\rho(A)$ denote the resolvent set of $A$. It is easy to prove that $\sum_{n=0}^\infty\frac{A^n}{\lambda^n}$ is absolutely convergent with $$\lambda R_\lambda(A)=\sum_{n\in\mathbb N_0}\frac{A^n}{\lambda^n}\tag1$$ for all $\lambda\in\mathbb C\setminus\overline B_{r(A)}(0)$, where $r(A)$ denotes the spectral radius of $A$.

I would like to ask this question in a more general setting, but I wasn't sure how I would need to formulate this setting. However, what I would like to know is whether we can immediately conclude that $$f(\lambda):= R_\lambda(A)=(\lambda-A)^{-1}$$ is analytic; just from $(1)$ and knowing that the series converges absolutely.

I've read that this is true, but I don't know why. It's not that I'm not able to obtain the result: If $\lambda_0\in\rho(A)$, we can write $$\lambda-A=(\lambda_0-A)(1-\underbrace{(\lambda_0-\lambda)R_{\lambda_0}(A)}_{=:\:B_\lambda}\;\;\;\text{for all }\lambda\in\mathbb C\tag2.$$ Now if $\lambda\in\mathbb C$ with $\left\|B_\lambda\right\|_{\mathfrak L(X)}<1$, i.e. $$|\lambda_0-\lambda|<\varepsilon:=\left\|R_{\lambda_0}(A)\right\|_{\mathfrak L(X)}^{-1}\tag3,$$  we know from a basic result on Neumann series that $1-B_\lambda$ is bijective and $$(1-B_\lambda)^{-1}=\sum_{n\in\mathbb N_0}B_\lambda^n\tag4.$$ In particular, $\lambda-A$ is bijective (hence $\lambda\in\rho(A)$) and $$R_\lambda(A)=\sum_{n\in\mathbb N_0}(\lambda_0-\lambda)^nR_{\lambda_0}(A)^{n+1}\tag5.$$

So, I really just want to know whether the desired claim holds more generally; without the need of the extra arguments I've provided above.

答:
Let $T:=\lambda_0-A$ and $z:=\lambda-\lambda_0$; then $\lambda-A=T+z$.

Then for small $z$, by the usual binomial expansion, $$(T+z)^{-1}=T^{-1}-zT^{-2}+z^2T^{-3}+\cdots$$ The higher order terms are of order $o(z)$ since $$\|\sum_{n=2}^\infty (-z)^nT^{-n-1}\|\le\sum_{n=2}^\infty|z|^n\|T^{-1}\|^{n+1}=\frac{|z|^2\|T^{-1}\|^3}{1-|z|\|T^{-1}\|}=o(z)$$
Thus $T=\lambda_0-A$ is complex-differentiable, i.e., analytic, in $\lambda_0$.


问:
Viviani’s curve for a cylinder and sphere intersection in parametric form
How to find Vivianis curve of the following intersection in parametric form
\begin{align*}
x^2+y^2&=\frac14\tag{1}
\\
\left(x+\frac12\right)^2+y^2+z^2&=1\tag{2}
\end{align*}

We are given $-1\leq z\leq 1$ and $z=\sin t$

My understanding is that we have to eliminate $x,y,z$ but it’s not clear where the above line comes from...

I have attempted to proceed by solving for z in equation $(2)$ given $x=a\cos t$ and $y=a\sin t$

$$1=(x+a)^2+y^2+z^2$$

I arrive at $z^2=1-\cos^2(t/2)$... not sure how to proceed further...

答:
You just can take the spherical coordinates:
$$x= \cos(\theta)\cos(\varphi)-0.5 , y=\cos(\theta)\sin(\varphi), z=sin(\theta). $$
Then set $\varphi=\theta$ and you get
$$x= \cos(\theta)\cos(\theta)-0.5 , y=\cos(\theta)\sin(\theta), z=sin(\theta). $$
You can then check that they fulfil the equation of the cylinder (see Wikipedia).


问:
Anagrams of MISSISSIPPI with atleast 3 consecutive I's
I'm trying to solve this question but I don't know if I am doing it right, my approach is:

Total letters (Cardinality) MISSISSIPPI: 11

Arrange 3 I's [III]ISSSSPPM

And Calculate the possible combinations

9!/(4!2!) = 7560

But I cannot verify if this is the correct solution.

答:
To count arrangements with three consecutive Is, we must arrange the nine objects [III], I, S, S, S, S, P, P, M.  To do so, we must choose four of the nine positions for the Is, two of the remaining five positions for the Ps, then arrange the three distinct objects III, I, and M in the three remaining positions.  Thus, there are
$$\binom{9}{4}\binom{5}{2}3! = \frac{9!}{4!5!} \cdot \frac{5!}{2!3!} \cdot 3! = \frac{9!}{4!2!}$$
arrangements with three consecutive Is, as you found.

However, we have counted those arrangements in which there are four consecutive Is twice, once when we designated the first three Is as the three consecutive Is and once when we designated the last three Is as the three consecutive Is.  We only want to count those cases once, so we must subtract them from the total.

If all four Is are consecutive, we have eight objects to arrange: [IIII], S, S, S, S, P, P, M.  We choose four of the eight positions for the Is, two of the remaining four positions for the Ps, then arrange the two distinct objects IIII and M in the remaining two positions.  Thus, there are
$$\binom{8}{4}\binom{4}{2}2!= \frac{8!}{4!4!} \cdot \frac{4!}{2!2!} \cdot 2! = \frac{8!}{4!2!}$$
such arrangements, as you found in the comments.

Hence, the number of anagrams of MISSISSIPPI with at least three consecutive Is is
$$\frac{9!}{4!2!} - \frac{8!}{4!2!}$$


问:
Find the Hahn distribution of the measure $\nu$
Let $\mu$ be a finite measure on $(X, F)$. For given sets $ A, B ∈ F$ we define:
$\nu(H)=\mu(H\cap A) - \mu(H \cap B)$. Find the Hahn distribution of the measure $\nu$.

I don't know if it makes sense, but I started with that: $\nu(H)=\mu(H\cap A) - \mu(H \cap B) = \int_{H \cap A} d\mu - \int_{H \cap B} d\mu $ so it will be $1_{H \cap A} - 1_{H \cap B} \ge 0 $ or $1_{H \cap A} - 1_{H \cap B} \le 0$?

答:
$\nu (H)=\mu (H \cap (A\setminus B)) -\mu (H \cap (B\setminus A)) $ [becasue $\mu (H\cap (A \cap B))$ cancels].

Hence $A\setminus B$ is a positive set and $B\setminus A$ is a negative set for $\nu$.


问:
Inequality for sum to the exponent of $q>1$
In this question: How to use $\lesssim$ when using exponents I already asked about an inequality for a sum to the exponent of $2$.

Now I wonder if $\forall q>1$, there exists a constant $C>0$ such that for all $x\in\mathbb{R}_+$ it holds that
\begin{align*}
(1+x)^q\leq C (1+x^q).
\end{align*}

I tried to work with an integer $k\geq q$ and exploit convexity in the positive real numbers, but that was the wrong way since it only lead me to $(1+x)^q\leq C(1+x^k)$. In some way one might use Young's inequality but I didn't manage to do it.

答:
Just as a short summary, thanks to @leoli:

\begin{align*}
\frac{1}{2^{q}}(1+x)^q=(\frac{1}{2}+\frac{x}{2})^q\leq\frac{1}{2}\cdot1^q+\frac{1}{2}x^q,
\end{align*}

so $C=2^{q-1}$.


问:
Extending a function to obtain continuity
I am working on a two part problem for studying. Not homework. Not exam prep.

The problem is

Let $f\colon(0,1]\rightarrow\mathbb{R}$ be a uniformly continuous function on $(0,1].$

a.  State the definition of uniform continuity and use it to show that $g(x)=\ln x$ is not uniformly continuous on $(0,1]$,

b.  Prove that $f$ can be extended uniquely to a continuous function on $[0,1]$.

I know how to do part a but don't know how to prove the extenstion portion in part b.

答:
Take any sequence $\{x_n\}$ convergint to $0$. It is of course Cauchy sequence. Using uniform continuity show that $\{f(x_n)\}$ is also Cauchy sequence in $\mathbb{R}$. Hence it have a limit. Since $\{x_n\}$ is arbitrary $f$ have a limit at $0$. The rest is clear.

In fact the more general result holds. Let $X$ and $Y$ be a metric spaces and $Y$ is complete, then every uniformly continuous function $f:X\to Y$ have unique extension onto the completion of $X$ and moreover this extension is also uniformly continuous.


问:
Inequality using Operator norm with differential of Matrix Function
I'm trying to show that

Inequality $\,\| A^2 − B^2 \| ≤ 2\|A − B\|\,$ holds,
where $\|\cdot\|$ is the Operator norm, and $A,B \in \mathbb R^{n,n}\,$ with $\|A\| < 1$ and $\| B\|  < 1$.

I've shown that for
$F(A)=A^{2}$ the differential is $\big(F'(A)\big)(H)=AH+HA$.

How can I show that
$\|F'(X)\| \leq 2$ for $ X \in \{A+t(B-A)\mid t \in [0,1]\}$ ?

Body:
Note that $$\|F'(X)H\|=\|XH+HX\|\leq\|XH\|+\|HX\|\leq\|X\|\|H\|+\|H\|\|X\|=2\|X\|\|H\|$$
Furthermore for $X\in \{A+t(B-A)\mid t\in[0,1]\}$ we have $$\|X\|= \|(1-t)A+tB\|\leq\|(1-t)A\|+\|tB\|<(1-t)+t=1$$
Hence $\|F'(X)\|<2$.


问:
The equation of the surface in cylindrical coordinates: ${r^{2}-2z^{2}=4r\cosθ-8r\sinθ-12z}$ . What is the equation in perpendicular coordinates?
The equation of the surface in cylindrical coordinates:

${r^{2}-2z^{2}=4r\cosθ-8r\sinθ-12z}$

i) What is the equation in perpendicular coordinates?

ii) Write it name?

My try:

I put these in the original equation:

${x=r\cosθ}$

${y=r\sinθ}$

${z=z}$

and

${r=}$${\sqrt{x^{2}+y^{2}}}$

${θ=\arctan(\frac{y}{x})}$

${z=z}$

So,

${x^{2}+y^{2}-2z^{2}=4x-8y-12z}$

${x^{2}-4x+y^{2}+8y-2z^{2}+12z=0}$

${(x-2)^2-4+(y+4)^2-16-2(z-3)^2+18=0}$

${\frac{(x-2)^2+(y+4)^2}{2}+(z-3)^2=1}$

Like a sphere? I'm stuck here

I request your help

答:
You have a mistake in a sign in your last step:
$$(x-2)^2+(y+4)^2{\color{red}-}2(z-3)^2=2.$$
So the surface is a hyperboloid of one sheet (see https://en.wikipedia.org/wiki/Quadric):
$$\frac{(x-2)^2}{(\sqrt{2})^2}+\frac{(y+4)^2}{(\sqrt{2})^2}-\frac{(z-3)^2}{1^2}=1.$$


问:
What is the expected cost of using LDA?
Suppose that you observe $(X_1,Y_1),...,(X_{100}Y_{100})$, which you assume to be i.i.d. copies of a random pair $(X,Y)$ taking values in $\mathbb{R}^2 \times \{1,2\}$.

I have that the cost of misclassification are equal, $c_1=c_2=1$.

The distributions $X|Y=1$ and $X|Y=2$ are each rotationally symmetric.

I would like to perform LDA to classify the data points.

I have that $a=\hat\Sigma^{-1}_p(\hat{\mu}_1-\hat{\mu}_2)=(0.132-0.0732)$ and $\frac{1}{2}a^T(\hat{\mu}_1+\hat{\mu}_2)\approx 0$

And now I would like to calculate the approximate expected cost of using LDA.

So, in the textbook i'm using, the expected cost of misclassification is defined as:

Suppose we use the classification rule $g:\mathbb{R}^p\rightarrow \{1,2\}$, that assigns to group $1$ when $x \in R_1$ adnto group $2$ when $x\in R_2$. The expected cost of misclassification associated to the rule $g$ is $$\mathbb{E}[\text{cost}(Y,g(X))]=c_2\mathbb{P}(x\in R_1 | Y=2)\pi_2+c_1\mathbb{P}(x\in R_2 | Y=1)\pi_1$$
Where $\pi_1=\mathbb{P}(Y=1|x)$ and $\pi_2=\mathbb{P}(Y=2|x)$

And so my attempt is:

$$\mathbb{E}[\text{cost}(Y,g(X))]=c_2\mathbb{P}(x\in R_1 | Y=2)\pi_2+c_1\mathbb{P}(x\in R_2 | Y=1)\pi_1=\mathbb{P}(0.132x_1-0.0732x_2\gt 0|Y=2)\pi_2+\mathbb{P}(0.0132x_1-0.0722x_2 \lt 0|Y=1)\pi_1$$

And i'm stuck here. I'm not sure how to continue from here. In particular, I don't know what $\mathbb{P}(0.0132x_1-0.0722x_2 \lt 0|Y=1)$ and $\mathbb{P}(0.132x_1-0.0732x_2\gt 0|Y=2)$ are equal to, also $\pi_1,\pi_2$.

答:
Estimating this quantity is simple: $\pi_i=Pr(y=c_i)$ is just the prior that a point belongs to a certain class. For your finite dataset, you can estimate it via

$$\pi_i \approx \frac{1}{N}\sum_{j=1}^N [y_j=c_i] = n_i/N$$

Secondly, $Pr(a^Tx>0\mid y=x_i)$ is the probability that a datapoint gets correctly classified, which you can estimate as

$$Pr(a^Tx>0\mid y=c_i)\approx\frac{1}{n_i}\sum_{j=1}^N [y_j = c_i]\cdot [a^Tx_j>0]$$

However, to get a good estimate, you should compute this on a hold-out test set or by leave-one-out cross validation.

Now if you want to analytically compute this quantity, I am not sure if we have enough information about the distributions $p(x\mid y=c_i)$. However, we can deduce quite a few things from the two clues

The distributions X|Y=1 and X|Y=2 are each rotationally symmetric. (around their mean?)

$\frac{1}{2}a^T(\hat\mu_1+\hat\mu_2)$

The first one implies that $p(x\mid y=c_i)=g_i(\|x-\mu_i\|_2)$ for some $g_i\colon\mathbb R_{\ge 0} \to\mathbb R_{\ge 0}$. Moreover, due to the rotational symmetries I think we must have $E[(x-\mu_i)(x-\mu_i)^T]=\Sigma_i = \alpha_i I$ for some $\alpha_i>0$, and consequently LDA will estimate the covariance as $\Sigma=\pi_1 \Sigma_1 + \pi_2\Sigma_2 = (\alpha_1\pi_1 + \alpha_2\pi_2)I$. Thus the second clue suggests that

$$\begin{aligned}
&&\frac{1}{2}a^T(\hat\mu_1 +\hat\mu_2) &\approx 0
\\&\iff&(\hat\mu_1 -\hat\mu_2)^T\hat\Sigma^{-1}(\hat\mu_1 +\hat\mu_2) &\approx 0
\\&\;\;\leftrightsquigarrow&(\mu_1-\mu_2)^T\Sigma^{-1}(\mu_1+\mu_2) &=0
\\&\iff& \mu_1^T\Sigma^{-1}\mu_1 &= \mu_2^T\Sigma^{-1}\mu_2
\\&\iff& \frac{\mu_1^T\mu_1}{\alpha_1\pi_1 + \alpha_2\pi_2} &= \frac{\mu_2^T\mu_2}{\alpha_1\pi_1 + \alpha_2\pi_2}
\\&\iff& \|\mu_1\|_2 &= \|\mu_2\|_2
\end{aligned}$$

In particular, after appropriate centering we have $\mu_1 = -\mu_2$. Now, if both $x\mid y=c_1$ and $x\mid y=c_2$, are normally distributed, we can analytically integrate and are done more of less. However, if they are not, I am not sure if there is a way to proceed.

Title: What is the expected cost of using LDA?


问:
Evaluating Flux through S where $\vec F = <x,y,5>$ and $S...\text{region enclosed by }x^2+z^2=1, y=0,x+y=2.$
I am trying to evaluate this Flux integral and I want to check if my work is correct.

I am given that

$\vec F = <x,y,5>$ and $S...\text{region enclosed by }x^2+z^2=1, y=0,x+y=2.$

So, I am imagining that the region looks like a bamboo cut diagonally.

So, there are three surfaces that I want to integrate and I would like to separate them into three parts $I_1, I_2$ and $I_3$.

$I_1$... $y=0$

The normal vector is $<0,-1,0>$, so $\vec F\cdot\vec n=-y$ but because $y=0$ the flux is $0$.

$I_2$...$x+y=2$

The normal vector is $<1,1,0>$, so $\vec F \cdot \vec n = x+y$.

To evaluate $\int \int_S x+y \space dA$ I used polar coordinates $x=r\cos(\theta), z=r\sin(\theta),y=r^2$

where I get $$\int_0^{2\pi}\int_0^1r\cos (\theta) +r^2 \space rdrd\theta = \pi/2$$

$I_3$...$x^2+z^2=1$

I use the parameterization $x=\cos(\theta), z=\sin(\theta), y=y$ so

$$\vec r (\theta,y) = <\cos(\theta), y, \sin(\theta)>$$

This leads to

$$\vec F \cdot \vec n = \cos^2(\theta) + 5\sin(\theta)$$

where I evaluate the integral

$$\int_0^{2\pi} \int_0^{2-\cos(\theta)} \cos^2(\theta)+5\sin(\theta) \space dy d\theta=2\pi$$

Summing up I get $\frac{5\pi}{2}$ but it's supposedly $4\pi$.

I really am struggling with these kind of problems and I can't seem to really see what the issue is. . .

Please help.

答:
By the Gauss's theorem we should integrate $\mathop{div} F = 2$ over the volume of the cut bamboo. So the flux is twice the volume. But if we join together along the cut plane two copies of our bamboo, we will get a cylinder of radius $1$ and height $4$. Its volume is $4\pi$. So here's the answer.

It's pretty harder to calculate the flux straightforwardly, because the limits of integration are quite nontrivial. And I think you have a mistake in the second integral. You've got $(F,n) = x+y$, but $x+y = 2$ on the plain. And $y \neq r^2$, $y = 2 - x$. Maybe there are some other mistakes (the third integral is the most difficult).


问:
Showing that $V=\operatorname{ker} f^{p} \oplus \operatorname{Im} f^{p}$ where $\operatorname{Im} f^{p} =\operatorname{Im} f^{p+1}$
This is a problem from Blyth and Robertson's Further Linear Algebra:

If $V$ is a finite dimensional vector space and $f: V\to V$ is a
linear mapping, prove that there is a positive integer $p$ such that
$\operatorname{Im} f^{p}=\operatorname{Im} f^{p+1}$ and deduce that
$$(\forall k\ge 1)\; \operatorname{Im} f^{p}=\operatorname{Im}
 f^{p+k}, \ker f^{p}=\ker f^{p+k}$$ Show also that $V=\operatorname{Im}
 f^{p} \oplus \ker f^{p}$.

My attempt:
Let $\displaystyle m=\min_{k\in\mathbb{N}} (\dim f^{k}(V))$. Then there must be a $p\in \mathbb{N}$ such that $m=\dim f^{p}(V)$. It is easy to see that $f^{p+k}(V)\subset f^{p}(V)$, so,  $m=\dim f^{p}(V)\ge\dim f^{p+k}(V)$ and by definition of $m$, $\dim f^{p+k}(V)\ge m$ for any $k\in \mathbb{N}$. So, we have that $\dim f^{p+k}(V)=m$ for any $n\in \mathbb{N}$. Hence, we have $f^{p+k}(V)=f^p(V)$.

Also, we have that $\ker f^{p}\subset \ker f^{k+p}$. By rank nullity theorem we have $\dim \ker f^p =\dim \ker f^{k+p}$. Hence $\ker f^{p}=\ker f^{p+k}$.

Let $v\in V$. Then $f^{p}(v)\in f^{2p}(V)$ because $f^{p}(V)=f^{2p}(V)$. Thus, $f^{p}(v)=f^{2p}(w)$ for some $w\in V$. Thus, $f^{p}(v-f^{p}(w))=0$. Hence $v-f^{p}(w)\in \ker f^{p}$. Hence, we can write $v=v_0+f^{p}(w)$ where $v_0\in \ker f^{p}$. This shows that $V=\operatorname{Im} f^{p} + \ker f^{p}$. Now, by the dimension formula and rank nullity theorem, $\dim (\ker f^{p} \cap \operatorname{Im} f^{p})=\dim \ker f^{p} + \dim \operatorname{Im} f^{p} - \dim V=0$. So, $\ker f^{p} \cap \operatorname{Im} f^{p}=\{ 0 \}$. Hence  $V=\operatorname{Im} f^{p} \oplus \ker f^{p}$.

Is this proof correct? Is there a more direct way to do this?

答:
Your proof seems correct to me. If $N_i$ denotes the kernel of $f^i$ then the chain $\{0\} = N_0 \subseteq N_1 \subseteq \cdots$, must eventually stabilise, because there are at most $d$ strict inclusions, where $d = \dim V$. Likewise, if $R_i$ is the range of $f^i$, then $V = R_0 \supseteq R_1 \supseteq \cdots$ must stabilise for the same reason.

For what it's worth, the decomposition of $V$ that you find is sometimes called the Fitting decomposition of $V$ with respect to $f$. That is, $V$ decomposes as a direct sum $N \oplus R$ such that $f|_{N}$ is nilpotent and $f|_{R}$ is invertible. Really cool!