Questions tagged [numerical-methods]

Algorithms which solve mathematical problems by means of numerical approximation (as opposed to symbolic computation).

Numerical methods include the study of algorithms that use numerical approximation (as opposed to general symbolic manipulations) for the problems of mathematical analysis (as distinguished from discrete mathematics). Numerical methods naturally find applications in all fields of science and engineering, and include implementations of many important aspects of computation including: solving ordinary and partial differential equations, numerical linear algebra, stochastic differential equations, Markov chains, and so forth.

Numerical methods use several approaches to calculate observables. For example, iterative methods that form successive approximations that converge to the exact solution only in a limit. A convergence test, often involving the residual, is specified in order to decide when a sufficiently accurate solution has (hopefully) been found. Examples include Newton's method, the bisection method, and Jacobi iteration. Another example is the use of discretization, a procedure that is used when continuous problems must sometimes be replaced by a discrete problem whose solution is known to approximate that of the continuous problem.

The field of numerical methods includes many sub-disciplines. Some of the major ones are:

  • Computing values of functions

  • Interpolation, extrapolation, and regression

  • Solving equations and systems of equations

  • Solving eigenvalue or singular value problems

  • Optimization

  • Evaluating integrals

  • Differential equations

2104 questions
0
votes
1 answer

How to compare similarity between two numeric columns

I have two large datasets Df1 & Df2 with numeric variables. I have to match each numeric variable in Df2 with its corresponding one in Df1. The column names are completly different in both datasets. I have already tried those two methods, with cn a…
yassine
  • 55
  • 8
0
votes
1 answer

Runge-Kutta method to numerically solve a second order non-linear differential equation - Octave

So I have this analytically unsolvable non-linear second order differential equation: x''=(-1/x)((x')²+gx-gh+ax') to which I've been trying to apply the Runge-Kutta method in Octave for a while without getting good results. This is the code I've…
0
votes
1 answer

Sign issues with Fo Householder Transformation QR Decomposition

I am having trouble implementing the QR Decomposition using the Householder Reflection algorithm. I am getting the right numbers for the decomposition but the signs are incorrect. I can't seem to troubleshoot what's causing this issue since I can't…
0
votes
2 answers

How does `points` work in `integrate.quad`?

I have an intricate function whose integration behavior I fail to make sense of: Does points specify intervals of possible singularities, or points? Whatever answer to above, how to explain 2.1 working but not 2? (also 1, 5, ...) Note that the only…
OverLordGoldDragon
  • 1
  • 9
  • 53
  • 101
0
votes
1 answer

Equations of motions vs Verlet: Collision ignored?

I initially coded my simulation using the standard equations of motions, but as is known, it ended up being quite unstable, even if it technically worked. If we take x(t) to be the position-function of the equations of motion, I calculated my "next"…
Fly
  • 810
  • 2
  • 9
  • 28
0
votes
0 answers

C++ fftw3: compute fft of the matrix rows stored as an 1D array

I'm trying to figure out, how can I calculate fft row by row of the following matrix (stored as an array) using fftw3: double signal[9] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 } to obtain the matrix with rows (pseudo-code) …
user11682080
0
votes
0 answers

Solve a second order ode using numpy

Consider this second order ODE ($D=A \frac{d^2x}{dt^2}+B \frac{dx}{dt}$): with A, B and D being constants How can I solve for x(t) using numpy? I have no idea how to even begin the problem
Thibaultofc
  • 29
  • 10
0
votes
1 answer

Convergence tests of Leapfrog method for vectorial wave equation in Python

Considering the following Leapfrog scheme used to discretize a vectorial wave equation with given initial conditions and periodic boundary conditions. I have implemented the scheme and now I want to make numerical convergence tests to show that the…
jerremaier
  • 23
  • 5
0
votes
1 answer

Automatically round arithmetic operations to eight decimals

I am doing some numerical analysis exercise where I need calculate solution of linear system using a specific algorithm. My answer differs from the answer of the book by some decimal places which I believe is due to rounding errors. Is there a way…
S L
  • 14,262
  • 17
  • 77
  • 116
0
votes
0 answers

Matlab Numeric Solvers outputting: Warning: Unable to find explicit solution

I have 9 equations and 9 unknowns that I need to solve for, but when I set up the code and run it I get the following: "Warning: Unable to find explicit solution. For options, see help. In sym/solve (line 317) In HW2_PartA (line 65) ans = Empty…
0
votes
1 answer

Matlab 'Function Unset/Unused'

I am new to Matlab, so there is a lot I do not understand; I have three questions, as followed: The biggest issue I have revolves around function B= upper_triang(A) where it states that it is 'a function unused'. Reading through the Matlab tooltip,…
UF6
  • 19
  • 3
0
votes
1 answer

What are the stopping conditions for computing infinite series in IEEE 754?

I'm doing error analysis, and I would like to know if there's a good rule of thumb for when to stop adding terms to an infinite sum, or multiplying terms to an infinite product. After reading a lot of numeric code, what I've derived so far is the…
Corbin
  • 1,530
  • 1
  • 9
  • 19
0
votes
0 answers

How to avoid an integrator in Matlab to step out the domain of valid solutions?

I use ode45 to solve a system of ODE's. The system describes a planar flow, for which I intend to draw trajectories. The flow covers a convex shape on a plane and theoretically never crosses its boundaries. The problem is that the ODE system…
curious_amateur
  • 220
  • 2
  • 8
0
votes
1 answer

boundary cells in cell-vertex finite volume

I have a naive question about boundary conditions in cell vertex (duel control volume) finite volume method. It looks like in cell vertex schemes the boundary cells are always half-cells. For example, with a uniform node spacing of 0.1 between 0 and…
epsilon
  • 1
  • 1
0
votes
1 answer

Create new data from the overlap of two polygons/polylines

If we have two vector data such as polygons or polylines (shown in graph below). How can we get find the overlap and create a new x,y vector data for this new shape? (or simply get the area of the new shape. import numpy as np import…
SGhaleb
  • 979
  • 1
  • 12
  • 30