# How to calculate the numerical integral of the type $\int_a^b e^{x^2}dx$ efficiently?

How to calculate the numerical integral of the type $\int_a^b e^{x^2} dx$ efficiently?

My problem is:

we need to compute repeatly the integral:

$$\frac{\int_{|m|=1}mm \exp(B\mathbin:mm)\,dm}{\int_{|m|=1}\exp(B\mathbin:mm)\,dm}$$ where

1. $:$ means $A\mathbin:B=\sum_{i,j}A(i,j)*B(j,i)$
2. m is a 1 dimensional tensor, $m \in R^{1\times 3}$
3. B is a traceless diagonalizable two dimensional tensor.
4. $mm$ means the tensor product $m \otimes m$
-
Is the result meant to be a tensor, or a numeric value? (i.e., is the mm outside of the exponential a tensor product or a dot product?) –  Steven Stadnicki Mar 23 '12 at 18:11
It's a tensor. It's proved it can be diagonalized by the same matrix as B. –  BerSerK Mar 24 '12 at 9:40