# Understanding Rubi's result in light of MMA's Integrate

I've been experimenting/playing with the Rubi 4.14.1 package for MMA, see here. Unfortunately I have not been able to find too much documentation.

For the following function of c I was surprised MMA returned an answer, while Rubi returned... well I don't quite know how to interpret what was produced. I'd appreciate any light you can shed

fc = -(1/2) Erf[((2 m - k^2) - 2 Log[c + b] + 2 Log[a])/(2 Sqrt k)] - 1/2
fcresmma =
Assuming[m \[Element] Reals && k > 0 && c >= 0 && a > 0 && b > 0,
Integrate[fc, c]]

fcres = Assuming[
m \[Element] Reals && k > 0 && c >= 0 && a > 0 && b > 0, Int[fc, c]]


The MMA (11.2) results is

1/2 (-c - (b + c) Erf[(-k^2 + 2 m + 2 Log[a] - 2 Log[b + c])/( 2 Sqrt k)] +
a E^m Erf[(k^2 + 2 m + 2 Log[a] - 2 Log[b + c])/(2 Sqrt k)])


The Rubi result is:

-(c/2) - Dist[1/2, Subst[ Int[ Erf[
(-k^2 (1 - (2 (m + Log[a]))/k^2) - 2 Log[c])/(2 Sqrt k)
], c], c, b + c], c]


Update: Confirmed and Resolved in Rubi 4.14.3

... Rubi 4.14.3 is able to integrate any expression of this form including when m is 0, numeric or symbolic. In fact, it can integrate any expression of the form

(e x)^m F[d (a+b log(c x^n))]

where F is Erf, Erfc, Erfi, FresnelS, FresnelC, ExpIntegralEi, SinIntegral, CosIntegral, SinhIntegral, CoshIntegral or Gamma (incomplete).

• Rubi can now integrate this. I'm guessing you made Albert Rich aware of this, and he then added the needed rule. Apr 13, 2018 at 23:57
• Also, note that there's no point in using Assuming w/ Rubi, since it's not designed to accept domain restrictions, and is thus unaffected by them (you can test this yourself). According to Albert Rich, "The antiderivatives Rubi produces are valid throughout the complex plane. That is the derivative of the antiderivative equals the integrand for all real and complex values of the integration variable and the integrand’s parameters...Rubi does not make use of domain restriction assumptions other than Mathematica’s use of them to simplify expressions Rubi sees or produces." Apr 13, 2018 at 23:57
• @theorist: Thanks I'd lost track of this. Updated the question to show the status Apr 15, 2018 at 0:00

When Rubi return Dist and Subts calls in its final output, it means it has no rules for this part.

This is assuming you already did

 ShowSteps = False;


At the start before calling Int. Otherwise Rubi will show only one step at a time, waiting for user to evaluate the last output manually.

But in this case, Rubi just did not have a rule to complete this integration.

 ClearAll[m,c,k,a,b]
fc=-(1/2) Erf[((2 m-k^2)-2 Log[c+b]+2 Log[a])/(2 Sqrt k)]-1/2;
ShowSteps = False;
Int[fc,c] To see the actual rules invoked, you can do use this function, by Albert Rich

StepInt[u_,x_Symbol]:=Block[{ShowSteps=True},
FixedPoint[Function[Print[#];
ReplaceAll[#,{Defer[Int]->Int,Defer[Dist]->Dist,
Defer[Subst]->Subst}]],Int[u,x]];
Null]


And now you call it as follows

  StepInt[fc,c]


It will display the rule numbers used in each internal step So Rubi did not know how to integrate the Erf in there.

• Is there any etiquette around reporting these examples? Do you know where or how? Dec 23, 2017 at 8:53
• @Hedgehog You could either contact Albert Rich, the Author of Rubi directly via email, or sometimes I just post questions about Rubi at sci.math.symbolic (which you can access via google groups also). Albert reads that news group as well. groups.google.com/forum/#!forum/sci.math.symbolic Dec 23, 2017 at 9:19
• Thanks @Nasser. Apologies for not getting back - got swamped. Your contact suggestions resulted in a fix released in Rubi 4.14.3 Apr 14, 2018 at 23:59
• @Hedgehog fyi, Rubi current version is 4.14.8. Latest intergation tests are here Apr 15, 2018 at 9:34