# Questions tagged [expression-manipulation]

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

710 questions
Filter by
Sorted by
Tagged with
1 vote
61 views

### Clarification of the $MemberQ$

There are a number of expressions: ...
• 1,893
1 vote
56 views

### Save expression for future use [closed]

I have an expression given by a summation, which takes a few hours to compile and which gives me over a million terms. How can i save up this expression to use him another day, wihtout doing the sum ...
• 137
77 views

### Pattern not matching BoundaryMeshRegion

Mathematica 13.1 on Windows 10. Can someone explain why the following does not match: MatchQ[BoundaryMeshRegion[Cube[]], BoundaryMeshRegion[__]] (* False *)
• 29.5k
23 views

### How to attach Upvalues to CompoundExpression?

I'm trying to make something like this work: Evaluating someData // Query[whatever...] /* summarizeInPrettyWay /* promptToRemoveCompoundExpression ; should produce ...
• 122
238 views

### How to remove branches in Piecewise with measure 0

I am doing Convolve over UnitTriangle in 2 dimensions and the resulting piecewise function has conditions with measure zero (...
• 2,070
1 vote
89 views

### Extracting elements from a List in a specific way

I have a set of polynomial expressions in multiple variables: ...
• 193
30 views

### ToExpression in nested Set/SetDelayed

Suppose we have the following definitions. ...
• 409
142 views

### Find the smallest subexpression containing all subexpressions matching a given pattern

I need to write a function that, given an expression like 1/x + 1/(Abs[x] + 1/(1 + Abs[y - Abs[x]])) finds all its subexpressions matching a certain pattern (say, <...
• 6,948
40 views

### Given the expression of x, how can I eliminate the terms that tend to zero as x goes to infinity but keep those which are non-zero or infinite?

Suppose I have an expression of x. Now I want to somehow evaluate its "limit" at x->Infinity, but in such a way ...
• 2,940
56 views

The function ...
• 19
59 views

### Back-substitution

Suppose that we have an expression (expr in the code below) and replace a long term with a new parameter (K). For a simple example; ...
• 507
1 vote
27 views

### Replace subexpression with variable in result from Laplace transform

I'd like to clean up the result I obtained from an inverse Laplace transform: First of all, I'd like to replace the square root expressions in the hyperbolic function arguments (part encircled in ...
• 11
75 views

• 1,249
1 vote
70 views

### Converting an indefinite integral to definite integral

For example, I have the following integral expression: g[x, y] = Integrate[f[x, y],x] How can I modify the above expression to achieve the following definite ...
• 350
1 vote
72 views

### Factoring an arbitrary power from the rest of the expression in an exponential expression

I have the following expression: Exp[r*t*x + e*r*y + t*x*r^2 + y^2*e*Sqrt[r]] I want to choose some arbitrary terms in the power and for example write the ...
• 350
94 views

### Simplifying multiplies of sums into a single double sum

I have the following expression: Sum[x^n, {n, 1, Infinity}]*Sum[Log[m, x], {m, 2, Infinity}] How can I Force Mathematica to write this expression in the following ...
• 350
74 views

### Transforming one exponential expression to multiplication of exponential expressions [duplicate]

I have the following expression: Exp[a * x + b * y + c * z] I want to write this expression as: ...
• 350
235 views

### How to express Bessel Functions in terms of Hankel Functions

I have the following expression BesselJ[\[ImaginaryI]*m, k*r] FunctionExpand knows how to transform from ...
• 350
1 vote
37 views

### How can I extract a list of terms with functions in terms of a specific variable

I have an expression in the following form: a f[x] + b Exp[g[x, y]] + r[z] f[y] + f[y] Sin[h[x, y, z]^2] + r[z] Log[t[z, y]] I want to extract an expression ...
• 350
1 vote
61 views

### Extract a row from dataset based on two strings

Say I have a list as below: ...
• 171
1 vote
54 views

### Same displayed expressions produce different outputs

I know EngineeringForm is a wrapper which prevents evaluation of content, but pasting chunks of other cells with an EngineeringForm number, got these two simple expressions w/ the same input ...
• 11
1 vote
65 views

### How to make a function in terms of constants to inherit the attribute of being constant

I have defined two variables a and b: SetAttributes[a, Constant]; SetAtributes[b, Constant]; I have defined a function c as ...
• 350
1 vote
90 views

### Extracting expressions from LHS of an assignment

I need to list all variables in a notebook containing several Set assignments, lhs=rhs, and equations, ...
• 433
96 views

### Equality of expressions with different variable names

I have some multivariate systems of expressions that I want to check for equality up to allowing relabelling of the variables. For example the two expressions below would be the same: ...
• 55
252 views

### How to locate a value from a list

I made a list with two values in each cell. ...
1 vote
65 views

### Denoting the whole in Position/Extract/ReplacePart

Position returns lists of numbers consumed by Extract, ReplacePart and others as "...
1 vote
78 views

### Coefficient works on $\pi$, $x$ and $x^2$, but not on $\pi ^2$

Consider (\[Pi] + 2 \[Pi]^2 + 3 x + 4 x^2) Executing ...
• 1,185