|
[Date Index]
[Thread Index]
[Author Index]
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: <id2emr$d88$1@smc.vnet.net>
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[1]:= pos[fun_, ex_] := And @@ (fun[#] > 0 & /@
(Identity @@@ Extract[ex, Position[ex, fun[__]] ]) )
In[2]:= z = (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]
hth
--
Valeri
Prev by Date:
basic pattern matching
Next by Date:
Re: Matrix Form of Quadratic Equations
Previous by thread:
How to assume that a function is positive?
Next by thread:
multiple outputs from compiled function
|