# Evaluate an expression at singular points

I have

y[x_] := 1/Sqrt (5 - x - Sqrt[8 - (x + 1)^2])
{x0, x1} = {-1 - Sqrt, -1 + Sqrt};


and I want to calculate

{y'[x0], y', y'[x1]}


but Mathematica cannot evaluate the left and right values, nor can Limit.

What is the proper syntax/method to get the answer {-Infty, 0, Infty}?

• Limit[y'[z], z -> #] & /@ {x0, 1, x1} gives {-\[Infinity],0,(-I) \[Infinity]} – kglr Aug 1 '19 at 22:52
• I get {Indeterminate, 0, Indeterminate} for the above command. I use version 11.2.0.0. – mf67 Aug 1 '19 at 23:06
• mf67, it works in v9. In v12 I also get {Indeterminate, 0, Indeterminate} – kglr Aug 1 '19 at 23:09
• So I might have to wait for next major update to get a v9-result? Using {y'[x0 + 10.^-5], y', y'[x0 - 10.^-5]} to try to "go around" the problem I get {-266.621, 0, -0.707107 + 265.915 I}. Is there some way to have only real values returned? – mf67 Aug 1 '19 at 23:16
• mf67, i posted an answer that works in v12. – kglr Aug 1 '19 at 23:21

You can use Limit with the option Direction:

MapThread[ Limit[y'[z], z -> #, Direction -> #2] &,
{{x0, 1, x1}, {"FromAbove", "TwoSided", "FromBelow"}}]


{-∞, 0, ∞}

Much simpler form (from mf67's comment below):

Limit[y'[z], z -> {x0, 1, x1}, Direction -> {"FromAbove", "TwoSided", "FromBelow"}]


same result

\$VersionNumber


12.

• The older syntax (for people using older versions) goes like MapThread[Limit[y'[z], z -> #, Direction -> #2] &, {{x0, 1, x1}, {-1, 0, 1}}] – J. M.'s technical difficulties Aug 2 '19 at 7:58
• I'm trying to understand the command. I got the same result with Limit[y'[z], z -> {x0, 1, x1}, Direction -> {"FromAbove", "TwoSided", "FromBelow"}]. What are the differences compared to the original MapThreadcommand? – mf67 Aug 2 '19 at 9:46
• @mf67, the difference is my ignorance of the fact that Limit is Listable:) – kglr Aug 2 '19 at 9:49