I am having a problem with an excersice of calculating the integral

I= $\int_{0}^{a}\frac{1}{1+f(x)}\,dx$

and we know that $f(x)f(a-x)=1$ , $a>0$ and $f(x)$ is continous and positive on the interval $[0,a]$

i've tried manipulating the expression with the fact that $f(x)= \ \frac{1}{f(a-x)} $ in order to find something to cancel or something that makes me solve the integral "nicely"

However after 20 minutes i have no idea what to do, or what i am missing

so if anyone could give me a tip or point me in the right direction i would appreciate it


3 Answers 3


$$ \int_0^a\frac{1}{1+f(x)}\,dx = \int_0^a\frac{1}{1+f(a-x)}\,dx = \int_0^a\frac{1}{1+\frac 1{f(x)}}\,dx = \int_0^a\frac{f(x)}{1+f(x)}\,dx, $$ where in the first transformation we changed variables $x = a-y$. Hence, $$ 2I = I + I = \int_0^a\frac{1}{1+f(x)}\,dx + \int_0^a\frac{f(x)}{1+f(x)}\,dx = \int_0^a1\,dx = a. $$ Thus, $I = \frac a2$.

  • $\begingroup$ I don't understand why $\int_0^a\frac{1}{1+f(x)}\,dx = \int_0^a\frac{1}{1+f(a-x)}\,dx$ because we don't got $f(x)=f(a-x)$ we got $f(x)=1/f(a-x)$. Help? $\endgroup$ Mar 5, 2021 at 23:32
  • $\begingroup$ @PrimeMover Change of variables. I edited my answer. $\endgroup$
    – amsmath
    Mar 5, 2021 at 23:33
  • $\begingroup$ I'm still a bit slow, wouldn't that make the second integral negative? $dx = -dy$ and all that? $\endgroup$ Mar 5, 2021 at 23:36
  • $\begingroup$ @PrimeMover No. Watch the integral boundaries. $-\int_a^0 = \int_0^a$ $\endgroup$
    – amsmath
    Mar 5, 2021 at 23:40
  • 1
    $\begingroup$ Oh right okay no worries $\endgroup$ Mar 5, 2021 at 23:42

If the answer is independent of $f(x)$, then you can choose one consistent with the stated conditions, e.g., $f(x)=1$, in which case we find:

$$\int\limits_{x=0}^a \frac{1}{1 + 1} dx = \frac{a}{2}.$$

  • 2
    $\begingroup$ I upvoted this answer, but we need to be careful. The question does not actually say that the answer is independent of $f$. $\endgroup$ Mar 6, 2021 at 8:53
  • 1
    $\begingroup$ @BrianDrake: True enough, but one can say that $a/2$ is one valid solution! $\endgroup$ Mar 6, 2021 at 18:15

Same answer, different approach. By symmetry, $$ \begin{align} \int_0^a\frac1{1+f(x)}\,\mathrm{d}x &=\frac12\left(\int_0^a\frac1{1+f(x)}\,\mathrm{d}x+\int_0^a\frac1{1+f(a-x)}\,\mathrm{d}x\right)\tag1\\ &=\frac12\int_0^a\left(\frac1{1+f(x)}+\frac1{1+f(a-x)}\right)\,\mathrm{d}x\tag2\\ &=\frac12\int_0^a\frac{\color{#C00}{1}+f(x)+\color{#C00}{1}+f(a-x)}{\color{#090}{1}+f(x)+f(a-x)+\color{#090}{f(x)f(a-x)}}\,\mathrm{d}x\tag3\\ &=\frac12\int_0^a\frac{\color{#C00}{2}+f(x)+f(a-x)}{\color{#090}{2}+f(x)+f(a-x)}\,\mathrm{d}x\tag4\\[3pt] &=\frac a2\tag5 \end{align} $$ Explanation:
$(1)$: by substituting $x\mapsto a-x$, we get $\int_0^a\frac1{1+f(x)}\,\mathrm{d}x=\int_0^a\frac1{1+f(a-x)}\,\mathrm{d}x$
$\phantom{\text{(1):}}$ average the two
$(2)$: sum of integrals is the integral of the sum
$(3)$: $\frac1u+\frac1v=\frac{u+v}{uv}$
$(4)$: the sum of the integrands is $1$ since $f(x)f(a-x)=1$
$(5)$: integrate

  • $\begingroup$ I don't understand why you are adding, or why did you separate the original integral into to with the second one being the same but with $$f(a-x)$$ would'nt that just change the value? $\endgroup$ Mar 5, 2021 at 23:47
  • $\begingroup$ Again: Change of variables. Or as robjohn likes to say: "By symmetry". ;-) $\endgroup$
    – amsmath
    Mar 5, 2021 at 23:56
  • $\begingroup$ @Ramirogenta: substituting $x\mapsto a-x$, if done consistently, leaves the integral unchanged. If you prefer, you can add a step by substituting $x=a-y$ then another substituting $y=x$. $\endgroup$
    – robjohn
    Mar 6, 2021 at 0:04
  • $\begingroup$ You wrote “the sum of the integrands is $1$”, which is the result of equation $(3)$. Perhaps it would be better to explain the source of equation $(3)$, like you did for the other equations. In this case, it involves $f(x)f(a-x)=1$. $\endgroup$ Mar 6, 2021 at 8:58
  • $\begingroup$ @BrianDrake: I'm sorry, I have added a step that I had previously thought unnecessary. I guess I was wrong. $\endgroup$
    – robjohn
    Mar 6, 2021 at 10:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .