The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [assumptions]

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

Filter by
Sorted by
Tagged with
33
votes
4answers
6k views

Usage of Assuming for Integration

For some reason, when I enter the following integration in Mathematica Assuming[{k ∈ Integers}, Integrate[ Exp[ I k t], {t, -π, π}]] the result turns out to be 0....
12
votes
2answers
1k views

Why does Integrate declare a convergent integral divergent?

When I try this command Integrate[1/Sqrt[(s^2 - u)^2 - 1], {s, m, Infinity}, Assumptions -> u > 2 && m > 10] Mathematica declares that the ...
13
votes
3answers
7k views

Complex number operations: telling Mathematica variables are real

I want to do Conjugate[a + b*I], but when I do that, the solution is Conjugate[a] - I*Conjugate[b]; when for me, a and b are ...
15
votes
2answers
15k views

How to specify assumptions before evaluation?

If I request mathematica evaluate an integral for me, I'll often get a more general ConditionalExpression than I want. Example : ...
11
votes
1answer
330 views

What exactly does GenerateConditions do?

Consider for example this strange behavior: Integrate[1/x, {x, 0, Infinity}, GenerateConditions -> False] (*0*) I'd also like to know the difference between <...
6
votes
3answers
426 views

Assumptions for RotationMatrix

I'm making C++ program, and in my program I need a rotation matrix around any vector. I wanted to extract RotationMatrix[fi,{x,y,z}] output and put it in my program....
21
votes
2answers
1k views

Why doesn't FullSimplify drop the Re function from an expression known to be real?

For some reason Mathematica does not properly simplify this expression: ...
9
votes
0answers
127 views

When and why are Assuming and Assumptions not equivalent? [duplicate]

In this question there's an example of an integral where using Assuming and Assumptions give different results: ...
3
votes
1answer
118 views

Simplifying expressions with head Max

(I saw: Unable to evaluate reasonable max expression but this seems an even easier case an I thought it worth posting) See the following simplifications of Max operators, which are all very ...
2
votes
2answers
2k views

Simplifying expressions with square roots

I would like Mathematica to simplify this expression: $4 \left(16 \sqrt{\left(-1+2 c^2\right)^2}-32 c^2 \sqrt{\left(-1+2 c^2\right)^2}+\sqrt{\left(1-8 c^2+8 c^4\right)^2}\right)^2$ ...
11
votes
1answer
7k views

How to assume all variables in my code are reals

I won't have any occasion to have any imaginary number in my code. If there are any, that is an error. So allowing the imaginary case simply hinders the equation manipulation and simplification. I ...
8
votes
3answers
261 views

Unknown function with arbitrary arguments assumption

Is it possible to define an assumption like this: $Assumptions=f[__]>0 So that: ...
18
votes
3answers
517 views

Why does Mathematica simplify $x/x\to1$?

If I enter x/x, I get 1. Such behavior leads to this: Simplify[D[Sqrt[x^2], x, x]] 0 ...
9
votes
1answer
3k views

Is it possible to set a variable as a positive one in the whole notebook?

I'm having issues during integration due to the fact that Mathematica doesn't know if an undefined variable is positive or not (it gives me complexes which bothers me in the end). For example I do ...
4
votes
1answer
294 views

Can't simplify Abs[a*Cos[x]]^2

Why doesn't FullSimplify[ Abs[a*Cos[x]]^2, Assumptions -> {{a, x} ∈ Reals}] simplify to (a*Cos[x])^2 but this query <...
6
votes
1answer
983 views

Does the Im function work with symbolic arguments?

Does the Im function work with symbolic arguments? ...
5
votes
2answers
704 views

Replacements/Substitutions in Mathematica

I am a new user of Mathematica and have some questions about the simplifications of calculated expressions. I am unable to attach an image of the session, but my Mathematica commands are: ...
5
votes
1answer
864 views

Simplifying conditional expressions using assumptions does not work

I have a conditional expression f[x_] := x /; x ∈ Reals This works fine for normal numbers and symbols, e.g. ...
2
votes
2answers
766 views

Why doesn't Abs simplify further?

Why does this: Simplify[Abs[x + I], Element[x, Reals]] give me Abs[x + i] Is there a way to force Mathematica to give me ...
9
votes
1answer
2k views

Assumptions on unknown functions

I'm trying to do analytic calculations in a quantum mechanic harmonic oscillator basis. Specifically I want to be able to evaluate functions of the many particle density. I define the following ...
10
votes
1answer
524 views

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 ...
8
votes
4answers
788 views

Attaching persistent assumptions to symbol definition

