SB03MW

Solving a continuous-time Lyapunov equation for a 2-by-2 matrix

[Specification] [Arguments] [Method] [References] [Comments] [Example]

Purpose

  To solve for the 2-by-2 symmetric matrix X in

         op(T)'*X + X*op(T) = SCALE*B,

  where T is 2-by-2, B is symmetric 2-by-2, and op(T) = T or T',
  where T' denotes the transpose of T.

Specification
      SUBROUTINE SB03MW( LTRAN, LUPPER, T, LDT, B, LDB, SCALE, X, LDX,
     $                   XNORM, INFO )
C     .. Scalar Arguments ..
      LOGICAL            LTRAN, LUPPER
      INTEGER            INFO, LDB, LDT, LDX
      DOUBLE PRECISION   SCALE, XNORM
C     .. Array Arguments ..
      DOUBLE PRECISION   B( LDB, * ), T( LDT, * ), X( LDX, * )

Arguments

Mode Parameters

  LTRAN   LOGICAL
          Specifies the form of op(T) to be used, as follows:
          = .FALSE.:  op(T) = T,
          = .TRUE. :  op(T) = T'.

  LUPPER  LOGICAL
          Specifies which triangle of the matrix B is used, and
          which triangle of the matrix X is computed, as follows:
          = .TRUE. :  The upper triangular part;
          = .FALSE.:  The lower triangular part.

Input/Output Parameters
  T       (input) DOUBLE PRECISION array, dimension (LDT,2)
          The leading 2-by-2 part of this array must contain the
          matrix T.

  LDT     INTEGER
          The leading dimension of array T.  LDT >= 2.

  B       (input) DOUBLE PRECISION array, dimension (LDB,2)
          On entry with LUPPER = .TRUE., the leading 2-by-2 upper
          triangular part of this array must contain the upper
          triangular part of the symmetric matrix B and the strictly
          lower triangular part of B is not referenced.
          On entry with LUPPER = .FALSE., the leading 2-by-2 lower
          triangular part of this array must contain the lower
          triangular part of the symmetric matrix B and the strictly
          upper triangular part of B is not referenced.

  LDB     INTEGER
          The leading dimension of array B.  LDB >= 2.

  SCALE   (output) DOUBLE PRECISION
          The scale factor. SCALE is chosen less than or equal to 1
          to prevent the solution overflowing.

  X       (output) DOUBLE PRECISION array, dimension (LDX,2)
          On exit with LUPPER = .TRUE., the leading 2-by-2 upper
          triangular part of this array contains the upper
          triangular part of the symmetric solution matrix X and the
          strictly lower triangular part of X is not referenced.
          On exit with LUPPER = .FALSE., the leading 2-by-2 lower
          triangular part of this array contains the lower
          triangular part of the symmetric solution matrix X and the
          strictly upper triangular part of X is not referenced.
          Note that X may be identified with B in the calling
          statement.

  LDX     INTEGER
          The leading dimension of array X.  LDX >= 2.

  XNORM   (output) DOUBLE PRECISION
          The infinity-norm of the solution.

Error Indicator
  INFO    INTEGER
          = 0:  successful exit;
          = 1:  if T and -T have too close eigenvalues, so T
                is perturbed to get a nonsingular equation.

          NOTE: In the interests of speed, this routine does not
                check the inputs for errors.

Method
  The equivalent linear algebraic system of equations is formed and
  solved using Gaussian elimination with complete pivoting.

References
  [1] Anderson, E., Bai, Z., Bischof, C., Demmel, J., Dongarra, J.,
      Du Croz, J., Greenbaum, A., Hammarling, S., McKenney, A.,
      Ostrouchov, S., and Sorensen, D.
      LAPACK Users' Guide: Second Edition.
      SIAM, Philadelphia, 1995.

Numerical Aspects
  The algorithm is stable and reliable, since Gaussian elimination
  with complete pivoting is used.

Further Comments
  None
Example

Program Text

  None
Program Data
  None
Program Results
  None

Return to Supporting Routines index