Open rtoy opened 3 months ago
Imported from SourceForge on 2024-07-06 10:08:13 Created by macrakis on 2022-03-12 16:05:33 Original: https://sourceforge.net/p/maxima/bugs/3955/#e21a
This is working as designed.
Many noun-forms have simplifications (not evaluation) in the case where the main argument is free of the variable or other trivial cases:
'limit(a,x,3) => a
'integrate(a,x) => a*x
'integrate(a,x,3,5) => 2*x
'integrate(sin(x),x,q+1,q+1) => 0
One exception is diff
, which does not assume that a
is independent of x
:
'diff(a,x) => 'diff(a,x)
You can see that these are simplifications, and not evaluations using the following tests:
'(limit(a,x,3)) => a << no evaluation
simp:false$
'limit(a,x,3) => 'limit(a,x,3) << no simplification
limit(a*a,x,3) => a*a << evaluation but no simplification (to a^2)
integrate(x,x,-1,1) => 1/2 + (-1)*(1/2) << evaluation but no simplification
As it happens, 'integrate(a,x) => a*x
happens because integrate
is declared outative
: the only case that is actually simplified is 'integrate(1,x) => x
. So you can suppress all but the 1
case like this:
remove(integrate,outative)$
'integrate(a,x) => 'integrate(a,x)
'integrate(1,x) => x
If it is important to you to suppress the 1
case, you can remove the (equal (car y) 1)
clause in simpinteg
-- the beauty of open source!
Closing as not a bug.
Imported from SourceForge on 2024-07-06 10:08:16 Created by macrakis on 2022-03-12 16:06:17 Original: https://sourceforge.net/p/maxima/bugs/3955/#b6eb
Imported from SourceForge on 2024-07-06 10:08:20 Created by peterpall on 2022-03-12 16:07:32 Original: https://sourceforge.net/p/maxima/bugs/3955/#0558
I don't seem to remember that the manual states one can do such a thing. But a
'(integrate(1,x));
seems to do the trick, for some reason.
Imported from SourceForge on 2024-07-06 10:08:23 Created by peterpall on 2022-03-12 18:40:59 Original: https://sourceforge.net/p/maxima/bugs/3955/#681c/ca10
On my nightly Build of wxMaxima it does show an integral sign.
Imported from SourceForge on 2024-07-06 10:08:27 Created by macrakis on 2022-03-12 18:59:34 Original: https://sourceforge.net/p/maxima/bugs/3955/#0c7b
wxMaxima is a front end.
In Maxima itself, the two cases display differently:
'(integrate(x,x));
integrate(x, x)
'integrate(x,x);
/
[
I x dx
]
/
Similarly for limit:
'(limit(x,x,0));
limit(x, x, 0)
'limit(x,x,0);
limit x
x -> 0
Imported from SourceForge on 2024-07-06 10:08:31 Created by dauti on 2022-03-13 06:45:57 Original: https://sourceforge.net/p/maxima/bugs/3955/#e21a/e857
Thanks a lot for the detailed explanation. Best regards, Wolfgang
Imported from SourceForge on 2024-07-06 10:08:12 Created by dauti on 2022-03-12 14:23:47 Original: https://sourceforge.net/p/maxima/bugs/3955
The single quote does not always prevent evaluation as it should, e.g. (using a current Maxima compiled with CLISP):
is okay. The left hand side is not evaluated, the right hand side is the solution, the computed integral.
But for a simpler expression, e.g.
I would expect
'integrate(1,x) = x
as correct answer. The same happens for example fordiff()
. Why?Best regards, Wolfgang