       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=
> {L==5+4 Cos[a],L==13-12 Cos[b],L==13-6 Cos[a+b]}
> In:=
> eqn/.{L->7,b -> Pi/3, a -> 5Pi/3}
> Out=
> {True,True,True}
>
> Interestingly, Solve finds a different solution that still works
>
> In:=
> mathsolve = Solve[eqn, {L, a, b}]
> Solve::"ifun":
>     "Inverse functions are being used by \!\(Solve\), so some solutions
> may \
> not be found."
> Out=
>                                    1
> {{L -> 19 + 6 Sqrt, b -> ArcCos[- (-1 - Sqrt)],
>                                    2
>
>                1
>    a -> ArcCos[- (7 + 3 Sqrt)]}}
>                2
>
> In:=
> solution = N[mathsolve]
> Out=
> {{L -> 29.3923, b -> 3.14159 - 0.831443 I, a -> 2.49433 I}}
> In:=
> eqn /. solution
> Out=
> {{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:=  eqn = {L == 5 + 4Cos[a], L == 13 - 12 Cos[b],
L == 13 - 6Cos[a + b]};

In:= 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= {11.12 Second, Null}

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

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:= N[soln]   // Chop

Out= {{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