Skip to main content
added 230 characters in body
Source Link
Simon Woods
  • 85.4k
  • 8
  • 180
  • 326

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])

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

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])
Source Link
Simon Woods
  • 85.4k
  • 8
  • 180
  • 326

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