Question How can i do that? I've been trying, solve, explot and subs. I can get the graph, but i cannot get the (x,y) pairs that I want. When I use function solve to solve the equation in term of x or y and then substitute the numeric value for one of them to find the other, I got the problem about complex numer. This might be because that numeric value that I substitute is not the number that satisfy the equation, so the program give me the result in complex number. Background. I need to use the pairs to find the optimal value of my objective function. I tried to use the fmincon, but it gave me the optimal value that is not reliable, so i try to do it manually. Note that my equality constraint is in the form of the equation in the subject. I also have a couple of inequality constraints. Thanks in advance

0 |

8/12/2010 1:02:06 PM

> Question > How can i do that? > I've been trying, solve, explot and subs. > I can get the graph, but i cannot get the (x,y) pairs > that I want. > > When I use function solve to solve the equation in > term of x or y and then substitute the numeric value > for one of them to find the other, I got the problem > about complex numer. This might be because that > numeric value that I substitute is not the number > that satisfy the equation, so the program give me the > result in complex number. > > Background. > I need to use the pairs to find the optimal value of > my objective function. > I tried to use the fmincon, but it gave me the > optimal value that is not reliable, so i try to do it > manually. > Note that my equality constraint is in the form of > the equation in the subject. > I also have a couple of inequality constraints. > > Thanks in advance x^2+x+y^2+3y = 5y^2+3y+3xy+5 x^2+x(1-3y)+(-4y^2-5)=0 x^2-2x*(1.5y-0.5)-(4y^2+5)=0 x = 1.5y-0.5 +/- sqrt((2.25y^2-1.5y+0.25)+(4y^2+5)) x = 1.5y-0.5 +/- 0.5*sqrt(25y^2-6y+21) So all points of the form (1.5y-0.5 + 0.5*sqrt(25y^2-6y+21),y) or (1.5y-0.5 - 0.5*sqrt(25y^2-6y+21),y) for y in IR satisfy our equation. Best wishes Torsten.

0 |

8/12/2010 10:37:36 AM

Could somebody help me on this, please? It may sound absurd, but i've been trying to do this for, like, many hours.

0 |

8/12/2010 2:16:25 PM

"Kittithad Wangveerathananon" <kittithad@startfromyou.com> wrote in message <i40vno$9fm$1@fred.mathworks.com>... > Could somebody help me on this, please? > It may sound absurd, but i've been trying to do this for, like, many hours. Your question didn't get answered in an hour and 14 minutes. I think that's a very low response time for a bunch of people volunteering their time to help you. Also, please don't post the problem only in the thread title. What's wrong with this? >>solve('x^2+x+y^2+3*y=5*y^2+3*y+3*x*y+5','x')

0 |

8/12/2010 2:30:28 PM

all points of the form (1.5y-0.5 + 0.5*sqrt(25y^2-6y+21),y) or (1.5y-0.5 - 0.5*sqrt(25y^2-6y+21),y) If I sub the value of y, freely, i might get 1.5y-0.5 + 0.5*sqrt(25y^2-6y+21) as a complex number right? I try this way before too and get the complex number. I need the contour set of z=0 when z=f(x,y). I have the graph, but not the set. Torsten Hennig <Torsten.Hennig@umsicht.fhg.de> wrote in message <1780645233.99952.1281623886497.JavaMail.root@gallium.mathforum.org>... > > Question > > How can i do that? > > I've been trying, solve, explot and subs. > > I can get the graph, but i cannot get the (x,y) pairs > > that I want. > > > > When I use function solve to solve the equation in > > term of x or y and then substitute the numeric value > > for one of them to find the other, I got the problem > > about complex numer. This might be because that > > numeric value that I substitute is not the number > > that satisfy the equation, so the program give me the > > result in complex number. > > > > Background. > > I need to use the pairs to find the optimal value of > > my objective function. > > I tried to use the fmincon, but it gave me the > > optimal value that is not reliable, so i try to do it > > manually. > > Note that my equality constraint is in the form of > > the equation in the subject. > > I also have a couple of inequality constraints. > > > > Thanks in advance > > x^2+x+y^2+3y = 5y^2+3y+3xy+5 > x^2+x(1-3y)+(-4y^2-5)=0 > x^2-2x*(1.5y-0.5)-(4y^2+5)=0 > x = 1.5y-0.5 +/- sqrt((2.25y^2-1.5y+0.25)+(4y^2+5)) > x = 1.5y-0.5 +/- 0.5*sqrt(25y^2-6y+21) > > So all points of the form > (1.5y-0.5 + 0.5*sqrt(25y^2-6y+21),y) or > (1.5y-0.5 - 0.5*sqrt(25y^2-6y+21),y) > for y in IR satisfy our equation. > > Best wishes > Torsten.

0 |

8/12/2010 3:17:24 PM

Yeah basically, that what I want. But I need to obtain the value of those pairs, because I want to use it to sub into my objective function to find that which pair max my objective. As Steve indicated, there are an infinite number of solution points. Exactly how much RAM or disk space do you have to hold all of those infinite results, and how long are you prepared to let your minimizer run?

0 |

8/12/2010 4:53:07 PM

Kittithad Wangveerathananon wrote: > all points of the form > (1.5y-0.5 + 0.5*sqrt(25y^2-6y+21),y) or > (1.5y-0.5 - 0.5*sqrt(25y^2-6y+21),y) > > If I sub the value of y, freely, i might get 1.5y-0.5 + > 0.5*sqrt(25y^2-6y+21) as a complex number right? > > I try this way before too and get the complex number. > > I need the contour set of z=0 when z=f(x,y). I have the graph, but not > the set. Yes, if you substitute x and y freely into an arbitrary function then you might get a complex number. The matter is, however, irrelevant to your original question as your original question had no z or f(x,y) in it. If you are switching topics, please start a new thread giving the information relevant to that new topic (such as the nature of f() )

0 |

8/12/2010 4:55:19 PM

"Kittithad Wangveerathananon" <kittithad@startfromyou.com> wrote in message <i413a4$682$1@fred.mathworks.com>... > all points of the form > (1.5y-0.5 + 0.5*sqrt(25y^2-6y+21),y) or > (1.5y-0.5 - 0.5*sqrt(25y^2-6y+21),y) > > If I sub the value of y, freely, i might get 1.5y-0.5 + 0.5*sqrt(25y^2-6y+21) as a complex number right? > > I try this way before too and get the complex number. > ....... - - - - - - - - - - No, that isn't correct! Torsten has given you a valid solution. For all real y numbers Torsten's quantity inside the square root is always a positive quantity and can never give you a complex result for x. Write it like this: 25y^2-6y+21 = (5*y-3/5)^2+516/25 and you can see that it can never be less that 516/25, no matter what x is. The locus of your equation is a hyperbola in which the two branches lie to the left and the right. There are some x's in between for which no real y exists, but for every possible real y there are two distinct x's which satisfy the equation. Roger Stafford

0 |

8/12/2010 5:35:05 PM

Kittithad Wangveerathananon wrote: > Could somebody help me on this, please? > It may sound absurd, but i've been trying to do this for, like, many hours. Sorry; next time something this important comes up, have your country's State Department call our Ambassador, who will cable over to my country to get the appropriate ministry to send someone over to my residence to wake me up.

0 |

8/12/2010 8:04:31 PM