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.
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]
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]
which looks like this:
Plot[xsol, {rad, -Pi/3, 2 Pi/3}]
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]
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])
Reduce
, maybe? $\endgroup$