Answer
$(Ly)(x)=\frac{-4\sin x}{x}+4x \cos x-8\sin x$
Work Step by Step
Given $L=\frac{1}{2}D^2+xD-2$
with $y_1=4\sin x$
We first compute the appropriate derivatives
$y'(x)=4\cos x\\
y''(x)=-4\sin x$
Hence
$(Ly)(x)=4\sin x(\frac{1}{2}D^2+xD-2)=\frac{-4\sin x}{x}+4x \cos x-8\sin x$