It doesn't need to help it survive, evolution has no intent and not all traits are advantageous. It might just be random, genetic drift or something, a bottleneck effect, any of these things.

In the wild the yellow ones will hardly live long enough to reproduce though.

Why ducklings are yellow?
I was given the following question:

A wine cask has a radius at the top of $30 cm$ and a radius at the middle of $40 cm$.
The height of the cask is $1m$.
What is the volume of the cask in litres, assuming the shape of the side is parabolic?

I have to come to parabolic function of

$$y = \frac{-1}{250}(x-50)^2+40$$

The derivative of $y$ is:
$$\frac{dy}{dx} = \frac{2}{5} - \frac{x}{125}$$

Then I integrate and end up with an expression the length of $\pi$. Am I on the right track?
