问:
Lax-Wendroff and Crank-Nicolson Matlab simulation of linear advection
I am implementing two schemes: Lax-Wendroff and Crank Nicolson to solve the PDE linear advection in Matlab. My simulation seems to run; however, between the transition in time space the numerical solutions obtained do not seem to look right.

This is the schemes that I implement:

In Matlab implementation, I am trying to solve $v_{j}^{n+1}$ which is denoted as v_new. For Lax-Wendroff, I implement it as the for-loop updating and I take into account the periodic solution. For Crank-Nicolson, I make a matrix for both $v_{j}^{n+1}$ and $v_{j}^{n+1}$ because it is implicit method.

The following is my Matlab implementation. I cannot fix as I describe above.

```<code>% the advection speed
a=1.;
% number of grid points in space (not counting the point at x=1, which is the same as the point at x=0, due to the periodicity)
N=51;
% spatial step
h =(1./(N));
% safety constant for stability (should be smaller than 1)
cfl=.8;
% CFl timestep limit for the explicit methods
dt=cfl*h/a;
% time at which we want to end the simulation
t_end=1.;
% number of timesteps to be taken
n_it=t_end/dt;
% number of methods: Lax-Wendroff vs Crank-Nicolson.
n_methods=2;
% initialize some arrays
% spatial grid (not including the point at x=1, which is the same as the point at x=0, due to the periodicity)
x=(0:h:1-h);
% temporal grid
t=(0:dt:n_it*dt);
% arrays for the numerical approximations at times n and n+1
v_new=zeros(N,n_methods);
v_old=zeros(N,n_methods);
% array for the exact solution
v_exact=zeros(N,1);

% the initial condition
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for i=1:n_methods
    v_old(:,i)=exp(-50*(x-.5).^2);
end
[ACN,BCN]=mat_linadv_CN(N,a,h,dt);

% the main iteration loop

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

for iter = 1:n_it
% method 1: Lax-Wendroff(treat the first and last separately into account the periodicity)
for i=2:N-1
    v_new(i,1)=v_old(i,1) + (((a^2)*dt)/2*h^2)*(v_old(i+1,1)-2*v_old(i,1)+ ...
                         v_old(i-1,1))-(a*dt)*(v_old(i+1,1)-v_old(i-1,1));
end
    v_new(1,1)=v_old(1,1) + (((a^2)*dt)/2*h^2)*(v_old(2,1)-2*v_old(1,1)+...
                    v_old(N,1))-(a*dt)*(v_old(2,1)-v_old(N,1));
        v_new(N,1)=v_old(N,1) + (((a^2)*dt)/2*h^2)*(v_old(1,1)-2*v_old(N,1)+...
                   v_old(N-1,1))-(a*dt)*(v_old(1,1)-v_old(N-1,1));
% method 2: Crank-Nicolson.
v_new(:,2)=ACN\(BCN*v_old(:,2));
% the exact solution with a=1
v_exact(:) = exp(-50*(x-a*t(iter+1)-.5).^2) + ...
             exp(-50*(x-a*t(iter+1)+.5).^2);
% graphical output
plot(x,v_exact(:),'^r-')
hold on

for i=1:n_methods
    plot(x,v_new(:,1),'*b-')
    plot(x,v_new(:,2),'+g-')
end
axis([0 1 -.2 1.2])
xlabel('x')
ylabel('v')
title('linadv simulation')
legend('exact','Lax-Wendroff','Crank-Nicolson');
grid on;
grid minor;
hold off
pause(0.001)

% prepare for the next iteration

v_old=v_new;

end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%implicit method Crank-Nicolson (CN):
function [ACN,BCN]=mat_linadv_CN(N,a,h,dt)
e=ones(N,1);

const1=(-a/(4*h));
const2=(1/dt);
const3=(a/(4*h));

ACN=spdiags([const1*e const2*e const3*e],[-1 0 1], N,N);
ACN(1,N)=const3;
ACN(N,1)=const1;

BCN=spdiags([const1*e const2*e const3*e],[-1 0 1],N,N);
BCN(1,N)=const3;
BCN(N,1)=const1;
end
</code>```

答:
I have fixed the Lax-Wendroff part, see code below. There were several typos in the coefficients and in the expression of the scheme, see Wikipedia. These remarks might help you fix the whole thing. By the way, note that alternative Matlab implementations are available on this site, see related posts.</p>
```<code>% the advection speed
a=1.;
% number of grid points in space (not counting the point at x=1, which is the same as the point at x=0, due to the periodicity)
N=51;
% spatial step
h =(1./(N));
% safety constant for stability (should be smaller than 1)
cfl=.8;
% CFl timestep limit for the explicit methods
dt=cfl*h/a;
% time at which we want to end the simulation
t_end=1.;
% number of timesteps to be taken
n_it=floor(t_end/dt);
% initialize some arrays
% spatial grid (not including the point at x=1, which is the same as the point at x=0, due to the periodicity)
x=(0:h:1-h);
% temporal grid
t=(0:dt:n_it*dt);
% arrays for the numerical approximations at times n and n+1
v_new=zeros(N,1);
v_old=zeros(N,1);
% array for the exact solution
v_exact=zeros(N,1);

% the initial condition
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
v_old(:)=exp(-50*(x-.5).^2);

% the main iteration loop

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

for iter = 1:n_it
% method 1: Lax-Wendroff(treat the first and last separately into account the periodicity)
for i=2:N-1
    v_new(i)=v_old(i) + (a^2*dt^2/(2*h^2))*(v_old(i+1)-2*v_old(i)+ ...
                     v_old(i-1))-(a*dt/(2*h))*(v_old(i+1)-v_old(i-1));
end
    v_new(1)=v_old(1) + (a^2*dt^2/(2*h^2))*(v_old(2)-2*v_old(1)+...
                    v_old(N))-(a*dt/(2*h))*(v_old(2,1)-v_old(N));
    v_new(N)=v_old(N) + (a^2*dt^2/(2*h^2))*(v_old(1)-2*v_old(N)+...
                    v_old(N-1))-(a*dt/(2*h))*(v_old(1)-v_old(N-1));
% the exact solution with a=1
v_exact(:) = exp(-50*(x-a*t(iter+1)-.5).^2) + ...
             exp(-50*(x-a*t(iter+1)+.5).^2);
% graphical output
plot(x,v_exact(:),'^r-')
hold on

plot(x,v_new(:),'*b-')
axis([0 1 -.2 1.2])
xlabel('x')
ylabel('v')
title('linadv simulation')
legend('exact','Lax-Wendroff');
grid on;
grid minor;
hold off
pause(0.001)

% prepare for the next iteration

v_old=v_new;

end
</code>```

Body:
I have fixed the Lax-Wendroff part, see code below. There were several typos in the coefficients and in the expression of the scheme, see Wikipedia. These remarks might help you fix the whole thing. By the way, note that alternative Matlab implementations are available on this site, see related posts.

% the advection speed
a=1.;
% number of grid points in space (not counting the point at x=1, which is the same as the point at x=0, due to the periodicity)
N=51;
% spatial step
h =(1./(N));
% safety constant for stability (should be smaller than 1)
cfl=.8;
% CFl timestep limit for the explicit methods
dt=cfl*h/a;
% time at which we want to end the simulation
t_end=1.;
% number of timesteps to be taken
n_it=floor(t_end/dt);
% initialize some arrays
% spatial grid (not including the point at x=1, which is the same as the point at x=0, due to the periodicity)
x=(0:h:1-h);
% temporal grid
t=(0:dt:n_it*dt);
% arrays for the numerical approximations at times n and n+1
v_new=zeros(N,1);
v_old=zeros(N,1);
% array for the exact solution
v_exact=zeros(N,1);

% the initial condition
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
v_old(:)=exp(-50*(x-.5).^2);

% the main iteration loop

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

for iter = 1:n_it
% method 1: Lax-Wendroff(treat the first and last separately into account the periodicity)
for i=2:N-1
    v_new(i)=v_old(i) + (a^2*dt^2/(2*h^2))*(v_old(i+1)-2*v_old(i)+ ...
                     v_old(i-1))-(a*dt/(2*h))*(v_old(i+1)-v_old(i-1));
end
    v_new(1)=v_old(1) + (a^2*dt^2/(2*h^2))*(v_old(2)-2*v_old(1)+...
                    v_old(N))-(a*dt/(2*h))*(v_old(2,1)-v_old(N));
    v_new(N)=v_old(N) + (a^2*dt^2/(2*h^2))*(v_old(1)-2*v_old(N)+...
                    v_old(N-1))-(a*dt/(2*h))*(v_old(1)-v_old(N-1));
% the exact solution with a=1
v_exact(:) = exp(-50*(x-a*t(iter+1)-.5).^2) + ...
             exp(-50*(x-a*t(iter+1)+.5).^2);
% graphical output
plot(x,v_exact(:),'^r-')
hold on

plot(x,v_new(:),'*b-')
axis([0 1 -.2 1.2])
xlabel('x')
ylabel('v')
title('linadv simulation')
legend('exact','Lax-Wendroff');
grid on;
grid minor;
hold off
pause(0.001)

% prepare for the next iteration

v_old=v_new;

end


问:
Is expanding via Taylor series true only for values less than 1 ??
How do I prove this result??

prove $1+x/2-x^3/8<(1+x)^{1/2}$    , for $x>0$

And while we're at it, I had a deeper doubt, Is expanding via Taylor series true only for ,
$x<1$ ?

Because, we easily write the error term as the smallest power of x that is not in the expansion i.e if we expand upto $n^\text{th}$ power, we take error term as  $(x-a)^{n+1}*f^{(n+1)thderivative}(a)$$/(n+1)!$   , which would only be true if $x<1$ otherwise the most significant term should be the last term in the series which would tend to infinity for $x>1$.

This doubt arises because I have used Maclaurin series several times and there we always take $x$ tending to zero

thanks!

答:
Convergence of a Taylor series depends on how fast the coefficients decrease. For example

$$e^x=1+x+\frac{x^2}2+\frac{x^3}{3!}+\frac{x^4}{4!}+\cdots$$

they decrease so fast that the series converges for any $x$.

In general, the series converges up to the closest singularity of the function. For instance,

$$\frac1{1-x}=1+x+x^2+x^3+\cdots$$ cannot converge past $x=1$ because the function goes to infinity.

But obviously, by a simple rescaling

$$\frac1{1-2x}=1+2x+4x^2+8x^3+\cdots$$ converges up to $x=\dfrac12$, while

$$\frac3{3-x}=1+\frac x3+\frac{x^2}9+\frac{x^3}{27}+\cdots$$ converges up to $x=3$.

ContentLicense: CC BY-SA 4.0


问:
Lagrangian Multipliers Constrained Optimization
As far as I understand, Lagrangian multiplier $\lambda$ can take negative and positive values. For the positive values, we find maximum point. For the negative values, we find minimum point.

I think that we cannot find minimum point by using Lagrangian multipliers for this functions:

$f(x, y) = x^2y^2$

$g(x, y) = x^2 + y^2 = 1$

I aim to find minimum and maximum point of $f$ under the condition $g$.

When I apply Lagrangian method, I could find only this solution:

$x = \sqrt\lambda$

$y = \sqrt\lambda$

When I substituted these equalities in $g(x, y)$, I found $\lambda = 1/2$, and $f(x, y) = 1/4$.

What do you think about this ?

There is only positive Lagrangian value, and it makes function $f(x, y)$ produce $1/4$. Is this maximum value or minimum value ? I think it is maximum point.

答:
Step by step

$$
L = x^2y^2-\lambda(x^2+y^2-1)
$$

so the stationary points (maxima, minima, saddle) are included in the solutions for

$$
\nabla L = 0 =\cases{2xy^2-2\lambda x\\
2y x^2-2\lambda y\\
x^2+y^2-1}
$$

from the first two equations we have $x=0,y=0,y^2=\lambda, x^2 = \lambda$ so substituting into the third we have $2\lambda = 1$ or $\lambda^* = \frac 12$ hence $x^* = \pm\frac{\sqrt 2}{2},\ \ y^* = \pm\frac{\sqrt 2}{2}$ or for any $\lambda$ also $x^* = 0,y^* =\pm 1,\ \ y^*=0,x^*= \pm 1$. Now among those stationary points we should choose according to our needs. Substituting the restriction on the objective function we have

$$
z = x^2(1-x^2),\ \ -1\le x \le 1
$$

so at $x^*=\pm\frac{\sqrt 2}{2}$ we have two maxima and at $x^* = 0, x^*=\pm 1$ we have minima as can be depicted from the following plot

Resuming the stationary points

$$
\begin{array}{ccccc}
x^* & y^* & \lambda^* & x^2y^2 & \text{type}\\
0  & \pm 1 & \text{any} & 0 & \text{min}\\
\pm 1  & 0 & \text{any} & 0 & \text{min}\\
\pm\frac{\sqrt 2}{2} & \pm\frac{\sqrt 2}{2} & \frac 12 & \frac 14 & \text{max}
\end{array}
$$

NOTE

The restriction of $z = x^2y^2$ on the cylinder $x^2+y^2-1=0$ can be depicted in blue in the following plot.


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

I have an equation as below,

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

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

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

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

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

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

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

Can anyone help to solve this Lagrange multiplier problem?

答:
Just add an additional Lagrange multiplier for each constraint and consider the Lagrangian $L = f-\sum\lambda_jg_j$ where $f$ is your original function and the $g_j$ are the constraints. In your quadratic form case, you have to solve
$$Rw=\lambda_1R_aw+\lambda_2R_bw$$
subject to the constraints.

In total generality, I don't know a slick solution. Are all three matrices positive definite? Do any of them commute?

ContentLicense: CC BY-SA 3.0


问:
lp spaces, linear functionals
$f : \ell^2 \to\mathbb R$ is a function and for every $x=(x_1,x_2,\ldots) \in \ell^2$ is defined by $\sum_{n=1}^\infty\frac{x_n}{\sqrt{6}n}$.

Show that $f$ is  a bounded linear functional on $\ell^2$

find $\lVert{f}\rVert$

By using triangle inequality for $\lVert\cdot\rVert_2$ we can have an inequality in which $1/ \sqrt{6}n$ appears in every term, but how this can be written as $\lVert{x}\rVert_2$ and a real number; in order to show that $f$ is bounded.
Any help would be appreciated.

答:
The problem is to show that the image of the closed unit ball centered at $0\in\ell^2$ is bounded.

Suppose $x$ is in the closed unit ball. Then  $\sum_{n=1}^\infty x_n^2 =\|x\|^2 \le 1.$ Then

