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

learn more… | top users | synonyms (3)

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 ...
34
votes
2answers
833 views

Is it possible to make Mathematica reformulate an expression in a more numerically stable way?

I'm writing a numerical optimization, and I'm having a problem with an expression of the form $$ e^{-t} (1+\mathrm{erf}(t)) $$ The overall shape of the function looks correct, but when $t$ is small, ...
26
votes
2answers
530 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 ...
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]) ...
22
votes
3answers
597 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 ...
21
votes
0answers
2k views

Simplify matrix algebra

I'm trying to simplify some matrix linear algebra, for example, simplify $$\big(a1\times(A1\cdot A2)\big)\cdot\Big(a2\times A3\cdot A4+(a3\times A5)\cdot(a4\times A6)\Big)^{T}$$ where lower case ...
20
votes
4answers
783 views

An apparently “simple” limit?

Let $c$ and $h$ be real values. I was using Mathematica to compute the limit $(h \rightarrow \infty)$ of the following expression: $$ \frac{\left(h^2 +c^2 h^2 + \sqrt{4 h^2+\left(h^2+c^2 ...
20
votes
1answer
307 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 ...
17
votes
3answers
535 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 ...
16
votes
2answers
695 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: ...
15
votes
1answer
168 views

How to instruct FullSimplify to assume that PossibleZeroQ returns correct result?

Sometimes I have a really huge expression that cannot be significantly simplified by FullSimplify. I would like to, so to speak, "simplify with faith" using ...
13
votes
3answers
212 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 ...
12
votes
1answer
674 views

Simplify Sin[x]/x to Sinc[x]

I have an expression in the form of $\tt \frac{Sin[x]}{x}$ that I would like to simplify to the form of Sinc[x]. I've tried the ...
12
votes
2answers
503 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: ...
12
votes
4answers
421 views

FullSimplify Over Reals Automatically

Frequently, Mathematica will produce some expression in a complicated form, with a number of unset variables. For me, it is rare that I would be interested in solutions that are generalized to both ...
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 ...
12
votes
1answer
271 views

How to enlarge $\it{Mathematica}$'s knowledge about certain functions?

I'm often troubled with the following task. I need to carry out symbolical computations involving certain special functions. Let me take as an example Barnes gamma-function. It is included in ...
12
votes
4answers
1k views
12
votes
2answers
602 views

Simplify assumes Boolean 1 and 0 in logical expressions

Per this chat discussion and this previous question where I encountered the strange behaviour: ...
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 : ...
11
votes
1answer
173 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 ...
11
votes
1answer
574 views

How to get FullSimplify to fully simplify my expression with custom complexity function?

To simplify based on the visual complexity of an expression (i.e. the complexity of the function as displayed in the notebook instead of the internal form, which in some cases may be substantially ...
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} ...
10
votes
1answer
550 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 ...
10
votes
3answers
3k views

Strategies for simplifying complicated expressions

I have a very complicated expression involving trigonometric functions, complex numbers etc. You may find it here as it is too long to be pasted here. You may also find a screenshot of it here. ...
10
votes
1answer
197 views

Cancellation of common terms

Can someone explain why the term A in case 2 does not get canceled out when case 1 does? I use "9.0 for Microsoft Windows (64-bit) (January 25, 2013)" ...
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 ...
9
votes
2answers
453 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, ...
9
votes
1answer
284 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. ...
9
votes
2answers
492 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
3answers
278 views

Simplifying trig expressions containing Sqrt or Abs

The following Maple code can simplify abs(sin(x)) into -sin(x) given the condition ...
9
votes
0answers
190 views

Simplify and Sqrt, inconsistent behavior?

I have encountered some problems when using Simplify with expressions containing a square root and isolated a following test case ...
8
votes
2answers
565 views

How can I get Mathematica to simplify $\Vert\{1,\sin(t),\cos(t)\}\Vert_2$ to $\sqrt{2}$?

Context Norm[{1, Sin[t], Cos[t]}] Norm[{1, Sin[t], Cos[t]}] // Simplify (* Sqrt[1 + Abs[Cos[t]]^2 + Abs[Sin[t]]^2] Sqrt[1 + Abs[Cos[t]]^2 + Abs[Sin[t]]^2] *) ...
8
votes
2answers
322 views

How can I get $(r^{1/x})^x$ to simplify to $r$?

Simplify and FullSimplify do not simplify this kind of expression: $(r^\frac{1}{x})^x$. Consider ...
8
votes
3answers
2k 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 ...
8
votes
2answers
520 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) + ...
8
votes
2answers
189 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. ...
8
votes
2answers
165 views

How to reduce the number of operations needed to evaluate an expression? [duplicate]

For some numerical calculations in C++ I have, for example, this complicated expression to evaluate. Given as Mathematica input, in its original form it is ...
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 ...
8
votes
1answer
446 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: ...
8
votes
1answer
383 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 ...
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'' ...
7
votes
5answers
544 views

How to cancel a common term from numerator and denominator?

What mathematica commands are needed to simplify $\frac{x+n x^m}{x(1+x)}$ to $\frac{1+n x^{m-1}}{(1+x)}$ ? ...
7
votes
3answers
459 views

Sum over binary digits of integer

This might seem like a simple enough question but Mathematica seems to simplify inadequately here: How would you sum over the digits of an arbitrary binary number? I already tried this: ...
7
votes
4answers
318 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 ...
7
votes
4answers
280 views

How to make Mathematica simplify $\cos[(i + j + k)\pi]$ to $(-1)^{i+j+k}$?

We know that: $$ \cos\left[(i+j+k)\pi\right] = (-1)^{i+j+k} $$ for $i, j, k$ being positive integers. In Mathematica I've tried: ...
7
votes
2answers
2k views

Fourier Transform of a Step Function

I'm trying to obtain the form of a sinc function that I know I'm supposed to get in Mathematica. I'm doing this because I intend to do a lot with Fourier transforms (FT) and I'd like to know I'm not ...
7
votes
2answers
551 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 ...
7
votes
3answers
212 views

Why does Mathematica not seem to know that $i^x$ cannot be equal to $0$?

I am experiencing a curious behaviour of Simplify when handling expressions involving powers of $\mathbf{i}$, such as $\mathbf{i}^x$ where $x$ is unknown. For ...
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 ...