Re: Question about exponent
- To: mathgroup at smc.vnet.net
- Subject: [mg115060] Re: Question about exponent
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Thu, 30 Dec 2010 04:08:55 -0500 (EST)
expr1 = 1 - (1 - x)^2 (1 - y)^3; expr2 = ToString[expr1 /. (1 - z_)^n_ :> (StringJoin @@ Table["(" <> ToString[1 - z] <> ")", {n}])] "1 - (1 - x)(1 - x) (1 - y)(1 - y)(1 - y)" expr1 == (expr2 // ToExpression) True Bob Hanlon ---- Maria Davis <arbiadr at gmail.com> wrote: ============= Hi Mathematica Community, How can I convert the expression: 1- (1-x)=B2 (1-y)=B3 to the expression: 1- (1-x)(1-x) (1-y)(1-y)(1-y) Thank you