Solve the differential equation $\sin x\frac {dy}{dx}+(\cos x)y=\sin(x^2)$ $$\sin x\frac {dy}{dx}+(\cos x)y=\sin(x^2)$$
$$\frac {d}{dx} y \sin x=\sin(x^2)$$
$$y\sin x=\int \sin(x^2)dx = -\frac{1}{2x}\cos(x^2)+C$$
$$y=-\frac{\cos(x^2)}{2x\sin x}+\frac {C}{\sin x}$$
where C is constant
Is my answer correct?
 A: The answer given in your textbook is correct - you have tried to oversimplify it! You got to $$\frac {d}{dx} y \sin x=\sin(x^2)$$Then you integrate both sides $$y\sin x=\int\sin(x^2) \mathrm dx+C$$Then you divide by $\sin x$ to get $$y=\frac{\int\sin(x^2)\mathrm dx+C}{\sin x}$$
as required. 
There is no need to try and integrate the $\sin(x^2)$ term, the way you did it is not correct. To check why this is the case, try to differentiate your result. If you had done it correctly, it would give you $\sin(x^2)$. However, what it really gives you is $$\sin(x^2)+\frac{\cos(x^2)}{2x^2}$$so there has been a mistake.
A: The obeservation you have done is pretty good! You have correctly identified the LHS as an application of the product rule since

$$\frac{\mathrm d}{\mathrm d x}\left(y\sin(x)\right)=\frac{\mathrm d y}{\mathrm d x}\sin(x)+y\cos(x)$$

However, without trying to discourage you but the integration of $\sin(x^2)$ is sadly speaking not that simple. You can check that you  conjectured anti-derivative is wrong by simple taking the derivative. Thus, the whole solution is given by the following
$$\begin{align*}
\frac{\mathrm d y}{\mathrm d x}\sin(x)+y\cos(x)&=\sin(x^2)\\
\frac{\mathrm d}{\mathrm d x}\left(y\sin(x)\right)&=\sin(x^2)\\
y\sin(x)&=\int\sin(x^2)\mathrm d x+C
\end{align*}$$

$$\therefore~y(x)~=~\frac1{\sin(x)}\left(\int\sin(x^2)\mathrm d x+C\right)$$

Adding some details concerning the still remaining integral: According to WolframAlpha the integral can be written in terms of the special function Fresnel Integral. For a straightforward "solution" you can expand the sine as a series and integrate termwise. On the other hand for definite integrals there are some value known, the I would say most important is

$$\int_0^\infty \sin(x^2)\mathrm d x~=~\frac{\sqrt{\pi}}{2\sqrt 2}$$

