Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [assumptions]

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

5
votes
1answer
499 views

How to plot the eigenvalues of a parametric matrix efficiently?

I was wondering how can I set the variable type of matrix elements to be real. The problem is, I creat a variable-dependent matrix as follows and I get the eigenvalues now I want to plot the ...
0
votes
1answer
47 views

Multiple Assumptions for Symbolic Matrices

new to the forum and here's the question I'm pondering on: I'm trying to use FindInstance in Mathematica to solve a symbolic matrix equation with quite a few assumptions. For example, quite ...
0
votes
0answers
24 views

`Minimize` not working for general case

I'm trying to perform a minimization for an arbitrary natural number. If I enter a specific number, Mathematica performs the correct minimization. Am I specifying k ...
0
votes
1answer
37 views

Simplifying an expression involving a matrix and functions of it

I have implemented the following two matrices in Mathematica in order to compute s, but I don't know how I can further simplify the resulting expressions, e.g., ...
2
votes
2answers
111 views

FullSimplify a trigonometric expression doesn't work as expected

I know this kind of question is frequent asked, yet each case has its own particularities. I will show my problem. I define the following: ...
0
votes
0answers
92 views

Bug in Integrate with Assumptions?

I encountered behaviour I wasn't expecting with Integrate and thought I'd ask here before reporting a bug in case I'm just missing something obvious. A simple example is the following: Computing <...
0
votes
2answers
79 views

Result with assumptions contradicts previous result

Without assuming anything on the argument of the complex number inside the Gamma function ...
3
votes
1answer
56 views

Simplify with Semi-Infinite Interval

I'd like to Simplify an expression using an Interval constraint. This question shows that you need to put the variable in a <...
0
votes
1answer
39 views

Handling Errors in Slowly Converging Dirichlet Beta Infinite Sum

I have tried to calculate the following slowly converging double sum in Mathematica 11.3 $$\sum _{k=1}^{\infty } \left(\frac{ 1}{(2 k-1) (2 k+1)} \left(\sum _{n=1}^{\infty } \frac{(-1)^{n-1}}{(2 n-1)...
1
vote
1answer
75 views

How to define a complex function with assumptions?

I'm trying to define a complex function to be able to do analytic calculations. Specifically, I want to define a function $A(x,t)$ in the complex plane with argument $\theta(x,t)$ and modulus $R(x,t)&...
1
vote
2answers
32 views

Clarity of assumptions in PowerExpand

I am trying to simplify a complicated expression which involves $\log$ of sum of $e^{i x_{i}}$ terms, and I found out that using PowerExpand it gets greatly simplified. But I know that PowerExpand ...
2
votes
2answers
60 views

How to define an antisymmetric symbol?

I want to work with linear expressions involving the formal symbol $w[a_1,...,a_n]$, and I would like Mathematica to know that expressions such as ...
1
vote
2answers
91 views

How to add a vector variable to a vector value?

If we have a three dimensional vector variable: $Assumptions = a ∈ Vectors[3]; and a three dimensional vector value for example: ...
3
votes
2answers
128 views

Can pattern assumptions be made reliable?

It is possible to use patterns in assumptions such as f[_]>0. This does not seem to be explained in the documentation but is for instance pointed out in Is it ...
7
votes
2answers
532 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}} \...
2
votes
1answer
43 views

Using Series with Refine or Assuming to restrict the power

I have a system of differential equations which contain a singular point. To avoid the singular point, I am expanding the coefficients and solutions in a power series around that point. Due to the ...
3
votes
2answers
101 views

Can the Assuming function be used with ContourPlot or DensityPlot?

I'm new to Mathematica, and for most purposes the program has served me well and been straightforward. However, I'm hitting a snag while trying to create a contour plot for the distribution function ...
10
votes
1answer
244 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 ...
3
votes
0answers
67 views

List vs. && in Assumptions

When one gives values to the $Assumptions variable, it seems to not matter whether you separate the conditions with && or just give is a list of the ...
2
votes
1answer
31 views

Reevaluating an expression when Assumptions have changed

Is there a way to make this work? THM = TensorDimensions[M]; Assuming[ Element[M, Vectors[n]], THM ] Which gives: ...
0
votes
0answers
41 views

Not getting a solution to my maximization problem

I want to solve the following problem: For $0.5<q<1$, $q<r<1$, $0\leq n$, $0\leq n_1<=\lfloor{n/2}\rfloor$, and $n_1,n\in\mathbb{N}$ calculate $\arg max_{n_1} S(q,r,n,n_1) $ as a ...
1
vote
1answer
57 views

Mathematica stuck at running symbolic multidimensional Fourier Transform

I'm trying to compute the analytical FT of a bidimensional exponential decay as follows: $f_E(\vec{x}) = \exp \left( - \sqrt{ (\vec{x} - \vec{\mu})^T \Sigma^{-1} (\vec{x} - \vec{\mu}) } \right)$ ...
0
votes
3answers
58 views

Simplifying polynomial Roots with assumptions

I have acquired the following root from a minimization problem: ...
0
votes
0answers
50 views

I assume that a parameter is real and positive, but Mathematica still assigns a phase to it

If I run this line of code Assuming[{Element[a, Reals], a > 0}, TrigToExp[ComplexExpand[Sqrt[a]]]] I get ...
0
votes
0answers
30 views

$Assumptions not taken in account

Consider the following code : ...
2
votes
1answer
56 views

Choose a branch cut using assumptions

I understand Sqrt function won't simplify expressions such as $\sqrt{x^2}$ unless there is an assumption that $x \in \mathbb{R}$. In my computation, I get an output containing an expression like this ...
1
vote
1answer
66 views

Why is the function assuming not taken in consideration?

In the following code, I assume that my variables are strictly positive. However, mathematica doesn't take this in consideration when it evaluates the If : the If is still in a non simplified form. ...
2
votes
1answer
83 views

Fullsimplify with two Diracdelta functions

I am having a problem with the FullSimplify and DiracDelta functions. When I run the following line in mathmatica: ...
1
vote
1answer
54 views

Hidden limitation of Assumptions (Is $x^2 < 0$ contradictory)?

Is there a limitation of Assuming that I am not aware of? I would like to assume that the square of a number is negative: ...
0
votes
1answer
35 views

Sums of binomial expressions returns different and sometimes indeterminate expressions

A problem that I encountered multiple times when taking sums over expressions involving binomials, factorials, etc. is that Mathematica (version 11.2) returns indeterminate expressions when it should ...
0
votes
0answers
63 views

Positive integers instead of integers ($\mathbb{Z}$) in assumption

I can use Integers to represent integers. How to represent positive integers? I can define ...
1
vote
0answers
43 views

Different integral results within equivalent conditions

I input 3 functions as following, ...
1
vote
0answers
52 views

ConditionalExpression still resulting from Assuming a Module's local variables

I have a memoizing, recursive function whose MWE looks like this (the two fake inputs/ICs are from 'K' and 'Bfun2', the latter just a quick way to check the results coming out of the Residue.: ...
0
votes
0answers
64 views

Global assumptions

in the following code I evaluate a determinant of a matrix and then solve for one variable (kx). I get three solutions, but the solution kx=0 is in my opinion wrong. This one can see when one plugs kx=...
1
vote
3answers
54 views

Solving for positive square root of an equation, using assumptions

Is there a way to get the positive square root, while solving an equation. So far, this is what I am doing : ...
5
votes
0answers
117 views

Integrate under assumptions

I am trying to solve the following integral: $$\int_0^\infty u^{\sigma-1} \exp\left[-c u^\sigma\right] \mathrm{d}u$$ under the assumptions $\sigma \in (0,1)$ and $c>0$. I know the result is $$\...
1
vote
1answer
109 views

Can this integral be calculated using Mathematica?

I have the following integral: $$ \int_{-\infty}^{\infty} \frac{\mathrm d\tau}{2\pi \mathrm i} \int_{-\infty}^{\infty} \frac{\mathrm d\tau'}{2\pi \mathrm i} \frac{\mathrm e^{-c^2(\tau - \tau')^2}}{(\...
1
vote
1answer
147 views

Assume a variable is a Matrix

Is it possible to tell Mathematica to assume a variable is a matrix, analogous to assuming a variable is real with the Assuming command?
0
votes
1answer
40 views

How to assume lexicographical ordering

Suppose I have functions which depends on the symbols $c[I]$, where $I$ is some subset of $\{1,2,...,n\}$. For example, $$f = c[1] + c[1,2,3] + c[1,2],$$ $$g = c[2] + c[2,1],$$ Code: ...
0
votes
0answers
32 views

Using Assumptions Implied by other Assumptions

Is it possible to have assumptions about the smoothness of functions? As an example, suppose that I would like to simplify $u_{tt} - a^2 u_{xx}$ under the assumption that $u_t+au_x=0$. Under some ...
3
votes
2answers
115 views

How to apply assumptions to parameters for FindDistributionParameters?

Say I have data that I want to fit to a distribution while applying assumptions on one or more of the parameters. For example, for ParetoDistribution[k, α, μ] <...
1
vote
2answers
79 views

Integration using assumption in Mathematica

I want to reproduce the solution of the following integral, using Mathematica: $$\int_0^1duu(1-u)^2\frac{1}{(1-u)(1-v)}\left(\frac{1-u}{u}(1+\frac{1}{1-v})\theta(u-v)+\frac{1-v}{v}(1+\frac{1}{1-u})\...
1
vote
4answers
70 views

Problem with particular simplification of complex function under assumptions

I have proven that $expr=(1 - i)(\dfrac{1+z}{1-z})^{1/4}\dfrac{\sqrt{ 1-z^2+i z\sqrt{1 - z^2}}}{1+z-i\sqrt{1 - z^2}}=1$ when it is assumed that $z\in R$ and $|z|<1$ and when I also plot the real ...
1
vote
1answer
40 views

Taking residues with integer assumptions?

In some cases, Mathematica successfully produces a general result for residues with assumptions, such as: ...
1
vote
0answers
39 views

How to define a variable $x$ such that $Abs[x]<1$ and use this globally without having to re-write it again and again?

I am writing a code or a calculation of a very complicated function and my main variable is $x$ such that $-1<x<1$. This assumption has to simplify my final answer a lot, but since the final ...
4
votes
2answers
66 views

Combinations of variables that satisfy my inequality

This question is a continuation to one answered by kglr here. In the following situation, I find that given my assumptions, it is indeed possible for $g$ to be negative. ...
4
votes
3answers
217 views

Using Assuming with Reduce

I have the following code that includes Assuming to cut through irrelevant detail, or so I had hoped. ...
3
votes
1answer
129 views

Building a function that uses $Assumptions and works like Simplify, FunctionExpand, etc

I want to write a function MySimplify (like built-in Simplify) that takes a second argument to specify additional ...
0
votes
1answer
72 views
0
votes
0answers
40 views

How to test consistency of two assertions without hacking

Suppose I have a set of assumptions assum = x ∈ Reals && y ∈ Reals and I want to test an assertion like ...