# Maximize an Integral

#### anemone

##### MHB POTW Director
Staff member
Find the exact maximum value of $\int_0^y \sqrt{x^4+(y-y^2)^2} dx$ for $0 \le y \le 1$.

#### HallsofIvy

##### Well-known member
MHB Math Helper
Find the exact maximum value of $\int_0^y \sqrt{x^4+(y-y^2)^2} dx$ for $0 \le y \le 1$.
I presume you know that to determine maximum or minimum values for a differentiable function, you set the derivative equal to 0. You should also know that if $$f(y)= \int_a^y g(x,y) dx$$ then $$df/dy= g(y,y)$$. So you should find y such that $$\sqrt{y^4+ (y- y^2)^2}= 0$$. (If that y is not between 0 and 1 then look at the value at 0 and 1.)

#### Klaas van Aarsen

##### MHB Seeker
Staff member
I presume you know that to determine maximum or minimum values for a differentiable function, you set the derivative equal to 0. You should also know that if $$f(y)= \int_a^y g(x,y) dx$$ then $$df/dy= g(y,y)$$. So you should find y such that $$\sqrt{y^4+ (y- y^2)^2}= 0$$. (If that y is not between 0 and 1 then look at the value at 0 and 1.)
That doesn't look quite right.

Suppose $g(x,y) = x+y$.

Then:
\begin{aligned}\frac{d}{dy}\int_0^y g(x,y)dx
&= \frac{d}{dy}\int_0^y (x+y)dx \\
&= \frac{d}{dy}\left(\frac 1 2 x^2 + xy \Big|_0^y\right) \\
&= \frac{d}{dy}\left(\frac 3 2 y^2\right) \\
&= 3y
\end{aligned}
But:
$$g(y,y) = y+y = 2y \ne 3y$$

#### ZaidAlyafey

##### Well-known member
MHB Math Helper
We cannot differentiate with respect to $y$ while it is inside the integral so we have first to separate them then

$$\displaystyle \int^y_0 (x+y)dx = \int^y_0 xdx +y\int^y_0 dx$$

Now if we differentiate and according to the product rule we have

$$\displaystyle \frac{df}{dy}\int^y_0 (x+y)dx=\frac{df}{dy} \left( \int^y_0 xdx +y\int^y_0 dx \right) =y +\int^y_0 dx+y = 3y$$

So the FTC doesn't apply directly here.

#### Random Variable

##### Well-known member
MHB Math Helper
If $\displaystyle f(y)= \int_a^y g(x,y) \ dx$, then $\displaystyle \frac{df}{dy}= \int_{a}^{y} g_{y}(x,y) \ dx + g(y,y)$.

#### ZaidAlyafey

##### Well-known member
MHB Math Helper
If $\displaystyle f(y)= \int_a^y g(x,y) \ dx$, then $\displaystyle \frac{df}{dy}= \int_{a}^{y} g_{y}(x,y) \ dx + g(y,y)$.
That integral doesn't seem to be solvable in terms of elementary functions. The W|A returns an elliptic integral.

#### anemone

##### MHB POTW Director
Staff member
Thank you all for the feedback!

If $\displaystyle f(y)= \int_a^y g(x,y) \ dx$, then $\displaystyle \frac{df}{dy}= \int_{a}^{y} g_{y}(x,y) \ dx + g(y,y)$.
I believe you're right, and if one wants to attack the problem using this definition, then that would be welcome!

That integral doesn't seem to be solvable in terms of elementary functions.
Hmm...that's not quite right, Zaid! But speaking of more advanced integration field, you and the rest of the members are the experts, not me. I want to let you know that one of the solutions that I have solved it through the inequality route and I actually can't wait to share it with MHB! Having said so, I will only post the solutions days later with the hope that others may want to take a stab at it.

#### ZaidAlyafey

##### Well-known member
MHB Math Helper
Hmm...that's not quite right, Zaid!
Well, I don't know whether I am messing something but I still cannot think how to find an elementary anti-derivative for that integral.

#### anemone

##### MHB POTW Director
Staff member
Well, I don't know whether I am messing something but I still cannot think how to find an elementary anti-derivative for that integral.
Most probably that I am wrong, Zaid. Please don't take what I said seriously because really I am no comparison to you when it comes to the territory of advance integration.

#### Opalg

##### MHB Oldtimer
Staff member
Find the exact maximum value of $\int_0^y \sqrt{x^4+(y-y^2)^2} dx$ for $0 \le y \le 1$.
Let $$\displaystyle f(y) = \int_0^y \sqrt{x^4+(y-y^2)^2} dx.$$ My instinct is that the maximum value of $f$ over the interval $[0,1]$ must be $$\displaystyle f(1) = \int_0^1 x^2\, dx = 1/3.$$ Following anemone's hint about using an inequality, it occurred to me that if $a,b \geqslant 0$ then $\sqrt{a^2+b^2} \leqslant a+b.$ Applying that with $a=x^2$ and $b= y-y^2$, you see that $$\displaystyle f(y) \leqslant \int_0^y(x^2 + y - y^2)\,dx = \tfrac13y^3 + y^2 - y^3 = y^2 - \tfrac23y^3.$$ But $y^2 - \tfrac23y^3$ is an increasing function on the interval $[0,1]$, with a maximum value $1/3$ when $y=1$. Therefore the maximum value of $f(y)$ is $f(1) = 1/3.$

#### anemone

##### MHB POTW Director
Staff member
Let $$\displaystyle f(y) = \int_0^y \sqrt{x^4+(y-y^2)^2} dx.$$ My instinct is that the maximum value of $f$ over the interval $[0,1]$ must be $$\displaystyle f(1) = \int_0^1 x^2\, dx = 1/3.$$ Following anemone's hint about using an inequality, it occurred to me that if $a,b \geqslant 0$ then $\sqrt{a^2+b^2} \leqslant a+b.$ Applying that with $a=x^2$ and $b= y-y^2$, you see that $$\displaystyle f(y) \leqslant \int_0^y(x^2 + y - y^2)\,dx = \tfrac13y^3 + y^2 - y^3 = y^2 - \tfrac23y^3.$$ But $y^2 - \tfrac23y^3$ is an increasing function on the interval $[0,1]$, with a maximum value $1/3$ when $y=1$. Therefore the maximum value of $f(y)$ is $f(1) = 1/3.$
Well done, Opalg, and thanks for participating! 