$$
\|f(x)\|^2 = \sum_{n=1}^\infty \frac{x_n^2}{6n^2} \le \sum_{n=1}^\infty x_n^2 = \|x\|^2 \le 1.
$$
So $1$ is an upper bound.

Title: lp spaces, linear functionals


问:
Measurable set - A sequence of measurable functions
Let $(X, M, \mu)$ be a measure space, and $f_n:X \rightarrow \mathbb R$ sequence of measurable functions.

How can I show that the set of $x$ that for them $f_n(x)$ has a subsequence that converges to $0$ is a measurable set?

答:
Note that there is a subsequence of $\left(f_n(x)\right)_n$ converging to $0$ if and only if $\forall k\in\mathbb{N}\exists n\in\mathbb{N}$ s.t. $\left\vert f_n(x)\right\vert<\frac{1}{k}$. Hence,
\begin{align*}
&\left\{x\in X:\left(f_n(x)\right)_n\text{ has a subsequence converging to }0\right\}\\
=&\left\{x\in X:\forall k\in\mathbb{N}\exists n\in\mathbb{N}\text{ s.t. }\left\vert f_n(x)\right\vert<\frac{1}{k}\right\}\\
=&\bigcap_{k\in\mathbb{N}}\bigcup_{n\in\mathbb{N}}\left\{x\in X:\left\vert f_n(x)\right\vert<\frac{1}{k}\right\}
\end{align*}
Since $f$ is measurable, it is a countable union and intersection of measurable sets and thus measurable itself.


问:
Calculate expected number of round we reach to $n$.

Suppose $x=2$ now each round we set $x=x^2$ or $x=x^3$  with probability $\frac{1}{2}$ until we
reach given number $n$,how we can calculate expected number of round
to reach $n$?

I think if each iteration  we set  $x=x^2$ at step $x^{2^k}\geq n$ we reach $n$ from this $k=log logn$ ,but i want to calculate in expected.The answer is $\theta(loglogn)$,but i'm confused how we reach this.

答:
Lets draw a tree of possible outcome, where each $k^{th}$-level corresponds to all equally likely possible outcomes at the $k^{th}$ round. The top node is zeroth round. Below I draw this tree till 2 rounds.
$$x$$
$$x^2  \quad  x^3$$
$$x^4  \quad  x^6 \quad x^6 \quad x^9$$
Notice that each path from the top node to a leaf corresponds to a complete outcome, where each step is a choice between $x^2$ and $x^3$. And for $k$ levels there are $\sum_{k_1+k_2 = k}\binom{k}{k_1,k_2} = 2^k$ such paths. Where $k_1$ is the number of times $x^2$ was chosen and $k_2$ is the number of times $x^3$ was chosen. A path which has $x^2$ chosen $k_1$ times and $x^3$ chosen $k_3$ times will end at $x^{2^{k_1}\times3^{k_2}}$. Therefore the expectation value after $k$ levels is :
$$E[x_k] = \frac{1}{2^k}\sum_{k_1+k_2=k}\binom{k}{k_1,k_2}x^{2^{k_1} \times3^{k_2}}$$

I dont have much experience with big-$O$ estimations, but given the answer my guess would be the following :
Asymptotically only the  $x^{2^{k_1}\times 2^{k_2}}$ term is going to matter (summation is going to add as only exponential in $k$ factors (upper bound on $\binom{k}{k_1}$ is $(\frac{ek}{k_1})^{k_1} )$;the denominator does not matter as $x^{2^{k_1}\times 2^{k_2}}$ is exponential even w.r.t denominator), so we can take the asymptotic term to be $x^{3^{k}}$ . Now if
$$n \approx x^{3^{k}}$$
then,
$$\log n \approx 3^{k}  $$
$$\log \log n \approx k  $$

So my key observations here are:

$x^{2^{k_1}\times 2^{k_2}}$ is exponential w.r.t denominator.

Anything that we get from summation and multiplication with binomial coefficients is at best exponential in $k$, hence the only thing that matters is $x^{3^{k}}$ as it is double exponential.


问:
On integral of a function over a simplex
Help w/the following general calculation and references would be appreciated.

Let $ABC$ be a triangle in the plane.
 Then for any linear function of two variables $u$.
$$
\int_{\triangle}|\nabla u|^2=\gamma_{AB}(u(A)-u(B))^2+
\gamma_{AC}(u(A)-u(C))^2+\gamma_{BC}(u(B)-u(C))^2,
$$
 where
$$
\gamma_{AB}=\frac{1}{2}\cot(\angle C),
\gamma_{AC}=\frac{1}{2}\cot(\angle B),
\gamma_{BC}=\frac{1}{2}\cot(\angle A).
$$

What is a good reference for the formula? Is it due to R. Duffin?

Is there generalization to linear functions of three variables? The number of parameters fits (in any $nD$), and it seems like one needs to calculate 6x6 Cayley-Menger like determinants, but it's difficult and the geometric interpretation is not clear.
Thank you.

答:
The solution by @Shuhao Cao is nice. However it is too long to follow. There is a short way to do this. It is easy to check that $\int_{\Delta}|\nabla u|^2$ is invariant under translation  and rotation
$$ x\to x+h,y\to y+k, x\to x\cos\theta-y\sin\theta,y\to x\sin\theta+y\cos\theta.$$
Thus we can take the coordinates of $A,B,C$ as
$$ A(0,0), B(x_B,0), C(x_C,y_C) $$
respectively, from which we obtain
$$ \cot A=\frac{x_C}{y_C}, \cot B=\frac{x_B-x_C}{y_C}, |\Delta|=\frac{1}{2}x_By_C. $$
From the identity
$$ \cot A\cot B+\cot B\cot C+\cot C\cot A=1$$
we have
$$ \cot C= \frac{-x_Bx_C+x_C^2+y_C^2}{x_By_C}$$
Let $u=\alpha x+\beta y+\gamma$ and hence $|\nabla u|^2=\alpha^2+\beta^2$. So we have to show the following identity
$$ (\alpha^2+\beta^2)|\Delta|=\frac{1}{2}\alpha^2 x_B^2\cot C+\frac{1}{2}(\alpha x_C-\beta y_C)^2\cot B+\frac{1}{2}[\alpha (x_B-x_C)-\beta y_C]^2\cot A.$$
Note
\begin{eqnarray*}
RHS&=&\frac{\alpha^2}{2}[x_B^2\cot C+x_C^2\cot B+(x_B-x_C)^2\cot A]\\
&&+\frac{\alpha^2}{2}y_C^2(\cot B+\cot A)+\alpha\beta[-x_Cy_C\cot B+(x_B-x_C)\cot A].
\end{eqnarray*}
It is easy to check
$$ y_C^2(\cot B+\cot C)=x_By_C,-x_Cy_C\cot B+(x_B-x_C)\cot A=0 $$
and
$$ x_B^2\cot C+x_C^2\cot B+(x_B-x_C)^2\cot A=x_By_C. $$
Thus
$$ RHS=(\alpha^2+\beta^2)|\Delta|=LHS. $$</p>


问:
Show $ ( \sin(\theta) - \cos(2\theta))^2 = 1+ \sin(\theta) - \sin(3 \theta) - \frac{1}{2}\cos(2 \theta) + \frac{1}{2}\cos(4 \theta) $

Show $ ( \sin(\theta) - \cos(2\theta))^2 = 1+ \sin(\theta) -  \sin(3 \theta) - \frac{1}{2}\cos(2 \theta) + \frac{1}{2}\cos(4 \theta) $

If I would start from the right expression I would be able to reduce it. But I'm not used to do the reverse.

I can see that Wolframalpha expands the left expression in many ways, one of which is the one I want, but are there any trick to do this expansion by hand?

This question is linked to this one.

答:
Method I. Write everything in terms of $\sin(\theta)$ and $\cos(\theta)$, and then compare. Tedious, but doable.

Method II. If you know what a Fourier series is, you may determine the coefficients on the right-hand side by integration.

Method III.
First expand the left by $(a+b)^2=a^2+2ab+b^2$.
\begin{align}
(\sin x-\cos(2x))^2
&=\sin^2 x+\cos^2(2x)-2\sin x\cos(2x)
\end{align}

Then use the double angle formulas:
$$
\sin^2x=\frac{1-\cos 2x}{2},\quad \cos^2(2x)=\frac{1+\cos(4x)}{2}
$$
and the general product to sum formula:
$$
\sin x\cos(2x)=\frac12(-\sin(x)+\sin(3x))
$$


问:
Does this type of real functions have a name ? What are their characteristics?
Let $n > 0$ be an integer. Let $f:\mathbb R^+ \times \mathbb R^+ \rightarrow \mathbb R_0$ be a symmetric function such that the $(n+1) \times k$ matrix

\begin{equation}
\mathbb M=
\begin{pmatrix}
f(s_{k-n+1},s_1) & \ldots & f(s_{k-n+1},s_k)\\
\vdots &  & \vdots \\
f(s_{k+1},s_1) & \ldots & f(s_{k+1},s_k)\\
\end{pmatrix}
\end{equation}

has at most $n$ linearly independent rows for any $k>n$ and real sequence $s_1<s_2<\ldots<s_{k+1}$. What does that say about $f$ ? Do such function have a name ? What are their characteristics/properties ? Is there an easier "definition" that would be equivalent, without matrices for example? Or a stronger "easier" property that would imply the above property ?

答:
This is a special case, but it is also a broad class. It isthe exact solution if $n=1$. If you take $f(x, y) = h(\min \{ x, y\} ) g(\max \{x,y\} ) $, then the first $(k-n+1) $ columns are multiple of $( g(s_{k+n-1}), \ldots , g(s_{k+1}) ) $ . The rank remain then unchanged if we discard the first $k-n$ columns; now we have $k-(k-n) = n $ columns, so that the rank is at most $n$ as desired. Note also that such functions are symmetric.

Conversely, suppose $n=1$ and set $k=2$. Taking determinant one obtains (the function is never zero)

$$ \frac{ f(s_2, s_2) }{ f(s_3, s_2) } = \frac{ f(s_2, s_1) }{f(s_3, s_1) } $$

Which means that the quotient on the right does not depend on $s_1 < s_2$. Taking $s_3 = L$ very big we get that for all $s_1 < s_2 < L$ :

$$ f(s_2, s_1) = \frac{ f(s_2, s_2) }{f(L, s_2) } f(L, s_1) = g(s_2) \cdot h(s_1) $$

By symmetry we will have that for $s_2 < s_1 < L$

$$ f(s_1, s_2) = f(s_2, s_1) = g(s_1) h(s_2) $$

So that $f(x, y) = h(\min \{x, y\}) g(\max \{x, y\}) $. We can repeat this argument for greater $L$, but since the new $h, g$ must agree with the old ones on $s_1 , s_2 < L$, we will get well defined functions $h, g$ on all of $\mathbb{R}^+$. Hope you enjoy!


答:
As we know the RHS, let's  try to express $\cos^2(2\theta)$ in terms of $\cos(4\theta)$

$\begin{align}(\sin\theta-\cos2\theta)^2 & = \sin^2\theta - 2\sin\theta\cos2\theta + \cos^22\theta\\& = \sin^2\theta-2\sin\theta\cos2\theta + \frac{1 + \cos4\theta}2 \end{align}$

Now $\cos2\theta = 1 - 2\sin^2\theta$ we use this to get $4\sin^3\theta$

$\begin{align}(\sin\theta-\cos2\theta)^2 & = \sin^2\theta - 2\sin\theta + 4\sin^3\theta +\frac12+\frac{\cos4\theta}2 \\
&=\sin^2\theta +\sin\theta -( 3\sin\theta - 4\sin^3\theta) +\frac12+\frac{\cos4\theta}2 \\&=\sin\theta - \sin3\theta+\frac{\cos4\theta}2 + 1 - \frac12+\sin^2\theta \\&=\sin\theta-\sin3\theta+\frac{\cos4\theta}2 + 1 - \frac{1-2\sin^2\theta}{2} \\&=\boxed{1+\sin\theta-\sin3\theta+\frac{\cos4\theta}2  - \frac{\cos2\theta}{2} }\end{align}$

Body:
Show $ ( \sin(\theta) - \cos(2\theta))^2 = 1+ \sin(\theta) -  \sin(3 \theta) - \frac{1}{2}\cos(2 \theta) + \frac{1}{2}\cos(4 \theta) $

If I would start from the right expression I would be able to reduce it. But I'm not used to do the reverse.

I can see that Wolframalpha expands the left expression in many ways, one of which is the one I want, but are there any trick to do this expansion by hand?

This question is linked to this one.


答:
We'll use the following identities:

$\cos^2(\theta) = \dfrac{1+\cos(2\theta)}{2}$

$\sin^2{\theta} = \dfrac{1-\cos(2\theta)}{2}$

$\sin \theta = \dfrac{e^{i\theta} - e^{-i\theta}}{2i}$

$\cos \theta = \dfrac{e^{i\theta} + e^{-i\theta}}{2}$

$$
(\sin(\theta) - \cos(2\theta))^2 = \sin^2(\theta) + \cos^2(2\theta) - 2 \sin(\theta) \cdot \cos(2\theta)
$$

$$
\sin(\theta) \cdot \cos(2\theta) = \dfrac{e^{i\theta} - e^{-i\theta}}{2i} \cdot \dfrac{e^{2i\theta} + e^{-2i\theta}}{2} \\
= \dfrac{e^{3i\theta} + e^{-i\theta} - e^{i\theta} - e^{-3i\theta}}{4i} \\
= \dfrac{e^{3i\theta} - e^{-3i\theta}}{4i} - \dfrac{e^{i\theta} - e^{-i\theta}}{4i} \\
= \frac1{2} \sin(3\theta) - \frac1{2} \sin(\theta)
$$

As such,
$$
(\sin(\theta) - \cos(2\theta))^2 =  \dfrac{1-\cos(2\theta)}{2} +  \dfrac{1+\cos(4\theta)}{2} + \frac1{2} \sin(3\theta) - \frac1{2} \sin(\theta)
$$

Title: Show $ ( \sin(\theta) - \cos(2\theta))^2 = 1+ \sin(\theta) - \sin(3 \theta) - \frac{1}{2}\cos(2 \theta) + \frac{1}{2}\cos(4 \theta) $


问:
How to prove that $A\cap B\subseteq C$ and $A^c\cap B\subseteq C$ imply that $B\subseteq C$?
How do you solve this problem??

Suppose that $A\cap B\subseteq C$, and $A^c\cap B\subseteq C$. Prove that $B$ is a subset of $C$.

I don't know where even to begin

Can anyone help?

Thank you

答:
Note from the venn diagram $B=(A\cap B)\cup(A^c\cap B)$. You are given
 $A\cap B\subseteq C$
