# Limit is not actually evaluated, but wolframalpha does [closed]

I'm trying to evaluate the limit $$\lim_{x \to a} f(x)$$ of the function $$f(x)=\dfrac{1}{1+\tfrac{a^2}{4x(a-x)}\sin^2 \left(b\sqrt{a-x} \right)}$$ using mathematica, and it should yield $$\dfrac{1}{1+ab^2/4}$$, as it does using

WolframAlpha. However, throwing the following code into Mathematica

f[x_] := 1/(1 + (1/4*(a^2/(x*(a - x))) (sin^2 [sqrt (x - a)])))
Limit[f[x], x -> a]


leaves me with the unevaluated limit

.

I've read here and there how some limits are causing problems with mathematica, and how one should seperate multiplied variables by a space character, but even though I tried to follow these best practice guidelines, I'm left clueless with my limit. Help, anyone?

• You notation in the question f[x_] := 1/(1 + (1/4*(a^2/(x*(a - x))) (sin^2 [sqrt (x - a)]))) differs from your notation in W|A. May 5 at 10:56
• Mathematica is not free form (it has a well defined syntax) so you would need to make explicit use of the Wolfram|Alpha input option for the expression shown above. May 5 at 15:34

## 2 Answers

f[x_] := 1/(1 + a^2/(4 x (a - x)) Sin[b Sqrt[a - x]]^2)

Limit[f[x], x -> a]


$$\frac{4}{a b^2+4}$$

• @user64494 Adding the Real assumption for {a,b} doesn't change the answer. Are there options that can be used to improve it using automated means?
– Syed
May 5 at 11:12
• All that is not so simple: Limit[1/(1 + a^2/(4 x (a - x)) Sin[b Sqrt[a - x]]^2), x -> a, Direction -> Complexes] is spinning on my comp. May 5 at 11:21

Correcting your syntax and assuming a and b real, one obtains

f[x_] := 1/(1 + (1/4*(a^2/(x*(a - x))) *Sin[b*Sqrt [x - a]]^2))
Limit[f[x], x -> a, Assumptions -> {a,b} > -Infinity]


4/(4 - a b^2)

There are problems with branches if a is assumed complex.

Addition.

g[x_] := 1/(1 + (1/4*(a^2/(x*(x - a)))*Sin[b*Sqrt[x - a]]^2))
Limit[g[x], x -> a, Assumptions -> {a, b} > -Infinity]


4/(4 + a b^2)

• I don't quite get your Assumption syntax; What is > before infinity?
– Syed
May 5 at 10:47
• @Sved:a>-Infinity means a\[Element] Reals. Such a notation is shorter. May 5 at 10:49