How to solve$\int_0^a\frac{(a-x)^{n-1}}{(a+x)^{n+1}}\, dx$? How can I solve the following integral:
$$\int_0^a\frac{(a-x)^{n-1}}{(a+x)^{n+1}}\, dx.$$ I'm not posting my work because I don't even know where to start with this integral.
 A: Assuming $a>0$, by the substitution $x=az$ the given integral equals
$$ \frac{1}{a}\int_{0}^{1}\frac{(1-x)^{n-1}}{(1+x)^{n+1}}\,dx \stackrel{\frac{1-x}{1+x}\mapsto z}{=}\frac{1}{2a}\int_{0}^{1}z^{n-1}\,dz=\color{red}{\frac{1}{2an}}.$$
A: As $0\le x\le a,$ let $x=a\cos2t, dx=2a\sin2t\ dt$
$a-x=2a\sin^2t, a+x=2a\cos^2t$
$$\int_0^a\frac{(a-x)^{n-1}}{(a+x)^{n+1}} dx=\dfrac{(2a)^{n-1}\cdot4a}{(2a)^{n+1}}\int_{\pi/4}^0\dfrac{\sin^{2n-2}t\sin t\cos t}{\cos^{2n+2}t}dt$$
Now, $$\int\dfrac{\sin^{2n-2}t\sin t\cos t}{\cos^{2n+2}t}dt=\int\tan^{2n-1}t\sec^2t\ dt=?$$
A: Integrating by parts:
$$I_n=\int_0^a\frac{(a-x)^{n-1}}{(a+x)^{n+1}}\, dx = $$
$$(a-x)^{n-1}\cdot \left(-\frac{1}{n(a+x)^n}\right) \bigg |_0^a-\int_0^a \left(-\frac{1}{n(a+x)^n}\right)\cdot (-1)(n-1)(a-x)^{n-2}dx=$$
$$\frac{1}{na}-\frac{n-1}{n} \cdot I_{n-1}, \ \ \ I_1=\frac{1}{2a}.$$
$$I_2=\frac{1}{2a}-\frac{1}{2}I_1=\frac{1}{2a}-\frac{1}{4a}=\frac{1}{4a}.$$
$$I_3=\frac{1}{3a}-\frac{2}{3}I_2=\frac{1}{3a}-\frac{1}{6a}=\frac{1}{6a}.$$
$$\cdots$$
$$I_n=\frac{1}{2an}.$$
A: $$\int_0^a\frac{(a-x)^{n-1}}{(a+x)^{n+1}}\ dx = 
  \int_0^a\left(\frac{a-x}{a+x}\right)^{n-1}(a+x)^{-2}\ dx$$ 
$$I = \int_0^a\left(\frac{2a}{a+x}-1\right)^{n-1}(a+x)^{-2}\ dx$$
$$u = \frac{2a}{a+x}-1,\ \ du = -2a(a+x)^{-2}dx,\ \ u(0) = 1,\ \ u(a) = 0$$
$$I = \frac{1}{2a}\int_0^1 u^{n-1}\ du = \frac1{2an}$$
