Questions tagged [numerical-methods]
Algorithms which solve mathematical problems by means of numerical approximation (as opposed to symbolic computation).
219 questions
-2
votes
0
answers
37
views
Is this comb-filtering behavior genuine or a result of aliasing? [closed]
I'm solving a non-linear ODE with some input signal.
The signals consist mostly 0, with 1 at a given frequency up to a given ...
2
votes
2
answers
96
views
Heat Diffusion Equation Solver
I'm implementing a numerical solver for the 1D diffusion (heat) equation using an iterative method. The initial temperature distribution is a Gaussian profile, which should theoretically smooth out ...
3
votes
2
answers
576
views
Accuracy issues with float-based cosine approximation using Taylor series in Java
I'm working on a Java assignment where I must implement the cosine function using only basic arithmetic operations (addition, subtraction, multiplication, division) and no built-in math functions, ...
1
vote
0
answers
71
views
Mismatch Between Frequency Response and Eigenvalue-Based Natural Frequency in MATLAB for a 5-DOF System with Frequency-Dependent Stiffness
I am working with a mechanical system that has five degrees of freedom (a composite plate), and I am trying to compute its frequency response, time-domain response, and natural frequencies.
I have ...
3
votes
2
answers
198
views
Numerical integration using Gauss and trapezoidal methods [closed]
I have written a code that performs numerical integrations—one using the Gauss method and the other using the trapezoidal method. For the Gauss method, I have five separate text files containing the ...
6
votes
1
answer
458
views
Implementing a joint differential equation and eigenvalue solver
I've written a Python script to solve a system of coupled differential equations and then use the results to solve an eigenvalue problem. The full problem is:
\$\frac{d^2}{dr^2} K(r) = \frac{K(r)}{r^2}...
2
votes
0
answers
64
views
N-Body simulator in Rust implementing Barnes Hut and Leapfrog
I have written a N-body simulator in Rust implementing Barnes Hut algorithm and Leapfrog integrator.
My code seems to work fine, but I'd like to review on techniques which can improve performance ...
1
vote
1
answer
302
views
Implementing Preconditioned conjugate gradient
I have implemented the Preconditioned Conjugate Gradient (PCG) method for solving a system of linear equations in Python and I would appreciate it if someone could verify its correctness since I am ...
2
votes
1
answer
218
views
Minimalistic implementation of Leapfrog integration algorithm
Please review this C++ listing of an implementation of Leapfrog integration.
Was the algorithm implemented correctly?
...
3
votes
1
answer
331
views
Finite difference estimation of partial derivatives for arbitrary grids in python
I am currently working on testing some codes on python to solve differential equations by finite differences, but some problems and equations i am dealing with are:
Too big to keep manually writing ...
5
votes
1
answer
695
views
Runge-Kutta 4 implementation in Rust
This is a toy problem. I want to try using Rust for numerical modeling, but I found zero tutorials for this kind of stuff.
I also just started learning Rust yesterday, so please bear with me.
Usually ...
2
votes
1
answer
276
views
Integration loop over multiple doping and temperature levels
I want to perform some calculations on a large dataset. The code can be found below, where I want to calculate the values for 'results_nr' over a large loop (1000 x 910) values. Can you help me out ...
0
votes
1
answer
281
views
Parallelise numerical integration with OpenMP in C++
I would like to parallelise with OpenMP a one-dimensional integral using the integrate() function implemented in the Boost library. I found a rather obscure ...
7
votes
7
answers
1k
views
A probability distribution function, to be called repeatedly during numerical integration
I am trying to speed up as much a possible this function in C++. As I explained in another post, Implementing multidimensional integral for a custom function in C++, this function will be used inside ...
2
votes
3
answers
226
views
Calculating square roots using binary search
I'm trying to find the square root of a number (num) using binary search in Rust. I'm new to Rust, but I've done quite a bit of programming in other languages, ...