The general solutions always have some additive/multiplicative constant, that you must fix in the particular solution.
In order to do so, you need to impose that the particular solution passes through a certain point. In your case, you have
![y(x) = c-4\cos(x)](https://img.qammunity.org/2019/formulas/mathematics/college/ucnu303ubrbthe184eerdysk6m41pnjm0r.png)
and you want
![y\left((\pi)/(2)\right) = 2](https://img.qammunity.org/2019/formulas/mathematics/college/v8yhj1y2r880dghl1i1eoy7d84dmvz46d4.png)
Put everything together, and you have
![y\left((\pi)/(2)\right) = c-4\cos\left((\pi)/(2)\right) = c = 2](https://img.qammunity.org/2019/formulas/mathematics/college/1whq3sso3bnntdrv1zvnse1ot70qv63sqa.png)
Since the cosine is zero in the chosen point. So, we've fixed the value of the constant, and the particular solution is found:
![y(x) = 2-4\cos(x)](https://img.qammunity.org/2019/formulas/mathematics/college/xgq10zx6wm01s2w2wsk6c5r949y6trb2ij.png)