# Numerics

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

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

**Page:** 7

---

## [Search for eigenvalues under a specific upper boundary](https://discourse.julialang.org/t/search-for-eigenvalues-under-a-specific-upper-boundary/119913)

<div class="topic-metadata">

**Author:** [@tianyi\_zhang](https://discourse.julialang.org/u/tianyi_zhang)\
**Replies:** 6\
**Last updated:** [September 27, 2024, 2:58pm UTC](https://discourse.julialang.org/t/search-for-eigenvalues-under-a-specific-upper-boundary/119913 "2024-09-27T14:58:27Z")

</div>

Hello, I am trying to solve an eigenvalue problem in which eigenvalues lesser than a upper boundary are solved. The linear operator is hermitian or real symmetric, and the eigenvalues are guaranteed to be positive, so I…

---

## [Help finding multiple roots to nonlinear equation - IntervalRootFinding not working](https://discourse.julialang.org/t/help-finding-multiple-roots-to-nonlinear-equation-intervalrootfinding-not-working/119575)

<div class="topic-metadata">

**Author:** [@lpz18](https://discourse.julialang.org/u/lpz18)\
**Replies:** 13\
**Last updated:** [September 25, 2024, 8:42pm UTC](https://discourse.julialang.org/t/help-finding-multiple-roots-to-nonlinear-equation-intervalrootfinding-not-working/119575 "2024-09-25T20:42:44Z")

</div>

I have a set of nonlinear equations (which happen to be steady-state DEs) that I am trying to solve that have multiple real roots and 3 variables (x, y, & z in the code below) In Mathematica I can get the multiple roots…

---

## [Solve Large Scale Underdetermined Linear Equation with per Element Equality Constraint](https://discourse.julialang.org/t/solve-large-scale-underdetermined-linear-equation-with-per-element-equality-constraint/119655)

<div class="topic-metadata">

**Author:** [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Replies:** 16\
**Last updated:** [September 25, 2024, 5:10pm UTC](https://discourse.julialang.org/t/solve-large-scale-underdetermined-linear-equation-with-per-element-equality-constraint/119655 "2024-09-25T17:10:56Z")

</div>

I have the following linear system to solve: \\boldsymbol{A} \\boldsymbol{x} = \\boldsymbol{0}, \\quad \\text{subject to} \\; {x}\_{i} = {v}\_{i} \\; \\forall i \\in \\mathcal{V} Where \\boldsymbol{A} \\in \\mathbb{R}^{m \\times n} w…

---

## [Cholesky Decomposition of a Sparse Symmetric Positive Semidefinite (SPSD) Singular Matrix](https://discourse.julialang.org/t/cholesky-decomposition-of-a-sparse-symmetric-positive-semidefinite-spsd-singular-matrix/119682)

<div class="topic-metadata">

**Author:** [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Replies:** 19\
**Last updated:** [September 23, 2024, 5:31pm UTC](https://discourse.julialang.org/t/cholesky-decomposition-of-a-sparse-symmetric-positive-semidefinite-spsd-singular-matrix/119682 "2024-09-23T17:31:44Z")

</div>

Is there such equivalent for sparse matrix? I don’t see the pivoting option for SparseMatrixCSC. How would you handle a Sparse SPSD matrix? Currently I just use check = false. Probably small shift should help but i…

---

## [Matrix equation solution via GenericLinearAlgebra with BigFloat not working](https://discourse.julialang.org/t/matrix-equation-solution-via-genericlinearalgebra-with-bigfloat-not-working/119662)

<div class="topic-metadata">

**Author:** [@thedeyan](https://discourse.julialang.org/u/thedeyan)\
**Replies:** 1\
**Last updated:** [September 21, 2024, 3:45am UTC](https://discourse.julialang.org/t/matrix-equation-solution-via-genericlinearalgebra-with-bigfloat-not-working/119662 "2024-09-21T03:45:03Z")

</div>

I am trying to solve a system of linear equations: A \* x = B where A and B are real symmetric positive definite matrices with type BigFloat. I am trying to do the following: using GenericLinearAlgebra using LinearSol…

---

## [History of \`isapprox\` in languages](https://discourse.julialang.org/t/history-of-isapprox-in-languages/119347)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 56\
**Last updated:** [September 19, 2024, 8:58pm UTC](https://discourse.julialang.org/t/history-of-isapprox-in-languages/119347 "2024-09-19T20:58:20Z")

</div>

Does anyone know why the de-facto standard definition of isapprox intentionally fails when one of the arguments is zero? isapprox(0.0, 0.0 + 1e-10) # false isapprox(1.0, 1.0 + 1e-10) # true It is clear from the formula…

---

## [Time differing coefficient ODE](https://discourse.julialang.org/t/time-differing-coefficient-ode/119432)

<div class="topic-metadata">

**Author:** [@gonzalo](https://discourse.julialang.org/u/gonzalo)\
**Replies:** 3\
**Last updated:** [September 19, 2024, 6:50am UTC](https://discourse.julialang.org/t/time-differing-coefficient-ode/119432 "2024-09-19T06:50:24Z")

</div>

Hi everyone, I am wanting to solve the differential equation dx/dt=-x+y; dy/dt=-t\*y+3x x(0)=0; y(0)=1; t(0)=0; note t is a time varying coefficient I tried the subsequent code but I didn’t think it calculate it cor…

---

## [Data Structures for Finite Volumes](https://discourse.julialang.org/t/data-structures-for-finite-volumes/119558)

<div class="topic-metadata">

**Author:** [@afleming](https://discourse.julialang.org/u/afleming)\
**Replies:** 3\
**Last updated:** [September 19, 2024, 6:09am UTC](https://discourse.julialang.org/t/data-structures-for-finite-volumes/119558 "2024-09-19T06:09:29Z")

</div>

I’m working on a (not very sophisticated) finite volume solver for my research, and I’ve run into a perplexing problem around storing the mesh in such a way that minimizes allocations. The basic idea is that every cell …

---

## [Changing the faceset where the force is acting to another location and change the Force vector Values](https://discourse.julialang.org/t/changing-the-faceset-where-the-force-is-acting-to-another-location-and-change-the-force-vector-values/119339)

<div class="topic-metadata">

**Author:** [@kings94](https://discourse.julialang.org/u/kings94)\
**Replies:** 2\
**Last updated:** [September 14, 2024, 1:34pm UTC](https://discourse.julialang.org/t/changing-the-faceset-where-the-force-is-acting-to-another-location-and-change-the-force-vector-values/119339 "2024-09-14T13:34:07Z")

</div>

So i am currently tring to run a simulation on a simple beam using the arc length method, where for a certain number of increments a certain load (in the negative x direction) is applied with specific boundary conditions…

---

## [Facing problems with Sundials.jl (ARKODE) with discrete callback](https://discourse.julialang.org/t/facing-problems-with-sundials-jl-arkode-with-discrete-callback/119278)

<div class="topic-metadata">

**Author:** [@humhongekamyaab](https://discourse.julialang.org/u/humhongekamyaab)\
**Replies:** 5\
**Last updated:** [September 14, 2024, 6:24am UTC](https://discourse.julialang.org/t/facing-problems-with-sundials-jl-arkode-with-discrete-callback/119278 "2024-09-14T06:24:39Z")

</div>

Hello everyone, I want to use CashKarp RK explicit algorithm (Numerical Recipe 2nd Edition RK) from Sundials.jl for my particular ODE system and need a discrete callback to do some manipulations after each time step. h…

---

## [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…

---

## [Compilers, purity, and variance computation](https://discourse.julialang.org/t/compilers-purity-and-variance-computation/119254)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 5\
**Last updated:** [September 10, 2024, 6:35pm UTC](https://discourse.julialang.org/t/compilers-purity-and-variance-computation/119254 "2024-09-10T18:35:13Z")

</div>

MOST likely you call sum, then std, i.e. separate loops and scan twice, BUT technically the functional approach doesn’t rule out optimal performance: scanning just once… In theory the compiler (of functional languages a…

---

## [Efficient Vector^T \* Jacobian matrix?](https://discourse.julialang.org/t/efficient-vector-t-jacobian-matrix/21329)

<div class="topic-metadata">

**Author:** [@Christian\_Dengler](https://discourse.julialang.org/u/Christian_Dengler)\
**Replies:** 7\
**Last updated:** [September 11, 2024, 5:41pm UTC](https://discourse.julialang.org/t/efficient-vector-t-jacobian-matrix/21329 "2024-09-11T17:41:37Z")

</div>

I’m trying to find a way to efficiently compute the product of a transposed vector with a Jacobian matrix. So given a vector function f and two large vectors v and x of same length, I want to compute v^T \* jacobian(f)(x)…

---

## [Checkpointing.jl does not work in the latest version of Enzyme.jl](https://discourse.julialang.org/t/checkpointing-jl-does-not-work-in-the-latest-version-of-enzyme-jl/118660)

<div class="topic-metadata">

**Author:** [@ToPo](https://discourse.julialang.org/u/ToPo)\
**Replies:** 2\
**Last updated:** [September 9, 2024, 6:59am UTC](https://discourse.julialang.org/t/checkpointing-jl-does-not-work-in-the-latest-version-of-enzyme-jl/118660 "2024-09-09T06:59:46Z")

</div>

Recently, I have been using the checkpointing method to reduce the memory required for automatic differentiation. Therefore, we use Enzyme.jl and Checkpointing.jl. However, when I use the latest version of Enzyme.jl, v…

---

## [Symbolic Integral Using SymbolicNumericIntegration Error Message Reported](https://discourse.julialang.org/t/symbolic-integral-using-symbolicnumericintegration-error-message-reported/118117)

<div class="topic-metadata">

**Author:** [@gonzalo](https://discourse.julialang.org/u/gonzalo)\
**Replies:** 4\
**Last updated:** [September 9, 2024, 12:08am UTC](https://discourse.julialang.org/t/symbolic-integral-using-symbolicnumericintegration-error-message-reported/118117 "2024-09-09T00:08:11Z")

</div>

I’m trying to do the subsequent symbolic integral following the tutorial of SymbolicNumericIntegration at https://docs.sciml.ai/SymbolicNumericIntegration/stable/ using Symbolics using SymbolicNumericIntegration @var…

---

## [Using flat() in LinearInterpolation](https://discourse.julialang.org/t/using-flat-in-linearinterpolation/58740)

<div class="topic-metadata">

**Author:** [@bojeryd91](https://discourse.julialang.org/u/bojeryd91)\
**Replies:** 3\
**Last updated:** [August 31, 2024, 1:50am UTC](https://discourse.julialang.org/t/using-flat-in-linearinterpolation/58740 "2024-08-31T01:50:36Z")

</div>

I want to create an interpolation object which uses the Flat() option when extrapolating, but I run into “Flat() not defined” when specifying it so. The Line() option works well. Eg., the following works interp1 = Line…

---

## [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…

---

## [Optimizing function to evaluate elementary symmetric polynomials](https://discourse.julialang.org/t/optimizing-function-to-evaluate-elementary-symmetric-polynomials/118321)

<div class="topic-metadata">

**Author:** [@Gattu\_Mytraya](https://discourse.julialang.org/u/Gattu_Mytraya)\
**Replies:** 2\
**Last updated:** [August 19, 2024, 9:40pm UTC](https://discourse.julialang.org/t/optimizing-function-to-evaluate-elementary-symmetric-polynomials/118321 "2024-08-19T21:40:50Z")

</div>

Hi, I am working on optimizing the following function: @inbounds function get\_symmetric\_polynomials!(dest::Matrix{Complex{MultiFloat{Float64, 2}}}, roots::Matrix{Complex{MultiFloat{Float64, 2}}}, b::Int64) if b ==…

---

## [Integration on an ordered domain](https://discourse.julialang.org/t/integration-on-an-ordered-domain/118180)

<div class="topic-metadata">

**Author:** [@IlliaFaraji](https://discourse.julialang.org/u/IlliaFaraji)\
**Replies:** 3\
**Last updated:** [August 14, 2024, 2:55pm UTC](https://discourse.julialang.org/t/integration-on-an-ordered-domain/118180 "2024-08-14T14:55:00Z")

</div>

I want to carry out an integral of this form \\int\_{0}^{\\infty} \\int\_{0}^{t\_{n}} \\ldots \\int\_{0}^{t\_2} \\ f(s\_1, \\ldots, s\_n)\\, \\mathrm{d}s\_1 \\ldots \\mathrm{d}s\_n , for n \\approx 10. The domain of integration here is S=…

---

## [Type problems in ForwardDiff with preallocations](https://discourse.julialang.org/t/type-problems-in-forwarddiff-with-preallocations/118131)

<div class="topic-metadata">

**Author:** [@Chandrasekhar](https://discourse.julialang.org/u/Chandrasekhar)\
**Replies:** 2\
**Last updated:** [August 13, 2024, 12:32pm UTC](https://discourse.julialang.org/t/type-problems-in-forwarddiff-with-preallocations/118131 "2024-08-13T12:32:46Z")

</div>

Hi everyone! I am solving a system of non-linear equations by using nlsolve. I want to use ForwardDiff to calculate the Jacobian inside nlsolve. The code which is running without any errors is the following: function g…

---

## [ODE-BVP's with Unknown Parameter](https://discourse.julialang.org/t/ode-bvps-with-unknown-parameter/28873)

<div class="topic-metadata">

**Author:** [@anodos](https://discourse.julialang.org/u/anodos)\
**Replies:** 9\
**Last updated:** [August 12, 2024, 9:50am UTC](https://discourse.julialang.org/t/ode-bvps-with-unknown-parameter/28873 "2024-08-12T09:50:59Z")

</div>

Matlab’s bvp4c allows the user to specify ODE-BVP problems which contain an unknown parameter, and then to specify the problem by providing an extra boundary condition. E.g. for a second order ODE, we might have an extra…

---

## [Replacing FFT from Numerical Recipes with FFTW](https://discourse.julialang.org/t/replacing-fft-from-numerical-recipes-with-fftw/55508)

<div class="topic-metadata">

**Author:** [@edwinb-ai](https://discourse.julialang.org/u/edwinb-ai)\
**Replies:** 8\
**Last updated:** [August 11, 2024, 12:03pm UTC](https://discourse.julialang.org/t/replacing-fft-from-numerical-recipes-with-fftw/55508 "2024-08-11T12:03:17Z")

</div>

Hello there. I’m tasked to port an old FORTRAN 77 legacy code to Julia. Unfortunately, I’m stuck with the computation of a Fast Fourier Transform (FFT). The original legacy code uses the sinft routine from the Numerica…

---

## [Solving Diophantine equations using Julia](https://discourse.julialang.org/t/solving-diophantine-equations-using-julia/41829)

<div class="topic-metadata">

**Author:** [@Angel\_Barria\_Comiche](https://discourse.julialang.org/u/Angel_Barria_Comiche)\
**Replies:** 3\
**Last updated:** [August 9, 2024, 5:12am UTC](https://discourse.julialang.org/t/solving-diophantine-equations-using-julia/41829 "2024-08-09T05:12:42Z")

</div>

Hi, I am new with Julia and I was wondering how can I solve a system of diophantine equations adding conditions to some of the variables. For example, I would like to find integers x, y, p, h, r, t that solve the equatio…

---

## [Variables are Missing from Variable map in PDE](https://discourse.julialang.org/t/variables-are-missing-from-variable-map-in-pde/117707)

<div class="topic-metadata">

**Author:** [@ppinney](https://discourse.julialang.org/u/ppinney)\
**Replies:** 4\
**Last updated:** [August 5, 2024, 1:13pm UTC](https://discourse.julialang.org/t/variables-are-missing-from-variable-map-in-pde/117707 "2024-08-05T13:13:07Z")

</div>

Hello, I am trying to solve a set of coupled PDEs using MethodOfLines.jl, but I am new to both PDE solving and Julia in general. The code is based on one of the MethodOfLines.jl tutorials: using MethodOfLines, Modeling…

---

## [ApproxFun Tutorials Discretization Error](https://discourse.julialang.org/t/approxfun-tutorials-discretization-error/117612)

<div class="topic-metadata">

**Author:** [@Domenico\_Lahaye](https://discourse.julialang.org/u/Domenico_Lahaye)\
**Replies:** 4\
**Last updated:** [July 30, 2024, 9:44pm UTC](https://discourse.julialang.org/t/approxfun-tutorials-discretization-error/117612 "2024-07-30T21:44:09Z")

</div>

How can the accuracy in the computed solution in the ApproxFun Tutorials be adapted/changed? Is there a way top set the number of basis functions being used for e.g. a coarse, intermediate and fine scale approximation? H…

---

## [Obtaining a projection onto the range of a matrix through its QR decomposition](https://discourse.julialang.org/t/obtaining-a-projection-onto-the-range-of-a-matrix-through-its-qr-decomposition/117334)

<div class="topic-metadata">

**Author:** [@cgois](https://discourse.julialang.org/u/cgois)\
**Replies:** 4\
**Last updated:** [July 29, 2024, 8:26am UTC](https://discourse.julialang.org/t/obtaining-a-projection-onto-the-range-of-a-matrix-through-its-qr-decomposition/117334 "2024-07-29T08:26:42Z")

</div>

Given a matrix A, I want to compute a matrix with rank(A) column vectors that span the range of A. With an SVD, this can be done with: import LinearAlgebra as LA function ortr\_svd(A::AbstractMatrix{T}) where {T\<:Number}…

---

## [ForwardDiff tagcount with custom diff rules](https://discourse.julialang.org/t/forwarddiff-tagcount-with-custom-diff-rules/117534)

<div class="topic-metadata">

**Author:** [@dchang10](https://discourse.julialang.org/u/dchang10)\
**Replies:** 4\
**Last updated:** [July 27, 2024, 4:00pm UTC](https://discourse.julialang.org/t/forwarddiff-tagcount-with-custom-diff-rules/117534 "2024-07-27T16:00:26Z")

</div>

I’m writing a custom gradient for a function that takes two derivatives using ForwardDiff. I receive an error unless I specify the tag for the returned Dual. I figured that the tag I should return depends on the tag coun…

---

## [Eigenvectors differ between julia and Wolfram/Delphi](https://discourse.julialang.org/t/eigenvectors-differ-between-julia-and-wolfram-delphi/117532)

<div class="topic-metadata">

**Author:** [@jacques1](https://discourse.julialang.org/u/jacques1)\
**Replies:** 2\
**Last updated:** [July 26, 2024, 11:58pm UTC](https://discourse.julialang.org/t/eigenvectors-differ-between-julia-and-wolfram-delphi/117532 "2024-07-26T23:58:31Z")

</div>

I am trying to find the eigenvectors of a matrix: t = \[124.70244538509718 -120.72494594206698; -120.72494594206698 122.53090477427045\] Using eigvecs from linear algebra, I get eigvecs(t) 2×2 Matrix{Float64}: -0.7039…

---

## [Generating finite-difference stencils](https://discourse.julialang.org/t/generating-finite-difference-stencils/85876)

<div class="topic-metadata">

**Author:** [@dorn-gerhard](https://discourse.julialang.org/u/dorn-gerhard)\
**Replies:** 19\
**Last updated:** [July 23, 2024, 10:39pm UTC](https://discourse.julialang.org/t/generating-finite-difference-stencils/85876 "2024-07-23T22:39:44Z")

</div>

Regarding the second suggested approach in the topic title: discrete derivatives (without interpolating data) Is there a Julia package that performs discrete derivatives (e.g. using some higher order stencils) also for …

---

## [Exponential of simple block triangular matrix](https://discourse.julialang.org/t/exponential-of-simple-block-triangular-matrix/117365)

<div class="topic-metadata">

**Author:** [@goerz](https://discourse.julialang.org/u/goerz)\
**Replies:** 1\
**Last updated:** [July 23, 2024, 12:33am UTC](https://discourse.julialang.org/t/exponential-of-simple-block-triangular-matrix/117365 "2024-07-23T00:33:07Z")

</div>

I have a custom struct that represents a block-matrix of the form X = \[ A B 0 A \] Where A and B are arbitrary (probably non-pathological) square matrices. A and B are small in the context I’m currently looking…

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

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