Hi everyone,

Does anyone know how we can define the derivatives of a function in Stan? Any suggestion? I want to have \dot{F}(t) = U(T). Many thanks.

Best,

Ellie

Hi everyone,

Does anyone know how we can define the derivatives of a function in Stan? Any suggestion? I want to have \dot{F}(t) = U(T). Many thanks.

Best,

Ellie

Is it that you want to enforce the constraint Fâ€™(t) = U(t)? This might be possible, but depends a lot on what youâ€™re trying to do.

Or that you want to take a derivative of a function? Stan doesnâ€™t do this for you (itâ€™s autodiff stuff isnâ€™t exposed inside the models), but you might get mileage out of a symbolic differentiation package.

1 Like

If you want to calculate the values of F from known U(t) (and initial conditions), youâ€™re talking about solving an ordinary differential equation, look in the manual about ODE solvers.