Yes. that's the article I first looked at, specifically "The deposited energy can be obtained by integrating the stopping power over the entire path length of the ion when it moves in the solid."
When you said I needed to add dx, did you mean I should write ∫(dE/dx)dx? Doesn't dx disappear...