Example 1: A Linear System and Matrix Operations

As an example of how to analyze aspects of linear systems (or linearizations of nonlinear systems) using the Mathcad, consider the following vector difference equation in the 4-dimensional Euclidean space:

First assume that b = 0, so the variable cosine coefficient is now a constant 1. The resulting homogeneous linear system is autonomous and is given by the map AX, where X = (x1, x2, x3, x4) and A is the matrix:

For each value of the parameter a, we may compute the eigenvalues and the spectral radius (modulus of the largest eigenvalue) of A with the Mathcad as follows (we set a = 0.7):

For more matrix operations, see below. A Mathcad plot of a portion of the time series is shown next, revealing the expanding nature of the solution (consistent with the spectral radius being larger than 1):

Now, keeping the same value for a, we insert a nonzero value for b, and notice the change in the trajectory behavior (b = 0.02, same initial conditions):

Different values of b result in different types of trajectories. Once a Mathcad worksheet is written up, any changes in parameters will quickly result in recomputing the new trajectories, eigenvalues, etc. If you have a copy of the Mathcad 2000 installed on your machine and are familiar with the software's basic operations, click the link at the bottom of this page to run the file that contains the worksheet for this example. The worksheet includes all commands and formatting, so by changing the parameters or the matrices, the same computations can be carried out for other linear problems.

Note: If you have turned the "Automatic Calculation" mode off (recommended while composing a worksheet) then press the "F9" button after each change to the worksheet so as to make it recalculate with the new values.

We can also get a spreadsheet-like, scrollable list of values of the variables over a range of n, and these may be rounded off to a prescribed number of decimal places. For instance, for x1 and x3 we have for n ranging from 10 to 40:

Clicking over each list opens the side bar which can be moved up or down to reveal values not explicitly listed. We close this example by showing more easily performed matrix operations. For intance, the determinant and the inverse of the matrix A above can be obtained symbolically:

The characteristic polynomial of A can also be determined symbolically by evaluating the determinant |A - xI|:

Naturally, these operations (and many others, like symbolic matrix exponentiation, nonsymbolic root finding, etc.) can be applied fruitfully to linearizations of nonlinear maps. Indeed, a worksheet can be specifically written for doing linearization analysis, in which case we need only input the (Jacobian) matrix each time.

Note:
If Mathcad is installed on your machine, click here to run the file for this example; the file may be modified once it appears in your browser.


Back to the Mathcad page