$EI \, y'' = -Pa + Px - P\langle x - a \rangle$
$EI \, y' = -Pax + \frac{1}{2} Px^2 - \frac{1}{2} P\langle x - a \rangle^2 + C_1$
$EI \, y = -\frac{1}{2}Pax^2 + \frac{1}{6} Px^3 - \frac{1}{6} P\langle x - a \rangle^3 + C_1x + C_2$
At x = 0, y' = 0, therefore C1 = 0
At x = 0, y = 0, therefore C2 = 0
Therefore,
$EI \, y = -\frac{1}{2}Pax^2 + \frac{1}{6} Px^3 - \frac{1}{6} P\langle x - a \rangle^3$
The maximum value of EI y is at x = L (free end)
$EI \, y_{max} = -\frac{1}{2}PaL^2 + \frac{1}{6} PL^3 - \frac{1}{6} P(L - a)^3$
$EI \, y_{max} = -\frac{1}{2}PaL^2 + \frac{1}{6} PL^3 - \frac{1}{6} P(L^3 - 3L^2a + 3La^2 - a^3)$
$EI \, y_{max} = -\frac{1}{2}PaL^2 + \frac{1}{6}PL^3 - \frac{1}{6}PL^3 + \frac{1}{2}PL^2a - \frac{1}{2}PLa^2 + \frac{1}{6}Pa^3$
$EI \, y_{max} = -\frac{1}{2}PLa^2 + \frac{1}{6}Pa^3$
$EI \, y_{max} = -\frac{1}{6}Pa^2(3L - a)$ answer