Tag Info

New answers tagged

1

Assuming[assum,expr] evaluates expr with assum appended to $Assumptions, so that assum is included in the default assumptions used by functions such as Refine, Simplify, and Integrate. As x -> 10 (or even x == 10 if x isn't assigned an explicit value) does not evaluate to anything, but itself, you shouldn't expect Assuming to change anything. This ...


1

If you think you will run into that ambiguity a lot you might want to define a function to carry out your calculation: Clear[matrixmult] matrixmult[m_?MatrixQ, v_?VectorQ] := v.m.v matrixmult[m_?NumberQ, v_?VectorQ] := v.(m IdentityMatrix[3]).v I used two conditional definitions: the correct definitions will be picked depending on the type of the ...


1

If you just want to track things for your own usage you could do something simple like this: lists = {a, b, c}; scalars = {p, q, r}; function[sym_] := Which[ MemberQ[lists, sym], "list", MemberQ[scalars, sym], "scalar", True, Head[sym]] function /@ {a, p, 0} {"list", "scalar", Integer} You ...


2

I think Daniel Lichtblau gave a useful answer in his comment. This is to get it on record. They (the present example and the Solve one) are similar issues. At heart, as noted by @Rojo, it has to do with internal ordering having an impact on simplification, cylindrical decomposition, and other under-the-hood functionality that is called upon by the likes ...



Top 50 recent answers are included