Loops and Recursion help

Determine the numerical solution to the following two equations
x^2+x*y-10=0
y+3*x*y^2-57=0
through the use of iteration, solving the equations:
x(k+1)=sqrt(10-x(k)*y(k))
and
y(k+1)=sqrt((57-y(k))/(3*x(k+1)))
Initialize the x(k) and y(k) with 1.5 and 3.5 respectively. Use a while loop to determine the solutions of x and y so that the maximum error between x(k) and y(k) defined as
e(x)=abs(x(k+1)-x(k))/abs(x(k))
and
e(y)=abs(y(k+1)-y(k))/abs(y(k))
is less than 10^-4

5 Comments

We're not going to just do your homework for you! What have you tried so far? Where are you getting stuck?
I just dont understand where to start. I just need advice on the first thing to do and help understanding what the problem is asking. Sorry didn't mean to make it seem like I wanted you to do it lol. Thanks
I thought about setting x(k)=1.5 and y(k)=3.5 and then running a loop on x(k+1) and y(k+1) but I'm not sure what kind of loop to use or if thats even right.
Try writing down the steps you'd follow if you were solving this on pencil and paper as comments.
% Step 1
% Step 2
% Step 3
If your textbook has pseudocode, you could use those as your steps.
Once you have the basic outline, start figuring out how to implement each step. If you're not sure how to implement a particular step, break it into smaller sub-steps until you have something you can implement.
We dont have a textbook. We just get a small packet so I dont know what pseudocode is.

Answers (0)

This question is closed.

Asked:

on 5 Nov 2019

Closed:

on 20 Aug 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!