Wronskian of a matrix

+- HP Forums (http://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: HP Prime Software Library (/forum-15.html)
+--- Thread: Wronskian of a matrix (/thread-4064.html)



Wronskian of a matrix - salvomic - 06-03-2015 09:36 AM

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

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