if $g(x)$ is a continous function defined in the interval $[2 \:\: 10]$ such that $$\left|\frac{g(x)-g(y)}{x-y}\right| \le 1$$ Then find Maximum value of $\left|\int_{2}^{10}g(x)dx-8g(a)\right|$ and find Maximum occurs at which value of $a$
My try:
Taking $\lim_{x \to y}$ both sides we get
$$|g'(x)|\le 1$$ $\implies$
$$-1\le g'(x) \le 1$$ $\implies$
$$-x \le g(x) \le x$$ $\implies$
$$\int_{2}^{10}-x \le \int_{2}^{10} g(x) \le \int_{2}^{10}x$$ $\implies$
$$-48 \le \int_{2}^{10} g(x) \le 48$$
Can i have clue here?
Rewrite the expression in the absolute value as $$\int_2^{10}(g(x)-g(a ))dx .$$
Now, set $f(x)=g(x)-g(a)$. So the question is equivalent to, find the max of $\left |\int_2^{10}f(x)dx \right |$, when $ \left | \frac{f(x)-f(y)}{x-y}\right | \leq 1$, and $f(2)=0$.
Furthermore, setting $h(x)=f(x-2)$ the problem becomes find the max of $\left |\int_0^{8}h(x)dx \right |$, when $ \left | \frac{h(x)-h(y)}{x-y}\right | \leq 1$, and $h(0)=0$.
From,$ -(x_{m+1}-x_m)\leq h(x_{m+1})-h(x_m)\leq x_{m+1}-x_m$ for $x_{m+1}>x_m$ we obtain, using the Riemannian sum, similar bounds to the ones you did deduce, i.e. $\left |\int_0^{8}h(x)dx \right |\leq \int_0^{8}xdx\leq 32$.
Notice that for $h=x$ \begin{align*} \int_0^{8}h(x)dx &= \int_0^{8}xdx \\ &=\int_0^{8}xdx\\ &= 32 \end{align*} Therefore, the max is $32$.