Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Solving on mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg88594] Re: [mg88478] Solving on mathematica
  • From: DrMajorBob <drmajorbob at att.net>
  • Date: Fri, 9 May 2008 03:25:45 -0400 (EDT)
  • References: <6419763.1210198756726.JavaMail.root@m08>
  • Reply-to: drmajorbob at longhorns.com

Your NSolve statement is not legal syntax (in a dozen different ways), and  
if it were, the "knowns" you're not solving for -- x[i] and y[i] -- would  
have to be... you know... KNOWN.

That is, they'd have to be numbers, since NSolve solves numerical  
problems, not algebraic ones.

If we try to solve the algebraic problem, we get:

eq[i_] = (x[i] - ux)^2 + (y[i] - uy)^2 + z[i] - uz == r[i] - cb;
Solve[Array[eq, 4], {ux, uy, uz, cb}]

{}

That is, there is no solution to the general problem.

It's always possible Solve "missed" an existing solution, but in this  
case, I doubt it.

Here's a second attempt, this time just trying to solve for maxima/minima  
of the squared error:

zeroD[i_] =
  Equal @@ D[#.# &@(List @@ eq[i]), {{ux, uy, uz, cb, dummy}}]

-4 (-ux + x[i]) (-uz + (-ux + x[i])^2 + (-uy + y[i])^2 +
     z[i]) == -4 (-uy + y[i]) (-uz + (-ux + x[i])^2 + (-uy + y[i])^2+
     z[i]) == -2 (-uz + (-ux + x[i])^2 + (-uy + y[i])^2 +
     z[i]) == -2 (-cb + r[i]) == 0

Solve[Flatten@Array[zeroD, 4], {ux, uy, uz, cb}]

{}

Bobby

On Tue, 06 May 2008 05:41:48 -0500, Chris <mogsy182gooner at hotmail.com>  
wrote:

> How would i go about solving this equaiton on mathematica
>
> (Xi -Ux)^2 + (Yi - Uy)^2 + (Zi - Uz) = (Ri - Cb)
> i = 1,2,3,4
>
> where we need to find Ux, Uy, Uz, Cb tried a few things and they dont 
> work.
>
> NSolve[ (Xi - U)^2 + (Yi - V)^2 + (Zi - W)^2 == (Ri - B)^2, {U, V, W,
>   B}, { i = 1, 2, 3, 4} ]
>
> any ideas?
>
>



-- =

DrMajorBob at longhorns.com


  • Prev by Date: Re: Point Symbol and Mesh
  • Next by Date: ListDensityPlot / CountryData: Small glitch in the 6.0.2 documentation
  • Previous by thread: Re: Solving on mathematica
  • Next by thread: Re: Solving on mathematica