Questions tagged [simplifying-expressions]

Questions on manipulating complicated expressions and making them look simpler using Simplify, FullSimplify and Reduce.

Filter by
Sorted by
Tagged with
60 votes
4 answers
11k views

Can I simplify an expression into form which uses my own definitions?

This seems like a simple thing to do, but I couldn't find anything relevant from Mathematica documentation. So suppose I have an expression: a*b/(a + a*Cos[a/b]) ...
Echows's user avatar
  • 981
49 votes
2 answers
2k views

Why does Simplify ignore an assumption?

Here is the example: Simplify[x + y, x + y == a] Simplify[x + y, x + y == 5] Mathematica 9 output: x+y 5 I expect the ...
Nick Stranniy's user avatar
32 votes
3 answers
3k views

Common subexpression from two expressions

I am working with some unpleasantly tedious polynomials, which need to be manipulated in various ways (integrate with respect to some variable, differentiate with respect to another). Since these ...
Rex Kerr's user avatar
  • 421
20 votes
4 answers
10k views

Complex number operations: telling Mathematica variables are real

I want to do Conjugate[a + b*I], but when I do that, the solution is Conjugate[a] - I*Conjugate[b]; when for me, a and b are ...
Marco Espinoza's user avatar
87 votes
6 answers
6k views

Advice for Mathematica as Mathematician's Aid

I use Mathematica mainly as an aid in symbolic attacks on problems, usually intermediate or harder and often number theoretic. While Reduce, ...
CarlEdman's user avatar
  • 973
16 votes
2 answers
17k views

How to specify assumptions before evaluation?

If I request mathematica evaluate an integral for me, I'll often get a more general ConditionalExpression than I want. Example : ...
Peeter Joot's user avatar
  • 6,398
10 votes
2 answers
2k views

Simplifying the derivative of $|x|$

Context In[855]:= D[Abs[x], x] /. x -> 1 Out[855]= Derivative[1][Abs][1] In[856]:= D[x, x] /. x -> 1 Out[856]= 1 Question Why is ...
user avatar
22 votes
4 answers
17k views

Factoring polynomials to factors involving complex coefficients

I've run into some problems using Factor on polynomials with complex coefficient factors. Reading the documentation it looks like it only factors over the ...
jcelios's user avatar
  • 413
18 votes
2 answers
2k views

Behavior of Reduce with variables as domain

When using Reduce, I accidentally put a set of variables as the domain. To my surprise, it not only seems that Reduce expects ...
Tyson Williams's user avatar
17 votes
1 answer
1k views

How to prevent reduction of a fraction into lowest terms?

I have a question about the concept of simplification. I want to explain it with an example. When I write the fraction $4/8$ in Mathematica, the output is 1/2. How ...
MATIRMAK's user avatar
  • 739
10 votes
4 answers
721 views

How do I invoke the default complexity function?

Documentation on ComplexityFunction says: With the default setting ComplexityFunction->Automatic, forms are ranked ...
Vladimir Reshetnikov's user avatar
29 votes
1 answer
3k views

A one line proof that one is zero using Mathematica 10

a = (Sqrt[2] + 1) (Sqrt[2] - 1) - 1; {a/a, Simplify[a]/a, b/b == Simplify[b]/b} {1, 0, True} This one line "proof" that ...
Grégoire Nicollier's user avatar
15 votes
3 answers
8k views

Combining cosine or sine terms into a single cosine or sine

A function that is the sum of two cosine terms of the same frequency x[t_] := a1 Cos[w0 t + b1] + a2 Cos[w0 t + b2]; can be simplified to a single ...
bill s's user avatar
  • 68.9k
12 votes
4 answers
13k views

How do I simplify a vector expression?

I am doing vector analysis. I have figured out that the following expression won't be simplified in Mathematica: Simplify[Dot[x, y] - Dot[y, x]] I think the ...
user1285419's user avatar
63 votes
2 answers
15k views

What is the difference between a few simplification techniques?

I am trying to understand the difference between Refine, Simplify and FullSimplify, and when ...
Eli Lansey's user avatar
  • 7,499
31 votes
4 answers
1k views

FullSimplify wrongly reduces expression to zero

Bug introduced in 9.0 and persisting through 12.2 I get the following output with a fresh Mathematica (ver 10.0.2.0 on Mac) session ...
David Zwicker's user avatar
19 votes
3 answers
718 views

Why does Mathematica simplify $x/x\to1$?

If I enter x/x, I get 1. Such behavior leads to this: Simplify[D[Sqrt[x^2], x, x]] 0 ...
Ruslan's user avatar
  • 7,152
11 votes
2 answers
2k views

Why aren't these additions of integrals and summations equal?

I have the following code: Simplify[Integrate[f[x] + g[x], x] == Integrate[f[x], x] + Integrate[g[x], x]] To test: $$\int{\left(f(x) + g(x)\right)dx}=\int{f(x)...
Matt Groff's user avatar
  • 1,141
8 votes
3 answers
2k views

FullSimplify does not work on this expression with no unknowns

I can't reproduce this simple example from Habrat, 2010 ("Mathematica : a Problem-Centered Approach"). It is supposed to demonstrate the functionality of ...
jerome's user avatar
  • 547
12 votes
1 answer
2k views

Apart for complex roots?

Let p[x] be a polynomial in x and consider the partial fraction decomposition of 1/p[x]. ...
Dr. Wolfgang Hintze's user avatar
33 votes
1 answer
2k views

A better simplification function

I am creating this question and posting an answer to it as a help for those who have problems with Mathematica simplification oddities that appear in other questions on the site. First of all, there ...
Giovanni F.'s user avatar
  • 1,911
26 votes
3 answers
6k views

How do I simplify expressions with square roots?

I want $\left\{\frac{1}{1+\sqrt{2}-\sqrt{3}},\sqrt{5-2 \sqrt{6}},\sqrt{4+\sqrt{15}}\right\}$ to be simplified to $\left\{\frac{1}{4} \left(2+\sqrt{2}+\sqrt{6}\right), \sqrt{3}-\sqrt{2}, \frac{1}{2} ...
chyanog's user avatar
  • 15.5k
15 votes
2 answers
13k views

Remove annoying Conjugate

Here is an expression ...
matheorem's user avatar
  • 17.1k
13 votes
3 answers
3k views

Why does Simplify[b-a] give -a+b and not b-a?

Simplify[b - a] results in -a + b. I prefer b - a, which is a bit simpler (3 symbols instead ...
bcp's user avatar
  • 781
5 votes
1 answer
2k views

Simplifying conditional expressions using assumptions does not work

I have a conditional expression f[x_] := x /; x ∈ Reals This works fine for normal numbers and symbols, e.g. ...
Nikki Bisschop's user avatar
4 votes
1 answer
685 views

Simplify equations with pattern assumptions

When simplifying an expression using Simplify[expr, assumptions], the assumptions has to be explicit. Is it possible to simplify an expression with pattern ...
Yi Wang's user avatar
  • 7,347
20 votes
3 answers
1k views

How can I completely ban usage of some functions in output and mandate use of others?

For example, I hate that Mathematica uses Pochhammer symbol in outputs and prefer all the expressions in Gamma function. How can ...
Anixx's user avatar
  • 3,585
8 votes
1 answer
4k views

Trace of FullSimplify

I have a symbolic function and I used FullSimplify command to simplify the equation given below. I am calculating it by hand but I couldn't reach the same solution. ...
HarveyMudd's user avatar
7 votes
3 answers
5k views

Removing Abs from Abs[a + Exp[I*c]b]^2

Title says it all. Mathematica produces sometimes expressions of the form Abs[a + Exp[I*c]b]^2 where all three quantities a, b and c are positive real numbers. ...
user avatar
6 votes
1 answer
662 views

Using Hold correctly with Simplify and ComplexityFunction

It seems like Mathematica immediately evaluates the expression Sqrt@I to (-1)^(1/4). I'm trying to use ...
einbandi's user avatar
  • 4,024
5 votes
2 answers
796 views

Replacements/Substitutions in Mathematica

I am a new user of Mathematica and have some questions about the simplifications of calculated expressions. I am unable to attach an image of the session, but my Mathematica commands are: ...
user1031565's user avatar
5 votes
4 answers
1k views

Fullsimplify does not simplify Abs'[1.-a]

I have to simplyfy an expression involving Abs' This works: FullSimplify[Abs'[1 - a], a ∈ Reals] Sign[1 - a] but this does ...
MelanzanaRipiena's user avatar
4 votes
2 answers
1k views

Replacing gamma at half integers by double factorial

It is well-known that for any positive integer $n$ the equality $\Gamma(n+\frac12)=\sqrt\pi\,(2n-1)!!/2^n$ holds, where $!!$ stands for the double factorial. I am using ...
Matemáticos Chibchas's user avatar
4 votes
1 answer
999 views

What's the correct method to simplify exponentials?

I have a sum of exponentials that I'd like to simplify. The issue is when I use Simplify, Mathematica loves to factor out one exponential factor. See below: $$e^{-i ...
lababidi's user avatar
  • 319
3 votes
2 answers
695 views

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

Can you explain me about the result of Integrate. ...
polynomial's user avatar
30 votes
4 answers
19k views

Simplify expressions with Log

How can I get Mathematica to simplify the following expression n Log[a] + m Log[b] - m Log[a + b] - n Log[a + b] into ...
Blair Azzopardi's user avatar
26 votes
1 answer
1k 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 ...
Matthew Titsworth's user avatar
21 votes
2 answers
2k views

Expressing a polynomial as a sum of squares

I encountered a degree 4 polynomial in 8 variables f(a1,a2,a3,a4,b1,b2,b3,b4) that I suspect can be written as a sum of squares. While sostools in MATLAB would find ...
pizzazz's user avatar
  • 311
17 votes
3 answers
4k views

Extract common factor from vector or matrix

I can't believe this hasn't been asked before but I can't find anything. Is there a way to convince Simplify or FullSimplify to ...
Martin Ender's user avatar
  • 8,774
11 votes
4 answers
7k 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'' ...
stupidity's user avatar
  • 359
7 votes
1 answer
712 views

How to decompose a complex expression containing repeated subexpressions? [duplicate]

Suppose I have an expression like ...
Vladimir Reshetnikov's user avatar
7 votes
1 answer
460 views

Arrange equation in normal form

Is there a way, or if not, how could one define a function which takes an equation in any form (for example as given by FullSimplify): $$(A+X_0) x+By=3x$$ and ...
usumdelphini's user avatar
7 votes
2 answers
2k views

Why doesn't FullSimplify simplify expressions with DiracDelta?

I want to simplify a complicated expression with some Dirac delta distributions, but FullSimplify does not do what I want. Specifically, I want ...
Nikki Bisschop's user avatar
6 votes
1 answer
262 views

Simplify oversimplifies. What to do about it?

According to Mathematica 10: $$\mbox{Simplify}\left[\frac{\frac{1}{t^2}-1}{(t+\frac{1}{t})^2}\right]==\frac{1-t^2}{(1+t^2)^2}$$ However, the first equation does not tolerate $t=0$ because of a ...
GambitSquared's user avatar
4 votes
1 answer
548 views

Simplify not evaluating completely with Square roots

Here's a simple question. It's no longer high priority that I know this, but it's something that can come in handy later on. ...
kozner's user avatar
  • 283
3 votes
1 answer
424 views

Simplify expression to Abs

FullSimplify[Sqrt[1/(a^2 b^2)], Element[{a, b}, Reals]] gives Abs[1/(a b)] How do I simplify the following expression <...
chyanog's user avatar
  • 15.5k
3 votes
1 answer
159 views

Simplifying expressions with head Max

(I saw: Unable to evaluate reasonable max expression but this seems an even easier case an I thought it worth posting) See the following simplifications of Max operators, which are all very ...
jlperla's user avatar
  • 967
2 votes
2 answers
3k views

Simplifying expressions with square roots

I would like Mathematica to simplify this expression: $4 \left(16 \sqrt{\left(-1+2 c^2\right)^2}-32 c^2 \sqrt{\left(-1+2 c^2\right)^2}+\sqrt{\left(1-8 c^2+8 c^4\right)^2}\right)^2$ ...
obiero's user avatar
  • 21
21 votes
2 answers
2k views

Why doesn't FullSimplify drop the Re function from an expression known to be real?

For some reason Mathematica does not properly simplify this expression: ...
Joe's user avatar
  • 1,471
18 votes
1 answer
645 views

What are the default TransformationFunctions used in Simplify and FullSimplify?

If I do Simplify[(c^3 - s^3)^2 - (s^3 + c^3)^2, TransformationFunctions -> Automatic] (i.e. a verbose version of default behaviour), what transformation ...
WalkingRandomly's user avatar

1
2 3 4 5
7