Most Popular

1500 questions
7
votes
2 answers

Numerical Integration with Convergence Factor with SciPy: Problem with Improper Integral

I would like to perform the numerical integration of an integral of the form $$ \int_{-\infty}^\infty e^{i \omega 0+} G(i \omega, \mathbf{v}) d \omega ,$$ or, using the symmetry $G(i\omega)^* = G(-i \omega)$, $$ \int_0^\infty \Re(e^{i \omega 0+} G(i…
7
votes
5 answers

Where do dense matrices occur?

I have primarily dealt with Dense Matrices arising from Electrodynamics. However, I am interested in knowing where else Dense Matrices occur. I am especially interested in knowing where they occur in: Discretization of…
Inquest
  • 3,394
  • 3
  • 26
  • 44
7
votes
3 answers

Can numpy.linalg.solve use back substitution when possible?

The question is if Python Numpy library can use back subsitution to solve Ax=b if possible, that is, if A is lower triangular? Do numerical linear algebra packages do this? I would think Numpy would detect the triangular state and use the proper…
BBSysDyn
  • 239
  • 2
  • 6
7
votes
2 answers

Minimizing 1D convex functions

I have a one dimensional convex function $$f : [a,b] \to \mathbb{R}$$ and want to find the minimum value $$\min_{a \le x \le b} f(x)$$ I know all derivatives of $f$, so the problem could easily be solved with any 1D minimization method even ignoring…
Geoffrey Irving
  • 3,969
  • 18
  • 41
7
votes
3 answers

Starting at a Given Basic Feasible Solution in the Simplex Method

I have a Simplex problem $ A y \ge b $, where some of the elements of $b$ are positive and some are negative, and thus setting $y = 0$ does not give a basic feasible solution (BFS). By previous work, however, I happen to know a specific BFS. How do…
Sam OT
  • 171
  • 5
7
votes
2 answers

Spectral Methods in time

I was reading up on Spectral Methods for PDEs. In all the descriptions I read, while the position component is approximated via a Fourier series or other methods, the time component is still discretized and solved via a time-step procedure (finite…
user7306
  • 73
  • 4
7
votes
1 answer

Implementation of convection scheme given by normalized variable diagram

In finite difference and finite volume methods, convection schemes (upwind, central, quick, ...) are usually shown in a normalized variable diagram. The diagram gives the normalized face variable as a function of the normalized upwind or downwind…
chris
  • 1,055
  • 7
  • 12
7
votes
2 answers

For a non-linear PDEs should the source term be discretised at $u_j$ or averaged over $(u_{j+1} + u_{j-1})/2$?

The non-linear Poisson equation in one-dimension, $$ 0 = \frac{\partial^2u}{\partial x^2} - f(u) $$ can be discretised as to give, $$ u_{j-1} -2u_{j} + u_{j+1} = h^2 f(u_j) $$ where $h$ is the step size of the mesh. Is there any advantage (in…
boyfarrell
  • 5,409
  • 3
  • 35
  • 67
7
votes
1 answer

full rank update to cholesky decomposition for multivariate normal distribution

This question is a specialization of full rank update to cholesky decomposition, to which I hope to get a more positive answer. When calculating the minus log of the multivariate normal distribution, the most difficult part is…
yannick
  • 375
  • 2
  • 9
7
votes
3 answers

FEM+DDM applied to scalar Helmholtz - necessity of lagrange multipliers?

I am seeking to understand DDM's and their application to Maxwell's equations, though I am settling for the scalar Helmholtz as a baby step. Unfortunately I have hit a conceptual snag that I could use help with. My model problem is a 2D rectangle…
rchilton1980
  • 4,862
  • 13
  • 22
7
votes
2 answers

Can one outperform Cramer's rule for the inversion of a 3 by 3 matrix

I know that for general matrices, Cramer's rule is far from ideal for the numerical computation of the matrix inverse. However, can it be outperformed in the case of a $3 \times 3$ matrix? One particular advantage is that the algorithm is…
7
votes
2 answers

adaptive Gauss-Kronrod quadrature with vector-valued integrand

So I'm trying to implement a Gauss-Kronrod adaptive quadrature. That is, I want to calculate $$\int_a^b f(x) dx = \sum_i f(x_i) w_i$$ where f(x) is evaluated at multiple points at once for efficiency. A key point to bear in mind is that $f$ is also…
baptiste
  • 223
  • 1
  • 9
7
votes
1 answer

Stable time step limits for Velocity-Verlet integration

I'm implementing a mass-spring solid mechanics solver and I'd like to use the Velocity-Verlet time integration scheme. However, I cannot find anything about the maximum stable time step -- either saying there is none and it's unconditionally stable…
tpg2114
  • 608
  • 6
  • 18
7
votes
3 answers

Largest negative eigenvalue

Is there an efficient way to find the largest negative eigenvalue of a matrix? The matrix in question is a Markov matrix. Computing the full spectrum of the matrix by decomposing it is not an acceptable solution.
nojka_kruva
  • 373
  • 1
  • 9
7
votes
1 answer

Solving for null space of a matrix with mkl LAPACK

I want to find a solution for $xA=0$, where $A$ is a square matrix. I know that most of the LAPACK routines solve for $Ax=b$. So I take $A^T$ as a, and set $b=0$. I have an additional restriction of $\Sigma x=1$.Thus, I add an additional row of…
ivan-k
  • 233
  • 1
  • 5