1
$\begingroup$

Question

Consider the following two lines of code, which differ only by replacing 1 by y:

SeriesCoefficient[
  (Exp[x + 1 + a] - 1)/(x + 1 + a), {a, 0, 0}, Assumptions -> x + 1 == 0]

SeriesCoefficient[
  (Exp[x + y + a] - 1)/(x + y + a), {a, 0, 0}, Assumptions -> x + y == 0]

The first version yields 1, which is the correct answer (just the limit of the function as "a" goes to zero). The second version yields:

(-1 + Exp[x + y])/(x + y)

which will cause problems for me later because x + y == 0.

Assuming x and y are real does not change the result.

Background

I want to take the limit of a large number of continuous functions of several variables:

Limit[
  Limit[Limit[Limit[f[y1, y2, y3, y4], y1 -> x1], y2 -> x2], y3 -> x3],
  y4 -> x4]

where each function f is similar to the one used above (ie it naively seems to have singularities but is actually continuous). I obtain much faster results using SeriesCoefficient:

SeriesCoefficient[f[y1 + a, y2 + a, y3 + a, y4 + a], {a, 0, 0}]

I want to be able to evaluate this with assumptions. For example:

SeriesCoefficient[
  f[x1 + a, x2 + a, x3 + a, x4 + a], {a, 0, 0}, 
  Assumptions -> x1 + x2 + x3 + x4 == 0]

but the assumptions are ignored.

$\endgroup$

2 Answers 2

1
$\begingroup$

This is not an answer to the question that was asked but it is too long for a comment.

My impression is that the question as stated is not reflecting the underlying desired result-- maybe I'm wrong but here goes. Is the idea to get the expansion, to low order, of (Exp[x + y] - 1)/(x + y) with both variables at the origin? If so there are (at least) two standard ways to go about this.

(1) Iterate Series over variables.

Series[Series[ee, {x, 0, 1}], {y, 0, 1}]

(* Out[168]= SeriesData[x, 0, {SeriesData[y, 0, {1, Rational[1, 2]}, 0, 2, 1], SeriesData[y, 0, {Rational[1, 2], Rational[1, 3]}, 0, 2, 1]}, 0, 2, 1] *)

(2) Make a new function of a new variable, effectively a "shrink factor" for the original variables, and expand at the origin.

Series[ee /. Thread[{x, y} -> t*{x, y}], {t, 0, 1}]

(* Out[169]= SeriesData[t, 0, {1, Rational[1, 2] (x + y)}, 0, 2, 1] *)

On a related note, there is support for multivariate limits over the reals in the works.

$\endgroup$
0
$\begingroup$

I don't know how useful this is for you, but one idea is to replace the problematic denominator part with a Piecewise:

SeriesCoefficient[
    (Exp[x+y+a] - 1)/(Piecewise[{{x+y, x+y != 0}}, 0] + a),
    {a, 0, 0},
    Assumptions -> x+y == 0
]

Simplify[%, x+y == 0]

E^(x + y)

1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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