# Minimize an cost function involving an integral

1. Jun 18, 2012

### Aerostd

1. The problem statement, all variables and given/known data
The objective is to minimize

$J(x) = \int y^2 (x+y)^2 dy,$

where x is the design variable.

3. The attempt at a solution

I first integrate over y to get
$J(x) = \frac{x^2 y^3}{3} + \frac{y^5}{5} + \frac{2x y^4}{4}$
Now, I differentiate over x, and solve for the minimizer, the result is

$x_{\textrm{min}} = \frac{-3y}{4}$

My question is the following: If I look at the cost function, I feel that the minimizer should be zero. Why am I getting [tex]\frac{-3y}{4}[/itex] as the minimzer?

Background:
I heard somewhere that if you want to minimize

$J(x) = \int f(y) f(x,y) dy$,

where $f(x)>0$ and $f(x,y)>0$, then you can just obtain the minimizer by minimizing f(x,y). So I constructed the example above and it doesn't work. Can anyone point to a theorem that lists this kind of result?

Thanks.

Last edited: Jun 18, 2012