Help with minimizing integral

158 Views Asked by At

I want to make a formal argument that for the following optimzation problem

$\underset{S}{\operatorname{argmin}} \int_0^D (x(t) - S)^2$

the minimum solution is to set S to the mean of x(t) in the intervall 0 to D. (D and S are constants)

Any easy way of showing this?

1

There are 1 best solutions below

0
On

Expanding the integral, we obtain $$I(S) = \int_0^D x(t)^2dt - 2S\int_0^D x(t)dt + S^2 \int_0^Ddt = \int_0^D x(t)^2dt - 2S\int_0^D x(t)dt + S^2 D$$ Differentiate with respect to $S$ to obtain the $S$ is the mean of $x(t)$ over $[0,D]$.