# Transforming differential equations

Using a matrix to transform the differential equations

It frequently happens that a differential system can be written in terms of y(i) (i = 1, 2, ..., n) but the user is only able to measure, or is only interested in, some sub-set of the y(i).
This is easily achieved interactively by selecting the i-values of special interest.
However the user might wish to simulate or fit linear combinations of the y(i).
For instance, in a chemical scheme such as A->B->C->D it might only be possible to measure B + C.
More complications are possible, for instance if B and C had different molar absorbtivities, or fluorescence parameters, then something like 0.75*B + 1.12*C might be the combination of interest.
This program allows you to input a real square matrix A which then overwrites a sub-matrix of the identity matrix to redefine variables using: y(new) = A*y(old).
For instance:

          A = 0 1
              1 0

would just interchange y(1) and y(2).
Consult the readme files and files deqmat.tf? to see how to do this.
Note that whatever the value of A, the initial y0(i) will always be the actual y0(i), so be careful when curve-fitting.

Some important technical details

Irrespective of what sub-set of y(i) are selected or whatever matrix A is used for transformation, the program always integrates all of the y(i) from y0(i) on.
If A is not the identity, y(i) selected will be transformed y(i). Using selected sub-sets restricts the output to components of interest when the number of equations is large.
Once an A has been used or a sub-set selected they remain until changed interactively.
The range and no. of points are as set by the user by menu or input file unless a simulation is requested as an overlay over curve-fitting data, when the range is set by the data (temporarily), but the number of points used for best-fit curves will still be as selected for simulation.

If the problem you are trying to solve is ill-conditioned, then an error message (with the IFAIL value etc.) will be output, so you can change tolerances etc. and try again with more suitable settings.
This procedure is turned off during curve-fitting, to avoid screen after screen of error messages.
So, before fitting, you should integrate and overlay the simulation on the data, to be sure curve-fitting is sensible.
As a check after fitting, in some versions of DEQSOL, the error detection is turned on for a final integration.

Back to Help Menu or End Help