How to evaluate the following (rather complex) integral between $x=0$ and $x=\infty$ I've found a function that describes the concentration function of a polymer around a sphere. I want to evaluate the following integral that contains that function but I'm not sure how to go about it. Can someone send me in the right direction/help me out. Thanks in advance.
$$\displaystyle\int_0^\infty4\pi(x+R)^2\left(1-\left(\frac{\frac{x}{R}+\tanh{\frac{x+p}{D}}}{\frac{x}{R}+1}\right)^2\right)dx$$
 A: For the antiderivative, if we expand the integrand (as @A-Level Student did), it is
$$4 \pi  R^2+8 \pi  R x-8 \pi  R x \tanh
   \left(\frac{p+x}{D}\right)-4 \pi  R^2 \tanh ^2\left(\frac{p+x}{D}\right)$$
For the difficult antiderivatives, let $x=Dt-p$ to face
$$I_1=\int x \tanh
   \left(\frac{p+x}{D}\right)\,dx=D^2\int  t \tanh (t)\,dt-D p \int\tanh (t)\,dt$$
$$\int  t \tanh (t)\,dt=\frac{1}{2} \left(t \left(t+2 \log \left(e^{-2
   t}+1\right)\right)-\text{Li}_2\left(-e^{-2 t}\right)\right)$$
$$\int   \tanh (t)\,dt=\log (\cosh (t))$$
$$I_2=\int\tanh ^2\left(\frac{p+x}{D}\right)\,dt=D \int\tanh ^2(t)\,dt=D (t-\tanh (t))$$
Now, we can easily go back to $x$ but the problem is to compute the limits.
Edit
Aking a CAS to compute the limits, the result for
$$I= \displaystyle\int_0^\infty4\pi(x+R)^2\left(1-\left(\frac{\frac{x}{R}+\tanh{\frac{x+p}{D}}}{\frac{x}{R}+1}\right)^2\right)dx$$ is
$$\frac{3 }{2 \pi  R}I=
D \left(\pi ^2 D+6 R\right)+12 p^2-3 D^2 \log ^2\left(1+e^{\frac{2 p}{D}}\right)-$$ $$6 D \left(D\,
   \text{Li}_2\left(\frac{1}{2} \left(\tanh
   \left(\frac{p}{D}\right)+1\right)\right)+R \tanh
   \left(\frac{p}{D}\right)\right)$$
A: Note that
$$\frac{\frac{x}{R}+\tanh{\frac{x+p}{D}}}{\frac{x}{R}+1}\equiv\frac{x+R\tanh\frac{x+p}{D}}{x+R}$$
$$\implies1-\left(\frac{\frac{x}{R}+\tanh{\frac{x+p}{D}}}{\frac{x}{R}+1}\right)^2\equiv1-\frac{x^2+2Rx\tanh\frac{x+p}{D}+R^2\tanh^2\frac{x+p}{D}}{(x+R)^2}$$
$$\equiv\frac{2Rx+R^2-2Rx\tanh{\frac{x+p}{D}}-R^2 \tanh^2{\frac{x+p}{D}}}{(x+R^2)}$$
$$\implies\pi(x+R)^2\left(1-\left(\frac{\frac{x}{R}+\tanh{\frac{x+p}{D}}}{\frac{x}{R}+1}\right)^2\right)\equiv\pi(x+R)^2\frac{2Rx+R^2-2Rx\tanh{\frac{x+p}{D}}-R^2 \tanh^2{\frac{x+p}{D}}}{(x+R^2)}$$
which simplifies nicely, and then the integral is easy to evaluate.
If you need anymore help please ask :)
