## #1829 integration failure with option integrate_use_rootsof :true

closed
nobody
5
2009-12-01
2009-11-30
Anonymous
No

(%i12) integrate_use_rootsof : true;
(%i13) -pt*integrate((d*QA^2+2*c*QA+3*b)/(g*QA^3*R+d*QA^2+c*QA+b),QA);
Maxima encountered a Lisp error:
Error in PROGN [or a callee]: Caught fatal error [memory may be damaged]
Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.

## Discussion

• Dieter Kaiser - 2009-11-30

I think the bug is in the routine integrate-use-rootsof:

(defun integrate-use-rootsof (f q variable &aux qprime ff qq (dummy (make-param)) lead)
;; p2e is squarefree polynomial in cre form, p1e is lower degree
(setq lead (p-lc q)) <--- Problem
(setq qprime (disrep (pderivative q (p-var q))))
(setq ff (disrep f) qq (disrep q))
`((%lsum) ((mtimes)
,(div* (mul* lead (subst dummy variable ff))
(subst dummy variable qprime))
((%log) ,(sub* variable dummy))) ,dummy
((\$rootsof) ,qq)))

There is no DISREP for the leading coefficient of q, but for the example of this bug report we get an CRE expression as a coefficient. When we do a DISREP

(setq lead (disrep (p-lc q)))

the integral of this bug report will work:

(%i4) integrate_use_rootsof : true;
(%o4) true
(%i5) integrate((d*QA^2+2*c*QA+3*b)/(g*QA^3*R+d*QA^2+c*QA+b),QA);
(%o5) 'lsum((%r2^2*d+2*%r2*c+3*b)*g*log(QA-%r2)*R/(3*%r2^2*g*R+2*%r2*d+c),%r2,
rootsof(g*QA^3*R+d*QA^2+c*QA+b))

The testsuite has no examples for this type of integrals, but the example of the documentation will work as expected with this change.

Dieter Kaiser

• Dieter Kaiser - 2009-12-01

Fixied in sinint.lisp revision 1.9.
Closing this bug report as fixed.
Dieter Kaiser

• Dieter Kaiser - 2009-12-01
• status: open --> closed