Wronskian of a matrix
06-03-2015, 02:36 PM (This post was last modified: 06-03-2015 02:37 PM by salvomic.)
Post: #1
 salvomic Senior Member Posts: 1,364 Joined: Jan 2015
Wronskian of a matrix
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 ∫aL√0mic (IT9CLU), HP Prime 50g 41CX 71b 42s 12C 15C - DM42 WP34s :: Prime Soft. Lib 06-15-2015, 12:40 PM Post: #2  salvomic Senior Member Posts: 1,364 Joined: Jan 2015 RE: Wronskian of a matrix (06-15-2015 12:35 PM)compsystems Wrote: Good +1 thank you! it helped me very much. Thanks also to Han that improved it for me! Salvo ∫aL√0mic (IT9CLU), HP Prime 50g 41CX 71b 42s 12C 15C - DM42 WP34s :: Prime Soft. Lib 10-24-2016, 02:48 PM Post: #3  JB1414 Junior Member Posts: 1 Joined: Feb 2016 RE: Wronskian of a matrix I have installed the program and can not get it to run. It shows no errors. Any help please. 10-24-2016, 03:01 PM Post: #4  salvomic Senior Member Posts: 1,364 Joined: Jan 2015 RE: Wronskian of a matrix (10-24-2016 02:48 PM)JB1414 Wrote: I have installed the program and can not get it to run. It shows no errors. Any help please. you must operate in CAS mode. Use the program from Vars -> CAS -> (both "All" or "Programs" list are ok). i.e wronsk([3*x,x^2]) -> 3*x^2 wronskm([3*x,x^2]) -> a matrix [3*x,x^2; 3,2*x] No other. Try and let me know. Salvo ∫aL√0mic (IT9CLU), HP Prime 50g 41CX 71b 42s 12C 15C - DM42 WP34s :: Prime Soft. Lib 05-06-2017, 01:34 AM Post: #5  Fernando Junior Member Posts: 1 Joined: May 2017 RE: Wronskian of a matrix (06-03-2015 02:36 PM)salvomic Wrote: 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

Hi, thanks for the program, but I have a question.

How can I enter trigonometric values ​​in the "f" functions?

Wronskm ([sin (x), cos (x)])

thx
10-30-2017, 10:43 PM
Post: #6
 salvomic Senior Member Posts: 1,364 Joined: Jan 2015
RE: Wronskian of a matrix
(05-06-2017 01:34 AM)Fernando Wrote:  Hi, thanks for the program, but I have a question.

How can I enter trigonometric values ​​in the "f" functions?

Wronskm ([sin (x), cos (x)])

thx

hi Fernando,
sorry for the delay in reply...
You can simply do so:
• type wronskm() or choose it from Vars/Programs
• wronskm([])
•wronskm([SIN(x), COS(x)])
using the functions SIN, COS in the key H and I, insert x via the key D in both, and separate them with the comma (key O).
You'll get a matrix:
$\begin{bmatrix} SIN(x) & COS(x) \\ COS(x) & -SIN(x) \end{bmatrix}$

Please, let me know if it helps.

Salvo

∫aL√0mic (IT9CLU), HP Prime 50g 41CX 71b 42s 12C 15C - DM42 WP34s :: Prime Soft. Lib
11-04-2017, 02:20 PM
Post: #7
 Eddie W. Shore Senior Member Posts: 874 Joined: Dec 2013
RE: Wronskian of a matrix
Great program salvomic and Han!
11-04-2017, 03:29 PM
Post: #8
 salvomic Senior Member Posts: 1,364 Joined: Jan 2015
RE: Wronskian of a matrix
(11-04-2017 02:20 PM)Eddie W. Shore Wrote:  Great program salvomic and Han!

thanks, Eddie! :-)

∫aL√0mic (IT9CLU), HP Prime 50g 41CX 71b 42s 12C 15C - DM42 WP34s :: Prime Soft. Lib
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)