# Pre-interview_Test_Question_4

let black square have a side length of l
as the whole square has side length of 1, the base must have a side length of 1-l-l=1-2l (there are 2 black squares’ worth of length on either side of it).
when you raise the “sides”, the box will have a height the same as the side length of the black square, so l.
\therefore the volume will be

\begin{align} l(1-2l)^2&=l(1-4l+4l^2) \\ &=l-4l^2+4l^3 \end{align}

from this we know that

\begin{align} \frac{d}{dl}(l-4l^2+4l^3)&=1-8l-12l^2 \\ &=0 \\ \iff -12(l^2+\frac{2}{3}l-\frac{1}{12})&=0 \\ \iff (l+\frac{1}{3})^2&=\frac{7}{36} \\ \iff l&= \frac{-2±\sqrt{7}}{6} \end{align}

l must clearly be a positive quantity so l=\dfrac{-2+\sqrt{7}}{6} is maximum value the function takes (it is a negative quadratic so the stationary point must be a maximum)

1 Like

just realised they already gave x as the length, don’t want to change all the l's now but just imagine they’re x's

1 Like