$$y\cos x+2xe^y+(\sin x+x^2e^y-1)y'=0$$
$\left(y\sin(x)+x^2e^y \right)'=y\cos(x)+2xe^y+\sin(x)y'+x^2e^yy'$
$$\left(y\sin(x)+x^2e^y \right)'-y'=0$$
Integrate :
$$\left(y\sin(x)+x^2e^y \right)-y=C$$
This is the solution of the ODE expressed on the form of implicit equation.
You found :$\quad y\sin(x)+x^2e^y-y=\varphi$
This is correct with $\varphi=$constant.
In order to get the explicit solution we have to solve the equation for $y$. A closed form cannot be obtained with the elementary functions. A special function is required, the Lambert W function. http://mathworld.wolfram.com/LambertW-Function.html
$$y(x)=\frac{C}{\sin(x)-1}-W(X)\qquad\text{with}\qquad X=\frac{x^2\exp(\frac{C}{\sin(x)-1})}{\sin(x)-1}$$
I suppose that was not the expected form if it is a textbook exercise. The above implicit form of solution is probably sufficient.
ADDITION after the comments (the term that you forgot is written in red) :
$\int_{c_2} \vec{f}\cdot d\vec{r} = \int_{0}^{y_o} (y\cos{(x)} + 2xe^y)dx + (\sin{(x)} + x^2e^y -1)dy$
$ = \int_{0}^{y_o} \sin{(x_o) + x_o^2e^t - 1} dt = \big[ t\sin{(x_o)} + x_o^2e^t - t \big]_{0}^{y_o}$
$ = y_o\sin{(x_o)} + x_o^2e^{y_o} - y_o \color{red}{-x_0^2}$
And finally:
$ \int_{c} \vec{f}\cdot d\vec{r} = x_0^2 + y_o\sin{(x_o)} + x_o^2e^{y_o} - y_o \color{red}{-x_0^2}= F(x_o,y_o) - F(0,0)$
$ F(x,y) = y\sin{(x)} + x^2e^y - y $
Ok that's definitely not how line integrals are defined. You can't just pull out the $YZ$ from the integral and then say $\int dX=X$, and then multiply to get $YZX$ and then evaluate the difference at the endpoints (likewise for the other two terms). This is the problem one falls into when not careful with definitions.
The first way of solving the problem, which is the obvious way, is to observe that the differential form
\begin{align}
\omega= YZ\,dX+XZ\,dY+XY\,dZ=d(XYZ)
\end{align}
is equal to the $d$ of some function. Hence, we have a potential function, determined up to a constant as $\phi(x,y,z)=xyz$.
Since you want to avoid doing this, we can try another approach. If you somehow already know that the integral is path-independent, then the function $\phi:\Bbb{R}^3\to\Bbb{R}$ defined as
\begin{align}
\phi(x,y,z):=\int_{\gamma_{(x,y,z)}}\omega,
\end{align}
where $\gamma_{(x,y,z)}$ is ANY path joining say the origin and $(x,y,z)$, will be such that $\omega=d\phi$.
Of course, to actually calculate this integral explicitly, one has to work carefully from the definitions. If you already know the integral is path-independent, then to evaluate it, you may as well choose a simple path, such as the straight-line segment joining the two points: given any point $(x,y,z)$, let us consider the simple path $\gamma_{(x,y,z)}:[0,1]\to\Bbb{R}^3$ defined as $\gamma_{(x,y,z)}(t)=(tx,ty,tz)$. With this, the calculation proceeds as follows:
\begin{align}
\phi(x,y,z)&=\int_{\gamma_{(x,y,z)}}YZ\,dX+XZ\,dY+XY\,dZ\\
&=\int_0^1(ty)(tz)(x\,dt)+(tx)(tz)(y\,dt)+(tx)(ty)(z\,dt)\\
&=\int_0^13t^2xyz\,dt\\
&=xyz \int_0^13t^2\,dt\\
&=xyz
\end{align}
Of course, now it is easily double-checked that $\omega=d\phi$, so everything works out.
Best Answer
If the first partial derivatives exist and are equal to $f_k$, and each $f_k$ is continuous (by assumption), then $\phi$ is of class $C^1$, hence (by a well-known basic theorem) differentiable.