# Numerics

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

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

**Page:** 25

---

## [Differentiation matrix stack overflow](https://discourse.julialang.org/t/differentiation-matrix-stack-overflow/68944)

<div class="topic-metadata">

**Author:** [@GianpieroPascale](https://discourse.julialang.org/u/GianpieroPascale)\
**Replies:** 3\
**Last updated:** [September 29, 2021, 5:14pm UTC](https://discourse.julialang.org/t/differentiation-matrix-stack-overflow/68944 "2021-09-29T17:14:40Z")

</div>

I’m trying to follow along with @stevengj’s lecture notes on 2D differentiation matrices, but I can’t get past the first example without Julia reporting a stack-overflow error. The piece of code in question is # constru…

---

## [Solving a large system of differential equations](https://discourse.julialang.org/t/solving-a-large-system-of-differential-equations/68870)

<div class="topic-metadata">

**Author:** [@danielw96](https://discourse.julialang.org/u/danielw96)\
**Replies:** 10\
**Last updated:** [September 29, 2021, 10:50am UTC](https://discourse.julialang.org/t/solving-a-large-system-of-differential-equations/68870 "2021-09-29T10:50:18Z")

</div>

Hey :slight\_smile: , I am currently trying to solve a system of differential equations. I create the coefficient matrix as a sparse matrix, but when i try to use the ode solver, it gives me an out of memory error. The c…

---

## [Arithmetic using binary numbers](https://discourse.julialang.org/t/arithmetic-using-binary-numbers/68823)

<div class="topic-metadata">

**Author:** [@Jaidy](https://discourse.julialang.org/u/Jaidy)\
**Replies:** 7\
**Last updated:** [September 27, 2021, 10:19pm UTC](https://discourse.julialang.org/t/arithmetic-using-binary-numbers/68823 "2021-09-27T22:19:15Z")

</div>

I have huge matrices each entry of which is a 2-bit binary number. If I were to load them and convert to any of the Floats precisions, the memory required to load will be at least half a terabyte. Can Julia do arithmetic…

---

## [Linnea: automatic generation of efficient linear algebra programs](https://discourse.julialang.org/t/linnea-automatic-generation-of-efficient-linear-algebra-programs/66288)

<div class="topic-metadata">

**Author:** [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Replies:** 13\
**Last updated:** [September 26, 2021, 5:39pm UTC](https://discourse.julialang.org/t/linnea-automatic-generation-of-efficient-linear-algebra-programs/66288 "2021-09-26T17:39:21Z")

</div>

Came across this interesting article about Linnea and would like to share it. The authors claim that the code Linnea generates almost always outperforms the recommended implementations in Matlab, Julia, Eigen and Armadi…

---

## [NaN returned by gauss()](https://discourse.julialang.org/t/nan-returned-by-gauss/68260)

<div class="topic-metadata">

**Author:** [@trg818](https://discourse.julialang.org/u/trg818)\
**Replies:** 6\
**Last updated:** [September 16, 2021, 7:33pm UTC](https://discourse.julialang.org/t/nan-returned-by-gauss/68260 "2021-09-16T19:33:37Z")

</div>

I’m using the function gauss() from QuadGK in order to calculate a non-adaptive quadrature and am irritated about the appearance of NaN beyond a certain N. Specifically, gauss(1093,38.68598671891722,150000.0) returns an …

---

## [Stochastic model building: assistance with the DiffEq ecosystem](https://discourse.julialang.org/t/stochastic-model-building-assistance-with-the-diffeq-ecosystem/46611)

<div class="topic-metadata">

**Author:** [@Libbum](https://discourse.julialang.org/u/Libbum)\
**Replies:** 0\
**Last updated:** [September 14, 2020, 9:37pm UTC](https://discourse.julialang.org/t/stochastic-model-building-assistance-with-the-diffeq-ecosystem/46611 "2020-09-14T21:37:29Z")

</div>

So, it’s time. I need to put some noise in my nice, clean, simple ODEs. Luckily DifferentialEquations.jl has me covered—the documentation is extensive… But perhaps too extensive: I don’t know where to start. I think, ul…

---

## [DifferentialEquations.jl SDE, multiple solvers sharing the same noise](https://discourse.julialang.org/t/differentialequations-jl-sde-multiple-solvers-sharing-the-same-noise/18790)

<div class="topic-metadata">

**Author:** [@nowozin](https://discourse.julialang.org/u/nowozin)\
**Replies:** 0\
**Last updated:** [December 18, 2018, 9:54am UTC](https://discourse.julialang.org/t/differentialequations-jl-sde-multiple-solvers-sharing-the-same-noise/18790 "2018-12-18T09:54:27Z")

</div>

Thanks to the authors of DifferentialEquations.jl, it is quite a nice package. I would like to evaluate the numerical accuracy of multiple solvers for an SDE. For this, I intend to numerically solve for the same path, …

---

## [Slow lower triangular solves when compared to full Cholesky](https://discourse.julialang.org/t/slow-lower-triangular-solves-when-compared-to-full-cholesky/68122)

<div class="topic-metadata">

**Author:** [@cgeoga](https://discourse.julialang.org/u/cgeoga)\
**Replies:** 6\
**Last updated:** [September 14, 2021, 8:12pm UTC](https://discourse.julialang.org/t/slow-lower-triangular-solves-when-compared-to-full-cholesky/68122 "2021-09-14T20:12:25Z")

</div>

Can somebody here help me understand why in this code solving with the L in A = LL^T is an order of magnitude slower than just solving using A? Here is a MWE: using BenchmarkTools if !(@isdefined x) # because I lazily …

---

## [Eigenvalues and extended precision](https://discourse.julialang.org/t/eigenvalues-and-extended-precision/68119)

<div class="topic-metadata">

**Author:** [@zmoitier](https://discourse.julialang.org/u/zmoitier)\
**Replies:** 10\
**Last updated:** [September 14, 2021, 1:31pm UTC](https://discourse.julialang.org/t/eigenvalues-and-extended-precision/68119 "2021-09-14T13:31:15Z")

</div>

I am interested in computing a small proportion (between 3 and 10% of the matrix size) of the eigenvalues of a matrix with extended precision. As a toy example, let’s take the matrix A define by: T = Complex{Float128} N…

---

## [Different interpolations in Ferrite.jl](https://discourse.julialang.org/t/different-interpolations-in-ferrite-jl/67913)

<div class="topic-metadata">

**Author:** [@bcsj](https://discourse.julialang.org/u/bcsj)\
**Replies:** 4\
**Last updated:** [September 9, 2021, 8:25am UTC](https://discourse.julialang.org/t/different-interpolations-in-ferrite-jl/67913 "2021-09-09T08:25:21Z")

</div>

In Ferrite.jl when initializing CellValues like CellScalarValues or CellVectorValues one supplies a quadrature rule along with a function interpolation. According to the documentation there is an optional argument geom\_i…

---

## [Conjugate gradient with incomplete Cholesky preconditioner](https://discourse.julialang.org/t/conjugate-gradient-with-incomplete-cholesky-preconditioner/7809)

<div class="topic-metadata">

**Author:** [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Replies:** 22\
**Last updated:** [September 6, 2021, 10:27pm UTC](https://discourse.julialang.org/t/conjugate-gradient-with-incomplete-cholesky-preconditioner/7809 "2021-09-06T22:27:13Z")

</div>

I have been trying my luck with using the conjugate gradient method to solve a sparse symmetric positive definite system of equations. I found IterativeSolvers.jl, Krylov.jl and KrylovMethods.jl, of which the first seems…

---

## [Convexifying a 6-dimensional closed trajectory with \`LazySets.jl\`](https://discourse.julialang.org/t/convexifying-a-6-dimensional-closed-trajectory-with-lazysets-jl/67764)

<div class="topic-metadata">

**Author:** [@cadojo](https://discourse.julialang.org/u/cadojo)\
**Replies:** 2\
**Last updated:** [September 7, 2021, 11:01am UTC](https://discourse.julialang.org/t/convexifying-a-6-dimensional-closed-trajectory-with-lazysets-jl/67764 "2021-09-07T11:01:35Z")

</div>

First off, if anyone knows how to change the tag reachability-analysi to reachability-analysis, please do so! Discourse won’t let me type reachability-analysis in the category because a previous tag with an incorrect spe…

---

## [Eigen not working for arbitrary precision BigFloat](https://discourse.julialang.org/t/eigen-not-working-for-arbitrary-precision-bigfloat/67686)

<div class="topic-metadata">

**Author:** [@ekiral](https://discourse.julialang.org/u/ekiral)\
**Replies:** 16\
**Last updated:** [September 7, 2021, 11:11am UTC](https://discourse.julialang.org/t/eigen-not-working-for-arbitrary-precision-bigfloat/67686 "2021-09-07T11:11:51Z")

</div>

I try to use the function eigen defined on a matrix with BigFloat entries. The method does not work. julia\> matrix = \[BigFloat(2) BigFloat(3); BigFloat(3), BigFloat(2)\] julia\> matrix 2x2 Matrix{BigFloat}: 2.0 3.0 …

---

## [Setting parameters for \`ReachabilityAnalysis\`'s \`@ivp\`](https://discourse.julialang.org/t/setting-parameters-for-reachabilityanalysis-s-ivp/67776)

<div class="topic-metadata">

**Author:** [@cadojo](https://discourse.julialang.org/u/cadojo)\
**Replies:** 1\
**Last updated:** [September 7, 2021, 12:53am UTC](https://discourse.julialang.org/t/setting-parameters-for-reachabilityanalysis-s-ivp/67776 "2021-09-07T00:53:54Z")

</div>

I see in documentation for ReachabilityAnalysis that parameters are typically set in a function, as is the case in the duffing oscillator example. I’m working with a system where the ODEFunction was automatically generat…

---

## [Laplace equation in one dimension](https://discourse.julialang.org/t/laplace-equation-in-one-dimension/67715)

<div class="topic-metadata">

**Author:** [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)\
**Replies:** 5\
**Last updated:** [September 6, 2021, 2:25am UTC](https://discourse.julialang.org/t/laplace-equation-in-one-dimension/67715 "2021-09-06T02:25:55Z")

</div>

Please solve the Laplace equation in one dimension on a region bounded between x ∈ \[0, 1\], with the boundary condition Φ(0) = 1, and Φ(1) = 2. Actually line should pass through (0,1) making 45 degree with x,y-axis.

---

## [Forcing CUArray for tType and IType in ODESolution](https://discourse.julialang.org/t/forcing-cuarray-for-ttype-and-itype-in-odesolution/67531)

<div class="topic-metadata">

**Author:** [@shivak](https://discourse.julialang.org/u/shivak)\
**Replies:** 2\
**Last updated:** [September 1, 2021, 11:35pm UTC](https://discourse.julialang.org/t/forcing-cuarray-for-ttype-and-itype-in-odesolution/67531 "2021-09-01T23:35:26Z")

</div>

I’m trying to use OrdinaryDiffEq, Zygote, and CUDA to reverse-mode differentiate an ODE running on GPU. My code works on CPU, but hits this error on GPU: GPU compilation of kernel broadcast\_kernel(CUDA.CuKernelContext, …

---

## [Intersection of \`SciMLBase.EnsembleSolution\`s](https://discourse.julialang.org/t/intersection-of-scimlbase-ensemblesolution-s/67390)

<div class="topic-metadata">

**Author:** [@cadojo](https://discourse.julialang.org/u/cadojo)\
**Replies:** 10\
**Last updated:** [September 1, 2021, 11:08pm UTC](https://discourse.julialang.org/t/intersection-of-scimlbase-ensemblesolution-s/67390 "2021-09-01T23:08:45Z")

</div>

I have two EnsembleSolutions which represent tubes of orbital trajectories in space (invariant manifolds). I’d like to find the intersection of these two EnsembleSolutions. This functionality comes in two levels… Given…

---

## [Solving PDE Diffusion (using ODE solvers). Total mass increases towards infinity (should stay constant)](https://discourse.julialang.org/t/solving-pde-diffusion-using-ode-solvers-total-mass-increases-towards-infinity-should-stay-constant/67492)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 6\
**Last updated:** [September 1, 2021, 3:59pm UTC](https://discourse.julialang.org/t/solving-pde-diffusion-using-ode-solvers-total-mass-increases-towards-infinity-should-stay-constant/67492 "2021-09-01T15:59:45Z")

</div>

I am trying to solve a very simple case of the chemical Fokker-Planch equations. It is basically a diffusion equation of the probability density function of the state of a chemical reaction network. The process is very s…

---

## [What does "surprising behaviors" in the documentation of ITensor mean?](https://discourse.julialang.org/t/what-does-surprising-behaviors-in-the-documentation-of-itensor-mean/67408)

<div class="topic-metadata">

**Author:** [@wujinq](https://discourse.julialang.org/u/wujinq)\
**Replies:** 2\
**Last updated:** [August 31, 2021, 5:09pm UTC](https://discourse.julialang.org/t/what-does-surprising-behaviors-in-the-documentation-of-itensor-mean/67408 "2021-08-31T17:09:48Z")

</div>

In this page it is said that The reason we recommend the let...end block is that code written in the Julia global scope can have some surprising behaviors. Putting your code into a let block avoids these issues. What…

---

## [Compute double multipole expansion](https://discourse.julialang.org/t/compute-double-multipole-expansion/67059)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 6\
**Last updated:** [August 30, 2021, 6:53pm UTC](https://discourse.julialang.org/t/compute-double-multipole-expansion/67059 "2021-08-30T18:53:06Z")

</div>

Hello, I am working on the calculation of the pressure induced at d locations \\{\\xi\_1, \\ldots, \\xi\_d\\} due to a set of n singularities located at \\{z\_1, \\ldots, z\_n\\} with strength \\{ S\_1, \\ldots, S\_n\\}, where \\xi\_i, z\_…

---

## [How lazy is too lazy? An exercise in pseudoinverses](https://discourse.julialang.org/t/how-lazy-is-too-lazy-an-exercise-in-pseudoinverses/67020)

<div class="topic-metadata">

**Author:** [@artkuo](https://discourse.julialang.org/u/artkuo)\
**Replies:** 4\
**Last updated:** [August 27, 2021, 11:16pm UTC](https://discourse.julialang.org/t/how-lazy-is-too-lazy-an-exercise-in-pseudoinverses/67020 "2021-08-27T23:16:07Z")

</div>

Inspired by this discussion, I worked up a self-education project to let a naive user type inv(A'A)A'b expecting to do a pseudoinverse by hand. But the package lazily avoids doing any inversion or matrix multiplication, …

---

## [Tracking DMRG progress in ITensors](https://discourse.julialang.org/t/tracking-dmrg-progress-in-itensors/66907)

<div class="topic-metadata">

**Author:** [@wujinq](https://discourse.julialang.org/u/wujinq)\
**Replies:** 1\
**Last updated:** [August 27, 2021, 4:26pm UTC](https://discourse.julialang.org/t/tracking-dmrg-progress-in-itensors/66907 "2021-08-27T16:26:10Z")

</div>

I’m using ITensors to do some DMRG calculation. When running dmrg(H, ψ\_0, sweeps), is there a way to track the progress? For example, if I want to displa a progress bar to keep an eye on the calculation, what should I do…

---

## [Product of two stochastic processes in DifferentialEquations.jl](https://discourse.julialang.org/t/product-of-two-stochastic-processes-in-differentialequations-jl/66391)

<div class="topic-metadata">

**Author:** [@mastrof](https://discourse.julialang.org/u/mastrof)\
**Replies:** 3\
**Last updated:** [August 26, 2021, 4:27am UTC](https://discourse.julialang.org/t/product-of-two-stochastic-processes-in-differentialequations-jl/66391 "2021-08-26T04:27:32Z")

</div>

Hello, I have recently started to play out with DifferentialEquations.jl; I’m gradually reading through the docs but there’s a lot of stuff in there which will keep me busy for a while, so I’m still at a beginner level. …

---

## [Solving ODE parameters using experimental data with control inputs](https://discourse.julialang.org/t/solving-ode-parameters-using-experimental-data-with-control-inputs/66614)

<div class="topic-metadata">

**Author:** [@Anthony](https://discourse.julialang.org/u/Anthony)\
**Replies:** 20\
**Last updated:** [August 21, 2021, 6:44am UTC](https://discourse.julialang.org/t/solving-ode-parameters-using-experimental-data-with-control-inputs/66614 "2021-08-21T06:44:28Z")

</div>

I am trying to solve for parameters of a simple differential equation that looks like this: \\dot T = aT + bD + c where T is collected experimentally and D is the known control input. I’m trying to solve for the parame…

---

## [Exogenous functions and data in ODE aren't working if modertly complicated](https://discourse.julialang.org/t/exogenous-functions-and-data-in-ode-arent-working-if-modertly-complicated/66678)

<div class="topic-metadata">

**Author:** [@Anthony](https://discourse.julialang.org/u/Anthony)\
**Replies:** 6\
**Last updated:** [August 19, 2021, 10:07pm UTC](https://discourse.julialang.org/t/exogenous-functions-and-data-in-ode-arent-working-if-modertly-complicated/66678 "2021-08-19T22:07:05Z")

</div>

Yesterday I posted about getting control inputs into an ODE and I got great advice. However, I’m running into an issue where the exogenous functions used don’t seem to work if they’re even moderately complicated. Below …

---

## ["sparse inverse" from sparse Cholesky](https://discourse.julialang.org/t/sparse-inverse-from-sparse-cholesky/63080)

<div class="topic-metadata">

**Author:** [@Andres\_Legarra](https://discourse.julialang.org/u/Andres_Legarra)\
**Replies:** 0\
**Last updated:** [June 17, 2021, 12:07pm UTC](https://discourse.julialang.org/t/sparse-inverse-from-sparse-cholesky/63080 "2021-06-17T12:07:10Z")

</div>

I am looking for a manner to obtain, from the sparse Cholesky decomposition of sparse A, the “sparse inverse”, i.e. obtaining only the elements in A^{-1} that correspond to the non-null elements in A. This is sometime…

---

## [Chebyshev Coefficients for 1/(1+x^2); interpretation of equations in paper](https://discourse.julialang.org/t/chebyshev-coefficients-for-1-1-x-2-interpretation-of-equations-in-paper/66001)

<div class="topic-metadata">

**Author:** [@blackeneth](https://discourse.julialang.org/u/blackeneth)\
**Replies:** 6\
**Last updated:** [August 12, 2021, 2:04pm UTC](https://discourse.julialang.org/t/chebyshev-coefficients-for-1-1-x-2-interpretation-of-equations-in-paper/66001 "2021-08-12T14:04:40Z")

</div>

I need to calculate C2k from the paper, Modification of of Owen’s Method for Computing the Bivariate Normal Integral (DM Borth, 1973). The relevant bit of math is here: Note the sentence, Letting\\ C\_{2k} \\ be\\ the…

---

## [Solving inequations](https://discourse.julialang.org/t/solving-inequations/58410)

<div class="topic-metadata">

**Author:** [@statspy](https://discourse.julialang.org/u/statspy)\
**Replies:** 8\
**Last updated:** [August 11, 2021, 9:42am UTC](https://discourse.julialang.org/t/solving-inequations/58410 "2021-08-11T09:42:20Z")

</div>

is there a package to solve inequations in Julia? 2x + 3 \<= x + 7 answer: x\<= 4 Thanks

---

## [Q: The scope for development of a flexible framework for coupled stiff integro-differential equations](https://discourse.julialang.org/t/q-the-scope-for-development-of-a-flexible-framework-for-coupled-stiff-integro-differential-equations/65935)

<div class="topic-metadata">

**Author:** [@SMijin](https://discourse.julialang.org/u/SMijin)\
**Replies:** 7\
**Last updated:** [August 8, 2021, 10:28pm UTC](https://discourse.julialang.org/t/q-the-scope-for-development-of-a-flexible-framework-for-coupled-stiff-integro-differential-equations/65935 "2021-08-08T22:28:27Z")

</div>

Hello, New user here, quite eager to get involved with the community, so my apologies for the long post! I work in fusion research, and am interested in testing modelling approaches for systems of coupled stiff integro…

---

## [Vecp, transition matrix and kronecker product](https://discourse.julialang.org/t/vecp-transition-matrix-and-kronecker-product/64240)

<div class="topic-metadata">

**Author:** [@marcobonici](https://discourse.julialang.org/u/marcobonici)\
**Replies:** 9\
**Last updated:** [August 2, 2021, 1:17am UTC](https://discourse.julialang.org/t/vecp-transition-matrix-and-kronecker-product/64240 "2021-08-02T01:17:17Z")

</div>

Hi to everybody, Given 4 different matrices \\boldsymbol{A}, \\boldsymbol{C}, \\boldsymbol{D}, \\boldsymbol{E}, I want to evaluate the following quantity \\operatorname{vecp}(\\boldsymbol{A})^{T} \\boldsymbol{B}\_{n}^{+}(\\bol…

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

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