Re: How to assume that a function is positive?
- To: mathgroup at smc.vnet.net
- Subject: [mg114359] Re: How to assume that a function is positive?
- From: Valeri Astanoff <astanoff at gmail.com>
- Date: Thu, 2 Dec 2010 05:38:38 -0500 (EST)
- References: <firstname.lastname@example.org> <email@example.com>
On Dec 1, 8:11 am, "Kevin J. McCann" <Kevin.McC... at umbc.edu> wrote: > How about > > (f[x + y]^2)^(1/2)//PowerExpand > > Kevin > > On 11/30/2010 4:04 AM, Sam Takoy wrote: > > > > > Hi, > > > Who do I let Mathematica know that a function f is positive for all > > arguments? For example, how do I make the following work (I think my > > intention is clear): > > > Assuming[f[x]> 0, (f[x + y]^2)^(1/2) // Simplify] > > > Many thanks in advance, > > > Sam- Hide quoted text - > > - Show quoted text - Sometimes PowerExpand doesn't suffice : In:= pos[fun_, ex_] := And @@ (fun[#] > 0 & /@ (Identity @@@ Extract[ex, Position[ex, fun[__]] ]) ) In:= z = (Abs@f[x + y]^2)^(1/2) + (f[x]^2)^(1/2); In:= Assuming[pos[f, z], z // Simplify] Out= f[x] + f[x + y] In:= z // PowerExpand Out= Abs[f[x + y]] + f[x] -- Valeri