Find value of $k$ for which $\displaystyle f(x)=\int^{\pi}_{0}|\sin x-kx|$ is minimum where $0<k<1$.
My Try: $$f(x) = \int^{\alpha}_{0}|\sin x-kx|dx+\int^{\pi}_{\alpha}|\sin x-kx|dx$$ Where $0<\alpha <\pi$
$$f(x) = \int^{\alpha}_{0}(\sin x-kx)dx+\int^{\pi}_{\alpha}(kx-\sin x)dx$$
$$ = 1-\cos \alpha-\frac{k\alpha^2}{2}+\frac{k\pi^2}{2}-1-\frac{k\alpha^2}{2}-\cos \alpha$$
$$f(\alpha)=k\frac{\pi^2}{2}-k\alpha^2-2\cos \alpha$$
for maximum or minimum $k'(\alpha) = 2k\alpha+2\sin \alpha=0$ and $k''(\alpha)=2k+2\cos \alpha$
could some help me how to solve it, thanks
You are on the right track. Note that $f$ is a function of $k\in(0,1)$, $$f(k)=\int^{\pi}_{0}|\sin x-kx|dx=k\frac{\pi^2}{2}-k\alpha(k)^2-2\cos(\alpha(k))$$ where $\alpha(k)$ is the unique point in $(0,\pi]$ such that $\sin(\alpha)=k\alpha$. Hence $$\begin{align} f'(k)&=\frac{\pi^2}{2}-\alpha(k)^2-2k\alpha(k)\alpha'(k)+2\sin(\alpha(k))\alpha'(k)\\&=\frac{\pi^2}{2}-\alpha(k)^2-2k\alpha(k)\alpha'(k)+2k\alpha(k)\alpha'(k)=\frac{\pi^2}{2}-\alpha(k)^2.\end{align}$$ We have that $\alpha(k)$ is strictly decreasing from $\alpha(0)=\pi$ to $\alpha(1^-)=0^+$. Let $\alpha_0=\pi/\sqrt{2}$, and $k_0=\sin(\alpha_0)/\alpha_0\approx 0.3582\in (0,1)$ then $f'(k_0)=0$, $f'(k)<0$ in $(0,k_0)$ and $f'(k)>0$ in $(k_0,1)$, which means that the minimum of $f$ is attained at $k_0$.