Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

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

Search the Archive

Re: Solving nonlinear equations with mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg35456] Re: Solving nonlinear equations with mathematica
  • From: Selwyn Hollis <slhollis at earthlink.net>
  • Date: Sat, 13 Jul 2002 03:48:33 -0400 (EDT)
  • References: <ag3f2k$749$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Sebastian,

You're dealing with a system that has a singular Jacobian at the 
root---much like a single function with a zero derivative at a root. 
You're probably observing _extremely_ slow convergence. It's also 
possible that the system you constructed doesn't have a root anywhere 
near where you think it does. Try perturbing the system with the known 
solution _much_ less than with Random[]---perhaps by just rounding some 
of the X[[i,j,3]] values to 2 decimal places. You'll see that FindRoot 
does find the solution.

Hope that helps. tschu

Selwyn Hollis
slhollis at mac.com
http://www.math.armstrong.edu/faculty/hollis


Sebastian Pokutta wrote:
> Hi together,
> 
> I try to solve a system of 9 nonlinear Equations of the following forms:
> 
> Sum[(1/Sqrt[( S[[i, 1]] - X_j)^2 + ( S[[i, 2]] - Y_j)^2])*S[[i, 3]],
 > {i, 1, 3}] = Z_j  ( 1 <= j <= 9 )
> 
> I tried this with "findroot" and 9 Points (X_j,Y_j,Z_j)  ( 1 <= j <= 9 )
> searching the S[[i,k]] ( a 3 x 3 matrix ) in the following way:
> 
> X = {{127, 17, 5.0316}, {118, 54, 1.9392}, {5, 10, 1.60571}, {67, 54, 
> 1.04543}, {7, 15, 1.19647}, {24, 11, 1.10665}, {17, 21, 1.85287}, {31,
>  18, 1.59878}, {35, 7, 1.10325}};
> 
> FindRoot[{(1/Sqrt[(s11 - X[[1, 1]])^2 +
> (s12 - X[[1, 2]])^2])*s13 + (1/Sqrt[(s21 - X[[1, 1]])^2 + (s22 -
> X[[1, 2]])^2])* s23 + (1/Sqrt[(s31 - X[[1, 1]])^2 + (s32 - X[[1,

<snip>

> (1/Sqrt[(s11 - X[[9, 1]])^2 + (s12 - X[[9, 2]])^2])* s13 + 
>(1/Sqrt[(s21 - X[[9, 1]])^2 + (s22 -X[[9, 2]])^2])*s23 +
 >(1/Sqrt[(s31 - X[[9, 1]])^2 + (s32 - X[[9, 2]])^2])*s33 - X[[9, 3]] == 0},
>{s11, 130}, {s12, 54}, {s13, 11},{s21, 125}, {s22, 10}, {s23, 34},
>{s31, 5}, {s32, 33}, {s33, 8},
> DampingFactor -> 2, AccuracyGoal -> 4, MaxIterations -> 15]
> 
> but "findroot" exits with:
> 
> FindRoot::"cvnwt": "Newton's method failed to converge to the prescribed
> accuracy after \!\(15\) iterations."
> 
> But THERE'S a solution because I constructed the 9 Points using a given S
> and just disturbed them with a random-value between 0 and 1. So is there a
> sensible way to calculate the S sucht that the the error is minimal?
> 
> perhaps the way I constructed them:
> 
> given arbitrary X and Y the following equation calculates the Z.
> 
> ll[a_, b_] = Sum[(1/Sqrt[( S[[i, 1]] - a)^2 + ( S[[i, 2]] -
> b)^2])*S[[i, 3]], {i, 1, 3}] + Random[];
> 
> with the following S
> 
> S = {{130, 54, 11}, {125, 10, 34}, {5, 33, 8}};
> 
> 
> Help would be greatly appreciated.
> 
> Cu,
>     Sebastian
>  


  • Prev by Date: Re: White border in plots(2)
  • Next by Date: Re: RE: White border in plots
  • Previous by thread: Solving nonlinear equations with mathematica
  • Next by thread: Help with Importing of FITS files