In a triangle \( ABC \) with usual notations, if \[ \tan \left( \frac{B-C}{2} \right) = x \cot \left( \frac{A}{2} \right), \] then \( x = \, ? \)
If \( y = y(x) \) and \[ \left( \frac{2+\sin x}{y+1} \right)\frac{dy}{dx} = -\cos x, \] with the initial condition \( y(0) = 1 \), then find \[ y\left(\frac{\pi}{2}\right) = \, ? \]