1

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?

Kyan Cheung
  • 3,184
boaz
  • 4,783
  • How do you "notice that" $ \frac{x}{x^2+(1-x)^2}= \frac{2x-1}{(2x-1)^2+1}+\frac{1}{(2x-1)^2+1} $? Unless that was given and that's why you were looking for an alternate method? – user71207 Apr 03 '21 at 03:57

2 Answers2

4

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}.$$

J.G.
  • 115,835
2

$$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.