       Re: Symbols in expression

• To: mathgroup at smc.vnet.net
• Subject: [mg89099] Re: [mg89079] Symbols in expression
• From: DrMajorBob <drmajorbob at att.net>
• Date: Sun, 25 May 2008 06:27:35 -0400 (EDT)
• References: <15605470.1211701065210.JavaMail.root@m08>

```It all depends.

eqns = Array[r, 3] == {Cos[u] Sin[v], Sin[u] Sin[v], Cos[v]} //
Reduce[eqns, {u, v}]

will return MANY solutions (not shown here).

Wade through that thicket if you care to, but inspection yields a simpler
approach.

The third equation is easily solved:

Solve[eqns1[[-1]], v]

Solve::ifun: Inverse functions are being used by Solve, so some \
solutions may not be found; use Reduce for complete solution \
information. >>

{{v -> -ArcCos[r]}, {v -> ArcCos[r]}}

Dividing the first and second equations gives

sides = List @@@ eqns;
Solve[Equal @@ (sides[]/sides[]), u]

Solve::ifun: Inverse functions are being used by Solve, so some \
solutions may not be found; use Reduce for complete solution \
information. >>

{{u -> ArcCot[r/r]}}

That cover mosts cases, but you still have to decide what sign to give v
and what to do when r and/or r is zero. (Either way, the rule for u
gives an undefined result.)

Bobby

On Sun, 25 May 2008 02:22:00 -0500, <sigmundv at gmail.com> wrote:

> Dear all,
>
> Define, say,
>
> r = {Cos[u] Sin[v],Sin[u] Sin[v],Cos[v]}.
>
> How can I write a function, which takes r as an argument and returns a
> list {u,v}? If we defined r[u_,v_]:=... it could be achieved fairly
> easily using DownValues. But how can I achieve it in this case?
>
> Kind regards,
> Sigmund Vestergaard
>
>

--

DrMajorBob at longhorns.com

```

• Prev by Date: Re: Symbols in expression
• Next by Date: Re: Solve's Strange Output
• Previous by thread: Re: Symbols in expression
• Next by thread: Re: Symbols in expression