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

learn more… | top users | synonyms

4
votes
1answer
87 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]]]]] ...
0
votes
0answers
26 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. ...
0
votes
0answers
49 views

Split absolute value in chambers

I usually expand expression containing absolute values, with the PiecewiseExpand[] function. ...
1
vote
0answers
56 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 ...
3
votes
1answer
88 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 ...
1
vote
1answer
91 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, ...
2
votes
2answers
89 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 ...
6
votes
8answers
798 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] ...
1
vote
1answer
47 views
1
vote
1answer
59 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}} ...
4
votes
1answer
107 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 ...
7
votes
4answers
366 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 ...
1
vote
1answer
102 views

What is the inside?

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 ...
-2
votes
1answer
92 views

Algebra problem [closed]

I have recently run into an algebra problem that goes as follows. Using the numbers 1-9 A + B + C + D = EF E + F + G + H = CJ B + G + J = ?D total = B? where ...
2
votes
1answer
49 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 ...
0
votes
2answers
48 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, ...
32
votes
6answers
4k 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 ...
6
votes
1answer
192 views

Maple like collect command in Mathematica

In Maple I often simplify expressions for functions of same argument using the collect command: > collect(a*f(x)+f(y)+x*f(x), f, factor) (a+x)*f(x)+f(y) where ...
0
votes
1answer
78 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 ...
0
votes
1answer
93 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: ...
0
votes
1answer
74 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
vote
0answers
41 views

How to make noncommutative multiplication agree with commutative multiplication

I need a noncommutative multiplication that is Associative Distributive $A**0=0$, $A**1=A$ Agrees with the commutative multiplication ($A**(k B)=(k A)**B=k (A**B)$) I have found a code ...
0
votes
1answer
57 views

Force multiplication by a single factor [closed]

I have an expression that Mathematica decides to return in the general form: y = f ( a/f + b/Sqrt[f + 2] + c*f^2/Sqrt[f + 2]) (actually my expression is much ...
13
votes
1answer
386 views

Block Matrix Algebra with Mathematica

I have come up with some BlockMatrix Algebra for Mathematica to make notations easier. I have the following: ...
1
vote
0answers
72 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 ...
6
votes
1answer
118 views

Is there a version of Together that doesn't cancel common factors?

I'm running code that produces a long combination of rational functions with free constants that need to be tuned such that the combination vanishes. My current method is to put the combination over ...
12
votes
7answers
2k views

How do I replace a variable in a polynomial?

How do I substitue z^2->x in the following polynomial z^4+z^2+4? z^4+z^2+4 /. z^2->x ...
4
votes
0answers
69 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}= ...
1
vote
2answers
89 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 ...
5
votes
1answer
184 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 ...
0
votes
0answers
23 views

Jacobian matrix formation from polynomial expressions [duplicate]

I want to find the jacobian matrix for 3 polynomial expression with 3 variables.. the polynomial expressions have the degree of 8.how to form it.?
3
votes
2answers
136 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: ...
5
votes
5answers
323 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 + ...
1
vote
2answers
89 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 ...
2
votes
2answers
107 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 ...
3
votes
1answer
69 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: ...
9
votes
2answers
478 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 ...
2
votes
1answer
136 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: ...
3
votes
2answers
286 views

How can I simplify $\log(512)$ to $9\log(2)$?

Can you explain me about the result of Integrate. ...
0
votes
1answer
89 views

How to transform the polynomial in this way?

I have two functions f and g and a polynomial ...
3
votes
0answers
115 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) ...
7
votes
3answers
321 views
0
votes
0answers
66 views

Algebraic condition from a non linear equation

I have got a system of equations which look like this: $\theta_{1}^{2}e^{\phi_{1}\cos(\Omega z)}\tilde{w}\cos^{2}(\theta_{1}\sin\Omega z)\sin^{2}\Omega z+\frac{1-\lambda\cos(2\theta_{1}\sin\Omega ...
9
votes
1answer
263 views

What is the proper way to verify that two expressions are equivalent?

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. ...
11
votes
1answer
188 views

ToNumberField won't recognize Root as an explicit algebraic number

In Mathematica 9.0.1, it appears that ToNumberField will not always recognize a Root object as an explicit algebraic number. ...
4
votes
1answer
180 views

Plot a cone in spherical co-ordinates

As we all know in spherical coordinates a function phi = π/3 gives us a cone. The cone makes an angle of π/3 with the imagined ...
2
votes
2answers
152 views

Pulling out common terms when simplifying complicated equations

I have a complicated expression where common terms are apparent but Simplify[] and FullSimplify[] don't appear able, even with plenty of assumptions added, to reduce down to a simpler form with common ...
0
votes
1answer
53 views

Using Collect with equations

Is it possible to somehow use the expression that Mathematica has collected once the Collect command has been used? What I mean is, I have an expression like this ...
7
votes
4answers
2k views

Checking if two trigonometric expressions are equal

Say I have two trigonometric expressions which are a bit complicated. Is there a quick way to check if they reduce to the same thing (that they are equal) using Mathematica? I was solving this: $y'' ...