I am trying to numerically integrate product of two gaussian functions $e^{-x^2/2}$ and $e^{-(x-2)^2/2}$ from -5 to 5. These two gaussian functions are two PDFs to denote the probability of two independent observables, which are independently normalized to 1. I know that the product of two gaussian PDFs must be a guassian centered at the midpoint of them. However, the resulting gaussian does not seem to account for the entire area that is present within the overlapping region. The procedure that I followed to integrate the product was as follows
- Evaluate both the functions at $x$, and multiply them together to find the value of the integral at $x$.
- The values are then summed to get the final integral.
I understand that I am missing something, but I am unable to figure out the mistake. Any pointers would be much appreciated.