# Numerics

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

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

**Page:** 6

---

## [Truncated power series in ApproxFun.jl](https://discourse.julialang.org/t/truncated-power-series-in-approxfun-jl/124593)

<div class="topic-metadata">

**Author:** [@Domenico\_Lahaye](https://discourse.julialang.org/u/Domenico_Lahaye)\
**Replies:** 10\
**Last updated:** [January 11, 2025, 1:09pm UTC](https://discourse.julialang.org/t/truncated-power-series-in-approxfun-jl/124593 "2025-01-11T13:09:04Z")

</div>

I gave ApproxFun.jl another look. As far as I can see, polynomials of truncated power series in ApproxFun.jl (requires for e.g. the Duffing equation) are poorly documented. Do I overlook something?

---

## [Specify analytic exponential and pseudoinverse of linear part of a SplitODEProblem](https://discourse.julialang.org/t/specify-analytic-exponential-and-pseudoinverse-of-linear-part-of-a-splitodeproblem/124596)

<div class="topic-metadata">

**Author:** [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Replies:** 1\
**Last updated:** [January 10, 2025, 3:14pm UTC](https://discourse.julialang.org/t/specify-analytic-exponential-and-pseudoinverse-of-linear-part-of-a-splitodeproblem/124596 "2025-01-10T15:14:54Z")

</div>

I have a system of ODE of the form du/dt = A(t)\*u + f(u) The linear part corresponds to fast dynamics, in comparison to the slow dynamics of the non-linear part. A(t) is actually so simple, that I can provide an analy…

---

## [ApproxFun: Derivative: Set vs. Unset space](https://discourse.julialang.org/t/approxfun-derivative-set-vs-unset-space/124601)

<div class="topic-metadata">

**Author:** [@Domenico\_Lahaye](https://discourse.julialang.org/u/Domenico_Lahaye)\
**Replies:** 3\
**Last updated:** [January 10, 2025, 7:30am UTC](https://discourse.julialang.org/t/approxfun-derivative-set-vs-unset-space/124601 "2025-01-10T07:30:45Z")

</div>

Regarding ApproxFun.jl (likely more general): what is the rationale (guideline or rule of thumb) for setting or unsetting the space for the Derivative function?

---

## [Unit tangent vector in Gridap.jl](https://discourse.julialang.org/t/unit-tangent-vector-in-gridap-jl/108181)

<div class="topic-metadata">

**Author:** [@andy45](https://discourse.julialang.org/u/andy45)\
**Replies:** 4\
**Last updated:** [January 7, 2025, 8:38am UTC](https://discourse.julialang.org/t/unit-tangent-vector-in-gridap-jl/108181 "2025-01-07T08:38:16Z")

</div>

Hi. I am trying to solve two-dimensional Stokes-Darcy equations using Gridap.jl. One of the terms in a weak formulation has the form {\\int\_{I}\\lambda\\left(u\\cdot\\tau\\right)\\left(v\\cdot\\tau\\right)ds} where \\tau is a unit …

---

## [ODE solving is fast on DifferentialEquation@7.9.0 but significantly slower on later versions](https://discourse.julialang.org/t/ode-solving-is-fast-on-differentialequation-7-9-0-but-significantly-slower-on-later-versions/124377)

<div class="topic-metadata">

**Author:** [@equi](https://discourse.julialang.org/u/equi)\
**Replies:** 10\
**Last updated:** [January 6, 2025, 10:12am UTC](https://discourse.julialang.org/t/ode-solving-is-fast-on-differentialequation-7-9-0-but-significantly-slower-on-later-versions/124377 "2025-01-06T10:12:14Z")

</div>

When solving the same ODE (a 100-dimensional strongly slow-fast system, where the non-smooth component is approximated using hyperbolic tangent function ) problem using DifferentialEquations.jl , I noticed that ODE solvi…

---

## [How to exactly solve large overdetermined systems of linear equations](https://discourse.julialang.org/t/how-to-exactly-solve-large-overdetermined-systems-of-linear-equations/86710)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 16\
**Last updated:** [January 4, 2025, 5:48pm UTC](https://discourse.julialang.org/t/how-to-exactly-solve-large-overdetermined-systems-of-linear-equations/86710 "2025-01-04T17:48:02Z")

</div>

Suppose I have, e.g., 250 linear equations with Rational{BigInt} coefficients, with 150 variables. If the system is inconsistent I want to know about it, otherwise I want the exact solution. Is there an easier way than …

---

## [Compute integral for DelaunayTriangulation.jl to be able to solve PDE with FiniteVolumeMethod.jl](https://discourse.julialang.org/t/compute-integral-for-delaunaytriangulation-jl-to-be-able-to-solve-pde-with-finitevolumemethod-jl/124310)

<div class="topic-metadata">

**Author:** [@B4rtel](https://discourse.julialang.org/u/B4rtel)\
**Replies:** 4\
**Last updated:** [January 2, 2025, 3:20pm UTC](https://discourse.julialang.org/t/compute-integral-for-delaunaytriangulation-jl-to-be-able-to-solve-pde-with-finitevolumemethod-jl/124310 "2025-01-02T15:20:13Z")

</div>

Hi :), I would like to solve a advection PDE of the form \\frac{\\partial}{\\partial t} f(x,t) = - \\nabla\_x \\cdot \\left(\\left(\\int \[\\phi(p\_1(x,y),\\phi(p\_2(x,y)\]\\odot (y-x) f(y,t) \\text{d} y\\right) f(x,t)\\right) for p\_a(x\_i…

---

## [No method matching Float64(::ForwardDiff.Dual{Nothing, Float64, 1})](https://discourse.julialang.org/t/no-method-matching-float64-forwarddiff-dual-nothing-float64-1/124228)

<div class="topic-metadata">

**Author:** [@CatY](https://discourse.julialang.org/u/CatY)\
**Replies:** 9\
**Last updated:** [December 29, 2024, 1:42am UTC](https://discourse.julialang.org/t/no-method-matching-float64-forwarddiff-dual-nothing-float64-1/124228 "2024-12-29T01:42:04Z")

</div>

Hi, I’m a new user for Julia, and I’m trying to use neural networks to simulate test data with differential equations, while I’m getting an error that no method matching Float64. I checked the DifferentialEquations.jl do…

---

## [GSL for Differential Equations](https://discourse.julialang.org/t/gsl-for-differential-equations/123920)

<div class="topic-metadata">

**Author:** [@Cardoso\_Ribeiro](https://discourse.julialang.org/u/Cardoso_Ribeiro)\
**Replies:** 2\
**Last updated:** [December 17, 2024, 12:48pm UTC](https://discourse.julialang.org/t/gsl-for-differential-equations/123920 "2024-12-17T12:48:16Z")

</div>

Can anyone to use the GNU Scientific Library (GSL.jl) for solving differential equations in Julia? Can you give an example? I know C language.

---

## [Is there a rank revealing qr decomposition?](https://discourse.julialang.org/t/is-there-a-rank-revealing-qr-decomposition/123358)

<div class="topic-metadata">

**Author:** [@jonas-pueschel](https://discourse.julialang.org/u/jonas-pueschel)\
**Replies:** 5\
**Last updated:** [December 5, 2024, 9:41am UTC](https://discourse.julialang.org/t/is-there-a-rank-revealing-qr-decomposition/123358 "2024-12-05T09:41:58Z")

</div>

I am currently looking for a qr decomposition of a matrix A ≈ QR with A being n×m, Q being n×r and A being r×m where r is the rank of A (with respect to some cut-off threshold). I’ve played around a bit with qr from the…

---

## [Complex SDEs + Sparse operations + real Wiener noise](https://discourse.julialang.org/t/complex-sdes-sparse-operations-real-wiener-noise/123396)

<div class="topic-metadata">

**Author:** [@Aaron\_Villanueva](https://discourse.julialang.org/u/Aaron_Villanueva)\
**Replies:** 2\
**Last updated:** [December 3, 2024, 6:30pm UTC](https://discourse.julialang.org/t/complex-sdes-sparse-operations-real-wiener-noise/123396 "2024-12-03T18:30:54Z")

</div>

I am trying to solve ComplexF64 Stochastic Differential Equations with m-dim real Wiener noise. The drift and diffusion functions must handle sparse operations to support large systems. I run into some troubles in maki…

---

## [Tolerance for numerical-rank computation](https://discourse.julialang.org/t/tolerance-for-numerical-rank-computation/123372)

<div class="topic-metadata">

**Author:** [@ajinkya-k](https://discourse.julialang.org/u/ajinkya-k)\
**Replies:** 9\
**Last updated:** [December 3, 2024, 4:21pm UTC](https://discourse.julialang.org/t/tolerance-for-numerical-rank-computation/123372 "2024-12-03T16:21:46Z")

</div>

Hi all! Sorry to revive this but what is the right tolerance to use when using pivoted cholesky to compute rank? I find that using sqrt(eps(Float64)) usually gives me the same rank as the default rank method for Matrices…

---

## [Tolerance specification for pivoted Cholesky](https://discourse.julialang.org/t/tolerance-specification-for-pivoted-cholesky/6863)

<div class="topic-metadata">

**Author:** [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Replies:** 7\
**Last updated:** [November 6, 2017, 7:30pm UTC](https://discourse.julialang.org/t/tolerance-specification-for-pivoted-cholesky/6863 "2017-11-06T19:30:22Z")

</div>

In this notebook I describe evaluating the rank of a model matrix X by forming a pivoted Cholesky factorization of X'X. I use this form because the X'X matrix will be evaluated whether or not the rank is needed. I woul…

---

## [Pivoted Cholesky: Why is rank a private field/property?](https://discourse.julialang.org/t/pivoted-cholesky-why-is-rank-a-private-field-property/122971)

<div class="topic-metadata">

**Author:** [@ajinkya-k](https://discourse.julialang.org/u/ajinkya-k)\
**Replies:** 6\
**Last updated:** [November 23, 2024, 7:06am UTC](https://discourse.julialang.org/t/pivoted-cholesky-why-is-rank-a-private-field-property/122971 "2024-11-23T07:06:35Z")

</div>

Hello! I am posting for the first time so please forgive me if this is naive. I am using the cholesky function with pivoting to (1) factorize a positive semidefinite matrix, (2) get its rank, and (3) do some follow-up c…

---

## [Representing a symmetric matrix factorization](https://discourse.julialang.org/t/representing-a-symmetric-matrix-factorization/122881)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 3\
**Last updated:** [November 21, 2024, 9:56am UTC](https://discourse.julialang.org/t/representing-a-symmetric-matrix-factorization/122881 "2024-11-21T09:56:35Z")

</div>

This question is about implementing a matrix factorization with some operations in Julia, ideally relying on existing optimized implementations, in a generic way do that I don’t have to commit to a particular implementat…

---

## [MATLAB is faster for my large system of ODEs?](https://discourse.julialang.org/t/matlab-is-faster-for-my-large-system-of-odes/122610)

<div class="topic-metadata">

**Author:** [@martru](https://discourse.julialang.org/u/martru)\
**Replies:** 21\
**Last updated:** [November 15, 2024, 6:12pm UTC](https://discourse.julialang.org/t/matlab-is-faster-for-my-large-system-of-odes/122610 "2024-11-15T18:12:50Z")

</div>

Excuse the deliberately provocative title :slight\_smile: I have a very large system of ODEs of the form: dot{x} = Ax + Bu A is a sparse matrix 5505x5505. B\*u is a 5505 element vector. Using ode45 in matlab, it solves …

---

## [NonlinearSolve uses AD Jacobian even when I specify it analytically](https://discourse.julialang.org/t/nonlinearsolve-uses-ad-jacobian-even-when-i-specify-it-analytically/122608)

<div class="topic-metadata">

**Author:** [@DanDoe](https://discourse.julialang.org/u/DanDoe)\
**Replies:** 3\
**Last updated:** [November 14, 2024, 3:32pm UTC](https://discourse.julialang.org/t/nonlinearsolve-uses-ad-jacobian-even-when-i-specify-it-analytically/122608 "2024-11-14T15:32:20Z")

</div>

Hm, I recently tried specification of the Jacobian in this way - however, NonlinearSolve still tries to attempt to construct the Jacobian using AD. Has anything changed here?

---

## [Newton + LineSearch in Hot Loop: Reduce allocations](https://discourse.julialang.org/t/newton-linesearch-in-hot-loop-reduce-allocations/122585)

<div class="topic-metadata">

**Author:** [@DanDoe](https://discourse.julialang.org/u/DanDoe)\
**Replies:** 6\
**Last updated:** [November 14, 2024, 8:08am UTC](https://discourse.julialang.org/t/newton-linesearch-in-hot-loop-reduce-allocations/122585 "2024-11-14T08:08:18Z")

</div>

I really like the NLsolve.jl package in conjunction with LineSearches.jl - great stuff! I have a scalar, relatively simple nonlinear equation that I can solve using res = nlsolve(gamma -\> f(gamma\[1\], bla, bla, bla), …

---

## [Unstable quadratic spline from DataInterpolations.jl](https://discourse.julialang.org/t/unstable-quadratic-spline-from-datainterpolations-jl/122435)

<div class="topic-metadata">

**Author:** [@marcobonici](https://discourse.julialang.org/u/marcobonici)\
**Replies:** 5\
**Last updated:** [November 9, 2024, 4:43pm UTC](https://discourse.julialang.org/t/unstable-quadratic-spline-from-datainterpolations-jl/122435 "2024-11-09T16:43:45Z")

</div>

I have a problem when using the quadratic spline from DataInterpolations.jl. I have some data (blue curve) I want to interpolate on a finer grid. I tried to use a quadratic (orange) and a cubic (green) spline. DataInte…

---

## [Fast division by 2](https://discourse.julialang.org/t/fast-division-by-2/122144)

<div class="topic-metadata">

**Author:** [@marco\_menarini](https://discourse.julialang.org/u/marco_menarini)\
**Replies:** 13\
**Last updated:** [November 3, 2024, 7:27pm UTC](https://discourse.julialang.org/t/fast-division-by-2/122144 "2024-11-03T19:27:13Z")

</div>

I noticed that Julia seems not to optimize the division of floating points and integer by two. I know that in C++ there are a couple of fast function that are used in these specific cases const SHIFT16=UInt16(1)\<\<EXP16 …

---

## [Storing the LU decomposition of a matrix](https://discourse.julialang.org/t/storing-the-lu-decomposition-of-a-matrix/122138)

<div class="topic-metadata">

**Author:** [@Gattu\_Mytraya](https://discourse.julialang.org/u/Gattu_Mytraya)\
**Replies:** 5\
**Last updated:** [November 1, 2024, 7:57pm UTC](https://discourse.julialang.org/t/storing-the-lu-decomposition-of-a-matrix/122138 "2024-11-01T19:57:46Z")

</div>

Hi! I have a calculation in which I need the determinant and possibly the inverse of a matrix (let’s call it X). I am, therefore, trying to store the LU decomposition of X and then use it later. To this end, I have the …

---

## [Correct way of computing adjoints/gradients with dense solution of ODE](https://discourse.julialang.org/t/correct-way-of-computing-adjoints-gradients-with-dense-solution-of-ode/121964)

<div class="topic-metadata">

**Author:** [@facusapienza](https://discourse.julialang.org/u/facusapienza)\
**Replies:** 5\
**Last updated:** [October 31, 2024, 6:17pm UTC](https://discourse.julialang.org/t/correct-way-of-computing-adjoints-gradients-with-dense-solution-of-ode/121964 "2024-10-31T18:17:18Z")

</div>

Hi all, I am trying to use the interpolated solution of my ODE for adjoint sensitivity analysis. Since I have a very small system of ODEs (n=3), I am interested in evaluating the performance of continuous adjoint method…

---

## [Eigvals of symmetric matrix](https://discourse.julialang.org/t/eigvals-of-symmetric-matrix/121672)

<div class="topic-metadata">

**Author:** [@Daniel\_Scheinerman](https://discourse.julialang.org/u/Daniel_Scheinerman)\
**Replies:** 3\
**Last updated:** [October 24, 2024, 1:17pm UTC](https://discourse.julialang.org/t/eigvals-of-symmetric-matrix/121672 "2024-10-24T13:17:21Z")

</div>

Within numpy in python there is the function np.linalg.eigvalsh which computes the eigenvalues of a hermetian matrix. It speeds up the computation of the eigenvalues when the matrix is symmetric. I just did a quick test …

---

## [Did i coded my pde correctly?](https://discourse.julialang.org/t/did-i-coded-my-pde-correctly/121661)

<div class="topic-metadata">

**Author:** [@Shashi2\_Kumar](https://discourse.julialang.org/u/Shashi2_Kumar)\
**Replies:** 0\
**Last updated:** [October 23, 2024, 5:08pm UTC](https://discourse.julialang.org/t/did-i-coded-my-pde-correctly/121661 "2024-10-23T17:08:55Z")

</div>

After many weeks of search for a pde solver for my elliptic pde i came across Julia. Found that it has a FNC package (FundamentalsNumericalComputation) that solves pde. I tried to encode my pde with boundary conditions a…

---

## [Odd behaviour regarding Adjoint Sensitivity Analysis](https://discourse.julialang.org/t/odd-behaviour-regarding-adjoint-sensitivity-analysis/121141)

<div class="topic-metadata">

**Author:** [@nil](https://discourse.julialang.org/u/nil)\
**Replies:** 8\
**Last updated:** [October 11, 2024, 9:49pm UTC](https://discourse.julialang.org/t/odd-behaviour-regarding-adjoint-sensitivity-analysis/121141 "2024-10-11T21:49:13Z")

</div>

Hello dear community, I have a question regarding the following code I have written. I am trying to calculate the adjoint of the simple (linear) systems forward simulation with respect to the input u. using LinearAlgeb…

---

## [Magnus solver slow compared with Tsitouras for linear state independent ODE](https://discourse.julialang.org/t/magnus-solver-slow-compared-with-tsitouras-for-linear-state-independent-ode/121118)

<div class="topic-metadata">

**Author:** [@facusapienza](https://discourse.julialang.org/u/facusapienza)\
**Replies:** 5\
**Last updated:** [October 10, 2024, 10:49pm UTC](https://discourse.julialang.org/t/magnus-solver-slow-compared-with-tsitouras-for-linear-state-independent-ode/121118 "2024-10-10T22:49:44Z")

</div>

Hi! I was playing a bit with the Magnus solvers included in the examples for linear ODEs in the docs: Non-autonomous Linear ODE / Lie Group ODE Solvers. I was particularly interesting in benchmarking the solver I am cur…

---

## [Does Julia recognize block, banded, and block-banded matrices?](https://discourse.julialang.org/t/does-julia-recognize-block-banded-and-block-banded-matrices/120821)

<div class="topic-metadata">

**Author:** [@rsenne](https://discourse.julialang.org/u/rsenne)\
**Replies:** 6\
**Last updated:** [October 2, 2024, 6:49pm UTC](https://discourse.julialang.org/t/does-julia-recognize-block-banded-and-block-banded-matrices/120821 "2024-10-02T18:49:24Z")

</div>

For a simple example of why I need this, let’s say I want to compute the entropy of a multivariate Gaussian. One can do this as follows: \\text{Entropy} \\propto -\\frac{1}{2}\*\\log|-H| where -H is the negative Hessian at …

---

## [(Dis)Advantages of quintic (fifth order) vs. cubic (third order) Hermite interpolation?](https://discourse.julialang.org/t/dis-advantages-of-quintic-fifth-order-vs-cubic-third-order-hermite-interpolation/120383)

<div class="topic-metadata">

**Author:** [@Marco\_Masi](https://discourse.julialang.org/u/Marco_Masi)\
**Replies:** 18\
**Last updated:** [September 30, 2024, 5:23pm UTC](https://discourse.julialang.org/t/dis-advantages-of-quintic-fifth-order-vs-cubic-third-order-hermite-interpolation/120383 "2024-09-30T17:23:51Z")

</div>

After solving an ordinary differential equation (ODE) of a dynamical system and obtaining the solution in time with its first and second derivatives, I fit the data points with a QuinticHermiteSpline(ddu, du, u, t). It a…

---

## [Why re-use factorization(A) rather than inv(A)](https://discourse.julialang.org/t/why-re-use-factorization-a-rather-than-inv-a/113234)

<div class="topic-metadata">

**Author:** [@photor](https://discourse.julialang.org/u/photor)\
**Replies:** 7\
**Last updated:** [September 30, 2024, 5:45am UTC](https://discourse.julialang.org/t/why-re-use-factorization-a-rather-than-inv-a/113234 "2024-09-30T05:45:00Z")

</div>

What is the advantage of first decomposing and then left dividing every time over inverting once and multiplying the inverse every time?

---

## [Discrete Fourier Transform (DFT) matrix and inverse](https://discourse.julialang.org/t/discrete-fourier-transform-dft-matrix-and-inverse/119952)

<div class="topic-metadata">

**Author:** [@Nikos\_Gianniotis](https://discourse.julialang.org/u/Nikos_Gianniotis)\
**Replies:** 18\
**Last updated:** [September 28, 2024, 7:02am UTC](https://discourse.julialang.org/t/discrete-fourier-transform-dft-matrix-and-inverse/119952 "2024-09-28T07:02:40Z")

</div>

Hello everyone, I want to calculate the explicit DFT matrix (and its inverse). I have been looking at related Julia packages to see if this functionality is somewhere available. While I could calculate it myself, I am a…

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

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