rtoy / maxima

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

taylor: illegal kernel error in improper integral #3115

Open rtoy opened 2 weeks ago

rtoy commented 2 weeks ago

Imported from SourceForge on 2024-07-07 14:47:52 Created by kcrisman on 2013-03-02 02:42:09 Original: https://sourceforge.net/p/maxima/bugs/2556


I'm sorry I don't have a more succinct example of this. See http://ask.sagemath.org/question/2314/illegal-kernel-in-adjoin-pvar for the original report.

(%i3) integrate(((%pi)^(-1/2))*(A)*(((delta)^(-2))^(-1/2))
*(exp((((xi)+(-1/1))*(dx)*((k)^(2))*(t)*(v)*(1/2))
+(((delta)^(2))*((k)^(2))*(-1/4))+((k)*(t)*(v)*(0+%i*-1))
+((k)*(x)*(0+%i*1))))*(1/2),k,0,inf);

Condition of type: SIMPLE-CONDITION
Illegal kernel in `adjoin-pvar'

Available restarts:

1. (CONTINUE) Return from BREAK.
2. (MACSYMA-QUIT) Maxima top-level

Top level.
rtoy commented 2 weeks ago

Imported from SourceForge on 2024-07-07 14:47:53 Created by kcrisman on 2013-03-02 02:46:14 Original: https://sourceforge.net/p/maxima/bugs/2556/#4fb4


I don't know why this didn't format correctly.

integrate(((%pi)^(-1/2))*(A)*(((delta)^(-2))^(-1/2))*(exp((((xi)+(-1/1))*(dx)*((k)^(2))*(t)*(v)*(1/2))+(((delta)^(2))*((k)^(2))*(-1/4))+((k)*(t)*(v)*(0+%i*-1))+((k)*(x)*(0+%i*1))))*(1/2),k,0,inf);
rtoy commented 2 weeks ago

Imported from SourceForge on 2024-07-07 14:47:57 Created by kcrisman on 2013-03-02 02:47:43 Original: https://sourceforge.net/p/maxima/bugs/2556/#5066


This is the same in 5.29.1 and 5.26.0 in ECL. I get a slightly different error in 5.20.1.

Illegal kernel in `adjoin-pvar'

Available restarts:

  1. (CONTINUE) Return from BREAK.
  2. (MACSYMA-QUIT) Maxima top-level

Broken at ADJOIN-PVAR.

This is all in hayat.lisp

rtoy commented 2 weeks ago

Imported from SourceForge on 2024-07-07 14:48:00 Created by robert_dodier on 2013-05-24 01:34:52 Original: https://sourceforge.net/p/maxima/bugs/2556/#9b9c


Observed in current development version.

Maxima version: "branch_5_30_base_90_g122d48e_dirty" Maxima build date: "2013-05-22 18:42:44" Host type: "i686-pc-linux-gnu" Lisp implementation type: "SBCL" Lisp implementation version: "1.0.49"

rtoy commented 2 weeks ago

Imported from SourceForge on 2024-07-07 14:48:03 Created by robert_dodier on 2013-05-24 01:35:29 Original: https://sourceforge.net/p/maxima/bugs/2556/#08f5


rtoy commented 2 weeks ago

Imported from SourceForge on 2024-07-07 14:48:07 Created by robert_dodier on 2013-06-17 05:44:23 Original: https://sourceforge.net/p/maxima/bugs/2556/#00be


A stack trace shows that the error is in 'taylor'. Here is the simplest version which shows the problem:

taylor (%e^(a*k^2*x/2-k^2), k, inf, 0);
 => Illegal kernel in `adjoin-pvar'

It appears to be sensitive to ordering terms: replacing 'k' with 'z' allows the call to succeed (after a sign question).

In fact, replacing 'k' with 'z' in the original integral allows 'integrate' to run to completion (after some sign questions). It returns a noun expression (unsolved integral) which seems odd -- isn't it a relatively easy integral? I didn't look too closely, I guess -- but at least it is not an error.