If the perimeter of a rectangle is $p$ and its diagonal is $d$, the difference between the length and width of the rectangle is: 
$\textbf{(A)}\ \frac {\sqrt {8d^2 - p^2}}{2} \qquad \textbf{(B)}\ \frac {\sqrt {8d^2 + p^2}}{2} \qquad \textbf{(C)}\ \frac{\sqrt{6d^2-p^2}}{2}\qquad\\ \textbf{(D)}\ \frac {\sqrt {6d^2 + p^2}}{2} \qquad \textbf{(E)}\ \frac {8d^2 - p^2}{4}$
Let the sides of the rectangle be x and y. WLOG, assume x>y. Then, $2x+2y=p \Rightarrow x+y=\frac{p}{2}$.
By pythagorean theorem, $x^2 + y^2 =d^2$.
Since $x+y=\frac{p}{2}$, $(x+y)^2=\frac{p^2}{4} \Rightarrow x^2+2xy+y^2=\frac{p^2}{4}$.
Rearranging to solve for $2xy$ gives $2xy = \frac{p^2}{4}-d^2$.
Rearranging $(x-y)^2$ in terms of the defined variables becomes $(x-y)^2 = d^2 - (\frac{p^2}{4}-d^2)$. 
In order to get (x-y), we have to take the square root of the expression and simplify. 
$(x-y)=\sqrt{2d^2-\frac{p^2}{4}} \Rightarrow (x-y)=\sqrt{\frac{8d^2-p^2}{4}}$ $\Rightarrow$ $(x-y)=\frac{\sqrt{8d^2+p^2}}{2}$ $\Rightarrow$
$\fbox{A}$.