[Date Index]
[Thread Index]
[Author Index]
Re: Solving on mathematica
*To*: mathgroup at smc.vnet.net
*Subject*: [mg88669] Re: [mg88478] Solving on mathematica
*From*: DrMajorBob <drmajorbob at att.net>
*Date*: Mon, 12 May 2008 04:45:52 -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 don't
> 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: How to avoid overflow or underflow in mathematica?**
Next by Date:
**HoldForm, TraditionalForm Bug?**
Previous by thread:
**Re: Solving on mathematica**
Next by thread:
**Question on the Limiting Value of Ratios of Consecuative Primes...**
| |