# Understanding how to use adaptive solver when dt is in the equations

**URL:** <https://discourse.julialang.org/t/understanding-how-to-use-adaptive-solver-when-dt-is-in-the-equations/117520>\
**Category:** General Usage\
**Tags:** question, differentialequation, ordinarydiffeq, bvp\
**Created:** [July 26, 2024, 3:40pm UTC](https://discourse.julialang.org/t/understanding-how-to-use-adaptive-solver-when-dt-is-in-the-equations/117520 "2024-07-26T15:40:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dbox/32/209217_2.png) [@dbox](https://discourse.julialang.org/u/dbox)\
**Post date:** [July 26, 2024, 3:40pm UTC](https://discourse.julialang.org/t/understanding-how-to-use-adaptive-solver-when-dt-is-in-the-equations/117520/1 "2024-07-26T15:40:04Z")

</div>

Hi,  
I’m trying to solve a system of equations where some of the terms have explicit dependence on dt.  
The way round this I am using is passing dt as a parameter:

```julia
params = Dict(:dt => dt)
params = NamedTuple(params)

bvp = BVProblem(f!, bc!, init, (0,1), params)
sol = solve(bvp, MIRK4(), dt=dt, adaptive=false)

```

How can I make use of adaptive solvers here? I don’t entirely understand the behind-the-scenes of this so may have an error of understanding! Is it possible at all?

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [July 26, 2024, 3:42pm UTC](https://discourse.julialang.org/t/understanding-how-to-use-adaptive-solver-when-dt-is-in-the-equations/117520/2 "2024-07-26T15:42:42Z")

</div>

If you have terms that depend on dt, you don’t have an ODE (and the results you are getting with fixed timestepping are likely incorrect as well since higher order solvers do complicated things)

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [July 26, 2024, 3:46pm UTC](https://discourse.julialang.org/t/understanding-how-to-use-adaptive-solver-when-dt-is-in-the-equations/117520/3 "2024-07-26T15:46:50Z")

</div>

Yes. This seems like an X-Y problem. Let’s take a step back. What are you trying to solve for? Not an equation with dt in it, but how did you get to that in the first place? Is it a delay term?
