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

learn more… | top users | synonyms

26
votes
0answers
373 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: ...
21
votes
4answers
868 views

An apparently “simple” limit?

Let $c$ and $h$ be real values. I was using Mathematica to compute the limit $(h \rightarrow \infty)$ of the following expression: $$ \frac{\left(h^2 +c^2 h^2 + \sqrt{4 h^2+\left(h^2+c^2 ...
19
votes
2answers
857 views

Optimization with assumptions

I have the following problem, when I am trying to optimize function with pre-defined assumptions. I am using Mathematica 8 and I wrote the following simple code ...
16
votes
2answers
843 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: ...
14
votes
2answers
340 views

How to make use of NumericQ[x] = True (and use it safely)?

Basic Issue: I'm trying to understand the proper use of NumericQ's "magical" capabilities. Please consider the examples below. Actual question and some links are ...
14
votes
3answers
265 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 ...
13
votes
5answers
767 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 ...
13
votes
2answers
1k 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 ...
12
votes
2answers
7k 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
2answers
1k views

Maximizing a function with assumptions

Using f[s_] := Log[(s/r)^α ((α - 2) n0 r^α + 2 π Pmax ρ r^2) /((α - 2) n0 s^α + 2 π Pmax ρ s^2)]/s When I run the following line: ...
11
votes
1answer
183 views

Keeping Integrate from making unnecessary assumptions

I would like to evaluate the integral $\int_{-\infty}^\infty \mathrm{d}x \, \exp\left(- a x^2 - x^4\right)$ for any real value of $a$. Mathematica 8.0.4 gives the following result: ...
10
votes
3answers
404 views

Reduce can't reduce an equation without appropriate assumptions

When there are three unknowns (x, y, z), Mathematica can solve it: ...
10
votes
2answers
623 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 ...
10
votes
1answer
733 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 ...
10
votes
0answers
253 views

Simplify and Sqrt, inconsistent behavior?

I have encountered some problems when using Simplify with expressions containing a square root and isolated a following test case ...
9
votes
1answer
252 views

Limit of sequence of functions behaving strange

I'm trying to determine the limit of the sequence of functions $$f_n(x)=\left(\frac{1}{\pi}\arctan(n x) + 1/2\right)^n. $$ I define ...
8
votes
5answers
540 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 ...
8
votes
1answer
2k 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 ...
8
votes
1answer
173 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 ...
8
votes
1answer
1k 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 ...
7
votes
4answers
1k 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]) ...
7
votes
4answers
445 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 ...
7
votes
3answers
115 views

Unknown function with arbitrary arguments assumption

Is it possible to define an assumption like this: $Assumptions=f[__]>0 So that: ...
7
votes
1answer
80 views

Inconsistent results for Integrate depending on irrelevant assumptions

I stumbled across this amusing issue today when doing some definite integrals: ...
6
votes
0answers
83 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: ...
5
votes
2answers
516 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
3answers
159 views

Assuming reals of unknown variables in a Matrix valued function

I am trying to write a generic matrix valued function in a package, of the form: f[matrix_] := Module[...] My problem is that I want to accept any matrix, but ...
5
votes
1answer
91 views

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 ...
5
votes
1answer
332 views

Use Pattern with Vectors in Assumptions

I had a problem using Pattern with Vectors in Assumptions. Here's how I use ...
5
votes
0answers
57 views

SumConvergence fails in version 10

SumConvergence[(-1)^(n + 1) ((Cos[n^2] + Sin[n + 2])/7^n), n] Mathematica fails to provide a result (true/false) but wolfram alpha works. What should I do ? It ...
5
votes
0answers
202 views

Integrate wrong for absolute value of trig function

I was trying to get $\int_0^1 \lvert \cos(2 \pi k x) \rvert \,\mathrm{d}x$ for $k \in \mathbb{Z}$, and was surprised by the result (using Mathematica 10.0.1.0): ...
5
votes
0answers
127 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
172 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 ...
4
votes
2answers
122 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 ...
4
votes
1answer
667 views

Does the Im function work with symbolic arguments?

Does the Im function work with symbolic arguments? ...
4
votes
1answer
283 views

Can I check if an expression is positive using assumptions?

I have the following notebook: ...
4
votes
1answer
199 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 ...
4
votes
1answer
220 views

Assumptions seem not to be considered

In the following a,b is a probability distribution, i.e. a+b==1 with ...
4
votes
1answer
133 views

Mathematica does not help in this integral

I am trying to solve this integral with assumptions: ...
4
votes
2answers
121 views

Inconsistent results for equivalent converging symbolic integrals

I have looked at previous questions and I'm aware that this seems to be a known bug: Mathematica giving inconsistent results for symbolic integrals done in different ways. The origins for the bugs ...
4
votes
1answer
193 views

Why does Assuming for Integrate not work as expected?

I'm trying to perform the following integral with Mathematica 7: ...
4
votes
2answers
170 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
1answer
71 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 is that x is assigned to some complicated form by the time Mathematica ...
4
votes
1answer
1k views

Use of $Assumptions [duplicate]

I don't really understand the behaviour and the usage of $Assumption. For instance, when I set $Assumptions = λ > 0, I expect ...
4
votes
2answers
140 views

Strange behavior of Integrate

I'm trying to calculate the following integral using Mathematica 9.0.1.0 a11=Integrate[Abs[Sin[b+x]],{x,0,2*\[Pi]}] This should be a simple problem; however, it ...
4
votes
1answer
1k views

Is it possible to impose “Assumptions” in DSolve or equivalent? (differential equation solving)

When DSolve tries to solve differential equations, it is sometimes not smart enough to generate conditions according to different possible value of parameters. ...
3
votes
2answers
897 views

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, ...
3
votes
2answers
105 views

Assumptions within Simplify

I am using the ratio between two error probabilities in various functions. I want Mathematica to display this ratio in the most simple manner. How do I let Mathematica know that, in this case, the ...
3
votes
1answer
155 views

Double Integral and Assumptions

I'm afraid this is going to be a really stupid question. Evaluating the following definite integral Integrate[Sqrt[1 - (x^2 + y^2)], {x, -1, 1}, {y, -1, 1}] ...
3
votes
2answers
90 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 ...