The integration-by-parts formula is
∫u v' dx = uv - ∫u' v dx
so with u =erf(x), u' = 2e-x²/√π, v' = 1, and v = x, you get
∫erf(x) dx = x erf(x) - (2/√π) ∫xe-x² dx = x erf(x) + (1/√π) e-x² ,
where I used a u-substitution (u=e-x²) to evaluate the right-hand-side integral.
Now just evaluate this from 0 to t:
∫0t erf(x) dx = t erf(t) + (1/√π) (e-t² - 1) .

Andre W.
tutor
Judith,
You only do integration by parts once. The new integral you get, ∫xe-x² dx, can be solved with the u-substitution (no v's!):
u = e-x², du = -2x e-x² ⇒ ∫xe-x² dx = -(1/2) ∫du = -(1/2) u = -(1/2) e-x².
Note that the (-1/2) then cancels with the (-2) out front.
Report
01/30/14
Judith B.
The instructions require me to do it with integration by parts.
Report
01/30/14

Andre W.
tutor
Which we did, when we used the formula at the beginning : ∫erf(x) dx = x erf(x) - (2/√π) ∫xe-x² dx. This is the integration-by-parts part! :)
Report
01/30/14
Judith B.
Right, and I will go with it if I have to but I don't believe that's what is required. They taught the value of integrating with derivatives to avoid complicated, repeated integration by parts. I think they are trying to drive that point home.
Report
01/30/14

Andre W.
tutor
That's exactly what we did: we integrated the derivative of e-x², thereby avoiding a second integration by parts.
Report
01/30/14
Judith B.
I appreciate your help!
Report
01/30/14
Judith B.
01/30/14