Re: Re: Solve Equation

• To: mathgroup at smc.vnet.net
• Subject: [mg20867] Re: [mg20835] Re: [mg20813] Solve Equation
• From: Daniel Lichtblau <danl at wolfram.com>
• Date: Thu, 18 Nov 1999 01:09:42 -0500 (EST)
• References: <80qvh7\$l10@smc.vnet.net> <199911170840.DAA02574@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```adam.smith at hillsdale.edu wrote:
>
> I believe that there was a wrong value in the set of equations given.
> If I replace the L==10-6 Cos[a+b] with 13-6 Cos[a+b]:
>
> eqn = {L==(5 + 4Cos[a]) ,L==(13 - 12 Cos[b]), L==(13 - 6Cos[a + b])}
> Out[1]=
> {L==5+4 Cos[a],L==13-12 Cos[b],L==13-6 Cos[a+b]}
> In[2]:=
> eqn/.{L->7,b -> Pi/3, a -> 5Pi/3}
> Out[2]=
> {True,True,True}
>
> Interestingly, Solve finds a different solution that still works
>
> In[3]:=
> mathsolve = Solve[eqn, {L, a, b}]
> Solve::"ifun":
>     "Inverse functions are being used by \!\(Solve\), so some solutions
> may \
> not be found."
> Out[3]=
>                                    1
> {{L -> 19 + 6 Sqrt[3], b -> ArcCos[- (-1 - Sqrt[3])],
>                                    2
>
>                1
>    a -> ArcCos[- (7 + 3 Sqrt[3])]}}
>                2
>
> In[4]:=
> solution = N[mathsolve]
> Out[4]=
> {{L -> 29.3923, b -> 3.14159 - 0.831443 I, a -> 2.49433 I}}
> In[5]:=
> eqn /. solution
> Out[5]=
> {{True,True,True}}
> ...

It turns out one can almost recover the desired solution (as well as
several others) with just a bit of work.

In[1]:=  eqn = {L == 5 + 4Cos[a], L == 13 - 12 Cos[b],
L == 13 - 6Cos[a + b]};

In[2]:= Timing[soln = FullSimplify[Solve[TrigToExp[eqn], {L,a,b}]];]
Solve::ifun: Inverse functions are being used by Solve, so some
solutions
may not be found.
Out[2]= {11.12 Second, Null}

In[3]:= InputForm[soln]
Out[3]//InputForm=
{{L -> 7, b -> Pi/3, a -> -Pi/3}, {L -> 7, b -> -Pi/3, a -> Pi/3},
{L -> 19 + 6*Sqrt[3], b -> Pi + I*Log[(1 - Sqrt[2]*3^(1/4) +
Sqrt[3])/2],
a -> -I*Log[(7 + 3*Sqrt[3] - Sqrt[6*(12 + 7*Sqrt[3])])/2]},
{L -> 19 + 6*Sqrt[3], b -> Pi + I*Log[(1 + Sqrt[2]*3^(1/4) +
Sqrt[3])/2],
a -> I*Log[2/(7 + 3*Sqrt[3] + Sqrt[6*(12 + 7*Sqrt[3])])]},
{L -> 19 - 6*Sqrt[3], b -> -ArcCot[Sqrt[-1 + 2/Sqrt[3]]],
a -> ArcCot[11/Sqrt[-45 + 42*Sqrt[3]]]}, {L -> 19 - 6*Sqrt[3],
b -> ArcCot[Sqrt[-1 + 2/Sqrt[3]]], a -> -ArcCot[11/Sqrt[-45 +
42*Sqrt[3]]]}}

Watering the first solution with an appropriately placed 2*Pi will give
the desired result. As it is, we got several real-valued solutions.

In[4]:= N[soln]   // Chop

Out[4]= {{L -> 7., b -> 1.0472, a -> -1.0472},
>    {L -> 7., b -> -1.0472, a -> 1.0472},
>    {L -> 29.3923, b -> 3.14159 - 0.831443 I, a -> 2.49433 I},
>    {L -> 29.3923, b -> 3.14159 + 0.831443 I, a -> -2.49433 I},
>    {L -> 8.6077, b -> -1.19606, a -> 0.446593},
>    {L -> 8.6077, b -> 1.19606, a -> -0.446593}}

Daniel Lichtblau
Wolfram Research

```

• Prev by Date: Re: SSH and Remote Kernels
• Next by Date: Re: challenge: phone number to words
• Previous by thread: Re: Solve Equation
• Next by thread: Re: Solve Equation