Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vector{Num} expressions. #58

Open
mdmeeker opened this issue Aug 1, 2023 · 0 comments
Open

Vector{Num} expressions. #58

mdmeeker opened this issue Aug 1, 2023 · 0 comments

Comments

@mdmeeker
Copy link

mdmeeker commented Aug 1, 2023

julia> using Symbolics, SymbolicNumericIntegration
julia> @variables α;

Noticing that the case

julia> integrate(2 * α, α)
(α^2, 0, 0)

is correct, going element-wise works essentially as intended

julia> exp2 = [1, 2 * α];
julia> integrate.(exp2, α)
2-element Vector{Tuple{Any, Int64, Int64}}:
 (α, 0, 0)
 (α^2, 0, 0)

but otherwise just integrating exp2 on its own is problematic, yielding

julia> integrate(exp2, α)
(Num[α, 2^2)], 0, 0)

with the expectation of [α, α^2 / 2]. It seems that the vector is treated as constant wrt. α and α * [1, 2 * α] is just being simplified behind the scenes.

Since this is not yet supported, should this be explicitly disallowed/ given with a warning, etc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant