Group Abstract Group Abstract

Message Boards Message Boards

0
|
7.1K Views
|
8 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Root finding problem. FindRoot[] output message is "Singular Jacobian".

Posted 10 years ago

I face a problem with root finding. I'm solving a system of equations using FindRoot function. I received the following message "Singular Jacobian".. Is there a way to avoid this? I tried perturbing the initials and it didn't work.

POSTED BY: Maha Youssef
8 Replies

Use FindMinimum by giving it an objective function of 0 and your equations as constraints. You could also try NSolve.

POSTED BY: Frank Kampas

Linear Equations can be easily solved by FindMinimum

POSTED BY: Frank Kampas
Posted 10 years ago

I checked FindMinimum and it is used to get Minimm of function, how it is used to solve system?

POSTED BY: Maha Youssef
Posted 10 years ago

equations are linear system in unknowns u[i,j]

POSTED BY: Maha Youssef

Would be easier to help if you post the equations.

POSTED BY: Frank Kampas
Posted 10 years ago

equations= Flatten[stepCol3];

Length[stepCol6]

25

unknowns = Union[Cases[Level[equations, -1], u[x, y] -> u[x, y]]]

{u[-2., -2.], u[-2., -1.], u[-2., 0.], u[-2., 1.], u[-2., 2.], u[-1., -2.], u[-1., -1.], u[-1., 0.], u[-1., 1.], u[-1., 2.], u[0., -2.], u[0., -1.], u[0., 0.], u[0., 1.], u[0., 2.], u[1., -2.], u[1., -1.], u[1., 0.], u[1., 1.], u[1., 2.], u[2., -2.], u[2., -1.], u[2., 0.], u[2., 1.], u[2., 2.]}

Length[unknowns]

25

intialpts = RandomReal[1, Length[unknowns]]

{0.250597, 0.299283, 0.182427, 0.723877, 0.0188032, 0.72179, \ 0.252471, 0.829026, 0.654356, 0.891575, 0.935469, 0.68797, 0.202407, \ 0.00774897, 0.708065, 0.983459, 0.549046, 0.802898, 0.969589, \ 0.769259, 0.0190204, 0.959561, 0.421826, 0.745957, 0.367205}

Length[intialpts]

25

sol = FindRoot[equations, Transpose[{unknowns, intialpts}], MaxIterations -> 500]

FindRoot::jsing: Encountered a singular Jacobian at the point {u[-2.,-2.],u[-2.,-1.],u[-2.,0.],u[-2.,1.],u[-2.,2.],u[-1.,-2.],u[-1.,-1.],u[-1.,0.],u[-1.,1.],<<7>>,u[1.,-1.],u[1.,0.],u[1.,1.],u[1.,2.],u[2.,-2.],u[2.,-1.],u[2.,0.],u[2.,1.],u[2.,2.]} = {0.250597,0.299283,0.182427,0.723877,0.0188032,<<15>>,0.0190204,0.959561,0.421826,0.745957,0.367205}. Try perturbing the initial point(s). >>

POSTED BY: Maha Youssef

You could try a FiniteDifference Jacobian or specify the Jacobian yourself, as described in the Options section of the FindRoot documentation.

POSTED BY: Frank Kampas
Posted 10 years ago

Thank You. The problem that, I found it for a single function "blackbox" but I need it to solve system of equations. Any help?

POSTED BY: Maha Youssef
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard