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.

  • $\begingroup$ I think this was asked before. $\endgroup$ – Dr. belisarius Feb 13 '13 at 13:21
  • $\begingroup$ I was (and am) looking, but didn't find anything. Any hint on a keyword? $\endgroup$ – Sebastik Feb 13 '13 at 13:36
  • 2
    $\begingroup$ Please have a look at this. $\endgroup$ – b.gates.you.know.what Feb 13 '13 at 14:13
  • $\begingroup$ related mathematica.stackexchange.com/questions/6169/… $\endgroup$ – chris Feb 13 '13 at 14:27
  • $\begingroup$ @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. $\endgroup$ – Sebastik Feb 13 '13 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.