Tagged Questions

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

175 views

Simplifying an expression given a known variable relation

I am wondering if there is a way to simplify an algebraic expression given a known variable equation using Mathematica. For instance, I wish to simplify an expression for the heat change in a process: ...
363 views

How to do algebra on unevaluated integrals?

I am working with functions calculated from a set of general basis functions. ...
138 views

Collect powers of variables and integers separately?

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

Pull out scalars from NonCommutativeMultiply in commutator of SU2 spin algebra

I am trying to work on spin chains in Mathematica. That is, N spin-1/2 on a one-dimensional lattice with periodic boundary condition (N+1=1). I need therefore the SU2 spin algebra $S_z, S_+, S_-$ with ...
925 views

Partial fraction decomposition of $1/(e^x-1)$

This link has discussion on finding partial fraction decomposition of $1/(e^x-1)$, so I experimented with Mathematica to see if M can do it, but looks like not. Similar is the case with one more CAS I ...
394 views

How to find all roots of a complex number [duplicate]

Finding all roots, and I know there are four f them, of this (1 - i)^(1/4) Not only real, but imaginary as well
256 views

Extracting Coefficients from a List of Sines

I want to extract the coefficients from the following list: list={16.2219 Sin[16.2219 t], 6.60924 Sin[6.60924 t], 13.927 Sin[ 13.927 t], 2.91309 Sin[2.91309 t]} ...
349 views

Expressing a matrix in terms of four basis matrices

I have five matrices and I want to represent one in the basis of other four. So how do I find the value of coefficients? For example, if the matrices are I1, ...
131 views

Mathematica spitting code back when using Resolve over a large range of interest

I've just started using Mathematica and have encountered my first issue. Below are two commands which only differ in the range of values I am asking Mathematica to check. The first works fine, but the ...
161 views

Rearranging 5 equations

I am trying to rearrange 5 equations in terms of 5 variables. I have the equations for y1, y2, ...
94 views

Is there a way to put the following equation of a line into vector form using Mathematica (or a Mathematical package)? $\displaystyle y=\frac{cos(s_n)-cos(s_{n+1})}{sin(s_{n+1})-sin(s_n)}(x-sin(s_n))-... 1answer 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. ... 1answer 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 ... 0answers 118 views Giving hints to Integrate I working with the integral ... 1answer 146 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 ... 1answer 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 ... 3answers 389 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$. 1answer 291 views Infinite expression encountered when simplifying ArcTan sums although the result is finite If I attempt to simplify the sum ArcTan[1/x] + ArcTan[x] with ArcTan[ Simplify[ TrigExpand[ Tan[ ArcTan[1/x] + ArcTan[x]]]]] ... 1answer 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. ... 1answer 588 views Transform Root objects into Trigonometric expressions Consider the Root objects roots = Table[Root[-1 + 27 #1^2 - 162 #1^4 + 243 #1^6 &, i],{i,1,6}] These can be expressed in terms trigonometric functions as ... 1answer 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, ... 2answers 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 ... 1answer 204 views How to get Coefficient List from an expression with various variables consider following expression: ... 1answer 123 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}} ... 1answer 156 views Generate expressions equivalent to rooted trees I would like to know how to generate all rooted trees on$nvertices using Mathematica? More precisely, I am interested in generating algebraic expressions equivalent to rooted trees and constructed ... 1answer 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 &... 2answers 219 views Expand expression into quotient of negative power series I have a function T(z) and want to expand it to the following form: At the end I want to have a list of equations, which can calculate a0, a1, a2, b0, b1 and b2 with different values of h1, h2, ... 1answer 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 ... 1answer 252 views Impose an specific Trigonometric expansion with TrigExpand Is there a way to impose in mathematica an specific trigonometric expansion with TrigExpand? I have various double-angle expressions for cosine and sine in my ... 1answer 149 views Replacement rules in combination with pure functions to make a change of variables I have defined my function in this way w = f[r,Î˜] ; After some calculations i obtained my results with respect to the previous function. For instance: ... 1answer 1k views How to Make a change of variables I have the following expresion\hat{M}^2=-\left[\frac{1}{\sin\beta}\frac{\partial}{\partial\beta}\sin\beta\frac{\partial}{\partial\beta}+\frac{1}{sin^2\beta}\left(\frac{\partial^2}{\partial\alpha^2}... 1answer 237 views Speed up MinimalPolynomial My Mathematica code runs slowly MinimalPolynomial[Sqrt[2] + Sqrt[3]+ Sqrt[5]+ Sqrt[7]+ Sqrt[11]+ Sqrt[13], x] runs slowly, but the Maple version ... 1answer 103 views Manipulating formal vectors I want to work with a formal vector space spanned by integer triplets: $$V=\text{span}\{(a,b,c):a,b,c\in\mathbb N^3\},$$ such that Mathematica can do additions for me. For example,if I input {1,0,1}... 0answers 171 views How to make noncommutative multiplication agree with commutative multiplication I need a noncommutative multiplication that is Associative DistributiveA**0=0$,$A**1=A$Agrees with the commutative multiplication ($A**(k B)=(k A)**B=k (A**B)$) I have found a code ... 0answers 119 views Define inverse for the custom operator I want to define simple matrix algebra (inspired by the following posts: Block Matrix Algebra with Mathematica ; How to define custom operators ). I assume the funtion ... 2answers 296 views Transform an expression to remove the singularity I have the expression Sin[c x]/c. Clearly it is undefined at$c=0\$, but that is merely a removable singularity, since $$\frac{\sin(cx)}c=x\frac{\sin(cx)}{cx}= x\... 1answer 810 views How to substitute the following conditions into an expression? I have an expression: p=a\;b\; x + b^2\; y + a\;c\; z. I want to substitute a\;b=1, b^2 = 2 and a\;c = 4 to obtain p = x + 2y + 4z. How can I tell Mathematica to do that? I dont know how to ... 2answers 176 views Exploiting a relation among constants Say I have two arbitrary real constants p,q that satisfy p^2+q^2=1. Is there any way to easily declare this relation in Mathematica? Edit More specifically I have this (among others) expression: ... 5answers 349 views Isolating characters in a string I'm struggling to find the right function in mathematica to isolate specific characters in a string. I have got a formula as string (I imported it from an excelfile) like this: y = 0.97*x1 + 0.521*... 2answers 101 views Grouping constants in expressions Starting from the general expression: i A(a x + b y + c z + ...) + j B(a' x + b' y + c' z + ...) + k C(a'' x +b'' y + c'' z + ...) I'd like to rearrange it to ... 2answers 99 views How to get a rule for, e.g., (x + y) to apply to (-x - y), etc.? For example, the substitution (x + y) -> s fails here: In[1]:= (-x - y) /. (x + y) -> s Out[1]= -x - y Of course, I ... 1answer 104 views How to order lexicographically the monomers of a parametrized polynomial? I want to order lexicographically the monomials in a "parametrized polynomial", i.e. polynomials whose "symbolic bits" may be either "variables" or "parameters". For example: ... 2answers 146 views Simplification with assumptions I'm trying to make Mathematica do some simplifications for me. I have the expression ((1 + s[1]) (-1 + s[2]) )/(-1 + s[1] s[2]) and want to simplify this with ... 1answer 210 views Working with a system of differential equations that cannot be solved explicitly I have to work a lot with three functions \;o_1(t), o_2(t), o_3(t)\; that are solutions to the certain system of differential equations: ... 2answers 623 views Memory leak issues I am working with noncommuting objects and basically I am using Mathematica to sort large expressions by normal ordering and simplifying them. To this end, I first create an object called ... 2answers 425 views How can I simplify \log(512) to 9\log(2)? Can you explain me about the result of Integrate. ... 1answer 98 views How to transform the polynomial in this way? I have two functions f and g and a polynomial ... 0answers 199 views Do a gauge transformation for a Chern-Simons theory? Suppose we have the following Lagrangian density:$$ L=\epsilon^{\mu\nu\rho}\big(\sum_a A^a_{\mu}(x) \partial_\nu A^a_{\rho}(x)-\sum_{a,b,c}\frac{1}{3} f^{bca} A^a_{\mu}(x) A^b_{\nu}(x) A^c_{\rho}(x)...
First of all, it appears to me that $$\left|\frac{1}{x} + x^2\right| \Leftrightarrow \frac{|1 + x^3|}{|x|}$$ is true. I don't know why, but my attempt to verify it in Mathematica failed. ...