1
$\begingroup$

I need to find the limit when r2 tends to r1 of the following expression:

(K2 r1^2 + K1 r1 r2 - 
   Sqrt[r1 r2 (K1^2 r1 r2 + K2^2 r1 r2 + K1 K2 (r1^2 + r2^2))]) /
(-K2 r1 r2 - K1 r2^2 + 
   Sqrt[r1 r2 (K1^2 r1 r2 + K2^2 r1 r2 + K1 K2 (r1^2 + r2^2))])

For this reason I want to rationalize the numerator or denominator to see if this helps me find the limit. I am interested in using this procces because when r1 set equal to r2, the expression takes the indeterminate form of zero/zero.

Is there any method to rationalize the expression?

Also I have tried to calculate the limit, but Mathematica reports that the limit is 1. But numerically the result is another one. This different result is shown in the code and in the image. That is, evaluating

(K2 r1^2 + K1 r1 r2 - 
   Sqrt[r1 r2 (K1^2 r1 r2 + K2^2 r1 r2 + K1 K2 (r1^2 + r2^2))]) / 
(-K2 r1 r2 - K1 r2^2 + 
   Sqrt[r1 r2 (K1^2 r1 r2 + K2^2 r1 r2 + K1 K2 (r1^2 + r2^2))]) /. 
{K1 -> 20, K2 -> 30, r1 -> 0.1, r2 -> 0.10001}

gives

Limit when r2 tend to r1 is equal to 1.5. one is not the limit

$\endgroup$
6
  • $\begingroup$ Please post code and not an image of code. $\endgroup$ Commented Nov 8, 2018 at 22:37
  • $\begingroup$ @DanielLichtblau ¡Doned!, I have added the code and above it, the answer showed by Mathematica $\endgroup$
    – JuanMuñoz
    Commented Nov 8, 2018 at 22:41
  • $\begingroup$ You indicate that you want the limit as r1 tends to r2 yet in the "counterexample" that you provide you set r1 -> 0.1, r2 -> 0.10001 which is not consistent with a limit as r1 tends to r2 $\endgroup$
    – Bob Hanlon
    Commented Nov 8, 2018 at 22:43
  • 1
    $\begingroup$ Limit will need assumptions on the parameters in this case. In[51]:= Limit[expr, r1 -> r2, Assumptions -> {K1 > 0, K2 > 0, r2 > 0}] Out[51]= K2/K1 $\endgroup$ Commented Nov 8, 2018 at 22:48
  • $\begingroup$ @BobHanlon If I interchange the limit in the sense that r2 tend to r1, the numerical limit is the same, so in the aswer I could change the code and the image. Or there is a second option that is to change in the title "r1 tend to r2" by "r2 tend to r1". I choice the second one. Making the question already consistent with the counter example. Going a little deeper if you work over the code and interchange the limit by "r1 tend to r2", the answer is 1.5008, this mean that the numerical limit is still the same. $\endgroup$
    – JuanMuñoz
    Commented Nov 8, 2018 at 22:48

3 Answers 3

3
$\begingroup$

Limit will need assumptions on the parameters in this case.

expr = (K2 r1^2 + K1 r1 r2 - 
    Sqrt[r1 r2 (K1^2 r1 r2 + K2^2 r1 r2 + 
        K1 K2 (r1^2 + r2^2))])/(-K2 r1 r2 - K1 r2^2 + 
    Sqrt[r1 r2 (K1^2 r1 r2 + K2^2 r1 r2 + K1 K2 (r1^2 + r2^2))]);

Limit[expr, r1 -> r2, Assumptions -> {K1 > 0, K2 > 0, r2 > 0}]

(* Out[51]= K2/K1 *)

I believe that what goes astray, in presence of parameters, is a failure to correctly assess branch cut related issues. I'm not entirely positive of that however.

$\endgroup$
1
$\begingroup$

The expression evaluates to -1 for r1 == r2 or in the limit. Have you previously assigned values to K1 and/or K2?

expr = (K2 r1^2 + K1 r1 r2 - 
     Sqrt[r1 r2 (K1^2 r1 r2 + K2^2 r1 r2 + K1 K2 (r1^2 + r2^2))])/(-K2 r1 r2 -
      K1 r2^2 + Sqrt[r1 r2 (K1^2 r1 r2 + K2^2 r1 r2 + K1 K2 (r1^2 + r2^2))]);

expr /. r1 -> r2 // Simplify

(* -1 *)

expr /. r2 -> r1 // Simplify

(* -1 *)

Limit[expr, r1 -> r2]

(* -1 *)

Limit[expr, r2 -> r1]

(* -1 *)
$\endgroup$
1
  • $\begingroup$ I have tried the same and the results is the same that you have. But this is not the real answer of the limit, mathematica is showing a wrong answer. To show this I added the result of a numerical limit at the end of my question. $\endgroup$
    – JuanMuñoz
    Commented Nov 8, 2018 at 22:29
0
$\begingroup$

If you replace the Sqrt with Surd (which gives the positive value of the square root), then the formula simplifies:

FullSimplify[(K2 r1^2 + K1 r1 r2 - 
    Surd[r1 r2 (K1^2 r1 r2 + K2^2 r1 r2 + K1 K2 (r1^2 + r2^2)), 
     2])/(-K2 r1 r2 - K1 r2^2 + 
    Surd[r1 r2 (K1^2 r1 r2 + K2^2 r1 r2 + K1 K2 (r1^2 + r2^2)), 2])]

The answer is:

enter image description here

So you can see that the limit as r1->r2 makes the numerator of the fraction zero, leaving only the -1 term.

$\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.