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*: <id2emr$d88$1@smc.vnet.net> <id4sff$cbo$1@smc.vnet.net>

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[1]:= pos[fun_, ex_] := And @@ (fun[#] > 0 & /@ (Identity @@@ Extract[ex, Position[ex, fun[__]] ]) ) In[2]:= z = (Abs@f[x + y]^2)^(1/2) + (f[x]^2)^(1/2); In[3]:= Assuming[pos[f, z], z // Simplify] Out[3]= f[x] + f[x + y] In[4]:= z // PowerExpand Out[4]= Abs[f[x + y]] + f[x] -- Valeri