Solving a first order matrix differential equation

  • #1
docnet
Gold Member
672
307
Homework Statement
TL;DR: solving for ##P(t)=e^{Qt}## doesn't go as planned, ending up with an answer that is similar to the given answer, but with missing terms in each entry.
Relevant Equations
.
Let X be a continuous-time Markov chain that hops between two states ##\{1, 2\}## with rates ##\lambda, \mu>0##, so its generator is
$$Q = \begin{pmatrix}
-\mu & \mu\\
\lambda & -\lambda
\end{pmatrix}.$$
Solve ##\pi Q = 0## for the stationary distribution, and verify that ##P_{ij}(t)\longrightarrow \pi_j## as ##t\longrightarrow \infty.##
\\\\
By looking at ##Q, ## it is easy to see that ##\text{Row }1 \cdot \lambda +\text{Row }2\cdot \mu =0##. This implies ##\pi = (\lambda,\mu) C## for a constant ##C## such that ##\pi_1+\pi_2=1.## Solving for ##C,## we have
$$(\lambda + \mu)C = 1,$$
$$C = \frac{1}{\lambda + \mu}.$$
And so
$$\pi = \Big(\frac{\lambda}{\lambda + \mu}, \frac{\mu}{\lambda + \mu}\Big).$$
\\\\
We know from Wiki that the transition matrix ##P(t)## is
$$P(t)=Ce^{Qt}$$
where ##C## is a constant matrix that is determined by the initial condition ##P(0)=I.## In order to find ##e^{Qt},## we use the eigendecomposition of ##Qt.## The eigenvectors of ##Q## are
$$\begin{pmatrix}
\mu & -\lambda
\end{pmatrix}
\text{ and }
\begin{pmatrix}
1 & 1
\end{pmatrix}$$
with respective eigenvalues ##-(\mu+\lambda)## and ##0##. And so we have the eigendecomposition
$$
Qt =
\begin{pmatrix}
\mu & 1\\
-\lambda & 1
\end{pmatrix}
\begin{pmatrix}
-(\mu+\lambda)t & 0 \\
0 & 0
\end{pmatrix}
\begin{pmatrix}
\lambda & \mu\\
1 & 1
\end{pmatrix}^{-1}.$$
And so,
\begin{align*}
e^{Qt}&=
\begin{pmatrix}
\mu & 1\\
-\lambda & 1
\end{pmatrix}
\begin{pmatrix}
e^{-(\mu+\lambda)t} & 0 \\
0 & 0
\end{pmatrix}
\begin{pmatrix}
\mu & 1\\
-\lambda & 1
\end{pmatrix}^{-1}\\
&= \begin{pmatrix}
\mu & 1\\
-\lambda & 1
\end{pmatrix}
\begin{pmatrix}
\frac{e^{-(\mu+\lambda)t}}{\mu+\lambda} & 0 \\
0 & 0
\end{pmatrix}
\begin{pmatrix}
1 & -1\\
\lambda & \mu
\end{pmatrix}\\
&= \begin{pmatrix}
\frac{\mu e^{-(\mu+\lambda)t}}{\mu+\lambda}&\frac{-\mu e^{-(\mu+\lambda)t}}{\mu+\lambda}\\
\frac{-\lambda e^{-(\mu+\lambda)t}}{\mu+\lambda}& \frac{\lambda e^{-(\mu+\lambda)t}}{\mu+\lambda}
\end{pmatrix}.
\end{align*}
However, this solution does not satisfy the initial condition ##P(0)=I##. My answer differs from the true solution given by wiki, which is given by Wiki as
$$P(t)=
\begin{pmatrix}
\frac{\lambda}{\mu+\lambda} + \frac{\mu e^{-(\mu+\lambda)t}}{\mu+\lambda}&\frac{\mu}{\mu+\lambda} +\frac{-\mu e^{-(\mu+\lambda)t}}{\mu+\lambda}\\
\frac{\lambda}{\mu+\lambda} +\frac{-\lambda e^{-(\mu+\lambda)t}}{\mu+\lambda}& \frac{\mu}{\mu+\lambda} + \frac{\lambda e^{-(\mu+\lambda)t}}{\mu+\lambda}
\end{pmatrix}.$$

My solution is lacking the terms
$$\begin{pmatrix}
\frac{\lambda}{\lambda + \mu} & \frac{\mu}{\lambda + \mu}\\
\frac{\lambda}{\lambda + \mu} & \frac{\mu}{\lambda + \mu}
\end{pmatrix}.$$
Which is $$\lim_{t \to \infty}P(t).$$

I've tried for a while and don't see where these terms could have come from, and where I made a mistake in computing ##e^{Qt}.##
 
Physics news on Phys.org
  • #2
