Group Abstract Group Abstract

Message Boards Message Boards

0
|
9.6K Views
|
4 Replies
|
3 Total Likes
View groups...
Share
Share this post:

[?] Understand how to set global Assumptions?

Posted 5 years ago

Hey, I assume the problem is almost selfexplaining I don't understand to set global Assumptions

Clear[k1,k2]
$Assumptions= {k1>0,k2==0}
Det[
{{k1,0},{0,k2}}]
Det[
{{k1,0},{0,k2}}]===0

Why is this not 0 and True but here it knows how to integrate

$Assumptions = {n == -1, m > 0}
Integrate[x^n, x]
Integrate[x^m, x]

Thanks for the support and all the best

POSTED BY: Michael Fischer
4 Replies

Thanks alot :)

POSTED BY: Michael Fischer
Posted 5 years ago

=== (SameQ[]) is intended for testing if two things are exactly the same, which Det[{{k1, 0}, {0, k2}}] and 0 manifestly aren't. You apparently want == (Equal[]) instead, which you can use within Simplify[].

Simplify[Det[{{k1, 0}, {0, k2}}] == 0]
   True

(still using your previous $Assumptions assignment.)

POSTED BY: J. M.

I will do that, but to understand it correctly, I do not have to check if Det is allowing me to do Assumptions (hey Mathematica team, this would be really really really useful) but if === is allowing me to do assumptions, isn't it? And I am really surprised, that === and < are not allowed to do Assumptions But thanks for the help

POSTED BY: Michael Fischer
Posted 5 years ago
MemberQ[First /@ Options[Integrate], Assumptions]
   True

MemberQ[First /@ Options[Det], Assumptions]
   False

That the first line returned True and the other one returned False explains a lot. More precisely put, $Assumptions only affects functions that have an Assumptions option.

Simplify[] is one of those functions:

MemberQ[First /@ Options[Simplify], Assumptions]
   True

so,

Simplify[Det[{{k1, 0}, {0, k2}}]]
   0

(For completeness, please look up Assuming[] as well.)

POSTED BY: J. M.
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard