0
$\begingroup$

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. >>

$\endgroup$
  • $\begingroup$ Reduce[g[x] + 2 >= 0] $\endgroup$ – Rojo Jan 4 '14 at 4:38
  • 1
    $\begingroup$ 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. $\endgroup$ – ciao Jan 4 '14 at 5:19
  • 1
    $\begingroup$ @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. $\endgroup$ – AGB Jan 4 '14 at 5:44
  • $\begingroup$ Surely! One moment... $\endgroup$ – ciao Jan 4 '14 at 5:50
1
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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