This will get the desired result:
sol = Solve[((x >= xP && Mod[x, Abs[1]] == Mod[xP, Abs[1]] &&
x >= xP && t == tP && z + 2*x*t == zP + 2*xP*tP)) && Not[xP != 10],
{xP, zP}, {tP}, MaxExtraConditions -> All];
Normal@sol
(* {{xP -> 10, zP -> -20 t + 2 t x + z}} *)
Or to keep the conditions but eliminate the parameters C[]
:
Simplify[sol,
TransformationFunctions -> {Automatic,
(# /. ce_ConditionalExpression :> (ce /.
First@Solve[Last@ce, Cases[Last@ce, _C, Infinity], Reals]) &)}
]
Appendix
The OP indicates that the solution in my comment is preferred, so in keeping with SE philosophy, I will include in my answer. The reception of Bob's answer led me to think the OP didn't mind whether the output was in Solve
or Reduce
form, so I opted above for Solve
. Besides, Normal@Solve[..]
seems so simple.
Simplify[
Reduce[((x >= xP && Mod[x, Abs[1]] == Mod[xP, Abs[1]] && x >= xP &&
t == tP && z + 2*x*t == zP + 2*xP*tP)) && Not[(xP != 10)],
{xP, zP}, {tP (* or t *)}
] /. C[1] -> x,
x \[Element] Integers]
(* x >= 10 && xP == 10 && 2 t (-10 + x) + z == zP *)
I personally was somewhat dissatisfied with this solution because the replacement C[1] -> x
is predicted to work only after carefully inspecting the output of Reduce
. So an approach that focussed narrowly on "just an example" seems to lack sufficient robustness. The Solve
approach in the second solution above, which constructs the replacement C[1] -> x
, seems more robust. Probably it could be broken by carefully thinking about what would break it; however, it will work on a wider class of problems than than the narrower class that C[1] -> x
fixes. But perhaps the OP's problems all belong to that narrower class.
{t, xP, zP}
for the variables, you ask for a solution fort
. To get rid of it, mark it for elimination:Reduce[.., {xP, zP}, {t}]
. Re (1): I'm not sure what will work in general. Reduce is parametrizing the solution set in terms of the integer parameterC[1]
. It's designed this way. You could replace it thus:{xP, zP}, {t}] /. C[1] -> x
. I'm not sure that works in all your problems, since it's based on knowing the output ofReduce
. $\endgroup$Simplify[result, Element[x, Integers]]
is one way, which may do other simplifications. Another isresult /. _Element -> True
, which would remove all domain specifications. I thinkx
might have to be an integer though. $\endgroup$