       Re: Solve Equation

• To: mathgroup at smc.vnet.net
• Subject: [mg20841] [mg20841] Re: [mg20813] Solve Equation
• From: Bjorn Leonardz <Bjorn.Leonardz at hhs.se>
• Date: Wed, 17 Nov 1999 03:40:57 -0500 (EST)
• References: <199911142314.SAA02155@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```>i am trying to solve 3 equations on 3 variables. Mathematica is complaining
>about trigonometric functions, sin and cosine.
>
>L= 5+4Cos[a]
>L=13-12 Cos[b]
>L=10 - 6Cos[a+b]
>
>I tried to change
>Cos[a]  -> x
>Cos[b] -> y
>Cos[a+b] - > (x y - Sqrt[1-x x]Sqrt[1- y y])
>
>But this time it only gives me a trivial solution.(L=0)
>I am trying to get the solution.
>
>L=7, b=Pi/3 , a= Pi/3*5
>
>Good work , everyone.
>Mecit
>MSc student @ University of Cape Town

Mecit,

I tried Solve like this:
Solve[{x==5+4Cos[u],x==13-12Cos[v],x==10-6Cos[u+v]},{x,u,v}]
and received two sets of complex valued solutions. Also a warning:
Solve::"ifun":
"Inverse functions are being used by \!\(Solve\), so some solutions may \
not be found."

solutions. How about taking a *look* at things, that is, have Mathematica
plot the three surfaces and then show them all in the same box (see
attached notebook).

Without turning the plot around we can see two sets of real-valued
solutions and then use FindRoot to find them (it looks like there are
two more on the other side of the mountain):

FindRoot[{x==5+4Cos[u],x==13-12Cos[v],x==10-6Cos[u+v]},{x,8},{u,0.5},{v,1}]
gives
{x\[Rule]8.94378,u\[Rule]0.167852,v\[Rule]1.22599}

and

FindRoot[{x==5+4Cos[u],x==13-12Cos[v],x==10-6Cos[u+v]},{x,5},{u,5},{v,1}]
gives
{x\[Rule]5.22209,u\[Rule]4.76794,v\[Rule]0.865632}

Just to check, we can try to apply NSolve to the original system of equations:

NSolve[{x==5+4Cos[u],x==13-12Cos[v],x==10-6Cos[u+v]},{x,u,v}]

It gives the same warning as Solve
and two solutions, one complex and one equal to the first one above:
{x\[Rule]8.94378,v\[Rule]1.22599,u\[Rule]0.167852}.

But I come no nearer to an analytic solution...

Incidentally, in what context do these equations appear?

Regards,
Bjorn Leonardz

(***********************************************************************

Mathematica-Compatible Notebook

This notebook can be used on any computer system with Mathematica 3.0,
MathReader 3.0, or any compatible application. The data for the notebook
starts with the line of stars above.

To get the notebook into a Mathematica-compatible application, do one of
the following:

* Save the data starting with the line of stars above into a file
with a name ending in .nb, then open the file inside the application;

* Copy the data starting with the line of stars above to the
clipboard, then use the Paste menu command inside the application.

Data for notebooks contains only printable 7-bit ASCII and can be
sent directly in email or through ftp in text mode.  Newlines can be
CR, LF or CRLF (Unix, Macintosh or MS-DOS style).

NOTE: If you modify the data for this notebook not in a Mathematica-
compatible application, you must delete the line below containing the
word CacheID, otherwise Mathematica-compatible applications may try to
use invalid cache data.

applications, contact Wolfram Research:
web: http://www.wolfram.com
email: info at wolfram.com
phone: +1-217-398-0700 (U.S.)

Notebook reader applications are available free of charge from
Wolfram Research.
***********************************************************************)

(*CacheID: 232*)

(*NotebookFileLineBreakTest
NotebookFileLineBreakTest*)
(*NotebookOptionsPosition[      3387,         97]*)
(*NotebookOutlinePosition[      4248,        125]*)
(*  CellTagsIndexPosition[      4204,        121]*)
(*WindowFrame->Normal*)

Notebook[{
Cell[BoxData[
\(Solve[{x == 5 + 4  Cos[u], x == 13 - 12  Cos[v],
x == 10 - 6  Cos[u + v]}, {x, u, v}]\)], "Input"],

Cell[BoxData[{
\(fcnOne[u_, v_] := 5 + 4  Cos[u]\),
\(\t\tfcnTwo[u_, v_] := 13 - 12  Cos[v]\),
\(\t\tfcnThree[u_, v_] := 10 - 6  Cos[u + v]\)}], "Input"],

Cell[BoxData[
\(plotOne =
Plot3D[fcnOne[u, v], {u, 0, 2\ \[Pi]}, {v, 0, 2\ \[Pi]},
PlotPoints -> 40, PlotRange \[Rule] {0, 25},
BoxRatios \[Rule] {1, 1, 1},
AxesLabel \[Rule] {"\<u\>", "\<v\>", "\<x\>"}, \
ImageSize -> {249, 270}]\)], "Input"],

Cell[BoxData[
\(plotTwo =
Plot3D[fcnTwo[u, v], {u, 0, 2\ \[Pi]}, {v, 0, 2\ \[Pi]},
PlotPoints -> 40, PlotRange \[Rule] {0, 25},
BoxRatios \[Rule] {1, 1, 1},
AxesLabel \[Rule] {"\<u\>", "\<v\>", "\<x\>"}, \
ImageSize -> {249, 270}]\)], "Input"],

Cell[BoxData[
\(plotThree =
Plot3D[fcnThree[u, v], {u, 0, 2\ \[Pi]}, {v, 0, 2\ \[Pi]},
PlotPoints -> 40, PlotRange \[Rule] {0, 25},
BoxRatios \[Rule] {1, 1, 1},
AxesLabel \[Rule] {"\<u\>", "\<v\>", "\<x\>"}, \
ImageSize -> {249, 270}]\)], "Input"],

Cell[BoxData[
\(Show[plotOne, plotTwo, plotThree]\)], "Input"],

Cell[BoxData[
\(FindRoot[{x == 5 + 4  Cos[u], x == 13 - 12  Cos[v],
x == 10 - 6  Cos[u + v]}, {x, 5}, {u, 5}, {v, 1}]\)], "Input"],

Cell[BoxData[
\(FindRoot[{x == 5 + 4  Cos[u], x == 13 - 12  Cos[v],
x == 10 - 6  Cos[u + v]}, {x, 8}, {u, 0.5}, {v, 1}]\)], "Input"],

Cell[BoxData[
\(NSolve[{x == 5 + 4  Cos[u], x == 13 - 12  Cos[v],
x == 10 - 6  Cos[u + v]}, {x, u, v}]\)], "Input"]
},
FrontEndVersion->"Macintosh 3.0",
ScreenRectangle->{{0, 1024}, {0, 748}},
WindowSize->{846, 602},
WindowMargins->{{Automatic, -375}, {Automatic, 50}},
Magnification->2,
MacintoshSystemPageSetup->"\<\
00<0004/0B`000003;H8`_mooh/=<`Tk0fL5N`?P0080004/0B`000000]P2:001
0000I00000400`<30?l00BL?00400 at 00000000000000060801T1T00000000000
00000000004000000000000000000000\>"
]

(***********************************************************************
Cached data follows.  If you edit this Notebook file directly, not using
Mathematica, you must remove the line containing CacheID at the top of
the file.  The cache data will then be recreated when you save this file
from within Mathematica.
***********************************************************************)

(*CellTagsOutline
CellTagsIndex->{}
*)

(*CellTagsIndex
CellTagsIndex->{}
*)

(*NotebookFileOutline
Notebook[{
Cell[1709, 49, 127, 2, 115, "Input"],
Cell[1839, 53, 167, 3, 115, "Input"],
Cell[2009, 58, 290, 6, 177, "Input"],
Cell[2302, 66, 290, 6, 177, "Input"],
Cell[2595, 74, 294, 6, 177, "Input"],
Cell[2892, 82, 66, 1, 53, "Input"],
Cell[2961, 85, 143, 2, 115, "Input"],
Cell[3107, 89, 145, 2, 115, "Input"],
Cell[3255, 93, 128, 2, 115, "Input"]
}
]
*)

(***********************************************************************
End of Mathematica Notebook file.
***********************************************************************)

```

• Prev by Date: Re: Distinct Compositions
• Next by Date: Re: Help with geometry problem required.
• Previous by thread: Re: Solve Equation
• Next by thread: Re: Solve Equation