# Solve Always with Assumptions

How can I use the SolveAlways function imposing some assumption on the parameter space of the symbolic variables?

• SolveAlways[{eqns, assumptions}, variables]? – J. M.'s technical difficulties Oct 7 '15 at 0:06
• Ddi not work. Dou mean something in the line of: SolveAlways[{x^2-1==0,Assumptions->x>0},{x}]? – user191919 Oct 7 '15 at 17:09
• @user191919 Are you still looking for an answer? – zhk Feb 19 '17 at 13:38

In your case Solve is enough. Assumptions are not described in the documentation.

Solve[x^2 - 1 == 0 && x > 0, x]


$\{\{x\to 1\}\}$

As pointed out in the documentation, SolveAlways does not solve for the unknowns. Instead, it finds parameter values for which the set of equations is always satisfied (for all values of unknowns), as in the example:

SolveAlways[a x + b == 0, x]


{{a->0,b->0}}

This tells you that for a=0 and b=0 the equation a x + b == 0 is always satisfied, regardless of the value of x.

If you want to solve an equation with some restriction on the variable domain (field in which the unknown lives), then you can supplement the constraint to the Solve function using the && operator. For example:

Solve[x^3 + 1 == 0, x]


{{x -> -1}, {x -> (-1)^(1/3)}, {x -> -(-1)^(2/3)}}

vs

Solve[x^3 + 1 == 0 && x \[Element] Reals, x]


{{x -> -1}}

Hope this helps.