An alternative way to calculate $\int_{0}^{1}\frac{x}{x^2+(1-x)^2}\,dx$

146 Views Asked by At

Consider the integral $$ \int_{0}^{1}\frac{x}{x^2+(1-x)^2}\,dx $$ By noting that $$ \frac{x}{x^2+(1-x)^2}= \frac{2x-1}{(2x-1)^2+1}+\frac{1}{(2x-1)^2+1} $$ we deduce $$ \int\frac{x}{x^2+(1-x)^2}\,dx=\frac{\ln(x^2+(1-x)^2)}{4}+\frac{1}{2}\arctan(2x-1)+C, $$ so $$ \int_{0}^{1}\frac{x}{x^2+(1-x)^2}\,dx=\frac{\pi}{4}. $$ Is there an alternative way to calculate this integral?

2

There are 2 best solutions below

7
On BEST ANSWER

A trick: use $\int_0^1f(x)dx=\int_0^1f(1-x)dx$ to average two versions of your integral, reducing it to$$\tfrac12\left(\int_0^1\tfrac{xdx}{x^2+(1-x)^2}+\int_0^1\tfrac{(1-x)dx}{x^2+(1-x)^2}\right)=\tfrac12\int_0^1\tfrac{dx}{x^2+(1-x)^2}.$$

0
On

$$I=\int\frac{x}{x^2+(1-x)^2}\,dx=\int \frac{x}{2x^2-2x+1}\,dx=\int \frac{x}{2(x-a)(x-b)}\,dx$$ $$I=\frac 1{2(a-b)}\int \Big[\frac a{x-a}-\frac b{x-b} \Big]\,dx$$ $$I=\frac 1{2(a-b)}\Big[a \log(|x-a|)-b\log(|x-b|)\Big]$$ Now $a=\frac{1-i}2$, $b=\frac{1+i}2$, $$I=\frac {1-i}4\left(\log \left(x-\frac{1+i}{2}\right)+i \log \left(x-\frac{1-i}{2}\right)\right)$$

Use the bounds, play with the complex numbers to get the answer.