Question

Q5) consider the nonlinear system x3 - 3xy2 - 2x +2 = 0 3x2y - y3 - 2y = 0 Find x and y by Newton-Raphson method if x =1, x2
0 0
Add a comment Improve this question Transcribed image text
Answer #1

A system of non - linear equations takes a lot of time to solve by hand but can be solved easily by using MATLAB

I explained the solution detailedly by hand and also provided the MATLAB code for your understanding

This is a lengthy answer. I'm hoping that you have some idea about MATLAB. If you don't, don't worry. I explained everything in detail.

Please give a thumbs up if you like my answer. Leave a comment if you have any doubt. Good Luck!

equations is Griven system of non-linear x - 3xy - 2x + 2 = 0 3x²y -ye - 24 [2] [:] Newton - Raphson method for system of eqJE 3x² By²-2 - 6xy 3 x ² 34 22 6xy Iteration 1 - JO) = J at x i. e Jat x, y ho have xM+) _ £12 [Jen] If (200)] n=0 = x ² 2 2sterations, - (2) (1) x x [JC10] [f (x ) -0.394 C-l-oy -3.78 - 0.88 37 0.6003 steration 3 : (3) x x (2) - [5 (27] [ f cx (2)]In the above images, inverse of J is calculated in MATLAB. Type inv(J) to get inverse matrix

MATLAB CODE

Editor Window: Type the below code in editor window. Save this code as "NR.m" file for the code to work

function [f,J,inverseJ,x0,xnew]= NR(x,y)
x0=[x;y];
f1 = x^3 - 3*x*y^2 - 2*x + 2;
f2 = 3*x^2*y - y^3 - 2*y;
f=[f1;f2];
J = [3*x^2 - 3*y^2 - 2 -6*x*y; 6*x*y 3*x^2 - 3*y^2 - 2];
inverseJ = inv(J);
xnew = x0 - inverseJ*f;

Iteration 1

Type this in command window and click enter

[f,J,inverseJ,x0,xnew]= NR(1,1)

Output

This will be the output displayed:

f =
-2
0
J =
-2 -6
6 -2
inverseJ =
-0.0500 0.1500
-0.1500 -0.0500
x0 =
1
1
xnew =
0.9000
0.7000

Now again call your function by entering these xnew values as shown below

Iteration 2

Type this in command window

[f,J,inverseJ,x0,xnew]= NR(0.9,0.7)

Output

This will be the output displayed:

f =
-0.3940
-0.0420
J =
-1.0400 -3.7800
3.7800 -1.0400
inverseJ =
-0.0677 0.2459
-0.2459 -0.0677
x0 =
0.9000
0.7000
xnew =
0.8837
0.6003

Similarly, if you repeat the above process for another 3 times, after 5th iteration the values will be converged and required x,y values are obtained as shown below:

>> [f,J, inverseJ, x0, xnew]= NR (0.8846,0.5897) f = 1.0e-03 * 0.1661 -0.1148 = -3.1299 -0.6957 -0.6957 3.1299 inverseJ -0.06

Therefore, the required values are (x, y)= (0.8846, 0.5897)

Add a comment
Know the answer?
Add Answer to:
Q5) consider the nonlinear system x3 - 3xy2 - 2x +2 = 0 3x2y - y3...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT