# \#diffeq

**URL:** https://discourse.julialang.org/tag/diffeq/37.md?match_all_tags=true&page=2&tags%5B%5D=diffeq

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 3

---

## [Allowing simultaneous ContinuousCallback to trigger (DifferentialEquations.jl)](https://discourse.julialang.org/t/allowing-simultaneous-continuouscallback-to-trigger-differentialequations-jl/124594)

<div class="topic-metadata">

**Author:** [@lte678](https://discourse.julialang.org/u/lte678)\
**Replies:** 1\
**Last updated:** [January 10, 2025, 3:14pm UTC](https://discourse.julialang.org/t/allowing-simultaneous-continuouscallback-to-trigger-differentialequations-jl/124594 "2025-01-10T15:14:31Z")

</div>

I am working on an application where ContinuousCallbacks are dynamically generated based on a user configuration. Since I have “no control” over these, collisions can and do occur. For example if two of the conditions ha…

---

## [\[ANN\] PeriodicMatrices.jl - Handling of periodic time-varying matrices](https://discourse.julialang.org/t/ann-periodicmatrices-jl-handling-of-periodic-time-varying-matrices/124425)

<div class="topic-metadata">

**Author:** [@andreasvarga](https://discourse.julialang.org/u/andreasvarga)\
**Replies:** 4\
**Last updated:** [January 7, 2025, 7:24am UTC](https://discourse.julialang.org/t/ann-periodicmatrices-jl-handling-of-periodic-time-varying-matrices/124425 "2025-01-07T07:24:03Z")

</div>

PeriodicMatrices.jl provides the basic tools to handle periodic time-varying matrices. This package is the basis for developing the PeriodicMatrixEquations.jl and PeriodicSystems.jl packages. For a real periodic matrix A…

---

## [Handling Divergent Trajectories in Global Sensitivity Analysis](https://discourse.julialang.org/t/handling-divergent-trajectories-in-global-sensitivity-analysis/123186)

<div class="topic-metadata">

**Author:** [@duodenum](https://discourse.julialang.org/u/duodenum)\
**Replies:** 4\
**Last updated:** [January 7, 2025, 8:05pm UTC](https://discourse.julialang.org/t/handling-divergent-trajectories-in-global-sensitivity-analysis/123186 "2025-01-07T20:05:25Z")

</div>

I am having the following problem in a large parameter space. Let’s say I have two parameters A and B. If I constrain the range of A between 0 and 10 and B between 0 and 5, the sensitivity to A turns out higher. If I do …

---

## [Distributed ODE solving](https://discourse.julialang.org/t/distributed-ode-solving/123569)

<div class="topic-metadata">

**Author:** [@xztt](https://discourse.julialang.org/u/xztt)\
**Replies:** 5\
**Last updated:** [December 10, 2024, 2:25pm UTC](https://discourse.julialang.org/t/distributed-ode-solving/123569 "2024-12-10T14:25:54Z")

</div>

Hi all, I am interested in been able to manually solve ODEs distributed as below. I am aware of ensembledistributed() however I want greater control over the outcome of each trajectory. My thinking is then to solve a se…

---

## [Differential Equation problem with Index](https://discourse.julialang.org/t/differential-equation-problem-with-index/123518)

<div class="topic-metadata">

**Author:** [@TheLazyFarmer](https://discourse.julialang.org/u/TheLazyFarmer)\
**Replies:** 3\
**Last updated:** [December 6, 2024, 4:27am UTC](https://discourse.julialang.org/t/differential-equation-problem-with-index/123518 "2024-12-06T04:27:04Z")

</div>

Hello, I have a model which I basically need to solve through the calculation of many differential equations by examining the surrounding values and such. I believe the equation is correctly being solved. However, there…

---

## [Solving a coupled differential equation](https://discourse.julialang.org/t/solving-a-coupled-differential-equation/123482)

<div class="topic-metadata">

**Author:** [@fanzhy171](https://discourse.julialang.org/u/fanzhy171)\
**Replies:** 5\
**Last updated:** [December 5, 2024, 11:04am UTC](https://discourse.julialang.org/t/solving-a-coupled-differential-equation/123482 "2024-12-05T11:04:18Z")

</div>

Hello everyone, I am new to julia and try to use it to solve my problem, which involves solving coupled differential equations. I will show my problem below: Here is my attempted solution: using DifferentialEquation…

---

## [Differential Equation Log Plot](https://discourse.julialang.org/t/differential-equation-log-plot/123435)

<div class="topic-metadata">

**Author:** [@TheLazyFarmer](https://discourse.julialang.org/u/TheLazyFarmer)\
**Replies:** 1\
**Last updated:** [December 4, 2024, 8:21am UTC](https://discourse.julialang.org/t/differential-equation-log-plot/123435 "2024-12-04T08:21:21Z")

</div>

Hello, I have some values from a differential equation I solved, I am trying to plot the y-axis as a logarithmic. However, I am unsure how to go about this approach: For reference, I have this example solution from an …

---

## [Changing mass matrix in DAE with callbacks?](https://discourse.julialang.org/t/changing-mass-matrix-in-dae-with-callbacks/123403)

<div class="topic-metadata">

**Author:** [@gvdeynde](https://discourse.julialang.org/u/gvdeynde)\
**Replies:** 1\
**Last updated:** [December 3, 2024, 6:29pm UTC](https://discourse.julialang.org/t/changing-mass-matrix-in-dae-with-callbacks/123403 "2024-12-03T18:29:48Z")

</div>

Is there an elegant and efficient way to modify the mass matrix of a DAE upon an event triggered by a ContinuousCallback? The problem I’m solving is a lumped model for flow in a system. A key parameter is the direction …

---

## [DiffEq Plotting Question](https://discourse.julialang.org/t/diffeq-plotting-question/123228)

<div class="topic-metadata">

**Author:** [@TheLazyFarmer](https://discourse.julialang.org/u/TheLazyFarmer)\
**Replies:** 1\
**Last updated:** [November 29, 2024, 6:04am UTC](https://discourse.julialang.org/t/diffeq-plotting-question/123228 "2024-11-29T06:04:28Z")

</div>

Hello, I have the results of a differential equation I solved with DifferentialEquations.jl. Each of the results of the solution are stored in an (n x n+1) array, as so: 4×5 Matrix{Float64}: -1.0 -1.0 -…

---

## [State Dependent Mass Matrix](https://discourse.julialang.org/t/state-dependent-mass-matrix/40238)

<div class="topic-metadata">

**Author:** [@321bwa](https://discourse.julialang.org/u/321bwa)\
**Replies:** 9\
**Last updated:** [November 26, 2024, 5:52pm UTC](https://discourse.julialang.org/t/state-dependent-mass-matrix/40238 "2024-11-26T17:52:29Z")

</div>

Hello, I’ve looked at the documentation for Handling Mass Matrices for DifferentialEquations.jl. In the example was a singular matrix. I would like to know how to implement a state dependent mass matrix, where the matri…

---

## [PDE Parameter Estimation](https://discourse.julialang.org/t/pde-parameter-estimation/120724)

<div class="topic-metadata">

**Author:** [@cartiery](https://discourse.julialang.org/u/cartiery)\
**Replies:** 5\
**Last updated:** [November 12, 2024, 2:37pm UTC](https://discourse.julialang.org/t/pde-parameter-estimation/120724 "2024-11-12T14:37:15Z")

</div>

Hello, I’m new a DifferentialEquations/ModelingToolkit user that would like to perform parameter estimation of source terms in advection-dispersion equation. I’ve defined the PDE using ModelingToolkit, based on this pos…

---

## [Adaptivity in MIRK4 for BVPs](https://discourse.julialang.org/t/adaptivity-in-mirk4-for-bvps/29341)

<div class="topic-metadata">

**Author:** [@anodos](https://discourse.julialang.org/u/anodos)\
**Replies:** 22\
**Last updated:** [November 3, 2024, 3:38am UTC](https://discourse.julialang.org/t/adaptivity-in-mirk4-for-bvps/29341 "2024-11-03T03:38:09Z")

</div>

I’m just messaging to ask if there is any plans to implement an adaptive mesh in the ODE-BVP solvers in BoundaryValueDiffEq.jl? I’m working on a problem where this is necessary, and for which the adaptive mesh in bvp4c i…

---

## [How does one have multiple random variables in an SDEProblem?](https://discourse.julialang.org/t/how-does-one-have-multiple-random-variables-in-an-sdeproblem/122066)

<div class="topic-metadata">

**Author:** [@AwesomeQuest](https://discourse.julialang.org/u/AwesomeQuest)\
**Replies:** 2\
**Last updated:** [November 1, 2024, 8:15pm UTC](https://discourse.julialang.org/t/how-does-one-have-multiple-random-variables-in-an-sdeproblem/122066 "2024-11-01T20:15:21Z")

</div>

I’m trying to simulate a stochastic state space model which looks something like: x\_dot(x) = A\*x + B\*u(x + n) + d A and B are matrices, x, n, and d are vectors and u is an affine function. Each of the elements of n an…

---

## [Is there a way to use non-constant mass matrix depended from u?](https://discourse.julialang.org/t/is-there-a-way-to-use-non-constant-mass-matrix-depended-from-u/121787)

<div class="topic-metadata">

**Author:** [@garazha-ilya](https://discourse.julialang.org/u/garazha-ilya)\
**Replies:** 0\
**Last updated:** [October 26, 2024, 1:32pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-use-non-constant-mass-matrix-depended-from-u/121787 "2024-10-26T13:32:29Z")

</div>

Hello! The DifferentialEquations.jl documentation says that: Non-constant mass matrices are not directly supported: users are advised to transform their problem through substitution to a DAE with constant mass matric…

---

## [Changing the size of VectorContinuousCallback](https://discourse.julialang.org/t/changing-the-size-of-vectorcontinuouscallback/119534)

<div class="topic-metadata">

**Author:** [@evan-wehi](https://discourse.julialang.org/u/evan-wehi)\
**Replies:** 6\
**Last updated:** [October 23, 2024, 5:40am UTC](https://discourse.julialang.org/t/changing-the-size-of-vectorcontinuouscallback/119534 "2024-10-23T05:40:56Z")

</div>

I’m modelling cell population dynamics. Cells die and divide so the size of system is always changing. I love DifferentialEquations.jl because it is the only library I know of that has an API for this. Most of my state v…

---

## [Count of diff eq callbacks](https://discourse.julialang.org/t/count-of-diff-eq-callbacks/121546)

<div class="topic-metadata">

**Author:** [@Egwene\_al\_Vere](https://discourse.julialang.org/u/Egwene_al_Vere)\
**Replies:** 0\
**Last updated:** [October 21, 2024, 5:39pm UTC](https://discourse.julialang.org/t/count-of-diff-eq-callbacks/121546 "2024-10-21T17:39:18Z")

</div>

using DiscreteCallback, is there a built-in way to know the number of times the affect! function is called both inside the affect! function and after solve/step! call is completed? current;y, i’m using a ref value in the…

---

## [Different solution if solving a differential equation in chunks or for full time at once](https://discourse.julialang.org/t/different-solution-if-solving-a-differential-equation-in-chunks-or-for-full-time-at-once/121351)

<div class="topic-metadata">

**Author:** [@shaurya](https://discourse.julialang.org/u/shaurya)\
**Replies:** 5\
**Last updated:** [October 16, 2024, 9:56pm UTC](https://discourse.julialang.org/t/different-solution-if-solving-a-differential-equation-in-chunks-or-for-full-time-at-once/121351 "2024-10-16T21:56:30Z")

</div>

Hi! I’m trying a simulate an orbit in the chaotic 3 body dynamics, and perform two different simulations: one for full time (0, nT) where n is an integer and T is the time period of the orbit. On the other hand, I also p…

---

## [Local Error Estimation for DAEs](https://discourse.julialang.org/t/local-error-estimation-for-daes/121159)

<div class="topic-metadata">

**Author:** [@aaliqureshi](https://discourse.julialang.org/u/aaliqureshi)\
**Replies:** 7\
**Last updated:** [October 11, 2024, 3:09pm UTC](https://discourse.julialang.org/t/local-error-estimation-for-daes/121159 "2024-10-11T15:09:15Z")

</div>

I’m inquiring about the error estimation approach used for solving Differential Algebraic Equations (DAEs) in Julia. The current approach considers all variables (state and algebraic) in the estimation of local error. H…

---

## [\[ANN\] DynamicExpressions.jl: Fast evaluation of runtime-generated expressions without compilation](https://discourse.julialang.org/t/ann-dynamicexpressions-jl-fast-evaluation-of-runtime-generated-expressions-without-compilation/88983)

<div class="topic-metadata">

**Author:** [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Replies:** 7\
**Last updated:** [October 1, 2024, 1:57pm UTC](https://discourse.julialang.org/t/ann-dynamicexpressions-jl-fast-evaluation-of-runtime-generated-expressions-without-compilation/88983 "2024-10-01T13:57:13Z")

</div>

Need to work with a large space of symbolic expressions which are unknown at runtime, but numerically evaluate them just as quickly as if they were hard-coded? Then you need DynamicExpressions.jl! DynamicExpressions…

---

## [Optimization program which previously worked is no longer working](https://discourse.julialang.org/t/optimization-program-which-previously-worked-is-no-longer-working/118900)

<div class="topic-metadata">

**Author:** [@tighem](https://discourse.julialang.org/u/tighem)\
**Replies:** 12\
**Last updated:** [September 22, 2024, 10:16pm UTC](https://discourse.julialang.org/t/optimization-program-which-previously-worked-is-no-longer-working/118900 "2024-09-22T22:16:41Z")

</div>

I am running julia version 1.10.5, about a month ago I had written and successfully run a piece of optimization code which uses LBFGS to optimize a system of 218 differential equations dependent on 12 parameters. Returni…

---

## [An easy way to view system-state when a differential equation solver encounters a warning](https://discourse.julialang.org/t/an-easy-way-to-view-system-state-when-a-differential-equation-solver-encounters-a-warning/118944)

<div class="topic-metadata">

**Author:** [@VBtheHun](https://discourse.julialang.org/u/VBtheHun)\
**Replies:** 4\
**Last updated:** [September 19, 2024, 3:47pm UTC](https://discourse.julialang.org/t/an-easy-way-to-view-system-state-when-a-differential-equation-solver-encounters-a-warning/118944 "2024-09-19T15:47:16Z")

</div>

I am trying to solve a system of differential equations where I run into a larger Maxiters needed warning. I suspect that my model has been ill-specified as this appears only for certain parameter values. To figure this …

---

## [Optimising allocations and memory use in ODEProblems](https://discourse.julialang.org/t/optimising-allocations-and-memory-use-in-odeproblems/119513)

<div class="topic-metadata">

**Author:** [@markjholmes](https://discourse.julialang.org/u/markjholmes)\
**Replies:** 2\
**Last updated:** [September 18, 2024, 9:14am UTC](https://discourse.julialang.org/t/optimising-allocations-and-memory-use-in-odeproblems/119513 "2024-09-18T09:14:30Z")

</div>

If I have an ODEProblem with many lines of computation going on at each step, when (if ever) does it become sensible to pre-allocate the space for these computations inside the parameters, p? With a simplified example, …

---

## [Using JIT32 to solve ODE systems through diffeqpy](https://discourse.julialang.org/t/using-jit32-to-solve-ode-systems-through-diffeqpy/119475)

<div class="topic-metadata">

**Author:** [@Hector\_Yaker](https://discourse.julialang.org/u/Hector_Yaker)\
**Replies:** 1\
**Last updated:** [September 17, 2024, 5:56am UTC](https://discourse.julialang.org/t/using-jit32-to-solve-ode-systems-through-diffeqpy/119475 "2024-09-17T05:56:09Z")

</div>

Hey, I’ve been having a lot of trouble when converting a prob into JIT32 when using as a base a Python ODE System which integrates externally defined functions. I have noticed that it’s related to the fact that Julia con…

---

## [Brusselator example from DiffEqGPU won't run or performed badly after simple fix](https://discourse.julialang.org/t/brusselator-example-from-diffeqgpu-wont-run-or-performed-badly-after-simple-fix/119410)

<div class="topic-metadata">

**Author:** [@gluon-free](https://discourse.julialang.org/u/gluon-free)\
**Replies:** 7\
**Last updated:** [September 16, 2024, 6:03am UTC](https://discourse.julialang.org/t/brusselator-example-from-diffeqgpu-wont-run-or-performed-badly-after-simple-fix/119410 "2024-09-16T06:03:37Z")

</div>

Doing my first steps in Julia, I often find that good examples from “official” sources don’t work because things change so quickly. This stiff PDE example returning error "Scalar indexing is disallowed " I googled t…

---

## [Information about the two methods of \`internalnorm\`](https://discourse.julialang.org/t/information-about-the-two-methods-of-internalnorm/119383)

<div class="topic-metadata">

**Author:** [@lieskjur](https://discourse.julialang.org/u/lieskjur)\
**Replies:** 5\
**Last updated:** [September 15, 2024, 8:27am UTC](https://discourse.julialang.org/t/information-about-the-two-methods-of-internalnorm/119383 "2024-09-15T08:27:13Z")

</div>

Hi, I am using DifferentialEquations.jl and want to implement my own internalnorm function with specific weights for the purpose of timestep adaptation. I would appreciate some extra information about how the function is…

---

## [How to adapt the timestep based on a subset of states](https://discourse.julialang.org/t/how-to-adapt-the-timestep-based-on-a-subset-of-states/119363)

<div class="topic-metadata">

**Author:** [@lieskjur](https://discourse.julialang.org/u/lieskjur)\
**Replies:** 5\
**Last updated:** [September 15, 2024, 7:53am UTC](https://discourse.julialang.org/t/how-to-adapt-the-timestep-based-on-a-subset-of-states/119363 "2024-09-15T07:53:47Z")

</div>

Hi, I am using DifferentialEquations.jl with ComponentArrays.jl to not only integrate the state of my system but also some additional variables (by-products) which I later need to interpolate at arbitrary times (using “f…

---

## [Bug in DifferentialEquations](https://discourse.julialang.org/t/bug-in-differentialequations/116968)

<div class="topic-metadata">

**Author:** [@elcup](https://discourse.julialang.org/u/elcup)\
**Replies:** 2\
**Last updated:** [September 13, 2024, 11:04am UTC](https://discourse.julialang.org/t/bug-in-differentialequations/116968 "2024-09-13T11:04:49Z")

</div>

Hi! Note: I am working on a new environment with only DifferentialEquations.jl installed. When I run the following simple code taken from the tutorials of DifferentialEquations.jl (Conditional Dosing in Pharmacometrics…

---

## [Discrete callback + Saving callback for changing parameters in DifferentialEquations doesn't work as intended](https://discourse.julialang.org/t/discrete-callback-saving-callback-for-changing-parameters-in-differentialequations-doesnt-work-as-intended/119277)

<div class="topic-metadata">

**Author:** [@alonsoC1s](https://discourse.julialang.org/u/alonsoC1s)\
**Replies:** 11\
**Last updated:** [September 12, 2024, 12:25pm UTC](https://discourse.julialang.org/t/discrete-callback-saving-callback-for-changing-parameters-in-differentialequations-doesnt-work-as-intended/119277 "2024-09-12T12:25:57Z")

</div>

Hi, I have been using DifferentialEquations.jl to solve a set of around 250 coupled SDEs that used to be solved with custom Euler-Maruyama. In the model this is simulating there is a parameter, an adjacency matrix, tha…

---

## [Multiple shooting with multiple trajectories: how to properly implement this?](https://discourse.julialang.org/t/multiple-shooting-with-multiple-trajectories-how-to-properly-implement-this/118715)

<div class="topic-metadata">

**Author:** [@PyJulia](https://discourse.julialang.org/u/PyJulia)\
**Replies:** 2\
**Last updated:** [September 3, 2024, 1:00pm UTC](https://discourse.julialang.org/t/multiple-shooting-with-multiple-trajectories-how-to-properly-implement-this/118715 "2024-09-03T13:00:25Z")

</div>

DiffEq has a tutorial on multiple shooting for neural ode’s. It works for a single trajectory. I have a dataset with several trajectories, each trajectory being a solution to a differential equation with different initia…

---

## [Why does the plot of EnsembleProblem differ from the original ODEProblem?](https://discourse.julialang.org/t/why-does-the-plot-of-ensembleproblem-differ-from-the-original-odeproblem/118415)

<div class="topic-metadata">

**Author:** [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Replies:** 2\
**Last updated:** [August 29, 2024, 5:59pm UTC](https://discourse.julialang.org/t/why-does-the-plot-of-ensembleproblem-differ-from-the-original-odeproblem/118415 "2024-08-29T17:59:44Z")

</div>

I assume that if I don’t change the problem in EnsembleProblem, the EnsembleSummary should produce the same plot as the original ODEProblem solution. Simple example: module test using Plots, StatsPlots using LinearAlg…

[Previous page](https://discourse.julialang.org/tag/diffeq/37.md?match_all_tags=true&page=1&tags%5B%5D=diffeq)

[Next page](https://discourse.julialang.org/tag/diffeq/37.md?match_all_tags=true&page=3&tags%5B%5D=diffeq)
