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

3
votes
1answer
33 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 ...
1
vote
3answers
91 views

IntegerQ returning False despite setting Assumptions

Why does the following not return True? Assuming[z ∈ Integers, IntegerQ[z]] False I tried this on a fresh session of ...
1
vote
1answer
48 views

How to make strong assumptions?

Or put in another way, how to make a variable behave as it belongs to a specific domain, even outside the use of simplify or other commands alike? For example: ...
1
vote
1answer
42 views

Assuming variable is plus or minus 1

I have a long calculation that I am doing, which involves a particular variable h, which in the end, is either +1 or -1. (I would like a general result that is true for both cases.) Since h only ...
1
vote
0answers
74 views

Simplifying $e^x>1$, is this a bug?

Simplify[Exp[x] > 1, x ∈ Reals] results in no simplification, although Reduce[Exp[x] > 1, x, Reals] correctly ...
1
vote
1answer
47 views

Defining a matrix with the symmetry Transpose[A(q)]=A(-q)

I am trying to construct a symbolic matrix with the following property- $$ \left(D_{3\times3}(q)\right)^T = D_{3\times3}(-q) $$ Note that for $q\in \mathbb{R}$, $D(q)$ would be hermitian. So far i ...
5
votes
0answers
49 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 ...
2
votes
1answer
64 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. ...
0
votes
1answer
46 views

Assuming: what am I doing wrong? [duplicate]

Why doesn't this simple line work? Assuming[Element[#, Reals] & /@ {x}, Reduce[x^4 == 1]] (* x==-1||x==-I||x==I||x==1 *) I'm trying to do something a little ...
1
vote
1answer
42 views

VectorFieldPlot Assumptions - restricted domain

I would like to plot the 2-D vector field: VectorFieldPlot[{ x/Sqrt[x^2 + y^2], y/Sqrt[x^2 + y^2]}, {x, -5, 5}, {y, -5, 5} ] but I encounter zero division at ...
2
votes
0answers
51 views

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, ...
0
votes
0answers
38 views

Using assumptions when calling Simplify from Collect

I am quite new to Mathematica, so please be patient ;) I have a very long equation that I have to sort for powers of a variable called e and that I want to ...
7
votes
1answer
69 views

Inconsistent results for Integrate depending on irrelevant assumptions

I stumbled across this amusing issue today when doing some definite integrals: ...
0
votes
0answers
49 views

Piecewise functions Integration with symbol

I want to integrate one piecewise functions as following, ...
5
votes
3answers
94 views

Unknown function with arbitrary arguments assumption

Is it possible to define an assumption like this: $Assumptions=f[__]>0 So that: ...
0
votes
1answer
83 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 ...
5
votes
0answers
172 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
3answers
151 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 ...
1
vote
1answer
47 views

How to use many global assumptions [closed]

I would like to use many global assumptions. Say I have two global assumptions. $Assumptions = 0 < a < 1 $Assumptions = 0 < b < 1 Then I would like ...
3
votes
1answer
99 views

How to use Assuming and If together?

I would like to compare variables t and u and print either Yes or ...
1
vote
1answer
61 views
5
votes
1answer
76 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
227 views

Can I check if an expression is positive using assumptions?

I have the following notebook: ...
1
vote
1answer
186 views

Appending to $Assumptions - Error “Nonatomic expression expected” [closed]

I need to use lots of assumptions in my code. Therefore I put them into the $Assumptions variable. When I do it like this, all is well: ...
0
votes
0answers
53 views

Getting long complex-valued integrals when simpler real-valued expressions exist

I have a long list of real-valued functions I'd like to integrate symbolically. For many of them, Mathematica gives me results with long complex-valued expressions involving weird functions such as ...
14
votes
3answers
250 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 ...
3
votes
2answers
74 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, ∞}]] ...
1
vote
1answer
47 views

PiecewiseExpand doesn't take all kind of assumptions

Running PiecewiseExpand[expr, assum] does not work with all kind of assumptions. For example, the following line will not split the expression with absolute values in the chambers, considering m1=m2. ...
0
votes
0answers
32 views

Assumptions for simplifying a long equation

I'm having trouble combining assumptions with the execution of Simplify in a long equation. The idea is to separate imaginary and real parts of a complex equation. ...
0
votes
0answers
21 views

Assumption for all the notebook [duplicate]

I would like to know how to fix an assumption over a variable that will be fixed for all notebook. For example a>0 in all the notebook.
0
votes
0answers
57 views

Making sense of output of Assuming/Refine

I have a conditional statement as output: ...
0
votes
2answers
109 views

How to use Assumptions in a Series Expansion

I want to series expansion the expression $\frac{1}{2} \left(e_1+e_2-\sqrt{e_1^2-2e_1e_2+e_2^2+4V_{12}^2} \right)$ up to second order in $V_{12}$ using the assumption $e_1>e_2$. So I tried ...
0
votes
0answers
63 views

Inconsistent behavior of Assuming[] in combination with Simplify[] [duplicate]

The following integral gives the correct result ...
2
votes
0answers
133 views

Computing a sum

I'm trying to make Mathematica compute this sum: Sum[(-1)^k (n - k)^2 Binomial[2 n, k], {k, 0, n}] As is, I get an awful formula: ...
1
vote
3answers
88 views

FullSimplify assumptions for function body

I'd like to pass an assumption to FullSimplify so whenever it gets a function that is squared and square rooted would return me only the function body, without ...
2
votes
1answer
126 views

Taylor expansion of function of vectors—simplifying the output

I've got a real-valued function of several vectors $f(u,v,w)$ formed by taking scalar products of linear combinations of the vectors, I want to Taylor expand around small $v$ by writing $$f(u,\delta ...
0
votes
2answers
419 views

Evaluate conditional expression

I solved an integral and get a conditional expression as the result. The conditions are quite heavy but if I use Assumptions within my ...
2
votes
1answer
177 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 ...
1
vote
1answer
87 views

How to study the sign of an expression including a function, with conditions on the function?

I'm trying to study the sign of an expression, having information on some of my parameters. I don't know how to code these conditions. For example, I want to know when this expression: ...
2
votes
3answers
457 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. ...
0
votes
3answers
90 views

Evaluating an expression assuming a value for a variable only in the local context

Imagine we wish to evaluate some expression like NIntegrate[x^2*q,{x,0,100}] assuming some value for q like ...
1
vote
1answer
102 views

Mathematica does not respect tensor order?

I'm trying to verify an identity involving symmetric traceless tensors over the reals. What I tried was: ...
2
votes
4answers
133 views

Cancelling units in two-argument ArcTan

Consider ArcTan[3, -3] (* out: *) -Pi/4 ArcTan[3 a Sin[t/2], -3 a Sin[t/2]] (* out: *) ArcTan[3 a Sin[t/2], -3 a Sin[t/2]] However, we can fix the ...
0
votes
1answer
133 views

Impose an specific Trigonometric expansion with TrigExpand

Is there a way to impose in mathematica an specific trigonometric expansion with TrigExpand? I have various double-angle expressions for cosine and sine in my ...
2
votes
2answers
309 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 ...
0
votes
1answer
75 views

Simplifying complex expressions

I'm trying to work with complexes and I want Mathematica to know that all variables are real unless I explicitly assigned the variable with an I so I wrote: ...
23
votes
0answers
306 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: ...
4
votes
2answers
119 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 ...
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: ...
3
votes
1answer
136 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 ...