Difference between revisions of "FullSimplify"

From TORI
Jump to: navigation, search
 
m (Text replacement - "\$([^\$]+)\$" to "\\(\1\\)")
 
Line 3: Line 3:
 
The call may look as follows:
 
The call may look as follows:
   
FullSimplify[$espression$]
+
FullSimplify[\(espression\)]
   
or FullSimplify[$espression$, {$hint1$, $hint2$,..}]
+
or FullSimplify[\(espression\), {\(hint1\), \(hint2\),..}]
   
 
where "hints" are logical expressions that may be useful at the simplification.
 
where "hints" are logical expressions that may be useful at the simplification.
Line 30: Line 30:
   
 
The last evaluation does
 
The last evaluation does
  +
\(
$
 
 
\left(-1+\mathrm{e}^{-2 s-2 i q}\right)
 
\left(-1+\mathrm{e}^{-2 s-2 i q}\right)
 
\left(-1+\mathrm{e}^{-2 s+2 i q}\right)
 
\left(-1+\mathrm{e}^{-2 s+2 i q}\right)
 
\left(-1+(q-i s)^2\right)
 
\left(-1+(q-i s)^2\right)
 
\left(-1+(q+i s)^2\right)
 
\left(-1+(q+i s)^2\right)
  +
\)
$
 
   
 
instead of expected
 
instead of expected
$2 \mathrm{e}^{-2 s} \left(q^4+2 q^2
+
\(2 \mathrm{e}^{-2 s} \left(q^4+2 q^2
 
\left(s^2-1\right)+\left(s^2+1\right)^2\right) (\cosh (2 s)-\cos (2 q))
 
\left(s^2-1\right)+\left(s^2+1\right)^2\right) (\cosh (2 s)-\cos (2 q))
  +
\)
$
 
   
 
Then, expression <poem><nomathjax><nowiki>
 
Then, expression <poem><nomathjax><nowiki>
Line 47: Line 47:
   
 
does
 
does
$\Im\left(\left(-1+e^{-2 s-2 i q}\right)
+
\(\Im\left(\left(-1+e^{-2 s-2 i q}\right)
 
\left(-1+e^{-2 s+2 i q}\right)
 
\left(-1+e^{-2 s+2 i q}\right)
 
\left(-1+(q-i s)^2\right) \left(-1+(q+i
 
\left(-1+(q-i s)^2\right) \left(-1+(q+i
 
s)^2\right)\right)
 
s)^2\right)\right)
  +
\)
$
 
   
 
instead of expected 0.
 
instead of expected 0.

Latest revision as of 18:43, 30 July 2019

FullSimplify is routine of the Mathmatica language. It is used to simplify expressions

The call may look as follows:

FullSimplify[\(espression\)]

or FullSimplify[\(espression\), {\(hint1\), \(hint2\),..}]

where "hints" are logical expressions that may be useful at the simplification.

Simplify

Syntax of routine FullSimplify is similar to that of routine Simplify

However, the FullSimplify does a little bit deeper search for possible simplifications of the expression, than just Simplify.

Bug

Routine FullSimplify does not seem to handle well expressions with imaginary unity , I=\Sqrt[-1] .

Here is he example Let


b = (-1 + Exp[(-2*I)*q - 2*s])*(-1 + Exp[(2*I)*q - 2*s])

c = (-1 + (q - I*s)^2)*(-1 + (q + I*s)^2)

a = b*c

U = FullSimplify[a]

The last evaluation does \( \left(-1+\mathrm{e}^{-2 s-2 i q}\right) \left(-1+\mathrm{e}^{-2 s+2 i q}\right) \left(-1+(q-i s)^2\right) \left(-1+(q+i s)^2\right) \)

instead of expected \(2 \mathrm{e}^{-2 s} \left(q^4+2 q^2 \left(s^2-1\right)+\left(s^2+1\right)^2\right) (\cosh (2 s)-\cos (2 q)) \)

Then, expression


FullSimplify[Im[U], {q>0, s>0}]

does \(\Im\left(\left(-1+e^{-2 s-2 i q}\right) \left(-1+e^{-2 s+2 i q}\right) \left(-1+(q-i s)^2\right) \left(-1+(q+i s)^2\right)\right) \)

instead of expected 0.

This can be verified with code


FullSimplify[b] FullSimplify[c]

References


https://reference.wolfram.com/language/ref/FullSimplify.html FullSimplify[expr] tries a wide range of transformations on expr involving elementary and special functions and returns the simplest form it finds.
FullSimplify[expr,assum] does simplification using assumptions.

Keywords

Bug, Mathematica, Mathematics Wolfram research,,