Optimization inside integral

1.2k Views Asked by At

I want maximize the integral

$$\int_a^b \left( 2 cx y(x) - e y(x)^2 \right) \, \mathrm{d}x$$

with respect to to $y(x)$.

If I discretize the problem, I get

$$ \frac{b-a}{n}\sum_{i=1}^n 2c(i/n(b-a)+a)y_i-eyi^2$$

If I take the derivative with respect to each $y_i$, I find in undiscretized version $y(x)$ as $\frac{cx}{e}$ If i plugin the values i get my optimization result.

I can understand the dynamics of the problem, but my calculus is a bit rusty, Is there anyone who can pinpoint which chapter of the calculus book should i skim in order to get more formal explanation. Thanks in advance

2

There are 2 best solutions below

2
On BEST ANSWER

No fancy calculus is required. Since there are no constraints and no derivatives of $y$ occur in the integral, only $y$ itself, the integral is directly maximised by maximising the integrand at each point separately. Setting the derivative of $2cxy-ey^2$ with respect to $y$ to $0$ yields $2cx-2ey=0$ and thus $y=\frac{cx}e$.

4
On

The Lagrangian is $\mathcal{L} (y) := 2 cx y(x) - e y(x)^2$. From the Euler-Lagrange equation, we get $2 c x - 2 e y = 0$ and, thus, $y = \left(\frac{c}{e}\right) x$ maximizes the integral.