Skip to main content
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
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
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 not deleted user 12750

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

1 vote
3 answers
697 views

List of Coefficients of Expression with symbolic Terms

(I am affraid that this is a duplicate, but I read several already asked questions and non of them helped me. If it's already answered, please tell me) I have expressions like this expr1=F1[0]*F2[3] …
Mario Krenn's user avatar
  • 2,192
3 votes
5 answers
679 views

Finding coefficient in expression

I have expressions like these: expr1 = -2 a Z[-2] - 2 b Z[-1] - 2 Z[-1] + a Z[-1] expr2 = -2 a Z[-2] - 2 b Z[-1] - 2 Z[-1] + a Z[-1] + c Z[0] expr3 = -2 a Z[-2] - 2 c Z[-1] - 2 Z[-1] + a Z[-1] + c Z[ …
Mario Krenn's user avatar
  • 2,192
6 votes
3 answers
305 views

Unexpected Behaviour with local variables and ToExpression

I encountered an unexpected behaviour in my mathematica-code, and want to understand whether that's a mathematica bug, or a misinterpretation on my side. MainVar = 1; Carrier = "MainVar"; f[] := ( …
Mario Krenn's user avatar
  • 2,192
0 votes
1 answer
238 views

Patterns of function-arguments in expressions

I want a function that compares an expression with a specific pattern. The expression has always the following form: expr = F1[x1]F2[y1] + F1[x2]F2[y2] + F1[x3]F2[y3] which is a sum of three terms …
Mario Krenn's user avatar
  • 2,192
7 votes
3 answers
488 views

Symbolic manipulation of expression with undefined function

I have an expression which is a sum of undefined function v[n1,n2,n3,n4] with 4 arguments (n_i are integers): expr=a*v[n1, n2, n3, n4] + b*v[n5, n6, n7, n8] + c*v[n9, n10, n11, n12] + .... Now I in …
Mario Krenn's user avatar
  • 2,192
3 votes
1 answer
346 views

Extracting function calls from an expression

I have an expression like this: expr = F[0, 1] + 2 F[0, 0] - 17*F[2, 0] and I want to transform it to a list consisting of all function calls with its arguments: MyList = {F[0, 1], F[0, 0], F[2, 0 …
Mario Krenn's user avatar
  • 2,192
3 votes
2 answers
187 views

Time-efficient manipulation (zeroing) of expression

I have huge matrices in the form of mtx1 = {{24+24 FF[6,9] GG[5,10]+24 FF[7,8] GG[5,10]+24 FF[5,10] GG[6,9]+24 FF[6,9] GG[6,9]+24 FF[7,8] GG[6,9]+24 FF[5,10] GG[7,8]+24 FF[6,9] GG[7,8]+24 FF[7,8] GG[ …
Mario Krenn's user avatar
  • 2,192
5 votes
4 answers
1k views

Replace every Minus to Plus in Expression

Thought this is a rather simple thing, but I was not able to find a solution. I have a polynomial expression like: expr1 = a^2 - b + c * d expr2 = a - b expr3 = -a + b - c and I want to replace …
Mario Krenn's user avatar
  • 2,192
4 votes
2 answers
224 views

Time-efficient creation of matrix

I have expressions like xx1=FF[1, 1] GG[1, 1] + FF[1, 1] GG[2, 2] + FF[2, 2] GG[2, 2] xx2=2*FF[1, 2] GG[1, 1] + FF[1, 1] GG[1, 2] + FF[2, 2] GG[2, 2] and I want to transform it to special matrices …
Mario Krenn's user avatar
  • 2,192
1 vote
2 answers
142 views

Fast symbolic manipulation of expression with undefined function

I have an expression which consists of terms with undefined function calls a[n]: example = 1 - c^2 + c a[1] a[2] + 1/2 c^2 a[1]^2 a[2]^2 + c a[1] a[3] Now I want to transform each term with individ …
Mario Krenn's user avatar
  • 2,192
7 votes
2 answers
231 views

Efficient Search for specific Terms in symbolic Expression

I have a large symbolic expression with six variables a,b,c,d,e,f per term, roughly like this: expr=a^2 b c d^2 + 1/2 a b (b + I d) e^3 - 1/8 I a (c + 1/2 I (c + I d))^2 (I b + 1/2 (c + I d)) e f I …
Mario Krenn's user avatar
  • 2,192