Equality/Equivalence of functions When we say something like: 
$$ \frac{dy}{dx} = x$$
we're describing the way a function $y$ changes with respect to $x$. 
To solve the differential equation we integrate both sides. Is there a proper way to do this, or is it simply the case that if have a reliable method to get the correct answer then that's fine. For example:
Method 1:
$$ \int\frac{dy}{dx} dx = \int x \, dx$$
$$ \int dy= \int x \, dx$$
$$ y + c_1 = \frac{x^2}{2} + c_2$$
Method 2: 
$$ \frac{dy}{dx} = x$$
$$ dy = x \, dx$$
$$ \int dy= \int x \, dx$$
$$ y + c_1 = \frac{x^2}{2} + c_2$$
This is the thinking that lead me to the question to the title. 


*

*Why is it okay to integrate both sides of an equation? Are we basing that on the fact that indefinite integration is simply the reverse of differentiation? Will integrating both sides always make sense with continuous, integrable, elementary functions?

*Can we integrate without respect to a variable? In method 2 I employed the integration operator on both sides without adding a differential (I know it was already there).

*If I write $ y'' + 5xy = 2x^2$, is it acceptable to integrate both sides of the equation with respect to y, or x, and get a valid equality as a result?

*When I write: $ xy + y^x = 2x + 3$, maybe this is bad example, but am I stating that the left side is the same as the right side, or am I proposing that there are certain values of x and y that satisfy that equation. 
I'm having sort of a fundamental crisis here. I don't think I was ever properly taught what equality means. If you were, where did you learn it?

Method $2$ would be considered more appropriate and note $\int x dx = \frac{1}{2}x^2 + C$. However, you only need one arbitrary constant in the solution, $y = \frac{1}{2}x^2 + C$ would suffice for a solution since $c_2 - c_1$ would result in a new constant, where we call it $C$. 
1) It is okay to integrate both sides of an equation when we have separated our variables. In other words, when we have $f(x,y)dx + g(x,y)dy = h(x,y)$, we manipulate it to look like $\alpha(x)dx = \beta(y)dy$. However, sometimes this is not feasible so the topic of Ordinary Differential Equations (ODEs) is introduced to some of the cases where it is not separable. And yes, integrating both sides will always make sense when the function is Riemann integrable. 
2) No, we cannot integrate without respect to variable. This would not make sense. You integrated both sides because you already had it in the form involving a differential. You integrated in order to remove the differential. 
3) When given $y'' + 5xy = 2x^2$ assuming $y''$ is the second derivative with respect to $x$, you would have to tackle solving this using techniques from ODE, it is not as simple as integrating twice!
4) When you have $xy + y^x = 2x + 3$, you are treating $x$ and $y$ as variables here. You are implying that there may exist solutions, i.e. $x$ and $y$ that satisfy this equation. Clearly, it is not true for every $x$ and $y$, so the right hand side does not equal the left hand side in general. However, there may be certain $x$ and $y$ that make the equality hold true. 
