in python sympy we define that x is function of t: x(t)
and diff(x,t) is xdot
x=sym.Function(‘x’)(t)
how to do this thing in julia
bcz i have to write Lagrangian equation
Look at Symbolics.jl
2 Likes
It isn’t so different in Julia:
julia> using SymPy
julia> @syms t x()
(t, x)
julia> diff(x(t), t)
d
──(x(t))
dt
The symbolics style, should also be mirrored:
julia> ∂ = Differential(t)
Differential(t)
julia> ∂(x(t))
d
──(x(t))
dt
2 Likes