非齐次矩阵指数求解:给定线性微分方程组初值问题
Hey, great that you already have the matrix exponential for the homogeneous system—this makes solving the nonhomogeneous ODE system straightforward with the variation of parameters method! Let’s walk through this step by step.
For a nonhomogeneous linear system:
$$\frac{d\mathbf{z}}{du} = P\mathbf{z} + \mathbf{f}(u)$$
with initial condition $\mathbf{z}(0) = \mathbf{0}$, the solution is given by:
$$\mathbf{z}(u) = \exp(Pu)\mathbf{z}(0) + \exp(Pu)\int_{0}^{u} \exp(-Pt)\mathbf{f}(t) dt$$
Since $\mathbf{z}(0) = \mathbf{0}$, the first term vanishes, so we only need to compute the integral term.
We know $\exp(Pt) = \exp(-xt)\begin{bmatrix}\cos(yt)& \sin(yt)\ -\sin(yt) & \cos(yt)\end{bmatrix}$. Using the property $\exp(-Pt) = \exp(P(-t))$, substitute $t$ with $-t$:
$$\exp(-Pt) = \exp(xt)\begin{bmatrix}\cos(-yt)& \sin(-yt)\ -\sin(-yt) & \cos(-yt)\end{bmatrix} = \exp(xt)\begin{bmatrix}\cos(yt)& -\sin(yt)\ \sin(yt) & \cos(yt)\end{bmatrix}$$
Our forcing term is $\mathbf{f}(t) = \begin{bmatrix}\cos(zt)\ -\sin(zt)\end{bmatrix}$. Multiply this by $\exp(-Pt)$:
$$
\begin{align*}
\exp(-Pt)\mathbf{f}(t) &= \exp(xt)\begin{bmatrix}\cos(yt)\cos(zt) + \sin(yt)\sin(zt) \ \sin(yt)\cos(zt) - \cos(yt)\sin(zt)\end{bmatrix} \
&= \exp(xt)\begin{bmatrix}\cos((y-z)t) \ \sin((y-z)t)\end{bmatrix}
\end{align*}
$$
We used the cosine difference identity $\cos(A-B) = \cos A \cos B + \sin A \sin B$ and sine difference identity $\sin(A-B) = \sin A \cos B - \cos A \sin B$ here to simplify the trigonometric terms.
Now compute the integral of the simplified term:
$$\int_{0}^{u} \exp(-Pt)\mathbf{f}(t) dt = \begin{bmatrix}\int_{0}^{u} \exp(xt)\cos((y-z)t) dt \\ \int_{0}^{u} \exp(xt)\sin((y-z)t) dt \end{bmatrix}$$
Use standard integral formulas for exponential-trigonometric products:
- $\int \exp(at)\cos(bt)dt = \frac{\exp(at)}{a2+b2}(a\cos(bt)+b\sin(bt)) + C$
- $\int \exp(at)\sin(bt)dt = \frac{\exp(at)}{a2+b2}(a\sin(bt)-b\cos(bt)) + C$
Let $a = x$, $b = y-z$, and evaluate from $0$ to $u$:
First integral:
$$\int_{0}^{u} \exp(xt)\cos((y-z)t)dt = \frac{\exp(xu)\left[x\cos((y-z)u)+(y-z)\sin((y-z)u)\right] - x}{x2+(y-z)2}$$
Second integral:
$$\int_{0}^{u} \exp(xt)\sin((y-z)t)dt = \frac{\exp(xu)\left[x\sin((y-z)u)-(y-z)\cos((y-z)u)\right] + (y-z)}{x2+(y-z)2}$$
Multiply the integral result by $\exp(Pu) = \exp(-xu)\begin{bmatrix}\cos(yu)& \sin(yu)\ -\sin(yu) & \cos(yu)\end{bmatrix}$. The $\exp(xu)$ and $\exp(-xu)$ terms cancel out, leaving us to perform matrix multiplication and simplify with trigonometric identities again.
Final Solution for $a(u)$:
$$a(u) = \frac{1}{x2+(y-z)2}\left[ x\cos(zu) - (y-z)\sin(zu) - \exp(-xu)\left( x\cos(yu) - (y-z)\sin(yu) \right) \right]$$
Final Solution for $b(u)$:
$$b(u) = \frac{1}{x2+(y-z)2}\left[ -x\sin(zu) - (y-z)\cos(zu) + \exp(-xu)\left( x\sin(yu) + (y-z)\cos(yu) \right) \right]$$
Plugging in $u=0$ (where $\cos(0)=1$, $\sin(0)=0$, $\exp(0)=1$):
- $a(0) = \frac{1}{x2+(y-z)2}\left[x(1) - (y-z)(0) - 1\left(x(1)-(y-z)(0)\right)\right] = 0$
- $b(0) = \frac{1}{x2+(y-z)2}\left[-x(0) - (y-z)(1) + 1\left(x(0)+(y-z)(1)\right)\right] = 0$
Which matches the given initial condition $\mathbf{z}(0)=\mathbf{0}$.
内容的提问来源于stack exchange,提问作者Hideki Ryuga

