# Numerics

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

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

**Page:** 17

---

## [Can I use user defined data types with ODE?](https://discourse.julialang.org/t/can-i-use-user-defined-data-types-with-ode/94390)

<div class="topic-metadata">

**Author:** [@shaurya](https://discourse.julialang.org/u/shaurya)\
**Replies:** 2\
**Last updated:** [February 10, 2023, 3:26am UTC](https://discourse.julialang.org/t/can-i-use-user-defined-data-types-with-ode/94390 "2023-02-10T03:26:36Z")

</div>

Can I use user defined data type with ODE function? mutable struct ud a::Float64 b::Float64 end function od!(dx,x,t) dx.= \[1, x.a \]; end ic = ud(1.0,2.0); prob=ODEProblem(od!,ic,(0.0,1.2)); sol1=solve(p…

---

## [Solving systems of partial differential equations](https://discourse.julialang.org/t/solving-systems-of-partial-differential-equations/93947)

<div class="topic-metadata">

**Author:** [@bombadil224](https://discourse.julialang.org/u/bombadil224)\
**Replies:** 0\
**Last updated:** [February 2, 2023, 7:18pm UTC](https://discourse.julialang.org/t/solving-systems-of-partial-differential-equations/93947 "2023-02-02T19:18:35Z")

</div>

I have been trying to find a way for a while now to simulate a few different systems of PDEs. What I need to be able to do is change both the initial conditions and the system of equations, without having to go through a…

---

## [Can I integrate 2 functions simultaneously in DifferentialEquations.jl?](https://discourse.julialang.org/t/can-i-integrate-2-functions-simultaneously-in-differentialequations-jl/93801)

<div class="topic-metadata">

**Author:** [@shaurya](https://discourse.julialang.org/u/shaurya)\
**Replies:** 3\
**Last updated:** [January 31, 2023, 3:53pm UTC](https://discourse.julialang.org/t/can-i-integrate-2-functions-simultaneously-in-differentialequations-jl/93801 "2023-01-31T15:53:21Z")

</div>

I have 2 coupled systems of differential equations, used for spacecraft simulation, which are to be integrated simultaneously: In this system, omega\_i and epsilon\_j are the variables. (i belongs to {1,2,3} and j be…

---

## [Vmls - sum of vectors, displacement](https://discourse.julialang.org/t/vmls-sum-of-vectors-displacement/93779)

<div class="topic-metadata">

**Author:** [@jcbritobr](https://discourse.julialang.org/u/jcbritobr)\
**Replies:** 5\
**Last updated:** [January 30, 2023, 7:52pm UTC](https://discourse.julialang.org/t/vmls-sum-of-vectors-displacement/93779 "2023-01-30T19:52:33Z")

</div>

Hello, good afternoon. I’m reading the VMLS book introduction about algebra linear and trying to draw the vector displacement in a plot. When sum two vectors a and b, the a+b vector dont need to connect to the end of b…

---

## [NaNs In The Output of SVD](https://discourse.julialang.org/t/nans-in-the-output-of-svd/93712)

<div class="topic-metadata">

**Author:** [@robin-armstrong](https://discourse.julialang.org/u/robin-armstrong)\
**Replies:** 1\
**Last updated:** [January 28, 2023, 10:22pm UTC](https://discourse.julialang.org/t/nans-in-the-output-of-svd/93712 "2023-01-28T22:22:47Z")

</div>

I am currently running numerical experiments which involve computing the SVD of a very large number of random matrices. Occasionally, Julia’s SVD function will return a Vt factor that contains a row of all NaNs. Here is …

---

## [Functions embedded in Julia](https://discourse.julialang.org/t/functions-embedded-in-julia/93368)

<div class="topic-metadata">

**Author:** [@Andrea\_Del\_Bravo](https://discourse.julialang.org/u/Andrea_Del_Bravo)\
**Replies:** 2\
**Last updated:** [January 22, 2023, 6:17pm UTC](https://discourse.julialang.org/t/functions-embedded-in-julia/93368 "2023-01-22T18:17:24Z")

</div>

I installed Julia on a laptop running ferdora 36 operating system. I tried to capture some xeta function values but the answer was that zeta(x) was not recognize a a valid command. I read on the Julia manual that zeta is…

---

## [Rank 1 Update for LU factors](https://discourse.julialang.org/t/rank-1-update-for-lu-factors/93298)

<div class="topic-metadata">

**Author:** [@maxchendt](https://discourse.julialang.org/u/maxchendt)\
**Replies:** 0\
**Last updated:** [January 21, 2023, 8:08am UTC](https://discourse.julialang.org/t/rank-1-update-for-lu-factors/93298 "2023-01-21T08:08:56Z")

</div>

Is there a Julia implementation? as that from the MATLAB Central File Exchange:

---

## [SVD on a matrix that does not fit into memory](https://discourse.julialang.org/t/svd-on-a-matrix-that-does-not-fit-into-memory/92802)

<div class="topic-metadata">

**Author:** [@aasdelat](https://discourse.julialang.org/u/aasdelat)\
**Replies:** 20\
**Last updated:** [January 16, 2023, 3:44pm UTC](https://discourse.julialang.org/t/svd-on-a-matrix-that-does-not-fit-into-memory/92802 "2023-01-16T15:44:17Z")

</div>

I am looking for a function that makes a SVD on a matrix that does not fit into memory. I am interested in using just one computer, although an answer for a cluster can be useful for other users. The python dask package…

---

## [Numerically stable derivative of logerf without catastrophic cancellation](https://discourse.julialang.org/t/numerically-stable-derivative-of-logerf-without-catastrophic-cancellation/92992)

<div class="topic-metadata">

**Author:** [@user22](https://discourse.julialang.org/u/user22)\
**Replies:** 4\
**Last updated:** [January 15, 2023, 4:56pm UTC](https://discourse.julialang.org/t/numerically-stable-derivative-of-logerf-without-catastrophic-cancellation/92992 "2023-01-15T16:56:08Z")

</div>

I need to evaluate the derivative of a logerf function fun with respect to x within the widest possible range of x. At the moment, the derivative is calculated through the function dfun. using LogExpFunctions using Fini…

---

## [DiffEqSensitivitys Manual VJPs documentation seems missing information](https://discourse.julialang.org/t/diffeqsensitivitys-manual-vjps-documentation-seems-missing-information/91890)

<div class="topic-metadata">

**Author:** [@damianoognissanti](https://discourse.julialang.org/u/damianoognissanti)\
**Replies:** 3\
**Last updated:** [January 9, 2023, 3:24pm UTC](https://discourse.julialang.org/t/diffeqsensitivitys-manual-vjps-documentation-seems-missing-information/91890 "2023-01-09T15:24:54Z")

</div>

Hello I am trying to add Manual VJPs to a project I am working on using adjoint\_sensitivities (from DiffEqSensitivity.jl), but the documentation seems missing information: https://docs.juliahub.com/DiffEqSensitivity/02…

---

## [Shouldn't \`bunchkaufman\` be actually named \`ldlt\`?](https://discourse.julialang.org/t/shouldnt-bunchkaufman-be-actually-named-ldlt/77641)

<div class="topic-metadata">

**Author:** [@zdenek\_hurak](https://discourse.julialang.org/u/zdenek_hurak)\
**Replies:** 5\
**Last updated:** [January 6, 2023, 9:56pm UTC](https://discourse.julialang.org/t/shouldnt-bunchkaufman-be-actually-named-ldlt/77641 "2023-01-06T21:56:36Z")

</div>

I am just musing over the choise of the name bunchkaufman for the bunkaufman function. If I understand it correctly, the function provides an implementation of an algorithm for LDLᵀ factorization of a symmetric and in ge…

---

## [Solving sparse linear system returns a Matrix](https://discourse.julialang.org/t/solving-sparse-linear-system-returns-a-matrix/92451)

<div class="topic-metadata">

**Author:** [@A\_C](https://discourse.julialang.org/u/A_C)\
**Replies:** 10\
**Last updated:** [January 5, 2023, 2:05pm UTC](https://discourse.julialang.org/t/solving-sparse-linear-system-returns-a-matrix/92451 "2023-01-05T14:05:59Z")

</div>

Solving the sparse system is returning a Matrix while converting to dense and then solving returns a Vector as expected. Is this the expected behavior? Or am I doing something incorrectly? using SparseArrays # Construc…

---

## [Using of colorvec in computation of jacobian](https://discourse.julialang.org/t/using-of-colorvec-in-computation-of-jacobian/92240)

<div class="topic-metadata">

**Author:** [@gstein3m](https://discourse.julialang.org/u/gstein3m)\
**Replies:** 2\
**Last updated:** [December 30, 2022, 10:46am UTC](https://discourse.julialang.org/t/using-of-colorvec-in-computation-of-jacobian/92240 "2022-12-30T10:46:07Z")

</div>

I got three different matrices J: FiniteDiff\_color: \[0.0 0.0; -9.486373847239932e-9 0.0\] ForwardDiff\_color: \[1.0 0.0; 6.123233995736766e-17 0.0\] FiniteDiff: \[0.0 1.0; -9.486373847239932e-9 0.0\] The last one is correc…

---

## [Efficient implementations of Fibonacci function with interesting results](https://discourse.julialang.org/t/efficient-implementations-of-fibonacci-function-with-interesting-results/18123)

<div class="topic-metadata">

**Author:** [@mhw](https://discourse.julialang.org/u/mhw)\
**Replies:** 19\
**Last updated:** [December 28, 2022, 12:12pm UTC](https://discourse.julialang.org/t/efficient-implementations-of-fibonacci-function-with-interesting-results/18123 "2022-12-28T12:12:12Z")

</div>

It is well known that the standard recursive implementation of the Fibonacci function defined by F(0) = 0 F(1) = 1 F(n) = F(n-1) + F(n-2) for n \> 1 runs in exponential time. Therefore most often the Fibonacci function …

---

## [Solving an ODE which depends on an external function](https://discourse.julialang.org/t/solving-an-ode-which-depends-on-an-external-function/92176)

<div class="topic-metadata">

**Author:** [@minimal\_subs](https://discourse.julialang.org/u/minimal_subs)\
**Replies:** 12\
**Last updated:** [December 27, 2022, 7:11pm UTC](https://discourse.julialang.org/t/solving-an-ode-which-depends-on-an-external-function/92176 "2022-12-27T19:11:16Z")

</div>

Greetings, I’m a relatively new Julia user and have encountered a problem. I’m a bit embarrassed to post it here, since it seems sure to be something really obvious. A brief statement of the problem is as follows. I am t…

---

## [Design a parameterized wave speed function](https://discourse.julialang.org/t/design-a-parameterized-wave-speed-function/92111)

<div class="topic-metadata">

**Author:** [@gladisor](https://discourse.julialang.org/u/gladisor)\
**Replies:** 0\
**Last updated:** [December 25, 2022, 7:57pm UTC](https://discourse.julialang.org/t/design-a-parameterized-wave-speed-function/92111 "2022-12-25T19:57:26Z")

</div>

Hello SciML community, I am a new user of some of the packages in this ecosystem in search of some guidance of how to efficiently write code which models the behavior of acoustic waves in two dimensions. So far I have c…

---

## [A Unified Interface for Rootfinding](https://discourse.julialang.org/t/a-unified-interface-for-rootfinding/698)

<div class="topic-metadata">

**Author:** [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Replies:** 22\
**Last updated:** [December 24, 2022, 1:56pm UTC](https://discourse.julialang.org/t/a-unified-interface-for-rootfinding/698 "2022-12-24T13:56:23Z")

</div>

One of the most useful developments of Julia is the concept of the metapackage. A package management system coupled with multiple dispatch has lead to ecosystems like Plots.jl, DiffEqBase.jl (DifferentialEquations.jl), a…

---

## [Interpolation/smoothing/decimating of unevenly spaced data](https://discourse.julialang.org/t/interpolation-smoothing-decimating-of-unevenly-spaced-data/91810)

<div class="topic-metadata">

**Author:** [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Replies:** 12\
**Last updated:** [December 18, 2022, 6:59pm UTC](https://discourse.julialang.org/t/interpolation-smoothing-decimating-of-unevenly-spaced-data/91810 "2022-12-18T18:59:22Z")

</div>

I have experimental data on two channels p1(t), p2(t), both taken on different and unevenly spaced time points (approx. each second, with jitter and some data lacking). The data size is some 10^5 points each. I need f(t)…

---

## [FEM Basis and Integration package similar to fenics-basix?](https://discourse.julialang.org/t/fem-basis-and-integration-package-similar-to-fenics-basix/91629)

<div class="topic-metadata">

**Author:** [@lucasbanting](https://discourse.julialang.org/u/lucasbanting)\
**Replies:** 6\
**Last updated:** [December 14, 2022, 4:03am UTC](https://discourse.julialang.org/t/fem-basis-and-integration-package-similar-to-fenics-basix/91629 "2022-12-14T04:03:40Z")

</div>

I’m looking for a package to define quadrature points on simplex elements, as well as a variety of basis function types (specifically high order Lagrange polynomials and high order nedelec elements), similar to: GitHub -…

---

## [Non-Zygote autodiff through a FFT-based poisson solver?](https://discourse.julialang.org/t/non-zygote-autodiff-through-a-fft-based-poisson-solver/88191)

<div class="topic-metadata">

**Author:** [@trakjohnson](https://discourse.julialang.org/u/trakjohnson)\
**Replies:** 3\
**Last updated:** [December 14, 2022, 12:16am UTC](https://discourse.julialang.org/t/non-zygote-autodiff-through-a-fft-based-poisson-solver/88191 "2022-12-14T00:16:06Z")

</div>

Hi all, I’m attempting to figure out how to automatically differentiate through code that uses FFTs and IFFTs. I know there are a few topics on this (I’ve referenced some) and I have tried to do my best to get the most …

---

## [Difference between two interpolation packages when evaluating derivatives: Interpolations.jl and Dierckx.jl](https://discourse.julialang.org/t/difference-between-two-interpolation-packages-when-evaluating-derivatives-interpolations-jl-and-dierckx-jl/61747)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 5\
**Last updated:** [December 9, 2022, 9:16pm UTC](https://discourse.julialang.org/t/difference-between-two-interpolation-packages-when-evaluating-derivatives-interpolations-jl-and-dierckx-jl/61747 "2022-12-09T21:16:12Z")

</div>

Recently I had a chance to test two interpolation packages, Interpolations.jl and Dierckx.jl. I found a difference between the two packages in the way they treat the boundary points when evaluating derivatives. I think…

---

## [Plotting each of the equations in an ODE system in a different figure window](https://discourse.julialang.org/t/plotting-each-of-the-equations-in-an-ode-system-in-a-different-figure-window/91404)

<div class="topic-metadata">

**Author:** [@jethro-djan](https://discourse.julialang.org/u/jethro-djan)\
**Replies:** 5\
**Last updated:** [December 8, 2022, 5:13pm UTC](https://discourse.julialang.org/t/plotting-each-of-the-equations-in-an-ode-system-in-a-different-figure-window/91404 "2022-12-08T17:13:00Z")

</div>

Hello everyone. I have solved a system of fractional ODEs using a tool I found on github and I want to plot it. The way I want to go about it is this: each solution in the system plotted against time and in different fi…

---

## [Integral of a function inside non-rectangular domain](https://discourse.julialang.org/t/integral-of-a-function-inside-non-rectangular-domain/72132)

<div class="topic-metadata">

**Author:** [@wsshin](https://discourse.julialang.org/u/wsshin)\
**Replies:** 16\
**Last updated:** [December 3, 2022, 8:27pm UTC](https://discourse.julialang.org/t/integral-of-a-function-inside-non-rectangular-domain/72132 "2022-12-03T20:27:26Z")

</div>

I want to integrate some function f(x,y) inside a non-rectangular domain, say a disk defined by x² + y² ≤ 1. Is there a package for doing this? I actually tried to define g(x,y) = f(x,y) \* (x^2+y^2 ≤1). Then g(x,y) is…

---

## [Weird error regarding unsupported keyword arguments with KrylovKit eigsolve](https://discourse.julialang.org/t/weird-error-regarding-unsupported-keyword-arguments-with-krylovkit-eigsolve/91069)

<div class="topic-metadata">

**Author:** [@GregVernon](https://discourse.julialang.org/u/GregVernon)\
**Replies:** 2\
**Last updated:** [December 1, 2022, 2:38pm UTC](https://discourse.julialang.org/t/weird-error-regarding-unsupported-keyword-arguments-with-krylovkit-eigsolve/91069 "2022-12-01T14:38:24Z")

</div>

I’m trying to compute the condition number for sparse (stiffness) matrices coming from finite element analyses. I’ve included a download link for one such matrix below. Here’s a script that should read the (PETSc) stif…

---

## [Algorithms & their complexity behind \`LinearAlgebra.eigvals\`](https://discourse.julialang.org/t/algorithms-their-complexity-behind-linearalgebra-eigvals/91089)

<div class="topic-metadata">

**Author:** [@DanDoe](https://discourse.julialang.org/u/DanDoe)\
**Replies:** 2\
**Last updated:** [December 1, 2022, 12:43pm UTC](https://discourse.julialang.org/t/algorithms-their-complexity-behind-linearalgebra-eigvals/91089 "2022-12-01T12:43:26Z")

</div>

What algorithm(s) does LinearAlgebra.eigvals employ for a general, i.e., non-symmetric, non-triangular matrix?

---

## [Sparse solve with sparse rhs](https://discourse.julialang.org/t/sparse-solve-with-sparse-rhs/81595)

<div class="topic-metadata">

**Author:** [@Andrea\_Vigliotti](https://discourse.julialang.org/u/Andrea_Vigliotti)\
**Replies:** 13\
**Last updated:** [November 29, 2022, 7:32am UTC](https://discourse.julialang.org/t/sparse-solve-with-sparse-rhs/81595 "2022-11-29T07:32:34Z")

</div>

is there any news on this? It appears it is still not possible solving problems with sparse rhs. This is a problem when dealing with very large, and very sparse, matrices, where it is not possible allocate memory for a f…

---

## [How to use Combinatorics.jl for permutations](https://discourse.julialang.org/t/how-to-use-combinatorics-jl-for-permutations/90766)

<div class="topic-metadata">

**Author:** [@nvenkov1](https://discourse.julialang.org/u/nvenkov1)\
**Replies:** 2\
**Last updated:** [November 24, 2022, 7:43pm UTC](https://discourse.julialang.org/t/how-to-use-combinatorics-jl-for-permutations/90766 "2022-11-24T19:43:02Z")

</div>

I would like to gather all permutations of a certain number of elements of a set. I read that Combinatorics.jl can be used for that. However, I do not know how to use it. I do the following using Combinatorics: permutat…

---

## [Delay Differential Equation Interruptions](https://discourse.julialang.org/t/delay-differential-equation-interruptions/90704)

<div class="topic-metadata">

**Author:** [@Mark\_Williams](https://discourse.julialang.org/u/Mark_Williams)\
**Replies:** 1\
**Last updated:** [November 23, 2022, 4:57pm UTC](https://discourse.julialang.org/t/delay-differential-equation-interruptions/90704 "2022-11-23T16:57:55Z")

</div>

I’m trying to simulate a Covid model using a delay differential equation in DifferentialEquations.jl but I’m having a bit of difficultly getting it to work. I’m not sure If I’m applying the methods correctly. The model …

---

## [Problem with IncompleteLU.jl](https://discourse.julialang.org/t/problem-with-incompletelu-jl/90636)

<div class="topic-metadata">

**Author:** [@nvenkov1](https://discourse.julialang.org/u/nvenkov1)\
**Replies:** 4\
**Last updated:** [November 22, 2022, 9:57pm UTC](https://discourse.julialang.org/t/problem-with-incompletelu-jl/90636 "2022-11-22T21:57:22Z")

</div>

I use the file transient.mtx from the SuiteSparse Matrix Collection, see https://suitesparse-collection-website.herokuapp.com/MM/Freescale/transient.tar.gz. Then I try to define an incomplete LU factorization that I app…

---

## [Extracting the last dt used by solver in DifferentialEquations.jl](https://discourse.julialang.org/t/extracting-the-last-dt-used-by-solver-in-differentialequations-jl/90647)

<div class="topic-metadata">

**Author:** [@churli](https://discourse.julialang.org/u/churli)\
**Replies:** 3\
**Last updated:** [November 22, 2022, 3:13pm UTC](https://discourse.julialang.org/t/extracting-the-last-dt-used-by-solver-in-differentialequations-jl/90647 "2022-11-22T15:13:22Z")

</div>

As per the title, I need to be able to extract the last dt used by the ODE solver from DifferentialEquations.jl . Since in my specific use case I need to extract it whenever I terminate the solver from a callback, it do…

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

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