I would like to do, in every calculation that I perform, the following substitution:

$e^x -> (1+x)$.

That is, every term with an exponential should become the Taylor series to the first-order evaluated at zero ($e^{f(x)} = 1+f`(0) x$). Surely my attempt was to try:

$e^x = (1+x)$

however it returns me that it is Protected.

I must address that I make several calculations and this term may appear in several different contexts. As examples:

$e^{2(x+y)}$ and this should return $(1+2x)e^{2y}$;


$e^{-x}-1$ which should become $-x$.

Is it possible to generalize this to any function following a structure, like: every exponential following a $\delta$ will be simplified, but the ones without it will not. As an example:

$e^{2(x+\delta x) + y-3\delta c} = (1+2\delta x) (1-3\delta c) e^{2x+y}$.

  • 1
    $\begingroup$ Exp[expr] /. {Exp[x_] :> 1 + x} will not do what you want but Exp[expr] /. {Exp[ xpr_] :> (1 + D[xpr, x] x)*(Exp[xpr /. {x :> 0}])} comes closer. $\endgroup$ – Alan Sep 23 '19 at 21:17
  • $\begingroup$ Generally substitutions work better if they involve a variable rather than an expression. Try the inverse of your expression, x->Log[1+x]. You will probably still need to make some simplifications afterword. $\endgroup$ – Bill Watts Sep 23 '19 at 22:21
  • $\begingroup$ You can introduce an additional parameter in the exponents and perform a series expansion with respect to it: $e^xe^{2(x+y)}\rightarrow e^{\alpha x}e^{2\alpha x+2y}$ $\endgroup$ – yarchik Sep 24 '19 at 7:23

One way to do it.

erule[a_] = {a -> Log[1 + a]}

expr = Exp[-x] - 1

Series[expr /. erule[x], {x, 0, 1}] // Normal

expr = Exp[2 (x + y)]

Series[expr /. erule[x], {x, 0, 1}] // Normal // Simplify
(*(2 x + 1) E^(2 y)*)

expr = E^(2 (x + δx) + y - 3 δc)

Series[expr /. erule[δx] /. erule[δc], {δx, 0, 1}, {δc, 0, 1}] // Normal // Simplify
(*(3 δc - 1) (2 δx + 1) (-E^(2 x + y))*)

While this method is not automated, it does work, at least for these examples.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.