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

learn more… | top users | synonyms (3)

25
votes
4answers
1k 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]) ...
11
votes
2answers
4k 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 : ...
22
votes
3answers
579 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 ...
26
votes
2answers
519 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 ...
37
votes
2answers
2k views

What is the difference between a few simplification techniques?

I am trying to understand the difference between Refine, Simplify and FullSimplify, and when ...
8
votes
4answers
5k 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 ...
9
votes
3answers
1k 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 ...
1
vote
2answers
730 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$ ...
17
votes
3answers
534 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 ...
10
votes
4answers
2k 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} ...
7
votes
4answers
313 views

Counting multiplications (complexity function)

I'm trying to count the number of times multiplication appears in an expression (for the purpose of constructing a ComplexityFunction that would help me simplify a terrible algebraic expression for ...
4
votes
1answer
634 views

Reduce an equation by putting a new variable

I have the following equation given: $$ (26-x)\cdot\sqrt{5x-1} -(13x+14)\cdot\sqrt{5-2x} + 12\sqrt{(5x-1)\cdot(5-2x) }= 18x+32. $$ In order to solve it, I want to substitute $t = \sqrt{5x - ...
8
votes
2answers
506 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) + ...
7
votes
3answers
457 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 ...
3
votes
1answer
200 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 ...
4
votes
2answers
149 views

HornerForm of polynomials in terms of E^(i x)

I want to know how to get the HornerForm of the following expression in terms of E^(I x): ...
3
votes
2answers
293 views

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

Can you explain me about the result of Integrate. ...
16
votes
2answers
682 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: ...
2
votes
1answer
165 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 ...
8
votes
3answers
1k 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 ...
7
votes
2answers
2k 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 ...
4
votes
1answer
530 views

Does the Im function work with symbolic arguments?

Does the Im function work with symbolic arguments? ...
8
votes
2answers
187 views

How to simplify an expression with special functions to zero

The following is a well-known Bessel function identity: $$J_{-n}(z)=(-1)^n J_n(z),\qquad n\in\mathbb Z$$ To check this, I used the following code and the result is as what I expected. ...
3
votes
2answers
596 views

Eliminate doesn't work in Mathematica

Hello Mathematica users, I have problems trying to eliminate variable $Q(x,y)$ froma PDE, but Mathematica output is just True. The problem is that I already found ...
12
votes
2answers
498 views

Surprises simplifying simple polynomials

I came across some somewhat surprising behavior of Simplify today, on something very simple. Let's take two cubic polynomials that we know have the same value: ...
10
votes
1answer
543 views

Is my expression too complicated for FullSimplify or am I doing something wrong?

I have a messily defined function $v(h, w)$ with $h, w \in \mathbb{R}$ and with a removable singularity at $h=1/2$, and I am trying to prove some of its properties using Mathematica. In particular I ...
5
votes
3answers
156 views

Converting expressions to “edges” for use in TreePlot, Graph

This question is similar to this: Nested list to graph. How to "flatten" an arbitrary expression, eg expr = a[b[c, d[e][f], g], h] to a list of key-value pairs ...
5
votes
2answers
821 views

Log of products to sum of logs

I have a log of products: $$\log \left(\prod _{i=1}^n \left( g(a(i,i)) \prod _{k=1}^i f(a(i,k))\right)\right)$$ That I turn into a sum of logs (I know everything involved is nice enough): $$\sum ...
3
votes
2answers
232 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 ...
3
votes
1answer
289 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 ...
4
votes
1answer
171 views

Can't simplify Abs[a*Cos[x]]^2

Why doesn't FullSimplify[ Abs[a*Cos[x]]^2, Assumptions -> {{a, x} ∈ Reals}] simplify to (a*Cos[x])^2 but this query ...
2
votes
2answers
188 views

Rewriting one expression using a variable representing another expression [duplicate]

I have two expressions: w1 = (a+b)/c^2; w2 = (a^3 + 3 a^2 b + 3 a b^2 + b^3)/c^6; How can I ask Mathematica to try to find an alternative expression for ...
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'' ...
3
votes
3answers
410 views

How to simplify the following trigonometry expression such that the number of used characters is minimal?

How to simplify the following trigonometry expression such that the number of used characters is minimal? (13*Cos[t] - 5*Cos[2*t] - 2*Cos[3*t] - Cos[4*t])/4 The ...
2
votes
1answer
115 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 ...
1
vote
1answer
114 views

Format Preservation of FullSimplify on Indexed System of Autonomous Equations

I currently have a large system autonomous differential equations. I've indexed a more managable dummy system of identical form, using Part to reference each ...
0
votes
1answer
217 views

Simplify vector expression - is there something like “Factor” for vectors, dot products etc.?

I am looking for a way to simplify dot products etc. Here is a minimal example: Lets say I have two vectors a and b: Array[a,2] Array[b,2] Now I evaluate their ...
-1
votes
2answers
448 views

How to simplify expressions containing derivatives

Is there a way to reverse the application of derivative rules in order to simplify expressions including derivatives? e.g. in Mathematica code: Want to go from ...
20
votes
1answer
306 views

How can I see which transformations Simplify attempts?

The documentation for Simplify[expr] says that it performs a sequence of algebraic and other transformations on expr, and returns the simplest form it finds. How can I see which transformations it ...
12
votes
2answers
594 views

Simplify assumes Boolean 1 and 0 in logical expressions

Per this chat discussion and this previous question where I encountered the strange behaviour: ...
9
votes
2answers
486 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 ...
9
votes
1answer
274 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. ...
8
votes
1answer
369 views

how to simplify large expression with lots of special functions in it (BesselY, Hypergeometric, MeijerG etc…)

I saw this DE in Maple forum. When solving it using Mathematica 9.01, even though the result was correct (both solutions gave the same numerical answer for some random values), Mathematica's answer ...
8
votes
1answer
436 views

Why doesn't FullSimplify get rid of the common factor in this expression?

FullSimplify does not get rid of the z factor in the following expression: ...
7
votes
1answer
252 views

Why does Simplify with TimeConstraint return Removed[$$Failure]?

Bug existed in version 7 and is fixed in version 10.0.0 I have a rather ugly Mathematica expression (edit: shown below) that I would like to simplify with a time constraint; simplifying without a ...
6
votes
0answers
133 views

Using FunctionExpand to evaluate symbolic derivatives

Some symbolic derivatives of certain special function are not expanded automatically, but FunctionExpand often helps to get a derivative-free closed form ...
6
votes
4answers
353 views

Attaching persistent assumptions to symbol definition

Is it possible to attach assumptions to a symbol? This relates to this question. Most of my work involves physical equations, i.e. there are basic assumptions on variables that will always hold true ...
12
votes
1answer
173 views

Unable to evaluate reasonable max expression

Consider the following statement: Max[0, Sqrt[1 - Cos[4 \[Theta]]]] You'll find that Mathematica won't evaluate this, because it doesn't know the range of ...
9
votes
2answers
449 views

Shaping/simplifying equations in a certain way

A problem I am occasionally facing is to simplify an equation not to it's shortest form but to a form that is simple by other means. Often, this is grouping the term according to certain functions, ...
7
votes
2answers
141 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 ...