# Questions tagged [numerical-methods]

Questions on numerical analysis/numerical methods; methods for approximately solving various problems that often do not admit exact solutions.

3,547 questions
0answers
6k views

0answers
145 views

### Implementation of a simulation of an incompressible Newtonian fluid with uniform density

Let $d\in\left\{2,3\right\}$ and $\Omega\subseteq\mathbb R^d$ be a bounded domain. I want to simulate an incompressible Newtonian fluid with uniform density $\rho$ and viscosity $\nu$. The evolution ...
0answers
258 views

### Two Matlab ODE solvers, two different results

I am solving a system of ODEs using Matlab. One particular set of parameters caused the solver to fail, so I worked my way through the different solvers Matlab provides. I was surprised to find that ...
0answers
212 views

### Numerically solving a non-linear PDE by an ODE on the Fourier coefficients

I need to solve numerically a PDE of the form $$u_t(x,t)=u_{xx}(x,t)+u_x(x,t)^2-a(x)u_x(x,t)-a_x(x)$$ with initial condition $u(x,0)=u_0(x)$. I can assume that both $u(\cdot,t)$ and $a(\cdot)$ are ...
0answers
338 views

### What’s the best way to cut an apple?

Take the apple in one hand, and the knife in the other. In the first cut, the apple is divided in two pieces: a small one that drops into the plate and a big one that is still hold with the hand. This ...
0answers
774 views

### Runge's phenomen: interpolation error using Chebyshev nodes oscillates

We're trying to approximate the Runge function $f(x) = \dfrac{1}{1+25x^2}$ using Chebyshev nodes. When calculating the interpolation error, using different degrees ranging from 0 to 50, we get the ...
0answers
621 views

### Simulating from a Multivariate Gaussian without Cholesky

I'd like to draw a sample from a multivariate Gaussian distribution $\mathcal{N}(\mu, \Sigma)$, where $\mu$ is the mean vector (can assume it to be $\boldsymbol{0}$), and $\Sigma$ is a sparse positive ...
0answers
74 views

### Numerically robust 2x2 determinant?

How can the determinant of a 2x2 matrix $$\begin{vmatrix} a & b \\ c & d \end{vmatrix} = a d - b c$$ be computed in floating point without suffering unnecessary catastrophic cancellation? ...
0answers
189 views

### Obtaining a positive definite covariance matrix of order statistics

Suppose $X_1,\dots,X_n$ are independent samples from some distribution with known absolutely continuous CDF $F:\mathbb{R}\rightarrow[0,1]$. Let $X_{(1)},\dots,X_{(n)}$ denote the order statistics, i.e....
0answers
98 views