GSoC'20 - Week 12
This week’s work involved removing many of the old solvers and adding 2 new solvers.
Linear, n equations, Order 1, Type 5 and 6
The types 5 and 6 added this week are given below:
X' = f(t)*A*X + b(t)
Where X
is the vector of dependent variables, f(t)
is a scalar invertible function in terms of t
, A
is a constant matrix and b(t)
is the vector of non-homogeneous term.
The above system is type 5 if the system is homogeneous else its type 6.
Now, the above system can be classified to either type 3 or type 4 where the coefficient matrix needs to have a commutative antiderivative but this case can be solved faster than solving with type 3 or type 4.
We are going to transform this system with the substitution:
tau = F(t) = integrate(f(t), t)
With this substitution, lets create a new vector of dependent variables Y(tau)
where tau
is the independent variable. Then:
X(t) = Y(tau)
d/dt(X(t)) = d/dt(Y(tau)) = d/d(tau)(Y(tau)) * d(tau)/dt = Y' * f(t)
Hence, if we substitute for X
and X'
in the system, then we will get:
Y'*f(t) = f(t)*A*Y + b(t)
Y' = A*Y + b(t)/f(t)
Now, for b(t)/f(t)
, we would have to substitute for the value of t
in terms of tau
to get the final system:
tau = F(t)
t = F-1(tau)
We would have to substitute the inverse of tau
’s value to get the final transformed system:
Y' = A*Y + b'(tau)
Now, the above system can be quickly solved by type 1 or type 2 solver, which are much faster. After solving for Y
, we just have to substitute tau
back as t
by using tau = F(t)
:
X(t) = Y(F(t))
Linear, n equations, Order n, Type 2
Type 0 is the introducing the dummy variables type, Type 1 is the standard Cauchy-Euler systems.
Type 2 is given by the following:
X(n)(t) = f(t)*A*X + b(t)
Where X
is the vector of dependent variables, b(t)
is the non-homogeneous term,A
is the constant matrix and X(n)(t)
is the nth order derivative of the vector X
.
Now, computing the jordan normal form of the matrix A
:
A = P*J*P-1
We will substitute this in the system and get the transformed system:
X(n) = f(t)*P*J*P-1*X + b(t)
P-1*X(n) = f(t)*J*P-1*X + P-1*b(t)
Now, substituting Z = P-1*X(n)
, we get:
Z = f(t)*J*Z + P-1*b
Now, normally a jordan normal form matrix has a form:
[ e1 1 ]
[ e1 1 ]
[ e1 ]
[ e2 1 ]
[ e2 ]
[ e3 ]
[ .. ]
[ .. ]
[ en 1 ]
[ en ]
Hence, its easy to see that, with multiplication of Jordan matrix with the vector Z
, we will get a system that may have independent sub-systems, i.e. the system which can be divided into sub-systems using strongly and weakly connected components. Hence, we use this to solve systems of the above form and finally, after we have the solution for Z(t)
, we can get X(t)
by the substitutionL:
X(t) = P * Z(t)
Solvers that were removed
- Linear 2 equations, Order 2, Type 3: This solver was removed using the simple method to introduce dummy variables as this system is constant coefficient.
- Linear, 2 equations, Order 2, Type 7: This solver was removed due to numerous reasons like introducing higher order to first order reduction, splitting of the systems and adding a
dsolve
call for single ODE systems. - Linear 2 equations, Order 2, Type 6: When a general case solver was added for solving these types of systems.
Note: Its important that the module eventually can detect the minimum order of the dependent variables and reduce those terms before hand since smaller matrix sizes will lead to faster results.
Work for the final week
For the final week, two things needs to be completed:
- Writing and submitting the report for GSoC.
- Completing the simplification method addition to simplify great many number of systems.