Program to solve system of nonlinear equations

In summary, you will have trouble using Newton's method if one of the iteration points is stationary, and there are other methods you could try.
  • #1
twoski
181
2

Homework Statement



XMEaAdV.png


Solve the aforementioned system of nonlinear equations using Newton's method. write a program to carry out the calculations (it must use gauss elimination).

Use the values 0-3 for [itex]x_{1}^{(0)}, x_{2}^{(0)}[/itex] (ie. 16 data sets total).


The Attempt at a Solution



So i have hit my first roadblock: For [itex]x_{1}^{(0)}=0, x_{2}^{(0)}=0[/itex] this makes absolutely no sense.

You end up with [itex]0 * Δx_{1}^{(0)} + 0 * Δx_{2}^{(0)} = 1[/itex] which is impossible. What the heck?
 
Physics news on Phys.org
  • #2
You will always run into problems with Newton's method if one of the iteration points is stationary, which happens whenever the Jacobian matrix is singular (##\det \mathbf{G}'(\mathbf{x}) =0##). In this case there is a line of stationary points on the ##x_2## axis, so several of the starting points listed will fail. There are alternative methods to Newton, but they would seem to be beyond the scope of the problem.
 
  • #3
Correct, i am supposed to use Newton's method with gauss elimination specifically... So should i email my prof about this? Is there some sort of method to solving this case?
 
  • #4
twoski said:
Correct, i am supposed to use Newton's method with gauss elimination specifically... So should i email my prof about this? Is there some sort of method to solving this case?

Sure, you could email the prof or grader. If your course or text didn't cover the methods for singular matrices, I don't think that you'd be expected to learn them just to do this problem. If you are interested in reading about one method, you might check out this chapter that uses Singular Value Decomposition (SVD) of the Jacobian to improve the Newton method. There's a similar (maybe equivalent) method described in this paper, but the presentation is more technical than the 1st reference. Again, I am certain you are not expected to use these methods, but it can't hurt to check with the prof.
 
  • #5
I messaged the prof and he tells me,

Just report your findings (with a brief discussion). I am assuming that you get convergence for at least some of the initial data. You can take some liberty with the initial data ...

Not sure what "some liberty" means but i did manage to make my program work for cases where the matrix doesn't have a row of zeros.
 
  • #6
Instead of starting with a bad point on the list, you could choose an initial point a small distance away from the suggested one to see if the convergence improves.
 
  • #7
Ah, so in place of 0, i could take, say, 0.001 and try with that?
 
  • #8
twoski said:
Ah, so in place of 0, i could take, say, 0.001 and try with that?

Yes. If you start too close to the singular point, though, it might take a relatively long time for Newton to converge, or the trajectory might actually hit the singular point. This actually seems like a good problem because it might illustrate a lot of features that would come up in realistic applications.
 

What is a system of nonlinear equations?

A system of nonlinear equations is a set of equations where the variables have powers other than 1 and the equations cannot be rearranged to form linear equations. This means that the equations cannot be solved using traditional algebraic methods.

Why would I need to solve a system of nonlinear equations?

Nonlinear equations are often used to model real-world problems that cannot be accurately represented by linear equations. Solving these equations allows us to find the values of the variables that satisfy all of the equations, giving us a better understanding of the problem.

What is a program to solve a system of nonlinear equations?

A program to solve a system of nonlinear equations is a computer program that uses numerical methods, such as Newton's method or the Broyden-Fletcher-Goldfarb-Shanno (BFGS) method, to find the solutions to a set of nonlinear equations. These numerical methods use iterative techniques to approximate the solutions.

How do I use a program to solve a system of nonlinear equations?

To use a program to solve a system of nonlinear equations, you will need to input the equations and initial guesses for the variables. The program will then use numerical methods to find the solutions and display them for you. Some programs may also allow you to adjust the settings and choose different numerical methods.

Are there any limitations to using a program to solve a system of nonlinear equations?

Yes, there are some limitations to using a program to solve a system of nonlinear equations. First, the program may not be able to find a solution if the equations are too complex or if there are no real solutions. Additionally, the solutions found by the program may not be exact due to the use of numerical methods and rounding errors. It is always important to double-check the solutions and their accuracy.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
Replies
2
Views
531
  • Engineering and Comp Sci Homework Help
Replies
6
Views
3K
  • Linear and Abstract Algebra
Replies
1
Views
753
  • Engineering and Comp Sci Homework Help
Replies
7
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
18
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
485
Replies
9
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • Linear and Abstract Algebra
Replies
5
Views
1K
Back
Top