06-03-2015, 02:36 PM
hi,
with this program one can calculate wronskian of a matrix.
The CAS program produce the determinant or the matrix of wronskian.
Thanks to Han to have reviewed the program for me!
Syntax:
wronskm([f1,f2,...,fn])
wronskf(fun)
Salvo
with this program one can calculate wronskian of a matrix.
The CAS program produce the determinant or the matrix of wronskian.
Thanks to Han to have reviewed the program for me!
Syntax:
wronskm([f1,f2,...,fn])
wronskf(fun)
Salvo
Code:
#cas
// Salvo and Han, 2015
wronskm(f):=
BEGIN
local s,v,m;
s:=SIZE(f);
IF s==0 OR TYPE(f)<>6 THEN RETURN("wronskm([f1,f2,...,fn])"); END;
IF TYPE(s) THEN RETURN("wronskm: expecting vector of functions"); END;
v:=lname(f);
IF SIZE(v)<>1 THEN RETURN("wronskm: expecting single-variable functions"); END;
v:=v(1);
m:=makemat((r,c)->diff(f(c),v$(r-1)),s,s);
return m;
END;
wronsk(f):=
BEGIN
local m;
m:=wronskm(f);
IF TYPE(m)==2 THEN
return m;
ELSE
return det(m);
END;
END;
#end