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.
 A: 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}$
A: This comes from bad standard notation of the second derivative.  If you want to do algebraic manipulations, the second derivative of $\frac{dy}{dx}$ is $\frac{d^2y}{dx^2} - \frac{dy}{dx}\frac{d^2x}{dx^2}$.  This is found by using the quotient rule on the first derivative.
However, we can simplify things by not using either notation, and simply writing the second derivative as being the differential of the first derivative divided by $dx$:
$$y'' = \frac{d\left(\frac{dy}{dx}\right)}{dx}$$
This is a form that (a) shows where the differentiation occurs, (b) is algebraically manipulable, and (c) isn't as messy.
So, on your problem, you start out with
$$ x = \frac{d\left(\frac{dy}{dx}\right)}{dx} $$
Multiplying both side by $dx$ gives you:
$$ x\,dx = d\left(\frac{dy}{dx}\right)$$
We can integrate that:
$$ \int x\,dx = \int d\left(\frac{dy}{dx}\right) \\
\frac{x^2}{2} + C_1 = \frac{dy}{dx}$$
Note that on the right hand side, this works because the integral and differential are opposites, so they basically cancel out (obviously leaving a $+C$ if the integral is the last operation).
Now, we multiply both sides by $dx$ again.  This yields:
$$\frac{x^2}{2}\,dx + C_1\,dx = dy$$
Integrating yields:
$$\int \left(\frac{x^2}{2}\,dx  + C_1\,dx\right) = \int dy \\
\int \frac{x^2}{2}\,dx + \int C_1\, dx = \int dy \\
\frac{x^3}{6} + C_1x + C_2= y $$
That is the mechanics of how it works.
A: 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.
