rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

gradef for bessel functions #1568

Closed rtoy closed 2 days ago

rtoy commented 2 days ago

Imported from SourceForge on 2024-07-04 19:42:59 Created by willisb on 2003-05-12 16:31:59 Original: https://sourceforge.net/p/maxima/bugs/313


Consider

(C1) display2d : false; Evaluation took 0.00 seconds (0.00 elapsed) (D1) FALSE (C2) diff(bessel_j(x,x),x); Evaluation took 0.00 seconds (0.00 elapsed) (D2) 'DIFF(BESSEL_J[x](x),x,1)-BESSEL_J[x](x) +BESSEL_J[x-1](x)

The derivative in the first term of (d2) is should be with respect to the order of the bessel function -- instead it's a _total_ derivative. A good solution isn't easy; in orthopoly, I handle this problem by signaling an error. Thus (from orthopoly)

;; When a user requests the derivative of an a function in this package ;; with respect to the order or some other parameter, return a form ;; ((unk) input from user). We "simplify" this form by printing an error.

(defprop unk simp-unk operators)

(defun simp-unk (x y z) (declare (ignore y z)) (merror "Maxima doesn't know the derivative of ~:M with respect the ~:M argument" (nth 2 x) (nth 1 x)))

(putprop '$legendre_p '((n x) ((unk) "$first" "$legendre_p") ((mtimes) ((mplus) ((mtimes) n (($legendre_p) ((mplus) -1 n) x)) ((mtimes) -1 n (($legendre_p) n x) x)) ((mexpt) ((mplus) 1 ((mtimes) -1 ((mexpt) x 2))) -1))) 'grad)

(C3) build_info();

Maxima version: 5.9.0 Maxima build date: 19:10 2/9/2003 host type: i686-pc-mingw32 lisp-implementation-type: Kyoto Common Lisp lisp-implementation-version: GCL-2-5.0

Evaluation took 0.00 seconds (0.00 elapsed) (D3) (C4)

Barton

rtoy commented 2 days ago

Imported from SourceForge on 2024-07-04 19:43:00 Created by rtoy on 2003-05-25 15:10:42 Original: https://sourceforge.net/p/maxima/bugs/313/#0fdf


rtoy commented 2 days ago

Imported from SourceForge on 2024-07-04 19:43:04 Created by rtoy on 2003-05-25 15:10:42 Original: https://sourceforge.net/p/maxima/bugs/313/#d2cf


Logged In: YES user_id=28849

Derivative with respect to order added for Bessel J. It's a bit messy.