Hi there,
I have an in-place function (RHS of an ODE) and would like to evaluate it with Symbolics.jl
. Later on, I want to compute its Jacobian.
However, I cannot figure out how to do that. It appears to not do anything. Certainly, I’m not using the package correctly.
I’ve come up with an MWE
using Symbolics
@variables x[1:2] y[1:2]
function f!(result, arg)
result[1] = arg[1] + 2
result[2] = 2 * arg[2] + arg[1]
nothing
end
f!(collect(y), x)
Executing in the REPL yields
julia> y
y[1:2]
How can I get the symbolic representation of the function?