$A^c\cap B\subseteq C$.
 If you take the union both sides (you can do that), we have
$(A\cap B)\cup(A^c\cap B)\subseteq C \cup C$ which implies $B\subseteq C$


问:
Closed path trough only finitely many times an open subset disjoint of his base point?
My problem:

Let $\alpha$ be a closed path of $[0,1]$ in the union of three no disjoint open balls $B_1,B_2,B_3\subset\mathbb{R}^n$ such that $B_1\cap B_2\cap B_3=\emptyset$, if the base point of $\alpha$ is $x_0\in B_1\cap B_2$, then $\alpha$ through only finitely many times the intersection $B_2\cap B_3$?

Note that through finitely many times $B_2\cap B_3$ means that $\alpha^{-1}(B_2\cap B_3)$ is finite union of disjoint open subintervals of [0,1].

I need this result to prove that the fundamental group of this three balls are finitely generate by lines connecting fixed points in his intersections.

答: No. $\alpha$ can go only infinitely many times through the intersection $B_2 \cap B_3$. Take a path from $x_0$ to a boundary point $x_1 \in \text{bd} B_3 \cap B_2$. Then you can run in finite time through infinitely loops $l_n$ in $\overline B_3 \cap B_2$ of length $2^{-n}$ such that $l_n \cap \text{bd} B_3 = \{x_1\}$. Finally take any path from $x_1$ to $x_0$. Drawing a picture is helpful.


问:
Prove $(x-1)(y-1)>(e-1)^2$ where $x^y=y^x$, $y>x>0$.

Let $x,y$ be different positive real numbers satisfying $x^y=y^x$.
Prove $(x-1)(y-1)>(e-1)^2$.

We may suppose $a=\frac{y}{x}>1$. Then we obtain $x=a^{\frac{1}{a-1}},y=a^{\frac{a}{a-1}}.$ But how to go on?

答:
If you know that
$$x^y=y^x \implies x=-\frac{y}{\log (y)}W\left(-\frac{\log (y)}{y}\right)$$ where $W(t)$ is Lambert function, then
$$(x-1)(y-1)=(1-y)\Bigg[1+ \frac{y}{\log (y)}W\left(-\frac{\log (y)}{y}\right)\Bigg]=f(y)$$

$f'(y)$ cancels at $y=e$ and, at this point, $x=e$. The second derivative $$f''(e)=\frac{2 (2 e-5)}{3 e}\sim 0.107069~~ >~~ 0$$ confirms that this point is a minimum and $f(e)=(e-1)^2$.

Edit

As @Martin R commented, I did not prove that this is the global minimum.

In fact, this can be done using the fact that $\forall t \geq e$
$$W(t) \geq\log (t)-\log (\log (t))+\frac 12\frac{\log (\log (t))}{ \log (t)}=f(t)$$
$$W(t) \leq \log (t)-\log (\log (t))+\frac e{e-1}\frac{\log (\log (t))}{ \log (t)}=g(t)$$ or even better tha approximation of $W(t)$ I gave here.


问:
Derivative of $x^x$ using first principle
Find $f'(x)$ with $f(x)=x^x$ using first principle.

i.e. evaluate the limit $$\lim_{h\to0}\frac{{(x+h)}^{x+h}-x^x}{h}$$

EDIT:
$x^x=e^{x\ln x}$ so we need to evaluate $$\lim_{h\to0}\frac{e^{{(x+h)}\ln{(x+h)}}-e^{x\ln x}}{h}$$

I know the answer is $x^x(\ln x+1)$ but how can one prove it using first principle?

答:
The short answer given by robjon, was alright, but there was one small mistake which I could not edit (MSE didn't allowed me, due to some lack of privilege), so the correct version is as follows.
$$
\begin{align}
&\lim_{h\to0}\frac{(x+h)^{x+h}-x^x}{h}\\
&=\lim_{h\to0}\frac{(x+h)^{x+h}-(x+h)^x+(x+h)^x-x^x}{h}\\
&=\lim_{h\to0}(x+h)^x\lim_{h\to0}\frac{(x+h)^h-1}{h}
+x^x\lim_{h\to0}\frac{\left(1+\frac hx\right)^x-1}{h}\\
&=\lim_{h\to0}(x+h)^x\lim_{h\to0}\frac{(x+h)^h-1}{h}
+x^x\lim_{h\to0}\frac{\left(1+\frac hx\right)^{\large\frac xhh}-1}{h}\\[12pt]
&=x^x\log(x)+x^x\cdot\log(e)\\[16pt]
&=x^x\log(x)+x^x
\end{align}
$$


问:
Find the relation between the dimension of the nullspace of $A$ and $A^t$
Let $A$ be a $n \times n$ matrix, what is the relation between the dimension of the nullspace of the homogeneous system of $A$ and the one of $A^t$?</p>

答:
Consider the function $L:\mathbb F^n\rightarrow \mathbb F^n$ with $L(v)=Av$. Also let $\{e_i\}$ be the natural basis of $\mathbb F^n$.

We know that $n=\operatorname{Dim}(\operatorname{Im}(L))+\operatorname{Dim}(\operatorname{Ker}(L))$ (why?)

But $\operatorname{Dim}(\operatorname{Im}(L))=\operatorname{Dim}(\{Ae_1,Ae_2,\ldots,Ae_n\})=\operatorname{Rank}(A)$ (why?) and $\operatorname{Dim}(\operatorname{Ker}(L))$ is the dimension of the nullspace of $A$.

Therefore the dimension of the nullspace of $A$ is $n-\operatorname{Rank}(A)$. Now what do you know about $\operatorname{Rank}(A)$ and $\operatorname{Rank}(A^T)$?


答:
Apply the identities
$$\cos4\theta = 2\cos^22\theta -1,\>\>\>\>\>\cos2\theta = 1-2\sin^2\theta $$
$$\sin3\theta =\sin\theta (2\cos2\theta+1)$$
in simplifying the RHS
\begin{align}
RHS=&1+\sin\theta -\sin\theta (2\cos2\theta+1)
-\frac12(1-2\sin^2\theta)+\frac12(2\cos^22\theta-1)\\
=&\sin^2\theta -2\sin\theta\cos2\theta+\cos^22\theta\\
=&(\sin\theta -\cos2\theta)^2=LHS
\end{align}


问:
Find all positive integers $x$ such that $x(x+2021)$ is a perfect square
I completed the square as to get $(x+1010.5)^2-102110.25 = k^2$ but I don't know where to go from here.
Please help, thank you

I then got $(2x+2021)^2-4084441=4k^2$ then $(2k-2x-2021)(2k+2x+2021)=43^2*47^2$

答:
If the product of two relatively prime numbers is a perfect square, then both factors must themselves be perfect squares. So, let's consider that case first.

How many ways can $2021$ be expressed as a difference of two squares? The answer to that is $2$. Namely, $2021=1011^2-1010^2=45^2-2^2$. Hence, $x=2^2=4$ and $x=1010^2=1020100$ are the two solutions coprime to $2021$.

Next, suppose that $x=43n$ is divisible only by $43$ (but not by $47$), so $x+2021=43(n+47)$ must then also be divisible by $43$. Then, for $x(x+2021)$ to be a perfect square, both $n$ and $n+47$ must themselves be perfect squares, and since $47$ is prime, the only solution for $n$ is $n=23^2=529$, which leads to the solution $x=43 \cdot 529=22747$.

Likewise, suppose that $x=47n$ is divisible only by $47$ (but not by $43$), so $x+2021=47(n+43)$ must then also be divisible by $47$. Then, for $x(x+2021)$ to be a perfect square, both $n$ and $n+43$ must themselves be perfect squares, and since $43$ is prime, the only solution for $n$ is $n=21^2=441$, which leads to the solution $x=47 \cdot 441=20727$.

Finally, suppose that $x=2021n$ is divisible by $2021$ (or equivalently, by both $43$ and $47$), so $x+2021=2021(n+1)$ must then also be divisible by $2021$. Then, for $x(x+2021)$ to be a perfect square, both $n$ and $n+1$ must themselves be perfect squares. The only solution for $n$ is $n=0$, but this leads to $x=0$, which is not a positive integer.

Hence, there are exactly $4$ solutions for $x$, namely $4, 20727, 22747,$ and $1020100$. Interestingly, the number of solutions for $x$ happens to itself be one of the solutions!


问:
For $x_{n+1}=x_n-x_n^3$, with $|x_1|>1$. What about the convergence?
I see Let $\{ x_n \}_{n=1}^{\infty}$ such that $x_{n+1}=x_n-x_n^3$ and $0<x_1<1$ that if $|x_1| \le 1$, then $x_n\to 0$. However, if $|x_1|>1$, what can we say about this sequence? It seems hard to find the tendency of it. For $x_1$ near $1$, it converges to $0$, but for $x_1$ large, it is not the case.

答:
The essential nature of $x_{n+1}=x_n-x_n^3$ can be seen in the iterations of the function $f(x)=|x-x^3|$. That is, if $|x_n|\lt1$ then $x_{n+1}=\sigma(x_n)f(x_n)$, where $\sigma(x)$ is the sign of $x$, while if $|x_n|\gt1$ then $x_{n+1}=-\sigma(x_n)f(x_n)$.

Now the graph of $y=|x-x^3|$ lies below the line $y=x$ for $x\in(0,\sqrt2)$ and above it for $x\in(\sqrt2,\infty)$. Sketching a cobweb plot for the iterations of $f$ shows that $x_n\to0$ if $|x_1|\lt\sqrt2$ (that is, $0\lt x\lt\sqrt2$ implies $0\le f(x)\lt x$, so the sequence $|x_n|$ is a decreasing sequence bounded below, hence has a limit, which can only be $0$), while $|x_n|\to\infty$ if $|x_1|\gt\sqrt2$.


问:
Need help in completing the question related to proving these 4 conditions equivalent related to perfect fields
Consider the following question:

(a) The following conditions on a field K are equivalent :So, Prove them

(i) every irreducible polynomial in K[x] is separable ;

(ii) every algebraic closure K of K is Galois over K;

(iii) every algebraic extension field of K is separable over K;

(iv) either char K = 0 or char K = p and $K = K^p$.

(i)=>(ii)  This part I am not able to do. What i am missing is how to prove that for all $\sigma \in Aut_K{\bar K}$ only y$\in K$ gets fixed and rest all are not fixed.

(ii)=> (iii) I have done as if  an algebraic extension is galois over K and then the extension is also separable  over K ( This is a theorem).

(iii)=>(iv) I tried by assuming that char K $\neq 0$, so, As field is integral domain, so Characterstic must be prime and so, let char K=p but then I am not able to move towards proving $K=K^{p}$.

(iv)=>(i) I have solved . So, I don't require help with that.

Kindly shed some light on this

答:
For (i)=>(ii): Let $L$ be an algebraic closure of $K$. Then $L/K$ is by definition normal and by assumption separable. Depending on your definition of Galois-extension we might be done here. If your definition of Galois extension is $K=L^{Aut_KL}$, then look at the answer to one of your previous questions.

For (iii)=>(iv): If $a\in K$ there is some $b\in L$ in an extension field with $b^p=a$. Now look at the irreducible factors (over $K$) of the polynomial $x^p-a=(x-b)^p$ and use your assumption.


问:
How are these inequalities simplified?
How does this:

```<code>(a > b && a > c && b <= c) ||
(a > b && a <= c && b < c)
</code>```

simplify down to this:

```<code>a > b && b <= c
</code>```

Whereas this similar expression

```<code>(a <= c && c >= b && a <= b) ||
(a <= c && c < b && a < b)
</code>```

does not simplify to

```<code>a <= c && a <= b
</code>```

but instead to

```<code>(b <= c && a <= b) ||
(b > c && a <= c)
</code>```

?

Edit: Just to clarify, I can work it out in my head, but I'm trying to implement the simplification in code for general cases, and I'm struggling to understand the logic that separates the above two equations.

答:
For the first part:

If a > b && b <= c, a > b && a > c && b <= c simplifies to a > c.

Similarly, a > b && a <= c && b < c simplifies to a <= c && b < c.

Now, let a > b && b <= c. Then there are two cases:

a > c. Then the first condition will hold.

a <= c. Then b < a <= c, so b < c holds and the second inequality is true.

This second step is not possible in the other case. You cannot derive a similar order, because the arrangement of variables is changed.

Title: How are these inequalities simplified?


问:
Looking for a single analytic function with 3 approximately linear 'parts'
I am trying to find a single (i.e. non-piecewise) analytic function $f(x)$ with the following features:

$f(x), f'(x)$ defined $ \forall x \in \mathbb R$

$f'(x) > 0, \forall x$

$lim_{x \to - \infty} f(x) = - \infty$

$lim_{x \to + \infty} f(x) = + \infty$

$lim_{x \to - \infty} f'(x) = m, m \in \mathbb R^+$

$lim_{x \to + \infty} f'(x) = m, m \in \mathbb R^+$

$f'(\frac 1 2) = n, n \in \mathbb R^+, n \le \frac m {10}$ # no longer applicable, see edit below #

So a monotonically increasing curve that approximates a straight line of slope $m$ almost everywhere, except for a section with much lower slope $n$ around $x = \frac 1 2$, say for $0.1 < x < 0.9$.

How would you go about putting together such a function?

EDIT

I had forgotten to include a condition:

$f'(x) \ge n, \forall x$

Also, I realized the function I am looking for becomes symmetric with respect to the origin if I translate $x$ by $- \frac 1 2$, so in fact the previously mentioned condition on the derivative becomes:

$f'(0) = n, n \in \mathbb R^+, n \le \frac m {10}$

答:
EDIT: Taking into account the OP's edits, we have to modify the previous function slightly. I'm merging it with the original answer for clarity.

Assume $m,n,a > 0, m>n$. Then, consider the function
$$f(x) = \int_0^x \left(m-(m-n)e^{-\frac{u^2}{a^2}}\right) du = mx-(m-n)a\frac{\sqrt{\pi}}{2} \ \text{erf}\left(\frac{x}{a}\right)$$

Thus, we get for $f(x)$

As $\text{erf}(-\infty)$ is finite, $\lim_{x\to-\infty} f(x) = -\infty$

As $\text{erf}(\infty)$ is finite, $\lim_{x \to \infty} f(x) = \infty$

Also, we have $f'(x) = m-(m-n)e^{-\frac{x^2}{a^2}}$. This gives for $f'(x)$

For all $x$, as $e^{-\frac{x^2}{a^2}} \le 1$, we get
\begin{align}
f'(x) &= m-(m-n)e^{-\frac{x^2}{a^2}} \\
&\ge m-(m-n)\\
&=n
\end{align}

$f'(0) = m-(m-n)e^{-\frac{0^2}{a^2}}= m-(m-n) =n \ \ \forall \ x$

$\lim_{x\to-\infty} f'(x) = \lim_{x\to-\infty} \left(m-(m-n)e^{-\frac{x^2}{a^2}}\right) = m$

$\lim_{x\to\infty} f'(x) = \lim_{x\to\infty} \left(m-(m-n)e^{-\frac{x^2}{a^2}}\right) = m$

Note that $m, n, a$ here are completely general. So, we can now impose any other conditions, like $n\le \frac{m}{10}$ trivially.


问:
Why do we pick ax + b when doing universal hashing?
Why can't we pick just $x + b$ for example? I know that for universal hashing the Pr[$h(x) == h(y)$] $\leq 1/|n|$

But with the same hash function, just without the $a$ we can get $h(k) = (($k$ + b$ mod $p$) mod $n$).

I've run through a million examples and I can't find a single reason why I might be wrong.

答:
For a class of hash-functions to be universal, we require that for any two keys $x$ and $y$, the probability of collision is within $1/m$. That means, atmost $1/m$ of the functions in that class can give collision for the two keys.

Now suppose the class is designed using $h_{a,b} = ((ax + b)\bmod p)\bmod m$ (this is one of the standard method). But if we fix $a=1$, then consider two keys for example: $x = X$ and $y = X+m$, such that $X+m < p$. Their hashes will be:

$((X+b)\bmod p)\bmod m, ((X+m+b)\bmod p)\bmod m$

But the second value actually equals the first, for all values of $b$. Thus, without having $a$ as a variable in this modified class, we have both these keys colliding for all functions in the class. So this class can never be a universal-class.

That is why having variable $a$ is useful in this design.

It will also be useful to go through the proof of why such class is universal from some book (e.g. Cormen et al's "Introduction to Algorithms" (chapter "Hash Tables")).


问:
Partition of an interval of $\mathbb{R}$
A partition of an inteval $[a,b]$ of $\mathbb{R}$ is generally defined as a finite sequence of the form:
$$a = x_0 < x_1 < x_2 < \dots < x_n = b$$

Then, $[a,b]$ is seen as the following union of intervals: $[x_0,x_1] \cup [x_1,x_2]\cup\dots\cup[x_{n-1},x_n]$.

I wonder if it makes sense to extend this definition to sequences of the form:
$$a = x_0 \leq x_1 \leq x_2 \leq \dots \leq x_n = b$$

Then, degenerate intervals (i.e. intervals with equal bounds) are allowed.

For instance, if $a=x_0=x_1=x_2=...=x_{n-1}<x_n=b$ then
$$[a,b] = [x_0,x_1] \cup [x_1,x_2]\cup\dots\cup[x_{n-1},x_n] = [x_0,x_0] \cup [x_0,x_1]\cup...\cup [x_0,x_n]$$

It this still a partition?

答: It is not a partition in the proper sense, because a partition is a family of subsets that are mutually disjoint. What you get in your example gives sets $[x_0,x_0]$ and $[x_0,b]$ that have the point $x_0$ in common. But this happens also in your original definition of partition that some authors call instead subdivisions or pointed partitions. Your question is about nomenclature, and I would use the term subdivisions or pointed partitions as some authors do when introducing Riemann sums.


问:
Taylor theorem approximation
$$e^x = \sum_{i=0}^n \frac{x^i}{i!}  + \frac{x^{n+1}}{(n+1)!}e^{c_x}$$

is given based on Taylor's theorem. Where $$ c_x \in [0,x] $$

I understand that the statement below is true by Taylor's theorem approximation

$$e^x  \approx \sum_{i=0}^n \frac{x^i}{i!} $$

However, I don't understand the statement below can be approximated based on the equation above.

$$\int_{0}^{1} \frac{e^x-1}{x} dx \approx \sum_{i=1}^n \frac{1}{i*i!} $$

How do you prove this approximation statement?

答:
Hint.

Write the function $f$ as a power series and integrate term by term.

Notes.

It follows from $e^x\approx\sum_{k=0}^n\frac{x^k}{k!}$ that
$$
\frac{e^x-1}{x}\approx\sum_{k=1}^n\frac{x^{k-1}}{k!}
$$

Title: Taylor theorem approximation


Title: Taylor theorem approximation

Body:
$$e^x = \sum_{i=0}^n \frac{x^i}{i!}  + \frac{x^{n+1}}{(n+1)!}e^{c_x}$$

is given based on Taylor's theorem. Where $$ c_x \in [0,x] $$

I understand that the statement below is true by Taylor's theorem approximation

$$e^x  \approx \sum_{i=0}^n \frac{x^i}{i!} $$

However, I don't understand the statement below can be approximated based on the equation above.

$$\int_{0}^{1} \frac{e^x-1}{x} dx \approx \sum_{i=1}^n \frac{1}{i*i!} $$

How do you prove this approximation statement?

Body:
\begin{align}
\int_{0}^{1} \frac{e^x-1}{x} dx &\approx \int_{0}^{1} \frac{\sum_{i=0}^n \frac{x^i}{i!}-1}{x} dx \\
&= \int_{0}^{1} \frac{1+\sum_{i=1}^n \frac{x^i}{i!}-1}{x} dx \\
&= \int_{0}^{1} \sum_{i=1}^n \frac{x^{i-1}}{i!} dx \\
&= \sum_{i=1}^n \int_{0}^{1} \frac{x^{i-1}}{i!} dx \\
&= \sum_{i=1}^n \frac{1}{i\cdot i!} dx \\
\end{align}


问:
If $f$ is not injective then $F$ is finite.
I have to prove or confute the follow proposition:

Let $F$ a Field and $f:\mathbb{Z} \to F$ an homomorphism of rings such that $f(1_\mathbb{Z})=1_F$. Show that if $f$ isn't injective then $F$ is finite.

My work:

Let $f$ an homomorphism of rings.

We know that $Ker f$ is an ideal of $\mathbb{Z}$ and $Ker f= n \mathbb{Z}$ with $n \in \mathbb{N}$ uniquely determined. This $n$ is the characteristic of the field $F$.

Such that $f$ is not injective $Ker f \neq \{0\}$ then $n \neq 0$ then $F$ is not finite.

There is an error in the last "then". How can i proof this exercise?

Thx.

答: Let $F=\overline{\Bbb F_2}$ be the algebraic closure of the two-element field. Then $f$ as in the problem statement isn't injective (has kernel $2\Bbb Z$), but $F$ is infnite.


问:
topology on CW-Complex $K$ or $n$-skeleton $K^{(n)}$
I have a hard time understanding what the topology on CW-complexes is, i.e. what the open sets of a given CW-Complex $K$ or $n$-skeleton $K^{(n)}$ are.

From my understanding we get the topology inductively and we start with the discrete topology on the $0$-cells $K^{(0)}$.

Then we add the $1$-cells by taking the disjoint union with the $0$-cells and identifying the boundary of our $1$-cells with $0$-cells via the maps $f_\alpha: \partial D^1_{\alpha}\rightarrow K^{(0)}$.

And on $K^{(1)}$ we have the quotient topology. So this works for $n=1,2$ maybe $3$ but for general $n$ is there no easier way to determine whether a set is open in $K^{(n)}$ or not? An easier equivalent definition? Or is this actually easy already and i just don't really understand it? I guess my question is just this: what does it mean if $A \subset K^{(n)}$ is open?

答:
There is a non-inductive description of $K^{(n)}$ which gives a direct description of the open sets.

Let the open $i$-cells be indexed as $\{e_{i,j} \mid j \in A_i\}$, with pairwise disjoint index sets $A_i$ for $i \ge 0$. Choose a characteristic map corresponding to each $e_{i,j}$ denoted $\chi_{i,j} : D^i \to K^{(i)}$. Form the disjoint union of all the domains of all of these characteristic maps:
$$\Delta = \coprod_{0 \le i \le n} \coprod_{j \in A_i} D^i_{i,j}
$$
where $D^i_{i,j}$ denotes (a copy of) the domain $i$-disc for the characteristic map $\chi_{i,j}$. Define $\chi : \Delta \to K^{(n)}$ to be the disjoint union of the characteristic maps $\chi_{i,j}$ themselves. Then the topology on $K^{(n)}$ is just the quotient topology induced by $\chi$, i.e. it is the weakest topology on $K^{(n)}$ such that $\chi$ is continuous (equivalently such that each $\chi_{i,j}$ is continuous). Thus, a subset of $K^{(n)}$ is open if and only if its inverse image under $\chi$ is open.

I believe you can find this point of view explained in an appendix of Hatcher's "Algebraic Topology".

And this point of view actually works for the whole CW complex even in the infinite dimensional case, you simply use
$$\Delta = \coprod_{0 \le i < \infty} \coprod_{j \in A_i} D^i_{i,j}
$$


问:
Does the sum of the power of the smallest prime factor grow linearly?
Let $f(p_1^{a_1}...p_k^{a_k})=a_1$ where $p_1<...<p_k$ and let $g(n)=\sum_{k<=n}f(k)$. Then is $g(n)=\mathcal{O}(n)$?

I know that for $f(p_1^{a_1}...p_k^{a_k})=k$ we would have gotten $g(n)=\Theta(n\log\log n)$, which follows from the fact that $\sum_{p<=n}\frac1p=\Theta(\log\log n)$ where $p$ must be prime. However, I intuitively expect $f(p_1^{a_1}...p_k^{a_k})=a_1$ to be smaller on average.

If you're able to, I would also love to know if $g(n)/n$ converges to any specific value.

答:
Theorem

Let $u(n)$ be the largest prime factor of $n$. The following is a proof that $$S:=\sum_{x\geq2}\frac{-\mu(x)}{x(u(x)-1)}$$ converges, and $g(n)/n\to S+1$ as $n\to\infty$.

Basic manipulations

Consider $\widehat{f}(n):=f(n)-1$ and $\widehat{g}(n):=\sum_{2\leq k\leq n}\widehat{f}(k)=g(n)-n+1$. We do some basic manipulations on $\widehat{f}$ and $\widehat{g}$. By inclusion-exclusion, for any number $n$ with a prime factor $p$ we have $$\sum_{\substack{p_1<...<p_k<p\\p_1...p_k|n}}(-1)^k=\begin{cases}1&\mbox{if $p$ is the smallest prime factor of $n$}\\0&\mbox{otherwise}\end{cases}.$$ Let $v_p(n)$ be the $p$-adic valuation of $n$, so the largest $k$ such that $p^k|n$. We get $$\widehat{g}(n)=\sum_{x=2}^n\sum_{p|x}\left(v_p(x)-1\right)\sum_{\substack{p_1<...<p_k<p\\p_1...p_k|x}}(-1)^k.$$ Using $v_p(x)-1=\sum_a1$ for $a\geq2$ with $p^a|x$, we get $$\widehat{g}(n)=\sum_{p_1<...<p_k<p}(-1)^k\sum_{a\geq2}\left\lfloor\frac{n}{p_1...p_kp^a}\right\rfloor.$$ Substituting $x=p_1...p_kp$ and $b=a-1$ we get $$\widehat{g}(n)=\sum_{x\geq2}-\mu(x)\sum_{b\geq1}\left\lfloor\frac{n}{xu(x)^b}\right\rfloor.$$ So finally we can write $$\frac{\widehat{g}(n)}n=\sum_{x\geq2}\sum_{b\geq1}\frac{-\mu(x)}n\left\lfloor\frac{n}{xu(x)^b}\right\rfloor.$$ We can now move on to investigating the limiting behaviour.

Infinite series

This gives us motivation to look at the infinite series $$S=\sum_{x\geq2}\sum_{b\geq1}\frac{-\mu(x)}{xu(x)^b}.$$ Note that the sum over $b$ is a geometric series, so we can rewrite $$S=\sum_{x\geq2}\frac{-\mu(x)}{x(u(x)-1)}.$$ We show that the series is absolutely convergent, i.e., that the series $$\widehat{S}:=\sum_{x\geq2}\frac{|\mu(x)|}{x\left(u(x)-1\right)}$$ converges. We substitute $p=u(x)$ and sum over the primes $p$ first and then all $x\geq2$ with $|\mu(x)|=1$ and $u(x)=p$. We get $$\widehat{S}=\sum_p\frac1{p-1}\sum_{p_1<...p_k<p}\frac1{p_1...p_kp}.$$ With the fundamental theorem of arithmetic, we can rewrite this as $$\widehat{S}=\sum_p\frac1{p(p-1)}\prod_{q<p}\left(1+q^{-1}\right).$$ Using $1+x\leq e^x$ we get $$\widehat{S}\leq\sum_p\frac1{p(p-1)}\exp\left(\sum_{q<p}\frac1q\right).$$ Since $\sum_{q<p}q^{-1}-\log\log p$ converges, we can bound $\sum_{q<p}q^{-1}\leq\log\log p+C$ for some constant $C$ to get $$\widehat{S}\leq e^C\sum_p\frac{\log p}{p(p-1)}.$$ That this series converges, even when summing over all positive integers $p$ instead of only the primes, can be seen with an integral test.

Conclusion

We view $\widehat{g}(n)/n$ as an infinite series. Every term converges to the corresponding term in $S$, while they are also absolutely bounded by the absolute value of that term in $S$. Since $S$ is absolutely convergent, we can conclude from this that $\widehat{g}(n)/n\to S$ as $n\to\infty$. Since $g(n)=\widehat{g}(n)+n-1$, it follows that $g(n)/n\to S+1$ as $n\to\infty$.

Remarks

Using the same techniques as with $\widehat{S}$ and the fact that $S$ converges absolutely, we can rewrite $$S=\sum_p\frac1{p(p-1)}\prod_{q<p}\left(1-q^{-1}\right).$$ This appears to make the series converge faster. Calculating the sum over the primes $p\leq10^8$ gives $$\lim_{n\to\infty}\frac{g(n)}n\approx1.6125177915.$$ I can also calculate the sum over the primes $p\leq10^{10}$ pretty fast. The aforementioned digits stay the same, but the double-precision floating-point format is not precise enough to give many more digits. Worth mentioning is that calculating the actual value $g(n)/n$ for large $n$ indeed seems to approach this value.


问:
Prove that $\forall n \in N $ , $ \sum_{i=1}^n i = \frac{n(n+1)}{2}$, counting in two ways the number of shaded squares in the diagram
Prove that $\forall n \in  N $  $$ \sum_{i=1}^n i = \frac{n(n+1)}{2}$$ counting in two ways  the number of shaded squares in the diagram.

I have been thinking about this, but I can't understand how prove it counting the shaded squares. Can i assume that $ 1+2+3+...+n $ is the number of shaded squares?
I can't see it clearly.

答: The left-hand side sums over the numbers of shaded squares per row. The right-hand side is the number of shaded squares in an $n\times(n+1)$ rectangle; exactly half are shaded, by an order-$2$ rotational symmetry.


Title: Find all positive integers $x$ such that $x(x+2021)$ is a perfect square

Body:
I completed the square as to get $(x+1010.5)^2-102110.25 = k^2$ but I don't know where to go from here.
Please help, thank you

I then got $(2x+2021)^2-4084441=4k^2$ then $(2k-2x-2021)(2k+2x+2021)=43^2*47^2$

Body:
Start from $$x (x+2021)=y^2$$
multiply both sides by $4$ and add $2021^2$ to both sides
$$4 x^2+8084 x+2021^2=4 y^2+2021^2\to (2x+2021)^2=4y^2+2021^2$$
set $2x+2021=z$ and remember that $2021^2=43^2\times 47^2$. The equation becomes
$$z^2-4y^2=43^2\times 47^2\to (z+2y)(z-2y)=43^2\times 47^2$$
we get the following possibilities
$$
\begin{array}{ll}
& \begin{cases}
z-2 y=1\\
2 y+z=2021^2\\
\end{cases}\to (y= 1021110,z= 2042221)\to x=1020100\\
&\begin{cases}
z-2 y=43\\
2 y+z=43\times 47^2\\
\end{cases}\to (y= 23736,z= 47515)\to x=22747\\
& \begin{cases}
z-2 y=47\\
2 y+z=43^2\times 47\\
\end{cases}\to (y= 21714,z= 43475)\to x=20727\\
& \begin{cases}
z-2 y=43^2\\
2 y+z= 47^2\\
\end{cases}\to (y= 90,z=  2029)\to x=4\\
\end{array}
$$

The values are only four:
$$x=4,20727,22747,1020100$$


答:
$0$ shaded squares in the rightmost column.

$1$ shaded square in the next column to the left.

$2$ shaded squares in the next column to the left.

$\vdots$

$n$ shaded squares in the leftmost column.

Then use the rotational symmetry to conclude.

Title: Prove that $\forall n \in N $ , $ \sum_{i=1}^n i = \frac{n(n+1)}{2}$, counting in two ways the number of shaded squares in the diagram

Body:
Prove that $\forall n \in  N $  $$ \sum_{i=1}^n i = \frac{n(n+1)}{2}$$ counting in two ways  the number of shaded squares in the diagram.

I have been thinking about this, but I can't understand how prove it counting the shaded squares. Can i assume that $ 1+2+3+...+n $ is the number of shaded squares?
I can't see it clearly.


问:
$P(A_0 | A_n)$ in a Bayesian network where $A_n → ... → A_0$
I asked a question here about C given A in a Bayesian network where $A→B→C$. According to this answer,

$$P(C=1∣A=1)=P(C=1∩B=1∣A=1)+P(C=1∩B=0∣A=1)$$
if A, B, C have a Bernouilli distribution.

So in the case of $$P(A_0 | A_n)$$ where $$A_n → ... → A_0$$ and $A_i$ has a Bernouilli distribution, what would be the generalized equation for N variables? Sorry if this can be found online, I'm not sure what is the correct terms to search

Thanks

答:
Well to start, that answer may be taken further

$$\begin{align}\mathsf P(C{=}1\mid A{=}1)&=\mathsf P(C{=}1\cap B{=}1\mid A{=}1)+\mathsf P(C{=}1\cap B{=}0\mid A{=}1)\\[1ex]&=\mathsf P(C{=}1\mid B{=}1)\mathsf P(B{=}1\mid A{=}1)+\mathsf P(C{=}1\mid B{=}0)\mathsf P(B{=}0\mid A{=}1)\\&= \sum_{b\in\{0,1\}} \mathsf P(C{=}1\mid B{=}b)\mathsf P(B{=}b\mid A{=}1)\end{align}$$

Which for the DAG of $A_2\to A_1\to A_0$ will give

$$\begin{align}\mathsf P(A_2{=\,}a_2\mid A_0{=\,}a_0)&= \sum_{a_1\in\{0,1\}} \mathsf P(A_2{=\,}a_2\mid A_1{=\,}a_1)\mathsf P(A_1{=\,}a_1\mid A_0{=\,}a_0)\\[1ex]&=\sum_{a_1\in\{0,1\}}\prod_{i=1}^2\mathsf P(A_i{=\,}a_i\mid A_{i-1}{=\,}a_{i-1})\end{align}$$

And so, by extension...

$$\mathsf P(A_n{=\,}a_n\mid A_0{=\,}a_0)=\sum\limits_{\small\langle a_1,\ldots,a_{n-1}\rangle\in\{0,1\}^{n-1}}\prod\limits_{i=1}^{n}\mathsf P(A_i{=\,}a_i\mid A_{i-1}{=\,}a_{i-1})$$


问:
given $f(-x)=-f(x)$ how to prove that $\int_{-a}^{a} f(x)dx =0 $?
I think I have an intuitive understanding of why this is true but I can't prove it I just don't know how to relate $F(-a)$ to the information that was given

答:
\begin{align}
\int_{-a}^af(x)dx&=\int_{-a}^0f(x)dx+\int_0^af(x)dx\\
&=\int_0^af(-x)dx+\int_0^af(x)dx\\
&=0.
\end{align}


答:
Hint.

What you want is
$$
\int_{-a}^0f(x)dx+\int_0^af(x)dx=0
$$
Now apply the change of variable $u=-x$ for the first term and use the assumption that $f(-u)=-f(u)$.

Alternatively, apply the change of variable $u=-x$ to the integral $\int_{-a}^af(x)dx$ to see what you get.

Title: given $f(-x)=-f(x)$ how to prove that $\int_{-a}^{a} f(x)dx =0 $?

Body: I think I have an intuitive understanding of why this is true but I can't prove it I just don't know how to relate $F(-a)$ to the information that was given


问:
Analytically determine that $\arctan x$ is an odd function
Without producing the maclaurin series for $\arctan x$, how would determine whether it was odd or even?</p>

答: From a geometrical definition of $\tan$ and $\arctan$, their oddness follows by reflecting the right triangle $ABC$ with $AB=1$ and $BC=\tan \angle A$ along the line $AB$.


问:
Proof verification of non vanishing of $ ~L(1, \chi) \neq 0~$ for real valued character
I am self studying analytic number theory from Tom M Apostol introduction to analytic number theory and I am asking for solution verification for a part of Theorem 6.20 of Apostol.

I am adding it's image -

I have only doubt in proving that $L(1, \chi) \neq 0$ .

My attempt - Assuming Part (b) , if I put $x\to\infty$ in part (b) , then if $ L(1, \chi ) =0 $ for some $n$, then $B(x) \to \infty = O(1)$ , which is a contradiction.

Is my proof right? Can someone please verify.

Edit 1 -> This is the proof given in Apostol Introduction to analytic number theory. Please note that he doesn't proves  how L(1 , $\chi ) \neq $ 0 .
That's why I am asking for verification of my argument.

答:
Yes, assuming (b), if L(1,X)=0 then B(x) = O(1), and this is in contradiction with (a).  So given these results (a) and (b) it follows that L(1,X) is not zero.

[Edit: Originally I mistyped this as "B(x) = O(x)"]


问:
Analyzing functions with absolute values
I have a question. I am having trouble analyzing functions with absolute values, for example the following:

$$\frac{\ln{|x|}}{x}-x+1$$

Now, what I usually would do if I got a function with absolute values is try to break it down, for example if I had simply $|x|$ I know it's $ x, x\ge0$ and $-x, x<0$. But since I have $\ln|x|$ I don't know how to proceed.

Firstly, I know that the function is defined for all real x except $0$. I know that the function is zero at $-1, 1$, but if I try to calculate the sign of the function (where it's above and below the $x$-asis) I have trouble because I don't know how to break $\ln{|x|}$ into smaller parts.

Can anyone help?

Body:
$$f(x)=\frac{\ln|x|}{x}-x+1$$
is the same as
$$
f(x)=\begin{cases}
\frac{\ln(-x)}{x}-x+1&;\;x<0\\
\frac{\ln x}{x}-x+1&;\;x>0\\
\end{cases}
$$


问:
Is this true: adding a random DIAGONAL perturbation can make a nondiagonalizable matrix diagonalizable?
For any nondiagonalizable matrix $A\in\mathbb{R}^{n\times n}$, let $\hat{A}=A+E$ where $E$ is a small random DIAGONAL matrix (e.g. diagonal entries of $E$ are i.i.d. sampled from $N(0,\epsilon^2)$ for arbitrarilly small $\epsilon>0$). Can we conclude that $\hat{A}$ is diagonalizable with probability $1$ (Here $A$ is fixed and the randomness is only from $E$)?

My question is similar to this question, but here the perturbation matrix is required to be diagonal.

答:
Assuming we're diagonalizing over the complex numbers, yes. In fact, we can perturb $A$ such that all its eigenvalues are distinct, which will be more than good enough.

Some notation: let $A^{\mathsf L}$ be the $(n-1)\times(n-1)$ leading principal submatrix of $A$: the matrix with the last row and column of $A$ removed.

Lemma. If $\lambda$ is an eigenvalue of $A$ with algebraic multiplicity $>1$, then $\lambda$ is an eigenvalue of $A^{\mathsf L}$.

Proof. In general, $\lambda$ might not have as many eigenvectors as its algebraic multiplicity, but it has as many generalized eigenvectors as that. A vector $\mathbf x$ is a generalized $\lambda$-eigenvector of $A$ if $(A - \lambda I)^k \mathbf x = \mathbf 0$ for some $k$.

If $\mathbf x, \mathbf y$ are two generalized $\lambda$-eigenvectors of $A$, then any linear combination of them is also a generalized $\lambda$-eigenvector. In particular, the linear combination $\mathbf z = \frac1{x_n} \mathbf x - \frac1{y_n} \mathbf y$ has last coordinate equal to $0$. This makes $(z_1, \dots, z_{n-1})$ a generalized $\lambda$-eigenvector of $A^{\mathsf L}$, which can only happen if $\lambda$ is an eigenvalue of $A^{\mathsf L}$. $\quad\square$

Now we can go on to prove the main result. Let's pick $E$ in two steps: first, pick $E_{11}, E_{22}, \dots, E_{n-1,n-1}$ and second, pick $E_{nn}$. By induction, we can show that with probability $1$, $(A+E)^{\mathsf L}$ has all distinct eigenvalues. (This always holds for $n=1$.) We'll show that in that case, with probability $1$, the choice of $E_{nn}$ will preserve that property for $A+E$.

By the lemma, the only repeated eigenvalues we have to worry about are the $n-1$ eigenvalues of $A'$. Let $\lambda$ be one of those eigenvalues.

We can write the characteristic polynomial $f(x) = \det(A + E - x I)$ as $p(x) + E_{nn} q(x)$: just expand by minors along the last row. In particular, $q(x) = \det((A+E)^{\mathsf L} - xI)$, the characteristic polynomial of $(A+E)^{\mathsf L}$. If $\lambda$ is a repeated eigenvalue of $A+E$, then we have $f(\lambda) = f'(\lambda) = 0$. Because $\lambda$ was a single eigenvalue of $(A+E)^{\mathsf L}$, we also have $q(\lambda)=0$ but $q'(\lambda) \ne 0$. This lets us solve $f'(\lambda) = p'(\lambda) + E_{nn} q'(\lambda) = 0$ for $E_{nn}$: $\lambda$ can only be a repeated eigenvalue of $A+E$ if $E_{nn} = -\frac{p'(\lambda)}{q'(\lambda)}$.

So for each eigenvalue of $(A+E)^{\mathsf L}$, there is at most one value of $E_{nn}$ that will make it a repeated eigenvalue of $A+E$. With probability $1$, $E_{nn}$ avoids all those values, and so all eigenvalues of $A+E$ are distinct, completing the proof.


问:
How do we know if a subset S of R^2 represents an area?
As an example:

Let $S_1 := \{ (x,y) | x^2 + y^2 \leq 1 \} \Longrightarrow S_1 \subset R^2$,

which represents the area of a "filled" circle with radius $r = 1$ and center $c = (0,0)$. What exactly makes $S_1$ an area? How do we know that this is not just a "random" collection of points, such as for example $S_2 = \{(0,0), (1,1), (2,2)\}$? Intuitively, I would say a subset $S$ is an area, if $Area(S) > 0$, but then, how would you define the $Area$ function?

答:
I'm wondering where you are seeing this use of the word "area", in the assertion that the set $S_1$ "represents the area of a "filled" circle". It sounds like an intuitive notion that has no strict mathematical definition, so I doubt that your question "what exactly makes $S_1$ an area" is answerable.

As you say, generally speaking "area" is a function which assigns a non-negative real number to a certain collection of subsets of $\mathbb R^2$. In analysis one learns that the subsets in this collection are known as the measurable subsets. To put it another way, the measurable subsets $A \subset \mathbb R^2$ are exactly those subsets to which a value of $\text{area}(A) \in [0,\infty)$ is assigned. This "measurable" property is a true--false property: some subsets are measurable; others are not. You can see this theory developed in many analysis textbooks (see the links in the comment of @JMoravitz).

So, for example, the set $S_1$ in your question is measurable, and its area is $\pi$.

Also, your set $S_2$ is measurable, and its area is zero.

But I have not ever seen "area" used itself as a true--false property of subsets of $\mathbb R^2$, i.e. one does not say "this subset of $\mathbb R^2$ is an area; that subset is not".


问:
Determine $s: M_{2x2}(\mathbb{R}) \rightarrow\ \mathbb{R}^{3}$ such us $ST=Id$ given $T:\mathbb{R}^{3}\rightarrow\ M_{2x2}(\mathbb{R})$ injective
Determine $T:\mathbb{R}^{3}\rightarrow\ M_{2x2}(\mathbb{R})$ injective such as $Im(T)$ contains the following vectors

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

Then, determine $s: M_{2x2}(\mathbb{R}) \rightarrow\ \mathbb{R}^{3}$ such us $ST=Id$

I've defined $T: \begin{pmatrix} a \\ b\\ c\end{pmatrix} = \begin{pmatrix} a+c & b \\ a & b\\ \end{pmatrix} $ that I believe satisfies the requested since $Ker(T)= {0} $ and $dim(Im(T))=dim \mathbb{R}^{3} $

For the second part, I was thinking to  find $s$ as the inverse of the matrix associated to the transformation $T$ since is injective. But I've realized that the $det(T)=0$ i.e. the determinant of the matrix of the transformation is null then isn't invertible, which confuses me since is injective. Does anyone can explain this fact? Does anyone can suggest any other way I could proceed?

答:
Well, since $s$ is a map from a $4$-dimensional vector space to a $3$-dimensional vector space, it cannot be invertible (or for that purpose the inverse of $T$). However, you can demand that the restriction of $S$ to $\mathrm{Im}(T)$ be the inverse. There's of course many ways to achieve that but here is one that undoes the particular $T$ that you picked:
$$ S : \mathrm{Mat}_{2 \times 2}(\mathbb{R}) \rightarrow \mathbb{R}^3, \\
       \begin{pmatrix} A & B \\ C & D \end{pmatrix} \mapsto (C, (B+D)/2, A-C)^T.$$


问:
Given a sequence $a_{n}= \frac{2\,a_{n+ 1}}{1+ a_{n+ 1}^{2}}\in (0, 1).$ Prove that $\sum a_{n}< \frac{2\,a_{1}}{1- a_{1}}.$

Given a sequence $a_{n}= \dfrac{2\,a_{n+ 1}}{1+ a_{n+ 1}^{2}}\in (0, 1).$ Prove that $\sum a_{n}< \dfrac{2\,a_{1}}{1- a_{1}}.$

How can I seperate $n$ parts from $\dfrac{2\,a_{1}}{1- a_{1}}$ and each of them $u_{n}> a_{n}{\it ?}$ I observe
$$a_{n}- a_{n+ 1}= \dfrac{a_{n+ 1}\left ( 1- a_{n+ 1}^{2} \right )}{1+ a_{n+ 1}^{2}}= \dfrac{a_{n}\left ( 1- a_{n+ 1}^{2} \right )}{2}$$
So, what $u_{n}- u_{n+ 1}$ sould be ? I need to the help, thanks a real lot.

Edit: I found one relationship that is
$$\frac{2\,a_{n+ 1}}{1+ a_{n+ 1}^{2}}\geq a_{n+ 1}\left ( 2- a_{n+ 1} \right )$$
Sorry I can't talk it clearly now, because it's too late here. I'll post the proving of the inequality as soon as well.

答:
First, you need to prove that $a_n$ converges to $0$. With what you wrote, you can notice that $\forall n, a_{n+1}\leq a_n $ and $a_n>0 $.

Hence, $a_n$ is monotone and bounded, so it converges. Since you have $f(a_n)=a_{n+1} $ with $f$ the bijection of $\frac{2x}{1+x^2} $, it must converge to a fixed point of $f$, and you can notice that $0$ is one.

(edit :) $1$ is also a fixed point of $f$, however, since $a_1<1$ and $a_n$ is decreasing, it can't converge to $1$ :
$$\lim_{n\to\infty} a_n\leq a_1 <1 $$

So you get that $a_n$ converges to $0$, but it's not over yet !

You can use telescopic sums to get :

$$\sum_{n=1}^{N-1} (a_{n+1}-a_n )=a_N-a_1=\sum_{n=1}^{N-1}\frac{a_n(a_{n+1}^2-1)}{2}$$
since you have $a_n$ decreasing and less than $1$, you know that :
$$a_{n+1}^2\leq a_{n+1}\leq a_n\leq ...\leq a_1 $$

Hence,$ \frac{a_n(a_{n+1}^2-1)}{2}\leq \frac{a_n(a_1-1)}{2} $

So,

$$a_N-a_1\leq\frac{(a_1-1)}{2} \sum_{n=1}^{N-1}a_n\Leftrightarrow\\
\frac{2a_N}{a_1-1}-\frac{2a_1}{a_1-1}\geq \sum_{n=1}^{N-1}a_n \text{ (because $a_1<1$)}$$

An now you can take the limit, since $a_n$ goes to $0$, and $\sum a_n $ is an increasing sequence and it is bounded, so it converges, and you get :

$$\boxed{\sum a_n\leq \frac{2a_1}{1-a_1} }$$


问:
How do I formally prove $\lim_{x \to\infty}f(x+b)-f(x) = 0$?
This question all stems from me wanting to formally prove the statement that $\lim_{x \to\infty}f(x+b)-f(x)$ should be equal to zero. My reasoning is because x approaches $\infty$, x becomes much greater than b ($x\gg b$), and therefore $x+b \approx x$, making the statement be $\lim_{x \to\infty}f(x) - f(x) = \lim_{x \to\infty} 0 = 0$. However, the trouble is that I need to formally prove the statement that $x\gg b$ implies $x+b \approx x$ (aka. a more rigorous proof) which I don't know how to do. My question is how to formally prove that $x\gg b$ implies $x+b \approx x$ or, if that core assumption is wrong, how to formally prove that $\lim_{x \to\infty}f(x+b)-f(x) = 0$ because I'm like 99% sure that it's true.

答:
Your claim is false, however there is still something interesting here, and it is the (or one of the) proper and formal definition of your $\approx$ symbol.

First of all, your initial claim is false, because although $x+b$ gets relatively closer to $x$ as $x \to +\infty$, it does not mean that there images by $f$ do the same. For example, under $f : x \mapsto x$, we always have $f(x+b) - f(x) = x+b - x = b$.

Nonetheless, it is still a good idea to learn how to properly work with this intuition of "things becoming more or less the same", like $x+b \approx x$ if $x \to +\infty$. One way to define this formally is to the notion of asymptotic equivalent.

Let $f, g$ functions defined in a neighbourhood of $a \in \mathbb R \cup \{\pm \infty\}$. Then, we say that $f$ and $g$ are asymptotically equivalent in the neighbourooh of $a$ if $\frac{f(x)}{g(x)} \xrightarrow[x \to a]{} 1$ (there is a way to define this if $g(x) \xrightarrow[x\to a]{} 0$ but it requires some extra-definitions which are not useful here).

For example, $x^2 + x$ and $x^2$ are equivalent as $x \to +\infty$ because $\frac{x^2+x}{x^2} \to 1$.

What is interesting is that this property of being equivalent can be composed with several operations (for example, the product or the quotient ...). However, applying a function - even a continuous one - to equivalent functions does not necessarily yield equivalent functions, as we saw.


问:
Surjectivity of a function using calculus.
Consider $f:\{ x \in \mathbb R  | x=0    $  or $ sin(\dfrac{1}{x}) \geq 0 \} \subset \mathbb R  \longmapsto \mathbb R$; $f(x)=0$ if $x=0$ or $f(x)=x^2sin(\dfrac{1}{x})$ if $x\neq 0 $ and $g:[0,\infty)\subset \mathbb R \longmapsto \mathbb R$; $g(y)=\sqrt y$

Show that $R(f)=D(y)$

Here's what i have:

$\subseteq )$ Since  $sin(\dfrac{1}{x}) \geq 0 $ and $x^{2} \geq0 \Rightarrow f(x) \geq 0$ and its trivial.

$\supseteq$ Let $y \in [0,\infty) $ we need to find $x \in \{ x \in \mathbb R | x=0    $  or $ sin(\dfrac{1}{x}) \geq 0 \}$ such that  $f(x)=y$. I want to use the Intermediate-value Theorem of Continuous Functions. It doesn't occurs to me other way to solve this. I already know that f is continuous because $\lim_{x \to 0} xsin(1/x)=0$ and $\lim_{x \to 0} x=0$ (thus $f$ is continuous in $0$, the rest of the continuity follows for product of continuous functions on $f$ domain). If $y=0$, we have and $x=0 \in D(f)$ such that $f(0)=0=y$. Suppose that $0<y$. To use the theorem, i need to find $f(b)>y$ for some $b \in D(f)$. The function will be continuous on $[0,b]$, that will imply that exists a $\xi \in (0,b)$ such that $f(\xi)=y$. I don't find the goddamn point. I tried archimedian property: $y<k<2\pi + k$. My other tools are Chain rule and derivative of the inverse funtion. This exercise appears on Sagan's book "Advanced Calculus" page 127.

答:
You want to show that $f(x)=x^2\sin(1/x)$ is unbounded.

If you know Taylor series, this is essentially because $\sin h=h+O(h^3)$ as $h\to0$. Alternatively,
$$\lim_{x\to\infty}x\sin(1/x)=\lim_{h\to0}\frac{\sin h-\sin0}{h}=\cos0=1,$$
so $x^2\sin(1/x)\to\infty$ as $x\to\infty$.


问:
Let $W$ be well-ordered and $f$ increasing. If $z$ is the smallest $x$ such that $f(x)<x$, why does $f(f(z))<f(z)$?
I am currently working on Set Theory of Thomas Jech, and I have a question about Lemma 2.4 which is :

Lemma

If $(W, <)$ is a well-ordered set and $f:W \rightarrow W$ is an increasing function, then $f(x)\geq x$ for each $x \in W$.

Proof

Assume that the set $X=\{x \in W : f(x) < x\}$ is nonempty and let $z$ be the least element of $X$. If $w=f(z)$, then $f(w)<w$, a contradiction.

I have a problem understanding the proof. I've found that the proof makes sense if $w \in X$ since

(i) $z\in X \rightarrow f(z)<z$ and

(ii) $z$ is least element of $X \rightarrow (\forall x \in X)z \leq x)$

(iii) $f$ is increasing $\rightarrow (\forall x \in X)f(z) \leq f(x) $

(iv) $w \in X \rightarrow f(w) < w$

But by (iii) and $w \in X$, $f(z) \leq f(w) \iff w \leq f(w)$. This contradicts with (iv).

However, I can't figure out why $w \in X$. Why is it? Or is there any mistake with my proof?

答: Since $f$ is increasing and $w<z$, $f(w)<f(z)=w$.


问:
Determine if there's a linear map such that...
Today in the class we were solving a following problem:
Determine if there's a linear map $\phi : R^3 \rightarrow R^3$ such that $\phi(2,1,0)=(3,2,1), \phi(4,2,1) = (4,1,0), \phi(2,2,1) = (2,3,3), \phi(2,2,2) = (0,0,1)$. It was then solved by creating an augmented matrix with the inputs for $\phi$ written in rows in the left hand side of the matrix and outputs of $\phi$ in the right hand side, also in rows. Then the matrix has been row reduced until an identity appeared in the left hand side... it seemed to me like some black magic. I have no idea why or how it works. This whole method doesn't make any sense to me. Is there any better way of doing it or some explanation why something like this works?

答:
You must have studied some verson of the following:

Theorem: Any linear map $\;T:V\to W\;$ , with $\;V,\,W\;$ linear spaces over the same field, is uniquely and completely determined once we know the action of $\;T\;$ on any basis $\;A=\{v_1,...\}\;$ of $\;V\;$ , meaning: $\;\{Tv_1,...\}\;$ completely and uniquely determines $\;T\;$ .

The above theorem holds for both infinite and finite dimesnional spaces, and from here it is not hard to see that

For any basis $\;A=\{v_1,...\}\;$ of $\;V\;$ and any set $\;B=\{w_2,...\}\;$ of elements in $\;W\;$ , with $\;|A|=|B|\;$ , any function $\;t: A\to B\;,\;\;tv_i=w_i\;$ can uniquely be extended by linearity to a linear map $\;T: V\to W\;$ such that $\;Tv_i=w_i\;$ .

Thus, in your case, you only have to check that the set of vectors on which the action of $\;\phi\;$ is given is a basis of $\;\Bbb R^3\;$ ...


问:
Mean curvature of the sphere of radius r
I found in a book that if $H$ is the mean curvature vector field of the sphere $S^n(r)$ in $\mathbb{R}^{n+1}$, then $||H||^2 = \frac{1}{r^2}$ in every point of $S^n(r)$. I know that, if $x\in S^n(r)$ and $e_1, \ldots, e_n$ is an ortonormal basis of $T_x S^n(r)$, then $H(x) = \frac{1}{n}\sum_{i=1}^n h(e_i,e_i)$, where $h$ is the second fundamental form of the sphere in $\mathbb{R}^{n+1}$, but I am stuck here.

How should I prove that $||H||^2 = \frac{1}{r^2}$?

答: Let $\alpha$ be a unit speed curve on the sphere. Then to find $h_{\alpha(t)}(\alpha'(t),\alpha'(t))$, we project $\alpha''(t)$ in the normal direction of the sphere. So $$h_{\alpha(t)}(\alpha'(t),\alpha'(t))=\frac{\langle \alpha''(t),\alpha(t)\rangle}{\langle \alpha(t),\alpha(t)\rangle}\alpha(t)= -\frac{1}{r^2}\alpha(t),$$since $\langle \alpha'(t),\alpha(t)\rangle=0$ leads to $\langle \alpha''(t),\alpha(t)\rangle = -1$ by differentiating. If $N(p)=p/r$ is the outward unit normal field along the sphere, we have shown that $$h_p(v,v)=-\frac{1}{r}N(p)$$for all unit tangent vectors $v$. Let $v$ range over an orthonormal basis of the tangent space and average $n$ copies of this to get $$H(p)=\frac{1}{n}\left(-\frac{n}{r}N(p)\right)= -\frac{1}{r}N(p)\implies \|H(p)\|=\frac{1}{r}.$$Also, adjusting the scale and polarizing, we see that $$h_p(v,w)=-\frac{1}{r}\langle v,w\rangle N(p)$$for all tangent vectors $v$ and $w$ at $p$ (no longer restricted to be unit).


问:
Calculating the end point angle of an arc.
I am currently coding a program that draws a race track by combining multiple line segments that the user defines (which can be either a straight or a curve).

For my curve, I have the data for its radius, length and starting point. Using some maths explained here, I can also calculate the end point coordinates.

What would be a way to calculate the endpoint angle of the arc? It is important for me to know the end angle as the next line segment that connects with the arc will start with the same angle as the arc.

Example track Diagram

Edit

Problem Diagram

I am interested in finding the angle that a tangent intersecting the end point would make with the x axis.

答:
Edit: Let  $r$ be the (known) radius and $M$ the midpoint of $SE$ ($S$, starting point; $E$, endpoint).

Angle $\alpha$ (see figure) is such  that

$$\cos \alpha =\dfrac{SM}{SC}=\dfrac{SE}{2r} \ \iff \ \alpha=\operatorname{acos}(\dfrac{SE}{2r})$$

with

$$SE=\sqrt{(x_e-x_s)^2+(y_e-y_s)^2}$$

using coordinates $S=(x_s,y_s)$ and $E=(x_e,y_e),$.


问:
How to prove R is a local ring
If Jacobson radical is a prime ideal and R is semi local then how to prove R is a local ring?

Suppose R has two maximal ideals M and N. Let x belongs to M-N and y belongs to N- M, then xy belongs to J(R). Since J(R) is prime, we have either x or y belongs to J(R). If x belongs to J(R) then x belongs to N. Similarly if y belongs to J(R). This is a contradiction.
Is this is enough to prove the result

答:
No, it is not. $xy$ is in $M\cap N$ of course, but how do you know it's in $J(R)$? It could be that $xy\in (M\cap N)\setminus J(R)$.

Another red flag is that you didn't use the semilocal hypothesis.  That does not mean you are wrong in itself, but it does draw ones attention to potential counterexamples. If your reasoning were valid, and since it makes no use of the semilocal hypothesis, we'd be able to apply your argument to $\mathbb Z$ to claim it is local!  Of course this is not the case...

But you are not too far off.  Since $R$ is semilocal, it has only finitely many maximal ideals $M_j$.  You can indeed demonstrate there is a set of elements $x_i$ such that $x_i\in M_i$ but $x_i\notin M_j$ for some $j\neq i$. The product $x=\prod_{i=1}^n x_i\in J(R)$ because $\prod_{i=1}^n M_i\subseteq\bigcap_{i=1}^n M_i=J(R)$.  (Two ideals might not have been enough.) Now try what you were trying before again with this new $x$.

Title: How to prove R is a local ring


问:
Equality of differentiable stochastic processes
Suppose we have two continuous time stochastic processes $X_t$ and $Y_t$ defined on a fixed probability space $\Omega$ that satisfy $$ \forall t \in \mathbb{R}: \mathbb{P}\{X_t = Y_t\} = 1 $$ and for every choice of $ \omega \in \Omega$ the mapping  $$ \mathbb{R} \to \mathbb{R}: t \mapsto X_t(\omega) $$ is differentiable.

It is possible to show that because of this the mapping $$ \mathbb{R} \to \mathbb{R}: t \mapsto Y_t(\omega) $$ is also differentiable for each $\omega$ and that furthermore holds that $$\forall t \in \mathbb{R}: \mathbb{P}\left\{\frac{dX_t}{dt} = \frac{dY_t}{dt}\right\} = 1 \ ? $$

答: No. Consider the probability space $[0,1]$ with its Borel $\sigma$-algebra and the Lebesgue measure and define the processes $X_t(\omega) = 0$ and $Y_t(\omega) = 1_{\{t = \omega\}}$ for a counter-example.


问:
Confusing Integration Problem, Don't Know Where to Start
The question is:

If f is continuous and $ \int_0^9 f(x)dx = 16$, find $ \int_0^3 xf(x^2)dx. $

It seems like this isn't too hard of a problem, but we just started studying this sort of integral problem and I honestly don't know where to start.  Thanks for any help in advance!

答: Hint let $x=\sqrt{u}$  then you will get what you need. are you able to finish


问:
What are the symmetric elements of $SU(3)$?
Is there any simple way to know what are the matrices $M\in\operatorname{SU}(3)$ s.t $M=M^t$? For exemple, for $\operatorname{SU}(2)$ it is easy to verify that the symmetric elements are either diagonal or
$$\left(\begin{array}{cc}
0 & i \\
i & 0
\end{array}\right).$$

答:
I assume you are asking about the triplet representation, judging from your doublet paradigm for SU(2), which should not be "either-or", but rather
$$
i~ \begin{pmatrix}
                \sin\phi &  \cos\phi   \\
         \cos\phi & - \sin\phi
      \end{pmatrix} .
$$

I gather you are looking for "seat-of-the-pants" easy, so your first look should be at the elements generated by Gell-Mann's symmetric generators, {$\lambda_3, \lambda_8, \lambda_1, \lambda_4, \lambda_6$}, given the generic formula for the triplet rep group element,
$$
\begin{align}
  \exp(i\theta H) ={}
          &\left[-\frac{1}{3} I\sin\left(\varphi + \frac{2\pi}{3}\right) \sin\left(\varphi - \frac{2\pi}{3}\right) - \frac{1}{2\sqrt{3}}~H\sin(\varphi) - \frac{1}{4}~H^2\right]
           \frac{\exp\left(\frac{2}{\sqrt{3}}~i\theta\sin(\varphi)\right)}
                {\cos\left(\varphi + \frac{2\pi}{3}\right) \cos\left(\varphi - \frac{2\pi}{3}\right)} \\[6pt]
    & {} + \left[-\frac{1}{3}~I\sin(\varphi) \sin\left(\varphi - \frac{2\pi}{3}\right) - \frac{1}{2\sqrt{3}}~H\sin\left(\varphi + \frac{2\pi}{3}\right) - \frac{1}{4}~H^{2}\right]
           \frac{\exp\left(\frac{2}{\sqrt{3}}~i\theta \sin\left(\varphi + \frac{2\pi}{3}\right)\right)}
                {\cos(\varphi) \cos\left(\varphi - \frac{2\pi}{3}\right)} \\[6pt]
    & {}  + \left[-\frac{1}{3}~I\sin(\varphi) \sin\left(\varphi + \frac{2\pi}{3}\right) - \frac{1}{2\sqrt{3}}~H \sin\left(\varphi - \frac{2\pi}{3}\right) - \frac{1}{4}~H^2\right]
           \frac{\exp\left(\frac{2}{\sqrt{3}}~i\theta \sin\left(\varphi - \frac{2\pi}{3}\right)\right)}
                {\cos(\varphi)\cos\left(\varphi + \frac{2\pi}{3}\right)}
\end{align}
$$
generated by a traceless 3×3 Hermitian matrix  H, normalized as $\operatorname{tr}( H^2) =2$,  where
$$\varphi \equiv \frac{1}{3}\left[\arccos\left(\frac{3\sqrt{3}}{2}\det H\right) - \frac{\pi}{2}\right].$$

You notice that the linear combinations from this 5-generator set, squared, preserve the symmetry under transposition, so this subspace  generates elements in your set.

Exploring "coincidences" where special coefficients annihilate terms involving antisymmetric generators might be a formidable problem, however.


问:
How to solve $at + b = 0 \pmod {(a-t)}$?
Is there any way (except trying for $t=0,1,2,\ldots,a-1)$ to solve the following equation for $t$ when $a$ and $b$ are known?

$$ at +b = 0 \pmod{(a-t)} \text{ with } a,b,t \in N $$

答:
$$a*t +b = 0 \mod (a-t) \Leftrightarrow at +b = k(a-t)$$
for some integer $k$.

This is equivalent to

$$at+kt=ka-b \Leftrightarrow t=\frac{ka-b}{a+k}=a-\frac{a^2+b}{a+k}$$

This is an integer if and only if $a+k$ is a divisor of $a^2+b$.

Thus,

Step 1: List all the integer divisors of $a^2+b$.

Step 2: For each divisor $d$ set $k=d-a$ and then $t=a-\frac{a^2+b}{d}$. Keep only the positive solutions.


问:
Prove that $\forall n \in N $ , $ \sum_{i=1}^n i = \frac{n(n+1)}{2}$, counting in two ways the number of shaded squares in the diagram
Prove that $\forall n \in  N $  $$ \sum_{i=1}^n i = \frac{n(n+1)}{2}$$ counting in two ways  the number of shaded squares in the diagram.

I have been thinking about this, but I can't understand how prove it counting the shaded squares. Can i assume that $ 1+2+3+...+n $ is the number of shaded squares?
I can't see it clearly.

答:
Here's an idea for you, which seems to explain the famous legend about how Gauss came up with a solution at his school:

Call the sum of all shaded squares $\;S\;$ , and we now count them in two ways:

(*) Number of shaded squares by row, from to to bottom:

$$\;S= 1 +2 +3+\ldots+n\;\;(*)$$

(**) And now let's count the number of shaded squares per column from left to right:

$$S=n+(n-1)+(n-2)+\ldots+2+1 \;\;(**)$$

Now put both sums above one over the other and sum them up column after column:

$$\begin{cases}S=1&+&2&+&3&+\ldots+&(n-1)&+&n\\{}\\
S=n&+&(n-1)&+&(n-2)&+\ldots+&2&+&1\\{}\\
--&--&--&--&--&--&--&--&--&--&--\\{}\\
2S=(n+1)&+&(n+1)&+&(n+1)&\ldots&(n+1)&+&(n+1)\end{cases}$$

You got, in fact, $\;2S=n(n+1)\;$ ...and now divide by two and we're done.


问:
How do I get that $11^{35} \equiv 6 \hspace{0.1cm} \text{mod} (13)$ from $11^{36} \equiv 1 \hspace{0.1cm} \text{mod} (13)$
I have no clue how to do this, I manage to get I get that $11^{36} \equiv 1  \hspace{0.1cm} \text{mod} (13)$ but I can't get anywhere from there.

答:
Use this relation:

$6\times 11-5\times 13=1$

So we can write:

$$11^{36}\equiv (6\times 11-5\times 13=1) \ mod (13) \equiv 6 \times 11\ mod (13)$$

Therefore:

$11^{36}\equiv 6\times 11 \ mod(13)$

Dividing both sides by 11 we get:

$11^{35} \equiv 6 \ mod(13)$


答:
The diagram is illustrating $n=8$.

Counting shaded squares in successive rows, it's apparent that there are $1,2,3,4,5,6,7,8$ squares in the rows - not actually counting them, really, just observing that the amount increases by one each time. So there are $\sum_{i=1}^8 i$ shaded squares.

It's also apparent that there are the same number of unshaded squares - for example by observing the same pattern as above but from the bottom upwards.

This gives us that the total squares in the diagram is $2\sum_{i=1}^8 i$

However we can also easily see that the total number of squares is $8\times 9$ - the $8$ rows multiplied by the $8+1$ columns.

It's also clear that none of this is dependent on any special property of the number $8$ - it would work no matter what the limit was.

So we have a clear demonstration that  $$ 2\sum_{i=1}^n i = n(n+1)$$ and one algebraic step gives us the formula.


问:
Linearized system: Value of the δu(t)
To obtain the response of the nonlinear system for any input, Jacobian linearization procedure can be applied. According to procedure, we have to change the state variables by using values of equilibrium points.
\begin{align}
\delta x(t)&=x(t)-x_0\\
\delta y(t)&=y(t)-y_0\\
\delta u(t)&=u(t)-u_0\\
\end{align}

According to MATLAB documentation, $y_0$ is the value of $y$ at the operating point and $x_0$ is the state vector at the operating point. In here i have a question. What is the value of the $u_0$?

My purpose is only simulate the nonlinear model, there is no controller in here. In my opinion, i should assume an acceptable $u_0$ according to system input. For example, if $u$ is a unit step function, what may be the value of $u_0$ for succesful simulation?

Note: I linearize my system around equilibrium points. There might be no equilibrium points or they may be unstable, i will investigate the details of them later.

Thanks,

答:
The constant $u_0$ is the input signal value around which you perform linearization. Suppose that the nonlinear system is given by $$\dot{x}(t) = f(x(t),u(t)).$$ For the linearization around the equilibrium $(x_0, u_0)$ it holds $f(x_0,u_0)=0$. In other words, $u_0$ is such an input signal that makes the state $x_0$ an equilibrium of the autonomous system $\dot{x}(t)=f(x(t),u_0)$.

If $x_0$ is already an equilibrium, then $u_0=0$.

Title: Linearized system: Value of the δu(t)


问:
Partition of an interval of $\mathbb{R}$
A partition of an inteval $[a,b]$ of $\mathbb{R}$ is generally defined as a finite sequence of the form:
$$a = x_0 < x_1 < x_2 < \dots < x_n = b$$

Then, $[a,b]$ is seen as the following union of intervals: $[x_0,x_1] \cup [x_1,x_2]\cup\dots\cup[x_{n-1},x_n]$.

I wonder if it makes sense to extend this definition to sequences of the form:
$$a = x_0 \leq x_1 \leq x_2 \leq \dots \leq x_n = b$$

Then, degenerate intervals (i.e. intervals with equal bounds) are allowed.

For instance, if $a=x_0=x_1=x_2=...=x_{n-1}<x_n=b$ then
$$[a,b] = [x_0,x_1] \cup [x_1,x_2]\cup\dots\cup[x_{n-1},x_n] = [x_0,x_0] \cup [x_0,x_1]\cup...\cup [x_0,x_n]$$

It this still a partition?

答:
The two definitions make sense, and yours is more general. However, I would like to elaborate on a classical confusion, also discussed here.

This confusion is due to the fact that one often thinks of partitions as disjoint subsets that cover a set: a partition $P$ of a set $S$ is a family $\{P_1,P_2,\cdots,P_k\}$ of subsets of $S$, called parts, such that:
$\bigcup_i P_i = S$ and $P_i\cap P_j \neq \emptyset \Rightarrow i=j$.

This is the classical definition of partitions of finite sets, and it may very well be used for intervals of $\mathbb{R}$ too, or any other set. However, it then raises questions.

Indeed, if we consider a closed interval $[a,b]$ of $\mathbb{R}$, then such a partition is a family of intervals that have to be open on one side, except for the last one. For instance $[a,x)$, $[x,y)$, $[y,b]$, with $x$ and $y$ in $[a,b]$, is a partition of $[a,b]$. This may however be seen as unsatisfactory as we end up a mix of closed and half-open intervals.

To avoid this, one may consider partitions of half-open intervals only: $[a,x)$, $[x,y)$, $[y,b)$ is a partition of $[a,b)$. Then, we only deal with half-open intervals.

Another approach is to allow non-empty intersections between parts, but require that they have null measure: $\bigcup_i P_i = S$ and $|P_i\cap P_j| \neq 0 \Rightarrow i=j$. Then, the intervals may overlap on their end-points, and $[a,x]$, $[x,y]$, $[y,b]$ is a partition of $[a,b]$. However, this does says in which of the three parts are $x$ and $y$, which may be frustrating.

Another approach, closer to what the question suggest, is to allow any kind of intervals, including degenerate ones. Then, $[a,x)$, $[x,x]$, $(x,y]$, $(y,b)$, $[b,b]$, for instance, is a partition of $[a,b]$. This is the most general form, I think, and I wonder if it may be represented as a sequence of values in the interval and relations between them.


问:
Multiple root of a polynomial is also a root of the derivative
Suppose $a\in\Bbb R$ is a root of $f(x)$ in $\Bbb R[x]$. Show that $a$ is a multiple root of $f(x)$ if and only if $f'(a) = 0$, if and only if the graph of $y = f(x)$ is tangent to the $x$-axis at $x=a$. </p>

<p>So for a I know that if $f'(a) = 0$, then $f(a)$ is a local extremum so $a$ is a root but I do not see why a would be a multiple root. </p>

答:
The Taylor expansion idea is nice, and probably the quickest.

However, if one wants to use more elementary techniques, then one can also use integration for the more difficult direction. Namely, assume that $f(a) = f'(a) = 0$ for a polynomial $f$ with degree at least $2$ (degree $1$ and $0$ cases are trivial). We would like to prove that $a$ is a zero of $f$ with multiplicity at least $2$.
Then
$$ f'(x) = (x-a)p(x) $$
with some polynomial $p(x)$ of degree at least $1$. Since $f(a)=0$, we have
$$ f(x) = \int_a^x (t-a)p(t) dt = \int_0^{x-a} s \cdot (c_k s^k + \dots + c_0) dt, $$
and this latter expression is a linear combination of $(x-a)^{j+1}$ ($j+1 \geq 2$). Hence $a$ is a zero with multiplicity at least $2$.


问:
Connecting the two definitions of $e$
There are two different ways I've been taught to understand the meaning of $e$.

$e$ can be defined as the total growth from continuously compounding interest in a single period. To make the growth rate the same as the dollar amount, consider I start with $\$1$. Then, $a_n$ represents the amount I have after compounding $n$ times.
\begin{align}
a_n&=1\cdot\left(1+\frac{1}{n}\right)^n\\[5pt]
e=a_{\max}&=\lim_{n \to \infty}\left(1+\frac{1}{n}\right)^n
\end{align}
As we increase the number of times we compound the interest, the final amount (in the case that we start with $\$1$), approaches $e$.

All exponential functions increase at a rate proportional to their current value. For example, consider the derivative of $2^x$:
\begin{align}
\frac{d\left(2^x\right)}{dx}&=\lim_{h \to 0}\frac{2^{x+h}-2^x}{h}\\[5pt]
&=\lim_{h \to 0}\frac{2^x2^h-2^x}{h}\\[5pt]
&=\lim_{h \to 0}\frac{2^x\left(2^h-1\right)}{h}\\[5pt]
&=2^x\lim_{h \to 0}\frac{\left(2^h-1\right)}{h}
\end{align}
From this we can see that the rate at which $2^x$ changes is proportional to its current value, with a proportionality constant of $$\lim_{h \to 0}\frac{\left(2^h-1\right)}{h}.$$ For $2^x$, this constant happens to be $\ln(2)$ (why is this the case?). $e$ can be defined as the base where this proportionality constant is $1$; therefore, the rate $e^x$ grows at is exactly its current value.

My question is this: how can the same constant have two (apparently) separate definitions? Is there a way of looking at $e$ that will combine these two definitions, and make it obvious as to why they are true? Also, why is the proportionality constant of any exponential functions growth rate the natural log of its base? Is there a way to understand why this is the case intuitively?

答:
Here is an alternative approach: if we first define the natural logarithm as
$$
\log x = \int_{1}^{x}\frac{1}{t} \, dt
$$
and the exponential function as the inverse of $\log$, then it is not much work to show that $e^x$ is its own derivative. (I go into more detail about this here.) Then, the limit
$$
\lim_{n \to \infty}\left(1+\frac{1}{n}\right)^n
$$
can be rewritten as
$$
\lim_{n \to \infty}e^{n\log(1+1/n)} \, .
$$
If we make a change of variables $h=1/n$, then this limit is equal to
$$
\lim_{h \to 0^+}e^{1/h\log(1+h)}
$$
For small $h$, $\log(1+h) \approx h$. This can be easily justified by considering the graph of $\log$:

$\log x$ denotes the area of the region bounded by the hyperbola $y=1/t$, the $t$-axis, and the vertical lines $t=1$ and $t=x$. When $x = 1+h$ (and $h$ is small), this region is approximately rectangular, with a width of $h$ and a height of $1$. Hence, $\log(1+h) \approx h$, with $h$ being a slight overestimate of the region's area.

This provides us with a nice heuristic argument that
$$
\lim_{h \to 0^+}e^{1/h\log(1+h)} = e^{1/h \cdot h} = e \, .
$$

Title: Connecting the two definitions of $e$


问:
Notation in the definition of random variable
I am trying to understand definition of random variable.

Given a probability space $(\Omega, \mathcal F, P),$ a random variable $X$ is a function from the sample space $\Omega$ to the real numbers $\mathbb R.$ Once the outcome $\omega \in \Omega$ of the experiment is revealed, the corresponding $X(ω)$ is known as realization of the random variable.

Consider two sample spaces $\Omega_1$ and $\Omega_2$ and a sigma-algebra $\mathcal F_2$ of sets in $\Omega_2.$ Then, for $X$ to be a random variable, there must exist a sigma-algebra $\mathcal F_1$ in $Ω_1$ such that for any set $S$ in $\mathcal F_2$ the inverse image of $S,$ defined by:

$$X^{-1}(S) := \{ω \mid X(ω) ∈ S\}$$

I do not know how to read this and I am hoping some one can explain each part to me.

答:
Probability notation can be a bit confusing at first! Maybe a simple example helps to see why the notation is actually chosen in a somewhat natural way:

Let's look at a specific probability space $(\Omega, F, P)$ that corresponds to the toss of a coin. So the sample space is $\Omega = \{H, T\}$, where we denote 'Heads' by $H$ and 'Tails' by $T$. We set $F = 2^\Omega$ and we're looking at a fair coin toss, so $P(H) = P(T) = \frac{1}{2}$.

Now we define the random variable $X:\Omega \rightarrow \mathbb{R}, X(H) = 0, X(T) = 1$. You can think of the r.v. $X$ as doing an 'experiment', in this case tossing the coin, and recording a $0$ for 'Heads' and a $1$ for 'Tails'. Now of course your question is, "What is the probability that my experiment results in a Heads?". So, linguistically you would want to write something like:

$$P(X = 0) = \frac{1}{2}$$

This is why we define it exactly this way:

$$P(X = 0) := P(X^-1(\{0\})) = P(\{\omega | X(\omega) = 0\})\, (= P(H) = \frac{1}{2})$$

We have to do it like this, because the probability measure $P$ 'lives' on the left-hand side (the $\Omega$-side) and can only measure things there, but the outcomes of the experiment 'live' on the right-hand side.

I hope this doesn't confuse more than it helps...


问:
Augmenting a matrix with a column and a row — what happens to the determinant?
Let $\mathbb A = (a_{i,j})_{1\leq i \leq n, 1\leq j \leq n}$ be a real matrix such that $\det(\mathbb A)\neq0$. Suppose we add a column $(a_{i,0})_{1\leq i \leq n+1} $ and a row  $(a_{n+1,j})_{0\leq j \leq n+1} $ to $\mathbb A$.

Under what sufficient conditions on the newly added numbers do we still have $\det(\mathbb A)\neq0$ ?

Under what sufficient and necessary conditions on the newly added numbers do we still have $\det(\mathbb A)\neq0$ ?

答:
This is my attempt:

Let $A$ be your matrix, then $\det A\neq 0$. Let me add the new on the left and the row on top, then the new matrix is given by $N=\begin{bmatrix}a & b \\c & A  \end{bmatrix}$, where $a\in\mathbb{R}$, $c$ is a column vector and $b$ is a row vector. Then $b=k_1A_{1}+k_2A_{2}+...+k_nA_{n}$ ($A_k$ is the kth row of $A$), that is $b$ can be written as a linear combination of the rows of $A$.

Row operations don't change whether a determinant is $0$ or not, hence you can perform row operations on $b$ until you turn it into a row of $A$. Namely:

$$\begin{bmatrix}a' & A_k \\c & A  \end{bmatrix}$$

Here, we have $a'$, instead of $a$ because we performed row operations.

For $\det N\neq 0$, you need that all your rows to be linearly independent. Then you need that $a'\neq c_k$. Hope this helps!

As an example consider $A=\begin{bmatrix}1 & 0 \\ 0 & 1\end{bmatrix}$, let $b=\begin{bmatrix}2& 3\end{bmatrix}$, then:
$$\begin{bmatrix}a & 2 & 3 \\ c_1 & 1 & 0 \\ c_2 & 0 & 1 \end{bmatrix}$$
We want to apply row operations to turn $b$ into one of the rows of $A$, for instance:
$$\begin{bmatrix}a & 2 & 3 \\ c_1 & 1 & 0 \\ c_2 & 0 & 1 \end{bmatrix} \rightarrow \begin{bmatrix}a/3 & 2/3 & 1 \\ c_1 & 1 & 0 \\ c_2 & 0 & 1 \end{bmatrix}\rightarrow \begin{bmatrix}a/3-2c_1/3 & 0 & 1 \\ c_1 & 1 & 0 \\ c_2 & 0 & 1 \end{bmatrix}$$

Then the condition would be that $a/3-2c_1/3\neq c_2$. For the sake of verifying, let's violate the condition, so $3c_2+2c_1=a$ (after doing some algebra). We can have $a=5,c_1=1,c_2=1$, then the matrix is:
$$\det \begin{bmatrix}5 & 2 & 3 \\ 1 & 1 & 0 \\ 1 & 0 & 1 \end{bmatrix}=5-2-3=0$$


问:
Examples of non-cyclic group with a cyclic automorphism group
In introduction to algebra we got the exercise:

Let $G$ be a group. Show that when $\operatorname{Aut}(G)$ is cyclic $G$ is abelian.

This doesn't make that much trouble. Denote the center (all commuting elements) with $Z$.
Then $G/Z$ is isomorphic to $\operatorname{Int}(G)$ where $\operatorname{Int}(G)$ denotes the subgroup of inner automorphisms. As every subgroup of a cyclic group is cyclic we have $G/Z$ is cyclic and hence $G$ is abelian (As a group which is cyclic of the center is abelian).

So the question is:

Is there a non cyclic group with a cyclic automorphism group?

We discussed the question already in chat and I found (thanks to google) a solution there, but I would enjoy other Examples.

答:
Whenever $G$ is finite and its automorphismus is cyclic we can already conclude that $G$ is cyclic.

Because as we already saw $G$ is abelian and finite, we can use the fundamental theorem of finitely generated abelian groups and say that wlog
$G=\mathbb{Z}/p^k\mathbb{Z} \times \mathbb{Z}/p^j \mathbb{Z}$. But the automorphismgroup isn't abelian and hence isn't cyclic.

For non finite groups the implication isn't true.

The following is from this link and only slightly reworded.

Let $G$ be the subgroup of the additive group of rational numbers comprising those rational numbers that, when written in reduced form, have denominators that are square-free numbers, i.e., there is no prime number $p$  for which $p^2$  divides the denominator.

Then:
The only non-identity automorphism of  is the negation map, so the automorphism group is  $\mathbb{Z}/2\mathbb{Z}$, and is hence cyclic.

The group $G$ is not a cyclic group. In fact, it is not even a finitely generated group because any finite subset of  can only cover finitely many primes in their denominators. It is, however, a locally cyclic group: any finitely generated subgroup is cyclic.


问:
In gradient descent, how do we know we found the smallest minimum?

Let's say we start at a wrong "hill" (the highest one), it will find the minimum in that area, but not the whole area? To me it seems, at the moment, that it depends a lot on what m and b we choose at the start.

答: In short, you don't. Gradient descent only gives you convergence to some local minimum. The first sentence of the wikipedia definition says it gives you a local minimum. In real life examples there often is only a single local minimum and even if there are several, gradient descent will often converge to the gloval minimum but there is no guarantee. As your graph shows, if you try it is not that hard to come up with examples where you get a local minimum which is not the global minimum.</p>


问:
Is expanding via Taylor series true only for values less than 1 ??
How do I prove this result??

prove $1+x/2-x^3/8<(1+x)^{1/2}$    , for $x>0$

And while we're at it, I had a deeper doubt, Is expanding via Taylor series true only for ,
$x<1$ ?

Because, we easily write the error term as the smallest power of x that is not in the expansion i.e if we expand upto $n^\text{th}$ power, we take error term as  $(x-a)^{n+1}*f^{(n+1)thderivative}(a)$$/(n+1)!$   , which would only be true if $x<1$ otherwise the most significant term should be the last term in the series which would tend to infinity for $x>1$.

This doubt arises because I have used Maclaurin series several times and there we always take $x$ tending to zero

thanks!

答:
The inequality
$$1+\frac{x}{2}-\frac{x^3}{8}<\sqrt{x+1}$$
is false, in general.

It is true for $x>\alpha$ where $\alpha\approx 0.743014$ is the largest root of
$$1+\frac{x}{2}-\frac{x^3}{8}-\sqrt{x+1}=0$$
(see picture below)


问:
Why $\log(W(e^2))=2-W(e^2)$?
While trying to solve $x+e^x=2$ I found two solutions:

$$x=\log(W(e^2))=2-W(e^2)$$

It is not at all obvious to me why the two solutions would represent the same number. How are the two related?

Any help to make this more intuitive or insightful would be appreciated!

答:
Let's start with the second equality:

\begin{align}
x&=2-W(e^2)\\
\implies 2-x &= W(e^2)\\
\implies (2-x)e^{2-x} &= e^2\\
\implies 2e^{2}e^{-x} - xe^{2}e^{-x} &= e^{2}\\
\implies 2e^{-x} - xe^{-x} &= 1\\
\implies 2 - x &= e^{x}
\end{align}

Now, with the first equality:

\begin{align}
x &= \log(W(e^2))\\
\implies e^x &= W(e^2)\\
\implies e^xe^{e^x} &= e^{2}\\
\implies e^{x+e^{x}} &= e^{2}\\
\implies x+e^{x} &= 2\\
\implies 2 - x &= e^{x}
\end{align}

and so we see that the two solutions are consistent.

Title: Why $\log(W(e^2))=2-W(e^2)$?


问:
Two definite integrals in terms of one another
While practicing definite integration I stumbled upon following question:

Q.) If $\int_{0}^{π/2}\ln(\sin x)dx=k$ then, find $\int_{0}^{π/2}\frac{x²}{(\sin x)²}dx$, in terms of $k$

My attempt:
I have memorised the first integral answer as

$\int_{0}^{π/2}\ln(\sin x)dx$=$-\frac{π}{2}\ln 2$=$k$

For second integral I did following:

Let $$I=\int_{0}^{π/2}\frac{x²}{(\sin x)²}dx$$

$$I=\int_{0}^{π/2}\frac{(\frac{π}{2}-x)²}{(\cos x)²}dx$$

$$[\int_{b}^{a}f(x)dx=\int_{b}^{a}f(a+b-x)dx]$$

and then i did by parts, but things become only more complicated. So please help if you can solve the second integral easily. THANKS IN ADVANCE

'ANSWER IS $-2k$'

答: Hint: Start from your $k$ integral and integrate by parts twice.