Differentiating both sides with respect to x, we get,
y’ = -sinx
Then,
Substituting the values of y’ in the given differential equations, we get,
\[\begin{array}{*{35}{l}}
=\text{ }y\text{ }+\text{ }sinx \\
=\text{ }-\text{ }sinx\text{ }+\text{ }sinx \\
=\text{ }0 \\
\end{array}\]
= RHS
Therefore, the given function is a solution of the given differential equation.