Answer the question
In order to leave comments, you need to log in
Problem with the iteration method for finding the roots of a system of equations?
Hello. My name is Petyr.
The code is written in the WX Maxima environment.
There is a system of nonlinear equations:
f_1(x,y)=sin(x + y) − 1.1x + 0, 2 = 0;
f_2(x,y)=x^2 + y^2 - 1=0;
The graph below shows that this system has four roots
. As an initial approximation, we can take x1 = 1, y1 = 0.5 and x2 = 1, y2 = -1
Let's try to solve our system for x and y:
x = (sin(x+y )-0.1*x+0.2);
y = sqrt(1-x^2);
Let's define the corresponding functions:
g1(x,y):= (sin(x+y)-0.1*x+0.2);
g2(x,y):=sqrt(1-x^2);
x:1; y:0.5; epsilon:10^(−5); n:0;
unless (float(g1(x,y))−x)^2+(float(g2(x,y))−y)^2<epsilon^2 do
(x0:float(g1(x,y)),y0:float(g2(x,y)),x:x0,y:y0,n:n+1);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question