Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have the following code:

$Assumptions = {x > 0}
b[x_] := x^2
b'[x] > 0

In my (very basic) understanding of Mathematica, this should give me me the Output True, but I get 2 x > 0.

I also tried b[x_] := x^2 /; x > 0 and Assuming[x > 0, b'[x] > 0]. I've searched the mathematica help, but without success. What's my basic error and how do I get the desired output?


EDIT: The original question is answered, now I wanted to adapt this solution to two variables:

c[x_, y_] := x^2 + y
$Assumptions = {y > 0}
$Assumptions = {x > 0}
Simplify[c[x, y] > 0]

It follows the same logic as the first case, where I now get the desired output, but why not here? I realize that these are probably typical beginners questions, so if you could explain the logic to me or give me a hint where to read up upon this stuff? Neither the Mathematica help nor my university's (very short) guidebook are sufficient for my understanding.

share|improve this question
2  
Have you tried Simplify[b'[x] > 0, x > 0] ? –  J. M. Apr 27 '11 at 9:43
    
Simplify works well on the very first result (2x >0). –  Phira Apr 27 '11 at 9:46
    
@J.M. and @user9325 Thanks guys... Can you post this as an answer so I can upvote and accept? –  meep.meep Apr 27 '11 at 10:20
1  
$Assumptions = {x > 0} overwrites $Assumptions = {y > 0}. Try $Assumptions = x > 0 && y > 0. –  J. M. Apr 27 '11 at 10:46
add comment

1 Answer

up vote 4 down vote accepted

Your first code

$Assumptions = {x > 0}
b[x_] := x^2
b'[x] > 0

works fine if you apply

 Simplify

to the result (2x > 0).

Edit: For completeness, I also add the answer of J.M in the comment to the second question.

 $Assumptions = {x > 0} 

overwrites

  $Assumptions = {y > 0}. 

Try

$Assumptions = x > 0 && y > 0.
share|improve this answer
    
Thanks!!! Can you by chance also answer my edited question? That'd be great! –  meep.meep Apr 27 '11 at 10:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.