# Tagged Questions

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

186 views

### Isolating cross terms

I have a set of expressions that contains terms like $\frac{1}{(x + a + b)(c+d)}$. I would like to simplify the denominator so that products of $a,b,c,d$ are dropped, but $x c$ and $x d$ are kept. ...
60 views

### How to separate linear terms by output?

I am performing a complicated summation in which fa is a Sum of a[j] over j, and terms in fa end up containing a BesselJ, a Hypergeometric0F1, or neither. ...
67 views

### Expand an expression to only built in functions

This question is hard to phrase and even harder to google. Maybe it's best to explain it with a very simple example. ...
308 views

### Construct an infix operation from a list

Inspired by this question, if I have a list {a, p, b, q, c} where p and q are binary ...
124 views

### Drop terms in expression

Suppose I have an expression of the this type: Quantity["Epsilonzero"] a (b + c Sin[ω t])^2 where t is time. I am interested in "extracting" the non time-...
58 views

### Assigning a value to specific product [closed]

I was wondering if there is a way to assign a value to a specific problem. For example if I wanted $a\cdot a$ to equal $-1$. How would I go about doing that?
149 views

### Prevent a sum from simplifying? [duplicate]

Basically, I want to prevent a sum from cancelling or summing together the individual summands and just display them separately next to each other. Example: ...
61 views

### Why returning False? [closed]

Can anyone explain the false? I'm trying to grab co-efficient in front of X^2 I think. I say I think as I'm following my tutors example using his screenshot the only difference between his question ...
300 views

### Simplify binary expressions

Is it possible for Mathematica to do simplifications for expressions where the variables are binary, such as: a + b = 1 + 2*c => a + b = 1 Here c must be 0 because if it is 1, the RHS is 3 but ...
54 views

### Help for properly writing simple derivative expression

I need help to write the following expression (only 1 iteration): f(x) = ...some basic function... f[X0,...,Xp] = f(p)(x0) / p! What I have so far: ...
143 views

### Write Integer powers as products

I need to wirte all occasions of (a+b)^3,Ftp^2, Sin[th]^2, ...etc as (a+b)*(a+b)*(a+b), Ftp*Ftp, Sin[th]*Sin[th], ...etc ...
54 views

### Obtain the values of all Sub- and/or Superscripts from an expression?

Let Expr be an expression that can be practically any combination of variables. Now I can check whether this expression contains any subscripts or superscripts with ...
563 views

### Replace all integers by 1?

Let list1 be a list of variables of the form {c1 a, c2 b, ...} where $a,b,...\in\mathbb{C}$ and $c1,c2,...\in\mathbb{Z}$. I am ...
61 views

### How can I drop the “belongs to integers” part from Reduce output?

I have this Mathematica line: Reduce[1/(E^0)^x + 1/(E^1)^x + 1/(E^3)^x == 0, x] that gives the output: ...
363 views

### How to do algebra on summations of variable expressions?

Is there any easy, general way to handle algebra on variable Sums? For examples, Gaussian Mixtures or Fourier Series: ...
64 views

### How do I extract the value of a 'Style'?

I have a Style displaying an underlying Real value. For example I might have ...
87 views

### TrigExpand Idiosyncracies

TrigExpand[Sin[x]^2 Log[y]] returns sin^2(x) log(y), as one would expect. However, ...
137 views

### Collect powers of variables and integers separately?

Let expr contain a sum of powers of x with some coefficients ci. The exponents of ...
277 views

### Trying to write out the prime factorization of a number with CenterDot and Superscript

I am trying to use CenterDot and Superscript, in conjunction with Apply to write out the prime factorization of any given integer. Everything works well UNLESS the prime factorization of the number ...
50 views

### Conditional replacement of all occurrences of a variable?

I know there is functionality in Mathematica to perform replacements like: x[a] d[a,b]/.y_[z_] d[z_,p_]->y[p] Which naturally gives ...
182 views

### Expression manipulation: Explode sums and products? [duplicate]

I wonder if the functionality exists to explode a sum, or product? What I mean by that is the following. Imagine, you have input data data = a + b c - d e f ; Is ...
338 views

