I have the following scenario that I’m unable to understand in Symbolics. It would be great if somebody could help me with that:
using ModelingToolkit @variables t x(t) D = Differential(t) eqs = [D(x) ~ x] eqs.lhs # Output: Differential(t)(x(t)) D(x) # Output: Differential(t)(x(t)) istree(eqs.lhs) # true istree(D(x)) # false
Why is the first call to istree true and the second false? It would be great if someone helped me understand this.
EDIT: When I call typeof on the eqs.lhs I get a “Term” and when I call typeof on D(x) I get Num if that helps. And that is consistent with the return value from istree.