\documentclass[a4paper,12pt]{article}
\begin{document}
\parindent=0pt
QUESTION
A contractor rents out a piece of heavy equipment for $t$ hours
and is paid \pounds 50 per hour. The equipment tends to overheat and
if it overheats x times during the hiring period the contractor
will have to pay a repair cost £$x^2$. The number of times the
equipment overheats in $t$ hours can be assumed to have a poisson
distribution with mean $2t.$ What value of $t$ will maximize the
expected profit of the contractor?
\bigskip
ANSWER
If the equipment is hired for time $t$ and has $x$ faults then
$P=50t-x^2$
$E(P)=50t-E(X^2)$
$X\sim P(2t)$ therefore
\begin{eqnarray*}
E(X)&=&2t\\
\textrm{Var}(X)&=&E(X^2)-[E(X)]^2\\
&=&2t-4t^2\\
E(X^2)&=&2t+4t^2
\end{eqnarray*}
\begin{eqnarray*}
E(P)&=&50t-2t-4t^2\\
&=&48t-4t^2\\
\frac{dE(P)}{dt}&=&48-8t=0 \textrm{ when }
t=6\\
\frac{d^2E(P)}{2t^2}&=&-8<0 \textrm{ hence maximum. }
\end{eqnarray*}
\end{document}