Re: How to assume that a function is positive?
- To: mathgroup at smc.vnet.net
- Subject: [mg114311] Re: How to assume that a function is positive?
- From: Valeri Astanoff <astanoff at gmail.com>
- Date: Tue, 30 Nov 2010 06:23:06 -0500 (EST)
- References: <firstname.lastname@example.org>
On Nov 30, 10:04 am, Sam Takoy <sam.ta... at yahoo.com> 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 Good day, You could use this [laborious!] trick : In:= pos[fun_, ex_] := And @@ (fun[#] > 0 & /@ (Identity @@@ Extract[ex, Position[ex, fun[__]] ]) ) In:= z = (f[x + y]^2)^(1/2) + (f[x]^2)^(1/2); In:= Assuming[pos[f, z], z // Simplify] Out= f[x] + f[x + y] hth -- Valeri