# Numerics

**URL:** https://discourse.julialang.org/c/domain/numerics/20.md?page=22

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

**Page:** 23

---

## [Integrate High Dimension highly oscillating integral](https://discourse.julialang.org/t/integrate-high-dimension-highly-oscillating-integral/75825)

<div class="topic-metadata">

**Author:** [@CollinsPeriodLee](https://discourse.julialang.org/u/CollinsPeriodLee)\
**Replies:** 2\
**Last updated:** [February 4, 2022, 11:13pm UTC](https://discourse.julialang.org/t/integrate-high-dimension-highly-oscillating-integral/75825 "2022-02-04T23:13:16Z")

</div>

Hi, everyone, I’m considering to compute the integral for d\>2. I have already read the paper QUADRATURE METHODS FOR MULTIVARIATE HIGHLY OSCILLATORY INTEGRALS USING DERIVATIVES and noticed that for d=2, there is a doa…

---

## [Reference for Brusselator in DifferentialEquation.jl](https://discourse.julialang.org/t/reference-for-brusselator-in-differentialequation-jl/75810)

<div class="topic-metadata">

**Author:** [@ziolai](https://discourse.julialang.org/u/ziolai)\
**Replies:** 2\
**Last updated:** [February 4, 2022, 9:08pm UTC](https://discourse.julialang.org/t/reference-for-brusselator-in-differentialequation-jl/75810 "2022-02-04T21:08:57Z")

</div>

The page Solving Large Stiff Equations · DifferentialEquations.jl list specific boundary and initial conditions for the Brusselator diffusion-reaction system. What reference what used? Thx!

---

## [Multithreaded MatVec](https://discourse.julialang.org/t/multithreaded-matvec/6030)

<div class="topic-metadata">

**Author:** [@dgleich](https://discourse.julialang.org/u/dgleich)\
**Replies:** 10\
**Last updated:** [February 4, 2022, 2:40pm UTC](https://discourse.julialang.org/t/multithreaded-matvec/6030 "2022-02-04T14:40:48Z")

</div>

Just out of curiosity, has anyone written up a sparse matrix-vector product using the new multithreading stuff? The At\_mul\_B operation works great because all the writes are disjoint between threads. But I was curious ab…

---

## [How to use DiscreteCallbacks with sundials.jl IDA solver? How to implement reinit!?](https://discourse.julialang.org/t/how-to-use-discretecallbacks-with-sundials-jl-ida-solver-how-to-implement-reinit/75674)

<div class="topic-metadata">

**Author:** [@TobiasFranz](https://discourse.julialang.org/u/TobiasFranz)\
**Replies:** 8\
**Last updated:** [February 3, 2022, 2:36pm UTC](https://discourse.julialang.org/t/how-to-use-discretecallbacks-with-sundials-jl-ida-solver-how-to-implement-reinit/75674 "2022-02-03T14:36:00Z")

</div>

I’m solving large DAE-Systems derived from PDEs for electrochemical systems. I’m using the IDA solver because the ODE solvers (DAE formulated as ODE in mass matrix form) are not working (all of them are unstable) for my …

---

## [DiffEqOperators and DifferentialEquations: solving a coupled system of PDEs](https://discourse.julialang.org/t/diffeqoperators-and-differentialequations-solving-a-coupled-system-of-pdes/74722)

<div class="topic-metadata">

**Author:** [@ash](https://discourse.julialang.org/u/ash)\
**Replies:** 14\
**Last updated:** [February 3, 2022, 2:14pm UTC](https://discourse.julialang.org/t/diffeqoperators-and-differentialequations-solving-a-coupled-system-of-pdes/74722 "2022-02-03T14:14:55Z")

</div>

I am trying to solve a system of coupled PDEs shown below: and . I have written some simple code using DifferentialEquations.jl and DiffEqOperators.jl hoping to solve this system: using DifferentialEquations using…

---

## [Need help avoiding catastrophic cancellation or overflow](https://discourse.julialang.org/t/need-help-avoiding-catastrophic-cancellation-or-overflow/75318)

<div class="topic-metadata">

**Author:** [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Replies:** 15\
**Last updated:** [February 3, 2022, 2:24am UTC](https://discourse.julialang.org/t/need-help-avoiding-catastrophic-cancellation-or-overflow/75318 "2022-02-03T02:24:04Z")

</div>

I am computing integrals of the form \\int\_s^t e^{-a -bx-cx^2}dx. The solution is available in closed form in a number of cases such as (1) c\>0 and (2) c==0 and b!=0. The problem is that the closed form solution for the c…

---

## [Which is best package for integration(and differentiation)?](https://discourse.julialang.org/t/which-is-best-package-for-integration-and-differentiation/75461)

<div class="topic-metadata">

**Author:** [@matic\_lauko](https://discourse.julialang.org/u/matic_lauko)\
**Replies:** 6\
**Last updated:** [January 30, 2022, 11:44pm UTC](https://discourse.julialang.org/t/which-is-best-package-for-integration-and-differentiation/75461 "2022-01-30T23:44:46Z")

</div>

I’m new in Julia and have no idea of which are good packages for integration. I have checked juliapackages and observer, but everything is explained on a math level far above mine. Thank you for your advice.

---

## [LoadError: MethodError: no method matching Float64(::ForwardDiff.Dual{ForwardDiff.Tag{OrdinaryDiffEq.OrdinaryDiffEqTag, Float64}, Float64, 11})](https://discourse.julialang.org/t/loaderror-methoderror-no-method-matching-float64-forwarddiff-dual-forwarddiff-tag-ordinarydiffeq-ordinarydiffeqtag-float64-float64-11/75295)

<div class="topic-metadata">

**Author:** [@fdc](https://discourse.julialang.org/u/fdc)\
**Replies:** 2\
**Last updated:** [January 27, 2022, 11:42pm UTC](https://discourse.julialang.org/t/loaderror-methoderror-no-method-matching-float64-forwarddiff-dual-forwarddiff-tag-ordinarydiffeq-ordinarydiffeqtag-float64-float64-11/75295 "2022-01-27T23:42:43Z")

</div>

Hi, I’m trying to solve a relatively large system of ODE with some constraints (hence DAE) using the manifold projection method provided by Julia. My model contains some aerodynamics with large angles that means I could…

---

## [Problem using \`\`\`lyapunov spectrum\`\`\`](https://discourse.julialang.org/t/problem-using-lyapunov-spectrum/75224)

<div class="topic-metadata">

**Author:** [@pafloxy](https://discourse.julialang.org/u/pafloxy)\
**Replies:** 7\
**Last updated:** [January 26, 2022, 1:25pm UTC](https://discourse.julialang.org/t/problem-using-lyapunov-spectrum/75224 "2022-01-26T13:25:40Z")

</div>

the follwing code cannot recognise the lyapunovspectrum function. lyapunovspectrum(ds\_3, 10 ; Ttr= 10.00) Can anyone point out the problem here ?

---

## [On the LU factorization](https://discourse.julialang.org/t/on-the-lu-factorization/75066)

<div class="topic-metadata">

**Author:** [@scheiber\_erno](https://discourse.julialang.org/u/scheiber_erno)\
**Replies:** 1\
**Last updated:** [January 23, 2022, 1:29pm UTC](https://discourse.julialang.org/t/on-the-lu-factorization/75066 "2022-01-23T13:29:20Z")

</div>

What is wrong with my code ? It works well six years ago. It is the case of a singular matrix. I review the following exercise: Compute the LU factorization of the matrix A=\[1 2 -1 3 2;2 4 -2 5 1;-1 -2 1 -3 -4;3 6 2 …

---

## [Only explicit solvers work for stiff PDE-derived ODEs, stiff solvers crashing](https://discourse.julialang.org/t/only-explicit-solvers-work-for-stiff-pde-derived-odes-stiff-solvers-crashing/74907)

<div class="topic-metadata">

**Author:** [@ash](https://discourse.julialang.org/u/ash)\
**Replies:** 11\
**Last updated:** [January 22, 2022, 2:05am UTC](https://discourse.julialang.org/t/only-explicit-solvers-work-for-stiff-pde-derived-odes-stiff-solvers-crashing/74907 "2022-01-22T02:05:04Z")

</div>

I apologize for posting about this PDE many times over the past few days, but I am pursuing several different approaches and each comes with its own issues. The system is given by: \\begin{gathered} \\frac{\\partial c\_{1…

---

## [2D DFFT: wrong order along the second dimension](https://discourse.julialang.org/t/2d-dfft-wrong-order-along-the-second-dimension/74869)

<div class="topic-metadata">

**Author:** [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Replies:** 1\
**Last updated:** [January 19, 2022, 4:14pm UTC](https://discourse.julialang.org/t/2d-dfft-wrong-order-along-the-second-dimension/74869 "2022-01-19T16:14:36Z")

</div>

Let us consider a 2D discrete fast Fourier transform of a separable function: using FFTW xs = collect(0.0:0.1:0.9) ys = xs zs = cos.(xs).^2\*sin.(ys') fzs = fft(zs) The result of 2D DFF transform of zs is On the oth…

---

## [Solving HJB PDE using deep learning](https://discourse.julialang.org/t/solving-hjb-pde-using-deep-learning/60639)

<div class="topic-metadata">

**Author:** [@Honza9723](https://discourse.julialang.org/u/Honza9723)\
**Replies:** 16\
**Last updated:** [January 19, 2022, 4:44am UTC](https://discourse.julialang.org/t/solving-hjb-pde-using-deep-learning/60639 "2022-01-19T04:44:50Z")

</div>

Dear All, sorry for bothering with a possibly stupid question. I would like to ask for some advice about solving the Hamilton-Jacobi-Bellman equation using deep learning. I am trying to solve an HJB equation of a simpl…

---

## [Issue with (2+1)D Diffusion Reaction PDE with DiffEqOperators.jl](https://discourse.julialang.org/t/issue-with-2-1-d-diffusion-reaction-pde-with-diffeqoperators-jl/74840)

<div class="topic-metadata">

**Author:** [@ash](https://discourse.julialang.org/u/ash)\
**Replies:** 0\
**Last updated:** [January 19, 2022, 1:25am UTC](https://discourse.julialang.org/t/issue-with-2-1-d-diffusion-reaction-pde-with-diffeqoperators-jl/74840 "2022-01-19T01:25:47Z")

</div>

I am studying a (2+1)D diffusion-reaction PDE. I have asked about this before and got plenty of help and that resolved my issues. However, I just realized I was getting the wrong results because the model should be in tw…

---

## [NeuralPDE.jl: how to use random noise as the initial condition](https://discourse.julialang.org/t/neuralpde-jl-how-to-use-random-noise-as-the-initial-condition/74723)

<div class="topic-metadata">

**Author:** [@ash](https://discourse.julialang.org/u/ash)\
**Replies:** 3\
**Last updated:** [January 17, 2022, 5:22pm UTC](https://discourse.julialang.org/t/neuralpde-jl-how-to-use-random-noise-as-the-initial-condition/74723 "2022-01-17T17:22:26Z")

</div>

I am trying to solve the same model discussed in this question using a PINN approach. Frankenstining together some code based on the examples in the documentation, I ended up with the following: using NeuralPDE, Flux, …

---

## [Problem using ForwardDiff with backslash "\\" matrix solver](https://discourse.julialang.org/t/problem-using-forwarddiff-with-backslash-matrix-solver/74498)

<div class="topic-metadata">

**Author:** [@gaodifan](https://discourse.julialang.org/u/gaodifan)\
**Replies:** 4\
**Last updated:** [January 13, 2022, 3:02pm UTC](https://discourse.julialang.org/t/problem-using-forwarddiff-with-backslash-matrix-solver/74498 "2022-01-13T15:02:09Z")

</div>

Hello, I’m trying to use the ForwardDiff.jl package for automatic differentiation of my function, which includes using the backslash \\ operator for a matrix solve. ForwardDiff requires Arrays to be of the more general ty…

---

## [Stochastic Differential Equation with positive-only noise?](https://discourse.julialang.org/t/stochastic-differential-equation-with-positive-only-noise/74517)

<div class="topic-metadata">

**Author:** [@markmbaum](https://discourse.julialang.org/u/markmbaum)\
**Replies:** 1\
**Last updated:** [January 13, 2022, 1:45am UTC](https://discourse.julialang.org/t/stochastic-differential-equation-with-positive-only-noise/74517 "2022-01-13T01:45:26Z")

</div>

This may be more of a math question, but are there methods available for solving stochastic differential equations with positive only noise? I’ve been tinkering around with an interesting scalar system that includes the …

---

## [Fixing bugs in the LTS version 1.6.5](https://discourse.julialang.org/t/fixing-bugs-in-the-lts-version-1-6-5/74482)

<div class="topic-metadata">

**Author:** [@andreasvarga](https://discourse.julialang.org/u/andreasvarga)\
**Replies:** 4\
**Last updated:** [January 12, 2022, 4:02pm UTC](https://discourse.julialang.org/t/fixing-bugs-in-the-lts-version-1-6-5/74482 "2022-01-12T16:02:41Z")

</div>

I wonder how realistic is for package developers to assume that bugs reported for the LTS version 1.6.5, which are already fixed in 1.7.1, will be also fixed for the LTS version. Personally, I am facing the dilemma that…

---

## [Package management of a package with different versions required by other packages](https://discourse.julialang.org/t/package-management-of-a-package-with-different-versions-required-by-other-packages/74236)

<div class="topic-metadata">

**Author:** [@Xijiang\_Yu](https://discourse.julialang.org/u/Xijiang_Yu)\
**Replies:** 5\
**Last updated:** [January 8, 2022, 9:32pm UTC](https://discourse.julialang.org/t/package-management-of-a-package-with-different-versions-required-by-other-packages/74236 "2022-01-08T21:32:33Z")

</div>

I recently had a trouble with package Octavian. Because it can deal with BitArray or Int8 matrix, it has a great advantage over BLAS. It made it possible to deal with much larger matrix than BLAS. The problem is that wit…

---

## [Docs DifferentialEquations.jl SecondOrderODEProblem](https://discourse.julialang.org/t/docs-differentialequations-jl-secondorderodeproblem/73773)

<div class="topic-metadata">

**Author:** [@ziolai](https://discourse.julialang.org/u/ziolai)\
**Replies:** 1\
**Last updated:** [December 30, 2021, 11:14am UTC](https://discourse.julialang.org/t/docs-differentialequations-jl-secondorderodeproblem/73773 "2021-12-30T11:14:10Z")

</div>

What does the symbol f (as opposed to f1 or f2) in SecondOrderODEProblem{isinplace}(f,du0,u0,tspan,p=NullParameters();kwargs…) on the page Dynamical, Hamiltonian, and 2nd Order ODE Solvers · DifferentialEquations.jl re…

---

## [What to do when the DEQ model does not converge？](https://discourse.julialang.org/t/what-to-do-when-the-deq-model-does-not-converge/73610)

<div class="topic-metadata">

**Author:** [@chen2021](https://discourse.julialang.org/u/chen2021)\
**Replies:** 6\
**Last updated:** [December 26, 2021, 12:13pm UTC](https://discourse.julialang.org/t/what-to-do-when-the-deq-model-does-not-converge/73610 "2021-12-26T12:13:31Z")

</div>

Hi everyone! I am learning Deep equilibrium (DEQ) models. The following code is copied from @ChrisRackauckas 's reply in a topic (sorry forgot which topic). Its purpose is to train a DEQ model to fit y=2x. using Flux us…

---

## [Image peak finder with thresholding and minimum distance](https://discourse.julialang.org/t/image-peak-finder-with-thresholding-and-minimum-distance/73268)

<div class="topic-metadata">

**Author:** [@Aju](https://discourse.julialang.org/u/Aju)\
**Replies:** 0\
**Last updated:** [December 17, 2021, 3:55pm UTC](https://discourse.julialang.org/t/image-peak-finder-with-thresholding-and-minimum-distance/73268 "2021-12-17T15:55:17Z")

</div>

Hi, could any suggest to me a peak finder function for a 2D image with options to input threshold value for peak finding and option to enter minimum spacing between the peaks? I am effectively looking for an Julia func…

---

## [Problem with Zygote gradient](https://discourse.julialang.org/t/problem-with-zygote-gradient/72449)

<div class="topic-metadata">

**Author:** [@mottelet](https://discourse.julialang.org/u/mottelet)\
**Replies:** 10\
**Last updated:** [December 16, 2021, 12:41pm UTC](https://discourse.julialang.org/t/problem-with-zygote-gradient/72449 "2021-12-16T12:41:57Z")

</div>

Hi all, I work with Julia 1.7. Zygote fails to generate/compute my AD gradient in the code below (the loss function itself works well). The message is the following : ERROR: LoadError: Need an adjoint for constructor D…

---

## [Stochastic diff eq driven by 1/f noise](https://discourse.julialang.org/t/stochastic-diff-eq-driven-by-1-f-noise/72669)

<div class="topic-metadata">

**Author:** [@arnelg](https://discourse.julialang.org/u/arnelg)\
**Replies:** 5\
**Last updated:** [December 16, 2021, 12:19pm UTC](https://discourse.julialang.org/t/stochastic-diff-eq-driven-by-1-f-noise/72669 "2021-12-16T12:19:27Z")

</div>

Hi all, I’m new to DifferentialEquations.jl and looking for tips on how model a stochastic process driven by noise that has a 1/f spectrum. Admittedly, this question might be not only on how to use the Julia stochastic d…

---

## [Computing left-eigenvectors with high precision](https://discourse.julialang.org/t/computing-left-eigenvectors-with-high-precision/72949)

<div class="topic-metadata">

**Author:** [@yosuga](https://discourse.julialang.org/u/yosuga)\
**Replies:** 15\
**Last updated:** [December 14, 2021, 5:27pm UTC](https://discourse.julialang.org/t/computing-left-eigenvectors-with-high-precision/72949 "2021-12-14T17:27:32Z")

</div>

I need to get left-eigenvectors of a general complex matrix H. Especially, I want to treat a large and ill-conditioned one. I know two ways under using LinearAlgebra: computing the right-eigenvectors of H'. computing…

---

## [Computational Geometry: Regular Distribution of Points inside of a Polygon](https://discourse.julialang.org/t/computational-geometry-regular-distribution-of-points-inside-of-a-polygon/39523)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 18\
**Last updated:** [December 12, 2021, 1:46pm UTC](https://discourse.julialang.org/t/computational-geometry-regular-distribution-of-points-inside-of-a-polygon/39523 "2021-12-12T13:46:57Z")

</div>

Hello! So I am basically asking since I struggle to figure out if there is an efficient way to do this. Basically I want to be able to take any arbitrary polygon and fill it with particles as shown in this figure: T…

---

## [Symbolic factorization analysis](https://discourse.julialang.org/t/symbolic-factorization-analysis/39400)

<div class="topic-metadata">

**Author:** [@Mirsad\_Cosovic](https://discourse.julialang.org/u/Mirsad_Cosovic)\
**Replies:** 6\
**Last updated:** [December 10, 2021, 4:28pm UTC](https://discourse.julialang.org/t/symbolic-factorization-analysis/39400 "2021-12-10T16:28:22Z")

</div>

Hi, I need a symbolic factorization of the matrix, similar to symbfact in MATLAB. I have a sparse matrix: A = sparse(\[ 2 0 0 0 0 1 0 2 1 1 1 1 0 1 2 2 1 1 0…

---

## [Fix incongruencies in ODE models](https://discourse.julialang.org/t/fix-incongruencies-in-ode-models/72880)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 2\
**Last updated:** [December 10, 2021, 9:00am UTC](https://discourse.julialang.org/t/fix-incongruencies-in-ode-models/72880 "2021-12-10T09:00:36Z")

</div>

Hello, I am trying to simulate a bacteria/phage infection. I managed, thanks to the forum support, to make a simulation that in principle can change a parameter in the ODEs – but here I am not doing such a change: usi…

---

## [\`Inf\` does not work in \`quadgk!()\`](https://discourse.julialang.org/t/inf-does-not-work-in-quadgk/72838)

<div class="topic-metadata">

**Author:** [@HJWang](https://discourse.julialang.org/u/HJWang)\
**Replies:** 2\
**Last updated:** [December 9, 2021, 6:09pm UTC](https://discourse.julialang.org/t/inf-does-not-work-in-quadgk/72838 "2021-12-09T18:09:50Z")

</div>

I tried to use quadgk!(), which is the in-place quadgk(), but encountered problems. Simply put, quadgk!() does not accpet Inf or -Inf in the domain boundary while it is not a problem with quadgk(). The following is a MWE…

---

## [How to change the value of a parameter with DifferentialEquations?](https://discourse.julialang.org/t/how-to-change-the-value-of-a-parameter-with-differentialequations/72752)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 7\
**Last updated:** [December 8, 2021, 1:53pm UTC](https://discourse.julialang.org/t/how-to-change-the-value-of-a-parameter-with-differentialequations/72752 "2021-12-08T13:53:21Z")

</div>

Hello, I have a series of differential equations, and I can change the value of the integrator with a back call like this: condition(u, t, integrator) = t==1000 # time of alteration affect!(integrator) = in…

[Previous page](https://discourse.julialang.org/c/domain/numerics/20.md?page=21)

[Next page](https://discourse.julialang.org/c/domain/numerics/20.md?page=23)
