Some time ago I had a physics test where I had the following integral: $\int y'' \ \mathrm{d}y$. The idea is that I had a differential equation, and I had acceleration (that is, $y''$) given as a function of position ($y$). The integral was actually equal to something else, but that's not the point. I needed to somehow solve that. I can't integrate acceleration with respect to position, so here's what I did:
$$ \int y'' \ \mathrm{d}y = \int \frac{\mathrm{d}y'}{\mathrm{d}t} \ \mathrm{d}y = \int \mathrm{d}y' \frac{\mathrm{d}y}{\mathrm{d}t} = \int y' \ \mathrm{d}y' = \frac1{2}y'^2 + C $$
My professor said this was correct and it makes sense, but doing weird stuff with differentials and such never completely satisfies me. Is there a substitution that justifies this procedure?
I'm doubtfull about what $y''$ and $dy$ stand for in your problem. If you have $y = y(x)$ then clearly $$\int y'' dx = y'+C$$ But you're integrating with respect to $dy = d\{y(x)\} = y'(x) dx$ assuming $y(x)$ has a continuous derivative. So you finally have.
$$\int y''(x) y'(x) dx = \int y'(x) d(y'(x)) = \frac{y'^2}{2}+C $$
I'd recommend you read about the Riemann Stieltjes integral, which would formally clarify this issues.