Questions tagged [algebraic-manipulation]

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

Filter by
Sorted by
Tagged with
7
votes
3answers
236 views

How can I check if a function can be written as $a * \sin (b * x + c) + d$?

I want to write a function that takes another function, say $f(x)$ and a variable $x$ as input and return True it this function can be written in the form ...
0
votes
1answer
29 views

Collect ignoring negative exponential

I have the expression 1 + Exp[-2 x] (-1 - 2 x (1 + x)) I used Expand to get the x's to multiply within the parentheses, this ...
5
votes
1answer
106 views

Generating an efficient way to compute einsum?

Given an einsum like below, how could I generate an efficient computation graph for it? $$X_{ik} M_{ij}M_{kl} X_{jl}$$ The indices range from $1$ to $d$ and the goal is to minimize computation time ...
1
vote
1answer
65 views

Generating summation formulas for factorized 4th moments

I'm interested in getting summation formulas for the following expression, in Einstein summation notation, with indices ranging from $1$ to $d$ $$c=X_{ik}M_{ijkl}X_{jl}$$ Here $M_{ijkl}$ is ...
0
votes
0answers
34 views

Einstein summation? [duplicate]

Is there something to help me do Einstein summations in Mathematica? I found a couple of Mathematica packages to do this, but not sure how out of date they are. In Python-land you can do things like <...
4
votes
1answer
81 views

Is it possible to make Decompose work with coefficients containing radicals?

It appears that Decompose works reliably only on polynomials with integer coefficients, although it seems to be not mentioned in the docs. Can I make it work (or ...
1
vote
2answers
47 views

How to replace a sub-expression when it implicitly exists in an expression

In order to make my question clear, I would like to use a simple expression as an toy example. Suppose we have an expression, which is, f = a + 2*b + c Now I ...
1
vote
1answer
36 views

Assuming x real, simplifying or refining Im[1/(x+i)] doesn't yield anything

I think it is straightforward from the title, Simplify[Im[1/(x+I)], x > 0] spits out, Im[1/(x+I)] while I would have ...
4
votes
3answers
186 views

Eigenvectors in the limit $ \mu\rightarrow 0 $ are not the same as eigenvectors when setting $ \mu=0 $ from the beginning

I would like to find the eigenvectors of a matrix and see what the eigenvectors look like in the limit of $ \mu\rightarrow 0 $: ...
0
votes
0answers
16 views

Expressing Numbers with Rational Denominators (Surd Form) [duplicate]

Is there a command which expresses given real numbers in surd form (when possible)? That is, a form where any rooted terms are placed in the numerator, and the denominator is rational. Here are some ...
6
votes
3answers
505 views

Factoring the square of this polynomial?

I have a polynomial $$\frac{b^4}{a^4}-\frac{2 b^2}{a^2}+1$$ and I want to complete the square to get this kind of expression: $$\left(1-\frac{b^2}{a^2}\right)^2.$$ I had try: ...
0
votes
1answer
48 views

Get Mathematica to factor constants out of definite integral [duplicate]

Say we have Integrate[a f[x],{x,-Infinity,Infinity}] And want Mathmatica to factor out a to get ...
5
votes
3answers
105 views

Optimal way to extract “positive part” of a multivariate polynomial

I've got multivariate polynomials with numerical coefficients, like e. g. p - s - p q^2 s^2 + 3 r s^2 + 3 r^2 s^2 - p r^2 s^2 - 2 q r^2 s^2 - 2 r^3 s^2 + s^3 and ...
1
vote
1answer
39 views

Drop-down menu to globally change definition of a function `t[x]`?

If have a function t[x_] which is used extensively in a long notebook, but which has a variety of definitions, and which is used in a variety of ways. I'm looking ...
0
votes
0answers
41 views

Algebraic manipulation on removing common factor outside

d[i,j] and M[i,j] are elements of size arrays of size 2x2 After some manipulations I get this as Output ...
3
votes
4answers
96 views

Algebraic simplification [closed]

Given, $$\sqrt{\frac{x}{y}} + \sqrt{\frac{y}{x}}\;\; where \;\; x,y \gt 0 \;\; and \;\; x,y \in \Re \;\; (Expression \;\;1)$$ Somehow, I found that $$\sqrt{\frac{(x+y)^2}{x\cdot y}} \;\; (Expression\...
4
votes
3answers
144 views

Why won't Mathematica give a prettier expression for this really simple algebraic expression?

As a result of some lengthy calculations, Mathematica gave me the following expresssion: $$ \frac{xy^2+(1 + y)\sqrt{1 + y(2 + y + xy)}}{(1 + y)^2} $$ I tried all sorts of simplifications, but none ...
1
vote
2answers
44 views

Replace rules change dimension

This is absolutely driving me crazy, I don't know if this is a bug or what, but replace rule sometimes change dimension of my data. Say I have data: ...
1
vote
1answer
106 views

How can I simplify a super long expression? [closed]

I am a brand new to using Mathematica, and currently using it for my thesis. Essentially I have a really long expression made up of lots of parameters. I am trying to reduce the size of the ...
0
votes
0answers
29 views

CoefficientRules for huge expressions

Is there some idea to get the coefficients for a very complicated, huge, and explicit polynomial expression to avoid insufficient memory problem? I am trying to use GroebnerBasis`DistributedTermsList ...
0
votes
3answers
72 views

Expand and Simplify do not work for NonCommutativeMultiply

Expand and Simplify do not work for NonCommutativeMultiply[] then how do we expand an expression like (a+b)**(a-b) ?
2
votes
1answer
48 views

Is there a method to preserve order when matrix multiplying in Mathematica?

I know that commutativity can be preserved in Mathematica by using ** i.e. a*b can get printed as b a but if I use a**b then it will always be printed as a b. However, I am not able to implement ...
5
votes
1answer
86 views

Defining rules for anti-commutative multiplication

I am trying to create products following an anti-commutative rules using the binary operator **. I define my rules the following way: ...
0
votes
1answer
42 views

Not able to multiply the output of the code below

It is the output of the code given below ...
6
votes
2answers
93 views

Get the intermediate steps of FullSimplify

I have this expression: Log[i] > (i Log[i])/n + Log[n - i] - (i Log[n - i])/n And I attempt to simplify it and get this: ...
2
votes
0answers
35 views

How to Simplify/Factorise symbolic non-commutative expressions?

It always strikes me as odd, that Mathematica seems to have a hard time with non-communative multiplications. I can use the horrible TensorExpand (or more performant Distribute) to get ...
1
vote
1answer
50 views

Parametric solution of a system of polynomial equations

I have the following system of equations, 1+x+y+z==0, 1+x*y+y*z+x*z==0 which I want to solve in the extension field of GF(2), the algebraic closure of GF(2) for ...
0
votes
1answer
70 views

Approximate Simplify (or factorization) [closed]

Suppose I have $$(2+2a+a^2)(RC)^2 + RC(5+2a)t+t^2$$ I can factor $(2+2a+a^2) = 1+(1+a)^2$. When I assume $a \gg 1$ then $1+(1+a)^2\approx (1+a)^2$. Then I can write: $$(a+1)^2(RC)^2 + 2RC(5/2+a)t+t^...
0
votes
2answers
38 views

How to distribute exponentiation over multiplication?

I would expect the following: FullSimplify[(a*b)^i, a > 0 && b > 0 && i > 0] to give me a^i * b^i as ...
1
vote
1answer
25 views

Trying to apply Jensen's inequality to a complicated symbolic expression

I have a somewhat complicated inequality expression like this: ...
0
votes
2answers
45 views

How to manipulate sequences of inequalities?

I am trying to write some symbolic inequality proofs in Mathematica. What would be a clean way to make the inference that a >= b and ...
1
vote
1answer
36 views

How to PowerExpand a generic Product?

I have: PowerExpand[Log[Product[f[i], {i, 1, n}]]] // InputForm (* Output: Log[Product[f[i], {i, 1, n}]] *) However, I would expect to get the following as the ...
0
votes
2answers
52 views

Factor not factoring quadratic polynomial [closed]

I'm using version 11.3 Expand[(Sqrt[2] - t)^2] 2 - 2 Sqrt[2] t + t^2, but ...
2
votes
0answers
89 views

Monitoring PolynomialReduce/Alternatives for other CAS packages

I have a large generic polynomial That looks like $N = \sum_{i_1,i_2\cdots}c_{i_1,i_2,i_3,\cdots} {x_{1}}^{i_1}{x_{2}}^{i_2}\cdots $ This could have anywhere between 3000-9000 terms with a maximum ...
1
vote
0answers
159 views

Solving for coefficients of a polynomial ansatz in a rational function

(This is now a solved problem by my own alternative methods, and using some more physical arguments to limit the complexity of the problem. However more generally, any answers and strategies would be ...
1
vote
1answer
61 views

Splitting a general rational polynomial ansatz into powers

EDIT This question is completely wrong and useless. It is mathematically incorrect. I think something like Series is sufficient if you're trying to do something ...
0
votes
1answer
38 views

Terms not cancelling properly [closed]

I have defined ...
2
votes
2answers
97 views

Removing fractions without a particular variable

As a very minimal example, consider a sum of fractions such as: $A=\frac{a}{s_{123}bc}+\frac{d}{e}$ In practice, I have many hundreds of thousands of these fractions generated from a recursion ...
0
votes
0answers
35 views

Evaluating Fourier coefficients when Exponential terms are present

I am trying an analytical solution for a 3D Laplace equaition, and just wanted to know if I could use the symbolic calculation capabilities of Mathematica to calculate the Fourier coefficients ...
0
votes
2answers
113 views

Transform expression into a certain standard form for an ODE

I'm using Mathmatica 11.1 on Windows. Given an expression containing a differntial equation of the form $\qquad A\, x'(z) = C\, x''(z) - B\, x(z)$ Or ...
2
votes
2answers
101 views

Vector calculus with index notation

How would you calculate this in Mathematica? $$\sum_i\partial_i\partial_i G_{jk}$$ $$G_{jk}=\bigg(\frac{\delta_{jk}}{r}+\frac{(x_j-y_j)(x_k-y_k)}{r^3}\bigg)$$ where $r=|\boldsymbol{x}- \boldsymbol{...
2
votes
2answers
41 views

Defining a differential operator that acts on a non-commutative basis

Given a non-commutative basis ${x_0,x_1,x_2}$ I'd like to define a differential operator that acts as so $$ \Delta_i (\sum_{n=0}^\infty c_n x_i^n) = \sum_{n=1}^\infty c_n x_i^{n-1}, \quad \Delta_i ...
0
votes
0answers
35 views

Factoring explicit quantities

I'm wondering if there is a way I can explicitly factor an equation into separate chunks. For example, if I have ...
0
votes
3answers
49 views

Storing solution of equation and performing operation

I have the following equations which I solve to find a and b. ...
0
votes
1answer
47 views

Changing variables to obtain derivatives of new variables [duplicate]

Let's say that I have some symbolic expression of a function $x(t)$, and would like to obtain its derivative $x'(t)$. However, I also have the following two identities, $\xi = \omega t$, and $\eta = ...
0
votes
1answer
34 views

Neglect terms of order $1/n$

I have expressions like the following $A+B/n+C/n^2+\cdots,Z/n^p$. I'd like to keep just the first two terms, i.e., $A+B/n,$ however it seems that using the command O[1/n^2] is not working. The ...
1
vote
2answers
45 views

Collect term in a distributive way

Consider P = x (a2 b2 v^a2-1+a3 b3 v^a3-1+d1+d2-2 y)-(y-d1)(y-d2)-x I would like to collect terms in (x,y,z) in a distributive way, that is to get an expression ...
4
votes
1answer
136 views

How to implement split-complex numbers?

For those who do not know, the split-complex numbers are an analogue to the complex numbers where J is defined such that $J^2=1$ but $J\ne\pm1$, so they are all of the form $a+bJ$. By using ...
1
vote
1answer
87 views

How to distribute rules?

For example i want to have following equation : Det[A B C]=Det[A] Det[B] Det[C] What is the simplest way to distribute automatically?
2
votes
5answers
318 views

Reconstructing a polynomial from its coefficient array

A polynomial coefficient matrix: mat = CoefficientList[3 + 5 x^3 + 4 y^3 + 2 x + 6 x^2 y + 7 x y^2 + 8 x y, {x, y}]; \begin{equation} \left( \begin{array}{...