### How can I get Solve to combine Sin/Cos into Tan?

I want to solve an equation in x, containing Sin[x], Cos[x] and a positive real constant <...
224 views

### Indexing of Large Autonomous System of Equations for Use in NDSolve

I currently have a list of ~150 autonomous ODE's that I need to be able to work with using NDSolve. Fortunately I already have them formatted in plaintext, which ...
81 views

### Range and decimal digits [duplicate]

When I set Plot[Sin[x], {x, -2, -1}, Frame -> True, Axes -> False, FrameTicks -> {{Automatic, Automatic}, {Range[-2, -1, 0.2], Automatic}}] I ...
273 views

### Strange behavior of undocumented RawArray and ArrayObject expressions

I discovered several strange results and inconsistencies while trying to understand what undocumented RawArray and ArrayObject ...
346 views

### Concatenating strings, unevaluated expressions and evaluated expressions/values

Maybe this is something very simple to some of you. Anyway, I think this can be useful to many others like me. I would like to build an output that involves strings, unevaluated expressions and ...
252 views

### Keep Mathematica from simplifying functions with a specified Head

I want to run Simplify and/or Refine on various expressions, but keep it from touching anything that contains a specific ...
157 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. ...
197 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 ...
152 views

### Time-efficient manipulation (zeroing) of expression

I have huge matrices in the form of ...
473 views

### Is it possible to define custom compound assignment operators like ⊕= similar to built-ins +=, *= etc?

I would like to do something like this: ...
94 views

### Problem with InverseFunction of Sqrt

I want to build a table of InverseFunctions, f.e.: ...
192 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 ...
273 views

### How to get solution from DSolve

How to get the solution from DSolve in such way that there is no need to copy the result. When for example solving: ...
140 views

### How do I constrain variables to a user-defined domain in ArgMax?

I am trying to ArgMax a function over x, but x is only defined between ...
177 views

### How to get a list of all expressions in a notebook matching a certain pattern?

Suppose I have a Mathematica notebook saved to a certain location on disk. Given a pattern I need to get the list of all expressions matching this pattern that appear in input, output or print cells ...
580 views

### How to embed an image into a string?

Note: The bug described in the post is in Mathematica 9, and has been fixed in 10.0. The documentation for String contains the following statements: Strings ...
61 views

I am currently trying to solve under what condition does the following term will be zero? ...
71 views

### How does one go from a string to the contents of a variable with the same name?

What command should I use if I want to convert a string to the contents of a variable with the same name as the contents of that string withing a function. ToExpression[] doesn't seem to do it. ...
792 views

### Displaying a series obtained by evaluating a Taylor series

Description of problem I would like to use Mathematica to display the series obtained by substituting a value for $x$ in a Taylor series expansion. The terms of the series will be rational numbers, ...
248 views

### Stopping Mathematica from reordering expressions [duplicate]

I want Mathemtica to stop manipulating my polynomials! I mean, I want the output of Print[3 x + 5 + x^2] to be just $3x+5+x^2$, not $5+3x+x^2$ as Mathematica ...
94 views

### Convert an expression from one form to another

I have this expression -0.433284-0.758719 x+0.00289158 x^2-0.443672 y+0.00149027 y^2 I want to express it in terms of $$\frac{(x-h)^2}{b^2}+\frac{(y-k)^2}{a^2}$$....
77 views

1k views

### How can I obtain Wolfram Alpha's “alternative forms” of an expression inside Mathematica?

When I type in Wolfram Alpha, say, cos(a+b) or cos(a+b)^2 or (OK this next one can easily be obtained in Mathematica, ...
153 views

### Thread over uneven (ragged) expressions with full functionality?

There are a number of questions on this site about "threading" including several relating to uneven (ragged) lists. However, none that I could find deal with the full functionality of ...
80 views

### Converting expression to C

I have an expression of the form ...
247 views

### Is there an analogue of the Variables command for general expressions?

The command Variables[poly] gives me a list of all variables that appear in the expression poly, which involved sums, ...
424 views

### How to manipulate nested expressions?

I have the following expression, only slightly complicated, and I'd like to do two things: Plot the elements of the lists (though messy, all are in the same range)...