Function involving calculus Let $p(x)$ be a function defined on $\mathbb{R}$ such that $p'(x)=p'(1-x)$, for all $x$ belongs to $[0,1]$, $p(0)=1, p(1)= 41$.
Find $\int_{0}^{1}p(x)dx$
link
 A: $$p'(x) = p'(1-x)$$
$$\implies p(x) = -p(1-x) + c$$
$$\implies p(0) = -p(1) + c$$
$$\implies c = p(0) + p(1) = 42$$
Thus we now have that $p(x) = -p(1-x) + 42$. Now let's compute the integral using some tricks
$$\int_{0}^{1}{p(x)dx} = \int_{0}^{1\over2}{p(x)dx} + \int_{1\over2}^{1}{p(x)dx}$$
Using the identity we established earlier $p(x) = -p(1-x) + 42$, we derive
$$= \int_{0}^{1\over2}{p(x)dx} + \int_{1\over2}^{1}{(-p(1-x) + 42)dx}$$
$$= \int_{0}^{1\over2}{p(x)dx} + \int_{1\over2}^{1}{-p(1-x)dx} + 42\int_{1\over2}^{1}dx$$
$$= \int_{0}^{1\over2}{p(x)dx} + \int_{1\over2}^{1}{-p(1-x)dx} + 21$$
Now observe the second term in the equation above $\int_{1\over2}^{1}{-p(1-x)dx}$.
This is just the sum $-(p(0.5) + p(0.5 - 0.00\dots 1) + \dots + p(0)) = -\int_{0}^{1\over2}{p(x)dx}$.  Write this into the earlier equation we get
$$= 21 + \int_{0}^{1\over2}{p(x)dx} - \int_{0}^{1\over2}{p(x)dx}$$
$$ = 21 $$
A: Put $g(x):=p(x)+p(1-x)$. Then $g'(x)=p'(x)-p'(1-x)\equiv0$, hence $g(x)\equiv g(0)=42$. It follows that
$$\int_0^1 p(x)={1\over2}\int_0^1\bigl(p(x)+p(1-x)\bigr)\>dx={1\over2}\int_0^1 g(x)\>dx=21\ .$$
