The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Using fsolve() to solve non-linear system equation
06-24-2019, 08:00 AM
Post: #1
Using fsolve() to solve non-linear system equation
I have chance to use fsolve() to find numeric solution for single variable with the following options:
- specify the initial guess, and the fsolve() will return a solution (that in fact, could be many) for example fsolve(x^2+2*x-3 = 0,x=0). This will give x=1
- specify the range of solution that we need fsolve() to search for - for example fsolve(x^2 + 2*x - 3=0, x=-10..10). This will give x = -3,1

However, with 2-variable system equation, I can find solution by fsolve() by providing only initial guess e.g fsolve({x^2 + y^2 =1, x+y=1}, {x=0,y=0}). this will give x= 6.09E-16 (which is close to 0), y= 1.

But with 2-variable system equation, if I try to specify range of x, and y with the command below:
fsolve({x^2 + y^2 =1, x+y=1}, {x=-10..10,y=-10..10}), it gives error!!

Does anyone know how to let fsolve() to find solution for given range of x and y like the case above.

Thank you very much.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Using fsolve() to solve non-linear system equation - teerasak - 06-24-2019 08:00 AM



User(s) browsing this thread: 1 Guest(s)