Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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.

share|improve this question
    
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
1  
Please have a look at this. –  b.gatessucks Feb 13 '13 at 14:13
    
related mathematica.stackexchange.com/questions/6169/… –  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
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.