

Let c = T be vector for which MatLab is solving, then v0 = c = linsolvev,v0 produces the solution c = T, so the unique solution to the IVP is ut = e 1.75t e 0.125t +. Assume that the eigenvectors are stored in v as presented in 3. We use our example above with u 0 = T or v 0 = T to illustrate the appropriate MatLab commands. 2ģ Solution to the System of Linear Differential Equations Since ut = vt+u e, it follows that the general solution to 1 is ut = c e 1.75t +c e 0.125t + Thespecificsolution toaninitial valueproblem, whereu0 = u 0, isreadilyfoundusingmatlab and solving the vector equation: c 1 ξ 1 +c 2 ξ 2 +u e = u 0. For this example MatLab produces: d = v =, which gives the general solution to System 2 as vt = c 1 e 1.75t c e 0.125t. The MatLab command = eiga produces the eigenvalues on the diagonal of matrix d with the corresponding eigenvectors appearing as columns of matrix v. Once again MatLab is an excellent program for solving this eigenvalue problem. For this system with distinct real eigenvalues, λ 1 and λ 2, and corresponding eigenvectors, ξ 1 and ξ 2, the solution of System 2 satisfies: v 2 vt = c 1 ξ 1 e λ 1t +c 2 ξ 2 e λ 2t, where c 1 and c 2 are arbitrary constants. v1 For this problem we seek solutions vt = ξe λt, and the result is the eigenvalue problem: A λiξ = 0, where det A λi = 0, provides the characteristic equation for the eigenvalues and ξ are the corresponding eigenvectors. B = rrefb The results are the following: Linear Analysis As noted in the lecture notes, Systems of Two First Order Equations, the original state variable, u, is translated to the new state variable, v = u u e, resulting in the new linear system of differential equations centered at the origin: or more simply v1 v = v = Av. Below we show the commands necessary for this solution method.

There used to be a common teaching tool called rrefmovie, which showed all the steps of the process including the names of the operation, but this function appears to have been removed after Version 10 of MatLab. The third method is to use the row-reduced echelon form for transforming an augmented matrix into the identity with the solution in the last column. A = b = u = linsolvea,b u = inva*bĢ Both results produce the variable u = T for the equilibrium solution. Define the variables, then the following commands readily provide the solution. The two most common means to solving this linear system are to use the program linsolve or to take advantage of MatLab s ability to invert a matrix.

Below we provide three ways in MatLab to find u e, the equilibrium solution. For the greenhouse/rockbed model above, the equilibrium model satisfies: This is more simply written: u1e u 2e Au e = b, = where A is the matrix of coefficients, u e is the equilibrium solution, and b is the nonhomogeneous vector from the external environment. This is very basic for MatLab and can be accomplished in a number of ways. However, when the functions f 1 and f 2 are linear, then finding equilibria reduces to solving a linear system of equations. In the general case where the right hand side of the system of differential equations is nonlinear, this problem can be very complex.

Equilibria Equilibria occur when the derivative is zero. The Greenhouse/Rockbed Model from the lecture notes is given by the linear system of differential equations: u1 u = u1 u This example will provide the primary case for our MatLab commands listed below. This section will concentrate on the case when f 1 and f 2 are linear to parallel the lecture notes, Systems of Two First Order Equations. The general two dimensional autonomous system of differential equations in the state variables x 1 t and x 2 t can be written: ẋ 1 = f 1 x 1,x 2, ẋ 2 = f 2 x 1,x 2, where the functions f 1 and f 2 may be nonlinear. Numerical routines can simulate the system of differential equations, while the special routine pplane allows easy study of the system with excellent graphics. Near an equilibrium the linear behavior is most important, which requires studying eigenvalue problems. The system of differential equations is introduced. It goes through the key steps of solving systems of differential equations through the numerical methods of MatLab along with its graphical solutions. 1 Fall 2015 Math 337 MatLab - Systems of Differential Equations This section examines systems of differential equations.
