You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using Symbolics
function main()
@variables t b(t)
D = Differential(t)
expr = b - ((D(b))^2) * D(D(b))
expr2 = D(expr)
display(expr)
display(expand_derivatives(expr))
display(expr2)
display(expand_derivatives(expr2))
end
main()
Error:
ERROR: LoadError: BoundsError: attempt to access 1-element Vector{Any} at index [2]
Stacktrace:
[1] throw_boundserror(A::Vector{Any}, I::Tuple{Int64})
@ Base ./essentials.jl:14
[2] getindex(A::Vector{Any}, i::Int64)
@ Base ./essentials.jl:915
[3] expand_derivatives(O::SymbolicUtils.BasicSymbolic{Real}, simplify::Bool; occurrences::SymbolicUtils.BasicSymbolic{Real}) (repeats 2 times)
@ Symbolics ~/.julia/packages/Symbolics/zuLwn/src/diff.jl:257
[4] expand_derivatives(O::SymbolicUtils.BasicSymbolic{Real}, simplify::Bool; occurrences::Nothing)
@ Symbolics ~/.julia/packages/Symbolics/zuLwn/src/diff.jl:257
[5] expand_derivatives(n::Num, simplify::Bool; occurrences::Nothing)
@ Symbolics ~/.julia/packages/Symbolics/zuLwn/src/diff.jl:299
[6] expand_derivatives
@ ~/.julia/packages/Symbolics/zuLwn/src/diff.jl:298 [inlined]
[7] expand_derivatives(n::Num)
@ Symbolics ~/.julia/packages/Symbolics/zuLwn/src/diff.jl:298
[8] main()
@ Main ~/MWE-test/v6.jl:12
[9] top-level scope
@ ~/MWE-test/v6.jl:15
[10] include(fname::String)
@ Main ./sysimg.jl:38
[11] top-level scope
@ REPL[4]:1
in expression starting at /home/orebas/MWE-test/v6.jl:15
This is probably related to #1126. I found this trying to debug that. However, this error seems to come from a much simpler expression, indeed there is only one variable referenced. So I am skeptical it has to do with variable ordering.
Note that replacing "t" with "x" everywhere eliminates the failure, but that is not a fix because "t" is used in a lot of places as the independent variable.
The text was updated successfully, but these errors were encountered:
MWE:
Error:
Using:
This is probably related to #1126. I found this trying to debug that. However, this error seems to come from a much simpler expression, indeed there is only one variable referenced. So I am skeptical it has to do with variable ordering.
Note that replacing "t" with "x" everywhere eliminates the failure, but that is not a fix because "t" is used in a lot of places as the independent variable.
The text was updated successfully, but these errors were encountered: