Questions tagged [algebraic-manipulation]

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

Filter by
Sorted by
Tagged with
2
votes
1answer
24 views

Definition of a general rule

By defining: rule = Sqrt[expr_^2] :> expr; and writing: Sqrt[x^2] /. rule I get: x which is what is desired (...
1
vote
2answers
35 views

Simplify expression with non-commutative products

I am using NCAlgebra but I am open to any solution. I would like to simplify some expressions with many terms (a few dozens) using: the fact that each term is a ...
3
votes
1answer
50 views

How to find noncommutative product of two expression

I have the following function $$ B(n)=x \alpha ^n-y \alpha ^n q^n + \epsilon \left(x \alpha ^{n+1}-y \alpha ^{n+1} q^{n+1}\right). $$ Here, I want to find the product $B(n)^2$ or $B(n)*B(n+1)$ ...
6
votes
4answers
366 views

A problem with `Eliminate`.`

Consider this expression: Eliminate[a x + b y == 0 && c x + d y == 0, {x, y}] Mathematica returns ...
1
vote
1answer
49 views

How do I expand expressions involving complex numbers?

I am trying to do the following: Expand[(A g + n)^2 Conjugate[A g + n]^2, Element[{A, g, n}, Complexes]] The goal is to expand and get all the terms of $(A g + n)...
0
votes
2answers
107 views

How can I decompose polynomials in a certain way?

I' ve learned that the following examples can be used to decompose a factor in this way ...
1
vote
3answers
656 views

How would I solve this math problem on Mathematica?

$(3t^2 + 5t + a ) (4t^2 + bt - 2) = 12t^4 +26t^3 - 8t^2 - 16t + 6$ What is a + b? The answer would be: $6=-2a$ $a=-3$ $-16t=(5t\cdot-2)+a\cdot bt\Longrightarrow-16t=-10t+(-3)bt\Longrightarrow b=...
0
votes
1answer
31 views

Making substitution to an expressions with a list of numerical data [closed]

Suppose I have an expression similar to this: y=23.23*(h[x]^2)*(D[h[x],x])*(D[h[x],{x,3}])/(13.2+Cos[0.245x]) The actual expression is a lot more complicated, but ...
3
votes
3answers
89 views

isolating a specific variable to one side in an equation

I am trying to do a simple operation of manipulating an equation of multiple variables (say, $x,y,z$), so that I can get one of the these variables on the LHS and everything else on the RHS. It should ...
1
vote
2answers
64 views

Replacing value by another value

My question is that in Mathematica notebook when I write replacing commands, it didn't replace. In[1]:= 2*x+y+1/.(x+y)->0 Out[1]:=1+2x+y or ...
4
votes
1answer
117 views

How to get DAE representation from equations?

Update2: Thank you for all of your answers. I would like to clarify the question as I did a bit of research on DAE representations and their applications in software. There are 2 representations used ...
0
votes
1answer
64 views

Finding ODE series solution coefficients

I am trying to solve an ODE by subbing in a series form and then looking individually at the coefficients of different powers of the variable. I'm looking at a general form of equation: $$\frac{\...
3
votes
0answers
87 views

How to invert Expand

How do I invert Expand? I have lis={1 + x^2, 2 + 2 x^2 + x^4, 5 + 8 x^2 + 8 x^4 + 4 x^6 + x^8} and want to get ...
1
vote
1answer
62 views

Can Mathematica check if I correctly applied an algebraic transformation?

Mathematica has tons of functions to perform algebraic manipulations. But is there a way to use it to check if I didn't make mistakes in my own algebraic manipulations. As a real world example: [...
1
vote
1answer
67 views

Factoring after polynomial long division [closed]

I have gotten the code to do polynomial long division, but I want my students to also factor the solution if possible.
4
votes
1answer
143 views

Pattern matching expressions that have been simplified

I run into this type of issue frequently when trying to apply known identities to complicated expressions: some of my expressions will have their forms simplified by mathematica in such a way that ...
1
vote
1answer
202 views

Simplifying solution to a third-order Boundary Value problem

I have been trying to solve a physical problem during which I reach the following third-order, Linear O.D.E. The solution I get using this expression is really messy. Is there any way to simplify it ...
0
votes
0answers
51 views

Dealing with positive power variables in Taylor expansion and assumptions

I would like to compute the Taylor expansion of monomials whose powers are nonnegative rational variables. First, here is a function which encodes the multivariate Taylor expansion at the points <...
0
votes
2answers
36 views

Check whether a given quantity is negative

Given four numbers $n0, n1, n2, n4$ such that $n1+n2+n3+n4 = 1$. How can we check the sign of $A - 2 B$ (where $A$ and $B$ are defined below), i.e., whether this quantity is positive or negative? <...
8
votes
3answers
251 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
31 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 ...
6
votes
1answer
114 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
69 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
36 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
85 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
54 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
39 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
198 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
20 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
528 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
67 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
117 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
43 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
43 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
97 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
148 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 ...
10
votes
4answers
513 views

Mathematica function equivalent to MATLAB's residue function (partial fraction expansion)

I am looking for a Mathematica function equivalent to MATLAB's residue function. If there is no Mathematica equivalent, I would like to write a function that given ...
1
vote
2answers
46 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
148 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
39 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
76 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
59 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
112 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
110 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 ...
0
votes
1answer
81 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^...
3
votes
3answers
73 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
46 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 2 3 4 5 10