# Finding the following integral.

• $f$ is continuous function $\forall x\in[0,a]$ $(a>0)$
• $f(x)+f(a-x)\neq 0$ $\forall x\in[0,a]$
Find the following integral: $$\int^a_0\frac{f(x)}{f(x)+f(a-x)}dx$$
So I'm thinking:
$y:=a-x$, then $$\int^a_0\frac{f(x)}{f(x)+f(a-x)}dx=\int^a_0\frac{f(a-y)}{f(a-y)+f(y)}d(a-y)=\int^a_0\frac{f(a-y)+f(y)-f(y)}{f(a-y)+f(y)}d(a-y)=\int^a_0\frac{f(a-y)+f(y)}{f(a-y)+f(y)}d(a-y)-\int^a_0\frac{f(y)}{f(a-y)+f(y)}d(a-y)= (1)$$ Now let's take $d(a-y)=-dy$ $$(1)=-\int^a_01dy+\int^a_0\frac{f(y)}{f(a-y)+f(y)}d(y)=-(y)\bigg|^a_0+\int^a_0\frac{f(y)}{f(a-y)+f(y)}d(y)=(2)$$ Now, should I replace $y=a-x$ and get $$(2)=-a - \int^a_0\frac{f(a-x)}{f(x)+f(a-x)}dx$$
And finally combine the first and last equation? Or how should act? I'm stuck with at the last part. How should I finish it?

hint

Let $I_1$ be the first integral.

by the substitution $x=a-t$, it becomes $I_2$.

$$I_1=-\int_a^0\frac {f (a-t)}{f (a-t)+f (t)}dt=I_2$$

Observe that

$$I_1+I_2=2I_1=a$$

• I'm trying to do something similar. But I don't quite get it... how $I_2$ becomes $I_1$? Sep 19, 2017 at 20:48
• @pls_halp Look now please. Sep 19, 2017 at 20:52
• $$\underbrace{\int^a_0\frac{f(x)}{f(x)+f(a-x)}dx}_{I_1}\overset{y:=a-x}{=}\underbrace{-\int^a_0\frac{f(a-y)}{f(a-y)+f(y)}dy}_{I_2}$$ $$I_2=-\int^a_0\frac{f(a-y)+f(y)}{f(a-y)+f(y)}dy+\int^a_0\frac{f(y)}{f(a-y)+f(y)}dy=-a+(?)$$ Now how is $$I_1+I_2\overset{?}{=}2I_1\overset{?}{=}a$$ Sep 19, 2017 at 21:14

$I=\int^a_0\frac{f(x)}{f(x)+f(a-x)}dx=\int^a_0\frac{f(x)+f(a-x)-f(a-x)}{f(x)+f(a-x)}dx$

$\int^a_0\frac{f(x)+f(a-x)-f(a-x)}{f(x)+f(a-x)}dx=\int^a_0dx-\int^a_0\frac{f(a-x)}{f(x)+f(a-x)}dx$

$\int^a_0dx+\int^0_a\frac{f(z)}{f(a-z)+f(z)}dz=a-\int^a_0\frac{f(z)}{f(a-z)+f(z)}dz=a-I$

$2I=a$

• Why is $\int^a_0 \frac{f(z)}{f(a-z)+f(z)}dz=I ?$ Sep 19, 2017 at 21:32
• it's the same juste the variable that changes but thats all...you can use x again if you want...it's an integral that will be a function of a so z is just a variable for integration thats all play no role outside the integrand Sep 19, 2017 at 21:33
• @pls_halp you should try for example to evaluate this integral $\int_0^1 \cos x dx$ and $\int_0^1 \cos z dz$ Sep 19, 2017 at 21:37
• Thank you! I thought of that, but for some reason it didn't seem logical. Maybe I thought that, as I took $y:=a-x$, then I should replace $y$ back the same way. Sep 19, 2017 at 21:41
• @pls_halp the variable plays no role outside the integrand so use x, z t the integral looks the same and has the same value once evaluated...I know it's a bit difficult the first time...but try to evaluate some simple definite integrals changing the variable...the result will always be the same. Sep 19, 2017 at 21:43