The given equation is clearly separable, as we can rewrite it in product form:
\begin{equation*}
\frac{dy}{dx} = (\cos x)\cdot\frac{1}{y}.
\end{equation*}
\begin{equation*}
y\,dy = \cos(x)\,dx
\end{equation*}
\begin{equation*}
\int y\,dy = \int \cos(x)\,dx
\end{equation*}
\begin{align*}
\frac{y^2}{2} \amp = \sin(x) + c_1\\
y^2 \amp = 2\sin(x) + c,\quad c=2c_1
\end{align*}
This yields the implicit general solution:
\begin{equation*}
y^2 = 2\sin(x) + c.
\end{equation*}
Before explicitly solving for \(y\text{,}\) itβs simpler to use the initial condition \(y(0) = -5\) to find the constant \(c\) first:
\begin{align*}
(-5)^2 = 2\sin(0) + c \amp\Rightarrow 25 = c.
\end{align*}
Thus, the implicit particular solution is:
\begin{equation*}
y^2 = 2\sin(x) + 25.
\end{equation*}
Solving explicitly for \(y\text{,}\) we introduce a \(\pm\text{:}\)
\begin{equation*}
y(x) = \pm\sqrt{2\sin(x) + 25}.
\end{equation*}
To determine the correct sign, apply the initial condition again:
\begin{equation*}
y(0) = \pm\sqrt{2\sin(0) + 25} = \pm5.
\end{equation*}
Since we know \(y(0)=-5\text{,}\) the solution must take the negative branch:
\begin{equation*}
\boxed{\ y(x) = -\sqrt{2\sin(x) + 25}\ }.
\end{equation*}