1
$\begingroup$

To simplify a huge expression efficiently, which involves a variable in a bunch of exponential functions going to infinity, I have tried to substitute

/.Exp[-x_]->0 

where my intention was to set to zero any exponential function featuring a minus sign in front of an arbitrary function. Unfortunately this substitution had no effect.

How can I do what I intend? Please note, Simplify and FullSimplify functions involving any ComplexityFunction are not an option, since they take forever to evaluate.

EDIT

On a similar note, I noticed that oftentimes expressions of the same power appear as multipliers in numerator and denominator, like in the following example

$$\frac{a f_{1}+af_2}{(a f_3+af_4)f_5}$$

still the $a$ does not cancel out automatically. Is there a command to explicitly look for such cancellations and carry them out without attempting any other simplifications? I tried PowerExpand, Expand and ExpandAll. None of them work like this.

$\endgroup$
6
  • 2
    $\begingroup$ Can you provide small snippet of your expression in which your substitution doesn't work? Because it works fine for me here. $\endgroup$ Commented Apr 24, 2013 at 22:45
  • $\begingroup$ Do you have complex exponents? Because Mathematica distinguish between real and complex -1. So maybe you need to change your pattern to Exp[(-I | -1) x_] $\endgroup$ Commented Apr 24, 2013 at 22:52
  • $\begingroup$ Exp[- a ] /. Exp[- x_] :> 0 gives 0 but Exp[-4 a ] /. Exp[- x_] :> 0 gives Exp[-4 a ] and Exp[-4 a ] /. Exp[(-I | -1) x_] :> 0 gives Exp[-4 a ] $\endgroup$ Commented Apr 24, 2013 at 22:56
  • 1
    $\begingroup$ On your second matter, this will do the trick: /. x_/y_ :> Collect[x, a]/Collect[y, a] $\endgroup$ Commented Apr 24, 2013 at 22:56
  • 3
    $\begingroup$ Try this /. Exp[n_?Negative x_] :> 0 $\endgroup$ Commented Apr 24, 2013 at 23:00

2 Answers 2

3
$\begingroup$

Since this has been bumped by Community, I'll post this in the hopes that either @swish will also post it and take credit, or at least @Kagaratsch will accept this so it won't be left unanswered:

Try this /. Exp[n_?Negative x_] :> 0 – swish Apr 24 at 23:00

$\endgroup$
2
$\begingroup$

This should work Exp[x_] /; x < 0 :> 0

Sticking a negative in front of a pattern variable will not accomplish what you want.

$\endgroup$
2
  • $\begingroup$ OP said that there is variable inside exponent, Mathematica generally can't say whether it's positive or not. $\endgroup$ Commented Apr 24, 2013 at 22:43
  • $\begingroup$ Exactly, swish. Evaluating Exp[-a] /. Exp[x_] /; x < 0 :> 0 gives E^-a $\endgroup$ Commented Apr 24, 2013 at 22:44

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.