Why does the SymbolicNumericIntegration.integrate function not seem to respect the detailed=false argument when using .( execution? Also, when then operating on a matrix, it seems to return the indefinite integral rather than the definite integral.
import Symbolics
using SymbolicNumericIntegration: integrate
Symbolics.@variables x
f = [ x^0, x^1, x^2 ]
F = f * transpose( f )
Resulting in a matrix F containing expressions on which I want to perform definite integration:
3×3 Matrix{Symbolics.Num}:
1 x x^2
x x^2 x^3
x^2 x^3 x^4
Definite integration of a single term of F, requesting only the solved output
detailed(default:true):(solved, unsolved, err)output format. Ifdetailed=false, only the final integral is returned.
Works as expected
julia> integrate( F[1,2], (x, 0, 1); detailed=false )
1//2
However, if I use the . execution on the same term, the detailed=false appears ignored, and the solved output is the indefinite integral rather than the definite integral e.g., the (x, 0, 1) input also appears ignored. Also, I’m not sure why it now thinks there’s an error of x in this?
julia> integrate.( F[1,2], (x, 0, 1); detailed=false )
((1//2)*(x^2), 0, x)
And what I really want to do is perform definite integration on each term of F at the same time, hence the exploration into . execution. As you can see below it appears to return the solved output in indefinite form - but only in the first row… the other rows appear incorrect - maybe outputting the unsolved and error fields?
> integrate.( F, (x, 0, 1); detailed=false )
3×3 Matrix{Any}:
x (1//2)*(x^2) (1//3)*(x^3)
0 0 0
x^2 x^3 x^4
What I expected was that I would get a matrix of definite integrals:
3×3 Matrix{Any}:
1 1//2 1//3
1//2 1//3 1//4
1//3 1//4 1//5
Any ideas what’s going on?
( EDIT: wrote the first draft of this on an airplane with spotty wi-fi, and didn’t realize I hit “submit”)