问:
Characteristic function converges pointwise to 0 - Baby Rudin
I have seen this claim on Winston Ou Real Analysis Lecture on youtube but he does not really explain how to get this conclusion

$f_n =  \chi_{[n,n +1)}$ converges pointwise to 0.

答: $f_n(x) = 0$ if $n > x$, so the limit as $n \to \infty$ is $0$.


问:
Given a set of unitary matrices, can one find a vector whose images under these unitary matrices span the underlying Hilbert space?
Given a set of (linearly independent) $d\times d$ complex unitary matrices $\{U_i\}_{i=1}^n \subseteq M_d$ with $n\geq d$, does there exist a vector $v\in \mathbb{C}^d$ such that $$\text{span} \{U_1v, U_2v, \ldots , U_nv\} = \mathbb{C}^d ?$$

The motivation for this question comes from the theory of mixed unitary quantum channels. A quantum channel $\Phi: M_d \rightarrow M_d$ is a completely positive and trace preserving linear map. Any such map admits a Kraus representation of the form $\Phi (X) = \sum_{i=1}^k A_i X A_i^*$, where $\{A_i \}_{i=1}^k \subseteq M_d$ and $\sum_{i=1}^k A_i^* A_i = \mathbb{I}_d$. We say that a quantum channel is mixed unitary if it can be expressed as a convex combination of unitary conjugations: $\Phi (X) = \sum_{i=1}^n p_i U_i X U_i^*$. Our aim then is to look for a rank one input projector $X = vv^*$ for some $v\in \mathbb{C}^d$ such that the output $\Phi (vv^*) = \sum_{i=1}^n p_i (U_i v) (U_i v)^*$ has full rank. This is possible only if $n\geq d$. To avoid trivial counterexamples, we can also assume that $\{ U_i\}_{i=1}^n \subseteq M_d$ is linearly independent.

Follow-up question: Since it has been shown below that the question can be answered in the negative for $d\geq 4$, the natural way of progression would be to ask if one can provide a classification of all the sets of (linearly independent) unitary matrices $\{U_i\}_{i=1}^n \subseteq M_d$ which allow for the existence of $v\in \mathbb{C}^d$ such that $$\text{span}\{U_1v, U_2v, \ldots ,U_nv\}=\mathbb{C}^d.$$
One can also try to answer this question for (linearly independent) sets of arbitrary complex matrices: $\{ A_i \}_{i=1}^k \subseteq M_d$.

答:
Here is an example of a set of $d$ unitary matrices $\{U_i \}_{i=1}^d \subseteq M_d$ for which the desired vector exists.

For each $i\in \{1,2,\ldots ,d \}$, we define $U_i$ to be the unitary shift matrix: $U_i e_k = e_{k+i}$, where the index addition happens modulo $d$ and $\{e_k \}_{k=1}^d$ is the standard basis of $\mathbb{C}^d$. Then, it should be clear that if we choose $v=e_1$ for instance, the set $\{U_i v \}_{i=1}^d$ is precisely the standard basis of $\mathbb{C}^d$ and hence spans $\mathbb{C}^d$.

ContentLicense: CC BY-SA 4.0


问:
Proving that the Laguerre polynomials do indeed solve the differential equation
I am trying to show that the Laguerre differential equation, given in my homework problem as

$xL''_n(x)+(1−x)L'_n(x)+ nL_n(x) = 0$,

is indeed solved by the Laguerre polynomials in their closed sum form:

$L_n(x)=\sum_{k=0}^n \binom{n}{k}\frac{(-1)^k}{k!} x^k$

I've tried substituting the sum into the equation but I haven't been able to resolve it:

$xL''_n(x)+(1−x)L'_n(x)+ nL_n(x)$

$ = x \sum_{k=0}^n \binom{n}{k}\frac{(-1)^k}{k!}k(k-1) x^{k-2} + (1-x)\sum_{k=0}^n \binom{n}{k}\frac{(-1)^k}{k!}k x^{k-1} +n\sum_{k=0}^n \binom{n}{k}\frac{(-1)^k}{k!} x^k$

$=\sum_{k=0}^n \binom{n}{k}\frac{(-1)^k}{k!} [xk(k-1)x^{k-2}+(1-x)kx^{k-1}+nx^k]$

$=\sum_{k=0}^n \binom{n}{k}\frac{(-1)^k}{k!} [(k^2-k)x^{k-1}+kx^{k-1}-kx^k+nx^k]$

$=\sum_{k=0}^n \binom{n}{k}\frac{(-1)^k}{k!} [k^2 x^{k-1}+(n-k)x^k]$

$=\sum_{k=0}^n \binom{n}{k}\frac{(-1)^k}{k!} [x^{k-1}(k^2+(n-k)x)]$

What am I doing wrong? How would I show that this equals zero? Or is this the completely wrong approach? I've seen various similar questions here but they always either work with a different version of the differential equation, or with recurrence relations - which I am hesitant to use, since my homework problem has not introduced the recurrence properties of the Laguerre polynomials so I'd have to derive and prove them before being allowed to use it in my proof.

Beyond the closed sum form I am also given the Rodrigues form of the polynomials:

${\displaystyle L_{n}(x)={\frac {\mathrm {e} ^{x}}{n!}}{\frac {\mathrm {d} ^{n}}{\mathrm {d} x^{n}}}{\bigg (}x^{n}\mathrm {e} ^{-x}{\bigg )}}$

But substituting those into the differential equation only leads me to terms with $L_{n+1}$ and $L_{n+2}$.

Can anybody tell me how to approach this? Is there any way to prove that the polynomials in either of these two forms satisfy the above differential equation? Or is there no way around the recurrence relations and shall I prove these first, even though they were mentioned neither in my lecture nor the homework problem?

答:
We have
$$x{{L}_{n}}''\left( x \right)+\left( 1-x \right){{L}_{n}}'\left( x \right)+n{{L}_{n}}\left( x \right)=0$$
where
$${{L}_{n}}\left( x \right)=\sum\limits_{k=0}^{n}{\left( \begin{matrix}
   n  \\
   k  \\
\end{matrix} \right)\frac{{{\left( -1 \right)}^{k}}}{k!}{{x}^{k}}}$$

As you have done, substitute to get
$$\sum\limits_{k=0}^{n}{\left( \begin{matrix}
   n  \\
   k  \\
\end{matrix} \right)\frac{{{\left( -1 \right)}^{k}}k\left( k-1 \right)}{k!}{{x}^{k-1}}}+\left( 1-x \right)\sum\limits_{k=0}^{n}{\left( \begin{matrix}
   n  \\
   k  \\
\end{matrix} \right)\frac{{{\left( -1 \right)}^{k}}k}{k!}{{x}^{k-1}}}+n\sum\limits_{k=0}^{n}{\left( \begin{matrix}
   n  \\
   k  \\
\end{matrix} \right)\frac{{{\left( -1 \right)}^{k}}}{k!}{{x}^{k}}}=0$$

Then cancel terms and collect
$$\sum\limits_{k=0}^{n}{\left( \begin{matrix}
   n  \\
   k  \\
\end{matrix} \right)\frac{{{\left( -1 \right)}^{k}}{{k}^{2}}}{k!}{{x}^{k-1}}}+\sum\limits_{k=0}^{n}{\left( \begin{matrix}
   n  \\
   k  \\
\end{matrix} \right)\left( n-k \right)\frac{{{\left( -1 \right)}^{k}}}{k!}{{x}^{k}}}=0$$

Note that the first term in the first sum is zero so re-index, and collect terms
$$\sum\limits_{k=0}^{n}{\left\{ \left( \begin{matrix}
   n  \\
   k+1  \\
\end{matrix} \right)\frac{{{\left( k+1 \right)}^{2}}}{\left( k+1 \right)!}-\left( \begin{matrix}
   n  \\
   k  \\
\end{matrix} \right)\left( n-k \right)\frac{1}{k!} \right\}{{\left( -1 \right)}^{k}}{{x}^{k}}}=0$$
It’s very easy using the definition of the binomial coefficients to show
$$\left( \begin{matrix}
   n  \\
   k+1  \\
\end{matrix} \right)\left( k+1 \right)-\left( \begin{matrix}
   n  \\
   k  \\
\end{matrix} \right)\left( n-k \right)=0$$


问:
Topology: Prove that every closed subset C of A is also closed in X iff A is closed in X
I'm having a very hard time constructing proofs in my introductory topology course. Here is one that seems like it would be simple, but have no clue where to begin:

Let $X$ be a space, $A \subseteq X$ a subspace. Prove that every closed subset $C \subseteq A$ is also closed in $X$ iff $A$ is closed in $X$

I know that to prove the ($\implies$) direction, I need to show that $A$ is closed. I also know that since $A$ is a subspace and $C \subseteq A$ is closed, then there is a closed subset $B \subseteq X$ such that $C=A \cap B$. From here, I'm at a loss. I was thinking I could somehow use the definition of the subspace topology of $A$ since it is defined to be $\{U \cap A| U \in \mathcal{T}\}$, but that is just a guess. Am I going the right direction with this?

Thank you!

答:
Let’s look at the other direction first. Suppose that $A$ is closed. We want to show that if $C$ is closed in $A$, then $C$ is closed in $X$, so there’s an obvious place to start:

Suppose that $C\subseteq A$ is closed in $A$.

What does that tell us? About the only tool that we have handy seems to be the definition of the subspace topology, so let’s see what it says:

Then there is an $F\subseteq X$ such that $F$ is closed in $X$, and $C=F\cap A$.

We want to show that $C$ is closed in $X$, and all we really know about it is that $C$ is the intersection of the sets $F$ and $A$, so what do we know about them? They’re both closed in $X$. And that does it:

$F$ and $A$ are closed in $X$, so their intersection $C$ is closed in $X$. $C$ was an arbitrary closed set in $A$, so every subset of $A$ that is closed in $A$ is also closed in $X$. $\dashv$

This is a ‘follow-your-nose’ proof: there is one very natural, straightforward thing to try, and it works. As you progress, you’ll run into more and more proofs that require actual ingenuity, proofs that you cannot find simply by ‘following your nose’, but you should still keep your eyes open for the ones like this that practically lead you by the hand.

Now suppose that every $C\subseteq A$ that is closed in $A$ is also closed in $X$; we want to show that $A$ is closed in $X$. This direction is actually just a little less straightforward. Still, it seems very natural to ask what information about $A$ would let us conclude that it is closed in $X$, and our hypothesis tells us: it would immediately let us conclude that $A$ is closed in $X$ if we knew that $A$ was closed in $A$; is this the case? Well, $A=X\cap A$, and $X$ is closed in $X$, so $A$ is closed in $A$ by the definition of the subspace topology, and we’re done. Having discovered the argument, we could write it up like this, for instance:

Suppose that every $C\subseteq A$ that is closed in $A$ is also closed in $X$. $X$ is closed in $X$ so $A=X\cap A$ is closed in $A$ by the definition of the subspace topology, and therefore $A$ is closed in $X$.

Note that we could just as well have used $\operatorname{cl}_XA$ instead of $X$: $\operatorname{cl}_XA$ is closed in $X$, so $A=A\cap\operatorname{cl}_XA$ is closed in $A$ and therefore (by our hypothesis) in $X$. Any closed subset of $X$ that contains $A$ would work; $X$ and $\operatorname{cl}_XA$ are just the two on which we can easily lay our hands, and they could in some cases be the only ones that exist.


问:
How does this product over finite primes represents density of certain natural numbers?
Let $p_{i}$ be the $i^{th}$ prime. I read that the product

$\prod_{i=1}^{n} \big( 1 - \frac{1}{p_{i}} \big)$ represents the density of primes that are not divisible by any of the $p_{1}, p_{2}, \ldots , p_{n}$.

I realized that density of natural numbers divisible by any one of the $p_{i}$ is $\frac{1}{p_{i}}$; by any two of them is $\frac{1}{p_{i}p_{j}}$ with $i \neq j$ and so on. Note that each of these sets are infinite.

It appears that inclusion exclusion here is done on density level to obtain that the set of natural numbers divisible by at least of these primes $p_{i}$ has density

$\sum_{i=1}^{n} \frac{1}{p_{i}} - \sum_{i\neq j} \frac{1}{p_{i}p_{j}} + ... + (-1)^{n} \frac{1}{p_{1}p_{2} \cdots p_{n}} $

and hence the set of natural numbers not divisible by any of these $p_{i}$ has density

$1 - \sum_{i=1}^{n} \frac{1}{p_{i}} - \sum_{i\neq j} \frac{1}{p_{i}p_{j}} + ... + (-1)^{n} \frac{1}{p_{1}p_{2} \cdots p_{n}} = \prod_{i=1}^{n} \big( 1 - \frac{1}{p_{i}} \big) $

However,

Is such exclusion-inclusion allowed in density arguments? If yes, why?

If yes, what conditions do the sets $A_{1}, A_{2}, \ldots, A_{k}$ need to satisfy before I can start using analogous argument on these sets?

答:
Sure, you can use inclusion-exclusion like this.  Just intersect all your sets with $[1,N]$ and use ordinary inclusion-exclusion to count them.  Then divide by $N$ and take the limit as $N\to\infty$.  More generally, this would work for any finite collection of sets $A_1,A_2,\dots,A_k$ such that every intersection of a subcollection of them has a natural density.

In this case, though, you can just count directly instead of using inclusion-exclusion.  By the Chinese remainder theorem, there are exactly $\prod_{i=1}^n(p_i-1)$ residues mod $\prod_{i=1}^np_i$ that are not divisible by any $p_i$, since you just need the residue mod each $p_i$ to be nonzero and these can be chosen independently.


问:
How to orthogonally upper-triangularize a matrix?
Let

$$A = \begin{bmatrix}
     -2 & 7 \\ 5 &3
     \end{bmatrix}$$

