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

learn more… | top users | synonyms

2
votes
2answers
177 views

Is there a function in Mathematica which removes brackets wrapping an expression?

Is there a function in Mathematica which removes brackets from an expression? RemoveBrackets[ {3} ] 3 Note: inspired by @garej's answer to this question ...
3
votes
1answer
100 views

How to efficiently find all combinations of the letters in an alphabet given a condition

Problem: I want to find all unique expressions with n number of terms that contain all the digits (or characters) in alphabet. ...
1
vote
2answers
65 views

intermediate steps of simplification of algebraic expression without evaluation [on hold]

I am using MMA do do some algebra and I need to do some simplification. For example, I have the following expression $$ x^2 \left( \frac{6 \left(2 c_1 x^6+c_2\right)}{x^4} \right)-x \left( 4 c_1 ...
1
vote
2answers
72 views

What's the easiest way to remove overall factors from polynomials?

I have code that outputs polynomials (in #1) such as the ones below (note that the trailing Function character ...
9
votes
4answers
172 views

Evaluation of Alternatives

I recently stumbled upon a few examples that suggest patterns containing Alternatives do not evaluate for individual alternatives. For example: ...
0
votes
1answer
44 views

Simple grouping equations [closed]

I'm new in the Mathematica world. A very basic question. I have been using the command Eliminate on a set of equations as follow: ...
0
votes
1answer
54 views

Eliminate variable on multiple equations [closed]

I'm pretty new with Mathematica. I have to perform a really simple operation, but I'm really struggling with that. I have a set of 4 equations, for example (they can also be more complex): $ AA = 2 ...
4
votes
1answer
137 views

How do I disable that Mathematica orders terms in lexicographic order?

I have matrices with entries where the order of the entries is important. Unfortunately Mathematica resorts terms in products in a lexicographic order. For example, ...
1
vote
1answer
33 views

Formatting the prime factorization of expressions

I have a series expansion in $x$ and $a,b$ are constants which I want to type in $LaTeX$. But the numbers/integers are pretty large (have a lot of digits) so it becomes a bit messy in $LaTeX$. ...
5
votes
1answer
62 views

Display position of expression as Tooltip

How could we display the position of any sub expression in an expression using Tooltip? This would be useful for example in order to locate the position of an ...
4
votes
2answers
46 views

Is it possible to match a sequence with multiple heads without using Condition

Suppose I have: expr = Times[2, a[x,r], a[y,1], c[z,0,0], d[w,m]]; If I want to match a sequence of expressions with the same head ...
3
votes
5answers
164 views

Finding coefficient in expression

I have expressions like these: ...
5
votes
1answer
69 views

Custom rules for expressions in export to HTML(Fragment)

ExportString[Grid[{{a, b}}], "HTMLFragment"] ...
1
vote
1answer
56 views

Is there some way to implement automatic TimeSeries extrapolation or series continuation?

I am working with a large number of TimeSeries of irregular length. This means that if I sum them, or compute the mean, it cuts off at the terminus of the shortest ...
3
votes
0answers
80 views
5
votes
2answers
138 views

How to name a repeated pattern sequence inside Plus?

Here is a sample expression that contains a bunch of f and some other stuff: ...
0
votes
0answers
56 views

How do I use Replace All? [duplicate]

I have an expression: a + b 2^(1/2) + (c + d 2^(1/2))*I I want to replace each occurrence of 2^(1/2) with ...
6
votes
3answers
81 views

How to organize expression by symbols (like Collect), but apply different functions to each coefficient

I want to mimic the functionality of Collect[expr, {vars}, func], but with the following modification: The function f that is ...
0
votes
0answers
35 views

Replace function and its derivatives [duplicate]

When I have a complicated expression that depends on some variable, say, $f$, the following usually works ok: Expression ./ { f-> x^2 } But if $f$ is a ...
0
votes
1answer
37 views

Solving a trigonometric equation for all $x$ using constant coefficients

I want to find the coefficients $a$, $b$, $c$, etc. that make an equation like $a+bx=x$ true for all $x$, but for trigonometric functions of $x$. For example ...
1
vote
1answer
44 views

Count number of summands?

Consider fun = a+b+c+d/e If we want to get the number of summands, we can use Length[fun], which properly gives ...
0
votes
1answer
50 views

Misunderstanding of Replace code

I am looking for the right way to replace $\delta \, \, \text{by} \, \, 0.05 \, \, \, \beta \, \, \, \text{by} \, \, \, 1.77 \, \, \, \text{and} \, \, \, n \, \, \, \text{by} \, \, \, 12$ in this ...
2
votes
2answers
68 views

How to update values of nested association using AssociateTo?

Saying we have an association: asc = <|"A" -> <|"a" -> 1, "b" -> 2, "c" -> 3|>|>; I want to updated values of ...
0
votes
1answer
48 views

How can I prevent exponents from appearing in an expression?

I've found posts dealing with showing/hiding exponents for numbers, like in scientific notation. But what if I have a general expression? I have an expression like this, ...
1
vote
0answers
33 views

Factoring rationals from equation based on digit complexity?

Consider an equation of the following type: ( poly = (3 x)/35 + (6 y)/7 ) == 0 If we apply the command Factor to this ...
2
votes
1answer
40 views

How to label outputs from Print [closed]

I have problem with Print in Mathematica. The data that I get from it, is not labelled so that I can use it elsewhere, therefore I have got to label them manually. ...
1
vote
1answer
64 views

Extract coefficients from trigonometric polynomial [closed]

Suppose I have: f[r_, ϕ_] = C1 Cos[ϕ]r + C3 Sin[3 ϕ] r + C4 Sin[4 ϕ] r^4; How do I extract the coefficient of a chosen trigonometric term, let's say ...
5
votes
2answers
83 views

Extracting factors from an expression

I want to transform expressions into lists of elements. For example, b*c + a*b*c /. Plus -> List /. Times -> List ...
7
votes
1answer
74 views

Separate integer fractions from variables?

Whenever I write a rational number times a variable, i.e.: (2/3)a the result Mathematica displays looks very cringeworthy: $$\frac{2a}{3}$$ I would prefer ...
6
votes
1answer
96 views

When is the righthand side of a RuleDelayed evaluated?

The documentation on RuleDelayed states that lhs :> rhs represents a rule that transforms lhs to rhs, evaluating rhs only after the rule is used. Consider the following rule: ...
10
votes
7answers
494 views

How to replace the first Head of a currying expression like “a” in a[b,c][d]?

How do we replace the first Head of a currying expression such as a[b,c][d]? When accessing the ...
5
votes
1answer
79 views

The role of comma in the syntax of `Part`

I can't understand the syntax of Part, namely what does , do. The documentation says that ...
1
vote
1answer
51 views

Replacing product of functions wih another function

I have a function which depends on w,x,y,z. Let me call ...
4
votes
1answer
59 views

ToExpression to Latex Parenthesis

Everytime I use ToExpression to transform a TeX expression into mathematica input form, Mathematica always interprets parenthesis ('(' and ')') as square brackets, ...
0
votes
0answers
45 views

Prevent `Plus` from reordering terms by default? [duplicate]

Writing Plus[a,b]//FullForm gives back Plus[a,b], while Plus[b,a]//FullForm again returns ...
1
vote
1answer
37 views

How can I rewrite this expression in terms of V_o/V_s?

$$\frac{V_o-\frac{A \left(R_{\text{int}} ...
0
votes
1answer
38 views

Get dominant terms in asymptotic expansion

I'd like to find the dominant terms of an expression given the conditions $x,y >> 1$: $c_0 y+\frac{y^2 \left(4 c_0^2 y - 12 c_1 c_2^2+y^2\right)}{24 x^2 \left(\text{c1}^2+\text{c2}^2+y\right)}$ ...
1
vote
1answer
78 views

Can I map a function over a sequence of arguments without making the arguments into a list first?

I would like to set evenFunction[f_][a_, b_, c_, ...] = f[Abs[a], Abs[b], Abs[c], ...] I have come up with two ways to do this so far. Use pure functions ...
2
votes
1answer
143 views

Factoring out a common term

Very simple question, but I can't find a simple answer here or in the documentation. I have an expression: qq = a x + b x^2 + c x^3 and wish to factor out a ...
1
vote
1answer
150 views

Simplify the huge determinant product

I try to get the following determinant product result, ...
2
votes
2answers
90 views

How to neglect some part of an expression

I have an expression of the form $a\,x^3 + b\,x^2 + c\,x$ in my answer. I want to avoid those terms in my answer of order 1, but want to keep those of order > 1 in $x$. Can you suggest how to do in ...
6
votes
1answer
155 views

First order approximation

How can I neglect higher orders of approximation in Mathematica? Suppose I want to find the roots of a simple quadratic equation like ...
1
vote
1answer
46 views

Extract list of values associated with specific header within an expression

I would like to have a function that can extract from an expression a list of values that are within the brackets of a certain header at any level: ...
0
votes
1answer
51 views

Avoiding misconversion of data with ToExpression function [closed]

I've got a list of data with the following structure which can be easily converted To expresion by some manipulation such as ...
17
votes
1answer
192 views

SeriesData sucks when it can. How do I keep SeriesData from sucking?

When I run Series[f[x]*Sin[x],{x,0,3}, Analytic->False] I get: f[x](x-x^3/3+O[x]^4) as expected. In ...
0
votes
1answer
39 views

Manipulating form of output redux [duplicate]

To clarify the question that I posted here, I have the following question: I am generating a very large term by the following: ...
0
votes
0answers
78 views

Manipulating output of polynomial expansion

I have the following short code which generates a polynomial: ...
4
votes
0answers
101 views

Simplest identity that cannot be proved by FullSimplify [closed]

Apparently, FullSimplify is not able to prove all true identities, but usually it does pretty well when it comes to elementary functions. I'd like to know what are ...
0
votes
0answers
56 views

Simplifying sums of rational trigonometric functions

After simplifying the trigonometric functions as advised before (cf. Simplifying Expressions for FindMinimum), I obtained a sum of 62 similar expressions, the first three as in the below: ...