Tag Info

Hot answers tagged algebraic-manipulation

Accepted

Transform Root objects into Trigonometric expressions

Disclaimer: This is not a full answer, but perhaps it's a start. From an algebraic stand point this seems like a very hard problem. I attacked it with a more brute force approach. I guess a basis and ...
• 32.7k

Expressing a polynomial as a sum of squares

Here is a somewhat heuristic approach, that relies in this case on the SOS having integer coefficients. I will indicate an alteration that gives a numerical approximation in the general case. Start ...
• 55.1k
Accepted

How to do algebra on unevaluated integrals?

Similar idea to belisarius, except in V10 we can inactivate Integrate to keep it from evaluating or even trying to evaluate: ...
• 213k

How does Mathematica calculate $\sin(\pi/5)$?

In the course of answering this question, I ran into a little bit of weirdness that doesn't square with my experience with previous versions of Mathematica. I think writing this answer is as good a ...
Accepted

Lagrangian to Hamiltonian

Here is how you would do it using the standard add-on package VariationalMethods, which is meant for calculations like this: ...
• 95k
Accepted

Pull out scalars from NonCommutativeMultiply in commutator of SU2 spin algebra

Edit: a sparse array version for larger chains is given at the end. Since you're specifically asking about $SU(2)$, we have a convenient representation in the form of the $2\times 2$ Pauli matrices. ...
• 95k

How to simplify -a*z+a*z to 0 where "a" is an expression

Expand takes forever, because it is trying to expand (u + x + y + z)^10000. Tell it not to. ...
• 58.2k
Accepted

Is Mathematica intended to be used to do lengthy algebraic calculations?

I do analytical calculations with Mma on the regular basis during already about 10 years in the area of theoretical solid state physics. Previously I did such analytical calculations by hand, now I do ...
• 34.8k

How to extract all the coefficients of a homogeneous polynomial

Using an undocumented function: ...

Differentiating functions of vectors/matrices?

In this post I discuss a function MatrixD which attempts to take a matrix derivative following the guidelines given in the The Matrix Cookbook. I still want to ...
• 123k
Accepted

How can I make Mathematica do, ArcTanh[x] + ArcTanh[y] = ArcTanh[x+y/1+xy]?

A little bit of trickery: ArcTanh[x] + ArcTanh[y] // Tanh // TrigExpand // FullSimplify // ArcTanh (* ArcTanh[(x + y)/(1 + x y)] *) Note the parentheses.

Is it possible to have Mathematica move all terms to one side of an inequality?

Since Mathematica 11.3 you can use SubtractSides, that works for equations and inequalities, for example ...
• 28.9k

...
• 114k
Accepted

Rearrange an algebraic expression so that each variable appears only once

The following approach transforms ans1 to ans2 and points the way to more general approaches. As noted in the Question, ...
• 58.2k
Accepted

Rewrite a real polynomial in real (but only linear and quadratic) factors

As noted, one sticking point is that polynomial roots in general cannot be represented in Mathematica by anything other than Root[] objects. Nevertheless, it is ...
Accepted

Factor a polynomial Root into Roots of smallest possible degree

A constructive approach The problem can be solved if the form of the solution is given. Define the two factors using a hint (that these should be cubic equations) in the original post ...
• 15.7k

How do I use "Factor" to get this form

HornerForm[x1 x2 + x1 x3 x4 + x1 x3 x5] (* x1 (x2 + x3 (x4 + x5)) *)
• 13.4k

Finding coefficients in polynomial function

One liner: Solve[PolynomialRemainder[6 x^3 - 5 x^2 - 12 x + k, 3 x + 2, x] == 0, k]
Accepted

Extract common factor

I think PolynomialGCD is the most direct tool: ...
• 123k
Accepted

Computing the seven roots of a polynomial

poly = x^7 + x^6 - 18 x^5 - 35 x^4 + 38 x^3 + 104 x^2 + 7 x - 49; Find an extension in which the polynomial splits: ...
• 213k

Distances between points in periodic cube

Very late to the party, but I'll show a method that's faster than anything posted so far and will be hard to beat. First let's define our PeriodicDistance: ...
• 32.5k

What is the inside?

The precise details of the Mathematica engine are proprietary, therefore no one will be able to legally post a full answer to your question. The best information I am aware of comes from the Notes on ...
• 264k
Accepted

Expanding out multiplied terms

This is a task for Inactivate/Inactive and HoldForm: ...
• 17.8k

Lagrangian to Hamiltonian

genCoords = {x[t]}; ke = 1/2 m x'[t]^2; v = 1/2 k x[t]^2; q = -c x'[t]; l = ke - v; Solve for x'[t] in terms of ...
• 21.5k
Accepted

How to sort arguments of Times in nonstandard order?

You can create your own ...Form wrapper that will format Times as you want it. Let's start with ordering function that can be ...
• 14.7k
Accepted

How to write polynomial expression as commutator form?

Update, December 22 I've developed a version that is more robust. I believe it should work in general, but I'm sure there are some corner cases that won't work (and probably some-not-so-corner cases ...
• 21.5k

Factor a polynomial Root into Roots of smallest possible degree

I'll show the resultant formulation for the degree 15 example. The polynomial in question: ...
• 55.1k
Accepted

Finding an analytic solution of a cubic equation

It comes with which roots correspond to which branches of a cubic root in the exact expression. For instance, consider the simpler $$y^3 = z$$ Then my three solutions are $y=\sqrt[3]{z}$, \$y=(-1)^{2/...
• 487
Accepted

Can't get Mathematica to simplify an expression

A few things of note: Like @m_goldberg suggested, it is wise to explicitly state d ∈ Reals, s ∈ Reals. Because you introduced .'...
• 8,487