Using the triangularization theorem, I want to find a matrix $P$ such that $P^{T}A P$ is an upper triangular matrix.

I have the answer

$$P = \begin{bmatrix}
 \frac{6}{37} \sqrt{38}&\frac{1}{37} \sqrt{52} \\ \frac{-1}{37} \sqrt{37}
 & \frac{6}{37} \sqrt{37}\end{bmatrix}$$

but I am very confused on how to get this matrix $P$. Does anyone know the process? Thank you.

答:
We have $AP=PT$

In particular, we have $$AP_1 = T_{11}P_1$$
$$AP_2 = T_{12}P_1 + T_{22}P_2 = P\begin{bmatrix} T_{12} \\ T_{22}\end{bmatrix}$$

After picking $P_1$ to be an eigenvector with unit length, just pick $P_2$ to be orthogonal to $P_1$.

We then compute $$\begin{bmatrix} T_{12} \\ T_{22}\end{bmatrix} = P^TAP_2$$

Extra exercises: Think of how many possible $P$'s you can pick for this question.


问:
Solve x^n%k with huge exponents.
Hey so I'm trying to provide proof of the answer to :

```<code>9000008 ^ 625767 % 9
</code>```

I've solved the answer, and I believe a valid way to prove this is via induction, however while I know the inductive proof should be true I cannot figure out a valid way to write this out. I've researched a bunch on this topic and they validate the theory I used, but do not provide a proper way to prove it. Any assistance would be greatly appreciated

答: We see that $9000008 \equiv (-1)$ modulo $9$, since $9000008 + 1 = 9000009 = 9 \cdot 1000001$. Therefore, we must compute $(-1)^{625767}$, which is $(-1)$ since $625767$ is odd. Finally, $-1 \equiv 8$ modulo 9. So the final answer is 8.

Title: Solve x^n%k with huge exponents.


问:
How do I explain why $dA/dr = 2 \pi r$ geometrically?
There's this question in my calculus book that goes something like this:

The derivative of the area of a circle with respect to its radius is equal to the circle's circumference ($dA/dr = 2 \pi r$). Give a geometric explanation of why this is the case.

To me this is really obvious, but I find it hard to put into words.  If you increased the radius of the circle by putting your finger inside it and pushing the edge outward, then you would have to push it around the whole circumference of the circle.  Heh.  I don't know.

答:
It's because the area of a circle is really the sum of infinitely many circles' circumferences, which is the integral:
$$
\int^r_0 \! 2\pi{}t \, dt
$$

See http://betterexplained.com/articles/a-gentle-introduction-to-learning-calculus/ for a nice explanation

ContentLicense: CC BY-SA 3.0


问:
help on a riemann sum
I was doing some riemann sum excercises with a couple of friends to study for an exam but i got confused with the next sum.

I would appreciate to know the sum and the process behind the result.

Compute the Riemann sum $\displaystyle  \sum_{{k}={1}}^{{n}}{{f}({x}_{k}^\ast)}∆x_{k} $ for the given partition
$${f}\left({x}\right)={x}^{x2}+{1},\ \left[{1},{3}\right]$$

three subintervals, $${x}_{0}={1},\ {x}_{1}=\frac{{3}}{{2}},\ {x}_{2}=\frac{{5}}{{2}},\ {x}_{3}={3}; {x}_{1}^\ast=\frac{{5}}{{4}},\ {x}_{2}^\ast=\frac{{7}}{{4}},\ {x}_{3}^\ast={3}
$$

答:
The sum you’re looking for is the result of calculating

$(x_1-x_0)\cdot f(x_1^*)+(x_2-x_1)\cdot f(x_2^*)+(x_3-x_2)\cdot f(x_3^*)$

Looks like you have a mistake on f(x).

Title: help on a riemann sum


问:
Isometry group of $\Bbb RP^3$
Is there a reference for a proof of the statement that the isometry group of the real projective space $\Bbb RP^3$ is isomorphic to $SO(3)\times SO(3)$? How does this group acts on $\Bbb RP^3$?

答:
John's argument establishes that the collection of orientation preserving isometries of $\mathbb{R}P^3$ has the structure of an $SO(3)$ bundle over $SO(3)$.  But, as mentioned in the comments, it does not immediately follow that such a bundle is Lie isomorphic to $SO(3)\times SO(3)$.

However, I claim that this is, nonetheless true.  That is, if $G$ is a Lie group diffeomorphic to the total space of some $SO(3)$ bundle over $SO(3)$, then $G$ must, in fact, be isomorphic as a Lie group to $SO(3)\times SO(3)$.

To see this, begin with the bundle $SO(3)\rightarrow G\rightarrow SO(3)$, the long exact sequence of homotopy groups together with the fact that $\pi_2 = 0$ for any Lie group gives an exact sequence $$0\rightarrow \pi_1(SO(3))\rightarrow \pi_1(G)\rightarrow \pi_1(SO(3))\rightarrow 0.$$

From this we conclude that either $\pi_1(G) \cong C_4$ or $C_2\times C_2$ (with $C_k$ being the cyclic group of order $k$).  In either case, the fundamental group is order $4$.

Now, the universal cover of $G$, $\tilde{G}$, is a compact simply connected Lie group of dimension $6$.  Simply connected compact Lie groups are completely classified:  They are all products of simple Lie groups, which are all classified.  The only simple Lie group in dimension at most $6$ is $SU(2)$.

It follows that $\tilde{G}$ is isomorphic as a Lie group to $SU(2)\times SU(2)$.  Now, every Lie covering, including $\tilde{G}\rightarrow G$, is given by modding out $\tilde{G}$ by a subgroup of its center.  Since $Z(SU(2)) = C_2$ (generated by $\pm I$), $Z(\tilde{G}) = C_2\times C_2$.

Since $\pi_1(G)$ has order $4$, we must therefore conclude that $G\cong \tilde{G}/Z(\tilde{G}) = SU(2)/\{\pm I\} \times SU(2)/\{\pm I\}\cong SO(3)\times SO(3).$

Title: Isometry group of $\Bbb RP^3$


问:
Set of vector fields with a particular form of commutator
I have a set of vector fields $v_1, \dots, v_n$. For each couple of indices $i$ and $j$, the commutator $[v_i, v_j]$ is linear in $v_i$ and $v_j$, i.e. there are two scalars $a$ and $b$ such that:
$$
[v_i, v_j] = a v_i + b v_j
$$

Here, by "scalar", I mean that $a$ and $b$ are functions of the place, i.e. they depend on the position. They are not constant all over the manifold.

If I'm not wrong, this is not a general property of vector fields. Does it have a name? Are there known properties of such a set?

I can add that the $v_i$ are as many as the dimension of the space; moreover, they are linearly independent point by point. Are there further properties in this case?

答:
Assuming these are vector fields on some smooth manifold $M$, they span a finite-dimensional Lie subalgebra $\mathfrak g\subseteq \mathfrak X(M)$ (where $\mathfrak X(M)$ is the Lie algebra of all smooth vector fields on $M$). Under the condition that all of the vector fields in this subalgebra are complete (meaning their flows exist for all time), there is a simply connected Lie group $G$ whose Lie algebra is isomorphic to $\mathfrak g$, and a right action of $G$ on $M$ for which $\mathfrak g$ is the infinitesimal generator. This is essentially Theorem 20.16 in my Introduction to Smooth Manifolds (2nd ed.). (See also Problem 10-14.)

EDIT: The OP has now clarified that the coefficients $a$ and $b$ are meant to be scalar functions, not constants, so my answer is not relevant. Other than the point mentioned by Ted Shifrin that each pair of vector fields determines a foliation by surfaces, I don't know what else can be said in general.


问:
Can $\frac{n!}{(n-r)!r!}$ be simplified?
I'm trying to calculate in a program the number of possible unique subsets of a set of unique numbers, given the subset size, using the following formula:

$\dfrac{n!}{(n-r)!r!}$

The trouble is, on the face of it, you may need an enormous structure to hold the dividend (at least).  Is there a way of simplifying this calculation, so that it can be calculated using something smaller like $64$-bit integers, or are you really going to have to store numbers like $60!$?

Alternatively, is there a formula that is more suited to computing the aforementioned value?

答:
Yes, the formula is nothing but
$$\frac{n\cdot(n-1)\cdot...\cdot(n-r+1)}{1\cdot2\cdot...\cdot r} $$

This allows for easy calculation for values of $\;k\;$ up to $\;50\;$ or so.


问:
Map Two Polar Disks To Four Dimensional Spherical Coordinates ($\left(\mathbb{R}^2\right)^2\to\mathbb{R}^4$)
We have two points $(x_1, y_1), (x_2, y_2) \in \mathbb{R}^2$ with polar parameterizations $(r_1, \theta_1), (r_2, \theta_2)$ (i.e., $x_1=r_1 cos(\theta)$ and so on.) How would the point $(x_1, y_1, x_2, y_2) \in \mathbb{R}^4$ be represented with four-dimensional spherical coordinates $(r, \phi_1, \phi_2, \phi_3)$?

Please correct my proposed answer if I have made a mistake or upvote it if you concur.

Finally, how would one inductively generalize equivalency to $\mathbb{R}^{2^n}$ or $\mathbb{R}^{2n}$?

答:
$$r_1 \sin \left( \theta_1 \right) = r_3 \sin \left( \phi_1 \right) \cos \left( \phi_3 \right)$$
$$r_1 \cos \left( \theta_1 \right) = r_3 \cos \left( \phi_{1} \right)$$

We divide the two equations by each other to develop $\theta_1=\arctan \left( \frac{ \sin \left( \phi_1 \right) \cos \left( \phi_3 \right) }{ \cos \left( \phi_1 \right)}  \right) + \vartheta \left( \phi_1, \phi_2, \phi_3 \right)$. Intuitively, $\phi_1 \to \pm \frac{ \pi }{ 2  }$ yields $\theta_1 \to \pm \frac{ \pi }{ 2  }$. $\vartheta$ is a correction term to account for the quadrant of $\theta$.

$$r_2 \sin \left( \theta_2 \right) = r_3 \sin \left( \phi_1 \right) \sin \left( \phi_3 \right) \sin \left( \phi_2 \right)$$
$$r_2 \cos \left( \theta_2 \right) = r_3 \sin \left( \phi_1 \right) \sin \left( \phi_3 \right) \cos \left( \phi_2 \right)$$

Likewise, $\tan \left( \theta_2 \right) = \frac{ r_3 \sin \left( \phi_1 \right) \sin \left( \phi_3 \right) \cos \left( \phi_2 \right) }{ r_3 \sin \left( \phi_1 \right) \sin \left( \phi_3 \right) \sin \left( \phi_2 \right)}$ can be continuously extended to $\theta_2 = \phi_2$
If we restrict ourselves to $\mathbb{R}^2$, $\phi_3 = 0$, so $\theta_1 = \phi_1$. I am still somewhat unsure of a formula for the radii $r_1$ and $r_2$. $$r_1 = \begin{cases}
    \frac{ r_3 \cos \left( \phi_1 \right) }{ \cos \left( \theta_1 \right)   } & \text{ if }\cos \left( \theta_1 \right) \neq 0 \\
    \frac{ r_3 \sin \left( \phi_1 \right) \cos \left( \phi_2 \right)}{ \sin \left( \theta_1 \right)} & \text{ if } \cos \left( \theta_1 \right) = 0
\end{cases}$$
$$r_2 = \sqrt{r_3^2 - r_1^2}$$
Unfortunately, I don't believe that my formula for $r_1$ is properly defined as continuity around $\theta_1=0$ may fail. Once more, $\mathbb{R}^2$ could present a simplification $r_1=r_3$.


问:
SICP: Why does this recursion-based sine approximation work?
Here is the question and solution to Structure and Interpretation of Computer Programs' exercise 1.15 (see here). My problem is, I don't know how the combination of these formulae actually work:

$$sin(x) = 3sin(x/3) - 4sin^3(x/3)$$
and
$$sin(x) = x$$
for small $x$ radian values.

I understand the idea that the closer the radian angle gets to zero, the more it approximates the sine of that angle. I've seen excellent explanations (MIT OCW, Khan Academy). I also have worked out how the $sin(3x)= 3sin(x) - 4sin^3(x)$ formula is derived. But how are they being used together to derive an answer to $sin(x)$? The p function seems to simply be taking the variable angle divided by $3$ each recursive pass until angle is down below $0.1$ Then on the way back, we perform p as many times as we had to divide by $3$. So it seems
$$sin(x) = 3sin(x/3) - 4sin^3(x/3)$$
magically becomes the same as
$$sin(x) = 3(x) - 4(x^3)$$
through recursive application. How? I'm not very deeply versed in recursion theory. Also, if this is logarithmically getting closer to $0.1$, it's not as if we're totaling up lots of small $x$'s a la integration. This seems to be doing something vaguely like the Y-combinator -- which I also don't grasp that well yet.

Also, when we see the recursive steps (recursion) repeatedly dividing angle by $3$, what tells you definitively this is logarithmic? I mean, it looks like it's taking those giant order of magnitude leaps at each division, but is there another analytical way to call this logarithmic reduction?

答:
There are two methods that this exercise uses. The first method is the $p$ function,

$$ p(x) = 3x - 4x^3, $$

and the second is an approximation of sine, given by

$$ \sin(x) \approx x.$$

The connection between the $p$ function and sines is that $p(\sin(x/3)) = \sin x$. This is a trigonometric identity (that one can prove by examining $e^{3ix} = (e^{ix})^3$, expanding via $e^{i \theta} = \cos \theta + i \sin \theta$, and considering imaginary parts).

The approximation $\sin(x) \approx x$ is more accurate when $x$ is smaller. In fact, the error of this approximation can be bounded by $x^3/6$, so this becomes a very good approximation for very small $x$.

The idea of this exercise is to repeatedly apply the $p$ map until evaluating $\sin(x)$ can be expressed in terms of a (possibly complicated polynomial) evaluated at $\sin(y)$ for some much smaller $y$, specifically a $y$ of the form $y = x/3^n$.

Let's work this through explicitly. We want to evaluate $\sin x$.

If $x$ is small enough, we say $\sin x \approx x$ and we're done.

If not, then we note that $\sin x = p (\sin(x/3))$. Now the relevant sine computation is $\sin(x/3)$.

If $x/3$ is small enough, we use $\sin(x/3) \approx (x/3)$ to get that $\sin x = p(\sin(x/3)) \approx p(x/3)$.

If not, then we use $\sin (x/3) = p(\sin(x/3^2))$ to see that $\sin x = p(p(\sin(x/3^2))$. Now the relevant sine computation is $\sin(x/3^2) = \sin(x/9)$.

If $x/3^2$ is small enough, we use $\sin(x/9) \approx x/9$ to get that $\sin x = p(p(\sin(x/9)) \approx p(p(x/9))$.

Notice that the structure of this answer and the structure of the lisp code in the exercise are very similar. Iterating, the key recursive identity is that $\sin x = p^{(n)}(\sin (x/3^n))$, where $p^{(n)}$ means to iterate the $p$ map $n$ times.


问:
Alternating divergent series
I know that a necessary condition for a series to converge is that the general term $(a_n)$ goes to zero, but is it possible for an alternating divergent series to have a general term that goes to zero? If so, can you give an example.
My reasoning is that since $(a_n)\rightarrow 0$ then $\sum a_n$ converges. Then it can not be such series.

答:
It is indeed possible to have an alternating series with a general term going to zero diverge. Consider the sequence

$\frac{1}{1}, -\frac{1}{1}, \frac{1}{2}, -\frac{1}{2}, \frac{1}{3}, -\frac{1}{4}, ..., \frac{1}{n}, -\frac{1}{2^n},...$

Where the positive terms form the harmonic series, and the negative terms form a convergent geometric series. Formally, the sequence is defined by

$a_n = \frac{1}{(n + 1)/2}$ if $n$ is odd

$a_n = -\frac{1}{2^{n / 2}}$ if $n$ is even

$\sum\limits_{n = 1}^\infty a_n$ will diverge to $\infty$.

Title: Alternating divergent series


问:
$n$ people form $k$ clubs. Each club has at least 3 people. every two club has exactly 1 member in common. Maximum number of $k$?
$n$ people form $k$ clubs. Each club has at least 3 people. every two club has $1$ and exactly $1$ member in common. What's the maximum number of $k$?

My thoughts: Similar to oddtown problem, I can think of this as a linear algebra problem. Let $A$ be a matrix of $n$ by $k$ where $A_{ij} = 1$ when member $i$ is in club $j$ and $A_{ij} = 0$ otherwise. $A^TA $ has diagonal greater or equal to 3 and non diagonal entries equal to $1$. What's the biggest dimension of $k$? At the very least $A^TA$ needs to be positive semidefinite. But I can't go any further...

答:
One solution is to have one person be a member of all the clubs and everybody else only a member of one club.  This gives you $k=\lfloor \frac {n-1}2 \rfloor$

This paragraph assumes that each club must have exactly three people because I misread the problem.  Otherwise, pick one club and call its members $A,B,C$.  At least two of them, say $A,B$ are members of other clubs.  Call the clubs that include $A$ a-clubs and the ones that include $B$ b-clubs.  No one except $A$ can be a member of more than one a-club and no one other than $B$ can be a member of more than one b-club.  Given that there is an a-club besides $A,B,C$ there cannot be more than three b-clubs (or c-clubs).  Let the second a-club be $A,D,E$.  It has to have one member in common with every b-club.  $A$ is shared with $A,B,C$, $D$ can be shared by one and $E$ shared by another.  By symmetry, there cannot be more than three a-clubs.  We can have $$A,B,C\\ A,D,E\quad A,F,G\\B,D,F\quad B,E,G\\
C,D,G\quad C,E,F$$

for seven clubs at a maximum this way.


答: A counterexample can be found on the Wikipedia Page for the Alternating Series Test.  Consider the series $$\sum_{n=4}^{\infty}(-1)^{n}\frac{1}{\sqrt{\lfloor \frac{n}{2}\rfloor}-1} = \frac{1}{\sqrt{2}-1} - \frac{1}{\sqrt{2} + 1} + \frac{1}{\sqrt{3} - 1} - \frac{1}{\sqrt{3}+1} + \dotsb.\tag{$\star$}$$  Then we have that $$\lim_{n\to\infty}\frac{1}{\sqrt{\lfloor \frac{n}{2}\rfloor}-1} = 0,$$ but it does not decrease monotonically, and it can be shown that the sum does not converge.  Indeed, note that in general $$\frac{1}{\sqrt{n}-1}-\frac{1}{\sqrt{n}+1} = \frac{\sqrt{n}+1-\sqrt{n}+1}{n-1} = \frac{2}{n-1}$$ and so the sum of the first $2m$ terms is given by $$S_{2m} = \frac{2}{1} + \frac{2}{2} + \frac{2}{3} + \dotsb + \frac{2}{m-1} >\sum_{i=1}^{m-1}\frac{1}{i}.$$  So, the partial sums for $(\star)$ exceed the partial sums for the harmonic series, which we know to diverge, meaning that $(\star)$ must diverge as well.

Title: Alternating divergent series

Body:
I know that a necessary condition for a series to converge is that the general term $(a_n)$ goes to zero, but is it possible for an alternating divergent series to have a general term that goes to zero? If so, can you give an example.
My reasoning is that since $(a_n)\rightarrow 0$ then $\sum a_n$ converges. Then it can not be such series.


问:
How can I prove that $f(x) = \left(1 + \frac1x \right)^x$ is concave in $\mathbb{R}^+$?
$$f(x) = \left(1 + \frac1x \right)^x$$

In general, attempting to demonstrate that

$$f(ax + (1-a)y) \ge af(x) + (1-a)f(y)$$

leads to algebraically difficult expressions with no clear resolution.

I am aware that we can attempt to show $f''(x) \le 0$. We have:

$$f''(x) = \left(1+\frac{1}{x}\right)^x \left(\log\left(1+\frac{1}{x})\right) - \frac{1}{x\left(1+\frac{1}{x}\right)}\right)^2 - \frac{\left(1+\frac{1}{x}\right)^{x-2}}{x^3} \le 0$$

If we (1) add the second term to both sides, (2) multiply by $x^3$, (3) divide by $(1+1/x)^{x-2}$, (4) take a square root, and (5) multiply the $(1+1/x)$ through the parentheses on the LHS, we arrive at:

$$x^{3/2} \left(\left(1+\frac{1}{x}\right)\log\left(1+\frac{1}{x}\right) - \frac{1}{x}\right) \le 1$$

From here, it is again unclear how to proceed.

答:
I was waiting for someone to post a more clever answer, but since one doesn't seem to be coming I'll post this anyways. Hopefully it doesn't discourage someone else from seeing this question and posting something more elegant.
If nothing else, this is how I would solve the problem if it came up in my research.

Showing this function is convex is certainly tedious, but the tedium is remedied somewhat by the use of a computer algebra system such as sage.

Indeed, we can try

```<code>sage: f(x) = (1+1/x)^x
sage: secondDerivative = diff(f,x,2)
sage: secondDerivative
x |--> (1/x + 1)^x*(1/(x*(1/x + 1)) - log(1/x + 1))^2 - (1/x + 1)^x/(x^3*(1/x + 1)^2)
sage: plot(secondDerivative)
</code>```

This certainly seems to be negative everywhere, but we should confirm the behavior as $x \to 0^+$ and as $x \to \infty$.

```<code>sage: lim(secondDerivative, x=0, dir='+')
x |--> -Infinity
sage: lim(secondDerivative, x=oo)
x |--> 0
</code>```

This is good evidence, but we should probably be more precise.

```<code>sage: view(secondDerivative)
</code>```

gives us

$$
\newcommand{\Bold}[1]{\mathbf{#1}}x \ {\mapsto}\ {\left(\frac{1}{x} + 1\right)}^{x} {\left(\frac{1}{x {\left(\frac{1}{x} + 1\right)}} - \log\left(\frac{1}{x} + 1\right)\right)}^{2} - \frac{{\left(\frac{1}{x} + 1\right)}^{x}}{x^{3} {\left(\frac{1}{x} + 1\right)}^{2}}
$$

Of course, we as humans can quickly make some simplifications that sage missed, and we rewrite this as

$$
\left ( 1 + \frac{1}{x} \right )^x
\left [
\left ( \frac{1}{1+x} - \log \left ( 1 + \frac{1}{x} \right ) \right )^2 -
\frac{1}{x^3 + 2x^2 + x}
\right ]
$$

We know $(1+\frac{1}{x})^x$ is positive when $x$ is, so the sign of the second derivative is governed by the second factor. We'd like to show it's negative, but sage prefers rational functions to transcendental ones... Thankfully, you may remember that (for $x > -1$)

$$
\frac{x}{1+x} \leq \log(1+x) \leq x
$$

So if we evaluate the lower bound at $\frac{1}{x}$, we get an upper bound for our expression of interest (since we're subtracting $\log(1+1/x)$). This gives

$$
-\log(1+1/x) \leq - \frac{1}{1+x}
$$

So our expression of interest is at most

$$
\left ( \frac{1}{1+x} - \frac{1}{1+x} \right )^2 -
\frac{1}{x^3 + 2x^2 + x}
$$

which is

$$
- \frac{1}{x^3 + 2x^2 + x}
$$

and in the interest of offloading as much thinking as possible to the computer (though this is of course easy to do by hand):

```<code>sage: solve(-1/(x^3 + 2*x^2 + x) < 0)
[[x > 0]]
</code>```

So this is negative everywhere of interest, and our function is concave.

I know this answer looks really long, but that's because I was trying to explain step-by-step how I would attack the problem. You can imagine this is fairly quick to do by yourself. In general, computer algebra systems are great at these sorts of questions, and it's worth learning how to use one for exactly situations like this!

I hope this helps ^_^

Body:
I was waiting for someone to post a more clever answer, but since one doesn't seem to be coming I'll post this anyways. Hopefully it doesn't discourage someone else from seeing this question and posting something more elegant.
If nothing else, this is how I would solve the problem if it came up in my research.

Showing this function is convex is certainly tedious, but the tedium is remedied somewhat by the use of a computer algebra system such as sage.

Indeed, we can try

sage: f(x) = (1+1/x)^x
sage: secondDerivative = diff(f,x,2)
sage: secondDerivative
x |--> (1/x + 1)^x*(1/(x*(1/x + 1)) - log(1/x + 1))^2 - (1/x + 1)^x/(x^3*(1/x + 1)^2)
sage: plot(secondDerivative)

This certainly seems to be negative everywhere, but we should confirm the behavior as $x \to 0^+$ and as $x \to \infty$.

sage: lim(secondDerivative, x=0, dir='+')
x |--> -Infinity
sage: lim(secondDerivative, x=oo)
x |--> 0

This is good evidence, but we should probably be more precise.

sage: view(secondDerivative)

gives us

$$
\newcommand{\Bold}[1]{\mathbf{#1}}x \ {\mapsto}\ {\left(\frac{1}{x} + 1\right)}^{x} {\left(\frac{1}{x {\left(\frac{1}{x} + 1\right)}} - \log\left(\frac{1}{x} + 1\right)\right)}^{2} - \frac{{\left(\frac{1}{x} + 1\right)}^{x}}{x^{3} {\left(\frac{1}{x} + 1\right)}^{2}}
$$

Of course, we as humans can quickly make some simplifications that sage missed, and we rewrite this as

$$
\left ( 1 + \frac{1}{x} \right )^x
\left [
\left ( \frac{1}{1+x} - \log \left ( 1 + \frac{1}{x} \right ) \right )^2 -
\frac{1}{x^3 + 2x^2 + x}
\right ]
$$

We know $(1+\frac{1}{x})^x$ is positive when $x$ is, so the sign of the second derivative is governed by the second factor. We'd like to show it's negative, but sage prefers rational functions to transcendental ones... Thankfully, you may remember that (for $x > -1$)

$$
\frac{x}{1+x} \leq \log(1+x) \leq x
$$

So if we evaluate the lower bound at $\frac{1}{x}$, we get an upper bound for our expression of interest (since we're subtracting $\log(1+1/x)$). This gives

$$
-\log(1+1/x) \leq - \frac{1}{1+x}
$$

So our expression of interest is at most

$$
\left ( \frac{1}{1+x} - \frac{1}{1+x} \right )^2 -
\frac{1}{x^3 + 2x^2 + x}
$$

which is

$$
- \frac{1}{x^3 + 2x^2 + x}
$$

and in the interest of offloading as much thinking as possible to the computer (though this is of course easy to do by hand):

sage: solve(-1/(x^3 + 2*x^2 + x) < 0)
[[x > 0]]

So this is negative everywhere of interest, and our function is concave.

I know this answer looks really long, but that's because I was trying to explain step-by-step how I would attack the problem. You can imagine this is fairly quick to do by yourself. In general, computer algebra systems are great at these sorts of questions, and it's worth learning how to use one for exactly situations like this!

I hope this helps ^_^


答:
It may depend on what is "simplified" for you. For example

$$\frac{n!}{(n-r)!r!}=\frac{(n-r+1)(n-r+2)\cdot\ldots\cdot n}{r!}=\frac{(r+1)(r+2)\cdot\ldots\cdot n}{(n-r)!}$$

Title: Can $\frac{n!}{(n-r)!r!}$ be simplified?

Body:
I'm trying to calculate in a program the number of possible unique subsets of a set of unique numbers, given the subset size, using the following formula:

$\dfrac{n!}{(n-r)!r!}$

The trouble is, on the face of it, you may need an enormous structure to hold the dividend (at least).  Is there a way of simplifying this calculation, so that it can be calculated using something smaller like $64$-bit integers, or are you really going to have to store numbers like $60!$?

Alternatively, is there a formula that is more suited to computing the aforementioned value?


问:
Why does $e^{t+4}(t-1)=0$ only yield one solution?
I understand that $e^{t+4}(t-1)=0$ only yields one solution because $e^x >0$ what I am wondering is why you can't $\ln$ to cancel out the $e$ to give $(t+4)(t-1)=0$

This is clearly invalid from looking at online resources and there's also no need to do it but Maths doesn't lie after all and I'm wondering why this wouldn't be possible. The only thing I can possibly think of is that you have to $\ln 0$ on the right hand side despite it being $0$

答:
Notice that $e^{t+4}(t-1) = 0$ is factored. That is you have set up a product of two terms that's equal to zero. That would imply that: $t-1 = 0$ or $e^{t+4} = 0$. For the equation, $e^{t+4} = 0$, to isolate for the exponent $t+4$, you would have to take $ln$ of both sides. But the value of $ln(0)$ is undefined. The reason it's undefined is that the domain of $ln(x)$ is $\{x \in \mathbb{R} | x > 0\}$. This is precisely a consequence of the fact that $e^x > 0$, as you point out in your question. Since $lnx$ is the inverse operation to $e^x$ the Range of $e^x$ is also the Domain of $lnx$

That all said, to answer your question about why you can't take the $ln$ of your original equation, not only would you be calculating $ln(0)$, but your algebra is off. You can't just take the $ln$ of one term in a product. In abstract, you could do: $ln(e^{t+4}(t-1)) = ln(e^{t+4}) + ln(t-1)) = t+4 + ln(t-1)$, but I'm not sure that's a very helpful algebraic manipulation. But even then, in the context of this question, if you did $ln(e^{t+4}(t-1))$, you would also have to take the $ln$ of the other side, $0$, and as mentioned, $ln(0)$ is undefined.


问:
A condition for uniqueness of solution
Assuming that $f$ is a continuous real function and $f(0)=0$ , $f(x)>0 $ when $x\neq 0$, prove that the differential equation $x'= f(x)$ with the initial value $x(0)=0$ has a unique solution if and only if $$\int_0^c \frac{1}{f(x)}dx$$ is not defined for all $c\in \mathbb{R}$. That is $$\int_0^c \frac{dx}{f(x)}= \infty.$$

答:
I am sharing a solution for one direction :

We note first that since $f$ is positive the integral $\int_0^c \frac{dx}{f(x)}$ can only be $+\infty$ when $c>0$ and $-\infty$ when $c<0$ as $\int_c^0 \frac{dx}{f(x)}= +\infty $ , moreover $\frac{1}{f}$ is continuous over $\mathbb{R}\setminus\{0\}$ and $\lim\limits_0 \frac{1}{f}= +\infty$

Let $y_1, y_2$ be two solutions of the differential equation, we seek to prove that $y_1= y_2$ under the hypothesis $\int_0^c \frac{dx}{f(x)}= \infty $  :

We have $y_1(0)= 0= y_2(0)$ and $$y_1(t)= \int_0^t f(y_1(s))ds \ \ ,\ \ y_2(t)= \int_0^t f(y_2(s))ds $$ for all $t$ in an interval $I= [-a,a]$ centered at $0$

The function $t\mapsto |y_1(t)- y_2(t)| $ is continuous and satisfies
$$\max\limits_{t\in I} |y_1(t)- y_2(t)| = \max\limits_{t\in I} |\int_0^t (\ f(y_1(s))- f(y_2(s))\ )ds|\leq \int_0^{|t_0|} |f(y_1(s))- f(y_2(s))|ds $$
for some $t_0 \in I$ as the maximum is reached.

By the hypothesis we have $\int_0^a \frac{dx}{f(x)}= +\infty$ , the divergence of this integral implies that $\forall M>0\ \exists\ x_0\in (0,a] $ such that $(\min\limits_{(0,x_0]} \frac{1}{f} )\times x_0> M$ (we can show it by considering first the limit of $\frac{1}{f}$ then the fact that $\int_\delta^a \frac{dx}{f(x)}$ can be as large as desired and taking the mean value)

So we can transform this to $(\frac{1}{\max\limits_{(0,x_0]} f})\times x_0> M \quad$ or  $\quad \max\limits_{(0,x_0]} f < x_0/M $

Using this in the previous inequality $$\int_0^{|t_0|} |f(y_1(s))- f(y_2(s))|ds \leq |t_0|\max\limits_{[0,t_0]} |f(y_1(s))- f(y_2(s))| \leq a\times 2\max\limits_J |f(s)|$$
where $J$ is the union $y_1([0,t_0])\cup y_2([0,t_0]) $ , $J$ is an interval (why?).

Now take $M$ to be $2a^2 N$ so that $\exists\ s_0\in J\setminus \{0\}$ for which
$ \max\limits_{(0,s_0]} f(s) < a/M= \frac{1}{2aN}$ and the inequality becomes
$$\max\limits_{I} |y_1(t)- y_2(t)|\leq 2a\max\limits_{(0,s_0]} f(s)< 1/N$$
As this hold for all $N>0$ then it can only be true when $\max\limits_{I} |y_1(t)- y_2(t)|= 0$ and we deduce that $y_1= y_2$ over the existence interval $I$.

Title: A condition for uniqueness of solution


问:
Find $x$ such that the vectors $\langle 3,2,x \rangle$ and $\langle 2x,4,x \rangle$ are parallel
Find $x$ such that the vectors $\langle 3,2,x \rangle$ and $\langle 2x,4,x \rangle$ are parallel. I tried to do $a=kb$ but there was no constant $k$ value so I don't know if that was the right thing to do.

答:
In order for two vectors to be parallel, one has to be a multiple of the other, say
$$
r\langle 3,2,x \rangle = \langle 2x,4,x \rangle
\qquad
\text{for some scalar } r.
$$
This is a system of three equations, one for each component of the vector:
$$
\begin{cases}
3r = 2x & \\
2r = 4 & \\
xr = x &
\end{cases}
$$
The second equation shows that $r=2$, which makes the third equation into $2x = x$, so $x=0$. But then the first equation reads $6 = 0$, which is impossible.

Therefore, no such scale factor $r$ exists, and these two vectors are always linearly independent.


问:
Usual probability of winning an n match series question, but with a twist!
I have seen plenty of questions (normally focussing on a best of 7 baseball scenario), which look at the probability of either team A winning given x % chance in each game or what is the probability the series goes the full 7 matches.

However I wanted to try and create a Python function for this (I'm not asking for help with the syntax in case that's not allowed, I'm just after the mathematical logic):

```<code>def calc_win_probability(n, p_a, p_b=False):

    if p_b is False:
        p_b = 1-p_a

    g = ceil(n/2)
    prob_list = []
    for i in range(g,n+1):
        a = (comb(i,g-1) * pow(p_a,g-1) * pow(p_b,(i - (g-1)))) * p_a
        b = (comb(i,g-1) * pow(p_b,g-1) * pow(p_a,(i - (g-1)))) * p_b
        prob_list.append({'games': i, 'prob_a_win': a, 'prob_b_win': b, 'combined_prob': a+b})

    return {'overall_prob': sum([p['combined_prob'] for p in prob_list]) ,'prob_list': prob_list}
</code>```

The overall probability increases as n increases, so that makes me question whether my logic is flawed as conceptually that feels wrong (but perhaps I'm missing the obvious and it shouldn't equal 1 as certain scenarios are ignored)?

My assumptions are as follows:

The probability of either team winning any given game doesn't change
regardless of the situation

The series ends once one team reaches a
given number of games (e.g. 4/7, 3/5 etc.)

My logic here is focused on the number of games to win, not number of games in the series, so the following:

b = (comb(i,g-1) * pow(p_b,g-1) * pow(p_a,(i - (g-1)))) * p_b is, for example after 6 games: (6nCr3 * 0.4^3 * 0.6^3) * 0.4

The approach I came up with was based on suggestions I've seen on here, however I'm unsure if my logic is 100% correct as some people have suggested that you don't need to factor in the games not played and should only consider the probability of a given team winning within the 7 matches.

Now to complicate things further, what I actually wanted to do was take this concept (if my above logic is correct) and then try to consider (as this is more realistic):

If it is not known the % chance each team has got of winning a match, but you can derive a probability a team will win the series (lets assume a model exists and is accurate for now), how can you then apply this to work out how the percentage chance changes as the series goes by?

So for example, if team A has a 60% of winning the series at the start, but the score is 2-1 after 3 games how much has their percentage chance of a series win increased?

However before I can attempt that I'm worried my initial logic is incorrect, so if someone is able to kindly clarify whether my first attempt is sensible, I can then attempt stage 2 and hopefully post the approach to that?

答:
I am not clear as to what you are driving at.

There are two ways of computing how a team say $A$ with a probability p for winning a game can win  (say) a  $5$ game tournament.

The first applies the negative binomial and will compute P(A wins in exactly $3$ games) + P(A wins in exactly $4$ games) + P(wins in exactly $5$ games)

The formula would be $\dbinom2 0q^0p^3 + \dbinom3 1 q^1p^3 + \dbinom 4 2 q^2p^3 \;\;= p^3(1 +3q + 6q^2)$

But a simpler way is to consider the full tournament, realizing that $A$ is guaranteed to win if $A$ loses $<=2$ games, and the formula is

$\dbinom 5 0 q^0p^5 +\dbinom 5 1 q^1p^4 + \dbinom 5 2 q^2p^3) \;\;= p^3(p^2 + 5pq + 10q^2)$

The two formulas are apparently different, but you should be able to prove that they are equal.

So I don't know what is troubling you, what is the "twist"


问:
What is the probability a student chose football given that they like watching sports?
This equation comes from Edgenuity's course of Statistics, and I am taking the course as a high school senior. I understand that to find $P(A$|$B)$, one divides $P(A$ and $B)$ by $P(B)$. I attempt to do this in my solving of the problem below:

Some randomly selected high school students were asked to name their favorite sport to watch. The table displays the distribution of results.

What is the probability that a student chose football given that they like watching sports?

First, to find $P($Like watching sports and choosing football$)$, I multiplied $0.23$ and $0.84$ (found by adding all of the probabilities of those who chose a certain sport in the chart), which equals $0.1932$. I divided $0.1932$ by $P($Like watching sports$)$, which is $0.84$. $P($Choosing football | Like watching sports$)$ is then $0.23$. Are my methods and answer correct? If not, please explain why.

答:
It seems like to get your answer, you should be able to just take .23/.84, part of a whole.

What you just did was multiply .23 by .84, then divide it by .84, so you don’t get what you were looking for unless there’s something I’m missing.


问:
In simplifying $\sqrt{\frac{(x^2 +x +3)^2}{(1-2q)^2}}$ to $\frac{x^2 +x +3}{|1-2q|}$, why use the absolute value?
I have seen in a question

$$\sqrt{\frac{(x^2 +x +3)^2}{(1-2q)^2}}$$ was given to be
$$\frac{x^2 +x +3}{|1-2q|}$$

Why was absolute value given to $1-2q$?

答:
Well, by definition you have that:

$$
\sqrt{\frac{(x^2 +x +3)^2}{(1-2q)^2}} = \frac{\sqrt{(x^2 +x +3)^2}}{\sqrt{(1-2q)^2}}
$$

and you got that $\forall x \in \mathbb{R}\  \sqrt{x^2} = |x|$

so you get that:

$$
\frac{\sqrt{(x^2 +x +3)^2}}{\sqrt{(1-2q)^2}} = \frac{|(x^2 +x +3)|}{|(1-2q)|}
$$

Clearly $x^2 \geq 0 \ \forall x \in \mathbb{R}$, and in particular you have that $x^2 \geq x $ while $|x| > 1$, if $x \in [-1,1]$ you can easily see that $ x^2 + x < 3$  so you have that $x^2+x+3$ is always greater than 0 so you can get rid of $|.|$ (as well when you consider $x^2-x+3$)

Now if you have $q > 0$ you can see that $1-2q$ is not necessarily positive, so you need to use your absolute value.

If you still have doubts I suggest you to graph the functions and watch that both $x^2-x+3$ and $x^2+x+3$ are positive in all its codomain! :)


问:
$f(x)=1/q$ for $x=p/q$ is integrable

Let $f:\mathbb{R}\rightarrow\mathbb{R}$ be defined by setting $f(x)=1/q$ if $x=p/q$, where $p$ and $q$ are positive integers with no common factor, and $f(x)=0$ otherwise. Show that $f$ is integrable over $[0,1]$.

I'm using the Darboux definition of integration, so I want to prove that for any $\epsilon>0$ there exists a partition $P$ of $[0,1]$ such that $U(f,P)-L(f,P)<\epsilon$. Equivalently, there exists a partition $P$ of $[0,1]$ such that $$\sum_Rv(R)(M_R(f)-m_R(f)) < \epsilon$$ where $M_R(f)$ is the supremum of $f$ inside interval $R$, $m_R(f)$ is the infimum of $f$ inside interval $R$, and $R$ ranges over all intervals in the partition.

So I tried taking $P=[0,\dfrac1n,\dfrac2n,\ldots,1]$. The sum in question becomes $$\dfrac1n\sum_{i=0}^{n-1}(M_{[\frac{i}{n},\frac{i+1}{n}]}(f)-m_{[\frac{i}{n},\frac{i+1}{n}]}(f))$$

I know that $m_{[\frac{i}{n},\frac{i+1}{n}]}(f)=0$, because in the interval $[\dfrac{i}{n},\dfrac{i+1}{n}]$ there is an irrational number, so the sum reduces to $$\dfrac1n\sum_{i=0}^{n-1}M_{[\frac{i}{n},\frac{i+1}{n}]}(f)$$

I don't really know anything about the fraction with lowest denominator inside $[\dfrac{i}{n},\dfrac{i+1}{n}]$. How can I prove that this sum goes to $0$ as $n\rightarrow\infty$?

答:
This problem can be found in Calculus by Michael Spivak, 3rd edition, Chapter 13, problem 34.

I'm commenting here to aid in searches.

Spivak's solution contains possibly misleading wording and some typos. It says to make the intervals have total length $<\varepsilon/2$. He means the total sum of all their lengths. He also writes "$1,\dots,n$" which I think should be "$1,\dots,m$" instead.

Title: $f(x)=1/q$ for $x=p/q$ is integrable


问:
Does $\sum a_n$ converge in this case?
Given an arbitrary series $a_n$, if $|s_n| \leq 5 \forall n$, then does $\sum a_n$ converge? I have a counterexample here, don't know if it's valid or not, but let $a_n = (-1)^{n}$, then $a_n$ diverges. Alternatively, take $a_n=-100n$.

答:
The first counterexample is valid, as it just take value $1$ and $0$.

The second one is not valid, as the magnitude increases.

Title: Does $\sum a_n$ converge in this case?


问:
matrix multiplication but column wise
I am stuck with a definition of an unusual matrix multiplication rule and its use. I drew in a paper the definition and example I am trying to solve using that definition, but the definition does not appear to be correct in my opinion and the dimensions of the result of the multiplication that I am trying to do is 2X2. However, the definition gives me 2X3 matrix. Please help me to understand. Is there anything that I miss?

答:
As was mentioned in the comments, $b_i^T$ should be a row vector, so in your example,
$$a_1 \cdot b_1^T = \begin{bmatrix} 0\\1 \end{bmatrix} \begin{bmatrix} 1 & 1\end{bmatrix}.$$
So you have a $2 \times 1$ matrix multiplied by a $1 \times 2$ matrix, which will give you a $2 \times 2$ matrix, namely the matrix $\begin{bmatrix} 0 & 0 \\ 1 & 1 \end{bmatrix}$.

Often the way matrix multiplication is taught involves taking the dot products of row vectors of the first matrix with column vectors of the second matrix. In other words, with $a_i^T$ row vectors and $b_i$ column vectors,
$$AB = \begin{bmatrix}a_1^T\\a_2^T\\\vdots \\a_m^T \end{bmatrix}\begin{bmatrix}b_1 & b_2& \ldots b_k \end{bmatrix} = \begin{bmatrix} a_1^Tb_1 & a_1^Tb_2 & \ldots & a_1^Tb_k\\a_2^Tb_1 & a_2^Tb_2 & \ldots & a_2^Tb_k\\ & \vdots \\ a_m^Tb_1 & a_m^Tb_2 & \ldots & a_m^Tb_k\end{bmatrix}.$$

If you look at what each of those dot products is (as a sum), and regroup in a different way, you'll get the multiplication formula you gave.  To make it a bit more precise, if you look at the $1,1$ entry of $AB$ in terms of the entries of $A$ and of $B$, it is

$$a_{11}b_{11}+a_{12}b_{21}+\ldots a_{1n}b_{n1}.$$

Each of these terms will be the $1,1$ entry of one of the matrices in the sum from your way of multiplying matrices.  In particular, $a_{1i}b_{i1}$ is the $1,1$ entry of the $i$-th column of $A$ times the $i$-th row of $B$.

Title: matrix multiplication but column wise


问:
Series convergence and its reciprocal
If $\sum a_n$ converges, then $\sum \frac{1}{a_n}$ diverges to $\infty$

If $\sum a_n$ diverges, then for every $M > 0$ $\exists$ $n$ such that $s_n > M$

^ Are the statements above true? I'm not given any information about $a_n$, which is a series. $s_n$ denotes a partial sum of the series. I have no idea about the second one, but for the first one I'm pretty sure you can assume that any series that converges will not have its reciprocal converge, for example $\frac{1}{x^2}$ converges, but $x^2$ does not. The second one seems to be a question about whether there's a limit to the sequence, and again I have no idea how to do.

答:
Counterexample for (1): $a_n = -1/2^n$. $\sum_n 1/a_n$ diverges to $-\infty$, not $+\infty$, and $s_n < 0$.

Counterexample for (2): $a_n = -1$.  All $s_n \le 0$.

Title: Series convergence and its reciprocal


问:
Is $(a+b)^2$ always greater than equal to zero, if we consider $a$ and $b$ to be complex numbers?
If $a$ and $b$ are complex numbers then will the given condition stand TRUE?
And if $a$ and $b$ are not complex numbers will the identity (a+b^2 be greater than or equal to zero?

答:
What about $a=1+i$ and $b=-1+i$? There $(a+b)^2$ is negative and therefore less than 0.

The magnitude, however, of every complex number $c+di$; $c$, $d$ real, is $c^2+d^2$ which is always nonegstive real and positive if either $c,d$ is nonzero.


答:
The product rule is that: the probability for the intersection of independent events equals the product of the probabilities for each event.

However, liking football and liking sport are not independent events; since if you do not like sport you certainly will not like football.   So this rule is inapplicable.

Indeed, liking football is a subset of liking sport.   So the event of doing both is simply the event of liking football. That has a probability of $0.23$.

So by definition of conditional probability; $$\mathsf P(\text{Like(Football)}\mid\text{Like(A Sport)})=\dfrac{23}{84}$$

Title: What is the probability a student chose football given that they like watching sports?

Body:
This equation comes from Edgenuity's course of Statistics, and I am taking the course as a high school senior. I understand that to find $P(A$|$B)$, one divides $P(A$ and $B)$ by $P(B)$. I attempt to do this in my solving of the problem below:

Some randomly selected high school students were asked to name their favorite sport to watch. The table displays the distribution of results.

What is the probability that a student chose football given that they like watching sports?

First, to find $P($Like watching sports and choosing football$)$, I multiplied $0.23$ and $0.84$ (found by adding all of the probabilities of those who chose a certain sport in the chart), which equals $0.1932$. I divided $0.1932$ by $P($Like watching sports$)$, which is $0.84$. $P($Choosing football | Like watching sports$)$ is then $0.23$. Are my methods and answer correct? If not, please explain why.


问:
In language of FoL with functions and predicates removed, is there a formula which can only be satisfied by structures with infinitely many elements?
FoL stands for first order logic.
Practically, the language only has quantifiers, equality, and logical connectives. No functions or predicates (except =).

Furthermore, I came up with a set of formulas $S=\{\exists x_1...\exists x_n[x_1\neq x_2 \cap x_1\neq x_3 \cap x_1\neq x_4 ... \cap x_{n-1}\neq x_n] : n \in \mathbb{N}\}$. I think this set can only be satisfied by structures with infinitely many elements. Am I right?

Then can we achieve a single formula that is only satisfied by structures with infinitely many elements?

答:
That's right, your $S$ is true exactly in the infinite sets.  You can actually then use this together with compactness to prove that there is no single sentence that is true exactly in the infinite sets.

I encourage you to try proving this on your own; the details are hidden below.

  Suppose $\varphi$ is such a sentence.  Then $\varphi$ is true in every model of $S$.  By compactness, this means $\varphi$ is actually implied by just finitely many of the sentences from $S$.  But any finitely subset of $S$ has a finite model, so this is a contradiction.

  Incidentally, the conclusion does not change if you ask only for $\varphi$ to be true in some infinite set, and false in all finite sets.  This is because all infinite sets are elementarily equivalent, i.e. they all satisfy the same sentences.  This follows from Löwenheim-Skolem: if you let $T$ be the complete theory of a countable set, then $T$ has models of all infinite cardinalities, and thus is the theory of every infinite set.


问:
Notation for graph weights over vertices *and* edges?
Consider a graph $G=(V,E)$ in which both vertices and edges have a weight. I define it as a function $\omega$ from $V \cup E$ to the weight set.

This seems fine to me, but some colleagues are disturbed by the fact that $\omega$ takes elements from $V$ and $E$. They see them as two different sets, which is correct, but $V \cup E$ also is a set, and it seems to me that $\omega$ may take elements in it.

May you please tell me if my definition is ok? Is it awkward? Is there a better one?

I would like to avoid having two different weight functions, like for instance $\omega$ and $\omega'$ or $\omega_V$ and $\omega_E$. I find them awful in the expressions I deal with, like:
$$\omega(v) \longleftarrow \sum_{u\in N(v)} \frac{\omega(u,v)}{\sum_{w\in N(u)} \omega(u,w)}\cdot\omega(u)$$

答:
There are two objections to be made.

First, people think of vertices and edges as different types of things, and want the inputs to a function to always be the same type. This is not a distinction set theory makes, but it's a distinction many people's intuition makes, especially when coming from a CS background.

Second, there are some rare, implausible cases where the definition could have unexpected results. Say your graph has three vertices: $a$, $b$, and $\{a,b\}$. If all three possible edges are present, and you think of an edge as a set of two vertices, then the edges are $\{a,b\}$, $\{a, \{a,b\}\}$, and $\{b, \{a,b\}\}$. You'll notice that the last vertex is the same set as the first edge; so your function $\omega : V \cup E \to \mathbb R$ would have to assign the same weight to that vertex and that edge. Again, it is rare for this issue to come up, and most people would not even consider this behavior - but it is inelegant for the definition to depend on what sort of objects the vertices are, or on how exactly the edges are defined.

Anyway, both of these issues are solved if you define two functions, say $\omega : V \to \mathbb R$ and $\omega' : E \to \mathbb R$. Since you do not like this, one compromise is to say:

The graph has two weight functions: a vertex weight function $V \to \mathbb R$ and an edge weight function $E \to \mathbb R$. In a slight abuse of notation, we will use $\omega$ to denote both functions.

This allows you to keep using the notation you wanted for the rest of your write-up.


问:
What does $f^{\leftarrow }$ mean?

Hello
I came across this notation and I don't understand it.

Would you be so kind to help me?

Thank you very much to all

答:
If $A$ is a subset of the codomain of $f$, $f^{\leftarrow}(A)$ is the preimage of $A$ under the map $f$:

$$f^{\leftarrow}(A)=\{x\in\operatorname{dom}(f):f(x)\in A\}\,.$$

Judging by the context, the author is using $\langle c,d\rangle$ to mean the open interval that I would write $(c,d)$, i.e., the set of $x$ such that $c<x<d$, so

$$f^{\leftarrow}(\langle c,d\rangle)=\{x\in\operatorname{dom}(f):c<f(x)<d\}\,.$$

This notation does not require $f$ to be injective or to have an actual functional inverse, though the author’s use of $f^{-1}(c)$ indicates that in this case $f$ does have a functional inverse. That means that in this case

$$f^{\leftarrow}(A)=\{f^{-1}(a):a\in A\}\,.$$

This is one of several standard notations; I prefer $f^{-1}[A]$, with square brackets to indicate that I’m taking the preimage of the set under a function that may not have an actual inverse.

Title: What does $f^{\leftarrow }$ mean?


问:
If $f'(x)=\sqrt{x+1}$ and $h(x)=f(x^2+x)$, what is $h'(x)$?
I was thinking it could be plugging in $x^2+x$ to the $f'(x)$, then using the Chain Rule to solve it, but I'm not sure if it is right. Please help!

答: Put $u = x^2+x$ then the Chain Rule says that: $h’(x) = f’(u)\cdot u’(x) = \sqrt{u+1}\cdot (2x+1) = (2x+1)\cdot \sqrt{x^2+x+1}$.


答: No, take $a = i$ and $b = 0$.

Title: Is $(a+b)^2$ always greater than equal to zero, if we consider $a$ and $b$ to be complex numbers?

Body:
If $a$ and $b$ are complex numbers then will the given condition stand TRUE?
And if $a$ and $b$ are not complex numbers will the identity (a+b^2 be greater than or equal to zero?

Body: No, take $a = i$ and $b = 0$.


答:
If $f'(x) = \sqrt{x+1}$, then $f(x) = \int \sqrt{x+1} dx = \frac{2}{3}(x+1)^{\frac{3}{2}} + c$. You can solve that integral using u-substitution. Then we also know that $h(x) = f(x^2 + x)$. So then using function notation, we know that $h(x) = f(x^2 + x) = \frac{2}{3}(x^2 + x+1)^{\frac{3}{2}} + c$. We can now differentiate this using chain rule as follows:

$h(x) = \frac{2}{3}(x^2 + x+1)^{\frac{3}{2}} + c$

$h'(x) = \frac{2}{3} \cdot \frac{3}{2}(x^2 + x+1)^{\frac{1}{2}} \cdot (2x+1) = (x^2 + x+1)^{\frac{1}{2}} \cdot (2x+1) $

Notice that when we do so, the derivative of $c$ will just be $0$, so it doesn't matter that we don't know the specific value of $c$.

Title: If $f'(x)=\sqrt{x+1}$ and $h(x)=f(x^2+x)$, what is $h'(x)$?

Body: I was thinking it could be plugging in $x^2+x$ to the $f'(x)$, then using the Chain Rule to solve it, but I'm not sure if it is right. Please help!


问:
Rearranging a series.
Consider the following two series.

$$\sum a_n = 1-\frac{1}{2}+\frac{1}{3}-\frac{1}{4}+\frac{1}{5}+ \cdots$$ $$\sum b_n = 1+\frac{1}{3}-\frac{1}{2}+\frac{1}{5}+\frac{1}{7}-\frac{1}{4}+ \cdots$$

I was able to say that $a_n = (-1)^{n+1} \frac{1}{n}$ while $b_n = \frac{1}{4n-3}+\frac{1}{4n-1}-\frac{1}{2n}$, which was obtained after rearranging the numbers.

I understand up to the fact that if a series is not absolutely convergent, rearranging the sequence will change the limit of the sum.

I haven't seen the proof yet, but I have two questions.

1), I want to prove that the second series converges. The ratio test was inconclusive, so trying to use the root test I got the following. Can someone check my work ? Is this a natural approach ?

$$\sqrt[n]{b_n} =\sqrt[n] {\frac{8n-3}{2n(4n-1)(4n-3)}} \le \sqrt[n]{\frac{8}{32n^2}}$$

so $$\lim_{n \to \infty}\sqrt[n]{b_n}=1$$

which is inconclusive, again.

2), Assuming that convergence was known, how can we calculate the limit of the sum ?

答:
Since
$$
\small
b_n=\frac{8n-3}{2n(4n-1)(2n-3)}\sim\frac{1}{2n^2}
$$
The series $\sum b_n$ absolutely converges. To find its sum we need to work a little. Note that
$$
\small
\begin{align}
\sum\limits_{k=1}^n b_k
&=\left(1-\frac{1}{2}+\frac{1}{3}-\frac{1}{4}+\ldots-\frac{1}{4n}\right)+\color{green}{\left(\frac{1}{2n}+\frac{1}{2n+1}+\frac{1}{2n+3}+\ldots+\frac{1}{4n-1}\right)}\\
&=\left(1-\frac{1}{2}+\frac{1}{3}-\frac{1}{4}+\ldots-\frac{1}{4n}\right)\color{green}{+\frac{1}{2n}}\color{green}{+\frac{1}{2n+1}}\color{red}{+\frac{1}{2n+2}}\color{green}{+\frac{1}{2n+3}}\color{red}{+\frac{1}{2n+4}}\color{green}{+\ldots+\frac{1}{4n-1}}\color{red}{+\frac{1}{4n}}\color{red}{-\left(\frac{1}{2n+2}+\frac{1}{2n+4}+\ldots+\frac{1}{4n}\right)}\\
&=\left(1-\frac{1}{2}+\frac{1}{3}-\frac{1}{4}+\ldots-\frac{1}{4n}\right)\color{green}{+\left(\frac{1}{2n}+\ldots+\frac{1}{4n}\right)}\color{red}{-\frac{1}{2}\left(\frac{1}{n+1}+\frac{1}{n+2}+\ldots+\frac{1}{2n}\right)}\\
\end{align}
$$
Thus
$$
\small
\begin{align}
\sum\limits_{k=1}^\infty b_k
&=\lim\limits_{n\to\infty}\left(\sum\limits_{k=1}^{4n}\frac{(-1)^{k-1}}{k}+\sum\limits_{k=2n}^{4n}\frac{1}{k}-\frac{1}{2}\sum\limits_{k=n+1}^{2n}\frac{1}{k}\right)\\
&=\lim\limits_{n\to\infty}\sum\limits_{k=1}^{4n}\frac{(-1)^{k-1}}{k}+\lim\limits_{n\to\infty}\left(\ln\frac{4n}{2n}+o(n)-\frac{1}{2}\left(\ln\frac{2n}{n+1}+o(n)\right)\right)\\
&=\ln 2+\ln 2-\frac{1}{2}\ln 2=\frac{1}{2}\ln 8
\end{align}
$$</p>

Title: Rearranging a series.


问:
Fundamental Theorem of Calculus: definition of differentiable interval?
I have a question on the Wiki definition:

$$
F(x) = \int_a^x f(t) dt
$$

where $f : [a,b] \rightarrow \mathbb{R}$, $F : [a,b] \rightarrow \mathbb{R}$ and $F$ is differentiable on $(a,b)$ then:

$$
(F'(x) = f(x)) \land (x \in (a,b))
$$

Questions $F'(x) = f(x)$ is defined on $(a, b)$ and earlier $f(x)$ is defined on $[a,b]$.  Does this make the antiderivative a partial function?  Also how can $F'(x) = f(x)$ if the domain is different then the earlier definition?

答:
$\frac{F(x+h)-F(x)}{h}=\frac{1}{h}\int_x^{x+h}f(t)dt\approx \frac{f(x)\times(x+h-x)}{h}\to f(x)$ as $h\to 0$  Approximation from definition of Riemann integral.

End points excluded since for $x=a$ and $h\lt 0$ or $x=b$ and $h\gt 0$, the integral cannot be defined.

$f(x)$ must be continuous at $x$ for $F(x)$ to be differentiable at $x$.


问:
What is the updated belief of B given F and I with all of them being independent?
What is the updated belief of B given F and I with all of them being independent?

This is more of a smell check cause I'm decently sure I have the correct thought process but it seems weird in the context of the story:

"Say you are 20% sure GameStop stocks will go up in a week, but your friend says it will for sure go up and your friend is correct 60% of the time. Then say you talk to a professional investor and they say that the stock will go up and is correct 80% of the time. Assume your belief, your friend's accuracy and the investor's accuracy are all independent events. What is your updated belief after observing what your friend says? How about after observing your friend and the investor?"

So I'm decently sure it's 20% for both cases, because the events are independent. So let's call my belief event B, friend's correctness F and investor's correctness as I. Then $P(B|F)=\frac{P(B,F)}{P(F)}$, but since they're independent $P(B|F)=\frac{P(B)P(F)}{P(F)}=\frac{(0.2)(0.6)}{0.6}=0.2$ then also because I is independent of B and F then $P(B|F,I)=\frac{P(B,F,I)}{P(F,I)}=\frac{P(B)P(F)P(I)}{P(F)P(I)}=P(B)=0.2$. This all makes sense to me given that they're all independent and only the marginal probabilities are given, it'd be impossible to solve this if they weren't independent because the joints and conditionals are not given, but it feels weird that my belief wouldn't improve given my friends and investor's correctness as evidence.

答:
Call $S$ the unknown event (i.e. that the stock is actually going to go up) and $A,B,C$ the events for the people's "hunches" (including your own, if you want).

It's reasonable to treat $A,B,C$ as independent given $S$, i.e. $P(A,B,C|S)=P(A|S)P(B|S)P(C|S)$, and you can model the different people's success rates using the conditional probabilities for each of the hunches (so e.g. $P(C|S)=P(\lnot C|\lnot S)=0.8$). Doing Bayesian inference to take the hunches into account means calculating $P(S|A,B,C)$, and this can definitely be different from $P(S)$ (and from $P(S|A)$, where $A$ is your own hunch).

With the information you gave, I'd leave out $A$ (since $P(S)$ already represents your prior belief in $S$). Then:
$$
\begin{align}
P(S|B,C)
&=\frac{P(S,B,C)}{P(B,C)}\\
&=\frac{P(S,B,C)}{P(S,B,C)+P(\lnot S,B,C)}\\
&=\frac{P(S)P(B|S)P(C|S)}{P(S)P(B|S)P(C|S)+P(\lnot S)P(B|\lnot S)P(C|\lnot S)}\\
&=\frac{(.2)(.6)(.8)}{(.2)(.6)(.8)+(.8)(.4)(.2)}\\
&=0.6
\end{align}$$

So hearing your friends' predictions increases your confidence from $0.2$ to $0.6$.


问:
When exactly is the dual of $L^1$ isomorphic to $L^\infty$ via the natural map?
The dual space to the Banach space $L^1(\mu)$ for a sigma-finite measure $\mu$ is $L^\infty(\mu)$, given by the correspondence

$\phi \in L^\infty(\mu) \mapsto I_\phi$, where $I_\phi(f) = \int f \cdot \phi \,d\mu$ for $f \in L^1(\mu)$.

Now, we consider this for more general measures $\mu$. If $\mu$ is not semifinite, then there is a measurable subset $A$ with $\mu(A) = \infty$ but $\mu(B) = 0$ for every subset $B$ of $A$ with $\mu(B) < \infty$. Any $\phi$ supported on $A$ will then map to the zero functional, so the correspondence is not one-to-one.

If $\mu$ is semifinite, the correspondence is one-to-one, but is it onto?

Using the Radon-Nikodym Thorem, any member of $L^1(B)^*$ for $\mu(B) < \infty$ can be represented by an $L^\infty(B)$ function class $[\phi_B]$. Unlike in the $\sigma$-finite measure case, however, I do not see an easy way to form a "patchwork" $\phi$ with $\phi|_B = \phi_B$ a.e.$[\mu]$. I suspect this may have an easy answer, but it eludes me. Or perhaps there is a well-known counterexample?

答:
To answer the question in the title, there is the following general theorem:

The natural map $I \colon L^\infty(X) \to (L^1(X))^\ast$ is

an isometric injection if and only if $(X,\Sigma,\mu)$ is semifinite.

an isometric isomorphism if and only if $(X,\Sigma,\mu)$ is localizable.

You already covered point 1 in your question (the isometry property being straightforward). The second point is more delicate.

A measure space $(X,\Sigma,\mu)$ is called localizable if it is semifinite and in addition the following condition holds:

For every family $\mathcal{F} \subseteq \Sigma$ there is $H \in \Sigma$ such that

$F \setminus H$ is a null set for all $F \in \mathcal{F}$.

If $G \in \Sigma$ is such that $F \setminus G$ is a null set for all $F \in \mathcal{F}$ then $H \setminus G$ is a null set.

Loosely speaking, this property asserts that every family $\mathcal{F}$ of measurable sets has a smallest measurable envelope $H$ (up to null sets).

The definition of localizability implies via a slightly technical argument that one can glue together measurable functions. More precisely:

Let $\mathscr{F}$ be a family of functions such that each $f \in \mathscr{F}$ is defined and measurable on a measurable subset $D_f$ of the localizable measure space $(X,\Sigma,\mu)$. Suppose in addition that $f_1 = f_2$ a.e. on $D_{f_1} \cap D_{f_2}$ whenever $f_1,f_2 \in \mathscr{F}$. Then there is a measurable function $g \colon X \to \mathbb{R}$ whose restriction to $D_f$ satisfies $g|_{D_f} = f$ a.e. for all $f \in \mathscr{F}$.

Using this result one can patch together the Radon-Nikodym derivatives one obtains from restricting a continuous linear functional $\varphi \colon L^1(X) \to \mathbb{R}$ to the subspaces $L^1(F) \subseteq L^1(X)$ where $F$ runs through the subsets of finite measure of $X$.

The proof of the converse direction proceeds by a direct verification of the localizability property of $(X,\Sigma,\mu)$ the fact that $I$ is isometric implies semi-finiteness by point 1. of the theorem and the "envelope condition" uses surjectivity of $I$.

Details can be found in 243G on page 153 of this PDF. The gluing property is proved in 213N on page 28.


问:
Are there any other examples besides $8^3-7^3 =13^2$ for $C^z -(C-1)^z=A^2$ where $C$ and $z$ are positive integers greater than $1$ and $z$ is odd?
I was trying to study the Beal's Conjecture, which states:

$A^x + B^y = C^z$, where $A, B, C, x, y$ and $z$ are positive integers and $x, y$ and $z$ are all greater than $2$, then $A, B$ and $C$ must have a common prime factor.

I was attempting a special case of the Beal's Conjecture where $=−1$ and $=$

So it means that $A^x + (C-1)^z = C^z$ or $C^z -(C-1)^z=A^x$ (where $C$ and $z$ are greater than $1$)

It means $A$ will always be a positive odd integer greater than $1$.

If I disobey the rules and allow both $z=2$ and $x=2$ ($z=x=2$), I will find many examples, such as:

$5^2 - 4^2=3^2 =9$

$13^2 - 12^2=5^2 =25$

$25^2 - 24^2=7^2 = 49$

So we can see that:

$A^2 = C^2 -(C-1)^2$: When $A$ is any positive odd integer greater than $1$, then $C^2 = (0.5(a^2+1))^2$ and $(C-1)^2 =(0.5(a^2-1))^2$

We know from Fermat's little theorem that the same is false for when $x=z$, $x$ is odd, and $x$ is greater than $1$ .

If I disobey the rules and allow only $z=2$, I will find even more examples because:

For all $C^2$:

$1^2=1$

$2^2=1+3$

$3^2=1+3+5$

$4^2=1+3+5+7$

$C^2=1+3+5+7+n...n+2$

So $C^2 - (C-1)^2) = n$ and $n$ can be any odd positive integer including $125=5^3$ ,$343=7^3$, $3125=5^5$ which can translate into any $A^x$ where $A$ is any odd positive integer and $x$ is any integer.

But here is the thing:

If I disobey the rules and allow only $x=2$ I have only found one example so far:

$8^3-7^3 =13^2$

At first I was trying to understand why is this case different which left me clueless, so I tried to search the web for other examples, and I couldn't find any so far.

Now I am wondering if there are at all any other examples of $C^z -(C-1)^z = A^2$ when $C$ and $z$ are positive integers greater than $1$ and  $z$ is odd? If yes, is there a way detect them?

Any references are appreciated.

答:
The equation
$$C^z + B^z = A^2$$
for $z$ odd has been completely resolved by the work of many authors.
You are looking at the case where $C + B = 1$ in particular.

First if $z$ has a prime factor $p>3$ we can consider the equation
$$C^p + B^p = A^2$$ instead as any solution of the first equation gives a solution of the second.

If $p \ge 7$: then then only solutions are $(C,B,A) = (±1,∓1,0), (1,0,±1), (0,1,±1)$ by the paper H. Darmon and L. Merel, "Winding quotients and some variants of Fermat’s last theorem".

For $p = 5$: Poonen showed in "Some diophantine equations of the form $x^n + y^n = z^m$" that this has only the trivial solutions.

In the $z = 3$ case we have infinitely many solutions, which
Cohen in his book "Number Theory Volume II: Analytic and Modern Tools" gives three parameterizations for these solutions: any solution must be given by picking some $s,t$ (satisfying some conditions) and then $A,B,C$ will be given by one of:

$$
\left\{\begin{array}{l}
C=s(s+2 t)\left(s^{2}-2 t s+4 t^{2}\right) \\
B=-4 t(s-t)\left(s^{2}+t s+t^{2}\right) \\
A=\pm\left(s^{2}-2 t s-2 t^{2}\right)\left(s^{4}+2 t s^{3}+6 t^{2} s^{2}-4 t^{3} s+4 t^{4}\right)
\end{array}\right.
$$
$$
\left\{\begin{array}{l}
C=s^{4}-4 t s^{3}-6 t^{2} s^{2}-4 t^{3} s+t^{4} \\
B=2\left(s^{4}+2 t s^{3}+2 t^{3} s+t^{4}\right) \\
A=3(s-t)(s+t)\left(s^{4}+2 s^{3} t+6 s^{2} t^{2}+2 s t^{3}+t^{4}\right)
\end{array}\right.
$$
$$
\left\{\begin{array}{l}
C=-3 s^{4}+6 t^{2} s^{2}+t^{4} \\
B=3 s^{4}+6 t^{2} s^{2}-t^{4} \\
A=6 s t\left(3 s^{4}+t^{4}\right)
\end{array}\right.
$$

Where we may have to swap $C$ with $B$ to get all solutions.

Looking at the third parameterization we cannot have $C = 1 - B$ as $B \equiv C \pmod 2$ there.

In the second case $C + B$ is always a multiple of 3 so we do not get solutions.

In the first case $C + B$ factors as $(s^2 - 2st - 2t^2)^2$ so this is $1$ if and only if
$s^2 - 2st - 2t^2 = \pm 1$ which after a change of variables is $s'^2 - 3t'^2 = \pm 1$ so this is a Pell equation (or rather two Pell equations) with infinitely many solutions for example the solution
$$s' = 1351, t' = 780$$
gives us
$$ s = 780 + 1351, t = 780$$
which gives the solution
$$
28712305723921^3 -28712305723920^3 = 49731172316281^2
$$
of the original equation.
Here $s = 1, t = -1$ gives the solution $8^3 - 7^3 = 13^2$ that you found.

If $z = 3^n$ with $n \ge 2$ then Poonen shows in the same paper mentioned above that the equation
$$C^9 + B^9 = A^2$$
has only trivial solutions.

Check out the survey by Michael Bennett, Preda Mihailescu and Samir Siksek
at https://homepages.warwick.ac.uk/~maseap/papers/bealconj.pdf for more on some of the known cases of Beal.

In summary: To get a solution of $C^z - (C-1)^z = A^2$ for odd $z \ge3$ we must have $z=3$ (except for the trivial examples where $C=1$) and we can get all solutions by taking a solution $s',t'$ of the Pell equation $s'^2 - 3t'^2 = \pm1 $ and plug $s = s' + t', t =t'$ into

$$
\left\{\begin{array}{l}
C=s(s+2 t)\left(s^{2}-2 t s+4 t^{2}\right) \\
A=\pm\left(s^{2}-2 t s-2 t^{2}\right)\left(s^{4}+2 t s^{3}+6 t^{2} s^{2}-4 t^{3} s+4 t^{4}\right)
\end{array}\right.
$$
And, more generally even without the condition that $B  = C-1$ this equation has been completely resolved.


问:
$d(E_n,E_m)>0 \forall n \neq m$, and $f|_{E_k}$ is constant. Then $f|_{\cup E_k}$ is continuous.
Given a function $f:E\subseteq \mathbb{R} \to \mathbb{R}$ and finite (see edit) collection $\{E_k\} \subseteq E$ of disjoint sets and $d(E_n,E_m)>0 \forall n \neq m$, and $f|_{E_k}$ is
constant. Then $f|_{\cup E_k}$ is continuous.

This fact is used in the proof of Lusin's theorem, but I can't see why $f$ must be continuous on the whole union. I would like an explanation of this step on the proof (I would be specially happy if presented a $\epsilon-\delta$ proof of this continuity, because this is what I'm more confortable with)

The whole proof can be found here.

Edit: I don't know if this edit is under the rules of math.stackexchange, but since it was pointed out in the answer, I wrote countable collection instead of finite collection, which is what I aimed for explanation on what I did not understood, so I edited the question to finite collection, because I still wnat to see an explanation of it and it doesn't feel right to create a new question about this. If this edit is not under the rules, please forgive me and feel free to unedit.

答:
The result is false as you have stated it.

Let $E_0=\{0\}$, for $n\in\Bbb Z^+$ let $E_n=\left\{\frac1n\right\}$; clearly $d(E_n,E_m)>0$ whenever $n\ne m$. Let $E=\bigcup_{n\ge 0}E_n$, and define

$$f:E\to\Bbb R:x\mapsto\begin{cases}
x,&\text{if }x\in E\setminus E_0\\
1,&\text{if }x=0\,.
\end{cases}$$

Clearly $f$ is constant on each $E_n$, but $f$ is not continuous at $0$.


问:
When is it OK to introduce multicollinearity? (Machine Learning)
Looking at the Kaggle Titanic Dataset there exists two columns of predictors:

Parch describes the sum of that passenger's parents and children that have boarded

SibSp describes the sum of that passenger's siblings and spouses that have boarded

I've seen multiple examples under the shared code where people create a new predictor column named Family that is the sum of Parch and SibSp.

Now, it is common sense to say that Family = Parch + SibSp. Therefore Family is easily predicted based on the other two columns -- that would make it multicollinear (multicollinear wiki) which I understand to be problematic.

So why make the family column? If it really is multicollinear, I don't see why so many people (who seem to have a better understanding of ML than I) are doing this.

EDIT: I've also discovered people sometimes will combine variables they expect to demonstrate multicollinearity, into a single new variable. I.E. in the problem described, if it is suspected that SibSp is a predictor of Parch, it would make sense to create Family, though the video [timestamp 14:05] offers no explanation as to why.

答: Multicollinearity is mainly an issue when fitting Linear regression models. However, in machine learning applications it is rare to fit just a vanilla OLS model. Moreover, adding a regularization term is very common, and even for OLS model this can address many of the problems of multicollinearity since it yields a problem that has a unique solution and with controlled condition number. The issues of parameter identifiability and signifiance estimates mentioned in the link are essentially irrelevant to machine learning, where the ultimate objective is predictive accuracy.</p>


问:
Ant crawling back along the prism edges
An ant starts to crawl along the edge of the  prism from vertex A randomly to one of the next three vertices, and continues this for random crawling for the next step.

Question:  What is the probability for the ant  to crawl back to its initial vertex A after 4 of such  steps?

For clarification,  paths similar to A $\to$ B $\to$D $\to$ E $\to$A, A $\to$ B $\to$A $\to$ B $\to$A ,  A$\to$ B $\to$C $\to$ B $\to$A are all valid returns.

The is similar to (Logic question: Ant walking a cube), but not the same in the sense that the prism is not symmetrical in all directions which adds quite some  (if not significant) complexities, and the question is also in different scenario - this ant crawls back.

答:
Consider the possible locations of the ant after the first two moves. The ant can be on vertex A in 3 path(A->D->A,A->C->A,A->B->A), on vertex B in 1 path(A->C->B), on vertex C in 1 path(A->B->C), vertex E in 2 paths(A->D->E,A->B->E), vertex F in 2 paths(A->D->F,A->C->F) and D in 0 paths.

Now we do the reverse: from the above vertices back to A, in two moves. For each vertex, the possible paths would just be the paths of the first two moves in reverse order(for Ex: from vertex E back to A would correspond to E->D->A, E->B->A).

The require probability is $\frac{3^2+1^2+1^2+2^2+2^2}{3^4}=\frac{19}{81}$

Title: Ant crawling back along the prism edges


问:
Can $\frac{n!}{(n-r)!r!}$ be simplified?
I'm trying to calculate in a program the number of possible unique subsets of a set of unique numbers, given the subset size, using the following formula:

$\dfrac{n!}{(n-r)!r!}$

The trouble is, on the face of it, you may need an enormous structure to hold the dividend (at least).  Is there a way of simplifying this calculation, so that it can be calculated using something smaller like $64$-bit integers, or are you really going to have to store numbers like $60!$?

Alternatively, is there a formula that is more suited to computing the aforementioned value?

答:
For the purposes of a computer program, it's probably best to split it up unto $r$ different factors, each of which can be held in a standard double.

First assume without loss of generality that $2r<n$.  If not, use the fact that ${n\choose r} ={n\choose n-r}$. This is obvious from the formula.

Now we have
$$\begin{array}{rl}
\frac{n!}{r!(n-r)!} &= \frac{1\times2\times\dots\times n}{(1\times2\times\dots\times r)(1\times2\times\dots\times n-r)} \\&= \frac{(1\times2\times\dots\times r)(r+1\times r+2\times\dots\times n)}{(1\times2\times\dots\times r)(1\times2\times\dots\times n-r)} \\
&=\frac{r+1}{1}\times\frac{r+2}2 \times \dots\times \frac{r+(n-r)}{r}
\end{array}$$

So you may calculate the value of each fraction in a double and multiply them all quite easily.  The answer you get should be an integer; if not you're losing precision somewhere.


问:
Show that $e^x\ge x^e$ for all $x\ge 0$
Show that $e^x\ge x^e$ for all $x\ge0.$

I was playing around with splitting a number into parts (that add to the original number) and then multiplying the parts to get the result, and I found that the product is highest when the parts tended towards $e$. This inequality is a consequence of that. Is there a proof or intuitive explanation for this?

答:
Outline:  At $x = 0$, $e^x = 1 > 0 =x^e$ and and at $x = e$ we have $e^x = x^e$. To determine if they are equal anywhere else or if $x^e$ is ever greater than $e^x$ we can consider the rates of change (i.e. the derivatives)

But it will be easier to consider the the $\log e^x = x$ and the $\log x^e= e\log x$ because their derivatives ($1$ and $\frac ex$) are really clear and apparent.  We can do  this safely as $\log y$ is montotonically increasing so $0 < a < b \iff \log a < \log b\iff e^a < e^b$.

So $e^x \ge x^e \iff x \ge e \ln x$.  And $x = 0$ we have $x > \log 0$ which... well admitted $\log 0$ is undefined but $\lim_x\to 0 \log x = -\infty$ so it is kosher to so $x = 0> \log 0$.

At $x=e$ the $x =e = e\ln x$ but $\frac {dx}{dx}= 1$ and $\frac {de\ln x}{dx} = \frac ex$. And $x =e$ these rates are equal but for any $x > e$ then $1 > \frac ex$ so $x$ is increasing faster than $e\ln x$ and so they can never be equal for any point $x > e$.

And for $0 < x < e$ then $\frac {dx}{dx} = 1 < \frac ex =\frac {dx \ln x}{dx}$  so on $(0,e)$ we have $e\ln x$ is increasing faster than $x$.  So if there is any $x\in (0,e)$ so that $x \le e\ln x$ then $e\ln x$ would surpass $x$ and $x$ would never be able to catch up until $\frac {dx}{dx}>\frac {de\ln x} {dx}$ but that never happens in $(0,e)$.

So it is not possible for $x \in (0,e)$ for $x \le x\ln x$.

So $x > e\ln x$ for all $x < e$ and for all $x > e$ and at $x =e$ we have $x =e\ln e$.

So $x \le e\ln x$ for all $x \ge 0$.

And so $e^x \le e^{e\ln x} = x^e$ for all $x \ge 0$.

Title: Show that $e^x\ge x^e$ for all $x\ge 0$


问:
Norm - Cauchy Sequence
Show that if $\{x_k\}$ is a Cauchy Sequence then the limit of sup{$\lvert x_i - x_j \lvert : i, j \geq  k\}$ when k goes to infinity is equal to 0.

We know that $\{x_k\}$ is a Cauchy Sequence therefore for all l > 0 exists k $\in$ N such that such that if  I, j $\geq$ k then $\lvert x_i - x_j \lvert$ < l, now take $l = 1/k_0$ then  $\lvert x_i - x_j \lvert$ <  $1/k_0$. Therefore, sup{$\lvert x_i - x_j \lvert : i, j \geq  k_0\} \leq 1/k_o$. Therefore given l > 0 exists $k_0$ $\in$ N such that $1/k_0$ < l, so $\lvert$ sup{$\lvert x_i - x_j \lvert : i, j \geq  k_0\}$ - 0 $\lvert $ $\leq$ $1/k_0$ < l, so we are done.

答: Let $C_k=\sup \{|x_i-x_j|:i,j\geq k\}$. $\{x_k\}$ is bounded since it is Cauchy. So $C_k<\infty$ for all $k$, also note that $\{C_k\}$ is a decreasing sequence of non-negative reals. There exists $C\geq0$ such that $\lim_{k \rightarrow \infty} C_k=C$. If $C>0$, for each $k \in \mathbb{N}$ there exists $i_k>j_k>k$ such that $C_k-\frac{1}{k}<|x_{i_k}-x_{j_k}|~(\leq C_k)$, taking limit as $k \rightarrow \infty$ we get $\lim_{k \rightarrow \infty}C_k=0$.

Title: Norm - Cauchy Sequence


问:
Derivative of $y=x^y$
How to find the function that gives the slope of the line tangent to $y = x^y$, at a certain $x$ value?

Unless I made a mistake:

$$\frac{dy}{dx}=\frac{ye^{y\ln x}}{\ln x-\ln^2x}$$

How would I use that to graph the function that gives the slope of the tangent line along $y = x^y$ for any given $x$?

Thanks

答:
I think you made a mistake:
$$\begin{align*}
y&= x^y\\
y &= e^{y\ln x}\\
y’ &= (y\ln x)’e^{y\ln x}\\
y’ &= \left(y’\ln x + \frac{y}{x}\right) x^y\\
y’ &= y’(x^y\ln x) + \frac{yx^y}{x}\\
y’ - y’(x^y\ln x) &= yx^{y-1}\\
y’(1 - x^y\ln x) &= yx^{y-1}\\
y’ &= \frac{yx^{y-1}}{1-x^y\ln(x)}.
\end{align*}$$

(To see this is the same as the other answer, replace the $y$ in the numerator with $x^y$)

Given a value of $x$, you use the equation $y=x^y$ to find the corresponding value of $y$ (this is difficult sometimes for this function). That will give you the point. Then plug in the values of $x$ and $y$ into the equation to get the slope. Exactly the same way you do with any implicit differentiation.
For example, if $x=1$, you want to solve $y=1^y$; the obvious answer is $y=1$. Plugging into the formula, we get
$$y’\Bigm|_{(1,1)} = \frac{1(1^0)}{1 - (1^1)\ln(1)} = \frac{1}{1} = 1,$$
so you want the line with slope $1$ that goes through $(1,1)$.

Title: Derivative of $y=x^y$


问:
Given the power series, for all $c > 0 $ the power series either converges diverges or both, for at atleast one $x>0$, what is true?
Let $\sum_{n=0}^{\infty} \frac{c^nx^n}{n}$ be a power series.

I tried solving using the ratio test

$|\frac{U_n+1}{U_n}|= |\frac{c^{n+1} x^{n+1}}{n+1} \frac{n}{c^nx^n}|= |cx| =\lim_{n \to +\infty} \frac{1}{1+{\frac{1}{n}}} = L =  |cx|$

According to ratio test I get :

1.) converges for $|cx| < 1= |x|<\frac{1}{|c|}$

2.) diverges for $|cx| > 1= |x|>\frac{1}{|c|}$

3.) $|cx| = 1 ?$ confirm that in the next step, by checking wheather it's converging at endpoints or not.

so now checking whether series, it's convergent at the endpoints so for $ x = \frac{1}{c}$ and $x=\frac{-1}{c}$.

The result :

At $ x = \frac{1}{c}$
,  $\sum_{n=0}^{\infty} \frac{c^n{c}^{-n}}{n}=\sum_{n=0}^{\infty}  \frac{1}{n}$ diverges through p test.

At $ x = \frac{-1}{c}$
,
$\sum_{n=0}^{\infty} \frac{c^n{-c}^{-n}}{n}=\sum_{n=0}^{\infty} \frac{-1^{n}}{n}$ converges through alternating test

so I can conclude that :

1.) convergent for $x \in [\frac{-1}{c}, \frac{1}{c})$. But statement 1 says " for all c >0  power series converges for atleast one x > 0" is this true?

rewrite like $x \in (0, \frac{1}{c}) ==  0<x< \frac{1}{c}$

2.) and divergent for other x values,otherwise. But statement 2 says " for all c >0  power series diverges for atleast one x > 0" is this true?

-suppose for example I take c = 300.

so, I know x converges for $ x \in (0, \frac{1}{300})$ taking $x = \frac{1}{500}=0.02 > 0 $, which is part of the set.

and diverges for all $ x ≥ \frac{1}{300}>0$

-statement 1 says " for all c >0  power series converges for atleast one x > 0" is this true?

-statement 2 says " for all c >0  power series diverges for atleast one x > 0" is this true?

so is both statements or either statements true?

My answer - I feel  both statements should be true

Thanks in advance!

答:
The construction "for all $c > 0$ the ... for at least one $x$ ..." means that we are allowed to specify $x$ dependent on $c$.  (This is because $c$ is (universally) quantified before $x$ is (existentially) quantified.)  It is sufficient to show, for each possible choice of $c$ that there is a choice of $x$ (which is permitted to depend on $c$) satisfying the part of the sentence that is suppressed in the quote above.

For 1, why not observe that for $c > 0$, one may take $x = \frac{1}{2c}$, which is positive and which satisfies
$$  \frac{1}{2c} \in \left[\frac{-1}{|c|}, \frac{1}{|c|} \right)  \text{.}  $$
You're only required to show (for each choice of $c$) one positive $x$ for which the series converges, so pick any one in the positive half of the interval.  Notice that we have exhibited "for each $c > 0$ a specific $x > 0$ where the series converges".

Likewise, for 2, you only have to exhibit one positive $x$ for each choice of $c$.  Why not $x = 2/|c|$?  Notice that we have exhibited "for each $c > 0$ a specific $x > 0$ where the series diverges".


答:
hint: $y=x^y$ implies $x=y^{1/y}$, you wouldn’t need implicit differentiation if you considered $x$ as a function of $y$.

also you can use the logarithm to differentiate implicitly $\frac{d}{dx}[y]=\frac{d}{dx}[x^y]=\frac{d}{dx}[e^{y\cdot \ln(x)}]=e^{y\cdot\ln(x)}\cdot \frac{d}{dx}[y\cdot\ln(x)]=x^y\left[ \frac{d}{dx}[y]\cdot \ln(x)+\frac{x^y}{x}\right]$

which after solving for $\frac{d}{dx}[y] = \frac{x^{2y-1}}{1-x^y\cdot\ln(x)}$ would give you the slope for every point $(x,x^y)$ on the curve, so now instead of having to plug in only $x$ to find the slope of the curve, you would have to plug in the appropriately calculated value of $y$,

you could probably do that more easily by first choosing a $y$, then solving for $x$, so it’s much easier to know the slope at a certain $y$ value than an $x$ value in this case.

Title: Derivative of $y=x^y$

Body:
How to find the function that gives the slope of the line tangent to $y = x^y$, at a certain $x$ value?

Unless I made a mistake:

$$\frac{dy}{dx}=\frac{ye^{y\ln x}}{\ln x-\ln^2x}$$

How would I use that to graph the function that gives the slope of the tangent line along $y = x^y$ for any given $x$?

Thanks


问:
Evaluate $\int_0^4 h''(\sqrt{y})dy$ if $h(0) = 2, h(2) = 4$ and $h'(2) = 5$.
I changed the values so that I could learn from this rather than plagiarize. I already tried to brute force it and get:
$$h'(\sqrt{y})]_0^4,$$
which is:
$$h'(\sqrt{4}) - h(\sqrt{0})$$
but now I'm stuck.

答:
This is a Community Wiki because I am not sure I have the question exactly right.  But, from first principles:

I am a little worried about the integration there. I don't think it evaluates to $h'(\sqrt{y})|_0^4$.  Consider a different approach: let
$x = \sqrt{y}$ (the positive branch).  Then
$$
dy = d\left(x^2\right) = 2x \: dx,
$$
and
$$
\int_{y = 0}^{y = 4} h''(\sqrt{y}) dy =
\int_{x = 0}^{x = 2} h''(x) 2x dx,
$$
and you can attack this by parts.  Furthermore, it is this integration by parts that leads me to suspect you may have been given the values $h'(0), h'(2)$, not $h(0), h(2)$.


问:
How do I explain why $dA/dr = 2 \pi r$ geometrically?
There's this question in my calculus book that goes something like this:

The derivative of the area of a circle with respect to its radius is equal to the circle's circumference ($dA/dr = 2 \pi r$). Give a geometric explanation of why this is the case.

To me this is really obvious, but I find it hard to put into words.  If you increased the radius of the circle by putting your finger inside it and pushing the edge outward, then you would have to push it around the whole circumference of the circle.  Heh.  I don't know.

答:
That's not too bad.  Try this one:

If you want a larger circle with the same centre which has radius $r+\Delta r$ then the circumference of the bigger circle is $2\pi (r+\Delta r)$. The edge is a constant $\Delta r$ from the edge of the original circle all the way round.

The area between the two circles is somewhere between that of a $\Delta r \times 2\pi r$ rectangle and a $\Delta r \times 2\pi (r+\Delta r)$  rectangle.  So the rate of change of this area as $\Delta r$ changes is between $2\pi r$ and $2\pi (r+\Delta r)$; take the limit as $\Delta r$ tends to $0$ to get the result.


答:
As mentioned by others, the binomial coefficient

$$\binom{n}{r}=\frac{n!}{r!(n-r)!}$$

is already so fundamental a quantity, that it is itself considered a canonical form. Nevertheless, you seem to be asking how one might compute this, while avoiding unsavory events like integer overflow.

Since this is for programming purposes, if you can stand to use a two-dimensional array, you might be interested in the doubly-indexed recurrence relation

$$\binom{n}{r}=\binom{n-1}{r}+\binom{n-1}{r-1}$$

along with the initial conditions $\tbinom{n}{0}=\tbinom{n}{n}=1$, or the singly-indexed recurrences

$$\begin{align*}
\binom{n}{r}&=\frac{n}{n-r}\binom{n-1}{r}\\
\binom{n}{r}&=\frac{n-r+1}{r}\binom{n}{r-1}
\end{align*}$$

One other possibility is to instead deal with the logarithms of the factorials, since $\log(ab)=\log\,a+\log\,b$ and $\log(a/b)=\log\,a-\log\,b$. You might want to look into Stirling's formula if you want to take this route, but this is only intended for the cases where $n$ and $r$ are large.


问:
Calculate $f(0), f(1)$ of a function
Let $f(x)=\sum_{n=1}^{\infty}\frac{5x^n}{3^n(1-2x)}$ and assume this function is defined wherever this series converges. Calculate $f(0)$, $f(1)$, and determine whether $f(x) \leq 0$ for all x in the domain. For $f(0)$ this seems to be trivial as it evaluates to $\sum_{n=1}^{\infty}0$, which is just 0. For $f(1)$, it seems like $\sum_{n=1}^{\infty}\frac{5}{-3^n}$, which I would have to calculate what it converges to. I ended up with $f(1)=\frac{-5}{2}$. Is this correct?

For the last question, whether $f(x) \leq 0$ or not, I hypothesize that it is. I used multiple other values such as $f(2)$, $f(2.5)$, etc. (Also I didn't use values outside of the domain.)

答:
You can check your answers to the first part by evaluating $f(x)$ in closed form, something that will in any case help greatly with the second part:

$$\begin{align*}
f(x)&=\sum_{n\ge 1}\frac{5x^n}{3^n(1-2x)}\\
&=\frac5{1-2x}\sum_{n\ge 1}\left(\frac{x}3\right)^n\\
&=\frac5{1-2x}\cdot\frac{\frac{x}3}{1-\frac{x}3}\\
&=\frac{5x}{(1-2x)(3-x)}
\end{align*}$$

for $|x|<3$, provided that $x\ne\frac12$. Thus, $f(0)=0$, and $f(1)=\frac5{(-1)(2)}=-\frac52$.

The second question is then whether $f(x)\le 0$ for all $$x\in\left(-3,\frac12\right)\cup\left(\frac12,3\right)\,,$$ the domain of $f$, and that’s a straightforward algebra problem. First, $3-x>0$ for all $x\in(-3,3)$, so the sign of $f(x)$ is the same as the sign of $\frac{x}{1-2x}$. What happens of $0<x<\frac12$?

Title: Calculate $f(0), f(1)$ of a function


问:
Prove complements
can someone help me with this problem.

Notation: $A$' is the complement of A

Prove that $A$ $\cap$ $B$' $\subseteq$ ($A$ $\cap$ $B$)'

My work:

$A$ $\cap$ $B$' = {x $|$ x $\in$ A, x $\notin$ $B$}

$A$ $\cap$ $B$ = {x $|$ x $\in$ A, x $\in$ $B$}

($A$ $\cap$ $B$)' = {x $|$ x $\notin$ A, x $\notin$ B} = {x $|$ x $\notin$ ($A$ $\cap$ $B$)}

I am stuck here. Please help if you can. Thank you!

答: If $x \in A \cap B’ \implies x \in A$ and $x \in B’$. If $x \in A\cap B$ then $x \in B$ since $A \cap B \subseteq B$, but $x \notin B$ so $x \in (A \cap B)’$. Thus: $A \cap B’ \subseteq (A \cap B)’$.

Title: Prove complements


问:
Parameterise a line represented by n points
I'm trying to write a program where I draw points at constant increments, regardless of how curvy a road is. For example, a straight line of length 10 and increment 2 would have 5 points spaced 2 meters away from each other, and would be as simple as adding 2 to the value of the previous point. However it gets a lot more complex when dealing with lines that aren't straight.

Let's say I have n points which represent a line. Is it possible to parameterise it in say, Cartesian coordinates, so that I can find any point on that line simply by passing in an independent variable?
For example, say I have a line made up of n points, all connected by line segments. Is there a way I can find a point on any of those lines through a parameterised vector? For example, a circle with equation x^2+y^2 = 4 can be parameterised as r(theta) = (2cos(theta) , 2sin(theta). Is there a way to do something similar with the image below, with the first point n = 0 being used as the reference point.
Line made up of n points

答:
Yes, we can parameterize that but the greater the number of segments the uglier the parameterization becomes because of the cases in the definition.

For a line segment between two points $p, q$ we parametrize the segment by $$f(t)=(1-t)p + tq$$ where $t\in [0,1]$.

If we want to add another point $r$ to get two line segments: one between $p$ and $q$ and another between $q$ and $r$ we have to do something like
$$f(t) = \begin{cases}
        (1-t)p + tq, & 0\le t\le 1 \\
        (2-t)q + (t-1)r & 1\lt t\le 2
        \end{cases}$$

We continue in this manner until we include $n$ different cases for the $n$ different segments.

This parameterization is not unique. Nothing says we have to travel along each segment in the same amount of time. We can also rescale the domain so the entire parameterization happens in an interval other than size $n$.

Update
If you are writing a computer program and have many points then we don't need a parameterization as above. We can reuse the parameterization of one segment along with a look up table to navigate along the curve.

Store the individual segments as pairs of points in a 0-indexed array. The first segment will be segment $0$ and the $n$th segment will be $n-1$.

At time $t$, $0\le t\lt n$, use the integer part to find the segment and plug the remainder into the formula for a single line segment above. Use the points in the array for $p$ and $q$ in the formula.