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

21
votes
4answers
814 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 ...
20
votes
0answers
255 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: ...
19
votes
2answers
765 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
752 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
3answers
233 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
749 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 ...
13
votes
2answers
295 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 ...
11
votes
2answers
5k 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
177 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
374 views

Reduce can't reduce an equation without appropriate assumptions

When there are three unknowns (x, y, z), Mathematica can solve it: ...
10
votes
1answer
612 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 ...
9
votes
0answers
217 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
213 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
518 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
2answers
525 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 ...
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
1answer
980 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 ...
6
votes
4answers
390 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 ...
6
votes
1answer
143 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
1answer
58 views

Inconsistent results for Integrate depending on irrelevant assumptions

I stumbled across this amusing issue today when doing some definite integrals: ...
6
votes
0answers
80 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
468 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
139 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
3answers
91 views

Unknown function with arbitrary arguments assumption

Is it possible to define an assumption like this: $Assumptions=f[__]>0 So that: ...
5
votes
1answer
281 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
152 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
120 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
158 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
1answer
606 views

Does the Im function work with symbolic arguments?

Does the Im function work with symbolic arguments? ...
4
votes
1answer
199 views
4
votes
1answer
184 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
210 views

Assumptions seem not to be considered

In the following a,b is a probability distribution, i.e. a+b==1 with ...
4
votes
2answers
118 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
182 views

Why does Assuming for Integrate not work as expected?

I'm trying to perform the following integral with Mathematica 7: ...
4
votes
1answer
64 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 ...
4
votes
1answer
974 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
136 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
769 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
104 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
138 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
86 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 ...
3
votes
1answer
198 views

One Integral — Two Results

I compared Mathematica's default integral evaluation to what you get by computing the indefinite integral and then plugging in the limits. (I did this because the latter approach was much faster for ...
3
votes
1answer
94 views

How to use Assuming and If together?

I would like to compare variables t and u and print either Yes or ...
3
votes
2answers
71 views

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, ∞}]] ...
3
votes
1answer
115 views

Problem with limit that requires L'Hôpital's rule to compute

Consider the following limit. Limit[(a - Sqrt[a^2 + x])/(a^2 - a*Sqrt[a^2 - x]), x -> 0, Assumptions -> {a > 0}] Mathematica 9.0.1.0 gives ...
3
votes
1answer
66 views

Restricting a plotted expression to reals in a Manipuate

I have an expression from which I'm trying to create a plot that I can manipulate. The expression contains Abs, and I only want to have it evaluated for reals. What ...