Example to solve for one unknown second order DE
To solve the second-order linear non-homogeneous differential equation using the linear algebra method, we first need to convert it into a system of first-order linear differential equations.
The given differential equation is: $$ \frac{d2x(t)}{dt2} - 12\frac{dx(t)}{dt} + 6x(t) = 28 $$
Step 1: Convert to a System of First-Order ODEs¶
Let's define new variables to reduce the order of the differential equation: Let \(y_1(t) = x(t)\) Let \(y_2(t) = \frac{dx(t)}{dt} = x'(t)\)
Now, we express the derivatives of these new variables: \(y_1'(t) = x'(t) = y_2(t)\) \(y_2'(t) = x''(t)\)
From the original differential equation, we can express \(x''(t)\): \(x''(t) = 12\frac{dx(t)}{dt} - 6x(t) + 28\) Substituting \(y_1(t)\) and \(y_2(t)\): \(y_2'(t) = 12y_2(t) - 6y_1(t) + 28\)
Now, we can write the system of first-order differential equations in matrix form \(\mathbf{y}'(t) = A\mathbf{y}(t) + \mathbf{f}(t)\): $$ \begin{bmatrix} y_1'(t) \ y_2'(t) \end{bmatrix} = \begin{bmatrix} 0 & 1 \ -6 & 12 \end{bmatrix} \begin{bmatrix} y_1(t) \ y_2(t) \end{bmatrix} + \begin{bmatrix} 0 \ 28 \end{bmatrix} $$ Here, the coefficient matrix is \(A = \begin{bmatrix} 0 & 1 \\ -6 & 12 \end{bmatrix}\) and the forcing vector is \(\mathbf{f}(t) = \begin{bmatrix} 0 \\ 28 \end{bmatrix}\).
Step 2: Solve the Homogeneous System¶
First, we find the general solution for the homogeneous system \(\mathbf{y}'(t) = A\mathbf{y}(t)\): $$ \begin{bmatrix} y_1'(t) \ y_2'(t) \end{bmatrix} = \begin{bmatrix} 0 & 1 \ -6 & 12 \end{bmatrix} \begin{bmatrix} y_1(t) \ y_2(t) \end{bmatrix} $$
2.1. Find the Eigenvalues (\(\lambda\)) of Matrix \(A\) To find the eigenvalues, we solve the characteristic equation \(\det(A - \lambda I) = 0\): $$ \det \left( \begin{bmatrix} 0 & 1 \ -6 & 12 \end{bmatrix} - \lambda \begin{bmatrix} 1 & 0 \ 0 & 1 \end{bmatrix} \right) = 0 $$ $$ \det \left( \begin{bmatrix} -\lambda & 1 \ -6 & 12-\lambda \end{bmatrix} \right) = 0 $$ $$ (-\lambda)(12-\lambda) - (1)(-6) = 0 $$ $$ -12\lambda + \lambda^2 + 6 = 0 $$ $$ \lambda^2 - 12\lambda + 6 = 0 $$ Using the quadratic formula \(\lambda = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\): $$ \lambda = \frac{-(-12) \pm \sqrt{(-12)^2 - 4(1)(6)}}{2(1)} $$ $$ \lambda = \frac{12 \pm \sqrt{144 - 24}}{2} $$ $$ \lambda = \frac{12 \pm \sqrt{120}}{2} $$ $$ \lambda = \frac{12 \pm 2\sqrt{30}}{2} $$ $$ \lambda = 6 \pm \sqrt{30} $$ So, the two distinct real eigenvalues are: \(\lambda_1 = 6 + \sqrt{30}\) \(\lambda_2 = 6 - \sqrt{30}\)
2.2. Find the Corresponding Eigenvectors (\(\mathbf{v}\))
For \(\lambda_1 = 6 + \sqrt{30}\): We solve \((A - \lambda_1 I)\mathbf{v}_1 = \mathbf{0}\): $$ \begin{bmatrix} -(6+\sqrt{30}) & 1 \ -6 & 12-(6+\sqrt{30}) \end{bmatrix} \begin{bmatrix} v_{11} \ v_{12} \end{bmatrix} = \begin{bmatrix} 0 \ 0 \end{bmatrix} $$ $$ \begin{bmatrix} -(6+\sqrt{30}) & 1 \ -6 & 6-\sqrt{30} \end{bmatrix} \begin{bmatrix} v_{11} \ v_{12} \end{bmatrix} = \begin{bmatrix} 0 \ 0 \end{bmatrix} $$ From the first row, we have: \(-(6+\sqrt{30})v_{11} + v_{12} = 0 \implies v_{12} = (6+\sqrt{30})v_{11}\) Let \(v_{11} = 1\). Then \(v_{12} = 6+\sqrt{30}\). Thus, the first eigenvector is: $$ \mathbf{v}_1 = \begin{bmatrix} 1 \ 6+\sqrt{30} \end{bmatrix} $$
For \(\lambda_2 = 6 - \sqrt{30}\): We solve \((A - \lambda_2 I)\mathbf{v}_2 = \mathbf{0}\): $$ \begin{bmatrix} -(6-\sqrt{30}) & 1 \ -6 & 12-(6-\sqrt{30}) \end{bmatrix} \begin{bmatrix} v_{21} \ v_{22} \end{bmatrix} = \begin{bmatrix} 0 \ 0 \end{bmatrix} $$ $$ \begin{bmatrix} -(6-\sqrt{30}) & 1 \ -6 & 6+\sqrt{30} \end{bmatrix} \begin{bmatrix} v_{21} \ v_{22} \end{bmatrix} = \begin{bmatrix} 0 \ 0 \end{bmatrix} $$ From the first row, we have: \(-(6-\sqrt{30})v_{21} + v_{22} = 0 \implies v_{22} = (6-\sqrt{30})v_{21}\) Let \(v_{21} = 1\). Then \(v_{22} = 6-\sqrt{30}\). Thus, the second eigenvector is: $$ \mathbf{v}_2 = \begin{bmatrix} 1 \ 6-\sqrt{30} \end{bmatrix} $$
2.3. Construct the Homogeneous Solution (\(\mathbf{y}_h(t)\)) The general solution for the homogeneous system is a linear combination of the fundamental solutions derived from the eigenvalues and eigenvectors: $$ \mathbf{y}_h(t) = c_1 \mathbf{v}_1 e^{\lambda_1 t} + c_2 \mathbf{v}_2 e^{\lambda_2 t} $$ $$ \mathbf{y}_h(t) = c_1 \begin{bmatrix} 1 \ 6+\sqrt{30} \end{bmatrix} e^{(6+\sqrt{30})t} + c_2 \begin{bmatrix} 1 \ 6-\sqrt{30} \end{bmatrix} e^{(6-\sqrt{30})t} $$ where \(c_1\) and \(c_2\) are arbitrary constants.
Step 3: Find a Particular Solution (\(\mathbf{y}_p(t)\))¶
Since the non-homogeneous term \(\mathbf{f}(t) = \begin{bmatrix} 0 \\ 28 \end{bmatrix}\) is a constant vector, we can assume a constant particular solution for \(\mathbf{y}_p(t) = \begin{bmatrix} y_{p1} \\ y_{p2} \end{bmatrix}\). If \(\mathbf{y}_p(t)\) is constant, then its derivative \(\mathbf{y}_p'(t) = \begin{bmatrix} 0 \\ 0 \end{bmatrix}\).
Substitute this into the full non-homogeneous system \(\mathbf{y}'(t) = A\mathbf{y}(t) + \mathbf{f}(t)\): $$ \begin{bmatrix} 0 \ 0 \end{bmatrix} = \begin{bmatrix} 0 & 1 \ -6 & 12 \end{bmatrix} \begin{bmatrix} y_{p1} \ y_{p2} \end{bmatrix} + \begin{bmatrix} 0 \ 28 \end{bmatrix} $$ Performing the matrix multiplication: $$ \begin{bmatrix} 0 \ 0 \end{bmatrix} = \begin{bmatrix} y_{p2} \ -6y_{p1} + 12y_{p2} \end{bmatrix} + \begin{bmatrix} 0 \ 28 \end{bmatrix} $$ This gives us a system of two algebraic equations: 1. \(0 = y_{p2} + 0 \implies y_{p2} = 0\) 2. \(0 = -6y_{p1} + 12y_{p2} + 28\)
Substitute \(y_{p2} = 0\) into the second equation: \(0 = -6y_{p1} + 12(0) + 28\) \(0 = -6y_{p1} + 28\) \(6y_{p1} = 28\) \(y_{p1} = \frac{28}{6} = \frac{14}{3}\)
So, the particular solution vector is: $$ \mathbf{y}_p(t) = \begin{bmatrix} 14/3 \ 0 \end{bmatrix} $$
Step 4: Construct the General Solution for \(x(t)\)¶
The general solution for the system \(\mathbf{y}(t)\) is the sum of the homogeneous solution and the particular solution: $$ \mathbf{y}(t) = \mathbf{y}_h(t) + \mathbf{y}_p(t) $$ $$ \mathbf{y}(t) = c_1 \begin{bmatrix} 1 \ 6+\sqrt{30} \end{bmatrix} e^{(6+\sqrt{30})t} + c_2 \begin{bmatrix} 1 \ 6-\sqrt{30} \end{bmatrix} e^{(6-\sqrt{30})t} + \begin{bmatrix} 14/3 \ 0 \end{bmatrix} $$ $$ \begin{bmatrix} y_1(t) \ y_2(t) \end{bmatrix} = \begin{bmatrix} c_1 e^{(6+\sqrt{30})t} + c_2 e^{(6-\sqrt{30})t} + \frac{14}{3} \ c_1(6+\sqrt{30}) e^{(6+\sqrt{30})t} + c_2(6-\sqrt{30}) e^{(6-\sqrt{30})t} + 0 \end{bmatrix} $$
Since we are interested in solving for \(x(t)\), which is \(y_1(t)\), we take the first component of the general solution vector:
This is the general solution to the given second-order linear non-homogeneous differential equation obtained using the linear algebra method. The constants would be determined by any initial conditions provided.