# Deriving the Jacobians without MTK

**URL:** <https://discourse.julialang.org/t/deriving-the-jacobians-without-mtk/129203>\
**Category:** Modelling & Simulations\
**Created:** [May 21, 2025, 8:37am UTC](https://discourse.julialang.org/t/deriving-the-jacobians-without-mtk/129203 "2025-05-21T08:37:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [May 21, 2025, 8:37am UTC](https://discourse.julialang.org/t/deriving-the-jacobians-without-mtk/129203/1 "2025-05-21T08:37:31Z")

</div>

I have a nonlinear, numeric model. The model uses a non-linear solver internally. It has three inputs, one output and many parameters.

How can I calculate the Jacobians of a linearized model? Can I use `AutoFiniteDiff()` for it? Can I do that without using MTK?

---

<div class="post-metadata">

**Author:** ![Bart\_van\_de\_Lint](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bart_van_de_lint/32/212161_2.png) [@Bart\_van\_de\_Lint](https://discourse.julialang.org/u/Bart_van_de_Lint)\
**Post date:** [May 26, 2025, 7:58pm UTC](https://discourse.julialang.org/t/deriving-the-jacobians-without-mtk/129203/2 "2025-05-26T19:58:46Z")

</div>

I did exactly that in [VortexStepMethod.jl/src/solver.jl at 81a402d16204ac9fab65383cdb101b576d96e189 · Albatross-Kite-Transport/VortexStepMethod.jl · GitHub](https://github.com/Albatross-Kite-Transport/VortexStepMethod.jl/blob/81a402d16204ac9fab65383cdb101b576d96e189/src/solver.jl#L637C1-L751C4)

Edit: you just have to be careful with the step sizes and tolerances. What works well for me:

```julia
backend = AutoFiniteDiff(absstep=1e2*nonlinear_solver.atol, relstep=1e2*nonlinear_solver.rtol)

```
