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$
  • $\begingroup$ Play around with Reduce, maybe? $\endgroup$ – march Feb 6 '16 at 20:34
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, privacy policy and cookie policy

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