# How to solve $\int_{a}^{b}\frac{r}{y+r} (\text{erfc}\left(\frac{y}{\sqrt{4G(t+T)}}\right)-\text{erfc}\left(\frac{y}{\sqrt{4Gt}}\right))dy$?

I have the following definite integral:

[Edit: I wrote the incorrect integrand] $$\int_{a}^{b}\frac{r}{y+r} \left(\text{erfc}\left(\frac{y}{\sqrt{4G(t+T)}}\right)-\text{erfc}\left(\frac{y}{\sqrt{4Gt}}\right) \right)dy,$$

where $$r,G,\text{and}\ T$$ are constants and positive, and $$\text{erfc}(\cdot)$$ is the complementary error function. $$t$$ is time and it can be considered to be a constant while solving the integral.

I think I have to apply integration by parts, but I honestly have no clue how to proceed.

How can I solve this integral? Is it even possible to obtain a closed-form solution?

• Where does this integral come from? What have you tried? Are all of these variables? What are their bounds? Is $y^2 / 4G(t+T)$ suppose to be $\frac{y^2} {4G(t+T)}$ or $\frac{y^2} {4} G(t+T)$ ? Commented Jun 10, 2022 at 1:18
• @DecarbonatedOdes 1. To explain where the integral comes from will require a lengthy explanation. Hence, I'll avoid it at the moment but I will see if I can put a brief description. 2. As I pointed out, I am clueless at the moment. Any direction will be useful. 3. I have updated the text to make it clear. Commented Jun 10, 2022 at 4:18

Simplifying the notation, you want to compute $$I=\int \frac{\text{erf}(\alpha y)}{y+r}\,dy=\int \frac{\text{erf}(x)}{x+\beta}\,dx\qquad\qquad\qquad (\beta =\alpha r)$$
Even if $$\beta=0$$, the result is quite complex $$\int \frac{\text{erf}(x)}{x}\,dx=\frac{2 }{\sqrt{\pi}}\,x \,\,\, _2F_2\left(\frac{1}{2},\frac{1}{2};\frac{3}{2},\frac{3}{2};-x^2\right)$$ If $$\beta$$ is small, you could use $$\int\frac{\text{erf}(x)}{x+\beta}\,dx=\sum_{n=0}^\infty (-1)^n \beta^n \int x^{-(n+1)}\,\text{erf}(x) \,dx$$ and, for $$n>1$$ $$\int x^{-(n+1)}\,\text{erf}(x) \,dx=\frac 1{1-n}\left(x^{1-n}\,\text{erf}(x) +\frac{1}{\sqrt{\pi }}\Gamma \left(1-\frac{n}{2},x^2\right)\right)$$
• Thank you so much. I guess I'll have to stay with numerical integration. On a curiosity note, how did you arrive at the summation of $\beta$ in the third equation? Commented Jun 10, 2022 at 8:09
• @nashynash. Taylor series around $\beta=0$ Commented Jun 10, 2022 at 8:29