# Questions tagged [numerics]

The tag has no usage guidance.

632 questions
Filter by
Sorted by
Tagged with
18 views

### How to solve three coupled differential equations in python using RK-4 and shooting method? or using solve_bvp?

I am trying to solve three coupled differential equations in Python. I am using RK-4 techniques with Shooting method. I am trying to plot the f and N functions. ...
147 views

### Eigenvalue algorithms for small matrices

I want to write a numerical library (in C++) that provides the eigenvalues of small matrices ($3\times3$–$20\times20$) for my line of work. I read a little bit of literature and the consensus is ...
• 143
82 views

103 views

### From Runge-Kutta Butcher tableau to general linear methods matrices?

I am trying to understand how the relationship between Butcher tables for Runge-Kutta methods and their generalization to general linear methods matrices (by Butcher also). Runge-Kutta methods can be ...
• 343
53 views

### Prof A. Stanoyevitch's finite difference based PDE matlab code

Where can one find Prof A. Stanoyevitch's finite difference based PDE matlab code? They have a book on such a topic but can't find the accompanying code. Is it well received? It's not commonly talked ...
• 317
75 views

### Best transform of matrix to make it efficient for shift-then-invert?

I am using ARPACK to find the smallest eigenvalue of a matrix. I use the shift and invert method. That is, looking for the largest eigenvalue of $$(A-\sigma I)^{-1}.$$ However, I do not know $\sigma$...
• 161
1 vote
74 views

### Stability of 4-bit matrix multiplication

To use newer accelerators like this, I need to perform matmul in 4-bit precision. How do I tell whether this operation is stable? Wondering if there well common heuristics in terms of properties of ...
• 2,695
193 views

### Why for $A^T A$, it is faster to computer the eigenvalues of its inverse than itself?

I have written the following code in MATLAB. I also observe the same effect in Arnoldi iteration in ARPACK in C. ...
• 161
1 vote
86 views

### Ways to speed up Lanczos algorithm when we have a very dense cluster of many eigenvalues?

Lanczos algorithm can be used to find the largest/smallest eigenvalues of matrices. I am trying to find a good library in C/C++/Rust for finding the smallest singular value (or eigenvalue). I have ...
• 161
95 views

### Prof Lawrence Shampine's hpde matlab code

Where can one find Prof Lawrence Shampine's hpde matlab code? Is it well received? It's not commonly talked about.
• 317
4k views

### C, Julia, Python, Maxima, Mathematica, ChatGPT and numerical errors

I am completely stunned how numerical errors can diverge for so innocent programs. In Python 3.11.7 the program ...
• 478
279 views

### How to evaluate the points near/at the boundary when using Richardson extrapolation for improved accuracy of a derivative

If we want to improve the accuracy of our numerical estimation of a derivative, we can use Richardson extrapolation. The method is very beneficial when using a centered difference scheme and the ...
112 views

### Gradient descent for solving polynomial equations while encouraging variables to be nonzero

I would like to use gradient descent to "randomly sample" solutions to a set of homogeneous polynomial equations. Because the equations are homogeneous, setting all variables to 0 is a valid ...
• 123
1 vote
113 views

### How can you calculate catastrophic cancellation error?

I'm trying to follow the wikipedia page about catastrophic cancellation but I've hit something that just doesn't make sense to me. They say that subtraction can amplify existing approximation errors (...
• 149
74 views

### Why using large bound to supplement inifinity in interior point method can be bad

Here in the documentation of mosek (https://docs.mosek.com/latest/pythonfusion/debugging-numerical.html) we see: Never use a very large number as replacement for infinity . Instead define the ...
• 149
48 views

• 101
111 views