MathGroup Archive 2007

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

Search the Archive

FindRoot / Jacobian

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84288] FindRoot / Jacobian
  • From: sigmundv at gmail.com
  • Date: Mon, 17 Dec 2007 19:18:37 -0500 (EST)

Dear readers,

Consider the following expressions:

solU = (E^((-I)*p - (2*ArcTan[Tan[q/2]/Sqrt[3]])/Sqrt[3])*(1 +
E^((2*I)*p)))/2

solV = Sin[p]/E^((2*ArcTan[Tan[q/2]/Sqrt[3]])/Sqrt[3])

I then want to solve the system of equations (u = solU, v = solV)
numerically on a grid (u,v) \in (-pi,pi). For that purpose I use
FindRoot, and execute the following:

u1 = Pi; du = 2*Pi/70;

uvPts1 = Flatten[Table[{u, v}, {u, u1 + du, u2 - du, du}, {v, v1 +
du,
    v2 - du, dv}], 1];

uvNew = {p, q} /. Table[FindRoot[{solU == uvPts1[[i, 1]], solV ==
uvPts1[[i, 2]]}, {p,
    -2}, {q, 1+I}], {i, Length[uvPts1]}];

This gives me a p-value and a q-value for each point on the grid, no
problem. However, I get the wrong solution at some of the grid points.
Since I get several of the following type of messages, this would be
expected:

FindRoot::jsing:Encountered a singular Jacobian at the point {p,q} = \
{-10.4516+0.784848 \[ImaginaryI],108.092+104.013 \[ImaginaryI]}. Try \
perturbing the initial point(s). >>

Then I would like to know if there is any 'nice' way to handle these
'singular Jacobian' errors? Does there exist any kind of 'event
handler', as in NDSolve?

Kind regards,
Sigmund Vestergaard


  • Prev by Date: Table[Plot[]]doesn't work as it should in v6
  • Next by Date: Conditionals -- what is "fastest" way to evaluate
  • Previous by thread: Re: Table[Plot[]]doesn't work as it should in v6
  • Next by thread: Re: FindRoot / Jacobian