Variable is not a function of independent variable error for trivial example

If you explicitly provide the independent variable your first formulation works.

@named sys = ODESystem([Dₜ(Dₜ(x)) + ω₀^2*x ~ 0], t)
1 Like