# Numerics

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

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

**Page:** 21

---

## [To provide Jacobian in non-linear solver, time-stepping or Jacobian](https://discourse.julialang.org/t/to-provide-jacobian-in-non-linear-solver-time-stepping-or-jacobian/81632)

<div class="topic-metadata">

**Author:** [@ziolai](https://discourse.julialang.org/u/ziolai)\
**Replies:** 2\
**Last updated:** [May 26, 2022, 12:52pm UTC](https://discourse.julialang.org/t/to-provide-jacobian-in-non-linear-solver-time-stepping-or-jacobian/81632 "2022-05-26T12:52:20Z")

</div>

Is there a good example showing that the effort of providing the Jacobian to either a non-linear solver, a time-stepping solver or an optimization solver does pay off in reducing the number of (non-linear, right-hand sid…

---

## [Parallel sparse solve and inverse](https://discourse.julialang.org/t/parallel-sparse-solve-and-inverse/81538)

<div class="topic-metadata">

**Author:** [@sobhan](https://discourse.julialang.org/u/sobhan)\
**Replies:** 0\
**Last updated:** [May 23, 2022, 8:32pm UTC](https://discourse.julialang.org/t/parallel-sparse-solve-and-inverse/81538 "2022-05-23T20:32:42Z")

</div>

So i need to solve a really big (and sparse) system of equation and to my knowledge there are no parallel sparse solvers for julia. I tried the pardiso for MKL but that wasn’t parallel and had performance similar to the …

---

## [Missing sparse methods](https://discourse.julialang.org/t/missing-sparse-methods/17596)

<div class="topic-metadata">

**Author:** [@Paul\_Hines](https://discourse.julialang.org/u/Paul_Hines)\
**Replies:** 3\
**Last updated:** [November 16, 2018, 6:24pm UTC](https://discourse.julialang.org/t/missing-sparse-methods/17596 "2018-11-16T18:24:10Z")

</div>

It seems like there are missing sparse matrix methods. In both 1.0.2 and 0.7 this code: using SparseArrays using LinearAlgebra A = sprand(10,10,.9) b\_dense = Array(sprand(10,1,.8)) # works b\_sparse = sprand(10,1,.8) # …

---

## [Issue with Local Sensitivites and dt \<= dtmin](https://discourse.julialang.org/t/issue-with-local-sensitivites-and-dt-dtmin/81426)

<div class="topic-metadata">

**Author:** [@xztt](https://discourse.julialang.org/u/xztt)\
**Replies:** 4\
**Last updated:** [May 22, 2022, 12:14pm UTC](https://discourse.julialang.org/t/issue-with-local-sensitivites-and-dt-dtmin/81426 "2022-05-22T12:14:33Z")

</div>

Hi, I am trying to calculate the local sensitivities for a large circulation model (Shi 2006) I am Importing the model using CellML.jl when I define an ODEproblem and simulate the solution appears fine and also when pe…

---

## [Implementation of householder/reflection matrices with efficient multiplication?](https://discourse.julialang.org/t/implementation-of-householder-reflection-matrices-with-efficient-multiplication/81257)

<div class="topic-metadata">

**Author:** [@ptonner](https://discourse.julialang.org/u/ptonner)\
**Replies:** 5\
**Last updated:** [May 18, 2022, 3:09pm UTC](https://discourse.julialang.org/t/implementation-of-householder-reflection-matrices-with-efficient-multiplication/81257 "2022-05-18T15:09:02Z")

</div>

Is there a standard implementation of reflector/householder matrices and their efficient multiplication with vectors (e.g. O(n) cost)? I don’t think this would be hard to implement for my specific purposes, but for that…

---

## [How to know the long time behaviour of system of differential equations?](https://discourse.julialang.org/t/how-to-know-the-long-time-behaviour-of-system-of-differential-equations/81148)

<div class="topic-metadata">

**Author:** [@Gerardo\_Suarez](https://discourse.julialang.org/u/Gerardo_Suarez)\
**Replies:** 4\
**Last updated:** [May 17, 2022, 4:24pm UTC](https://discourse.julialang.org/t/how-to-know-the-long-time-behaviour-of-system-of-differential-equations/81148 "2022-05-17T16:24:21Z")

</div>

Hi, I’ve been working with this system of differential equations function JJ!(du,u,p,t) I,g=p du\[1\] = - gu\[1\] - 2u\[3\] + I du\[2\] = -g\*u\[2\] + u\[1\]u\[3\] du\[3\] = -gu\[3\] +(1 -u\[2\])\*u\[1\] end I solve it using the Differen…

---

## [Help understanding solves with sparse cholesky factors](https://discourse.julialang.org/t/help-understanding-solves-with-sparse-cholesky-factors/81165)

<div class="topic-metadata">

**Author:** [@cgeoga](https://discourse.julialang.org/u/cgeoga)\
**Replies:** 2\
**Last updated:** [May 16, 2022, 7:28pm UTC](https://discourse.julialang.org/t/help-understanding-solves-with-sparse-cholesky-factors/81165 "2022-05-16T19:28:55Z")

</div>

I recognize there are a few threads about this or something similar already, but I would really appreciate some clarification on something. I am aware that cholesky for sparse matrices permutes, and that you can ostensib…

---

## [FFT with variable sampling frequency](https://discourse.julialang.org/t/fft-with-variable-sampling-frequency/46288)

<div class="topic-metadata">

**Author:** [@EmadMasroor](https://discourse.julialang.org/u/EmadMasroor)\
**Replies:** 11\
**Last updated:** [May 15, 2022, 9:51pm UTC](https://discourse.julialang.org/t/fft-with-variable-sampling-frequency/46288 "2022-05-15T21:51:56Z")

</div>

Hello members of the Julia community, Is it possible to use the FFTW package (or any other Julia package) to perform an FFT on non-uniformly-sampled data? It seems that the functions provided in this package all assume …

---

## [Factorial function of a real number of complex number](https://discourse.julialang.org/t/factorial-function-of-a-real-number-of-complex-number/80911)

<div class="topic-metadata">

**Author:** [@marouane1994](https://discourse.julialang.org/u/marouane1994)\
**Replies:** 2\
**Last updated:** [May 11, 2022, 9:53pm UTC](https://discourse.julialang.org/t/factorial-function-of-a-real-number-of-complex-number/80911 "2022-05-11T21:53:25Z")

</div>

I’m on Julia@1.7.2 and i put x=0.0 + 0.12008239133631671im factorial(x) i get an error , MethodError: no method matching factorial(::ComplexF64) the same thing if x is Float64 i get MethodError: no method matching fac…

---

## [DiffEq.jl What solver was used](https://discourse.julialang.org/t/diffeq-jl-what-solver-was-used/80706)

<div class="topic-metadata">

**Author:** [@Siempie](https://discourse.julialang.org/u/Siempie)\
**Replies:** 2\
**Last updated:** [May 8, 2022, 12:46pm UTC](https://discourse.julialang.org/t/diffeq-jl-what-solver-was-used/80706 "2022-05-08T12:46:33Z")

</div>

When you do not specify which solver should be used DiffEq.jl has a method for choosing which solver to use. I want to know which solver was used after solving. How can i found out what solver was chosen?

---

## [Eigenvalue sensitivites using autodiff](https://discourse.julialang.org/t/eigenvalue-sensitivites-using-autodiff/80059)

<div class="topic-metadata">

**Author:** [@Hofsmo](https://discourse.julialang.org/u/Hofsmo)\
**Replies:** 5\
**Last updated:** [May 2, 2022, 6:30am UTC](https://discourse.julialang.org/t/eigenvalue-sensitivites-using-autodiff/80059 "2022-05-02T06:30:40Z")

</div>

Hi, I am quite new to both julia and autodiff and was wondering if someone can point me in the right direction. I have a dynamic system described using state space representation. I want to calculate the derivative of t…

---

## [Two questions related to using operators in ApproxFun.jl](https://discourse.julialang.org/t/two-questions-related-to-using-operators-in-approxfun-jl/79831)

<div class="topic-metadata">

**Author:** [@andreasvarga](https://discourse.julialang.org/u/andreasvarga)\
**Replies:** 10\
**Last updated:** [April 30, 2022, 12:32pm UTC](https://discourse.julialang.org/t/two-questions-related-to-using-operators-in-approxfun-jl/79831 "2022-04-30T12:32:01Z")

</div>

I am about to register PeriodicSystems.jl, a new package dedicated to handle linear control systems with periodic time-varying coefficient matrices. For stability analysis, the computation of characteristic exponents of …

---

## [Truncated SVD of extended precision matrix](https://discourse.julialang.org/t/truncated-svd-of-extended-precision-matrix/78989)

<div class="topic-metadata">

**Author:** [@Samuel3008](https://discourse.julialang.org/u/Samuel3008)\
**Replies:** 6\
**Last updated:** [April 30, 2022, 10:03am UTC](https://discourse.julialang.org/t/truncated-svd-of-extended-precision-matrix/78989 "2022-04-30T10:03:21Z")

</div>

Hi, is anybody aware of a way to compute the truncated SVD of an extended precision (128 bit floats in my case) matrix? For the floats, I’d like to use either MultiFloats.jl (seems faster in my testing, so this would be…

---

## [Inconsistent build\_function behavior in Symbolics](https://discourse.julialang.org/t/inconsistent-build-function-behavior-in-symbolics/80230)

<div class="topic-metadata">

**Author:** [@Elmo](https://discourse.julialang.org/u/Elmo)\
**Replies:** 2\
**Last updated:** [April 28, 2022, 10:08pm UTC](https://discourse.julialang.org/t/inconsistent-build-function-behavior-in-symbolics/80230 "2022-04-28T22:08:04Z")

</div>

Hi, is there a good way to make sure that the output function from build\_function in Symbolics returns output in the same dimensions as the symbolic function used to generate it? In the simple example below, if N = 5, …

---

## [@register multidimensional interpolation in ModelingToolkit](https://discourse.julialang.org/t/register-multidimensional-interpolation-in-modelingtoolkit/80136)

<div class="topic-metadata">

**Author:** [@KyemyungPark](https://discourse.julialang.org/u/KyemyungPark)\
**Replies:** 2\
**Last updated:** [April 28, 2022, 12:08am UTC](https://discourse.julialang.org/t/register-multidimensional-interpolation-in-modelingtoolkit/80136 "2022-04-28T00:08:55Z")

</div>

Hello, I am trying to feed multidimensional interpolating functions into initial conditions to solve a system of multidimensional PDEs using NeuralPDE.jl. However, registering those functions as symbolic functions with @…

---

## [How to debug failing DifferentialEquations.solve when called with Dual numbers](https://discourse.julialang.org/t/how-to-debug-failing-differentialequations-solve-when-called-with-dual-numbers/79895)

<div class="topic-metadata">

**Author:** [@bgctw](https://discourse.julialang.org/u/bgctw)\
**Replies:** 5\
**Last updated:** [April 27, 2022, 7:47am UTC](https://discourse.julialang.org/t/how-to-debug-failing-differentialequations-solve-when-called-with-dual-numbers/79895 "2022-04-27T07:47:20Z")

</div>

I try to debug why Turing is not moving forward when exploring the posterior sensitivity of parameters and initial states of a ModelingToolkit ODE problem. I reduced the problem to sample no initial conditions and a sing…

---

## [Arrays of complex values with very small imaginary part](https://discourse.julialang.org/t/arrays-of-complex-values-with-very-small-imaginary-part/79621)

<div class="topic-metadata">

**Author:** [@garrek](https://discourse.julialang.org/u/garrek)\
**Replies:** 7\
**Last updated:** [April 27, 2022, 4:46am UTC](https://discourse.julialang.org/t/arrays-of-complex-values-with-very-small-imaginary-part/79621 "2022-04-27T04:46:50Z")

</div>

I am performing calculations with arrays with elements that can be complex (depending on the inputs). Later in my program, I need to check if the eigenvalues of the matrix are complex or real. (real and imaginary compone…

---

## [Symbolic differentiation of sparse function gives incorrect jacobian](https://discourse.julialang.org/t/symbolic-differentiation-of-sparse-function-gives-incorrect-jacobian/79943)

<div class="topic-metadata">

**Author:** [@Elmo](https://discourse.julialang.org/u/Elmo)\
**Replies:** 3\
**Last updated:** [April 26, 2022, 9:38pm UTC](https://discourse.julialang.org/t/symbolic-differentiation-of-sparse-function-gives-incorrect-jacobian/79943 "2022-04-26T21:38:42Z")

</div>

Hi all, I am trying to differentiate a vector function with respect to a subset of the variables symbolically, but I am running into problems. Below is the problematic code: using Symbolics, SparseArrays, LinearAlgebra…

---

## [How to find a root at the diverging boundary?](https://discourse.julialang.org/t/how-to-find-a-root-at-the-diverging-boundary/79930)

<div class="topic-metadata">

**Author:** [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Replies:** 7\
**Last updated:** [April 25, 2022, 9:55am UTC](https://discourse.julialang.org/t/how-to-find-a-root-at-the-diverging-boundary/79930 "2022-04-25T09:55:56Z")

</div>

Say if I have a function f(x; \\lambda) which is continuous and smooth where x \\in (0, \\infty) for any 0\<\\lambda \< \\lambda^\*. For each \\lambda, there is a single minimum at the same location x^\*, f(x^\*; \\lambda). f(x^\*; \\…

---

## [Jacobian differentiation with Enzyme](https://discourse.julialang.org/t/jacobian-differentiation-with-enzyme/79912)

<div class="topic-metadata">

**Author:** [@Elmo](https://discourse.julialang.org/u/Elmo)\
**Replies:** 3\
**Last updated:** [April 24, 2022, 8:57am UTC](https://discourse.julialang.org/t/jacobian-differentiation-with-enzyme/79912 "2022-04-24T08:57:28Z")

</div>

Hi all, I am having some trouble understanding the docs for Enzyme.jl. Specifically, how to differentiate functions that return arrays and take arrays as inputs (i.e. how to get the Jacobian). I have tried a number of a…

---

## [Incorrect jacobian using ForwardDiff and sparse functions](https://discourse.julialang.org/t/incorrect-jacobian-using-forwarddiff-and-sparse-functions/79901)

<div class="topic-metadata">

**Author:** [@Elmo](https://discourse.julialang.org/u/Elmo)\
**Replies:** 4\
**Last updated:** [April 23, 2022, 7:08pm UTC](https://discourse.julialang.org/t/incorrect-jacobian-using-forwarddiff-and-sparse-functions/79901 "2022-04-23T19:08:46Z")

</div>

Hi all, Does anybody know why the following code produces different (incorrect) jacobians using ForwardDiff? The function being differentiated contains sparse matrices, but if I don’t expand them to dense matrices the j…

---

## [What's the most efficient way to compute the matrix product A'\*B\*A for general B?](https://discourse.julialang.org/t/whats-the-most-efficient-way-to-compute-the-matrix-product-a-b-a-for-general-b/79821)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 5\
**Last updated:** [April 23, 2022, 11:39am UTC](https://discourse.julialang.org/t/whats-the-most-efficient-way-to-compute-the-matrix-product-a-b-a-for-general-b/79821 "2022-04-23T11:39:13Z")

</div>

The matrix A has orthonormal columns, but is rectangular (tall). Currently, I allocate caches C and D, and evaluate mul!(D, A', mul!(C, B, A) In my use case, A and B are somewhat large matrices, so I’d ideally like to …

---

## [Why does setting JULIA\_EXLCUSIVE=1 make MKL run single-threaded?](https://discourse.julialang.org/t/why-does-setting-julia-exlcusive-1-make-mkl-run-single-threaded/79766)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 0\
**Last updated:** [April 21, 2022, 7:22am UTC](https://discourse.julialang.org/t/why-does-setting-julia-exlcusive-1-make-mkl-run-single-threaded/79766 "2022-04-21T07:22:49Z")

</div>

I am working on a cluster with 28 cores allocated to me. I start Julia using MKL\_DYNAMIC="FALSE" JULIA\_EXCLUSIVE=1 julia although I’m uncertain if this is the right approach. Eventually, I aim to run multiple julia th…

---

## [Spectral Methods in Julia](https://discourse.julialang.org/t/spectral-methods-in-julia/79506)

<div class="topic-metadata">

**Author:** [@Veenty](https://discourse.julialang.org/u/Veenty)\
**Replies:** 4\
**Last updated:** [April 15, 2022, 8:54am UTC](https://discourse.julialang.org/t/spectral-methods-in-julia/79506 "2022-04-15T08:54:28Z")

</div>

I want to solve Poisson equation in the ellipse via (pseudo)-spectral methods. I was thinking of using Dedalus via Pycall or something like that. But are there any good alternatives in Julia? Most things that I’ve found…

---

## [Time varying input in ReachabilityAnalysis](https://discourse.julialang.org/t/time-varying-input-in-reachabilityanalysis/78419)

<div class="topic-metadata">

**Author:** [@martincornejo](https://discourse.julialang.org/u/martincornejo)\
**Replies:** 2\
**Last updated:** [April 14, 2022, 10:10am UTC](https://discourse.julialang.org/t/time-varying-input-in-reachabilityanalysis/78419 "2022-04-14T10:10:09Z")

</div>

Let’s take the following example taken from ReachabilityAnalysis’s documentation: https://juliareach.github.io/ReachabilityAnalysis.jl/dev/models/TransmissionLine/#Transmission-line-circuit For the input, it takes the …

---

## [Convexity-Preserving Rational Interpolation](https://discourse.julialang.org/t/convexity-preserving-rational-interpolation/79112)

<div class="topic-metadata">

**Author:** [@liamfdoherty](https://discourse.julialang.org/u/liamfdoherty)\
**Replies:** 11\
**Last updated:** [April 12, 2022, 10:08pm UTC](https://discourse.julialang.org/t/convexity-preserving-rational-interpolation/79112 "2022-04-12T22:08:54Z")

</div>

Hi all! First time poster here. I have a univariate convex function that I would like to optimize. However, it is very expensive to evaluate (due to large variances from Monte Carlo estimation) and I would like to inter…

---

## [Pre-allocated eigen value decomposition](https://discourse.julialang.org/t/pre-allocated-eigen-value-decomposition/79358)

<div class="topic-metadata">

**Author:** [@jinml](https://discourse.julialang.org/u/jinml)\
**Replies:** 2\
**Last updated:** [April 11, 2022, 10:07pm UTC](https://discourse.julialang.org/t/pre-allocated-eigen-value-decomposition/79358 "2022-04-11T22:07:07Z")

</div>

Is there a way to pre-allocate an array to hold the returned eigenvalues and vectors from eigen or eigen! ? Currently both functions return a factorization which does not seem to allow a pre-allocation. The following cod…

---

## [Discrepency related to using \`\`\`lyapunovspectrum\`\`\` from DynamicalSystems.jl package](https://discourse.julialang.org/t/discrepency-related-to-using-lyapunovspectrum-from-dynamicalsystems-jl-package/75453)

<div class="topic-metadata">

**Author:** [@pafloxy](https://discourse.julialang.org/u/pafloxy)\
**Replies:** 9\
**Last updated:** [April 11, 2022, 2:53pm UTC](https://discourse.julialang.org/t/discrepency-related-to-using-lyapunovspectrum-from-dynamicalsystems-jl-package/75453 "2022-04-11T14:53:07Z")

</div>

Hi! I was trying out the lyapunovspectrum function in Julia, for a few standard dynamical systems like Rossler. I compared the results obtained by using lyapunovspectrum to the spectrum obtained by manually initiating a…

---

## [Iteratively compute eigenvalues of non-Hermitian sparse matrix](https://discourse.julialang.org/t/iteratively-compute-eigenvalues-of-non-hermitian-sparse-matrix/79236)

<div class="topic-metadata">

**Author:** [@jamblejoe](https://discourse.julialang.org/u/jamblejoe)\
**Replies:** 0\
**Last updated:** [April 8, 2022, 6:58pm UTC](https://discourse.julialang.org/t/iteratively-compute-eigenvalues-of-non-hermitian-sparse-matrix/79236 "2022-04-08T18:58:11Z")

</div>

Let A be a real, non-symmetric, sparse matrix with eigenvalues having real part smaller than or equal to 0. We can assume that if the real part of an eigenvalue λ is 0 then λ=0. The multiplicity of the 0 eigenvalue is gr…

---

## [How to extract a differential operator from an expression involving symbolic derivatives (using Symbolics.jl)?](https://discourse.julialang.org/t/how-to-extract-a-differential-operator-from-an-expression-involving-symbolic-derivatives-using-symbolics-jl/76449)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 6\
**Last updated:** [April 7, 2022, 12:04pm UTC](https://discourse.julialang.org/t/how-to-extract-a-differential-operator-from-an-expression-involving-symbolic-derivatives-using-symbolics-jl/76449 "2022-04-07T12:04:34Z")

</div>

Suppose I have the following operation julia\> @variables t x(t) 2-element Vector{Num}: t x(t) julia\> Dt = Differential(t) (::Differential) (generic function with 2 methods) julia\> ex = expand\_derivatives(Dt(t^2\*x…

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

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