# Is there a way to teach integrate new solutions?

I have an integral which I can solve, but integrate cannot:

Integrate[ Exp[-b^2 m^2 x^2] Erf[c m (x+y)], {x, -Infinity, Infinity},
Assumptions -> b > 0 && c > 0 && m > 0 && y \[Element] Reals]


The solution is

Sqrt[Pi]/(b m) Erf[Sqrt[b^2/(b^2+c^2)] c m y]


but Mathematica only returns the input (at least in version 7 which I am using).

Now I have a calculation where this type of integral appears very often and I want integrate to recognize it and solve it. Using replacements does not work because it often appears in combinations that don't match the pattern directly, e.g. something like

Exp[-U1^2 m^2 - (X1^2 + X2^2) n^2)] n^2 m^3
* (Erf[(U1 + V1) n] - Erf[(U1 +V1- X1) n])(-(2/Sqrt[m^2 + n^2])
+ Erfc[U1 n]/Sqrt[m^2 + n^2] + Erfc[V1 n]/Sqrt[2 m^2 + n^2])


where integration would be over X1, U1 and V1.

If I try replacements on this, Mathematica does not recognize that the above pattern is hidden in this expression. Of course I can always do it by hand, but this is cumbersome. The most elegant solution would be to teach integrate how to do this, but I would also be happy with a newly defined function that recognizes the pattern and replaces it by the solution.

-
I think this was asked before. –  belisarius Feb 13 '13 at 13:21
I was (and am) looking, but didn't find anything. Any hint on a keyword? –  Sebastik Feb 13 '13 at 13:36
Please have a look at this. –  b.gatessucks Feb 13 '13 at 14:13
–  chris Feb 13 '13 at 14:27
@b.gatessucks This is nice for the direct function, but like replacements it fails once the pattern is not met exactly, e.g. it is multiplied by a constant, or a function (that Integrate knows how to do) is added. –  Sebastik Feb 13 '13 at 14:58