2
$\begingroup$

Let

x=(((-3 + r) r^2 + a^2 (1 + r)) Csc[θ])/(a (-1 + r))

y=Sqrt[(a^2 (a^2 (1 + r)^2 + 2 r^2 (-3 + r^2)) + 
 a^4 (-1 + r)^2 Cos[θ]^2 - ((-3 + r) r^2 + 
    a^2 (1 + r))^2 Csc[θ]^2)/(a^2 (-1 + r)^2)]

where $0<a<1$, $0<\theta\leq \frac{\pi}{2}$

I am looking for a two values of $r$ where (1) both $x$ and $y$ are real and (2) both $x$ and $y$ are real and positive.

If we choose some value for $a$ and $\theta$, is there a way to find the two values of $r$ without solving the $x$ or $y$?

Thanks.

$\endgroup$

closed as off-topic by Feyre, happy fish, MarcoB, march, Öskå Dec 10 '16 at 11:02

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Feyre, happy fish, MarcoB, march, Öskå
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ You try Solve? Or NDSolve? $\endgroup$ – LCarvalho Dec 6 '16 at 8:33
  • $\begingroup$ You can just use FindInstance[]? $\endgroup$ – Feyre Dec 6 '16 at 10:36
  • 3
    $\begingroup$ fi[a_, \[Theta]_] := FindInstance[ x[a, \[Theta]] > 0 && y[a, \[Theta]] > 0 && x[a, \[Theta]] \[Element] Reals && y[a, \[Theta]] \[Element] Reals, r, 2],fi[0.5, 0.5] will just give you two values which satisfy (2), and therefore also (1). $\endgroup$ – Feyre Dec 6 '16 at 10:37
  • $\begingroup$ @Feyre If you specify that sth > 0 it automatically is also Real; \[Element] Reals is unnecesary. $\endgroup$ – corey979 Dec 6 '16 at 12:42
2
$\begingroup$

The following, based on Freye's comment, will allow you to explore the solution space.

finder[a_, θ_] :=
  Block[{x, y, r},
    x[aa_, theta_] := ((-3 + r) r^2 + aa^2 (1 + r)) Csc[theta]/(aa (-1 + r));
    y[aa_, theta_] := 
      Sqrt[
        (aa^2 (aa^2 (1 + r)^2 + 2 r^2 (-3 + r^2)) + 
           aa^4 (-1 + r)^2 Cos[theta]^2 - 
           ((-3 + r) r^2 + aa^2 (1 + r))^2 Csc[theta]^2) /
        (aa^2 (-1 + r)^2)];
    Module[{sols},
      sols = FindInstance[x[a, θ] > 0 && y[a, θ] > 0, r, 2];
      {r, x[a, θ], y[a, θ]} /. sols]]

Manipulate[
  Column[
    Row[{"r = ", #[[1]], "; x = ", #[[2]], "; y = ", #[[3]]}] & /@ finder[a, θ]],
  {{a, .5}, .01, 1., Appearance -> "Labeled"},
  {{θ, .5}, .01, π/2., Appearance -> "Labeled"}]

demo

$\endgroup$

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