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....
27
votes
1answer
495 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: ...
26
votes
4answers
1k 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 h^2\right)^2}...
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: ...
20
votes
2answers
2k 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 ...
18
votes
3answers
533 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 ...
15
votes
5answers
990 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 ...
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 : ...
15
votes
2answers
437 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
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 ...
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 ...
13
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 ...
12
votes
2answers
2k 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 ...
12
votes
2answers
3k 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: ...
12
votes
1answer
250 views

Assumption on the range of a function

I'm using value-defined function as set of parameter, i.e. f[1] ===> first parameter f[2] ===> second parameter f[3] ===> third parameter etc. I would ...
12
votes
0answers
361 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 ...
11
votes
1answer
335 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 <...
11
votes
1answer
538 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 ...
11
votes
1answer
237 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: ...
11
votes
3answers
445 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 ...
10
votes
3answers
728 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
429 views

What assumptions do I need to make Mathematica integrate a function?

When I feed Mathematica the following integral: Integrate[Sqrt[(A - x) (B - x)/x], {x, 0, B}] it spits it back out without evaluating it. However, it can ...
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 ...
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 ...
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 ...
9
votes
2answers
1k views

Reduce not making full use of list of assumptions?

I have the following inequality, with conditions: ...
9
votes
2answers
171 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. ...
9
votes
3answers
559 views

Simplify with Assumptions Sqrt[(expr)^2]

While trying to simplify expressions in the form Sqrt[(expr)^2] when expr>0 I noticed a peculiar behavior that was not ...
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 ...
9
votes
0answers
130 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: ...
8
votes
5answers
704 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
4answers
301 views

Simplify makes Mathematica forget that a matrix is Hermitian

Using Simplify with certain trivial assumptions makes Mathematica forget that a given matrix is Hermitian. See the minimal example below: ...
8
votes
4answers
795 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 (...
8
votes
3answers
263 views

Unknown function with arbitrary arguments assumption

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

How do I SetDelayed $Assumptions

For some reason, $Assumptions := (Print["y"]; x > 0) evaluates the RHS immediately. I have code in which $Assumptions ...
8
votes
1answer
373 views

evaluation of the sum of KroneckerDelta

I need help. I need to know why the next code doesn't simplify in Mathematica 10 but it does in Mathematica 8. I need some similar in version 10. What can I do? ...
8
votes
1answer
157 views

Adding irrelevant assumptions changes the result of Simplify

I've run into this problem a number of times. A typical example is Simplify[Sign[k], {0 < A, 0 < B, A*Exp[2*y] < k, y > 1}] which evaluates to $1$, ...
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]) ...
7
votes
2answers
556 views

Forcing Mathematica's Integrate to give more general answers

I have a simple gaussian integral: $\int^{\infty}_{-\infty}dx\:e^{i\alpha x^2}$. If $\alpha \in \mathbb{R}$, then: $$ \int^\infty_{-\infty} dx\; e^{i \, \alpha x^2} = \sqrt{\frac \pi {-i \alpha}} \...
7
votes
2answers
200 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 ...
7
votes
1answer
122 views

Inconsistent results for Integrate depending on irrelevant assumptions

I stumbled across this amusing issue today when doing some definite integrals: ...
7
votes
1answer
3k 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. ...
7
votes
0answers
240 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 ...
7
votes
0answers
105 views

Need explanation on strange behavior of Simplify under given assumption

This is quite surprising to me. Simplify[a == b, {a == {1}, b == {1}}] a == b does not evaluate the equality, while ...
6
votes
4answers
11k views

How can I use assumptions with FindRoot?

I have something like FindRoot[f[x], {x, a}] Now I want FindRoot to constrain the solutions to 0 < x < 1. How can I ...
6
votes
2answers
593 views

Simplify — is this simplest result Mathematica can provide? [duplicate]

I have a question about Simplify: When I do a simplification the returned result is not as simple as I want. When I ask for the Norm of an complex expression, ...
6
votes
3answers
432 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....
6
votes
1answer
993 views

Does the Im function work with symbolic arguments?

Does the Im function work with symbolic arguments? ...
6
votes
3answers
331 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 ...
6
votes
3answers
468 views

RSolve with assumptions

Bug noticed for Mathematica 8 and persisting through 11.3; Submitted to Wolfram, Inc. as CASE:3729158 I want to solve the following non-linear first order difference equation: $$ k_{t+1} = (1-a) k_t^...