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 45431

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

21 votes
Accepted

Logarithm of exponential

Another method is to use PowerExpand: PowerExpand[Log[E^a], Assumptions -> True] a + 2 I π Floor[1/2 - Im[a]/(2 π)] Addendum As an aside, Log behave exactly like ArcSin here: ArcSin[Sin[x]] … Pi/2 < x < Pi/2] x For larger domains, Simplify doesn't work: Simplify[ArcSin[Sin[x]], 0 < x < 2 Pi] ArcSin[Sin[x]] Again, using PowerExpand is useful: p = PowerExpand[ArcSin[Sin[x]], Assumptions
Carl Woll's user avatar
  • 132k
7 votes
Accepted

Representing number domain by a symbol

Per the documentation you can use Esc ints Esc to enter the StandardForm symbol for Integers
Carl Woll's user avatar
  • 132k
7 votes

Defining the domain of positive real numbers

New in Mathematica 12 is PositiveReals (and others like NonNegativeIntegers, etc): Solve[x^2 == 1, x, PositiveReals] {{x -> 1}}
Carl Woll's user avatar
  • 132k
5 votes
Accepted

Laurent Series with Symbolic Powers

One possibility is to just replace your variable with one whose powers are all explicit integers, and then use Series: e = PowerExpand[ a^(-c2)/((a*c1)^(c2) + c3) /. a -> z^(1/c2), Assumptions
Carl Woll's user avatar
  • 132k
5 votes
Accepted

Mathematica does not respect tensor order?

Note what happens when you add them: $Assumptions = Element[d, Matrices[{3, 3}, Reals, Symmetric[{1,2}]]]; d + IdentityMatrix[3] {{1 + d, d, d}, {d, 1 + d, d}, {d, d, 1 + d}} The Listable attribute …
Carl Woll's user avatar
  • 132k
5 votes
Accepted

How to 'define' value in Assumptions but not let Simplify replace it?

One possibility is to mimic the behavior of symbolic constants like Pi, E, etc: N[x, _] ^= 4; NumericQ[x] ^= True; Then: Sqrt[x^2] x without even using Simplify.
Carl Woll's user avatar
  • 132k
4 votes

how to make DSolve not generate Assumptions in the solution?

TrueQ@$IntFlag := Block[{$Foo=True}, MakeBoxes[Integrate[a],TraditionalForm] ] Protect[Integrate]; Then: Integrate[f[x]Sin[x],{x,0,L0},Assumptions->True] //TeXForm $\int_0^{\operatorname{L0 …
Carl Woll's user avatar
  • 132k
4 votes
Accepted

Solve yields complex Root even if the domain is Reals

ToRadicals supports the undocumented option Assumptions. … Making use of this option gives: sol = Solve[x^3==a^2,x,Reals] ToRadicals[sol, Assumptions -> a>0] {{x -> Root[-a^2 + #1^3 &, 1]}} {{x -> a^(2/3)}} …
Carl Woll's user avatar
  • 132k
4 votes
Accepted

Taking residues with integer assumptions?

You could use SeriesCoefficient instead: Assuming[n ∈ Integers && n>1, Simplify @ SeriesCoefficient[ Exp[x] x^(-1-n), {x, 0, -1} ] ] 1/n!
Carl Woll's user avatar
  • 132k
4 votes

How to define an antisymmetric symbol?

For example: TensorReduce[ w + TensorTranspose[w, {1, 3, 2}], Assumptions -> w ∈ Arrays[{n, n, n}, Complexes, Antisymmetric[{1,2,3}]] ] 0 …
Carl Woll's user avatar
  • 132k
3 votes

Simplifying inequalities with exponents

I think using Reduce would be a better approach, although it's not completely straightforward: Reduce[x^a < 1 && a > 0 && x > 1, Reals] False (updated with another approach using Resolve) Ano …
Carl Woll's user avatar
  • 132k
3 votes
Accepted

How to Integrate the Derivative of a function with Assumptions on the function?

You could try using DSolveValue. First, define your sum using inactive integrals: h[α_] := Inactive[Integrate][x g'[x],{x,0,α}] + Inactive[Integrate][α g'[x],{x,α,∞}] Even though the integrals are …
Carl Woll's user avatar
  • 132k
3 votes
Accepted

Triple integral: How do I include assumptions and conditions?

The region of integration is: reg = ImplicitRegion[0 < y < a && 0 < x < z && 0 < z < y, {x, y, z}]; Using this region in Integrate: sol = Integrate[Exp[(a-x)^3], {x, y, z} ∈ reg, Assumptions -> a > 0] …
Carl Woll's user avatar
  • 132k
3 votes
Accepted

Extracting a logarithmic divergence of an expression using Series

Another possibility is to use the new in M12.1 function Asymptotic: asym = Assuming[ r0 > 3 M > 0 && θ > Pi/2, Simplify @ Asymptotic[expr, θ -> Pi/2] ] Coefficient[asym, Log[θ - Pi/2]] //Simpl …
Carl Woll's user avatar
  • 132k
3 votes

Usage of Assuming for Integration

For this example, you could use FourierCoefficient instead of Integrate: FourierCoefficient[1, t, k, FourierParameters->{-1,1}] 2 π DiscreteDelta[k]
Carl Woll's user avatar
  • 132k

15 30 50 per page