# Search Results

Results tagged with Search options answers only user 193
13 results

How to manipulate expressions structurally, not necessarily complying with the rules of algebra.

f[x_] := Not[Or @@ (PossibleZeroQ /@ Last@CoefficientArrays[x, {a, b, c}])] f /@ {expr1, expr2, expr3} (* {False, True, False} *)
answered Jan 12 '16 by Dr. belisarius
Cases[expr, m[a___] :> a, Infinity] (* {{d,f,g},p}*) Be careful with expr = m@m@p; Cases[expr, m[a___] :> a, Infinity] (* {p} *) versus expr = m@m@p; Cases[expr, m[a___] :> a, {0, Infinity}] (* …
answered Aug 31 '15 by Dr. belisarius
I believe the most clear way is something like {a, {b, c}} = {#[[1]], {x, y} /. #[[2]]} &@ Minimize[{x - y, -3 x^2 + 2 x y - y^2 >= -1}, {x, y}]
answered Aug 10 '15 by Dr. belisarius
You may use this function I wrote for transforming more general trig expressions: trigSet[exp_, inTerm_] := Module[{trigSyms, rels, set, setRep, setRep1, toLow, oneInTermsOf, …
answered Nov 28 '12 by Dr. belisarius
fa = Sum[#, {j, 0, Infinity}] & /@ (List @@ a); {bssTerms, hyperTerms} = (Position[fa, #] & /@ {_BesselJ, _Hypergeometric0F1})[[All, All, 1]] indepTerms = Complement[Range@Length@fa, Join @@ {bssTerms …
answered Feb 27 '15 by Dr. belisarius
This one works for both Log and LogLog Plots. Create your plot: ListLogLogPlot[Table[{n, n}, {n, 50}]] Edit it. Then paste it here ListLogLogPlot@ Cases[#, (Point[x__] :> ("CopiedValueFunction" /. …
answered Feb 7 '13 by Dr. belisarius
You may try for example something like: f[e_] := 100 Count[e, _Pochhammer, {0, Infinity}] + LeafCount[e]; FullSimplify[Pochhammer[k, n], ComplexityFunction -> f] (* ->Gamma[k + n]/Gamma[k] *)
answered Apr 15 '12 by Dr. belisarius
The following seems to work, however I think it's not general enough: At a clean nb, enter: For[i = 0, i < 4, i++, Print[{i, {33, i}}]] For[i = 0, i < 4, i++, Print[Graphics[Circle[], ImageSize -> …
answered Dec 3 '13 by Dr. belisarius
Still slow, but much faster than yours: u = {0.8, 0.7, 0.5, 0.4, 0.8, 0.7}; answers = MapThread[(Min[1, Max[#1 + #2, 0]]) &, {u, {e1, e2, e3, e4, e5, e6}}]; disc = {answers[[5]], answers[[6]], answe …
answered Jul 13 '12 by Dr. belisarius
An algebraic one: h = -2 x + x^2 - 4 y + y^2 - 6 z + z^2 == 11; ((# /. {x -> 0, y -> 0, z -> 0}) + h[[2]] == #) &@ Total[(#2/2/Sqrt@#3 + Sqrt@#3 #4)^2 & @@@ (Join[CoefficientList[h[[1]], #], {#}] & …
answered Feb 23 '13 by Dr. belisarius
Perhaps funs = {f, e, g, h} apply = {sf, se, sgen, sgen} k[a_, b_] := (Head@b /. Thread[funs -> apply])[a] b Collect[z@x expr, Blank/@funs] /. (Times[a___, l: Blank@#, r___] :> k[a r, l] &/@funs) (* …
answered Dec 28 '15 by Dr. belisarius
res = Rest@Select[Subsets@pol, PolynomialMod[#, factor] == 0 &] So, out of the 8192 (== 2^13) possible "sub-polys", only these ones are divisible by factor: Grid[Join[{{"pol == Non-factored", " …
answered Jul 17 '15 by Dr. belisarius
Not that I would recommend this, but anyway: positionPayload = 2. x + 3. t^2; variableList = Variables[positionPayload]; positionPayload = Function[Evaluate@variableList, Evaluate@positionPayload]; p …
answered Aug 4 '15 by Dr. belisarius