1
$\begingroup$

Here I have the code that takes the limit of an expression

Limit[(-I E^(I x) f1[y])/(g2^\[Prime]\[Prime])[y], x -> \[Infinity] ]

and the returned output is INDETERMINATE whereas the desired output is $ \infty$. Or if I were to do this instead

Limit[(g2^\[Prime]\[Prime])[y]/(-I E^(I x) f1[y]), x -> \[Infinity] ]

I would want to get 0 and not INDETERMINATE.

How would I let Mathematica know that the $f$ and $g$ functions are irrelevant when evaluating the limit?

Thank you for any help.

$\endgroup$
3
  • $\begingroup$ For what example of $f$ and $g$ is the limit not Indeterminate (that is, for which does the limit even exist)? I suppose $f(y) \equiv 0$ is one example for the first limit, but I’d like to know if there is a nontrivial example. I think Mathematica is right, or I misread something. $\endgroup$
    – Michael E2
    Commented Apr 2, 2020 at 3:26
  • $\begingroup$ Thanks for the question. The $f$ and $g$ functions here are arbitrary functions but they are finite. In my code they are not defined. I am building a code that will sort through a differential equation and apply a rule to its terms. I need to evaluate this limit and get either 0 or $ \infty$ to move forward in my code. If this isn't possible then its abandon this idea and try another. $\endgroup$ Commented Apr 2, 2020 at 3:37
  • $\begingroup$ For what it's worth, the internal code pulls out (symbolic) constant factors. $\endgroup$ Commented Apr 2, 2020 at 14:39

1 Answer 1

2
$\begingroup$

The f and g functions here are arbitrary functions but they are finite

Even if they are finite, you will get Indeterminate in the general case. Assuming all is real, then

ClearAll[g, f, y, expr,a,b];
expr[0] = g''[y]/(-I E^(I x) f[y]);
expr[0] = ComplexExpand[expr[0]]

$$ \frac{\sin (x) g''(y)}{f(y)}+\frac{i \cos (x) g''(y)}{f(y)} $$

expr[1] = (I Cos[x] g''[y])/f[y];
expr[2] = expr[1] /. {f[y] -> a, g''[y] -> b}

$$ \frac{i b \cos (x)}{a} $$ And the above has no limit as x goes to infinity in the general case

Limit[expr[2], x -> Infinity, Assumptions -> {a != 0, b != 0}]

(*Indeterminate*)

The same for the second term in your expression.

In only special cases, as Michael points out, you can get 0. But not in general. For example

  Limit[expr[2], {x -> Infinity, b -> 0}, Assumptions -> {a != 0}]
  (*  0 *)

So if you want something that works for all possible values, it will not really be possible to get only 0 or infinity I would think.

$\endgroup$
1
  • $\begingroup$ My apologies, I got to bogged down in making my program I had forgotten that I was working with complex exponentials and not normal exponentials. Your answer is clear why I am getting indeterminate. $\endgroup$ Commented Apr 2, 2020 at 13:58

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