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
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
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 user 862

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

6
votes
This is my take on the pad, thread normally, then remove padding approach. fred[expr_, head_: List, seq_: All] := Module[{myhold, maxlength, dummy, paddedexpr}, SetAttributes[myhold, HoldAllComp …
answered Jun 9 '14 by Simon Woods
2
votes
Similar to wolfies' approach - find the part for which the condition is True when x->0. p = Piecewise[{{x^2 + 2*x - 4, 0 <= x <= 1/4}, {0, True}}]; Cases[First@p, {e_, c_} /; (c /. x -> 0) :> e] (* …
answered Apr 11 '14 by Simon Woods
1
vote
Maybe this Replace[Expand@expr, Times[terms__ /; Count[{terms}, _f | _g, Infinity] > 1] -> 0, 1]
answered May 7 '13 by Simon Woods
5
votes
You could make your mark thing work like this: evalmark = Function[Null, Unevaluated[#] /. mark[x_] :> RuleCondition[x], HoldFirst]; evalmark[ test1[f_] := mark[5 + x - x] D[f, x]; test2[f_] := ma …
answered Feb 24 '17 by Simon Woods
17
votes
As far as I know, there is no easy, general way to handle this kind of algebra with Sum expressions. What follows is an attempt to use replacement rules to handle a wider range of cases than chris's …
answered Nov 18 '14 by Simon Woods
5
votes
I'm not sure why you don't like your merge function. This is the same pattern matching approach but using ReplaceAll: {e1, e2} /. {Hold[x_], Hold[y_]} :> Hold[x; y] If you would rather avoid patter …
answered Mar 3 '14 by Simon Woods
2
votes
I prefer Mr Wizard's answer, but here is a method using the properties of Power and Times to deal with exponent 1 and single prime factors. Specifically: Power[x, 1] gives x Times[x] gives x The p …
answered Oct 3 '14 by Simon Woods
11
votes
Just do the ComplexExpand after the Conjugate ComplexExpand[Conjugate[I Cos[z] Sin[y] + Sin[z] + A (Cos[z] - I Sin[y] Sin[z])]] (* A Cos[z] + Sin[z] - I (Cos[z] Sin[y] - A Sin[y] Sin[z]) *)
answered Jul 10 '13 by Simon Woods