Re: Getting answer out of a ConditionalExpression[]

*To*: mathgroup at smc.vnet.net*Subject*: [mg132118] Re: Getting answer out of a ConditionalExpression[]*From*: Bill Rowe <readnews at sbcglobal.net>*Date*: Sat, 14 Dec 2013 04:02:59 -0500 (EST)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com*Delivered-to*: l-mathgroup@wolfram.com*Delivered-to*: mathgroup-outx@smc.vnet.net*Delivered-to*: mathgroup-newsendx@smc.vnet.net

On 12/12/13 at 1:27 AM, roger.bagula at gmail.com (Roger Bagula) wrote: >I'm interested in getting a plot-able array out of the following: >Clear[x] Table[Solve[(1 + Exp[I*(n*Pi/6 + x)])*(1 + Exp[-I*(n*Pi/6 + >x)]) == 1/((1 - Exp[I*n*Pi/6])*(1 - Exp[-I*n*Pi/6])), x], {n, >1, 11}] >There are two problems: 1) getting the answers out of the {x -> >ConditionalExpression[ >1/6 (-\[Pi] + 6 I (-((I \[Pi])/6) + 2 I \[Pi] C[1])), C[1] >\[Element] Integers]} >and 2) removing the C[1] terms >I'm particularly interested in plotting the phase angles with log >expressions: {x -> ConditionalExpression[ >1/2 (-\[Pi] + 2 I (2 I \[Pi] C[1] + Log[1/4 (-3 - I Sqrt[7])])), >C[1] \[Element] Integers]}, {x -> ConditionalExpression[ 1/2 (-\[Pi] >+ 2 I (2 I \[Pi] C[1] + Log[1/4 (-3 + I Sqrt[7])])), C[1] \[Element] >Integers]} Extracting the answers from rules of the form sol=x->ConditionalExpression[...] can be accomplished by Assuming[conditions, Simplify[x/.sol]] The C[1] portion can be eliminated using one of the following rules and applying it C[1]->0 C[1]->1 C[1]->Sequence[] Use the first when C[1] is an additive constant, the second if C[1] is a multiplicative constant and the third if C[1] appears in a list or something else where substituting 0 or 1 won't work.