0
$\begingroup$

Here is the error I found.

r = 3;
Solve[Sqrt[(r^2 Cos[m Pi] - x)^2 + (r^2 Sin[m Pi])^2] == 10 && x > 0 &&
   0 <= m <= 2, x, Reals]

{{x -> ConditionalExpression[ 9 Cos[m \[Pi]] + Sqrt[100 - 81 Sin[m \[Pi]]^2], 0 <= m < 1/2 || 1/2 < m < 3/2 || 3/2 < m <= 2]}}

Mathematica says $m \neq \frac {1} {2}$ and $m \neq \frac {3} {2}$

But I beleieve it can be equal to these 2 numbers.

  1. When $ r=3,m= \frac {1} {2} $,

$ x = \sqrt {19} $

  1. When $ r=3,m= \frac {3} {2} $,

$ x = \sqrt {19} $

$\endgroup$
2
  • $\begingroup$ If you had used the Weierstrass substitution, you might have less problems. $\endgroup$ Aug 14 '20 at 22:55
  • $\begingroup$ @J.M. How can I use Weierstrass substitution? Any tips? $\endgroup$
    – kile
    Aug 15 '20 at 0:36
1
$\begingroup$

To use the Weierstrass substitution, we temporarily let $m\pi=2\arctan u$, which corresponds to restricting $m$ to $-1<m\leq 1$. Thus,

With[{r = 3},
     Simplify[Solve[Sqrt[TrigExpand[(r^2 Cos[2 ArcTan[u]] - x)^2 +
                                    (r^2 Sin[2 ArcTan[u]])^2]] == 10 &&
                    x > 0, x, Reals] /. u -> Tan[m π/2]]]
   {{x -> 1/2 (18 Cos[m π] + Sqrt[238 + 162 Cos[2 m π]])}}

which is equivalent to what Bob got in his answer:

9 Cos[m π] + Sqrt[100 - 81 Sin[m π]^2] == x /. First[%] // Simplify
   True
$\endgroup$
3
$\begingroup$

When you experience a problem with a function check out its options.

Clear["Global`*"]

r = 3;

sys = Sqrt[(r^2 Cos[m Pi] - x)^2 + (r^2 Sin[m Pi])^2] == 10 && x > 0 && 
   0 <= m <= 2;

Solve[sys, x, Reals]

enter image description here

Using the option MaxExtraConditions

Solve[sys, x, Reals, MaxExtraConditions -> All]

enter image description here

Or use Reduce

Reduce[sys, x, Reals]

enter image description here

$\endgroup$
3
  • $\begingroup$ Why not {{x -> ConditionalExpression[ 9 Cos[m \[Pi]] + Sqrt[100 - 81 Sin[m \[Pi]]^2]}} instead? $\endgroup$
    – kile
    Aug 14 '20 at 14:07
  • $\begingroup$ -What is sol? Can you specify it? I can't find sol in your answer. $\endgroup$
    – kile
    Aug 14 '20 at 14:57
  • $\begingroup$ @kile - The result is given in the form that the internal algorithms came up with. Presumably for reasons of efficiency, it did not try to find a simpler representation. The simpler form would be {x -> ConditionalExpression[9*Cos[m*Pi] + Sqrt[100 - 81*Sin[m*Pi]^2], 0 <= m <= 2]} $\endgroup$
    – Bob Hanlon
    Aug 14 '20 at 15:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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