Questions tagged [numerical-integration]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
46 views

How to modify adaptive step size Runge-Kutta cash karp algorithm for higher accuracy?

I'm following a paper on making your own cosmic microwave background perturbation solver code by Peter Callin https://arxiv.org/pdf/astro-ph/0606683.pdf In the programming techniques section V, the ...
5 votes
1 answer
126 views

Slope limiting with implicit time integration

I am solving the advection problem with high order numerical methods, using the method of lines. The boundary conditions and initial condition are selected in a way where I know that the exact ...
2 votes
0 answers
96 views

Calculating Debye functions to high accuracy (hundreds of bits), is it possible to be faster than generic quadrature?

The Debye functions are defined like so: ${D_n\left(x\right)} = {\frac{n}{x^n} \cdot {\int_0^x{\frac{t^n}{e^t - 1}dt}}}$. I'm trying to evaluate the functions for $n$ from one to four and for $\left\...
0 votes
0 answers
65 views

Solving coupled 2nd-order differential equation

I would appreciate it if you could help me solve the following coupled equation numerically $$ [-\frac{1}{2} \partial_r^2 + v_0(r) -E]\psi_{\ell} + v_1(r) \psi_{1-\ell}(r) = 0, $$ where $\ell = 0 , 1$ ...
0 votes
0 answers
88 views

Unable to solve numerically this system of differential equation

I'm trying to obtain the graph of x(y) from the following system : Therefore I tried to solve this system using an Euler Method : ...
0 votes
0 answers
89 views

How to minimize a numerical integration in python?

I need some help to minimize a numerical integration. It's about a classical problem in physics (hydrogen atom). It can be solved analytically but I need to solve it numerically in Python. We have an ...
1 vote
0 answers
58 views

3D Quadrature schemes with points on boundary

In one dimension there are two types of quadrature schemes. asymmetric rules like Newton-Cotes like formulas (Trapezodi, Simpson), and Clenshaw-Curtis place sampling points on boundary of the ...
0 votes
1 answer
66 views

What happens to the $O(\cdot)$ terms when we implement the Leapfrog Integration algorithm in a programming language?

Integration Algorithms The Verlet leapfrog algorithm is an economical version of the basic algorithm, in that it needs to store only one set of positions and one set of velocities for the atoms, and ...
0 votes
0 answers
122 views

Am I doing leapfrog integration correctly?

I wrote this minimal example to examine the Leapfrog integration algorithm. However, I am not sure it is the correct algorithm, and the listing is giving the correct output. Is this the Leapfrog ...
2 votes
2 answers
1k views

Understanding leapfrog integration algorithm

The leapfrog.cpp is an implementation of leapfrog integration algorithm where f() function is being integrated: leapfrog.cpp <...
0 votes
0 answers
25 views

Matching the limits of integration with the proper variables in a complicated case when using scipy.integrate.nquad

I need to integrate expressions containing powers of the function: ...
0 votes
1 answer
46 views

'Integral2' error in MATLAB for invalid integrand

Here is the code that I am trying to run: ...
2 votes
1 answer
115 views

How to numerically solve differential equations involving sines, cosines and inverses of the unknown function?

I'm very new to finite difference method and I am just introduced to methods of solving differential equation using finite difference method via sparse matrix method. I find that the main idea is to ...
0 votes
1 answer
121 views

finding weak form of nonlinear differential equation for FEM simulation

The following is the well-known nonlinear differential equation for director's distribution at static equilibrium in liquid crystal displays(LCD). I want to obtain weak form of the given differential ...
2 votes
0 answers
67 views

Order of local error when integrating ODE with discontinous derivatives

I'm working with ODEs, $$\dot{x} = f(x, t),$$ where the (higher) derivatives of the right-hand side have discontinuities. In particular, $f(x, t)$ is obtained by interpolation of discrete samples, and ...