问:
looking for $3D$ vector field satisfying certain projection conditions
I'm searching for a $3D$ vector field $V$ in $(0,1)^3$ whose parallel projections onto the boundary of $[0,1]^3$ are the following $2D$ vector fields:

The parallel projection of $V$ onto the $x-y$ plane will yield the vector field $\{x\log(x),-y \log(y)\}.$

The parallel projection of $V$ onto the $y-z$ plane will yield the vector field $\{y\log(y),-z\log(z)\}.$

The parallel projection of $V$ onto the $x-z$ plane will yield the vector field $\{x\log(x),-z\log(z)\}.$

I have a good idea of the general shape of the 3D vector field but I haven't been able to express it in mathematical form.

答:
COMMENT.-Just to consider the projection over the X-Y plane. Is it like this wath you want?.

Let the angle $\gamma$ be that of the directional cosinus with the Z-axis and {i,j,k} the base
we have
$$x\sin(\gamma)i+y\sin(\gamma)j=x\log(x)i-y\log(y)j$$ therefore $\sin(\gamma)=\log(x)$ and $\sin(\gamma)=-\log(y)=\log\dfrac 1y$. Then making $y=\dfrac1x$ you have for
$$\sin(\gamma)=\log(x) \text { and } xy=1$$ into the unit cube a solution concerning the X-Y plane.


问:
Chord in Orthogonal Circles
Two orthogonal circles with centres $A$ and $B$ have a common chord which meets $AB$ at $C$. $DE$ is a chord of the first circle that passes through $B$. Prove that $A,D,E,$ and $C$ are concyclic.

I have attempted this question using angles in the alternate segment, and properties of cyclic quadrilaterals including Ptolemy's Theorem, but cannot proceed to a proof. Any help would be appreciated.

答:
Let $C'$ be the point of intersection of the circle passing through $A$, $D$ and $E$ with the line $AB$. We need to show that $C=C'$.

Let's first notice that the point $C'$ lies between points $A$ and $B$.

Let $D$ be the point closer to $B$ than $E$, so that  points $B$, $D$, $E$ lie on the line in that order.

Let
$$R = |AD| =|AE|$$
be the radius of the circle with the center $A$.

Let
$$\alpha = |\sphericalangle C'AD| = |\sphericalangle C'ED|$$
$$\beta = |\sphericalangle AC'E| = |\sphericalangle ADE|$$
(All of these angles are inscribed angles, so their measures are equal if they are subtended by the same arcs.)
Because $\triangle ADE$ is an isosceles triangle, it means that also
$$ |\sphericalangle AED| = |\sphericalangle ADE| = \beta$$
Since $\sphericalangle AC'D$ and $\sphericalangle AED$ are opposite angles in a quadrilateral inscribed in a circle, we have
$$ |\sphericalangle AC'D| = \pi - |\sphericalangle AED| = \pi-\beta $$

We also have
$$ |\sphericalangle ADB| = \pi- |\sphericalangle ADE| = \pi - \beta$$

