# Numerics

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

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

**Page:** 9

---

## [How to check reliably whether a function has a zero on an interval '\[0,a)'](https://discourse.julialang.org/t/how-to-check-reliably-whether-a-function-has-a-zero-on-an-interval-0-a/114560)

<div class="topic-metadata">

**Author:** [@paul188](https://discourse.julialang.org/u/paul188)\
**Replies:** 5\
**Last updated:** [May 22, 2024, 5:23pm UTC](https://discourse.julialang.org/t/how-to-check-reliably-whether-a-function-has-a-zero-on-an-interval-0-a/114560 "2024-05-22T17:23:52Z")

</div>

Let’s say I have a continuous (even smooth) function f(x) which is defined on the whole real line. Now, I want to know whether f(x) has a zero in \[0, ∞). I can say for sure that if it has a zero on this ray, this zero m…

---

## [How to show progress when using DifferentialEquations.jl?](https://discourse.julialang.org/t/how-to-show-progress-when-using-differentialequations-jl/104168)

<div class="topic-metadata">

**Author:** [@yhchang96](https://discourse.julialang.org/u/yhchang96)\
**Replies:** 10\
**Last updated:** [May 22, 2024, 10:16am UTC](https://discourse.julialang.org/t/how-to-show-progress-when-using-differentialequations-jl/104168 "2024-05-22T10:16:48Z")

</div>

The ODEs I’m solving typically takes an hour and I would like it to print the current time step for every, e.g. 10 time steps. I have tried the method shown on this page about progress bar, but it doesn’t work (i.e. noth…

---

## [Homotopy Continuation fails to find all solutions](https://discourse.julialang.org/t/homotopy-continuation-fails-to-find-all-solutions/114451)

<div class="topic-metadata">

**Author:** [@jrawson](https://discourse.julialang.org/u/jrawson)\
**Replies:** 2\
**Last updated:** [May 20, 2024, 1:12pm UTC](https://discourse.julialang.org/t/homotopy-continuation-fails-to-find-all-solutions/114451 "2024-05-20T13:12:10Z")

</div>

Hello, Apologies if this is in the wrong place. I am attempting to solve certain polynomial systems in Julia, using Homotopy Continuation. I know these have a certain number of solutions (364), however Homotopy Continua…

---

## [Threads stop working when scaling computation](https://discourse.julialang.org/t/threads-stop-working-when-scaling-computation/114392)

<div class="topic-metadata">

**Author:** [@SpuriousEigenstate](https://discourse.julialang.org/u/SpuriousEigenstate)\
**Replies:** 0\
**Last updated:** [May 17, 2024, 12:06pm UTC](https://discourse.julialang.org/t/threads-stop-working-when-scaling-computation/114392 "2024-05-17T12:06:39Z")

</div>

I have been stumped by this for a while now, so I thought I’d put it up here. I developed a script that calculates some properties of a simulation “self-consistently”. I.e. the system is set up as a matrix, diagonalized…

---

## [What can I do to calculate the L2 norm between the exact solution and my numerical solution?](https://discourse.julialang.org/t/what-can-i-do-to-calculate-the-l2-norm-between-the-exact-solution-and-my-numerical-solution/114359)

<div class="topic-metadata">

**Author:** [@mcr.92](https://discourse.julialang.org/u/mcr.92)\
**Replies:** 3\
**Last updated:** [May 16, 2024, 2:23pm UTC](https://discourse.julialang.org/t/what-can-i-do-to-calculate-the-l2-norm-between-the-exact-solution-and-my-numerical-solution/114359 "2024-05-16T14:23:52Z")

</div>

I am solving a differential equation by the MOL method, it has an exact solution so I want to calculate the error in the L2 norm. I made this code F1(x) = A\*(cosh(B\*x)) F2(y) = A\*(cosh(B\*y)) FC = -(2\*(B^2)\*K - W)/(ρ\*C\_s…

---

## [Integration over implicit region](https://discourse.julialang.org/t/integration-over-implicit-region/112729)

<div class="topic-metadata">

**Author:** [@jabru](https://discourse.julialang.org/u/jabru)\
**Replies:** 5\
**Last updated:** [May 16, 2024, 1:20am UTC](https://discourse.julialang.org/t/integration-over-implicit-region/112729 "2024-05-16T01:20:33Z")

</div>

Hi there, this is more of a package existence than anything else. There is one functionality in Wolfram Mathematica, which I have never seen implemented in any open source software package. Neither for Julia nor for any…

---

## [Challenges in Estimating Wind Turbine Controller Using Universal Differential Equations (UDE) Approach](https://discourse.julialang.org/t/challenges-in-estimating-wind-turbine-controller-using-universal-differential-equations-ude-approach/113890)

<div class="topic-metadata">

**Author:** [@Alvaro98](https://discourse.julialang.org/u/Alvaro98)\
**Replies:** 5\
**Last updated:** [May 12, 2024, 5:05pm UTC](https://discourse.julialang.org/t/challenges-in-estimating-wind-turbine-controller-using-universal-differential-equations-ude-approach/113890 "2024-05-12T17:05:56Z")

</div>

Hello all, As part of my PhD work, I’m applying the Universal Differential Equations (UDE) approach seen in Automatically Discover Missing Physics by Embedding Machine Learning into Differential Equations · Overview of …

---

## [How to get reproducible results with DiffEqNoiseProcess.jl?](https://discourse.julialang.org/t/how-to-get-reproducible-results-with-diffeqnoiseprocess-jl/114063)

<div class="topic-metadata">

**Author:** [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Replies:** 1\
**Last updated:** [May 10, 2024, 9:59pm UTC](https://discourse.julialang.org/t/how-to-get-reproducible-results-with-diffeqnoiseprocess-jl/114063 "2024-05-10T21:59:17Z")

</div>

I have a process: using DifferentialEquations using Random mu = 1 sigma = 1 gbm = GeometricBrownianMotionProcess(mu, sigma, 0.0, 10.0) prob = NoiseProblem(gbm, (0.0, 10)) sol = solve(prob; dt=1.0) How can I fix the se…

---

## [If EnzymeRules.inactive() is defined, does the Enzyme.jl operation still take place?](https://discourse.julialang.org/t/if-enzymerules-inactive-is-defined-does-the-enzyme-jl-operation-still-take-place/113369)

<div class="topic-metadata">

**Author:** [@ToPo](https://discourse.julialang.org/u/ToPo)\
**Replies:** 6\
**Last updated:** [May 7, 2024, 2:17pm UTC](https://discourse.julialang.org/t/if-enzymerules-inactive-is-defined-does-the-enzyme-jl-operation-still-take-place/113369 "2024-05-07T14:17:18Z")

</div>

When performing automatic differentiation using Enzyme.jl, Errors and warnings occur in functions that define EnzymeRules.inactive(). I thought that the application of Enzyme.jl was ignored when EnzymeRules.inactive() w…

---

## [Troubleshooting Inverse Problem with PINNs for Wind Turbine Aerodynamics using NeuralPDE.jl](https://discourse.julialang.org/t/troubleshooting-inverse-problem-with-pinns-for-wind-turbine-aerodynamics-using-neuralpde-jl/113232)

<div class="topic-metadata">

**Author:** [@Alvaro98](https://discourse.julialang.org/u/Alvaro98)\
**Replies:** 12\
**Last updated:** [May 6, 2024, 9:46am UTC](https://discourse.julialang.org/t/troubleshooting-inverse-problem-with-pinns-for-wind-turbine-aerodynamics-using-neuralpde-jl/113232 "2024-05-06T09:46:41Z")

</div>

Hello all, I’m trying to estimate 10 parameters (c1 to c10) of an ODE representing the aerodynamic model of a wind turbine, and I’ve decided to do it via Bayesian inference using physics-informed neural networks (PINN) …

---

## [Convergence of RK4 solver](https://discourse.julialang.org/t/convergence-of-rk4-solver/113770)

<div class="topic-metadata">

**Author:** [@Pranav\_Vinod](https://discourse.julialang.org/u/Pranav_Vinod)\
**Replies:** 5\
**Last updated:** [May 3, 2024, 2:40pm UTC](https://discourse.julialang.org/t/convergence-of-rk4-solver/113770 "2024-05-03T14:40:32Z")

</div>

Hi, I am working on solving some differential equations and noticed some discrepancies in the convergence of the RK4 solver. I tested the error by finding the difference between the solver solution and analytical result…

---

## [Gauss quadrature in 3D with change of variables](https://discourse.julialang.org/t/gauss-quadrature-in-3d-with-change-of-variables/113486)

<div class="topic-metadata">

**Author:** [@Lisette\_de\_Bruin](https://discourse.julialang.org/u/Lisette_de_Bruin)\
**Replies:** 1\
**Last updated:** [April 25, 2024, 12:45pm UTC](https://discourse.julialang.org/t/gauss-quadrature-in-3d-with-change-of-variables/113486 "2024-04-25T12:45:43Z")

</div>

Dear all, I want to solve an intgeral of the following form \\int\_0^1\\int\_x^1(x+y) dydx using a self implemented Gauss quadrature. The integral boundaries must be changed to \[-1,1\], which is done in the following way: …

---

## [Any package implementing Savitzky-Golay filters or related?](https://discourse.julialang.org/t/any-package-implementing-savitzky-golay-filters-or-related/9717)

<div class="topic-metadata">

**Author:** [@Olivier\_Merchiers](https://discourse.julialang.org/u/Olivier_Merchiers)\
**Replies:** 3\
**Last updated:** [April 24, 2024, 7:18am UTC](https://discourse.julialang.org/t/any-package-implementing-savitzky-golay-filters-or-related/9717 "2024-04-24T07:18:20Z")

</div>

Hello everyone, I’m not sure this is the correct category, so feel free to put it elsewhere. I’m looking for a Julia package that implements a Savitzky-Golay filter or similar. I have FTIR spectroscopic data from whic…

---

## [Vector of vector of gradients](https://discourse.julialang.org/t/vector-of-vector-of-gradients/113348)

<div class="topic-metadata">

**Author:** [@Domenico\_Lahaye](https://discourse.julialang.org/u/Domenico_Lahaye)\
**Replies:** 2\
**Last updated:** [April 22, 2024, 6:37pm UTC](https://discourse.julialang.org/t/vector-of-vector-of-gradients/113348 "2024-04-22T18:37:08Z")

</div>

I am to extend the scalar case of a gradient of a function, i.e., foo = Vector{Function}(undef,2) gnu = Vector{Function}(undef,2) foo\[1\] = (x,y) -\> x+y foo\[2\] = (x,y) -\> x-y A = \[1. 2.; 3. 4.\] gnu = (x,y) -\> B \* \[foo\[…

---

## [ArbNumerics.jl | questions regarding use](https://discourse.julialang.org/t/arbnumerics-jl-questions-regarding-use/113320)

<div class="topic-metadata">

**Author:** [@Audrius-St](https://discourse.julialang.org/u/Audrius-St)\
**Replies:** 0\
**Last updated:** [April 22, 2024, 8:11am UTC](https://discourse.julialang.org/t/arbnumerics-jl-questions-regarding-use/113320 "2024-04-22T08:11:35Z")

</div>

Hello, WSL 2 | Ubuntu 22.04.4 Julia 1.10.2 ArbNumerics 1.5.0 My first go at using extended precision in Julia. Ball arithmetic as implemented in the package ArbNumerics.jl is the method that I would like to use. To…

---

## [How to construct a matrix of gradients depending on nodal locations in gridap](https://discourse.julialang.org/t/how-to-construct-a-matrix-of-gradients-depending-on-nodal-locations-in-gridap/113255)

<div class="topic-metadata">

**Author:** [@mary](https://discourse.julialang.org/u/mary)\
**Replies:** 0\
**Last updated:** [April 19, 2024, 9:52pm UTC](https://discourse.julialang.org/t/how-to-construct-a-matrix-of-gradients-depending-on-nodal-locations-in-gridap/113255 "2024-04-19T21:52:55Z")

</div>

Hi, I want to calculate the gradients of residuals(displacement) with respect to another vector. based on mathematical calculations, as residuals are a vector this gradient should be a matrix. This matrix should has val…

---

## [QuadGK unexpected behavior on first degree polynomial](https://discourse.julialang.org/t/quadgk-unexpected-behavior-on-first-degree-polynomial/113134)

<div class="topic-metadata">

**Author:** [@Domenico\_Lahaye](https://discourse.julialang.org/u/Domenico_Lahaye)\
**Replies:** 2\
**Last updated:** [April 18, 2024, 2:25pm UTC](https://discourse.julialang.org/t/quadgk-unexpected-behavior-on-first-degree-polynomial/113134 "2024-04-18T14:25:34Z")

</div>

I constructed a tiny example on which my (naive?) use of the quadgk() fails. The example is a first order polynomial in x and y on the triangular domain with vertices (0,0), (1,0) and (0,1). Below a working and failing M…

---

## [Bayesian inference with PINNs for ODEs with exogenous inputs taken from data](https://discourse.julialang.org/t/bayesian-inference-with-pinns-for-odes-with-exogenous-inputs-taken-from-data/112721)

<div class="topic-metadata">

**Author:** [@Alvaro98](https://discourse.julialang.org/u/Alvaro98)\
**Replies:** 5\
**Last updated:** [April 18, 2024, 1:57pm UTC](https://discourse.julialang.org/t/bayesian-inference-with-pinns-for-odes-with-exogenous-inputs-taken-from-data/112721 "2024-04-18T13:57:30Z")

</div>

First of all, I’m quite new to Julia and I would like to apologize if the question is too naïve, probably product of my limited understanding of how Julia handles this type of algorithms. Currently, I’m using Julia versi…

---

## [Cubature of Singular Integrand](https://discourse.julialang.org/t/cubature-of-singular-integrand/113003)

<div class="topic-metadata">

**Author:** [@Domenico\_Lahaye](https://discourse.julialang.org/u/Domenico_Lahaye)\
**Replies:** 3\
**Last updated:** [April 16, 2024, 1:33pm UTC](https://discourse.julialang.org/t/cubature-of-singular-integrand/113003 "2024-04-16T13:33:06Z")

</div>

?quadgk provides as output !!! note Only one-dimensional integrals are provided by this function. For multi-dimensional integration (cubature), there are many different algorithms (often much better than simple nested 1…

---

## [Question regarding numerical stability among Julia versions](https://discourse.julialang.org/t/question-regarding-numerical-stability-among-julia-versions/112741)

<div class="topic-metadata">

**Author:** [@CodeLenz](https://discourse.julialang.org/u/CodeLenz)\
**Replies:** 16\
**Last updated:** [April 16, 2024, 12:54pm UTC](https://discourse.julialang.org/t/question-regarding-numerical-stability-among-julia-versions/112741 "2024-04-16T12:54:05Z")

</div>

Dear Julians. I was testing the following code (M,C and K are sparse, symmetric and positive definite matrices) Julia\> M,C,K=THS(); julia\> cholM=cholesky(M); julia\> Cb = cholM\\C; julia\> Kb = cholM\\K; julia\> F = 0.…

---

## [ForwardDiff.jacobian Method error](https://discourse.julialang.org/t/forwarddiff-jacobian-method-error/112979)

<div class="topic-metadata">

**Author:** [@Domenico\_Lahaye](https://discourse.julialang.org/u/Domenico_Lahaye)\
**Replies:** 2\
**Last updated:** [April 15, 2024, 8:59pm UTC](https://discourse.julialang.org/t/forwarddiff-jacobian-method-error/112979 "2024-04-15T20:59:41Z")

</div>

I get a method error with ForwardDiff.jacobian that I fails to understand. Below a MWE. function fooworks(cvec,xmesh) residual = cvec return residual end function foofails(cvec,xmesh) residual = zeros(len…

---

## [Solving shifted linear system](https://discourse.julialang.org/t/solving-shifted-linear-system/111265)

<div class="topic-metadata">

**Author:** [@rvaradhan](https://discourse.julialang.org/u/rvaradhan)\
**Replies:** 19\
**Last updated:** [April 15, 2024, 5:52am UTC](https://discourse.julialang.org/t/solving-shifted-linear-system/111265 "2024-04-15T05:52:22Z")

</div>

I would like to solve a large shifted linear system: I have to solve (A + k^2 I)x = y, where A is symmetric PD, y is a vector, k is a scalar, and I is identity matrix. Matrix A is large O(10000 x 10000) but it is banded…

---

## [How to test if a function is continuous](https://discourse.julialang.org/t/how-to-test-if-a-function-is-continuous/112737)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 18\
**Last updated:** [April 12, 2024, 4:54pm UTC](https://discourse.julialang.org/t/how-to-test-if-a-function-is-continuous/112737 "2024-04-12T16:54:10Z")

</div>

I am writing some tests for a package (not yet public) where I want to test that a function f(x::Real)::Real is continuous at some x. Is there a numerical way of doing this? A solution I thought of is finding the left-…

---

## [Computing matrix derivatives for eigenvaule sensitivity analysis](https://discourse.julialang.org/t/computing-matrix-derivatives-for-eigenvaule-sensitivity-analysis/112845)

<div class="topic-metadata">

**Author:** [@jwalker](https://discourse.julialang.org/u/jwalker)\
**Replies:** 6\
**Last updated:** [April 12, 2024, 3:29pm UTC](https://discourse.julialang.org/t/computing-matrix-derivatives-for-eigenvaule-sensitivity-analysis/112845 "2024-04-12T15:29:01Z")

</div>

I have a problem where I would like to apply eigenvalue sensitivity analysis, using Enzyme to compute the derivatives of the matrix A(\\mathbf{p}), where \\mathbf{p} = (p\_1,\\ldots,p\_n). Per @stevengj’s notes, if I want the…

---

## [Allocation-free higher-order derivatives of R^n-\>R](https://discourse.julialang.org/t/allocation-free-higher-order-derivatives-of-r-n-r/112829)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 4\
**Last updated:** [April 12, 2024, 3:26am UTC](https://discourse.julialang.org/t/allocation-free-higher-order-derivatives-of-r-n-r/112829 "2024-04-12T03:26:16Z")

</div>

This question describes a particular AD application, I am either looking for a solution, someone telling me why it is not a good idea, or potential collaborators who are interested in the same problem, which comes up fre…

---

## [Pre allocating interpolant with Interpolations.jl](https://discourse.julialang.org/t/pre-allocating-interpolant-with-interpolations-jl/112712)

<div class="topic-metadata">

**Author:** [@Iddingsite](https://discourse.julialang.org/u/Iddingsite)\
**Replies:** 5\
**Last updated:** [April 11, 2024, 6:49pm UTC](https://discourse.julialang.org/t/pre-allocating-interpolant-with-interpolations-jl/112712 "2024-04-11T18:49:05Z")

</div>

Hi, I have a loop where I need to create new interpolants each time. I would like to know if I can somehow pre allocate the interpolant in Interpolations.jl so I don’t have to create new memory allocation at each iterat…

---

## [How to differentiate using Zygote in the presence of missing values](https://discourse.julialang.org/t/how-to-differentiate-using-zygote-in-the-presence-of-missing-values/112822)

<div class="topic-metadata">

**Author:** [@Nikos\_Gianniotis](https://discourse.julialang.org/u/Nikos_Gianniotis)\
**Replies:** 0\
**Last updated:** [April 11, 2024, 10:05am UTC](https://discourse.julialang.org/t/how-to-differentiate-using-zygote-in-the-presence-of-missing-values/112822 "2024-04-11T10:05:18Z")

</div>

I have encountered a problem in my code. While I cannot easily write a MWE for my particular case, I thought that perhaps dealing with the following issue would help me further. Let us say, that we have some data y and…

---

## [RQ decomposition](https://discourse.julialang.org/t/rq-decomposition/112795)

<div class="topic-metadata">

**Author:** [@RJDennis](https://discourse.julialang.org/u/RJDennis)\
**Replies:** 12\
**Last updated:** [April 10, 2024, 11:13pm UTC](https://discourse.julialang.org/t/rq-decomposition/112795 "2024-04-10T23:13:04Z")

</div>

Hi, can anyone point me to a Julia implementation of the RQ decomposition. Thanks.

---

## [Generalized eigenvalue problem in ApproxFun.jl](https://discourse.julialang.org/t/generalized-eigenvalue-problem-in-approxfun-jl/112441)

<div class="topic-metadata">

**Author:** [@jwalker](https://discourse.julialang.org/u/jwalker)\
**Replies:** 2\
**Last updated:** [April 9, 2024, 7:26pm UTC](https://discourse.julialang.org/t/generalized-eigenvalue-problem-in-approxfun-jl/112441 "2024-04-09T19:26:02Z")

</div>

Looking through the examples in ApproxFun.jl, I didn’t see one of a generalized eigenvalue problem. Is this possible? Is there a short example?

---

## [Root finding / NonLinear problem](https://discourse.julialang.org/t/root-finding-nonlinear-problem/112720)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 12\
**Last updated:** [April 9, 2024, 6:18pm UTC](https://discourse.julialang.org/t/root-finding-nonlinear-problem/112720 "2024-04-09T18:18:38Z")

</div>

Question: I am trying to solve a root-finding problem on a vector of 14 elements, but each function evaluation needs about 7 seconds. What is the best solver for this? And is there a way to declare a valid range of th…

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

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