rtoy / maxima

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

bug in 'integrate(...) and/or depends #4180

Open rtoy opened 4 months ago

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-09 19:33:24 Created by zmth on 2021-05-31 20:25:20 Original: https://sourceforge.net/p/maxima/bugs/3790


"branch_5_44_base_231_g5c411f69f",
timestamp="2021-01-12 23:51:42",
host="x86_64-w64-mingw32",
lisp_name="SBCL",
lisp_version="2.0.0",
maxima_userdir="C:/Users/zmth1/maxima",
maxima_tempdir="C:/Users/zmth1/AppData/Local/Temp",
maxima_objdir="C:/Users/zmth1/maxima/binary/branch_5_44_base_231_g5c411f69f/sbcl/2_0_0",
maxima_frontend="wxMaxima",maxima_frontend_version="20.12.2-DevelopmentSnapshot_MSW_OpenMP201511+Locks")
(depends(fj,x),
disp(['integrate((x*(1-x))^(L+1/2)*fj,x,0,1)]))

puts the fj outside the intergral when it should be inside like the command

disp(['integrate((x*(1-x))^(L+1/2)*fj(x),x,0,1)]))
rtoy commented 4 months ago

Imported from SourceForge on 2024-07-09 19:33:25 Created by robert_dodier on 2021-06-01 22:00:39 Original: https://sourceforge.net/p/maxima/bugs/3790/#06ea


I've marked this item "not a bug" since that's the expected behavior as it is described in the documentation for integrate:

 'integrate' works only with functional relations represented
 explicitly with the 'f(x)' notation.  'integrate' does not respect
 implicit dependencies established by the 'depends' function.

I agree that is not helpful when there are declared dependencies, but it is the way it is intended to work.

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-09 19:33:29 Created by macrakis on 2021-06-01 22:21:47 Original: https://sourceforge.net/p/maxima/bugs/3790/#024e


Agreed. This is also mentioned in the depends section of the manual:

diff is the only Maxima command which recognizes dependencies established by depends. Other functions (integrate, laplace, etc.) only recognize dependencies explicitly represented by their arguments. For example, integrate does not recognize the dependence of f on x unless explicitly represented as integrate (f(x), x).