$\begin{bmatrix}\dot{x_{1}}\\ \dot{x_{2}}\end{bmatrix}=\begin{bmatrix}a & b\\ c & d\end{bmatrix}\begin{bmatrix}x_{1}\\ x_{2}\end{bmatrix}$
$\det(A-\lambda I) = \lambda^{2}-\tau\lambda+\Delta=0$
$\lambda_{1,2} = \frac{\tau \pm \sqrt{\tau^2 - 4 \Delta}}{2}$
où:
$\mathbf{X}(t) = C_1 \mathbf{X}^{(1)}(t) + C_2 \mathbf{X}^{(2)}(t) $
$\mathbf{X}^{(1)}(t) = e^{\lambda_1 t} \mathbf{v_1} $
$\mathbf{X}^{(2)}(t) = e^{\lambda_2 t} \mathbf{v_2} $
$\mathbf{\dot{x}}=\begin{bmatrix}1 & 3\\ 3 & 1\end{bmatrix}\mathbf{x}$
A = [1 3; 3 1]
[v, lambda] = eig(A)
A = 1 3 3 1 v = -0.70711 0.70711 0.70711 0.70711 lambda = Diagonal Matrix -2 0 0 4
$\mathbf{X}(t) = C_1 \mathbf{X}^{(1)}(t) + C_2 \mathbf{X}^{(2)}(t) $
$\mathbf{X}^{(1)}(t) = e^{\lambda t} \mathbf{v_1} $
$\mathbf{X}^{(2)}(t) = e^{\lambda t} (\mathbf{v_2} + t\mathbf{v_1}) $
$\mathbf{\dot{x}}=\begin{bmatrix}3 & -4\\ 1 & -1\end{bmatrix}\mathbf{x}$
A = [3 -4; 1 -1]
[v, lambda] = eig(A)
A = 3 -4 1 -1 v = 0.89443 0.89443 0.44721 0.44721 lambda = Diagonal Matrix 1 0 0 1
$\mathbf{X}(t) = C_1 \mathbf{X}^{(1)}(t) + C_2 \mathbf{X}^{(2)}(t) $
$\mathbf{X}^{(1)}(t) = e^{\alpha t} (\cos(\beta t)\mathbf{u} - \sin(\beta t)\mathbf{v} ) $
$\mathbf{X}^{(2)}(t) = e^{\alpha t} (\sin(\beta t)\mathbf{u} + \cos(\beta t)\mathbf{v}) $
$\mathbf{\dot{x}}=\begin{bmatrix}0 & 4\\ -1 & 0\end{bmatrix}\mathbf{x}$
A = [0 4; -1 0]
[v, lambda] = eig(A)
A = 0 4 -1 0 v = 0.89443 + 0.00000i 0.89443 - 0.00000i 0.00000 + 0.44721i 0.00000 - 0.44721i lambda = Diagonal Matrix 0.0000 + 2.0000i 0 0 0.0000 - 2.0000i
$ \lambda_1 = -2$ , $\lambda_2 =4$
$ \mathbf{v_1} = \begin{bmatrix} 1 \\ -1 \end{bmatrix} $ , $\mathbf{v_2} = \begin{bmatrix} 1 \\ 1 \end{bmatrix}$
$ \mathbf{x}(t) = \begin{cases} x_1(t) &= c_1 e^{-2t} + c2 e^{4t} \\ x_2(t) &= -c_1 e^{-2t} + c2 e^{4t} \end{cases}$
$ \mathbf{x}(t) = \begin{cases} x_1(t) &= c_1 e^{-2t} + c_2 e^{4t} \\ x_2(t) &= -c_1 e^{-2t} + c_2 e^{4t} \end{cases}$
C = [1 1; -1 1]
x_0 = [0.5; 0]
c = C \ x_0 # Solve the system with fixed initial conditions
lambda_1 = -2;
lambda_2 = 4;
c_1 = c(1,1);
c_2 = c(2,1);
C = 1 1 -1 1 x_0 = 0.50000 0.00000 c = 0.25000 0.25000 lambda_1 = -2 lambda_2 = 4 c_1 = 0.25000 c_2 = 0.25000
t = 0:0.1:0.5
x_1 = c_1 * exp(t*lambda_1) + c_2 * exp(t*lambda_2)
x_2 = -c_1 * exp(t*lambda_1) + c_2 * exp(t*lambda_2)
t = 0.00000 0.10000 0.20000 0.30000 0.40000 0.50000 x_1 = 0.50000 0.57764 0.72397 0.96723 1.35059 1.93923 x_2 = 0.00000 0.16827 0.38881 0.69283 1.12593 1.75529
axis([-2 2 -2 2])
hold on
plot(x_1,x_2,"o-","color","k")
title(sprintf("Trajectoire pour x_0 = [%d %d]",x_0))
subplot(1,2,1);
plot(t, x_1);
title("x_1(t)")
subplot(1,2,2);
plot(t, x_2);
title("x_2(t)")
## Compute the trajectories given the initial condition, coefficient matrix and eigenvalues
## usage: [x1 x2] = sode_ex1(C,x_0,lambda_1,lambda_2)
##
## Parameters:
## C = Coefficient matrix
## x_0 = Initial condition vector
## lambda_1 = First eigenvalue
## lambda_2 = Second eigenvalue
function [x_1 x_2] = sode_ex1(C,x_0,lambda_1,lambda_2,t)
c = C \ x_0; # Solve the system with fixed initial conditions to get c_1 and c_2
c_1 = c(1,1);
c_2 = c(2,1);
x_1 = c_1 * exp(t*lambda_1) + c_2 * exp(t*lambda_2);
x_2 = -c_1 * exp(t*lambda_1) + c_2 * exp(t*lambda_2);
endfunction
#N.B. Carriage return in the end of the function
t = 0:0.1:0.5
[x_1 x_2] = sode_ex1(C,[0 ;-0.5],lambda_1,lambda_2,t)
t = 0.00000 0.10000 0.20000 0.30000 0.40000 0.50000 x_1 = 0.00000 -0.16827 -0.38881 -0.69283 -1.12593 -1.75529 x_2 = -0.50000 -0.57764 -0.72397 -0.96723 -1.35059 -1.93923
axis([-2 2 -2 2])
hold on
plot(x_1,x_2,"o-","color","k")
title(sprintf("Trajectoire pour x_0 = [%d %d]",x_0))
subplot(1,2,1);
plot(t, x_1);
title("x_1(t)")
subplot(1,2,2);
plot(t, x_2);
title("x_2(t)")
t = 0:0.1:0.5; X_0 = [[0,0.5];[0,-0.5];[0,0];[1,1];[1,-1]]'; #cbind like
for x_0 = X_0 # Column-wise iteration
[x_1 x_2] = sode_ex1(C,x_0,lambda_1,lambda_2,t);
hold on
plot(x_1,x_2,sprintf(";[%d %d];o-",x_0))
hold on
endfor
h = legend; legend(h,"location","southeast");
for x_0 = X_0 # Column-wise iteration
[x_1 x_2] = sode_ex1(C,x_0,lambda_1,lambda_2,t)
endfor
x_1 = 0.00000 0.16827 0.38881 0.69283 1.12593 1.75529 x_2 = 0.50000 0.57764 0.72397 0.96723 1.35059 1.93923 x_1 = 0.00000 -0.16827 -0.38881 -0.69283 -1.12593 -1.75529 x_2 = -0.50000 -0.57764 -0.72397 -0.96723 -1.35059 -1.93923 x_1 = 0 0 0 0 0 0 x_2 = 0 0 0 0 0 0 x_1 = 1.0000 1.4918 2.2255 3.3201 4.9530 7.3891 x_2 = 1.0000 1.4918 2.2255 3.3201 4.9530 7.3891 x_1 = 1.00000 0.81873 0.67032 0.54881 0.44933 0.36788 x_2 = -1.00000 -0.81873 -0.67032 -0.54881 -0.44933 -0.36788