Minimizing the value of this integral $ I \equiv \int_{0}^{\pi/2}\left\vert\,\cos\left(x\right) - kx^{2}\,\right\vert \,{\rm d}x $ 
Given the integral
$$
I \equiv \int_{0}^{\pi/2}\left\vert\,\cos\left(x\right) - kx^{2}\,\right\vert
\,{\rm d}x
$$
Find the value of $k$ so that $I$ is minimum.

How do I start?

We have to minimize the function
$$I(p):=\int_0^{\pi/2}\bigl|\cos x -p x^2\bigr|\ dx\qquad(p\in{\mathbb R})\ .$$
When $p<0$ then obviously $I(p)>I(0)=1$. When $p>0$ then the parabola $y=p\,x^2$ intersects the curve $y=\cos x$ at a point $x=t$ with $0<t<{\pi\over2}$ depending on $p$. We now let $t>0$ be our new parameter and then have
$$p={\cos t\over t^2}\ .$$
This means that we now have to minimize the function
$$\eqalign{g(t)&:=I(\cos t/ t^2)\cr &=\int_0^t (\cos x-x^2\cos t/t^2)\ dx+
\int_t^{\pi/2} (x^2\cos t /t^2-\cos x)\ dx\cr
&=2\sin t+{\pi^3-16t^3\over 24 t^2}\cos t -1\qquad(0<t<\pi/2)\ .\cr}$$
When the function $g$ is not monotone then this  will necessitate the solution of the transcendental equation $g'(t)=0$. Therefore we shall look at the problem using Mathematica. Here is the output:

It turns out that $g$ has a minimum at $t_*\doteq1.25$, and one obtains $g(t_*)\doteq0.89592$.
