开发者

"Not well-formed equation" using Mathematica's Solve

开发者 https://www.devze.com 2023-03-11 18:03 出处:网络
First time using stackOverflow. :) I\'m trying to use mathematica to solve some simply polynomial equations (let\'s say in one variable) with constraints 开发者_StackOverflowon the variable, e.g |x|

First time using stackOverflow. :)

I'm trying to use mathematica to solve some simply polynomial equations (let's say in one variable) with constraints 开发者_StackOverflowon the variable, e.g |x| < 1.

When I try something like:

Solve[x^2 == 4 && x^2 < 1, x]

I get an error stating that "x > 0 is not a well-formed equation".

The mathematica solve page even suggests this syntax on its second to last example, so I'm quite confused. (If it's relevant, I have version 7.) Any help would be appreciated.

Thanks!


Solve is not supposed to solve inequalities (M7). You can use Reduce to do that:

In[2]:= Reduce[x^2 == 4 && x^2 < 1, x]

Out[2]= False

Here is an example with Solve:

In[4]:= Solve[x^2 == 4 && x^4 == 16, x]

Out[4]= {{x -> -2}, {x -> 2}}


In Mma v 8:

{Solve[x^2 == 4 && x^2 < 1, x],
 Solve[x^2 == 4 && (-1 < x < 1), x]} 

(* 
->{{},{}}
*)
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号