0
$\begingroup$

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

1.

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?

$\endgroup$
2
  • 1
    $\begingroup$ 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. $\endgroup$
    – user64494
    May 5 at 10:56
  • 1
    $\begingroup$ 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. $\endgroup$ May 5 at 15:34

2 Answers 2

1
$\begingroup$
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}$$

$\endgroup$
2
  • $\begingroup$ @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? $\endgroup$
    – Syed
    May 5 at 11:12
  • $\begingroup$ 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. $\endgroup$
    – user64494
    May 5 at 11:21
1
$\begingroup$

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)

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

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