rootsof problem -- design doesn't have enough info!
Subject: rootsof problem -- design doesn't have enough info!
From: Richard Fateman
Date: Thu, 14 May 2009 12:08:47 -0700
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.
>
> Ray
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
I have a fix for this, which is in one function in sinint. To test it
try, before and after loading it,
integrate_use_rootsof:true$
integrate(1/(a*x^3+x+1),x);
maybe someone with access to source can insert it?
thnx
RJF
(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
defining roots.
(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.