2
$\begingroup$

There is a equation set:

{2 x^2 + 49 - 7 x - 2 x Sqrt[x^2 + 49 - 7 x] Cos[rad] == (7 - x)^2, 
 2 x^2 + 49 - 7 x - 2 x Sqrt[x^2 + 49 - 7 x] Cos[rad + Pi/3] == 49}

I want get the x-value's exact solution.But the Solve cann't work.

$\endgroup$
1
  • $\begingroup$ Play around with Reduce, maybe? $\endgroup$
    – march
    Commented Feb 6, 2016 at 20:34

1 Answer 1

7
$\begingroup$

Reduce gives a solution. Here I've eliminated the trivial $x=0$ solution and also specified $-\pi \le rad \le \pi$.

sol = Reduce[And[
   2 x^2 + 49 - 7 x - 2 x Sqrt[x^2 + 49 - 7 x] Cos[rad] == (7 - x)^2, 
   2 x^2 + 49 - 7 x - 2 x Sqrt[x^2 + 49 - 7 x] Cos[rad + Pi/3] == 49,
   x != 0, -Pi <= rad <= Pi], x, Reals]

enter image description here

Since each term is a condition on rad followed by an equality for x we can extract a piecewise function for x:

xsol = Piecewise[{#2[[2]], #1} & @@@ List @@ sol]

enter image description here

which looks like this:

Plot[xsol, {rad, -Pi/3, 2 Pi/3}]

enter image description here

To check, here's a contour plot of both equations. The purple bits are where both are true:

ContourPlot[{
  2 x^2 + 49 - 7 x - 2 x Sqrt[x^2 + 49 - 7 x] Cos[rad] == (7 - x)^2,
  2 x^2 + 49 - 7 x - 2 x Sqrt[x^2 + 49 - 7 x] Cos[rad + Pi/3] == 49},
 {rad, -Pi, Pi}, {x, -20, 20},
 ContourStyle -> {Opacity[0.5, Red], Opacity[0.5, Blue]},
 AspectRatio -> 0.5]

enter image description here

Update

I've just noticed that you can remove the Reals domain from Reduce and get a solution in terms of Tan functions which you can FullSimplify to get for x:

-7 + 42 Cos[rad]/(3 Cos[rad] + Sqrt[3] Sin[rad])
$\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.