Message Boards Message Boards

0
|
6780 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

How to define a derivative to be positive?

Posted 10 years ago

Hi,

I'm trying to define the derivative of a function H to be positive. I'm using

H/:Positive[H'[x]]=True

But I get the error

TagSetDelayed::tagpos: Tag H in Positive[H'[x]] is too deep for an assigned rule to be found.

I also tried defining a new function Hp which is H':

Hp=H'
Hp /: Positive[Hp[x]] := True

But then I get:

TagSetDelayed::tagnf: Tag Hp not found in Positive[H'[x]].

I also tried wrapping Hp in Hold, but I get the "too deep" error as before.

How can I declare it to be positive?

POSTED BY: Miguel Olivo-V

Easy, type

In[11]:= Positive[Derivative[1][h][x_]] ^:= True

and check

In[12]:= Positive[h'[p]]
Out[12]= True

In[13]:= NonNegative[h'[p]]
Out[13]= NonNegative[Derivative[1][h][p]]

In[15]:= Negative[h'[q]]
Out[15]= Negative[Derivative[1][h][q]]

In[16]:= Positive[k'[p]]
Out[16]= Positive[Derivative[1][k][p]]

In[19]:= Positive[h''[q]]
Out[19]= Positive[(h^\[Prime]\[Prime])[q]]

In[32]:= Positive[h'[q, p]]
Out[32]= Positive[Derivative[1][h][q, p]]
POSTED BY: Udo Krause
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract