# Tagged Questions

The art of manipulating an algebraic expression into the desired form.

103 views

### How do I find the constant term of a multivariate polynomial, when (x^0)(y^0)?

So let's say f[x_,y_]:=(2x+2y+1)^2, when I type Coefficient[f[x,y],x y] I recieve 8. But what can I input to recieve 1, when (x^...
2k views

### Defining a function that completes the square given a quadratic polynomial expression

How can I write a function that would complete the square in a quadratic polynomial expression such that, for example, CompleteTheSquare[5 x^2 + 27 x - 5, x] ...
354 views

### Why is ReplaceAll behaving like this?

I'm learning to use the ReplaceAll function and I found the behavior of which is quite confusing. For Sqrt[f[x, y]] /. f[___] -> u Mathematica returns <...
58 views

### Abstract Vectors [duplicate]

Is there a way to deal with abstract vectors in the following sense: Say I have a function f[y]. Now I want to evaluate ...
73 views

### Algebraic Manipulations with Indices

I am absolutely new to Mathematica, but I've heard it is a pretty powerful tool for symbolic calculations. My problem (stated generally): I have three dimensional array. I define a symbolic operator ...
65 views

### Simplifying Terms in a Matrix

Given the following 3 matrices: M1=1/3*{{1,1,1},{1,α,α^2},{1,α^2,α]}} Z1={{Z+Zg,Zg,Zg},{Zg,Z+Zg,Zg},{Zg,Zg,Z+Zg}} M2={{1,1,1},{1,α^2,α},{1,α,α^2}} where alpha ...
154 views

### Working with quantum mechanics spins

I've written the following code for simple quantum mechanics operators on spin states: It seems to work, but the output could be better - how do I let Mathematics know that $0**\ 0==0$, and can I ...
199 views

### Is Mathematica intended to be used to do lengthy algebraic clculations? [closed]

The last two days I spent improving my Mathematica skills regarding rather simple algebraic calculations: discrete FT splitting sums combining sums changing summation indices replacing a sum with a ...
8k views

### Finding real roots of negative numbers (for example, $\sqrt[3]{-8}$)

Say I want to quickly calculate $\sqrt[3]{-8}$, to which the most obvious solution is $-2$. When I input $\sqrt[3]{-8}$ or Power[-8, 3^-1], Mathematica gives the ...
218 views

### Forcing solutions to avoid Root[]

I'm solving a system of ordinary non-homogeneous differential equations (4 equations). The solutions will include some algebraic equations solutions as known from text books due to the use of an eigen ...
78 views

270 views

### Extract common subexpressions from expressions [duplicate]

I am trying to evaluate multiple independent expressions with common parts. I would like Mathematica to somehow give me this common parts. It's probably not so clear, so let me give you an example. ...
128 views

### Pulling powers to the outside of expressions (inverting PowerExpand)

Is there something like an inverse of PowerExpand that pulls powers to the outside of expressions: $$x^2 y^2 \leadsto (x y)^2 \\ x^2/y^2 \leadsto (x/y)^2$$ I ...
118 views

### Giving hints to Integrate

I working with the integral ...
145 views

### How to factorise a variable out of an indefinite sum?

(I should start by saying I'm a total beginner with Mathematica, so if the answer needs code I'll need it spelled out quite clearly, the learning curve for this is proving steep!) Basically what I am ...
70 views

### How to pick out terms in a linear equation with a positive coefficient?

Basically I have a really large output which looks like a long linear equation $AAA-BAA-CAA+DAA+...-ZZZ$ And I only am concerned about those terms that have a positive coefficient (i.e. a plus in ...
55 views

### PiecewiseExpand doesn't take all kind of assumptions

Running PiecewiseExpand[expr, assum] does not work with all kind of assumptions. For example, the following line will not split the expression with absolute values in the chambers, considering m1=m2. ...
388 views

### How to obtain non-trivial solution of equal ratios

How can I obtain a non-trivial solution of the following: $$\frac{a}{b+c}=\frac{b}{c+a}=\frac{c}{a+b}$$ The answer is $a=b=c=1$.
589 views

### Distances between points in periodic cube

How can one implement more efficiently/elegantly/memory savvily the following function which returns a matrix of all Euclidian distances between points in 3D within a cube of width ...
187 views

### Factoring terms out of a polynomial

I don't do much algebra in Mathematica and was surprised to discover, while attempting to answer this question, that I had no idea how to factor out an expression from a polynomial. The question was, ...
219 views

### Choosing a branch of the square root when performing a series expansion

I have the following problem. Consider expression f=Sqrt[(x-2y)^2] There is an obvious ambiguity in the definition of f ...
204 views

### How to get Coefficient List from an expression with various variables

consider following expression: ...
121 views

### If statement and elements of an imported data

I import a data file: SetDirectory["C:\\Users\\SE7EN\\Desktop\\mathematica\\test"]; dd = Import["data.dat", "Table"] Out[2] = {{1}, {2}, {3}, {4}, {5}, {6}, {7}} ...
155 views

### Generate expressions equivalent to rooted trees

I would like to know how to generate all rooted trees on $n$ vertices using Mathematica? More precisely, I am interested in generating algebraic expressions equivalent to rooted trees and constructed ...
151 views

### What is the inside? [closed]

What is the inside of the Mathematica command, solve, for a system of equations like the following? \eqalign{ (x +2\phantom{3} z)^2 + (y +\phantom{3} w)^2 &= 52\cr (x + 30z)^2 + (y + 3w)^2 &...
86 views

### How to distribute PermutationProduct over the sum

Assuming I have two elements of the permutation group algebra $a_1$, $a_2$ such that $a_i=\sum_{p\in S_n}\alpha_pp$, I want to define a linear product $\odot$ that distributes over the sum and pulls ...