# Disregarding the ConditionalExpression in the output of Solve

I am trying to write a program in Mathematica that will perform basic uncertainty analysis for me and "show the work," so to speak. One of the pieces of this program will involve taking in an expression and list of variables, say,

myexpr = w == 2 y Cos[x] + z^2
myvaris = {x, y, z, w}


and solving the expressions for the first variable in the list, e.g.

Solve[myexpr, myvaris[[1]]]


which outputs

{{x -> ConditionalExpression[-ArcCos[(w - z^2)/(2*y)] + 2*Pi*C[1],
Element[C[1], Integers]]},
{x -> ConditionalExpression[ArcCos[(w - z^2)/(2*y)] + 2*Pi*C[1],
Element[C[1], Integers]]}}


which is all good and correct. But what I would like to obtain is just something like

{x -> ArcCos[(w - z^2)/(2*y)]}


without all the conditional expression business, because its presence wrecks the form of the output I'd like. In particular, what I want in the end is something I can pass to TeXForm which will go into a StringForm to output a chunk of LaTeX. Is it possible to construct something like this (and if so how), or am I asking a question which cannot be solved in pure generality?

To be clear, I'm not asking how to eliminate the particular occurrences of ConditionalExpression in the output above, but to eliminate all instances of such a ConditionalExpression and arbitrary constants in general, without having to manipulate by hand any intermediate results. I'm not really concerned with the output being reliably correct or complete in the end; I just want the expression that a naive high school algebra student would write down.

• You should use Normal. Feb 13 '17 at 22:08
• Thanks; that's a bit better but still leaves in the arbitrary constants and produces multiple rules. It's easy enough to just call the first rule and forget the rest, but is there a way to set all arbitrary constants to zero? Feb 13 '17 at 22:12
• Just saw Corey comment. So I deleted my answer. Normal is the recommended way. Feb 13 '17 at 22:33

Solve[myexpr,myvaris[[1]],GeneratedParameters->(0&)]

• It's probably better to use: Solve[myexpr,myvaris[[1]],GeneratedParameters->C] /. _C->0 instead. Feb 13 '17 at 22:30