Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have two functions of x, f and g. f[x] = g[x] + 2, but the exact form of g[x] is unknown. It is known that g[x] is well-formed, positive, continuous, differentiable, etc., but an exact representation is unknown.

What I would like to find are the conditions under which f[x] is positive. This is clearly whenever g[x] > -2, however, when I use SolveAlways:

f[x_] = g[x] + 2
SolveAlways[f[x] >= 0, x]

I get:

SolveAlways::eqf: 2 + g[x] < 0 is not a well-formed equation. >>

share|improve this question
    
Reduce[g[x] + 2 >= 0] –  Rojo Jan 4 at 4:38
1  
SolveAlways is not used when inequalities are involved - see the documentation. Reduce[f[x] == g[x] + 2 && f[x] > 0, Reals] will give you what you want. –  rasher Jan 4 at 5:19
1  
@rasher Could you provide an answer instead of a comment so I can mark this question as answered? Thanks! For whatever it is worth, I had read the help documentation but I thought that since != were used in the examples then inequalities would be alright as well. –  AndrewBorrasso Jan 4 at 5:44
    
Surely! One moment... –  rasher Jan 4 at 5:50

1 Answer 1

up vote 1 down vote accepted

SolveAlways is not used when inequalities are involved - see the documentation.

Reduce[f[x] == g[x] + 2 && f[x] > 0, Reals] 

will give you what you want.

share|improve this answer
    
if you could take a look at a less trivial follow up question, I would be very grateful. Reduce Cannot Solve Complicated Function –  AndrewBorrasso Jan 4 at 6:11

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.