To sum up, we have
$$ |\sphericalangle BAD| = |\sphericalangle C'AD| = \alpha$$
$$ |\sphericalangle ADB| = \pi-\beta = |\sphericalangle AC'D|$$
which means that $\triangle ABD$ and $\triangle ADC'$ are similar. From this we have
$$ \frac{|AB|}{|AD|} = \frac{|AD|}{|AC'|} $$
$$ |AC'| =\frac{|AD|^2}{|AB|} = \frac{R^2}{|AB|} $$
Independently it's not difficutlt to show that
$|AC| = \frac{R^2}{|AB|}$
(but tell me if you need help with this).

Since $|AC|=|AC'|$, and both points $C$ and $C'$ lie on the line between points $A$ and $B$, it means that $C=C'$, which finalizes the proof.

ContentLicense: CC BY-SA 4.0

Title: Chord in Orthogonal Circles


问:
Find determinant for a matrix with $x$ on the diagonal
Find determinant for a matrix with $x$ on the diagonal and $-1$ at the end of the first row and $-1$ at first of the last row other elements are $0$.

```<code>{ x  0 0 -1
  0  x 0  0
  .  0 x
  .  0 0  x
  -1 0 .  .  x
}
</code>```

$$
\pmatrix{x & 0 & \cdots & 0 & -1\\
0 & x & \ddots & \vdots & 0\\
\vdots & \ddots & \ddots & 0 &\vdots\\
0& \cdots & 0 & x&0\\
-1&0&\cdots & 0 & x}
$$

I know if i add 1/xR1 to R2 the determinat will be $(x^{n-1})(x-1/x)$. I asked my professor she said what if $x$ is zero. Now i don't know what to do.

答:
Your approach is perfectly fine. What you have shown is that in the case that $x \neq 0$, Your matrix $M$ satisfies
$$
\det M = x^{n-1}(x - 1/x) = x^{n-2}(x^2 - 1).
$$
All that remains is to show that this equation holds for $x = 0$ as well.

There are a few approaches to handle the case of $x = 0$. One is to note that $\det(M)$ must be a polynomial over $x$; since $\det(M) = x^{n-2}(x^2 - 1)$ holds for all $x \neq 0$ and polynomials are continuous, the equation must hold for $x = 0$ as well.

Alternatively, we can simply plug in $x = 0$. For the case of $n=2$, we have
$$
\det(M) = \det \pmatrix{0&-1\\-1&0} = 0^2 - (-1)^2 = -1,
$$
which agrees with the result of plugging $x = 0$ into $x^{2-2}(x^2 - 1) = x^2 - 1$, since $0^2 - 1 = -1$. For the case of $n > 2$, we see that $x = 0$ leads to a second row of zeros, which means that the determinant of $M$ is zero. This agrees with the result $x^{n-2}(x^2 - 1) = 0^{n-2}(0^2 - 1) = 0$.

One fast approach is to use the W-A (AKA Sylvester) identity. This matrix can be written as $M = xI + AB$, where
$$
A = \pmatrix{1&0\\0&0\\ \vdots & \vdots \\ 0&0\\0&1}, \quad B = -\pmatrix{0&0&\cdots & 0& 1\\1 & 0 & \cdots & 0 & 0}.
$$
For all $x \neq 0$, we have
$$
\begin{align}
\det(M) &= \det(xI_n + AB) = x^n \det(I_n + x^{-1}AB)
\\ &  = x^n \det(I_2 + x^{-1}BA)
\\ & = x^{n-2} \det(x I_2 + BA) = x^{n-2} \det \pmatrix{x & -1\\-1 & x}
= x^{n-2} (x^2 - 1).
\end{align}
$$


问:
Derivative of $\frac{\cos t-\sin t}{\cos t+\sin t}$ without qoutient rule
I'm trying to find derivative of  $\frac{\cos t-\sin t}{\cos t+\sin t}$ in a different way: there is a trick to find derivative of the form $\frac{ax+b}{cx+d}$:
$$\left(\frac{ax+b}{cx+d}\right)'=\frac{ad-bc}{(cx+d)^2}$$
I'm trying to use it for taking derivative of $\frac{\cos t-\sin t}{\cos t+\sin t}$ too. the result of  is $\frac{-2}{(\cos t+\sin t)^2}$. but I don't know how to use this method for the function

答: Instead of trying to get the derivative of $f=\frac{\cos-\sin}{\cos+\sin}$, try to get the derivative of $f^2$. This way you have that $$f^2(t)=\dfrac{-2\sin(t)\cos(t)+1}{2\sin(t)\cos(t)+1}.$$ Now you can apply the trick by taking $a=-2$, $b=d=1$, $c=2$ and $x=\sin(t)\cos(t)$ in order to get $(f^2)'$. Then just apply the chain rule and solve for $f'$.


问:
Does $A\vDash B$? where $B$ has free variables?

Let $B(\cdot), T(\cdot)$ and $M(\cdot , \cdot)$ be relational symbols in some first-order language. Let:

$A(x,y) := (\forall x(B(x)\to T(x))) \land (\forall x \forall y(M(x,y)\to (T(x)\to T(y)))\land M(x,y)$

$B(x,y) :=  \lnot T(y)\to \lnot B(x) $

Does $A\vDash B$?

Where $\vDash$ is defined as $\vDash_{t}$, i.e. $\Gamma\vDash_{t} A$ iff any model and valuation $M,\nu$ that satisfy $\Gamma$ also satisfy $A$.

How should I approach this kind of question?

I tried using deduction theorem to check if $A\to B$  is valid, but this got out of hand fairly quickly.

If I were to try disproving this statement, I could have come up with an interpretation $M$ s.t. $M\vDash A$ but $M \not \vDash B$. But I can't think of (an intuitive) one.

A naive attmept: Since $x,y$ occur as free variables in some of these expressions, it seems like I could "eliminate" the $\forall$ quantifiers (since they already allow any particular valuation $\nu$ of $x,y$). In this case, if the set $\Gamma = \lbrace B(x)\to T(x) , M(x,y)\to (T(x)\to T(y)), M(x,y), \lnot T(y) \rbrace$ is satisfied by $M,\nu$, then (again, after using deduction thm.) it also holds that $M,\nu\vDash \lnot B(x)$. But I don't know if (and how) I can justify eliminating the quantifiers in $A$. If anything, it goes against GEN inference rule in Hilbert's Calculus, and I should have introduced some Skolem constants or functions.

答:
I believe that you can use a standard semantic argument for this.

Suppose that $M \models A$, and let $m_1, m_2 \in M$ be such that $M \models A(m_1,m_2)$. We want to show that $M\models B(m_1,m_2)$, i.e. $M\models ¬T(m_2)→¬B(m_1)$.

Indeed, suppose that $M \models ¬T(m_2)$. Since $M \models ∀x∀y(M(x,y)→(T(x)→T(y))$ and $M \models M(m_1,m_2)$ we obtain that $M \models T(m_1)→T(m_2)$. From our assumption this implies that $M \models \lnot T(m_1)$. Finally since $M \models ∀x(B(x)→T(x))$, we have that $M \models \lnot B(m_1)$ from the previous result. Putting all this together, we have that $M \models ¬T(m_2)→¬B(m_1)$, i.e. $M \models B(m_1,m_2)$ proving our claim.


答: Here’s an alternate proof that avoids trigonometry and establishes a neat bonus result that the circle ACDE is orthogonal to the second circle.

Title: Chord in Orthogonal Circles

Body:
Two orthogonal circles with centres $A$ and $B$ have a common chord which meets $AB$ at $C$. $DE$ is a chord of the first circle that passes through $B$. Prove that $A,D,E,$ and $C$ are concyclic.

I have attempted this question using angles in the alternate segment, and properties of cyclic quadrilaterals including Ptolemy's Theorem, but cannot proceed to a proof. Any help would be appreciated.


答:
Hint

Observe, by circle theorems or other methods that:
$$\bigtriangleup ADB \; \sim \; \bigtriangleup ECB$$

If the opposite angles add up to $180°$ in a quadrilateral, it is sufficient to conclude that it is cyclic.

For example, in the figure, let $\measuredangle CEB=\alpha$, then, $\measuredangle CED=180°-\alpha$ and $\measuredangle DAB + \measuredangle CED=180°$, confirming the $ADEC$ is cyclic.

Title: Chord in Orthogonal Circles


问:
Entropy with Markov Process
Can somebody please explain or help me reach an answer to this. I plainly don't know where to start. Sorry for not providing my work because am just confused on what to do. If somebody can please provide explanation with steps in order to understand, would be really appreciate it.

答:
Conditional on $X_n = a$, the distribution of $X_{n+1}$ is $a$ with probability $0.7$ and $b$ with probability $0.3$.  Therefore the conditional entropy is
$$
H(X_{n+1} | X_n = a) = -0.7 \log(0.7) - 0.3 \log(0.3) \approx 0.611.
$$
You can do a similar calculation for $H(X_{n+1} | X_n = b)$.  Finally, the definition of $H(X_{n+1} | X_n)$ is
\begin{align*}
&\mathbb{P}(X_n = a) H(X_{n+1} | X_n = a) + \mathbb{P}(X_n = b) H(X_{n+1} | X_n = b) \\
= \ &0.4 H(X_{n+1} | X_n = a) + 0.6 H(X_{n+1} | X_n = b)
\end{align*}

Title: Entropy with Markov Process


问:
period of a function $\lvert\sin x\rvert+\lvert\cos x\rvert$
I have read that $$y=\lvert\sin x\rvert+ \lvert\cos x\rvert $$ is periodic with fundamental period $\frac{\pi}{2}$.

But Wolfram says it is periodic with period $\pi$.

Please tell what is correct.

答: If you look at the graphs you can see the difference. what is a fundamental period?

ContentLicense: CC BY-SA 3.0


问:
Using AM-GM to find the minimum

Find the minimum value of $\dfrac{7x^{2} - 2xy + 3y^{2}}{x^{2} - y^{2}}$ if $x$ and $y$ are positive real numbers such that $x > y$.

This is a question from the 22nd Philippine Mathematical Olympiad. I have no idea how to solve this. I am curious as to how it was solved. Can anyone help me, please?

Update: I found a solution here and it looks like it is longer than expected.

答:
$$\dfrac{7x^{2} - 2xy + 3y^{2}}{x^{2} - y^{2}}
\implies \dfrac{4 x}{x - y} + \dfrac{6 x}{x + y} - 3$$

I'm not sure this will help you but, heuristically, the minimum for $x,y>0$ always occurs when $x\approx 10y \longrightarrow min\approx 6.898989899 \quad $ If you start with any $y\in\mathbb{N}$ and step down from $10y$, you will find the minimum $x$ to begin with or you will find a point where $f(10y-n,y)$ is greater than $f(10y-(n-1),y).\quad$ At this point, the latter is the minimum $f(x,y)$.

Title: Using AM-GM to find the minimum


问:
Expected value of condtional expected value
Consider Brownian motion $W=\{W(t)\}$ with its natural filtration $\{F(t)\}$, $t \in [0,T]$
Furthermore consider the process $X=\{X(t)\}$ is $F(t_{k-1})$ measurable with $0=t_0<t_1<.....<t_n=T$, where $X(t)=X_k$ for $t \in [t_{k-1},t_k]$ and $k=1,..,n$. Why can I state the following:

$$\mathbb{E}\left[X_k \left(W(t_k)-W(t_{k-1})\right)^2\right]= \mathbb{E}\left[X_k \mathbb{E}\left[(W(t_k)-W(t_{k-1}))^2| F(t_{k-1})\right]\right] $$

What theorem do I use to insert the extra cond. expectation?

答:
It is a theorem known as the law of total expectation that, for a probability space $(\Omega,\mathcal{F},\mathbb{P})$, for any sub-sigma algebras $\mathcal{G_1} \subseteq \mathcal{G_2} \subseteq \mathcal{F}$, you have
$$ \mathbb {E} [\mathbb{E} [X\mid {\mathcal {G}}_{2}]\mid {\mathcal {G}}_{1}]=\mathbb{E} [X\mid {\mathcal {G}}_{1}]\quad {\text{(a.s.)}}$$
(the proof is in the linked article)

In your case, you just have to apply it for $\mathcal{G_1} =\sigma(\Omega) = \{\varnothing, \Omega \} $ and $\mathcal{G_2} = F(t_{k-1})$ to get your result.


问:
Unit Vector of a Sphere Not Centered at Origin in Cartesian Coordinates
I have the equation $(x-2)^2+(y-1)^2+z^2=25$, and I want to find a normal to this surface (pointing outwards), at the point $(-2,4,0)$.

I tried using the gradient, but that seems to give me a vector that would work for a sphere centered at the origin. I know that for a sphere centered at the origin, the normal vector at a point on the surface is just the coordinates of that point, but the centering of the sphere is what is throwing me off here.

答:
You can answer this question by thinking about the geometry; no need for gradients.

Translate the sphere back to the origin, along with the point on it you care about. The normal vector there will be the same as the normal vector to the original sphere at the original point.


答: Hint: Note that $\sin(x+\pi/2) = \cos(x)$ and $\cos(x+\pi/2)=-\sin(x)$.

Title: period of a function $\lvert\sin x\rvert+\lvert\cos x\rvert$

Body:
I have read that $$y=\lvert\sin x\rvert+ \lvert\cos x\rvert $$ is periodic with fundamental period $\frac{\pi}{2}$.

But Wolfram says it is periodic with period $\pi$.

Please tell what is correct.


问:
Number of combinations with small intersection
I have set $S$ of $n$ elements. I want to understand, in how many ways can I choose $n/2$ elements - let each such choice be set $S_i$ - such that no two choices have more than $n/4$ elements in common i.e $|S_i\cap S_j|\leq n/4$.
I have been thinking about it and I think that it should be (polynomial) function in $n$ - for $n=4$, it is $6$, for $n=8$, I could write $10$ ways, but I don't have an expression for general growth. Any approach on how to proceed would appreciated.

答:
What you are looing for is known in the literature as a constant weight binary bode with length $n$, weight $n/2$ and distance $n/2$, if you interpret your subsets as binary vectors of length $n$.

One type of such code is constructed by taking a Hadamard matrix of order $n$, ignoring the row of all ones, and for each of the remaining $n-1$ rows, including two subsets: one corresponding to the locations of the $+1$'s, and the other for the locations of the $-1$'s. This shows that as long as a Hadamard matrix of order $n$ exists, then you can get $2n-2$ subsets. This confirms what you found for $n=4$. When $n=8$, you can get $14$ subsets: take the list of seven subset below, together with their complements.

```<code>(1, 2, 3, 4),
(1, 2, 5, 6), (1, 3, 5, 7), (1, 4, 5, 8)
(1, 2, 7, 8), (1, 3, 6, 8), (1, 4, 6, 7)
</code>```

It is conjectured that there exists a Hadamard matrix of order $n$ whenever $n$ is a multiple of $4$. This conjecture has been confirmed for all but $13$ possible orders up to $2000$. Furthermore, I do not know if these Hadamard matrix based codes are optimal. According to this table of optimal constant weight binary codes, the optimal constant weight codes with parameters $(n,n/2,n/2)$ are indeed achieved by the Hadamard construction for $n\le 32$.

Body:
What you are looing for is known in the literature as a constant weight binary bode with length $n$, weight $n/2$ and distance $n/2$, if you interpret your subsets as binary vectors of length $n$.

One type of such code is constructed by taking a Hadamard matrix of order $n$, ignoring the row of all ones, and for each of the remaining $n-1$ rows, including two subsets: one corresponding to the locations of the $+1$'s, and the other for the locations of the $-1$'s. This shows that as long as a Hadamard matrix of order $n$ exists, then you can get $2n-2$ subsets. This confirms what you found for $n=4$. When $n=8$, you can get $14$ subsets: take the list of seven subset below, together with their complements.

(1, 2, 3, 4),
(1, 2, 5, 6), (1, 3, 5, 7), (1, 4, 5, 8)
(1, 2, 7, 8), (1, 3, 6, 8), (1, 4, 6, 7)

It is conjectured that there exists a Hadamard matrix of order $n$ whenever $n$ is a multiple of $4$. This conjecture has been confirmed for all but $13$ possible orders up to $2000$. Furthermore, I do not know if these Hadamard matrix based codes are optimal. According to this table of optimal constant weight binary codes, the optimal constant weight codes with parameters $(n,n/2,n/2)$ are indeed achieved by the Hadamard construction for $n\le 32$.


问:
Why can one make a second-order ODE to first-order for ode45?
Why can one make a second-order ODE to first-order for ode45?

Such as in these examples:

https://www.sharetechnote.com/html/Octave_Matlab_DifferentialEquation.html

E.g.

$$m \frac{d^2x}{dt^2}+kx=0$$

turns into

$y_1=x$

$y_2=\frac{dy_1}{dt}=\frac{dx_1}{dt}$

答:
Given a differential equation of the form

$$\frac{d^nx}{dt^n} = f\left(t, x(t), \frac{dx}{dt}, \frac{d^2x}{dt^2}, \ldots, \frac{d^{n-1}x}{dt^{n-1}} \right)$$

One can define the variables

$$\mathbf{y} = \begin{bmatrix} y_1 \\ y_2\\ y_3 \\ \vdots \\ y_n \end{bmatrix} = \begin{bmatrix} x \\ \frac{dx}{dt}\\ \frac{d^2x}{dt^2}\\ \vdots \\ \frac{d^{n-1}x}{dt^{n-1}}\end{bmatrix}$$

which give the first order system $\mathbf{y}'=\mathbf{F}(t,\mathbf{y}(t))$ whose solution can be approximated using ode45 (or an array of other solvers such as any Runge–Kutta method):

$$\mathbf{y}'= \begin{bmatrix} y_1' \\ y_2'\\ y_3' \\ \vdots \\ y_n' \end{bmatrix}= \begin{bmatrix} \frac{dx}{dt}\\ \frac{d^2x}{dt^2}\\ \frac{d^3x}{dt^3}\\\vdots \\ \frac{d^{n}x}{dt^{n}}\end{bmatrix} = \begin{bmatrix} y_2 \\ y_3\\ y_4 \\ \vdots \\ f \end{bmatrix} =: \mathbf{F} $$

The first coordinate of the solution $\mathbf{y}$ to this equation, $(x(t))$, is  a solution to the original differential equation, which can be seen by repeated substitution

$$f = y_n' = (y_{n-1}')' = \ldots = \frac{d^{n}y_1}{dt^{n}} = \frac{d^{n}x}{dt^{n}}$$

in this case, $n=2$ and $f = -\frac{k}{m}x$.


问:
$L^2$ convergence of product of $L^2$ random variables
Assume $X_n\to X$ in $L^2$ and $Y_n\to Y$ in $L^2$ and further $X_nY_n\in L^2$. Does this imply $XY\in L^2$?

Hoelder of course gives $XY\in L^1$ and we can also conclude $X_nY_n\to XY$ in $L^1$. This does not use the assumption $X_nY_n\in L^2$. Is this assumption enough to conclude $XY\in L^2$? What additional assumptions might be sufficient?

Additionally being dominated, i.e. $|X_nY_n|\leq Z$ for another $L^2$ random variable $Z$, should be enough using dominated convergence. This assumption is however quite strong.

I may be able to assume that $Y$ has a normal distribution with $0$ mean. Does this help?

答:
A simple probabilistic assumption you could add, although rather strong, is the independence of $XY$. This immediately gives $\|XY\|_2 = \|X\|_2 \|Y\|_2 < \infty$.

Another thing you can assume is that $\sup_n \| X_nY_n\|_2$ is finite. The $L^2$ boundedness of $X_nY_n$ implies that a subsequence converges weakly in $L^2$. Therefore its weak limit is some element of $L^2$. But a weak $L^1$ limit is also the weak $L^2$ limit which is unique, and hence $XY$ is in $L^2$.

Regarding if $Y$ being normal can help (and my probability theory is rusty, so do read this paragraph with a careful eye); I think it is just shy of helping. What you can get from Hölder's inequality is that $\|XY\|_{L^p} \le \|X\|_{L^2}\|Y\|_{L^q}$ for any $p,q\in[1,\infty]$ such that $\frac1p = \frac12 + \frac1q$. In order to push all the way to $p=2$, one needs to use $q=\infty$ but a normal r.v. is not a.s. bounded. However, it has finite moments of all (finite) orders, which gives $XY\in L^p$ for all $p$ strictly larger than $2$. Alternatively, if you also have that $X\in L^r$ for some $r\in(2,\infty]$, then getting $p=2$ is possible since $\frac12 = \frac1r+\frac1p$ has the solution $\frac1p:=\frac12-\frac1r\in(0,1]$.

The result is not true without further assumptions. Let $X_n=Y_n = \min(|f|,n)$ where $f$ is in $L^2$ and not in $L^4$. Then $X_nY_n$ belongs to $L^\infty$ and hence all $L^p$, but the ($L^1$) limit is $|f|^2$ which is in $L^1$ and not $L^2$.

A concrete example of the above would be $f(x)=x^{-1/4}$ on $[0,1]$ with uniform measure.


答:
The center of the sphere is $(2, 1, 0)$.

The normal is the vector that joins $(-2,4,0)$ to the center, that is $(-4,3,0)$.

If you want the unit normal, then it is $\left(-\frac{4}{5},\frac{3}{5},0\right)$.

$$...$$

Title: Unit Vector of a Sphere Not Centered at Origin in Cartesian Coordinates

Body:
I have the equation $(x-2)^2+(y-1)^2+z^2=25$, and I want to find a normal to this surface (pointing outwards), at the point $(-2,4,0)$.

I tried using the gradient, but that seems to give me a vector that would work for a sphere centered at the origin. I know that for a sphere centered at the origin, the normal vector at a point on the surface is just the coordinates of that point, but the centering of the sphere is what is throwing me off here.


问:
Inverse of Borel function
I am studying Simon & Reed's Methods of Modern Mathematical Physics, Volume 1, Functional Analysis.

In chapter 1, exercise 14, it is asked to show that if $f$ is a Borel function, then $f^{-1}(B) \in \mathcal{B}$ for any $B \in \mathcal{B}$. Simon & Reed define Borel sets and Borel functions in the following way:

The Borel sets of $\mathbb{R}$, $\mathcal{B}$, is the smallest family of subsets of $\mathbb{R}$ with the following properties:

The family is closed under complements.

The family is closed under countable unions.

The family contains each open interval.

A function $f$ is called a Borel function if and only if $f^{-1}[(a,b)]$ is a Borel set for all $a,b$.

This is my first introduction to the subject and I am not that comfortable with that. I feel this should not be too hard but at the same time, I have no idea how to do this. Any help would be much appreciated.

答:
This argument is the kind of thing one usually learns in a first graduate-level measure theory course.  I'll outline it and let you fill in the details.

We're given that $f^{-1}(I)$ is a Borel set whenever $I$ is an open interval, and we want to show that $f^{-1}(B)$ is a Borel set whenever $B$ is an arbitrary Borel set.  So let us define $\mathcal{F}$ to be the family of all subsets $E \subseteq \mathbb{R}$ such that $f^{-1}(E)$ is Borel.  Since the family of Borel sets is defined to be the smallest family satisfying conditions 1,2,3, if we show that $\mathcal{F}$ also satisfies 1,2,3 then it will follow that $\mathcal{B} \subseteq \mathcal{F}$, which is what we want.

That $\mathcal{F}$ satisfies condition 3 is exactly the assumption on our function $f$.  I will leave it to you to verify that $\mathcal{F}$ also satisfies 1 and 2.

Title: Inverse of Borel function


问:
Fundamental perspectives on subtraction and if how it is viewed/applied changes based on other context
A common error in reasoning is the off by one error which I found that has a more "formal" name as "Fence post error".

The error is that if we do e.g. $11 - 8$ while subtraction gives $3$ in the context of where we try to count items including $8$ the correct answer is actually $4$ i.e. $N - i + 1$.

E.g. clean floors $8$ to $11$ that is $4$ floors and not $3$.

I have been bitten by this error occasionally and I am always curious how these logical falacies arise in the thought process. So looking online I found this post which I first thought seemed not to make sense to me: How to avoid fence post error

Basically it states:

Subtraction is a span between numbers, not a count. The equation 11 - 8 = 3 means there are 3 "spans" between 8 and 11, but four numbers in that range! A span is a distance measure, like time from 8am and 11am (3 hours) or the distance between 8 and 11 inches (3 inches).

To me this whole explanation seemed weird at first reading and wrong. Because the core of the problem is when we say $11 - 8$ we mean that $8$ is removed too exactly like you have $11$ apples and remove $8$ to end up with $3$ which you can count (apple $9th$, $10th$ and $11th$).

But then I thought may be there is something about the basic operation of subtraction that escapes me and this post might be alluding to something I am not getting.

Are there multiple perspectives of what is subtraction fundamentally and if it is related to the context of counting or something different changes?

答:
Interesting view as a span. This works basically for natural numbers.

Another view is to consider subtraction as a derived operation from addition if you consider the set of integers, i.e.,

$x + y = x + (-y)$

such has $11 - 8 = 11 + (-8)$,
where the right-hand side is the addition of $x$ and the additive inverse of $y$.


问:
convex and unbounded implies increasing?
Suppose $f(x)$ is a positive continuous  function on $(-\infty,\infty)$, symmetric about $0$. Let $f(x)$ is convex and $\lim_{x \rightarrow \infty} f(x) = \infty$. Can we say that $f(x)$ has to be increasing?
I was trying to use the Taylor's theorem upto second order term but nothing is mentioned regarding the differentiability of $f(x)$. Can anyone help?

答:
Yes, $f$ is necessarily increasing on $[0,\infty)$.
Let $0\leq x<y$. By assumption we have $f(-y)=f(y)$ and hence by convexity: $$f(x)=f(\lambda(-y)+(1-\lambda) y)\leq \lambda f(-y)+(1-\lambda)f(y)=f(y)$$
For $\lambda=\frac{y-x}{2y}$.

Note that we didn't need the assumption $\lim_{x\to\infty}f(x)=\infty$. In fact if we just assume $f$ to be non-constant, it will already follow that $\lim_{x\to\infty}f(x)=\infty$


答: Gradients can obtain normals for not only arbitrarily centred spheres, but arbitrary surfaces for which the gradient is defined. Since $f(x,\,y,\,z)=c$ implies $\nabla f\cdot dx=df=0$, the normal to $f=c$ is in direction of $\nabla f$, thereby orthogonal to each $dx$ in the surface. In this case, the normal is proportional to $-8\vec{i}+6\vec{j}$, so the choices of unit normal are $\mp\tfrac45\vec{i}\pm\tfrac35\vec{j}$.


问:
Show that $\lim_{n \to \infty}(b_1b_2...b_n)^{\frac{1}{n}}=b$
Let $b_n>0$ with the following property: $\lim_{n \to \infty}b_n=b>0$.

Show that $\lim_{n \to \infty}(b_1b_2...b_n)^{\frac{1}{n}}=b$.

I have an idea and at one moment of the proof i'm stuck. I would like to know if my idea holds and how to finish it (if it works), please.

As $(b_n)$ converges to $b$, we have by definition of convergent sequence that:

$\forall \varepsilon>0 \ \exists N>0 \ \forall n\ge N$: $|b_n-b|<\varepsilon \iff |b_n|<\varepsilon+b$.

We want to show that: $\forall \varepsilon>0 \ \exists N'>0 \ \forall n\ge N'$: $|(b_1b_2...b_n)^{\frac{1}{n}}-b|<\varepsilon \iff |b_1b_2...b_n|<(\varepsilon+b)^{n}$.

But,

$|b_1b_2...b_n|=|b_1b_2...b_N...b_n|=|b_1b_2...b_{N-1}|\cdot|b_N...b_n|<|b_1b_2...b_{N-1}|\cdot
(\varepsilon+b)^{n-N+1}$

After this step i'm really stuck and don't know how to continue if it is possible. I tried as well to bound $|b_1b_2...b_{N-1}|$ by $M^{N-1}$ with $M=\max\{x_k:1\le k\le N-1\}$ but as it doesn't tend to $0$ i can't to anything using it...

P.S I know that there are some posts on this problem, but i would like to know if my approach works and if not to understand why (or have corrections). Thanks in advance for help!

答:
Proceeding as you began, given $0 < \epsilon < b$, there exists $N \in \mathbb{N}$ such that for all $n \geqslant  N$ we have

$$(b_1b_2\cdots b_N)(b -\epsilon)^{n-N+1} < (b_1b_2\cdots b_n) < (b_1b_2\cdots b_N)(b +\epsilon)^{n-N+1},$$

and, hence,

$$(b_1b_2\cdots b_N)^{\frac1{n}}(b -\epsilon)^{1-\frac{N}{n}+\frac{1}{n}} < (b_1b_2\cdots b_n)^{\frac{1}{n}} < (b_1b_2\cdots b_N)^{\frac1{n}}(b +\epsilon)^{1-\frac{N}{n}+\frac{1}{n}}$$

Holding $N$ fixed, we have

$$\lim_{n \to \infty}(b_1b_2\cdots b_N)^{\frac1{n}}(b \pm\epsilon)^{1-\frac{N}{n}+\frac{1}{n}}=1\cdot (b \pm \epsilon)$$

Thus

$$b-\epsilon <\liminf_{n \to \infty}(b_1b_2\cdots b_n)^{\frac{1}{n}} \leqslant \limsup_{n\to \infty}(b_1b_2\cdots b_n)^{\frac{1}{n}}  < b + \epsilon $$

Since $\epsilon$ can be arbitrarily close to $0$, it follows that

$$b=\liminf_{n \to \infty}(b_1b_2\cdots b_n)^{\frac{1}{n}} = \limsup_{n\to \infty}(b_1b_2\cdots b_n)^{\frac{1}{n}}   $$

Equality of the $\limsup$ and $\liminf$ implies that the limit exists and

$$b=\lim_{n \to \infty}(b_1b_2\cdots b_n)^{\frac{1}{n}}$$


问:
Does constant rank level set theorem imply regular level set theorem?
This might be a stupid question. The constant rank level set theorem says that if I have a smooth map $f:M\to N$ and a regular point $p\in N$, then if on $U_p$ the rank of the differential is constant, then the preimage of $p$ is a submanifold. The regular level set theorem only demands that the differential with respect to the preimages of $p$ is surjective. For the constant rank level set theorem to imply regular level set theorem, I need to know the surjectivity on the point $p$ implies the constant rank on some neighborhood of $p$. But I think this is not generally true. I'd appreciate any help!

答:
Suppose $q\in M$ is a preimage of $p$ and thtat the map at $q$ has maximal rank. You can then find charts $V\subset M$ and $U\subset N$ such that $f(U)\subset V$ (because $f$ is smooth).

Consider now $g$ to be $f$ in the coordinates given by these charts, say $g = (g_1..., g_n)$. The rank of $f$ is the same as the rank of $g$ and the latter one can be computed in the Jacobian: $Dg = \left(\dfrac{dg_i}{dx_j}\right)$. That the rank is maximal it means that you can find a subdeterminant of maximal size (the biggest of the matrix dimensions) that does not vanish.

Notice that if you were working with a smaller rank, and not the maximal rank, that you can find a subdeterminant of the appropiate size that does not vanish is still true, but not equivalent to your matrix having that given rank since nothing assures you there is not a bigger subdeterminant which also doesnt vanish. That is, the rank might jump up. This of course doesnt occur with maximal rank since no bigger determinant can be found.

Since the determinant of this subsquare matrix is a polynomial in the $\dfrac{dg_i}{dx_j}$, the condition of it not vanishing is an open condition. That is, there is a neighborgood $U_q$ around $q$ such that the rank is constant since it is the maximal possible rank. Varying $q$ on the fiber of $p$, and making a union over all the previous neighborhoods $U_q$, implies that indeed there is an open neighborhood around it such that the rank is constant there and now you can apply the constant rank theorem to conclude the preimage is actually a regular submanifold.


问:
Pattern for all the binary chains divisible by 5
For instance, $x = 101$ is divisible by $5$ because it is the integer 5. Same thing for $x=1111$ is also divisible by 5 as it is the integer 15. However, $x=1100$ is not divisible by $5$ as it is the integer 12.

Is there a pattern the recognise the binary chains divisible by 5?

答:
For example, for $1000$ decimal, represent it as $1111101000$. In base $4$, this is $33220$ (just group pairs of digits together; if there were an odd number of digits then add a $0$ at the front).

Then $3+2+0$ (the sum of the odd-position digits) and $3+2$ (the sum of the even-position digits) are equal, so the number is divisible by 5. This works in general in base $b$ if we are testing for divisibility by $b+1$. To see that, write
$$n = \sum_{i=0}^k a_ib^i,$$
where $0\le a_i < b$; then
$$(b+1)n = \sum_{i=0}^k a_ib^{i+1} + \sum_{i=0}^k a_ib^i
= \sum_{i=1}^{k+1}a_{i-1}b^i + \sum_{i=0}^k a_ib^i
= a_0b^0 + \sum_{i=1}^{k-1} (a_{i-1} + a_i)b^i + a_kb^{k+1}.$$
From this it is easy to see that the sum of the odd-position digits and the sum of the even-position digits are equal.


问:
The point of intersection of tangents of a circle and the circumcircle formed by the points of contact and the center of the original circle.
I just wanted to know how this result is derived.

Let there be a circle whose equation is $x^2+y^2=a^2$. Let there be a chord PQ. If we draw the tangents from points P and Q they will intersect at a point (say, T). Now if we construct the circumcircle of the triangle OPQ ( O being the center of the initial circle), then Why is it so that T lies on the circumcircle of the triangle OPQ?
I have already tested this result several times but can't figure out the derivation...

答:
Short answer:

The circumference centered at $T$ with radius $TP$ is orthogonal to the circumference centered at $O$ with radius $OP$.

Long answer:

Let me first recall this very elemental geometry Theorem: Let $C$ be a circumference and let $P$, $Q$ and $R$ be points in $C$ with $P$ and $Q$ diametrically opposite. Then the angle $\angle{PRQ}=90^º.$

With this being said, in your problem, the angle $\angle{OPT}=90^º$ (by the way you defined $T$).
By the Theorem, $O$, $T$ and $P$ are in a circumference ($C_1$) where $OT$ is a diameter. By the same reasoning, the $\angle{OQT}=90^º$ and therefore $O$, $T$ and $Q$ are in a circumference ($C_2$) where $OT$ is a diameter. Finally, since $C_1$ and $C_2$ contain $O$ and $T$ and have the same diameter, then $C_1$ and $C_2$ are the same. Therefore $O$, $P$, $T$, and $Q$ lay on the same circumference.

Note: This is very related to the concept of ''power of a point resect to a circumference''. Check https://en.wikipedia.org/wiki/Power_of_a_point for some interesting information about it.


问:
number of interesting divisors of $9!$

We call natural number $a$, "interesting" if natural numbers $x,y$
(not necessary distinct) exist so that $a=x^2y^3$. how many
interesting divisors the number $9!$ has?

To avoid calculations errors question brings this hint: "sum of the digits of the answer is divisible by $10$."

Here is my work:

for $x=y=1$ we have $a=1$ so it is one of the number we are looking for. also we know that  $9!=2^7\times3^4\times5\times7$, from this, we can conclude that $x$ and $y$ can't be $5$ or $7$ (because their exponent is $1$) so we should working on $2^7\times3^4$ and (also should considering $1$).

I don't know how to continue from here. I tried counting all the answers but my result is $16$ which is wrong. (maybe I missed some cases and answer should be $19$ according to the hint)

EDIT:

I got these answers:

$$x=2 , y=1,3$$
$$x=4 , y=1,3$$
$$x=8, y=1,3$$
$$x=3, y=1,2,4$$
$$x=9,y=1,2,4$$
$$x=1, y=1,2,3,4$$

答:
This question is trickier than it appears. There are $28$ interesting divisors. Rather than work everything out in detail, I will give sufficient hints so that you can enjoy the hunt.

$x$ can be selected from $1,2,3,4,6,8,9,12,18,24,36$. For each $x$, there are one or more possible values of $y$, including $1$. I leave it to you to discover each possibility. When you count up all the possibilities, you will find $32$ combinations of $(x,y)$ that are permitted.

Here's the tricky part: three of the divisors $(64,576,1728)$ can be arrived at in more than one way; when you remove duplicates, you are left with the $28$ interesting divisors. If you have trouble finding them after these hints, ask in a comment for the list and I will put it in the answer by an edit.

Title: number of interesting divisors of $9!$


问:
Calculate the area on a sphere of the intersection of two spherical caps
Given a sphere of radius $r$ with two spherical caps on it defined by the radii ($a_1$ and $a_2$) of the bases of the spherical caps, given a separation of the two spherical caps by angle $\theta$, how do you calculate the surface area of that intersection?

To clarify, the area is that of the curved surface on the sphere defined by the intersection. At the extreme where both $a_1,a_2 = r$, we would be describing a spherical lune.

Alternatively define the spherical caps by the angles
$\Phi_1 = \arcsin(a_1/r)$ and $\Phi_2 = \arcsin(a_2/r)$.

答:
Introduction

This problem was recently brought to my attention and requested to make a contribution. I will answer this question in 4 different ways. I will also numerically compare the solutions via Python code, and I will provide some 2D and 3D graphics to help illustrate the concepts.

The paper by Tovchigrechko and Vakser (TV) (mentioned and linked in another entry) describes the solution geometrically and is similar to Christian Blatter’s solution, and it is similar to the spherical trigonometry approach shown in this entry. One note about the TV paper: their cap radii are measured along the surface of the sphere unlike the OP’s request to be straight-line distances constrained to the plane of the cap’s base.

Solution

Here are the steps to solve the intersection problem (all angles are in radians throughout this entry; for more context about the givens see the OP and Figure 1 (r is the radius, a1 and a2 are straight line distances, and $\theta$ is an angular separation)). We will assume each cap has the hemisphere as its limiting case; also, as noted in other entries, we are assuming an intersection occurs where neither cap is completely contained within the other:

Figure 1: 3D graph showing the givens.

$\text{Given a1, a2, r, and }\theta:$

$\text{let a}=\sin ^{-1}\left(\text{a1}/r\right),$

$\text{b}=\sin ^{-1}\left(\text{a2}/r\right),$

$\text{c}=\theta,$

$s=\frac{1}{2} (a+b+c),$

$k=\sqrt{\frac{\sin  (s-a) \sin  (s-b) \sin  (s-c)}{\sin (s) }},$

$A=2 \tan ^{-1}\left(\frac{k}{\sin (s-a)}\right),$

$B=2 \tan ^{-1}\left(\frac{k}{\sin (s-b)}\right),$

$C=2 \tan ^{-1}\left(\frac{k}{\sin (s-c)}\right),$

$\Delta _1=r^2 (A+B+C-\pi ),$

$\Delta _2=r^2 (A+B+C-\pi ),$

$\mathcal{A}_{\text{s1}}=2 B r^2 (1-\cos (a) ),$

$\mathcal{A}_{\text{s2}}=2 A r^2 (1-\cos (b) )$

$$ \bbox[5px,border:2px solid red]
{
\mathcal{A}_{\cap }=\mathcal{A}_{\text{s1}}+\mathcal{A}_{\text{s2}}-\left(\Delta _1+\Delta _2\right)
}
$$

That’s the answer (this, and different spherical angle formulas, can also be used to derive variants of the formula including the one found in Tovchigrechko and Vakser). The rest of this entry just provides more context and explanation.

More Info

The following is equivalent to the above steps, and is the result found in the TV paper except the $r^2$ part (a1, a2, and $\theta$ are spherical distances, i.e., distances along the curved surface on the unit sphere; to make a1 and a2 above work here, convert them like so: t=arcsin(a1/r) and u=arcsin(a2/r)):

$2 r^2 (\pi$

$-\cos ^{-1}(\csc (\text{t}) \csc (\text{u}) \cos (\theta )-\cot (\text{t}) \cot (\text{u}))$

$-\cos ^{-1}(\csc (\text{t}) \cos (\text{u}) \csc (\theta )-\cot (\text{t}) \cot (\theta ))\cos (\text{t}) $

$-\cos ^{-1}(\cos (\text{t}) \csc (\text{u}) \csc (\theta )-\cot (\text{u}) \cot (\theta ))\cos (\text{u}) )$

Figure 2: Two examples of an intersection.

Figure 2a and 2b show an intersection of 2 spherical caps. Plane I and Plane II are the planar bases of their respective caps; the planes are used to help highlight the intersection, and they'll be used later to convert the problem into 2D. We'll use Figure 2a for the following discussion.

Figure 3: Spherical sectors.

Figure 3 shows the 2 separate spherical sectors, i.e., a red area and a cyan area. The summation of the red and cyan areas contains the intersection of the spherical caps, but notice the 2 spherical triangles that get included twice when adding the red area and the cyan area. The area of these 2 spherical triangles needs to be removed from the combined area of the 2 sectors. (In this context a and b have a radius component that needs to be divided out. In the intersection formula given above the radius component is removed by the time the sector area is computed, which is why the formulas in Figure 3 appear slightly different compared to $\mathcal{A}_{\text{s1}}$ and $\mathcal{A}_{\text{s2}}$ in the intersection formula.)

Figure 4: Spherical triangle close-up.

Figure 4 shows what’s involved to calculate the area of the 2 spherical triangles whose combined area must be removed from the combined area of the 2 spherical sectors.

The angles of the spherical triangle were calculated using the half-angle formulas for tangents (equations 27 and 34-38):

/SphericalTrigonometry

And the spherical triangle area formula appears here:

/SphericalTriangle

Both topics are at Wolfram's Mathworld, but I can't make these links because my account is limited to only 8 links at the moment.

Numerical Verification (or Additional Solutions)

Cartesian Coordinates

Next, we’ll look at comparing the formula with numerical integration over a region. Imagine rotating the objects in Figure 2 such that you are looking down the line where the planes intersect. The planes would then appear like lines. Here is a 2D version of what that looks like (the red lines suggest the continuation of the planes beyond the circle):

Figure 5: 2D perspective of an intersection.

In Figure 5, a1 and a2 are radii of their respective cap shown here for context (and the radius, r, is shown to avoid confusion with $\mathcal{R}$ of the region). The blue area is the 2D projected region where the caps intersect. We will rotate (i.e., change $\theta$, a given) one cap across the span of the other cap to test the area of several different intersections as the series of images in Figure 6a show. In 6b a few perspectives of the 2 intersecting caps are shown in relation to one of the regions. One reason for doing this sweep is to consider extreme points where we might encounter numerical instability.

Figure 6: Integration in Cartesian coordinates.

Figure 6c shows the concepts involved in computing the integral of the intersecting caps in Cartesian coordinates. The double integral, with respect to the function $r / \sqrt{r^2-x^2-y^2}$, is improper and likely for that reason it presented some problems for scipy. I was able to get it to work by changing the variables in both the double integral and single integral versions, but in the code I’ve chosen the single integral version as it makes the code a little easier to read. This corresponds with the set of integrals below the dashed horizontal line in Figure 6c, which applies to the inner integral the common technique of making the substitution $y=\lvert b\rvert \sin (\theta )$. The $\sin ^{-1}\left(\frac{\lvert \sqrt{r^2-x^2} \rvert}{\lvert \sqrt{r^2-x^2} \rvert}\right)$ can be reduced to $\pi /2$.

Monte-Carlo Integration

Next, a simple approximation of the integration will be setup for the purpose of being a guard rail for catching obvious errors that might be present. In particular, a Monte-Carlo integration will be used. Here we simply remove the integrand from the double integrals in Figure 6c and integrate the scalar constant of 1 over the same regions as shown in Figure 6d. If we trust the region definitions (i.e., if they’re simple) and if the functions are well behaved, then this presents a robust approach to compute the area; for these reasons it’s the approach I used to compute the region’s area needed in the Monte-Carlo function in the Python code example. We don’t need to multiply by 2 since this is the 2D region area, not the surface area on the sphere above and below the region. The value of this region area is multiplied by the average of the $r / \sqrt{r^2-x^2-y^2}$ evaluated at each point in a random set of points within the region, which yields the Monte-Carlo approximation of the surface above the region (multiply by 2 to include the area below the region).

Integration in Spherical Coordinates

The advantage in spherical coordinates is we’ll avoid an improper integral for the most part, but a disadvantage is the area formula will appear more complex. Here’s a parametric form of a spherical cap we can use to calculate its area (it was designed for this discussion and is not intended to be flexible enough for general use (the domain of $\phi$ will depend on the cap, but for this problem $\theta$ always runs from $-\pi \text{ to } \pi$)):

$x=r \cos (\phi )$

$y=r \sin (\phi ) \cos \left(\theta  f(\phi )\right)$

$z=r \sin (\phi ) \sin \left(\theta  f(\phi )\right)$

$\text{where} f(\phi )=\frac{1}{\pi}\tan ^{-1}\left(\frac{\sqrt{-(b\;+\;m\;r \cos (\phi ))^2\;+\;r^2 \left(-\cos ^2(\phi )\right)\;+\;r^2}}{b\;+\;m\;r \cos (\phi )}\right)$

$\text{and}-\pi \leq \theta \leq \pi$

Figure 7: Integration in spherical coordinates.

Figure 7a is a visualization showing how the point at (1,0,0) is transformed to a/the red arc along the spherical cap in accordance with the given parametric form. Multiplication of the matrices in Figure 7a yield the above parametric form. The $f(\phi )$ part; though cluttered, is just computing the intersection at the x-value of $\phi$ along the line of a spherical cap’s base (viewing it edgewise), and then projecting that intersection upwards and downwards onto the sphere, which then yields points along the red arc in Figure 7a with respect to $\theta$ as it sweeps across from $-\pi \text{ to } \pi$ between those 2 projections, and finally sweeping it across $\phi$ yields the cap’s surface. The images in Figure 7b were computed via the parametric form above and serve as a visual verification that the parametric form is correct.

The area of a parameterized surface is equal to the magnitude of infinitesimal tangent plane normals integrated over the region, i.e.:

$\underset{\mathcal{R}}{\int }\;\lvert\lvert \mathbb{T}_u\times \mathbb{T}_v\rvert\rvert \;du\;dv$

and in our context of having x, y and z given in terms of two parameters is equivalent to (this is how it is done in the Python code in the appendix):

$\underset{\mathcal{R}}{\int }\;\sqrt{\left[\frac{\partial (x,y)}{\partial (u,v)}\right]^2+\left[\frac{\partial (y,z)}{\partial (u,v)}\right]^2+\left[\frac{\partial (x,z)}{\partial (u,v)}\right]^2}\;du\;dv=\underset{\mathcal{R}}{\int }\;\sqrt{\left\lvert
\begin{array}{cc}
 \frac{\partial x}{\partial u} & \frac{\partial x}{\partial v} \\
 \frac{\partial y}{\partial u} & \frac{\partial y}{\partial v} \\
\end{array}
\right\rvert ^2+\left\lvert
\begin{array}{cc}
 \frac{\partial y}{\partial u} & \frac{\partial y}{\partial v} \\
 \frac{\partial z}{\partial u} & \frac{\partial z}{\partial v} \\
\end{array}
\right\rvert ^2+\left\lvert
\begin{array}{cc}
 \frac{\partial x}{\partial u} & \frac{\partial x}{\partial v} \\
 \frac{\partial z}{\partial u} & \frac{\partial z}{\partial v} \\
\end{array}
\right\rvert ^2}\;du\;dv$

(see section 7.4, Vector Calculus, 3ed. Jerrold E. Marsden and Anthony J. Tromba.)

(The use of u and v here instead of  $\phi$ and $\theta$ is just to avoid implicitly suggesting that the formula has something to do with angles.)

See Figure 7c for more details about the regions of integration for our parametric form.

Results

Figure 8: Test results.

Figure 8 shows the results of running calculations of the first formula presented (Main), integration in Cartesian coordinates (Cart.Coords), integration in spherical coordinates (Sph.Coords), integration via Monte-Carlo (M.Carlo), and via the formula found in Tovchigrechko and Vakser (TV) with the added radius aspect, and these are for various angles of separation for radius equal to 1/3, 1, and 3, along with a1 and a2 values. The nan results in the Monte-Carlo are likely just caused by not having enough sample points fall within the tiny region, but the Monte-Carlo was just there as a sanity check, so not a big deal if we’re missing some values.

Appendix

Code

```<code>import numpy as np
from numpy import cos, arcsin, arccos, sin, tan, arctan, arctan2
from numpy import sqrt, pi, array, dot
from scipy import integrate, optimize
from math import isinf

# Note: I don't follow a naming convention here. Also, no attempt at
# being efficient was made. The purpose is to use alternative approaches
# to find discrepancies with the main function, i.e., AreaOfCapsIntersection.

# Here is our main process for computing the area of
# intersecting spherical caps. a1 and a2 are the straight line
# distance of the radius of each cap's respective base. r is the sphere's
# radius. theta is the angular separation between the caps (in radians).
def AreaOfCapsIntersection(a1, a2, r, theta):
    a = arcsin(a1 / r)
    b = arcsin(a2 / r)
    c = theta
    s = (a + b + c) / 2
    k = sqrt((sin(s - a) * sin(s - b) * sin(s - c) / sin(s)))
    A = 2 * arctan(k / sin(s - a))
    B = 2 * arctan(k / sin(s - b))
    C = 2 * arctan(k / sin(s - c))
    T1 = r**2 * (A + B + C - pi)
    T2 = T1
    S1 = 2 * B * r**2 * (1 - cos(a))
    S2 = 2 * A * r**2 * (1 - cos(b))
    return S1 + S2 - (T1 + T2)

# This is from the Tovchigrechko and Vakser paper mentioned in another entry
# and modified to account for a radius other than 1. a1 and a2 have been
# adjusted to the distance on the sphere's surface by the calling code.
# Theta is also expected to be the angular separation of the 2 caps.
def TovchigrechkoAndVakser(a1, a2, r, theta):
    def csc(t):
        return 1 / sin(t)
    def cot(t):
        return 1 / tan(t)
    return r**2 * 2 * (pi
    - arccos(cos(theta) * csc(a1) * csc(a2) - cot(a1) * cot(a2))
    - arccos(cos(a2) * csc(theta) * csc(a1) - cot(theta) * cot(a1)) * cos(a1)
    - arccos(cos(a1) * csc(theta) * csc(a2) - cot(theta) * cot(a2)) * cos(a2))

# This will return the distance from the origin to the base of the
# spherical cap given its baseRadius and the sphere's radius.
def FindCapDistance(baseRadius, r):
    return abs(optimize.brentq(lambda h:
        sqrt(abs(baseRadius)**2 + abs(h)**2) - r, 0, 1000))

# Rotate a point about the origin
def Rotate(theta, x, y):
    c, s = cos(theta), sin(theta)
    R = [[c, -s],
         [s, c]]
    pt = array([x, y]).reshape(2, 1)
    return dot(R, pt).flatten()

# Find the angle that rotates [xFrom, yFrom] onto [xTo, yTo].
def FindRotation(xFrom, yFrom, xTo, yTo):
    u0, u1, v0, v1 = xFrom, yFrom, xTo, yTo
    return arctan2(u0 * v1 - u1 * v0, u0 * v0 + u1 * v1)

# Rescales x along the interval [a,b] to the interval [c,d].
def Rescale(x, a, b, c, d):
    return (-(b * c) + a * d + (c - d) * x) / (a - b)

# Given the vectors a=fromPt and b=toPt from the origin find a point
# along the vector a+t*(b-a) at parameter t where t will be rescaled
# as [fromPt[0], toPt[0]] to [0,1].
def PointAlongLine(fromPt, toPt, t):
    a, b = array(fromPt), array(toPt)
    return a + Rescale(t, a[0], b[0], 0, 1) * (b - a)

# Finds the point where two lines intersect. Each parameter is a 2D array.
def FindIntersectionOfLines(l1From, l1To, l2From, l2To):
    def f(x):
        pt1 = PointAlongLine(l1From, l1To, x[0])
        pt2 = PointAlongLine(l2From, l2To, x[0])
        # The 2-norm is the same thing as Euclidean distance in our context:
        return np.linalg.norm(pt1 - pt2)
    # Because we're rescaling t in a+t(b-a) to coincide with the bounds
    # both functions are evaluated at the same x, so we just need 1 dimension.
    x0 = array([0])
    # The function is well behaved, keep it simple, nelder-mead will be fine.
    r = optimize.minimize(f, x0, method='nelder-mead', options={'xatol': 1e-8})
    return PointAlongLine(l1From, l1To, r.x[0])

# Integrate in Cartesian coordiantes given the radius, r, the
# Cartesian 2D region start point (p11, p12), the intersecting
# point (p21, p22), and the end point (p31, p32). (See article for graphics.)
def IntegrateInCartesianCoordinates(r, p11, p12, p21, p22, p31, p32):
    r2 = r**2
    def commonIntegrand(a, b, x):
        d = sqrt(r2 - x**2)
        return r * (arcsin(b / d) - arcsin(a / d))
    def f(x):
        return PointAlongLine([p11, p12], [p21, p22], x)[1]
    def g(x):
        return PointAlongLine([p21, p22], [p31, p32], x)[1]
    areaType = 1 if p31 > p21 else (2 if p31 == p21 else 3)
    if areaType == 1:
        i1 = integrate.quad(lambda x:
            commonIntegrand(f(x), sqrt(r2 - x**2), x), p11, p21)[0]
        i2 = integrate.quad(lambda x:
            commonIntegrand(g(x), sqrt(r2 - x**2), x), p21, p31)[0]
        return 2 * (i1 + i2)
    elif areaType == 2:
        return 2 * integrate.quad(lambda x:
            commonIntegrand(f(x), sqrt(r2 - x**2), x), p11, p21)[0]
    elif areaType == 3:
        def h(x):
            # p31 may look out of place; it's the projection onto the horz line
            return PointAlongLine([p31, p22], [p21, p22], x)[1]
        def i(x):
            return PointAlongLine([p31, p32], [p21, p22], x)[1]
        i1 = integrate.quad(lambda x:
            commonIntegrand(f(x), sqrt(r2 - x**2), x), p11, p31)[0]
        i2 = integrate.quad(lambda x:
            commonIntegrand(h(x), i(x), x), p31, p21)[0]
        return 2 * (i1 + i2)
    else:
        raise Exception("Area type not recognized.")

# Monte-Carlo integration in Cartesian coordiantes given the radius, r, the
# Cartesian 2D region start point (p11, p12), the intersecting
# point (p21, p22), and the end point (p31, p32). (See article for graphics.)
def MonteCarloIntegration(r, p11, p12, p21, p22, p31, p32):
    sampleSize = 100000
    r2 = r**2
    def cross(p1, p2):
        return p1[0] * p2[1] - p2[0] * p1[1]
    def leftOf(p1, p2, p3): # is point p3 left of line [p1, p2]
        a1, a2, a3 = map(array, [p1, p2, p3])
        return cross(a3 - a2, a2 - a1) <= 0 # keep on the line too i.e. == 0
    def f(x):
        return PointAlongLine([p11, p12], [p21, p22], x)[1]
    def g(x):
        return PointAlongLine([p21, p22], [p31, p32], x)[1]
    def h(x):
        # p31 may look out of place; it's the projection onto the horz. line.
        return PointAlongLine([p31, p22], [p21, p22], x)[1]
    def i(x):
        return PointAlongLine([p31, p32], [p21, p22], x)[1]
    def interval1(x):
        return [f(x), sqrt(r2 - x**2)]
    def interval2(x):
        return [g(x), sqrt(r2 - x**2)]
    def interval3(x):
        return [h(x), i(x)]
    # Given line1 [p1, p2] and line2 [p2, p3] get random points within the
    # disk of radius r and to the left of l1 and l2. Note, p2 is the end
    # point of l1 and the start point of l2.
    def mcIntegrand(p1, p2, p3):
        u1 = np.random.uniform(-r, r, sampleSize)
        u2 = np.random.uniform(-r, r, sampleSize)
        pts = []
        for i in zip(u1, u2):
            x2 = i[0]**2
            y2 = i[1]**2
            if x2 + y2 < r2 \
                and leftOf(p1, p2, [i[0], i[1]]) \
                and leftOf(p2, p3, [i[0], i[1]]):
                pts.append(r / sqrt(r2 - i[0]**2 - i[1]**2))
        return np.mean(list(pts))
    areaType = 1 if p31 > p21 else (2 if p31 == p21 else 3)
    if areaType == 1:
        i1 = integrate.nquad(lambda y, x: 1, [interval1, [p11, p21]])[0]
        i2 = integrate.nquad(lambda y, x: 1, [interval2, [p21, p31]])[0]
        area = i1 + i2
        return 2 * area * mcIntegrand([p11, p12], [p21, p22], [p31, p32])
    elif areaType == 2:
        area = integrate.nquad(lambda y, x: 1, [interval1, [p11, p21]])[0]
        return 2 * area * mcIntegrand([p11, p12], [p21, p22], [p31, p32])
    elif areaType == 3:
        i1 = integrate.nquad(lambda y, x: 1, [interval1, [p11, p31]])[0]
        i2 = integrate.nquad(lambda y, x: 1, [interval3, [p31, p21]])[0]
        area = i1 + i2
        return 2 * area * mcIntegrand([p11, p12], [p21, p22], [p31, p32])
    else:
        raise Exception("Area type not recognized.")

# Integration in spherical coordiantes given the radius, r, the
# Cartesian 2D region start point (p11, p12), the intersecting
# point (p21, p22), and the end point (p31, p32). (See article for graphics.)
# Too slow; should be rewritten.
def SphericalCoordinateIntegration(r, p11, p12, p21, p22, p31, p32):
    # Just in case these names used by sympy may collide with the outer
    # code, they'll be scoped here as a precaution.
    from sympy import sin, cos, Matrix, atan, pi, sqrt
    from sympy.abc import rho, phi, theta, m, b
    from sympy import lambdify

    y = b + m * rho * cos(phi)
    fphi = atan(sqrt(-(y)**2 + rho**2 * (-(cos(phi)**2)) + rho**2) / y) / pi

    xyz = Matrix([rho * cos(phi),
                  rho * sin(phi) * cos(theta * fphi),
                  rho * sin(phi) * sin(theta * fphi)])
    uv = Matrix([phi, theta])

    mat = xyz.jacobian(uv)

    f = lambdify("phi, theta, rho, m, b",
                 Matrix([[mat[0,0], mat[0,1]], [mat[1,0], mat[1,1]]]).det()**2)
    g = lambdify("phi, theta, rho, m, b",
                 Matrix([[mat[1,0], mat[1,1]], [mat[2,0], mat[2,1]]]).det()**2)
    h = lambdify("phi, theta, rho, m, b",
                 Matrix([[mat[0,0], mat[0,1]], [mat[2,0], mat[2,1]]]).det()**2)

    t1 = FindRotation(1, 0, p11, p12) # pt is on the circle
    t2 = FindRotation(1, 0, p21, np.sqrt(r**2 - p21**2)) # project onto circle
    t3 = FindRotation(1, 0, p31, p32) # pt is on the circle

    try: slope1 = (p22 - p12) / (p21 - p11)
    except ZeroDivisionError: slope1 = float('+inf')
    b1 = PointAlongLine([p11, p12], [p21, p22], 0)[1]
    try: slope2 = (p32 - p22) / (p31 - p21)
    except ZeroDivisionError: slope2 = float('+inf')
    b2 = PointAlongLine([p21, p22], [p31, p32], 0)[1]

    # The integrals are negated b/c the outer integral is done clockwise.
    i1 = -integrate.nquad(lambda p,t: np.sqrt(f(p, t, r, slope1, b1)
        + g(p, t, r, slope1, b1) + h(p, t, r, slope1, b1))
        , [[t1, t2], [-pi, pi]])[0]
    if isinf(slope2):
        return i1
    else:
        i2 = -integrate.nquad(lambda p,t: np.sqrt(f(p, t, r, slope2, b2)
            + g(p, t, r, slope2, b2) + h(p, t, r, slope2, b2))
            , [[t2, t3], [-pi, pi]])[0]
        return i1 + i2

################################################
## Check the functions
################################################

def WithinTol(value):
    assert abs(value) <= 1e-8

WithinTol(abs(FindCapDistance(1, 1)))
WithinTol(abs(FindCapDistance(0.7453559924999299, 1) - 2/3))
assert Rescale(15, 10, 20, 0, 1) == 0.5
assert PointAlongLine([1,2], [11,3], 6)[1] == 2.5
WithinTol(abs(FindRotation(1, 0, -0.5, 0.86602540378443) - 2 * pi / 3))
WithinTol(abs(Rotate(2 * pi / 3, 1, 0)[0] - -0.5))
WithinTol(abs(Rotate(2 * pi / 3, 1, 0)[1] - 0.8660254037844386))
_r = FindIntersectionOfLines([5, 1], [1, 10], [1, 2], [10, 5])
WithinTol(abs(_r[0] - 4.09677419))
WithinTol(abs(_r[1] - 3.03225807))
print("Tests passed.")

################################################
## Driver
################################################

print("MonteCarloIntegration is the slowest function here.")
print("Disable it or set its sample size smaller to speed things up.")
print(".....")
print("SphericalCoordinateIntegration is also slow, but would need to")
print("be rewritten to account for its slowness.")
print(".....")
print("The calls to MonteCarloIntegration and SphericalCoordinateIntegration")
print("have been commented out of the Driver.")
print(".....")

# Each row holds a value respectively for these elements:
# [radius, a1, a2].
rows = [
    [1/3, 0.235702, 0.321975],
    [1, 0.707107, 0.965926],
    [3, 2.12132, 2.89778]]

for row in rows:
    [r, a1, a2] = row
    p11 = [-a1, FindCapDistance(a1, r)]
    p12 = [a1, p11[1]]
    p21 = [-a2, FindCapDistance(a2, r)]
    p22 = [a2, p21[1]]
    # Calculate the angle step size to sweep across:
#    fromAngle = FindRotation(1, 0, p12[0], p12[1]) \
#        - FindRotation(1, 0, p22[0], p22[1]) + 0.000174533
#    toAngle = FindRotation(1, 0, p11[0], p11[1]) \
#        - FindRotation(1, 0, p22[0], p22[1])- 0.000174533
#    stepSize = (toAngle - fromAngle) / 4
#    atAngle = fromAngle
    # I am inserting a pi/2 angle to the above angles to try a vertical line.
    angles = [0.5237767175432327,0.916388451764179,1.3090001859851252,
              1.5707963267948966,1.7016119202060715,2.094223654427018]
    # Generate the report for the current arguments:
    #while atAngle <= toAngle:
    for atAngle in angles:
        print([r, a1, a2, atAngle])
        rp21 = Rotate(atAngle, p21[0], p21[1])
        rp22 = Rotate(atAngle, p22[0], p22[1])
        intersection = FindIntersectionOfLines(p11, p12, rp21, rp22)
        x11, x12 = p11[0], p11[1]
        x21, x22 = intersection[0], intersection[1]
        x31, x32 = rp22[0], rp22[1]
        print(AreaOfCapsIntersection(a1, a2, r, atAngle))
        print(IntegrateInCartesianCoordinates(r, x11, x12, x21, x22, x31, x32))
        #print(SphericalCoordinateIntegration(r, x11, x12, x21, x22, x31, x32))
        #print(MonteCarloIntegration(r, x11, x12, x21, x22, x31, x32))
        print(TovchigrechkoAndVakser(arcsin(a1 / r), arcsin(a2 / r), r, atAngle))
        #atAngle += stepSize

</code>```

Body:
Introduction

This problem was recently brought to my attention and requested to make a contribution. I will answer this question in 4 different ways. I will also numerically compare the solutions via Python code, and I will provide some 2D and 3D graphics to help illustrate the concepts.

The paper by Tovchigrechko and Vakser (TV) (mentioned and linked in another entry) describes the solution geometrically and is similar to Christian Blatter’s solution, and it is similar to the spherical trigonometry approach shown in this entry. One note about the TV paper: their cap radii are measured along the surface of the sphere unlike the OP’s request to be straight-line distances constrained to the plane of the cap’s base.

Solution

Here are the steps to solve the intersection problem (all angles are in radians throughout this entry; for more context about the givens see the OP and Figure 1 (r is the radius, a1 and a2 are straight line distances, and $\theta$ is an angular separation)). We will assume each cap has the hemisphere as its limiting case; also, as noted in other entries, we are assuming an intersection occurs where neither cap is completely contained within the other:

Figure 1: 3D graph showing the givens.

$\text{Given a1, a2, r, and }\theta:$

$\text{let a}=\sin ^{-1}\left(\text{a1}/r\right),$

$\text{b}=\sin ^{-1}\left(\text{a2}/r\right),$

$\text{c}=\theta,$

$s=\frac{1}{2} (a+b+c),$

$k=\sqrt{\frac{\sin  (s-a) \sin  (s-b) \sin  (s-c)}{\sin (s) }},$

$A=2 \tan ^{-1}\left(\frac{k}{\sin (s-a)}\right),$

$B=2 \tan ^{-1}\left(\frac{k}{\sin (s-b)}\right),$

$C=2 \tan ^{-1}\left(\frac{k}{\sin (s-c)}\right),$

$\Delta _1=r^2 (A+B+C-\pi ),$

$\Delta _2=r^2 (A+B+C-\pi ),$

$\mathcal{A}_{\text{s1}}=2 B r^2 (1-\cos (a) ),$

$\mathcal{A}_{\text{s2}}=2 A r^2 (1-\cos (b) )$

$$ \bbox[5px,border:2px solid red]
{
\mathcal{A}_{\cap }=\mathcal{A}_{\text{s1}}+\mathcal{A}_{\text{s2}}-\left(\Delta _1+\Delta _2\right)
}
$$

That’s the answer (this, and different spherical angle formulas, can also be used to derive variants of the formula including the one found in Tovchigrechko and Vakser). The rest of this entry just provides more context and explanation.

More Info

The following is equivalent to the above steps, and is the result found in the TV paper except the $r^2$ part (a1, a2, and $\theta$ are spherical distances, i.e., distances along the curved surface on the unit sphere; to make a1 and a2 above work here, convert them like so: t=arcsin(a1/r) and u=arcsin(a2/r)):

$2 r^2 (\pi$

$-\cos ^{-1}(\csc (\text{t}) \csc (\text{u}) \cos (\theta )-\cot (\text{t}) \cot (\text{u}))$

$-\cos ^{-1}(\csc (\text{t}) \cos (\text{u}) \csc (\theta )-\cot (\text{t}) \cot (\theta ))\cos (\text{t}) $

$-\cos ^{-1}(\cos (\text{t}) \csc (\text{u}) \csc (\theta )-\cot (\text{u}) \cot (\theta ))\cos (\text{u}) )$

Figure 2: Two examples of an intersection.

Figure 2a and 2b show an intersection of 2 spherical caps. Plane I and Plane II are the planar bases of their respective caps; the planes are used to help highlight the intersection, and they'll be used later to convert the problem into 2D. We'll use Figure 2a for the following discussion.

Figure 3: Spherical sectors.

Figure 3 shows the 2 separate spherical sectors, i.e., a red area and a cyan area. The summation of the red and cyan areas contains the intersection of the spherical caps, but notice the 2 spherical triangles that get included twice when adding the red area and the cyan area. The area of these 2 spherical triangles needs to be removed from the combined area of the 2 sectors. (In this context a and b have a radius component that needs to be divided out. In the intersection formula given above the radius component is removed by the time the sector area is computed, which is why the formulas in Figure 3 appear slightly different compared to $\mathcal{A}_{\text{s1}}$ and $\mathcal{A}_{\text{s2}}$ in the intersection formula.)

Figure 4: Spherical triangle close-up.

Figure 4 shows what’s involved to calculate the area of the 2 spherical triangles whose combined area must be removed from the combined area of the 2 spherical sectors.

The angles of the spherical triangle were calculated using the half-angle formulas for tangents (equations 27 and 34-38):

/SphericalTrigonometry

And the spherical triangle area formula appears here:

/SphericalTriangle

Both topics are at Wolfram's Mathworld, but I can't make these links because my account is limited to only 8 links at the moment.

Numerical Verification (or Additional Solutions)

Cartesian Coordinates

Next, we’ll look at comparing the formula with numerical integration over a region. Imagine rotating the objects in Figure 2 such that you are looking down the line where the planes intersect. The planes would then appear like lines. Here is a 2D version of what that looks like (the red lines suggest the continuation of the planes beyond the circle):

Figure 5: 2D perspective of an intersection.

In Figure 5, a1 and a2 are radii of their respective cap shown here for context (and the radius, r, is shown to avoid confusion with $\mathcal{R}$ of the region). The blue area is the 2D projected region where the caps intersect. We will rotate (i.e., change $\theta$, a given) one cap across the span of the other cap to test the area of several different intersections as the series of images in Figure 6a show. In 6b a few perspectives of the 2 intersecting caps are shown in relation to one of the regions. One reason for doing this sweep is to consider extreme points where we might encounter numerical instability.

Figure 6: Integration in Cartesian coordinates.

Figure 6c shows the concepts involved in computing the integral of the intersecting caps in Cartesian coordinates. The double integral, with respect to the function $r / \sqrt{r^2-x^2-y^2}$, is improper and likely for that reason it presented some problems for scipy. I was able to get it to work by changing the variables in both the double integral and single integral versions, but in the code I’ve chosen the single integral version as it makes the code a little easier to read. This corresponds with the set of integrals below the dashed horizontal line in Figure 6c, which applies to the inner integral the common technique of making the substitution $y=\lvert b\rvert \sin (\theta )$. The $\sin ^{-1}\left(\frac{\lvert \sqrt{r^2-x^2} \rvert}{\lvert \sqrt{r^2-x^2} \rvert}\right)$ can be reduced to $\pi /2$.

Monte-Carlo Integration

Next, a simple approximation of the integration will be setup for the purpose of being a guard rail for catching obvious errors that might be present. In particular, a Monte-Carlo integration will be used. Here we simply remove the integrand from the double integrals in Figure 6c and integrate the scalar constant of 1 over the same regions as shown in Figure 6d. If we trust the region definitions (i.e., if they’re simple) and if the functions are well behaved, then this presents a robust approach to compute the area; for these reasons it’s the approach I used to compute the region’s area needed in the Monte-Carlo function in the Python code example. We don’t need to multiply by 2 since this is the 2D region area, not the surface area on the sphere above and below the region. The value of this region area is multiplied by the average of the $r / \sqrt{r^2-x^2-y^2}$ evaluated at each point in a random set of points within the region, which yields the Monte-Carlo approximation of the surface above the region (multiply by 2 to include the area below the region).

Integration in Spherical Coordinates

The advantage in spherical coordinates is we’ll avoid an improper integral for the most part, but a disadvantage is the area formula will appear more complex. Here’s a parametric form of a spherical cap we can use to calculate its area (it was designed for this discussion and is not intended to be flexible enough for general use (the domain of $\phi$ will depend on the cap, but for this problem $\theta$ always runs from $-\pi \text{ to } \pi$)):

$x=r \cos (\phi )$

$y=r \sin (\phi ) \cos \left(\theta  f(\phi )\right)$

$z=r \sin (\phi ) \sin \left(\theta  f(\phi )\right)$

$\text{where} f(\phi )=\frac{1}{\pi}\tan ^{-1}\left(\frac{\sqrt{-(b\;+\;m\;r \cos (\phi ))^2\;+\;r^2 \left(-\cos ^2(\phi )\right)\;+\;r^2}}{b\;+\;m\;r \cos (\phi )}\right)$

$\text{and}-\pi \leq \theta \leq \pi$

Figure 7: Integration in spherical coordinates.

Figure 7a is a visualization showing how the point at (1,0,0) is transformed to a/the red arc along the spherical cap in accordance with the given parametric form. Multiplication of the matrices in Figure 7a yield the above parametric form. The $f(\phi )$ part; though cluttered, is just computing the intersection at the x-value of $\phi$ along the line of a spherical cap’s base (viewing it edgewise), and then projecting that intersection upwards and downwards onto the sphere, which then yields points along the red arc in Figure 7a with respect to $\theta$ as it sweeps across from $-\pi \text{ to } \pi$ between those 2 projections, and finally sweeping it across $\phi$ yields the cap’s surface. The images in Figure 7b were computed via the parametric form above and serve as a visual verification that the parametric form is correct.

The area of a parameterized surface is equal to the magnitude of infinitesimal tangent plane normals integrated over the region, i.e.:

$\underset{\mathcal{R}}{\int }\;\lvert\lvert \mathbb{T}_u\times \mathbb{T}_v\rvert\rvert \;du\;dv$

and in our context of having x, y and z given in terms of two parameters is equivalent to (this is how it is done in the Python code in the appendix):

$\underset{\mathcal{R}}{\int }\;\sqrt{\left[\frac{\partial (x,y)}{\partial (u,v)}\right]^2+\left[\frac{\partial (y,z)}{\partial (u,v)}\right]^2+\left[\frac{\partial (x,z)}{\partial (u,v)}\right]^2}\;du\;dv=\underset{\mathcal{R}}{\int }\;\sqrt{\left\lvert
\begin{array}{cc}
 \frac{\partial x}{\partial u} & \frac{\partial x}{\partial v} \\
 \frac{\partial y}{\partial u} & \frac{\partial y}{\partial v} \\
\end{array}
\right\rvert ^2+\left\lvert
\begin{array}{cc}
 \frac{\partial y}{\partial u} & \frac{\partial y}{\partial v} \\
 \frac{\partial z}{\partial u} & \frac{\partial z}{\partial v} \\
\end{array}
\right\rvert ^2+\left\lvert
\begin{array}{cc}
 \frac{\partial x}{\partial u} & \frac{\partial x}{\partial v} \\
 \frac{\partial z}{\partial u} & \frac{\partial z}{\partial v} \\
\end{array}
\right\rvert ^2}\;du\;dv$

(see section 7.4, Vector Calculus, 3ed. Jerrold E. Marsden and Anthony J. Tromba.)

(The use of u and v here instead of  $\phi$ and $\theta$ is just to avoid implicitly suggesting that the formula has something to do with angles.)

See Figure 7c for more details about the regions of integration for our parametric form.

Results

Figure 8: Test results.

Figure 8 shows the results of running calculations of the first formula presented (Main), integration in Cartesian coordinates (Cart.Coords), integration in spherical coordinates (Sph.Coords), integration via Monte-Carlo (M.Carlo), and via the formula found in Tovchigrechko and Vakser (TV) with the added radius aspect, and these are for various angles of separation for radius equal to 1/3, 1, and 3, along with a1 and a2 values. The nan results in the Monte-Carlo are likely just caused by not having enough sample points fall within the tiny region, but the Monte-Carlo was just there as a sanity check, so not a big deal if we’re missing some values.

Appendix

Code

import numpy as np
from numpy import cos, arcsin, arccos, sin, tan, arctan, arctan2
from numpy import sqrt, pi, array, dot
from scipy import integrate, optimize
from math import isinf

# Note: I don't follow a naming convention here. Also, no attempt at
# being efficient was made. The purpose is to use alternative approaches
# to find discrepancies with the main function, i.e., AreaOfCapsIntersection.

# Here is our main process for computing the area of
# intersecting spherical caps. a1 and a2 are the straight line
# distance of the radius of each cap's respective base. r is the sphere's
# radius. theta is the angular separation between the caps (in radians).
def AreaOfCapsIntersection(a1, a2, r, theta):
    a = arcsin(a1 / r)
    b = arcsin(a2 / r)
    c = theta
    s = (a + b + c) / 2
    k = sqrt((sin(s - a) * sin(s - b) * sin(s - c) / sin(s)))
    A = 2 * arctan(k / sin(s - a))
    B = 2 * arctan(k / sin(s - b))
    C = 2 * arctan(k / sin(s - c))
    T1 = r**2 * (A + B + C - pi)
    T2 = T1
    S1 = 2 * B * r**2 * (1 - cos(a))
    S2 = 2 * A * r**2 * (1 - cos(b))
    return S1 + S2 - (T1 + T2)

# This is from the Tovchigrechko and Vakser paper mentioned in another entry
# and modified to account for a radius other than 1. a1 and a2 have been
# adjusted to the distance on the sphere's surface by the calling code.
# Theta is also expected to be the angular separation of the 2 caps.
def TovchigrechkoAndVakser(a1, a2, r, theta):
    def csc(t):
        return 1 / sin(t)
    def cot(t):
        return 1 / tan(t)
    return r**2 * 2 * (pi
    - arccos(cos(theta) * csc(a1) * csc(a2) - cot(a1) * cot(a2))
    - arccos(cos(a2) * csc(theta) * csc(a1) - cot(theta) * cot(a1)) * cos(a1)
    - arccos(cos(a1) * csc(theta) * csc(a2) - cot(theta) * cot(a2)) * cos(a2))

# This will return the distance from the origin to the base of the
# spherical cap given its baseRadius and the sphere's radius.
def FindCapDistance(baseRadius, r):
    return abs(optimize.brentq(lambda h:
        sqrt(abs(baseRadius)**2 + abs(h)**2) - r, 0, 1000))

# Rotate a point about the origin
def Rotate(theta, x, y):
    c, s = cos(theta), sin(theta)
    R = [[c, -s],
         [s, c]]
    pt = array([x, y]).reshape(2, 1)
    return dot(R, pt).flatten()

# Find the angle that rotates [xFrom, yFrom] onto [xTo, yTo].
def FindRotation(xFrom, yFrom, xTo, yTo):
    u0, u1, v0, v1 = xFrom, yFrom, xTo, yTo
    return arctan2(u0 * v1 - u1 * v0, u0 * v0 + u1 * v1)

# Rescales x along the interval [a,b] to the interval [c,d].
def Rescale(x, a, b, c, d):
    return (-(b * c) + a * d + (c - d) * x) / (a - b)

# Given the vectors a=fromPt and b=toPt from the origin find a point
# along the vector a+t*(b-a) at parameter t where t will be rescaled
# as [fromPt[0], toPt[0]] to [0,1].
def PointAlongLine(fromPt, toPt, t):
    a, b = array(fromPt), array(toPt)
    return a + Rescale(t, a[0], b[0], 0, 1) * (b - a)

# Finds the point where two lines intersect. Each parameter is a 2D array.
def FindIntersectionOfLines(l1From, l1To, l2From, l2To):
    def f(x):
        pt1 = PointAlongLine(l1From, l1To, x[0])
        pt2 = PointAlongLine(l2From, l2To, x[0])
        # The 2-norm is the same thing as Euclidean distance in our context:
        return np.linalg.norm(pt1 - pt2)
    # Because we're rescaling t in a+t(b-a) to coincide with the bounds
    # both functions are evaluated at the same x, so we just need 1 dimension.
    x0 = array([0])
    # The function is well behaved, keep it simple, nelder-mead will be fine.
    r = optimize.minimize(f, x0, method='nelder-mead', options={'xatol': 1e-8})
    return PointAlongLine(l1From, l1To, r.x[0])

# Integrate in Cartesian coordiantes given the radius, r, the
# Cartesian 2D region start point (p11, p12), the intersecting
# point (p21, p22), and the end point (p31, p32). (See article for graphics.)
def IntegrateInCartesianCoordinates(r, p11, p12, p21, p22, p31, p32):
    r2 = r**2
    def commonIntegrand(a, b, x):
        d = sqrt(r2 - x**2)
        return r * (arcsin(b / d) - arcsin(a / d))
    def f(x):
        return PointAlongLine([p11, p12], [p21, p22], x)[1]
    def g(x):
        return PointAlongLine([p21, p22], [p31, p32], x)[1]
    areaType = 1 if p31 > p21 else (2 if p31 == p21 else 3)
    if areaType == 1:
        i1 = integrate.quad(lambda x:
            commonIntegrand(f(x), sqrt(r2 - x**2), x), p11, p21)[0]
        i2 = integrate.quad(lambda x:
            commonIntegrand(g(x), sqrt(r2 - x**2), x), p21, p31)[0]
        return 2 * (i1 + i2)
    elif areaType == 2:
        return 2 * integrate.quad(lambda x:
            commonIntegrand(f(x), sqrt(r2 - x**2), x), p11, p21)[0]
    elif areaType == 3:
        def h(x):
            # p31 may look out of place; it's the projection onto the horz line
            return PointAlongLine([p31, p22], [p21, p22], x)[1]
        def i(x):
            return PointAlongLine([p31, p32], [p21, p22], x)[1]
        i1 = integrate.quad(lambda x:
            commonIntegrand(f(x), sqrt(r2 - x**2), x), p11, p31)[0]
        i2 = integrate.quad(lambda x:
            commonIntegrand(h(x), i(x), x), p31, p21)[0]
        return 2 * (i1 + i2)
    else:
        raise Exception("Area type not recognized.")

# Monte-Carlo integration in Cartesian coordiantes given the radius, r, the
# Cartesian 2D region start point (p11, p12), the intersecting
# point (p21, p22), and the end point (p31, p32). (See article for graphics.)
def MonteCarloIntegration(r, p11, p12, p21, p22, p31, p32):
    sampleSize = 100000
    r2 = r**2
    def cross(p1, p2):
        return p1[0] * p2[1] - p2[0] * p1[1]
    def leftOf(p1, p2, p3): # is point p3 left of line [p1, p2]
        a1, a2, a3 = map(array, [p1, p2, p3])
        return cross(a3 - a2, a2 - a1) <= 0 # keep on the line too i.e. == 0
    def f(x):
        return PointAlongLine([p11, p12], [p21, p22], x)[1]
    def g(x):
        return PointAlongLine([p21, p22], [p31, p32], x)[1]
    def h(x):
        # p31 may look out of place; it's the projection onto the horz. line.
        return PointAlongLine([p31, p22], [p21, p22], x)[1]
    def i(x):
        return PointAlongLine([p31, p32], [p21, p22], x)[1]
    def interval1(x):
        return [f(x), sqrt(r2 - x**2)]
    def interval2(x):
        return [g(x), sqrt(r2 - x**2)]
    def interval3(x):
        return [h(x), i(x)]
    # Given line1 [p1, p2] and line2 [p2, p3] get random points within the
    # disk of radius r and to the left of l1 and l2. Note, p2 is the end
    # point of l1 and the start point of l2.
    def mcIntegrand(p1, p2, p3):
        u1 = np.random.uniform(-r, r, sampleSize)
        u2 = np.random.uniform(-r, r, sampleSize)
        pts = []
        for i in zip(u1, u2):
            x2 = i[0]**2
            y2 = i[1]**2
            if x2 + y2 < r2 \
                and leftOf(p1, p2, [i[0], i[1]]) \
                and leftOf(p2, p3, [i[0], i[1]]):
                pts.append(r / sqrt(r2 - i[0]**2 - i[1]**2))
        return np.mean(list(pts))
    areaType = 1 if p31 > p21 else (2 if p31 == p21 else 3)
    if areaType == 1:
        i1 = integrate.nquad(lambda y, x: 1, [interval1, [p11, p21]])[0]
        i2 = integrate.nquad(lambda y, x: 1, [interval2, [p21, p31]])[0]
        area = i1 + i2
        return 2 * area * mcIntegrand([p11, p12], [p21, p22], [p31, p32])
    elif areaType == 2:
        area = integrate.nquad(lambda y, x: 1, [interval1, [p11, p21]])[0]
        return 2 * area * mcIntegrand([p11, p12], [p21, p22], [p31, p32])
    elif areaType == 3:
        i1 = integrate.nquad(lambda y, x: 1, [interval1, [p11, p31]])[0]
        i2 = integrate.nquad(lambda y, x: 1, [interval3, [p31, p21]])[0]
        area = i1 + i2
        return 2 * area * mcIntegrand([p11, p12], [p21, p22], [p31, p32])
    else:
        raise Exception("Area type not recognized.")

# Integration in spherical coordiantes given the radius, r, the
# Cartesian 2D region start point (p11, p12), the intersecting
# point (p21, p22), and the end point (p31, p32). (See article for graphics.)
# Too slow; should be rewritten.
def SphericalCoordinateIntegration(r, p11, p12, p21, p22, p31, p32):
    # Just in case these names used by sympy may collide with the outer
    # code, they'll be scoped here as a precaution.
    from sympy import sin, cos, Matrix, atan, pi, sqrt
    from sympy.abc import rho, phi, theta, m, b
    from sympy import lambdify

    y = b + m * rho * cos(phi)
    fphi = atan(sqrt(-(y)**2 + rho**2 * (-(cos(phi)**2)) + rho**2) / y) / pi

    xyz = Matrix([rho * cos(phi),
                  rho * sin(phi) * cos(theta * fphi),
                  rho * sin(phi) * sin(theta * fphi)])
    uv = Matrix([phi, theta])

    mat = xyz.jacobian(uv)

    f = lambdify("phi, theta, rho, m, b",
                 Matrix([[mat[0,0], mat[0,1]], [mat[1,0], mat[1,1]]]).det()**2)
    g = lambdify("phi, theta, rho, m, b",
                 Matrix([[mat[1,0], mat[1,1]], [mat[2,0], mat[2,1]]]).det()**2)
    h = lambdify("phi, theta, rho, m, b",
                 Matrix([[mat[0,0], mat[0,1]], [mat[2,0], mat[2,1]]]).det()**2)

    t1 = FindRotation(1, 0, p11, p12) # pt is on the circle
    t2 = FindRotation(1, 0, p21, np.sqrt(r**2 - p21**2)) # project onto circle
    t3 = FindRotation(1, 0, p31, p32) # pt is on the circle

    try: slope1 = (p22 - p12) / (p21 - p11)
    except ZeroDivisionError: slope1 = float('+inf')
    b1 = PointAlongLine([p11, p12], [p21, p22], 0)[1]
    try: slope2 = (p32 - p22) / (p31 - p21)
    except ZeroDivisionError: slope2 = float('+inf')
    b2 = PointAlongLine([p21, p22], [p31, p32], 0)[1]

    # The integrals are negated b/c the outer integral is done clockwise.
    i1 = -integrate.nquad(lambda p,t: np.sqrt(f(p, t, r, slope1, b1)
        + g(p, t, r, slope1, b1) + h(p, t, r, slope1, b1))
        , [[t1, t2], [-pi, pi]])[0]
    if isinf(slope2):
        return i1
    else:
        i2 = -integrate.nquad(lambda p,t: np.sqrt(f(p, t, r, slope2, b2)
            + g(p, t, r, slope2, b2) + h(p, t, r, slope2, b2))
            , [[t2, t3], [-pi, pi]])[0]
        return i1 + i2

################################################
## Check the functions
################################################

def WithinTol(value):
    assert abs(value) <= 1e-8

WithinTol(abs(FindCapDistance(1, 1)))
WithinTol(abs(FindCapDistance(0.7453559924999299, 1) - 2/3))
assert Rescale(15, 10, 20, 0, 1) == 0.5
assert PointAlongLine([1,2], [11,3], 6)[1] == 2.5
WithinTol(abs(FindRotation(1, 0, -0.5, 0.86602540378443) - 2 * pi / 3))
WithinTol(abs(Rotate(2 * pi / 3, 1, 0)[0] - -0.5))
WithinTol(abs(Rotate(2 * pi / 3, 1, 0)[1] - 0.8660254037844386))
_r = FindIntersectionOfLines([5, 1], [1, 10], [1, 2], [10, 5])
WithinTol(abs(_r[0] - 4.09677419))
WithinTol(abs(_r[1] - 3.03225807))
print("Tests passed.")

################################################
## Driver
################################################

print("MonteCarloIntegration is the slowest function here.")
print("Disable it or set its sample size smaller to speed things up.")
print(".....")
print("SphericalCoordinateIntegration is also slow, but would need to")
print("be rewritten to account for its slowness.")
print(".....")
print("The calls to MonteCarloIntegration and SphericalCoordinateIntegration")
print("have been commented out of the Driver.")
print(".....")

# Each row holds a value respectively for these elements:
# [radius, a1, a2].
rows = [
    [1/3, 0.235702, 0.321975],
    [1, 0.707107, 0.965926],
    [3, 2.12132, 2.89778]]

for row in rows:
    [r, a1, a2] = row
    p11 = [-a1, FindCapDistance(a1, r)]
    p12 = [a1, p11[1]]
    p21 = [-a2, FindCapDistance(a2, r)]
    p22 = [a2, p21[1]]
    # Calculate the angle step size to sweep across:
#    fromAngle = FindRotation(1, 0, p12[0], p12[1]) \
#        - FindRotation(1, 0, p22[0], p22[1]) + 0.000174533
#    toAngle = FindRotation(1, 0, p11[0], p11[1]) \
#        - FindRotation(1, 0, p22[0], p22[1])- 0.000174533
#    stepSize = (toAngle - fromAngle) / 4
#    atAngle = fromAngle
    # I am inserting a pi/2 angle to the above angles to try a vertical line.
    angles = [0.5237767175432327,0.916388451764179,1.3090001859851252,
              1.5707963267948966,1.7016119202060715,2.094223654427018]
    # Generate the report for the current arguments:
    #while atAngle <= toAngle:
    for atAngle in angles:
        print([r, a1, a2, atAngle])
        rp21 = Rotate(atAngle, p21[0], p21[1])
        rp22 = Rotate(atAngle, p22[0], p22[1])
        intersection = FindIntersectionOfLines(p11, p12, rp21, rp22)
        x11, x12 = p11[0], p11[1]
        x21, x22 = intersection[0], intersection[1]
        x31, x32 = rp22[0], rp22[1]
        print(AreaOfCapsIntersection(a1, a2, r, atAngle))
        print(IntegrateInCartesianCoordinates(r, x11, x12, x21, x22, x31, x32))
        #print(SphericalCoordinateIntegration(r, x11, x12, x21, x22, x31, x32))
        #print(MonteCarloIntegration(r, x11, x12, x21, x22, x31, x32))
        print(TovchigrechkoAndVakser(arcsin(a1 / r), arcsin(a2 / r), r, atAngle))
        #atAngle += stepSize


问:
Differential Equation Problem finding the Value
$(y'''-y"-4y'+4y)=2x^2-4x-1+2x^2e^{2x}+5xe^{2x}+e^{2x}$

I've already get the complementary function $y_{c}$$=$ $C$$_1$$e^x$$+$ $C$$_2$$e^{2x}$$+$$C$$_3$$e^{-2x}$
Also y$_p$$=$$A+Bx+Cx^2+Dxe^{2x}+Ex^2e^{2x}+Fx^3e^{2x}$

What  is the value of A,B,C,D,E,F?

Body: Hint $D^3 -D^2 - 4 D + 4 = (D - 1)(D - 2)(D + 2)$


问:
Let ABCD be a tetrahedron of volume 1 and M,N,P,Q,R,S on AB,BC,CD,DA,AC,BD s.t. MP,NQ,RS are concurrent. Then the volume of MNRSPQ is less than 1/2.
So far, I have denoted
$$\frac{MA}{MB}=a,\frac{BN}{NC}=b,\frac{CP}{PD}=c,\frac{DQ}{QA}=d,\frac{AR}{RC}=e,\frac{BS}{SD}=f$$
and then I have computed the volumes of the "small" tetrahedra
$$V_1=V_{AMRQ}=\frac{ae}{(a+1)(e+1)(d+1)};$$
$$V_2=V_{BMSN}=\frac{bf}{(b+1)(f+1)(a+1)};$$
$$V_3=V_{CRNP}=\frac{c}{(c+1)(e+1)(b+1)};$$
$$V_4=V_{DPQS}=\frac{d}{(d+1)(c+1)(f+1)}.$$
Also, by Menelaus theorem for tetrahedra, one can deduce that
$$abcd=1;~~~ af=ce; ~~~b=fde.$$
It remains to show that $$V_1+V_2+V_3+V_4\geq \frac{1}{2}.$$

The problem has a well known analogue in 2-D: for a triangle $ABC$ of area 1 and $AM, BN, CP$ concurrent cevians, the area of the triangle $MNP$ is less than 1/4.

Later edit/update:

I have managed to rewrite $V_k$ as follows:
$$V_1={\frac {a}{ \left( a+1 \right)  \left( d+1 \right)  \left( cd+1
 \right) }};$$
$$V_2={\frac {b}{ \left( a+1 \right)  \left( b+1 \right)  \left( ad+1
 \right) }};$$
$$V_3= {\frac {c}{ \left( c+1 \right)  \left( b+1 \right)  \left( ab+1
 \right) }};$$
$$V_4= {\frac {d}{ \left( c+1 \right)  \left( d+1 \right)  \left( bc+1
 \right) }},$$
Plus, we still have $abcd=1$.

答:
Let $X$ be the intersection of the three segments $MP$, $NQ$, $RS$.
Since $ABCD$ is non-degenerate, its volume is one, the points $A,B,C,D$ are not in a plane, so we can uniquely write
$$
X = aA+bB+cC+dD\ , \qquad a+b+c+d=1\ .
$$

Then grouping pairs of vertices, we obtain formulas for $M,N,P,Q,R,S$ in terms of these weights, corresponding to the groupings:
$$
\begin{aligned}
X
&=
(a+b)\cdot \underbrace{\frac {aA+bB}{a+b}}_{M} +
(c+d)\cdot \underbrace{\frac {cC+dD}{c+d}}_{P}
\\[2mm]
&=
(a+c)\cdot \underbrace{\frac {aA+cC}{a+c}}_{R} +
(b+d)\cdot \underbrace{\frac {bB+dD}{b+d}}_{S}
\\[2mm]
&=
(a+d)\cdot \underbrace{\frac {aA+dD}{a+d}}_{Q} +
(b+c)\cdot \underbrace{\frac {bB+cC}{b+c}}_{N} \ .
\end{aligned}
$$
(They really know in Romania vectors in 3D in the VIII.th class. The relations
the children could have been written involve the vectors $OX$, $OA$, $OB$, $OCV$, $OD$ instead of the above.)

So $M$ is situated on $AB$ such that $M=\frac 1{a+b}(aA+bB)$, which gives
$AM:AB=b:(a+b)$. We write similar relations for $AR:AC=c:(a+c)$ and $AQ:AD=d:(a+d)$. So the volume $[AMRQ]$, seen as a fraction of the volume $[ABCD]=1$
is
$$
[AMRQ]
=
\frac{AM}{AB}\cdot
\frac{AR}{AC}\cdot
\frac{AQ}{AD}\cdot
[ABCD]
=\frac{bcd}{(a+b)(a+c)(a+d)}\cdot 1\ .
$$
So the given geometric inequality is equivalent to the algebraic inequality
$$
\sum\frac{bcd}{(a+b)(a+c)(a+d)}
\ge
\frac 12\ .
$$
The sum has four terms obtained by acting with the powers of the cyclic permutation  $(a,b,c,d)$ on the written term.

I could find quickly only the brute force proof. We multiply with the common denominator and have to show the domination:
$$
\underbrace{\sum a^3b^2c}_{4\cdot 3\cdot 2=24\text{ terms}} +
2\underbrace{\sum a^2b^2c^2}_{4\text{ terms}}
\ge
2\underbrace{\sum a^3bcd}_{4\text{ terms}} +
4\underbrace{\sum a^2b^2cd}_{6\text{ terms}}
\ .
$$
The domination is clear, the monominal type $(3,2,1,0)$
dominates $(3,1,1,1)$ and $(2,2,1,1)$. And $(2,2,2,0)$ dominates $(2,2,1,1)$.
So one can stop here.

But for the convenience of the reader, let us write this explicitly. First of all
$$
b^2c+c^2b+b^2d+d^2b + c^2d+d^2c\ge 6bcd\ .
$$
(Arithmetic-geometric mean.) We multiply with $a^3$ and sum. It remains (i.e. is sufficient) to show
$$
\frac 23
\underbrace{\sum a^3b^2c}_{4\cdot 3\cdot 2=24\text{ terms}} +
2\underbrace{\sum a^2b^2c^2}_{4\text{ terms}}
\ge
4\underbrace{\sum a^2b^2cd}_{6\text{ terms}}
\ .
$$
Now use $a^3b^2c+ab^2c^3\ge 2a^2b^2c^2$ to estimate downwards the LHS with a scalar multiple of $\sum a^2b^2c^2$, to have a simpler LHS, so
$$
\begin{aligned}
\frac 23
\underbrace{\sum a^3b^2c}_{4\cdot 3\cdot 2=24\text{ terms}} +
2\underbrace{\sum a^2b^2c^2}_{4\text{ terms}}
&\ge
\frac 23\cdot 6
\underbrace{\sum a^2b^2c^2}_{4\text{ terms}} +
2\underbrace{\sum a^2b^2c^2}_{4\text{ terms}}
=
6
\underbrace{\sum a^2b^2c^2}_{4\text{ terms}}
\\
&\ge
4\underbrace{\sum a^2b^2cd}_{6\text{ terms}}
\ .
\end{aligned}
$$
The last inequality follows from $a^2b^2c^2+a^2b^2d^2\ge 2a^2b^2cd$.

$\square$

Note: The problem was proposed by Flavian Georgescu, Bucharest, at that time college student (elev), so maximally 18yo, and it should be doable with the aid of "thin air" available in the 8.th class (14yo students) of the Romanian mathematical matter from the school book. I suppose Titu or a mean inequality was the solution of the author, if he did it as above, else i see only the possibility of a geometrical argument using $[XMRQ]$ and the similar tetraedra.


问:
Probability that 4 socks selected at random from 4 pairs will form 2 pairs
I have come across this problem in a book I am studying out of interest.

A drawer contains 4 different pairs of socks. Find the probability that (a) if 2 socks are selected at random they will form a pair, (b) if 4 socks are selected at random they will form 2 pairs.

I solved (a) by saying the number of different selections of socks is $\binom{8}{2} = 28$

Number of different matching combinations = 4

$\implies probability = \frac{4}{28} = \frac{1}{7}$

To solve (b) I have looked at similar questions on this forum but can find none which I have been successfully able to apply.

I know that when choosing the second sock there is a $\frac {1}{7}$ probability of it matching the first. But then I get confused.

The answer in the book is $\frac{3}{35}$

答:
Another way is to imagine all the socks  randomly laid out in a line, and you pull them out sequentially.

Suppose the first sock you draw out is type $A,\; A - - - | - - - -$

You need another type $A$ in the next $3$ places from remaining $7$,

say $\;A--A|---- \;$with$\; Pr = 3/7, $

Again, suppose one of the remaining two socks is type $C,\; A\,C - A | - - - -$, the remaining sock must also be $C$ with $Pr = 1/5$

Putting it together, $Pr = \dfrac 3 7\cdot\dfrac1 5 = \dfrac3 {35}$

Clarification to OP's query

We are looking at filling of four slots by two pairs

Assume that you draw the socks blind, they remain hidden, and then someone reveals one slot to have type $A$.

It is now essential that one of the other $3$ slots must have type $A$. Each remaining sock has equal probability of being in these $3$ slots, thus the probability that $A$ is in one of these slots is $3/7$. And so on.

The approach can be easily adapted for larger problems, eg for getting $3$ pairs from $6$ pairs,

$\frac 5{11}\cdot\frac 3 9\cdot \frac 1 7 = \frac 5{231}$


问:
Understanding the exponential operator
Let $A$ a bounded operator on a Hilbert space. Define the exponential operator by:
\begin{eqnarray*}
e^{A}=\sum_{n=0}^{\infty}\frac{A^{n}}{n!} (A^{0}=I)
\end{eqnarray*}

I undesrtand this exponential operator like this: If $x\in H$ then:
\begin{eqnarray*}
e^{A}(x)= \sum_{n=0}^{\infty} \frac{A^{n}(x)}{n!} (A^{0}(x)=x)
\end{eqnarray*}
But if I think in for example $(e^{A})^{2}$. How can I see this function? I understand $(e^{A})^{2}$ by the composition of $e^{A}$ with itself.

答:
The crucial aspect of the set $B(H)$, formed by all bounded operators  on the Hilbert space $H$, relevant to the
present question, is that $B(H)$  is a Banach
algebra.  In particular  it is equipped with:

a real (or complex) vector space structure,

a multiplication operation (if $S$ and $T$ are operators, then the product $ST$ is understood to be the composition
$S\circ T$), and

a norm (for an operator $T$ we define $\|T\|=\sup\{\|Tx\|: x\in H,\ \|x\|\leq 1\}$).

If $A$ is any algebra, $a$ is any element of $A$,  and
$$
  p(X) = \lambda _0 + \lambda _1X + \lambda _2X^2 + \cdots + \lambda _nX^n
  $$
is a polynomial,  one may make sense of $p(a)$ by
simply replacing the variable $X$ with $a$, that is,
$$
  p(a) := \lambda _0 + \lambda _1a + \lambda _2a^2 + \cdots + \lambda _na^n.
  $$

If  moreover $A$ is a normed algebra, and if
$$
  p(X) = \sum_{k=0}^\infty \lambda _kX^k
  \tag 1
  $$
is a formal power series,  one may  make sense of $p(a)$ in a similar way, that is,
$$
  p(a) := \lim_{n\to \infty }\sum_{k=0}^n\lambda _ka^k
  \tag 2
  $$
provided the limit exists.

In addition, if $A$ is complete with respect to its norm, then the above limit is guaranteed to exist whenever  the radius of convergence of
(1) is bigger than $\|a\|$, because then
$$
  \sum_{k=0}^\infty \|\lambda _ka^k\| \leq    \sum_{k=0}^\infty |\lambda _k|\|a\|^k < \infty ,
  $$
so the series in (2) is absolutely convergent, and hence convergent by completeness.

The correspondence $p\mapsto p(a)$ enjoys many sensible algebraic properties, such as
$$
  (pq)(a) = p(a)q(a),
  $$
as long as all series  involved converge.

Thus,  for example,  once we know that
$$
  \exp(X)^2 =   \exp(2X),
  $$
it immediately follows that
$$
  \exp(A)^2 =   \exp(2A),
  $$
for every bounded operator $A$.

The correspondence $p\mapsto p(a)$ has many interesting generalizations,  where special properties of $a$ allow one to extend
the kind of functions $p$ used.  "Analytic",  "continuous",  and "Borel" functional calculi are search terms you might
like to try for these generalizations.

Title: Understanding the exponential operator


问:
Calculate volume of $V={\{(x,y,z)|x^2+y^2\leq z\leq \sqrt{6-x^2-y^2}}\}$
Calculate the volume of $$V={\{(x,y,z)|x^2+y^2\leq z\leq \sqrt{6-x^2-y^2}}\}$$

My attempt:

$x=r\cos \theta$,

$y=r \sin \theta$, $z=z$

From here we can calculate the boundaries of our variables:

$0\leq r\leq \sqrt6, 0\leq \theta \leq 2\pi$,
$r^2\leq z\leq \sqrt{6-r^2}$

The jacobian is $J=r$
$$vol(V)=\int\int\int 1{dxdydz}=\int_0^{2\pi}\int_0^\sqrt6\int_{r^2}^{\sqrt{6-r^2}}|J|{dzdrd\theta}=2\pi\int_0^\sqrt6\int_{r^2}^{\sqrt{6-r^2}}rdzdr=$$
$$2\pi\int_0^\sqrt6r(\sqrt{6-r^2}-r^2)dr$$

Now we substitute $$t=r^2, dt=2rdr\implies\pi\int_0^6(\sqrt{6-t}-t)dt$$

But the correct answer should be $$\pi\int_0^2(\sqrt{6-t}-t)dt$$

答:
The intersection is incorrect, by your substitution $x= r\cos(\theta), ~ y = r \sin (\theta) $ we get:

$$\begin{aligned} r^2 &= \sqrt{6-r^2} \\&\implies r^4 = 6-r^2 \\& \implies r = \sqrt{2}, ~ - \sqrt{2} \end{aligned}$$

And not $0 \le r \le \sqrt{6}$


问:
Chord in Orthogonal Circles
Two orthogonal circles with centres $A$ and $B$ have a common chord which meets $AB$ at $C$. $DE$ is a chord of the first circle that passes through $B$. Prove that $A,D,E,$ and $C$ are concyclic.

I have attempted this question using angles in the alternate segment, and properties of cyclic quadrilaterals including Ptolemy's Theorem, but cannot proceed to a proof. Any help would be appreciated.

答:
Proving $ACDE$ cyclic is equivalent to proving $\triangle BCD\sim \triangle BEA$ which is then equivalent to proving $BC\cdot BA=BD\cdot BE$.

To get $BC\cdot BA$, use the similarity of $\triangle BCQ$ and $\triangle BQA$.

This will give $BC\cdot BA=BQ^{2}$

Now, considering the power of point $B$ with respect to the circle with centre $A$ will give the value of $BD\cdot BE$ to be $BQ^{2}$.

Hence, $BC\cdot BA=BQ^{2}=BD\cdot BE$

Title: Chord in Orthogonal Circles


问:
period of a function $\lvert\sin x\rvert+\lvert\cos x\rvert$
I have read that $$y=\lvert\sin x\rvert+ \lvert\cos x\rvert $$ is periodic with fundamental period $\frac{\pi}{2}$.

But Wolfram says it is periodic with period $\pi$.

Please tell what is correct.

答:
Don't trust Wolfram when also you have pen and paper available.

Of course, $x\mapsto \sin x$ and $x\mapsto \cos x$ are functions with period $2\pi$. Composing them with some other function (here the absolute value) gives us functions having $2\pi$ as a period as well. But since $\sin(x+\pi)=-\sin x$ (and similarly for cosine), the absolute value in fact introduces the smaller period $\pi$. Finally adding two functions having $\pi$ as a period gives another function having $\pi$ as a period. But since $|\sin(x+\frac\pi2)|=|\cos x|$ and $|\cos(x+\frac\pi2)|=|\sin x|$, swapping the summands introduces a shorter period again, that is $\frac\pi2$ is a period of our function.
To see that it is fundamental, i.e. that there is no smaller positive number with $f(x+p)=f(x)$ for all $x$, observe that $f(x)=1$ iff $x=\frac\pi2k$ for some $k\in \mathbb Z$ (why?) or that $f$ fails to be differentibale precisely for $x=\frac\pi2 k$ (why?) or that $f$ is strictly increasing on $[0,\frac\pi4]$ (why? and why doe sthat show that $\frac\pi2$ is minimal?) or look for other distinctive features preventing smaller periods ...


问:
What is the equation of a tangent to a circle at a point?
Suppose I have the following circle
$$
(x - x_0)^2 + (y - y_0)^2 = r^2
$$
where the center $(x_0, y_0)$ and the radius $r$ are known. Is there a general formula for the equation of a tangent at a point $(a, b)$ on the circle, with $a, b$ known?

Idea

Since the point $(a, b)$ is on the circle, we must have
$$
(x - a)^2 + (y - b)^2 = r^2
$$
and since the tangent will pass through $(a, b)$ we must have
$$
\frac{y - b}{x - a} = m
$$

How do you incorporate the fact that the radius is perpendicular to the tangent?

Following the comments, I think then one notices that the radius is perpendicular to the tangent. The line through the center $(x_0, y_0)$ and the point $(a, b)$ has slope

$$
m' = \frac{b - y_0}{a - x_0}
$$

Since this line must be perpendicular to the tangent,  we must have that

$$
m'm = -1
$$

Therefore we can already find the slope as
$$
m = -\frac{1}{m'} = - \frac{a - x_0}{b - y_0}
$$

Now we just need to find the intercept. Plugging $(a, b)$ into $y = mx + q$ with the $m$ that we've just found we find
$$
b = ma + q
$$
and so
$$
b + a\left(\frac{a - x_0}{b - y_0}\right)
$$
The final equation is
$$
y = -\frac{a - x_0}{b - y_0} x + b + a\left(\frac{a - x_0}{b - y_0}\right)
$$

答:
HINT:

The tangent should pass through the circumference point (a, b) and since its perpendicular to the radius, it should have a slope negative reciprocal of the slope of the radius vector