I have a matrix $\eta$ that should be Positive Definite but it is not. Is there a numerical method to gently push my non-Positive Definite matrix back into the set of Positive Definite matrices?
Background
I need to evaluate the following integral: $ I=\int_{\mathcal{D}}\phi(\vec{x})\psi(\vec{x}) d\vec{x}^2 $ where both functions are real and my vector notation is just implying integration in a 2D plane.
I expand my functions into a set of basis functions ($B_{j}(\vec{x})$) that are not orthogonal. Why not orthogonal? Because $\mathcal{D}$ is arbitrary and once a I have a $\mathcal{D}$ I only want to spend computer time once to do numerical integrations but be able to calculate an unlimited number of $I$ values quickly. Also some times I'm given the basis functions that I must work with.
I write: $ \phi(\vec{x})\approx \sum_{j=1}^{n} a_{J} B_{j}(\vec{x}) $ and $ \psi(\vec{x})\approx \sum_{j=1}^{n} b_{J} B_{j}(\vec{x}) $ This lets me think of my functions as vectors: $ \phi(\vec{x})\rightarrow \left
Some properties to keep in mind:
- $\eta$ is symmetric $\eta^{T}=\eta$
- $\eta$ is of full rank but the singular values span many orders of magnitude.
- $\eta$ is Positive Definite in theory (Challenge this statement if you think it is wrong.)
The Problem
Because of numerical integration errors $\eta$ is not Positive Definite but it does have full rank.
The Question
Is there a numerical method to gently push my non-Positive Definite matrix back into the set of Positive Definite matrices?