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
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.)
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
=== (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.)