Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 36788

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

1 vote
Accepted

Denominator negative, numerator negative but sign of fraction not positive?

From the help Unless expr is manifestly True, TrueQ[expr] effectively assumes that expr is False. So expressions that do not simplify to True will not necessarily return true even if they ar …
mikado's user avatar
  • 17.1k
3 votes
Accepted

How to check the assumptions attached to a given symbol?

The function Refine does what you want Assuming[x ∈ Reals, Refine[Element[x, Reals]]] (* True *) Assuming[x > 0, Refine[Element[x, Reals]]] (* True *)
mikado's user avatar
  • 17.1k
5 votes

Assuming[a ∈ Reals, Conjugate[a]] fails to invoke assumptions

The function that you need to apply assumptions is Refine. I use it quite often, when I don't need or want more complete simplification. Assuming[a ∈ Reals, Refine[Conjugate[a]]] (* a *) …
mikado's user avatar
  • 17.1k
1 vote

Solving for positive square root of an equation, using assumptions

How about Map[Sqrt, Solve[K == ((1/Sqrt[1 - betasq]) - 1)*m*c^2, betasq], {3}] (* {{Sqrt[betasq] -> Sqrt[(K^2 + 2 c^2 K m)/(K + c^2 m)^2]}} *)
mikado's user avatar
  • 17.1k
5 votes

Using assumptions, weird output

Assumptions are not applied automatically. A minimal way to apply them is to use Refine. …
mikado's user avatar
  • 17.1k
3 votes

Simplifying square roots of squared reals

Mathematica doesn't agree that the second result is simpler. It judges complexity (in part) by LeafCount. The second expression has a slightly higher value. LeafCount[Sqrt[b^2 + b^4]] (* 11 *) Lea …
mikado's user avatar
  • 17.1k
3 votes

Specify range of variable in a equation

I think you would like to show the result in terms of 1-h rather than -(-1+h). To achieve this, I would do the following expr = FullSimplify[Integrate[t1^2*E^((1 - h)*s0*t1), {t1, 0, T}]]; rule = h …
mikado's user avatar
  • 17.1k
2 votes

Why Mathematica is not assuming real variable as real?

I don't know really know why FullSimplify doesn't work, but Refine does Assuming[{a >= 0, d >= 0, b1 >= 0, b2 >= 0, c >= 0}, Refine[({{Re[mat1[[1]][[1]]], Re[mat1[[1]][[2]]], -Im[mat1[[1]][[1] …
mikado's user avatar
  • 17.1k
1 vote

Simplifying Min with assumptions

Interestingly, providing a slightly weaker assumption works Simplify[Min[a1 R1/q1, a2 R2/q2], a1 R1/q1 <= a2 R2/q2] (* (a1 R1)/q1 *) Whereas Simplify[Max[a1 R1/q1, a2 R2/q2], a1 R1/q1 <= a2 R …
mikado's user avatar
  • 17.1k
0 votes

What is the fastest way to simplify $\sqrt{a^2}$ for $a>0$

In a complicated expression, with many repeated subexpressions, it can be useful to extract the parts and simplifying before substituting back in Union[Cases[exp, __Power, ∞]] (* {b^2, Sqrt[a b^2]} * …
mikado's user avatar
  • 17.1k
1 vote

Integrating a piecewise function with symbolic pieces

Note that in Piecewise the conditions are evaluated sequentially. Bearing this in mind, we can avoid (at least in this case) introducing a dependency on the (assumed fixed) relationship between t1 an …
mikado's user avatar
  • 17.1k
1 vote

Problem with particular simplification of complex function under assumptions

If you want to prove that something is constant, you can try differentiating it Assuming[-1 < z < 1, FullSimplify[D[expr, z]]] (* 0 *)
mikado's user avatar
  • 17.1k
0 votes

Problem with particular simplification of complex function under assumptions

If you think you know the answer, it is often easy to ask Mathematica to verify your suspicion FullSimplify[ForAll[z, -1 < z < 1, expr == 1]] (* True *)
mikado's user avatar
  • 17.1k
1 vote
Accepted

Solving the matrix with assumption?

All the assumptions made in the following are consequences of the matrix M being positive-definite Hermitian. …
mikado's user avatar
  • 17.1k
2 votes
Accepted

Assuming x real, simplifying or refining Im[1/(x+i)] doesn't yield anything

Use ComplexExpand to simplify, assuming variables are real ComplexExpand[Im[1/(x + I)]] (* -(1/(1 + x^2)) *)
mikado's user avatar
  • 17.1k

15 30 50 per page