Separation of variables on a second order ODE I am attempting to grasp the basics of separation of variables for a second order separable differential equation, and am failing to do so:

Given the equation:

$$ x=\frac{d^2y}{dx^2}$$

I know from calculus class intuitively that the solution is:

$$ y=\frac{x^3}{6}$$

But if I am to use separation of variables, why don't I get:

$$ \frac{y^2}{2}=\frac{x^3}{6} $$

Since I should have had to integrate the $y$ side twice as well.
You don't have something like $f(x)dx dx=g(y)dy dy$. You have $f(x) dx =g(y)d\left(\frac{dy}{dx}\right)$. Remember that the second deriviative is $\frac{d \left(\frac{dy}{dx}\right)}{dx}$. The actual solution is $\frac{x^3}6+cx+k$, where $c$ and $k$ are constants. This should be your process:

$x=\frac{d^2y}{dx^2}$

$x dx=d\left(\frac{dy}{dx}\right)$

$\int xdx=\int d\left(\frac{dy}{dx}\right)$

$\frac{x^2}2=\frac{dy}{dx}$
You have treated $\frac{d^2y}{dx^2}$ as $\frac{d^2y}{dx^2} = (\frac{dy}{dx})^2 = \frac{dydy}{dxdx}$. This of course isn't true. The second derivative of $y$ wrt $x$ is $\frac{d}{dx}(\frac{dy}{dx})$ which if you want to use the fraction analogy can be thought of as $\frac{dy}{dxdx}$. Now, using separation of variable on the equation you've supplied would yield $$\iint  xdxdx = \int  dy$$
Solving this would produce the correct solution. This isn't a mathematically rigorous explanation, but it works to show the difference between $\frac{d^2y}{dx^2}$ and the first derivative squared.