Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 12

Questions about the function Assuming[], the $Assumptions system variable, and the Assumptions option of functions such as Simplify[] and Integrate[].

2 votes
Accepted

Re[x] vs. x ∈ Reals in the context of Assuming

No. Re[x] > 0 means that the real part of x is positive, but it does not mean that the imaginary part is zero. Re[1+I] > 0 but 1+I is not real. However, x > 0 is sufficient and (in Mathematica) imp …
Szabolcs's user avatar
  • 236k
5 votes
Accepted

Hidden limitation of Assumptions (Is $x^2 < 0$ contradictory)?

A shorter example is $Assumptions = x^2 < 0 During evaluation of $Assumptions::cas: Warning: contradictory assumption(s) x^2<0 encountered. (* x^2 < 0 *) Other functions, such as Reduce, also make … similar automatic assumptions. …
Szabolcs's user avatar
  • 236k
2 votes

Assumptions about list elements

It is not Assuming that supports general patterns, but Element. This explains why Assuming[x > 0, Refine@Sign[x]] gives 1, while Assuming[x[_] > 0, Refine@Sign[ x[1] ]] does not.
Szabolcs's user avatar
  • 236k
1 vote
Accepted

One more question about Assumptions and Integrate

For definite integrals this won't be a problem though as that complex constant is cancelled: Integrate[1/x, {x, a, -1}, Assumptions -> a < -1] (* ==> -Log[-a] *) …
11 votes
Accepted

Defining the domain of positive real numbers

There's a misunderstanding here. The third "dom" argument is not simply a set over which we solve the equation. There are only a few choices that can be used for the domain argument, and they have v …
Szabolcs's user avatar
  • 236k
2 votes
Accepted

How to submit assumptions defined in master kernel to subkernels

$Assumptions cannot be distributed because it is in the System` context and because it is a symbol with special behaviour. The correct way to handle this is to set it explicitly on all subkernels. … ParallelEvaluate[$Assumptions = m > 0 && m \[Element] Integers] …
Szabolcs's user avatar
  • 236k
3 votes
Accepted

How to properly input limit of real function of real variable?

(* Limit[Log[x]^x, x -> 0, Assumptions -> Log[x]^x ∈ Reals] *) More examples From below: Limit[Sqrt[x], x -> 0, Direction -> 1, Assumptions -> Sqrt[x] ∈ Reals] During evaluation of Limit::cas: Warning … Assumptions -> Sqrt[x] ∈ Reals] (* 0 *) …
Szabolcs's user avatar
  • 236k
18 votes
Accepted

How can I use assumptions with FindRoot?

I would call these constraints, not assumptions. …
Szabolcs's user avatar
  • 236k
29 votes
Accepted

How to assume all variables in my code are reals

You can do something like this: Simplify[Sqrt[x^2]] (* Sqrt[x^2] *) $Assumptions = _ ∈ Reals (* _ ∈ Reals *) Simplify[Sqrt[x^2]] (* Abs[x] *) This tells those functions that have an Assumptions option … There are other functions which do not have an Assumptions option but can still work with reals only. These will have a "domain" option, which can be set to real. …
Szabolcs's user avatar
  • 236k