On my MacBook Pro with version 10.1, two forms of the same answer are returned, i.e., Simplify is timing out. Rather than guessing whether your system is fast enough, capture your "different" results and test whether they are equivalent. If so, then it is a time-out related issue.
$Version
"10.1.0 for Mac OS X x86 (64-bit) (March 24, 2015)"
ClearAll["Global`*"]
w = 1/H[x] D[q[x], x] (\[Eta][x] - z) +
q[x]/H[x] D[H[x], x] (1 - (\[Eta][x] - z)/(\[Eta][x] - Zb[x])) +
q[x]/H[x] D[Zb[x], x];
der = Simplify[\!\(
\*SubscriptBox[\(\[PartialD]\), \(x\)]w\)];
dpdz = -(q[x]/H[x] der + w D[w, z] + g);
int = Integrate[dpdz, {z, Z0, Z1}];
Simplify[int] /. {Z0 -> z, Z1 -> \[Eta], q[x] -> q,
H[x] -> H, \[Eta][x] -> \[Eta], Zb[x] -> Zb};
firstCalc =
g z - g \[Eta] + (1/(
2 H^2 (Zb - \[Eta])^2))(z - \[Eta]) (q Derivative[1][H][
x] + (Zb - \[Eta]) Derivative[1][q][
x]) ((z - \[Eta]) (Zb - \[Eta]) Derivative[1][q][x] +
q ((z - 2 Zb + \[Eta]) Derivative[1][H][x] +
2 (-Zb + \[Eta]) Derivative[1][Zb][x])) -
1/(2 H^3)q (-((q (z - \[Eta]) (z - 2 Zb + \[Eta]) Derivative[1][H][x]^2)/(
Zb - \[Eta])) - (z - \[Eta])^2 Derivative[1][H][x] Derivative[1][q][
x] + (H (z - \[Eta]) (z - 2 Zb + \[Eta]) Derivative[1][H][
x] Derivative[1][q][x])/(Zb - \[Eta]) +
2 q z Derivative[1][H][x] Derivative[1][Zb][x] -
2 q \[Eta] Derivative[1][H][x] Derivative[1][Zb][x] +
2 H (-z + \[Eta]) Derivative[1][q][x] Derivative[1][Zb][x] +
2 H (-z + \[Eta]) Derivative[1][q][x] Derivative[1][\[Eta]][x] - (
H q (z - \[Eta]) Derivative[1][H][
x] ((z - \[Eta]) Derivative[1][Zb][
x] - (z - 2 Zb + \[Eta]) Derivative[1][\[Eta]][
x]))/(Zb - \[Eta])^2 + (
H q (z - \[Eta]) (z - 2 Zb + \[Eta]) (H^\[Prime]\[Prime])[x])/(
Zb - \[Eta]) + H (z - \[Eta])^2 (q^\[Prime]\[Prime])[x] -
2 H q z (Zb^\[Prime]\[Prime])[x] +
2 H q \[Eta] (Zb^\[Prime]\[Prime])[x]);
subsequentCalc =
1/2 (z - \[Eta]) (2 g +
1/(H^3 (Zb - \[Eta])^2) (q (Zb - \[Eta]) Derivative[1][H][
x] ((z - \[Eta]) (Zb - \[Eta]) Derivative[1][q][x] +
q ((z - 2 Zb + \[Eta]) Derivative[1][H][x] +
2 (-Zb + \[Eta]) Derivative[1][Zb][x])) +
H ((z - \[Eta]) (Zb - \[Eta])^2 Derivative[1][q][x]^2 +
q (Zb - \[Eta]) ((z - \[Eta]) Derivative[1][H][x] Derivative[1][q][
x] + (Zb - \[Eta]) (2 Derivative[1][q][x] Derivative[
1][\[Eta]][x] - (z - \[Eta]) (q^\[Prime]\[Prime])[x])) +
q^2 ((z -
2 Zb + \[Eta]) (Derivative[1][H][
x] (Derivative[1][H][x] + Derivative[1][Zb][x] -
Derivative[1][\[Eta]][x]) + (-Zb + \[Eta]) (
H^\[Prime]\[Prime])[x]) +
2 (Zb - \[Eta])^2 (Zb^\[Prime]\[Prime])[x]))));
firstCalc == subsequentCalc // Simplify
True
1/2 (z-\[Eta]) (2 g+(1/(H^3 (Zb-\[Eta])^2))(q (Zb-\[Eta]) (H^\[Prime])[x] ((z-\[Eta]) (Zb-\[Eta]) (q^\[Prime])[x]+q ((z-2 Zb+\[Eta]) (H^\[Prime])[x]+2 (-Zb+\[Eta]) (Zb^\[Prime])[x]))+H ((z-\[Eta]) (Zb-\[Eta])^2 (q^\[Prime])[x]^2+q (Zb-\[Eta]) ((z-\[Eta]) (H^\[Prime])[x] (q^\[Prime])[x]+(Zb-\[Eta]) (2 (q^\[Prime])[x] (\[Eta]^\[Prime])[x]-(z-\[Eta]) (q^\[Prime]\[Prime])[x]))+q^2 ((z-2 Zb+\[Eta]) ((H^\[Prime])[x] ((H^\[Prime])[x]+(Zb^\[Prime])[x]-(\[Eta]^\[Prime])[x])+(-Zb+\[Eta]) (H^\[Prime]\[Prime])[x])+2 (Zb-\[Eta])^2 (Zb^\[Prime]\[Prime])[x]))))– Kuba May 21 '15 at 11:42Simplifytake on your computer? If your computer is very slow it could happen that you run into theTimeConstraintthat is set forSimplifywhen evaluating the first time. Following evaluations will then take advantage of cached intermediate results and get further in the evaluation and thus return a different result. If that's the case I think it is a known problem but not "broken-code"... – Albert Retey May 21 '15 at 11:52