Error doing Implicit Derivatives in ModelToolkit I think it's trying to divide by 0

when I try to run

 let ex = Differential(x)(f(x, y))
           func_ex = build_function(expand_derivatives(ex), x, y)
           @eval ∂xf(x, y) = ($func_ex)(x,y)
       end

I get an error

ERROR: type Int64 has no field value

I think it’s trying to find the deivative of x=0,y=0 which is not part of the

0.0?

1 Like
f(x,y)=((x^2+y^2)^4)/(x^2*y)

let ex = Differential(x)(f(x, y))
           func_ex = build_function(expand_derivatives(ex), x, y)
           @eval ∂xf(x, y) = ($func_ex)(x,y)
       end

sorry, my bad.