# DSolve output - understanding how to extract result

I'm a little confused with how to use the output from DSolve. The following works

s = DSolve[{y'[x] == x, y[0] == 0}, y[x], x];
Plot[y[x] /. s, {x, 1, 10}]


but I don't understand how it works. I am familiar with /. a -> b which will replace a with b, but I don't get what y[x] /. s is doing?

-

## 1 Answer

Dsolve[], like Solve[] (but unlike Resolve[]) returns replacement rules. You are replacing the value of y[]returned by your solve command

-
Thanks. I see whats going on. I can declare a mapping such as map = {a->b}; then i can use this mapping variable in a any ReplaceAll command i.e a /. map or {a,a} /. map. –  David McHarg Jan 26 '13 at 2:10
@David Yes. Replacement rules (term rewriting) are very important in Mathematica. –  belisarius Jan 26 '13 at 9:25