Is it possible to attach assumptions to a symbol? This relates to this question. Most of my work involves physical equations, i.e. there are basic assumptions on variables that will always hold true (...
15
votes
5answers
989 views

Does $x>0$ imply that $x\in\mathbb{R}$?

Let’s assume I input Assuming[x > 0, expression] Is it assumed by Mathematica that $x$ is a real number? Or that the real part of $x$ is positive? Something ...
10
votes
1answer
1k views

Is my expression too complicated for FullSimplify or am I doing something wrong?

I have a messily defined function $v(h, w)$ with $h, w \in \mathbb{R}$ and with a removable singularity at $h=1/2$, and I am trying to prove some of its properties using Mathematica. In particular I ...
7
votes
4answers
2k views

Mathematica gives wrong answer for an integral

When I execute the following, Integrate[ Exp[-w^2 + I w^3], {w, -∞, ∞}] I get (2 E^(2/27) BesselK[1/3, 2/27])/(3 Sqrt[3]) ...
4
votes
1answer
1k views

Prove (or check) an expression is positive given constraints on variables?

I'm trying to figure out whether an expression is always positive given positive parameters. When the expression is complicated, I can't do this by eye. Is there any way to make Mathematica prove (...
2
votes
1answer
408 views

How to select TransformationFunctions based on Assumptions made when using Simplify?

I am re-writing the question using a very simple example so not to confuse matters with the another question being asked where I used the example from there. In general, how to add logic to switch ...
4
votes
1answer
135 views

Using Inequality Assumptions

I'm having getting Mathematica to use my inequality assumptions. Here's a simple example: $Assumptions = (v-w*x+y*z)>0 FullSimplify[Sign[(v-w*x+y*z)]] Output:...
4
votes
3answers
2k views

Conjugating symbolic expression [duplicate]

I am trying to conjugate a symbolic expression, and I have explicitly stated the real terms. However, I simply can't get it to work: ...
1
vote
1answer
99 views

How to define a complex function with assumptions?

I'm trying to define a complex function to be able to do analytic calculations. Specifically, I want to define a function $A(x,t)$ in the complex plane with argument $\theta(x,t)$ and modulus $R(x,t)&...
7
votes
0answers
213 views

What is a “generic case”?

Introduction With this question I am coming back to a long-standing issue I have with Mma's concept of a "generically correct" result. The basic idea seems to be, vaguely, that if a result is true in ...
5
votes
0answers
88 views

External and internal Assumptions on `PiecewiseExpand` and `Mod`

After this question I'm intrigued about the different behaviors depending where and how the assumptions are given. ...
4
votes
2answers
314 views

Assumptions with patterns

I want that Mathematica assumes every symbol like Subscript[s,i] to be evaluate as a real and positive number. I have tried ...
4
votes
0answers
139 views

Puzzled by Assumptions [duplicate]

I don't know if this has already been discussed. Integrate[BesselJ[2 m + 1, x], {x, 0, ∞}, Assumptions -> m ϵ Integers] ...
2
votes
1answer
230 views

How to properly interpret a seemingly contradictory result in Mathematica?

I have a problem with interpreting the results of my notebook outputs. It is important that I do not err with the interpretation. Here is the full input: ...
1
vote
1answer
152 views

How to simplify an expression with assumptions

I have a matrix of the form: Tvol // TraditionalForm $$\left( \begin{array}{ccc} 1 & \frac{\delta I_1(\kappa )}{I_0(\kappa )} & 0 \\ \frac{I_1(\...
1
vote
1answer
73 views

Why is the function assuming not taken in consideration?

In the following code, I assume that my variables are strictly positive. However, mathematica doesn't take this in consideration when it evaluates the If : the If is still in a non simplified form. ...
27
votes
1answer
494 views

Are greek symbols causing different evaluation?

I've updated today to Mathematica 9.0.1.0 from version 8 and found something that absolutely confuses me. Let us define a piecewise function: ...
14
votes
4answers
11k views

Defining the domain of positive real numbers

I am trying to solve an equation by assuming that all the variables are real and strictly positive. I can use the keyword Reals for the argument ...
7
votes
2answers
199 views

Problem with Simplify, Sqrt, and Set: What's going on?

I am having some trouble getting Mathematica to simplify an expression of the form Sqrt[x]*Sqrt[1/x], where x>0. The problem ...
9
votes
2answers
170 views

Problem with Identifying Complex Components

I am trying to isolate out the real and complex terms in a fairly large expression. During the process, I have made several assumptions that last throughout the entire process. ...
8
votes
5answers
697 views

simplifying $\frac{\log x^a}{a} = \log x$

If one makes the assumptions $x>0,a>0$, then $\frac{1}{a}\log x^a = \log x$. Thus, in Mathematica, Simplify[1/a*Log[x^a], {a > 0, x > 0}] returns ...
5
votes
1answer
2k views

Can I check if an expression is positive using assumptions?

I have the following notebook: ...
5
votes
0answers
191 views

Calculating a limit with a result that is discontinuous in the parameters

The following limit is left unevaluated (Edit: added the assumption that $\epsilon$ is real thanks to the comment below): ...
4
votes
2answers
166 views

Inconsistent results for equivalent converging symbolic integrals

Bug introduced in 9.0 or earlier and persisting through 11.0.1 or later I have looked at previous questions and I'm aware that this seems to be a known bug: Mathematica giving inconsistent results ...
3
votes
2answers
115 views

Simplify with assumption of unknown function [duplicate]

I have an unknown multivariate function entry[x,y,z], which is positive. Then how to get FALSE and entry[1,2,3] in the following evaluations? ...
3
votes
2answers
118 views

Detecting operator Set in Assumptions

Here is a typical issue: Simplify[x + y, x = y] produces 2 True. Is there a way to detect operator ...
2
votes
2answers
127 views

FullSimplify a trigonometric expression doesn't work as expected

I know this kind of question is frequent asked, yet each case has its own particularities. I will show my problem. I define the following: ...
10
votes
1answer
251 views

Linearity Assumption [duplicate]

I'd like to define a set of variables of this sort: {K1[t],K2[t],...} Adding a general assumption: all such variables are linear. I'd like to do this to avoid ...
5
votes
2answers
207 views

Well-defined symbolic integral leading to ConditionalExpression

I would like to determine a closed-form expression for the following symbolic integral $$ \int_{-1/2}^{1/2} \!\!\!\! \mathrm{d} x \int_{-1/2}^{1/2} \!\!\!\! \mathrm{d} y \, \frac{1 + b x + c y}{1 + e ...