TITLE: Any way to simplify the matrix integral $\int_{0}^{\infty}e^{A z}e^{B z}dz$ if A and B do not commute but are diagonalizable>
QUESTION [2 upvotes]: Define $A$ and $B$ square matrices where all eigenvalues are $< 0$ for both, and there is no eigenvalue multiplicity.  Completely diagonalizable, etc.  But assume that $A$ and $B$ do not commute.
Is there any way to simplify the expression: $\int_{0}^{\infty}e^{A z}e^{B z}dz$?
Extension
From the answers, it looks like the Sylvester equation gives the solution here.  I suspect that if we add a matrix multiplied in the middle of the exponents, that it just adds a term to the sylvester equation.
My problem actually looks more like:
$$
\int_{0}^{\infty}e^{A z}\cdot D\cdot e^{B z}\cdot E\cdot e^{C z}dz
$$
Where $A,B,C$ all have negative eigenvalues and none commute, and $D,E$ are as well-behaved as you wish.  Is there a generalization of the sylvester equation for this setup (no worries about the solution to the matrix equation with vec's etc. as I will figure out how to solve it numerically if required)

REPLY [1 votes]: Here is the usual approach. Let $X = \int_0^t e^{Az}e^{Bz} dz$. As all eigenvalues of $A$ and $B$ are negative, $e^{Az}e^{Bz}\to0$ as $z\to\infty$. Hence
$$
AX+XB
=\int_0^\infty (Ae^{Az}e^{Bz} + e^{Az}e^{Bz}B) dz
=\int_0^\infty d e^{Az}e^{Bz}
=-I.
$$
That is, $X$ satisfies the Sylvester equation $AX+XB=-I$. The eigenvalues of the linear map $f:X\mapsto AX+XB$ are sums of the form $\lambda_i+\mu_j$, where $\lambda_1,\ldots,\lambda_n$ are the eigenvalues of $A$ and $\mu_1,\ldots,\mu_n$ are the eigenvalues of $B$. It follows that all eigenvalues of $f$ are negative and the Sylvester equation is uniquely solvable. If you vectorises $X$, the equation can be rewritten as $(I\otimes A+B^T\otimes I)\operatorname{vec}(X)=-\operatorname{vec}(I)$. Therefore an explicit solution of $X$ is given by $\operatorname{vec}(X)=-(I\otimes A+B^T\otimes I)^{-1}\operatorname{vec}(I)$.
One can see that the above result is equivalent to Will Nelson's, but the derivation is different from his.


TITLE: Avoid Loss of significance error
QUESTION [1 upvotes]: I want to compute $f(x)$to avoid loss of significance$$f(x)=\frac{1-\cos x}{x^2}$$
One way is writing Taylor series approximation for $\cos x$ about $x=0$. what about this approach:
$$f(x)=\frac{2\sin^2(\frac x2)}{x^2}$$
Is this ok ?

REPLY [2 votes]: You are already mindful of rounding errors, but that is not the only issue here.

In IEEE floating point arithmetic, $0/0$ evaluates as NaN (not a number). You need a conditional statement to ensure that $f(0)$ is evaluated as $\frac{1}{2}$.
In IEEE double precision, the largest positive number is $(2-2^{-52})\cdot 2^{1023}$, so $x^2$ will certainly overflow to infinity when $|x| \ge 2^{512}$ and the default rounding mode is active. If you evaluate $f$ as you suggested, i.e., $$f(x) = 2 \frac{\sin^2\left(\frac{x}{2}\right)}{x^2},$$ and $x^2$ overflows, then the computed result of $f(x)$ is zero. You avoid this issue by evaluating $f$ as $$f(x) = 2 \left(\frac{\sin\left(\frac{x}{2}\right)}{x}\right)^2.$$
Be mindful of approximations that are more accurate than the rounding error associated with their evaluation.

In general, we seek to compute a target value $T$. We most then choose an approximation $A$ as well as an algorithm for evaluating $A$. In general, the computed value $\hat{A}$ of $A$ will be different from $A$. The total error is $$T-\hat{A} = (T - A) + (A - \hat{A}).$$ Ideally, the two contributions, i.e., the approximation error $T-A$ and the rounding error $A - \hat{A}$ should have the same size and the total error should be less than the user's tolerance $\tau$. Suppose $|T-\hat{A}| < \tau$.

If $|T-A| \ll |A-\hat{A}|$, then we are guilty of mathematical overkill and are probably wasting CPU cycles because very accurate approximations tend to be more costly to evaluate than less accurate approximations.
If $|A-\hat{A}| \ll |T-A|$, then we are guilty of algorithmic overkill and we may be able to find a faster, less accurate algorithm. It may well be enough to execute the same basic algorithm in single precision instead of double precision.


text:
\section{Finite Order Elements of Infinite Abelian Group form Normal Subgroup}
Tags: Normal Subgroups, Infinite Groups, Abelian Groups

\begin{theorem}
Let $G$ be an [[Definition:Infinite Group|infinite]] [[Definition:Abelian Group| abelian group]].
Let $H \subseteq G$ be the [[Definition:Subset|subset]] of $G$ defined as:
:$H := \set {x \in G: x \text { is of finite order in } G}$
Then $H$ forms a [[Definition:Normal Subgroup|normal subgroup]] of $G$.
\end{theorem}

\begin{proof}
Let $e$ be the [[Definition:Identity Element|identity element]] of $G$.
From [[Identity is Only Group Element of Order 1]], $\order e = 1$ and so $H \ne \O$.
Let $a \in H$.
Then by [[Order of Group Element equals Order of Inverse]]:
:$\order a = \order {a^{-1} }$
and so $a \in H$.
Let $a, b \in H$.
From [[Product of Orders of Abelian Group Elements Divides LCM of Order of Product]]:
:$\order {a b} \divides \lcm \set {\order a, \order b}$
where:
:$\order a$ denotes the [[Definition:Order of Group Element|order]] of $a$
:$\divides$ denotes [[Definition:Divisor of Integer|divisibility]]
:$\lcm$ denotes the [[Definition:Lowest Common Multiple of Integers|lowest common multiple]].
Thus $a b$ is also of [[Definition:Finite Order Element|finite order]].
Thus by definition:
:$a b \in H$.
By the [[Two-Step Subgroup Test]] it follows that $H$ is a [[Definition:Subgroup|subgroup]] of $G$.
By [[Subgroup of Abelian Group is Normal]], $H$ is [[Definition:Normal Subgroup|normal]] in $G$.
{{qed}}
\end{proof}

config: wiki


TITLE: Completion of a metric space vs. field extension
QUESTION [0 upvotes]: Given a field $F$ and a metric $\mu$, is the completion of $F$ with respect to $\mu$ always a field?  Additionally, is there an algebraic field extension of $F$ that is isomorphic to the completion of $F$ by $\mu$?

REPLY [0 votes]: Jack M answered the question in the comments above.  I am posting this answer just so that I can close out the question.
Answer:

Jack M wrote:
Of course not, because the metric need not have anything to do with
  the field. As far as the metric is concerned, $F$ is just a set.
  Things might get interesting if the field operations are required to
  be continuous for the metric.
For point (2), note that $\Bbb{R}$ is not an algebraic extension of
  $\Bbb{Q}$


TITLE: find all isometry in ...
QUESTION [0 upvotes]: Let
$$ X=\{ \{x_n \}_{n=1} ^{ \infty } \mid {x_n  } \to 0\ \},$$
where ${x_n  }$ is a  real sequence  and put the metric $ d(x_n ,y_n)= \sup\limits_{n \in \Bbb {N}} |x_n -y_n|$ on $X$.
Let $X$ and $Y$ be metric spaces with metrics $d_X$ and $d_Y$. A map $f : X \to Y$ is called an isometry or distance preserving if for any $a,b \in X$ one has:
$${d_{Y}\left(f(a),f(b)\right)=d_{X}(a,b) }.$$
Now I have two questions:
1- find all isometry from $X$ to $X$.
2-find all isometry from $\Bbb{R}$ to $\Bbb{R}$ with the metric $d(a,b) =  \max\{|a|,|b| \}$ on $\Bbb{R}^2$.
I find $f: X \to X$ , $ f(\{x_n \})=\{x_{P(n)} \} $  and $P: \Bbb{N} \to \Bbb{N}$ is a function that is one to one and onto (permutaion).
We know that an isometry is automatically injective and uniform continuous .for example $f(x)=x$ is trivial isometry. is group of isometry in above questions finite ? so give an example of two metric spaces that are homeomorphic but the group of isometry is not isomorphic.

REPLY [1 votes]: This is not an anwser but it's too long for a comment.
-Your metric on $\mathbb{R}$ is not a metric, because $d(1,1) \neq 0$.
-Could you explain how you found your result about the isometries $X \rightarrow X$?
Note that the metric on $X$ can be induced by a norm on $X$, so every translation of $X$ is an isometry, $-id_X$ is an isometry, and you can find other types of isometries that do not come from permutations. (for instance adding a fixed value at a fixed place in a sequence: those are not surjective).
Finally, if you are looking for surjecive isometries in real normed vector spaces, by the Mazur-Ulam theorem, they are all affine, but even in that case it might not be easy to find all of them, just like it's not easy to determine a group of automorphisms in general.


TITLE: proving that $\lim_{x \to \pi} \frac{1+\cos x }{1+\cos 3x}=\frac{1}{9}$ without L'Hôpital.
QUESTION [0 upvotes]: So basically I'm trying to show $$\lim_{x \to \pi} \frac{1+\cos x }{1+\cos 3x}=\frac{1}{9}$$
It was easy enough using L'Hôpital's rule,  but I want to  solve it without L'Hôpital.
I've tried manipulating the denominator with few simple trig identitities but nothing got me further than $\frac{1+\cos x }{1+\cos 3x}=\frac{1+\cos x}{\cos x(2\cos 2x-1)}$.
So I went to good all Wolfram Alpha which told me $$\frac{1+\cos x }{1+\cos 3x}=\frac{1}{(1-2\cos x)^2}$$ but I didn't get there, so any ideas on showing the equality above will be great.
I really prefer a clue or the first step as I believe I can do it myself- there's just something missing.
Thanks.

REPLY [0 votes]: I always wonder why series expansions are often overlooked when calculating limits:
As shown above we need only consider for $x \rightarrow 0$ the following expression:
$$\frac{1-\cos x}{1-\cos 3x}= \frac{1-(1-\frac{1}{2!}x^2 + \frac{1}{4!}x^4 \mp \cdots) }{1-(1-\frac{1}{2!}(3x)^2 + \frac{1}{4!}(3x)^4 \mp \cdots) } = \frac{\frac{1}{2!} - \frac{1}{4!}x^2 \pm \cdots }{\frac{9}{2!} - \frac{1}{4!}(3x)^2 \pm \cdots } \stackrel{x\rightarrow 0}{\longrightarrow}\frac{1}{9}$$


TITLE: Confusion on the proof and meaning of negative binomial random variables
QUESTION [0 upvotes]: Going through the book Introduction to Probability, Statistics and Random Processes, I stumbled across an interpretation of negative binomial random variables and its proof.
Suppose I have a coin with $P(H) = p$. I toss the coin n times until I see m heads. We define X to be the total number of coin tosses in this experiment. Then X is a negative random variable with parameters m and p.
$$X \sim Negative\ Binomial(m,p)$$
Deriving the PMF of a Negative Binomial Random Variable.
Let A be the event we get m heads. Notice that $A = B\cap C$ where B is the event we get a $m-1$ heads in the first k-1 trials and C is the event we get a heads on the $k^{th}$ trial. Since each coin toss is independent,
$$P(A) = P(B\cap C) = P(B)P(C)$$
$$P(C) = p$$
Then the proof finds P(B) by using the binomial distribution formula.
$$P(B) = {k-1\choose m-1}p^{m-1}(1-p)^{(k-1)-(m-1)} = {k-1\choose m-1}p^{m-1}(1-p)^{k-m}$$
Then P(A) is
$$P(A) = P(B)P(C) = {k-1\choose m-1}p^{m}(1-p)^{k-m}$$
I'm not sure how the binomial coefficient ${k-1\choose m-1}$ makes sense. Instead of choosing $m-1$ heads from $k-1$ trials, can't we just choose $m$ heads from $k$ trials such that
$$P(A) = {k\choose m}p^m(1-p)^{k-m}$$
What makes this different from the regular binomial distribution? Looking online, people said that the negative binomial distribution counts the number of failures fixed and the number of trials is not fixed. In the formula for the Negative Binomial distribution I don't see how it's counting failures?

REPLY [1 votes]: There are at least four formulations of the negative binomial distribution if you consider in your word question:

Are you counting tosses or tails until you get $m$ heads? I.e. is the minimum possible value $m$ or $0$?
Does heads count as a failure (you go on until $m$ failures) or is tails a failure (you go on until $n$ successes? Which has probability $p$?

If you only count tails, then in a sense you are counting failures rather than attempts.  Either way, there is no limit to the number of tails you may see before the $m$th head.  So if tails are a failure then there is no limit to the possible number of failures.
Suppose, as you seem to be, you are counting tosses and the probability of a head is $p$.  Then for the $k$th toss to be the $m$th head you need $m-1$ of the first $k-1$ tosses to be heads and the $k$th toss to be a head.  This has probability ${k-1 \choose m-1}p^{m-1}(1-p)^{(k-1)-(m-1)} \times p$ which is $${k-1 \choose m-1}p^{m}(1-p)^{k - m}$$
and if you sum this from $k=m$ to $\infty$ you should get $1$
Wikipedia has a slightly different formulation but essentially the same result


TITLE: Calculating permutations when an event can end the game
QUESTION [0 upvotes]: There are 50 balls. 40 Black and 10 White. You draw balls without replacement and win if you draw all 10 white balls before drawing 4 black balls in a row.
How do I calculate the probability of winning? What if only 9 or 8 white balls need to be drawn to win?

REPLY [2 votes]: Hint: Draw all 50 balls regardless. Then there are $\binom{50}{10}$ ways to place the 10 white balls. In how many is each white ball preceded by a run of no more than 3 blacks?


TITLE: Given two vectors and Nul A, find Matrix A
QUESTION [1 upvotes]: I am trying to solve this problem of finding matrix A, given null space.
Let u = $\begin{bmatrix}1 \\1 \\ 2\end{bmatrix}$ and v = $\begin{bmatrix}1 \\0 \\ -1\end{bmatrix}$. Find matrix A such that Nul A = Span {u, v}
I know that if you want to find A given only one vector (e.g. w) in Nul A, you just have to find all solutions Aw = 0. But what about two vectors? Should I find sum of them?

REPLY [0 votes]: The vectors given are in the 3d-space, and they are linearly independent. So their span is some plane passing through the origin.  Geometrically there is a unique line passing through the origin that is perpendicular to the plane. Take a point $(a,b,c)$ in that line. So the equation is $ax+by+cz=0$ which will be satisfied precisely by the span of $u$ and $v$. To find the vector $(a,b,c)$ perpendicular to given vectors $u$ and $v$ take their cross-product $u\times v$ as in JeanMarie's answer.