Question: question on simplification

Why this simplifes:

z1:=n*(Int(cos(x)^(n-2), x))-(Int(cos(x)^(n-2), x));

simplify(z1);

But when adding an extra term to z1, it no longer simplfies the above any more:

z2 := cos(x)^(n-1)*sin(x)+n*(Int(cos(x)^(n-2), x))-(Int(cos(x)^(n-2), x));

simplify(z2);

You can see the second term, which is z1, was not simplfied any more.

Why? And how would one go about simplifying z2 such that the second term gets simplfies as with z1, but while using z2 expression. It seems simplify stopped at first term and did not look ahead any more?

Maple 18.02, windows.

Please Wait...