[Maxima] rootsof problem -- design doesn't have enough info!
fateman at cs.berkeley.edu
Thu May 14 14:08:47 CDT 2009
Raymond Toy wrote:
> Richard Fateman wrote:
>> Who added integrate_use_rootsof etc? The essential idea is OK in
>> there, but is problematical.
> I think Bill Schelter added that long ago.
> Maxima mailing list
> Maxima at math.utexas.edu
I have a fix for this, which is in one function in sinint. To test it
try, before and after loading it,
maybe someone with access to source can insert it?
(defun integrate-use-rootsof (f q variable &aux qprime ff qq
(dummy (make-param)) lead)
;; this program is used if $integrate_use_rootsof is true,
;; and rational function integration of f/q wrt variable
;; can make use of it.
;; fixed by RJF 5/14/09 to work on non-monic denoms and also
;; add 2nd arg to rootsof, so it makes sense for multivariate polys:
;; the second arg of rootsof is the main variable in the poly wrt
(setq lead (pdisrep(p-lc q))) ;; inserted pdisprep; rjf
(setq qprime (disrep (pderivative q (p-var q))))
(setq ff (disrep f)
qq (subst dummy variable (disrep q)));put correct variable in poly
`(($lsum) ((mtimes) ;removed factor of lead, which was just wrong. rjf
,(div* (subst dummy variable ff)
(subst dummy variable qprime))
((%log) ,(sub* variable dummy))) ,dummy
(($rootsof) ,qq ,dummy))) ; use 2nd arg to rootsof to indicate main var.
More information about the Maxima