# Tagged Questions

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

72 views

### How can I access a variable using Position?

I want to define a vector PosVec[a, b] dependent on the variables a and b of a matrix ...
147 views

190 views

### How do I insert OwnValues inside a held expression without evaluating it?

Here is a very long and complicated expression, which we abbreviate as a. I store it using SetDelayed because I want to perform ...
33 views

### Gradient Descent's Update Rule for Multiparameter Functions

I'm sure this has been answered before, but I haven't been able to find it. I'm trying to manually implement gradient descent for some function, f, with a vector of any length. I define the update ...
63 views

### How can I get the coordinates of a graphics primitive from a Graphics expression?

For example I have square = Graphics[Polygon[{{0, 0} ,{0, 1}, {1, 1}, {1, 0}}]] What functions can I apply to sqaure to ...
80 views

### Bringing rational functions to canonical form

I have a complicated expression, which among other things has stuff like functions of rational functions: expr = f[x/(-x^2 + y)] + f[-(x/(x^2 - y))] (* + ...*) ...
39 views

### How to invert an Elliptic function where the elliptic nome is a function of an independent variable?

I have a Jacobian elliptic function as a function of two independent variables $x$ and $y$. The elliptic parameter $m=m(y)$, $0 \leq m \leq 1$, is also a function of the variable $y$, and thus the ...
793 views

### List of atomic expressions

I was surprised to see Graph objects are atomic. Is there a way (through documentation or programmatically) to find all atomic heads? The ones I know of are: <...
48 views

### Newline in code with MakeExpression

I start with f[x]. In boxes, this is RowBox[{"f", "[", "x", "]"}]. I apply ...
2k views

### Scan vs. Map vs. Apply

I cannot understand the difference between Apply, Scan, and Map. I have tried to play with ...
90 views

### CoefficientList for exponentials terms

I have a long expression with exponentials of variable t1. I need to create a list of the coefficients for each exponential. The problem seems to be that several ...
533 views

### How to convert a notebook cell to a string retaining all formatting, colorization of identifiers etc?

I have an opened Mathematica notebook containing several cells. Suppose, I am interested in one of them -- it may contain a complete or incomplete expression (e.g. with syntax errors, highlighted ...
88 views

### Reading Cells or Boxes expression by expression

Let's say we have a cell: (*newline*) (*newline*) Plot[ x, {x, 0, 1} ] (*newline*) Plot[x, {x, 0, 2}] How to read it expression by expression? ...
80 views

### Replace pattern for exponentials

Ultimately, I want to replace every Exp[(const) w[i,j]] to T[i,j] and Exp[-(const) w[i,j]] to 1/T[i,j] in the following expression ...
602 views

### Simplifying expressions involving Sum

I am trying to use Mathematica to simplify a symbolic expression involving Sum. The expression is defined as follows: ...
157 views

### How to get the long logic expression with a terse method

I have a long logic expression (x==2||x==3||x==4)&&(y==2||y==3||y==4)&&(z==2||z==3||z==4)&&(m==2||m==3||m==4) How to get it by a terse ...
50 views

### Force expression in certain form

Is there a function in Mathematica to force an expression to be transformed into a given form. For example f[x] is a function of ...
117 views

### Efficiently strip off coefficients in front of variables?

I am working with multivariate polynomials and need a very efficient way to decompose monomials into coefficients and pure monomials. for instance consider variables ...
118 views

### How to extract the structure of relationships amongst variables in a system of equations? [closed]

Mathematica being a CAS, I would have thought what I'm trying to do a natural task. But I have not been able to find any information on this in the Internet. Basically, I have a large collection of ...
71 views

### Can Mathematica reliably determine the equality of any two constructible numbers?

A constructible number is any number which can be expressed with only natural numbers and the operators $+$, $-$, $\times$, $/$, $\sqrt{}$ (square root only). Is Mathematica's ...
79 views

### Deriving the Fourier Coefficients Formulas with a Manual Procedure

I already know that there are built-in functions to compute the Fourier coefficients but I want to derive their formulas manually. In fact, I want to obtain the final well-known formulas for the ...
2k views

### Replacement inside held expression

I wish to make a replacement inside a held expression: f[x_Real] := x^2; Hold[{2., 3.}] /. n_Real :> f[n] The desired output is ...
55 views

### Error: Recursion Depth of 1024 Exceeded During Evaluation

I wrote a function that exchanges integration and summation in an expression. ...
72 views

### Problems with Displaying Output for Summation

Consider the following code. ...
86 views

### Simplifying expressions

Let's define a function $\Omega(x,y)$ ...
67 views

### Replacing terms in a sum according to a condition

If I have a generic expression such as ...