##e^0 = 1 \neq 0##
 
  • Like
Likes docnet
  • #3
🤣 :doh: How embarrassing..
 
  • #4
I am just winging it. :headbang:
 
  • #5
Thank you for pointing out my error.
 
  • #6
docnet said:
🤣 :doh: How embarrassing..
We all do those things from time to time.
 
  • Like
Likes docnet
  • #7
$$P(t)=e^{Qt}$$
We use the eigendecomposition of ##Qt.## The eigenvectors of ##Q## are
$$\begin{pmatrix}
\mu & -\lambda
\end{pmatrix}
\text{ and }
\begin{pmatrix}
1 & 1
\end{pmatrix}$$
with respective eigenvalues ##-(\mu+\lambda)## and ##0##. And so we have the eigendecomposition
$$
Qt =
\begin{pmatrix}
\mu & 1\\
-\lambda & 1
\end{pmatrix}
\begin{pmatrix}
-(\mu+\lambda)t & 0 \\
0 & 0
\end{pmatrix}
\begin{pmatrix}
\mu & 1\\
-\lambda & 1
\end{pmatrix}^{-1}.$$
And so,
\begin{align*}
e^{Qt}&=
\begin{pmatrix}
\mu & 1\\
-\lambda & 1
\end{pmatrix}
\begin{pmatrix}
e^{-(\mu+\lambda)t} & 0 \\
0 & e^0
\end{pmatrix}
\begin{pmatrix}
\mu & 1\\
-\lambda & 1
\end{pmatrix}^{-1}\\
&=\frac{1}{\mu+\lambda} \begin{pmatrix}
\mu & 1\\
-\lambda & 1
\end{pmatrix}
\begin{pmatrix}
e^{-(\mu+\lambda)t} & 0 \\
0 & 1
\end{pmatrix}
\begin{pmatrix}
1 & -1\\
\lambda & \mu
\end{pmatrix}\\
&=\frac{1}{\mu+\lambda} \begin{pmatrix}
\mu & 1\\
-\lambda & 1
\end{pmatrix}
\begin{pmatrix}
e^{-(\mu+\lambda)t} & -e^{-(\mu+\lambda)t}\\
\lambda & \mu
\end{pmatrix}\\
P(t)&=
\begin{pmatrix}
\frac{\lambda}{\mu+\lambda} + \frac{\mu e^{-(\mu+\lambda)t}}{\mu+\lambda}&\frac{\mu}{\mu+\lambda} +\frac{-\mu e^{-(\mu+\lambda)t}}{\mu+\lambda}\\
\frac{\lambda}{\mu+\lambda} +\frac{-\lambda e^{-(\mu+\lambda)t}}{\mu+\lambda}& \frac{\mu}{\mu+\lambda} + \frac{\lambda e^{-(\mu+\lambda)t}}{\mu+\lambda}
\end{pmatrix}.
\end{align*}
We take the limit of ##P(t)## as ##t\longrightarrow \infty##.
\begin{align*}
\lim_{t \to \infty}P(t)&= \lim_{t \to \infty}\begin{pmatrix}
\frac{\lambda}{\mu+\lambda} + \frac{\mu e^{-(\mu+\lambda)t}}{\mu+\lambda}&\frac{\mu}{\mu+\lambda} +\frac{-\mu e^{-(\mu+\lambda)t}}{\mu+\lambda}\\
\frac{\lambda}{\mu+\lambda} +\frac{-\lambda e^{-(\mu+\lambda)t}}{\mu+\lambda}& \frac{\mu}{\mu+\lambda} + \frac{\lambda e^{-(\mu+\lambda)t}}{\mu+\lambda}
\end{pmatrix}\\
&=
\begin{pmatrix}
\frac{\lambda}{\lambda + \mu} & \frac{\mu}{\lambda + \mu}\\
\frac{\lambda}{\lambda + \mu} & \frac{\mu}{\lambda + \mu}
\end{pmatrix}.
\end{align*}
And so ##P_{ij}(t)\longrightarrow \pi_j## as ##t\longrightarrow \infty##.


Edit: ##LATEX## Embedding.
 
Last edited:

Similar threads

  • Calculus and Beyond Homework Help
Replies
7
Views
491
  • Calculus and Beyond Homework Help
Replies
2
Views
448
  • Calculus and Beyond Homework Help
Replies
12
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
661
  • Calculus and Beyond Homework Help
Replies
6
Views
579
  • Calculus and Beyond Homework Help
Replies
2
Views
607
  • Calculus and Beyond Homework Help
Replies
2
Views
233
  • Calculus and Beyond Homework Help
Replies
20
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
785
  • Calculus and Beyond Homework Help
Replies
3
Views
825
Back
Top