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

14
votes
2answers
2k 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
691 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 ...
11
votes
1answer
217 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 ...
1
vote
2answers
1k 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$ ...
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 ...
16
votes
2answers
913 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: ...
6
votes
0answers
84 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: ...
4
votes
1answer
690 views

Does the Im function work with symbolic arguments?

Does the Im function work with symbolic arguments? ...
7
votes
3answers
127 views

Unknown function with arbitrary arguments assumption

Is it possible to define an assumption like this: $Assumptions=f[__]>0 So that: ...
10
votes
1answer
800 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
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]) ...
14
votes
3answers
294 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
785 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 ...
8
votes
5answers
554 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 ...
4
votes
1answer
210 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 ...
2
votes
1answer
328 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 ...
26
votes
1answer
453 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: ...
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
476 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 ...
2
votes
1answer
285 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 ...
5
votes
0answers
133 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): ...
3
votes
2answers
95 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 ...
5
votes
2answers
550 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: ...
4
votes
2answers
182 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
76 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
196 views

Why does Assuming for Integrate not work as expected?

I'm trying to perform the following integral with Mathematica 7: ...
3
votes
1answer
156 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}] ...
2
votes
1answer
166 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: ...
2
votes
3answers
642 views

DSolve will not apply assumption m ∈ Integers

I am trying to solve a linear second order ODE using DSolve which involves an arbitrary integer m. ...
2
votes
2answers
326 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 ...
1
vote
1answer
110 views

Simplifying using assumptions

Is there a way to simplify the following equation (-p(a-x)((a-b)P(b-x)+Q(b+x)(a-b+2x))+q(a+x)(-(a-b)Q(b+x)+P(b-x)(-a +b+2x)))/((b-x)(-a + x)(a+x)(b+x)) assuming ...
0
votes
1answer
134 views

How do I declare that a variable represents a real number?

How do I tell Mathematica that a variable is a real number. I searched for this question here and in Google and nothing that was suggested seems to work for me. I must be missing something. My code is ...
0
votes
1answer
169 views

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

Let's say that $x$ is some real valued number $>0$. Are the following commands interchangeable in the context of using Assuming? ...
0
votes
2answers
416 views

Integrating hat functions

I am trying to integrate a hat function for a project that I am doing and have found a method to do so but I find it sloppy. Currently I have the basis function ...
0
votes
1answer
322 views

Get Mathematica to simplify $\cosh(i x)$ [closed]

I want Mathematica to simplify Cosh[I x] to Cos[x] if I tell Mathematica that x is Real. I ...