Integrating both sides of an equation with respect to what? Let's say we have the following DE:
$ \frac{dy}{dx} = x $
1. That's how It could be solved:
$dy = x dx$
$\int{dy}=\int{xdx}$
$y=\frac{1}{2}x^2+c$
Is it mathematically correct to separate $dy$ and $dx$ ? Or it would appear as the derivative of $y$ with respect to $x$ is a fraction which is not true.
2. Another method of writing the solution can be:
$\int\frac{dy}{dx} dx=\int{xdx}$
$\int{dy}=\int{xdx}$
$y=\frac{1}{2}x^2+c$
That's integrating the DE with respect to x. Is this mathematically correct? It seems like the $dx$ cancels each other in the LHS, but we are not allowed to treat this as a fraction.
My Questions are:


*

*Which of these ways of writing the solution is the most accurate?

*And which of these 2 is wrong in terms of following mathematical structure?

*When we integrate both sides of the equation, can we just put the integral sign without integrating with respect to a variable? (for example in case 1) 


When your diffferential equation is separable you end up with a differential form  $$ f(y)dy = g(x) dx$$
Since you are assuming taht $$y=y(x)$$ you may integrate both sides  with respect to $x$ but the LHS has gone through a change of variable so we get   $$\int f(y(x))y'(x)dx = \int f(y)dy = \int g(x) dx$$ 
Thus the integration is valid.  
