Let \( y = y(x) \) be the solution of the differential equation \( x\,dy = (y + x^3 \cos x)\,dx \) with \( y(\pi) = 0 \), then \( y\!\left(\dfrac{\pi}{2}\right) \) is equal to:
\( \dfrac{\pi^2}{2} + \dfrac{\pi}{4} \)
\( \dfrac{\pi^2}{4} - \dfrac{\pi}{2} \)
\( \dfrac{\pi^2}{4} + \dfrac{\pi}{2} \)
\( \dfrac{\pi^2}{2} - \dfrac{\pi}{4} \)