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

learn more… | top users | synonyms (3)

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 : ...
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]) ...
20
votes
3answers
560 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
511 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 ...
36
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
698 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
528 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
307 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
627 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
504 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
449 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
195 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): ...
16
votes
2answers
680 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
164 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
523 views

Does the Im function work with symbolic arguments?

Does the Im function work with symbolic arguments? ...
3
votes
2answers
289 views

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

Can you explain me about the result of Integrate. ...
8
votes
2answers
186 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
590 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
491 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
536 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
153 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
807 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
224 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 ...
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
176 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
407 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
111 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
103 views

Format Preservation of FullSimplify on Indexed System of Autonomous Equations

I currently have a large system of 150 autonomous differential equations. I've indexed a more managable dummy system of identical form, using Part to reference ...
0
votes
1answer
216 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
445 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
304 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
586 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
480 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
268 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
351 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
426 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
221 views

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

I have a rather ugly Mathematica expression (edit: shown below) that I would like to simplify with a time constraint; simplifying without a time constraint or memory constraint does not return as long ...
6
votes
0answers
132 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
349 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 ...
3
votes
1answer
277 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 ...
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
443 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
132 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 ...