# How to perform “implicit” integration? [duplicate]

(I wasn't sure what to put for the title, so feel free to improve it if you can think of a better one.)

How do I evaluate an integral that contains an unknown function of the integration variable such as the following in Mathematica?

$$\int_{x_1}^{x_2} \frac{dy}{dx} dx$$

It should obviously give me back $y(x_2) - y(x_1)$.

## marked as duplicate by Michael E2, Dr. belisarius, Öskå, Bob Hanlon, Yves KlettDec 10 '14 at 7:38

• What answer are you hoping to get? – evanb Dec 9 '14 at 21:53
• Aren't you integrating the derivative of the arc-length? – Dr. belisarius Dec 9 '14 at 21:53
• That's what it looks like to me. But it's not quite. There ought to be a chain-rule d^2y / dx^2 in the numerator if it were truly the arclength, unless I'm mistaken. – evanb Dec 9 '14 at 22:11
• @evanb: Whoops, I typed in the wrong expression... my bad. But for the purposes of this question ignore the actual expression, I'm just trying to learn how to use Mathematica to do an implicit integral. I've changed it to something trivial now. – Mehrdad Dec 9 '14 at 22:37
• Oops, as I typed up my answer I got the sneaking feeling I've done this before: mathematica.stackexchange.com/questions/66494/… – Michael E2 Dec 9 '14 at 22:50

f[x2] /. First @ DSolve[{f'[x] == y'[x], f[x1] == 0}, f, x]