Questions tagged [assumptions]

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

Assumptions are used to indicate membership of domains (Integers, Reals) or other relationships that hold for certain variables.

546 questions
11
votes
1 answer

Is it possible to add some pattern to $Assumptions

I apologize if it is a too elementary question but I could not find the appropriate documentation so far. My goal is simple. I would like to add some assumptions that are defined in terms of patterns rather than symbols. For example, I would like…
Sungmin
  • 2,285
  • 15
  • 23
9
votes
3 answers

Unknown function with arbitrary arguments assumption

Is it possible to define an assumption like this: $Assumptions=f[__]>0 So that: Simplify[f[x]+3==0] (*False*) Simplify[f[a,b,c]+4==0] (*False*) Etc... The way above doesn't work, but is intended to show what I want to do. I have this function…
Giovanni F.
  • 1,911
  • 13
  • 20
7
votes
1 answer

How to best add assumption that many variables are positive?

I often need to check whether integrals are solvable in closed form and use a notebook with 5–10 variables that need to be assumed positive. Is there a better way of doing this than adding the clunky line: $Assumptions=a>0&&b>0&&c>0&&d>0&&f>0; ? I…
WillG
  • 960
  • 4
  • 14
5
votes
1 answer

Problem with general assumptions

I hope I am not to redundant with my questions. As part of solving a physical problem, I want to assume once and for all that all my variables and parameters are real, positive and finite. Is it possible make such assumptions for all Mathematica…
Peter
  • 51
  • 1
5
votes
3 answers

How can I specify the assumption 'a' is much greater than 'b' (a>>b) in Mathematica?

I want to evaluate an expression of type 1/(r-2 m), assuming r >> 2 m. This is regarding black hole physics and r = 2 m is the Schwarzschild radius. But I am working on something where I need to evaluate a similar type of expression assuming r >> 2…
apk
  • 307
  • 1
  • 8
4
votes
1 answer

How do I apply assumptions to a module (or any CompoundExpression)?

Edit: I am looking for a way to apply assumptions to all expressions contained in a compound expression. For example, f[x_] := CompoundExpression[Clear[n], If[x > 0, n = 1, n = 2], Array[#1 &, n]]; Output of this function is supposed to be an…
Arturs C.
  • 141
  • 3
4
votes
0 answers

Assuming monotonicity and concavity

I have an expression that I would like to evaluate: 2 phi''[1 + a (-1 + u[10])] phi'[q]^3 > phi''[q] phi'[q] phi'[1 + a (-1 + u[10])]^2 Is there any way of telling Mathematica that the function phi is strictly increasing and convex?
RoyalTS
  • 249
  • 1
  • 5
4
votes
1 answer

How to check the assumptions attached to a given symbol?

Suppose there are a number of assumptions attached to a certain symbol. How do we query Mathematica to see if a given assumption holds? To be more precise, how can we define a function elementQ such that Block[{$Assumptions = Element[x, Reals]},…
glS
  • 7,623
  • 1
  • 21
  • 61
3
votes
2 answers

Why does Assuming[...] work in one case but not in another?

Why does this work Assuming[α > 0 && ϵ > 0 && t > 0, FullSimplify @ Integrate[(z^2 Exp[-α t (z^2 + ϵ)])/(z^2 + 1), {z, 0, ∞}]] (E^(-t α ϵ) (Sqrt[π] - E^(t α) π Sqrt[t α] Erfc[Sqrt[t α]]))/(2 Sqrt[t α]) but not this? MyAssumptions := Assuming[α…
user6677
  • 81
  • 3
3
votes
2 answers

simplify assuming a variable equals zero

How can one simplify an expression by assuming that one of the variables is equal to zero? For instance, while Simplify[%,a>0] gives the desired output, Simplify[%,a=0] produces the following error: $Assumptions::bass: 0 is not a well-formed…
user001
  • 1,397
  • 3
  • 14
  • 19
3
votes
1 answer

Assuming a variable is imaginary

I am confused how to assume a variable is pure imaginary. As a test example, I used the code Assuming[{ x \[Element] I Reals}, Simplify[x + Conjugate[x]]] In the above, "I" means the imaginary unit. I find that it does not return me 0, but just x…
user34104
  • 251
  • 1
  • 6
3
votes
0 answers

List vs. && in Assumptions

When one gives values to the $Assumptions variable, it seems to not matter whether you separate the conditions with && or just give is a list of the conditions (see below). Is there any subtle difference I am not catching? Remove["Global`*"]…
ions me
  • 881
  • 5
  • 11
3
votes
2 answers

Making the assumption that variables are real

I have a problem with using Assumption. The question arises when I try generating matrix with rolling code: vect = {α, 1 - α, 0, 0, d, -Id }; prod0 = {vect}; prod1 = Transpose[prod0]; Assumptions -> {α > 0, α ∈ Integers, d > 0, d ∈ Integers}; matrix…
Unbelievable
  • 4,847
  • 1
  • 20
  • 46
3
votes
1 answer

Restrict list to reals for statistics

I get conjugates in output when running this: Clear[X]; X:={x1,x2,x3}; Assuming[{Element[X, Reals]},StandardDeviation[X]] What is wrong with the code?
Student4K
  • 269
  • 1
  • 4
2
votes
1 answer

Limits with assumptions

I have an example where Mathematica is not able to compute limits in a function restricted to assume that the input parameter is Real. I don't understand why this is so. 1. Could someone explain why this is a problem? 2. Is there a way to get around…
Siva
  • 323
  • 4
  • 10
1
2 3 4