Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Plot x^2+y^2+xy+x+y=0 ?

Status
Not open for further replies.

briglass

Computer
Sep 9, 2006
4
Do you know how I could go about plotting this function?

x^2 + y^2 + xy + x + y = 0

Thanks,
Brian
 
Replies continue below

Recommended for you

It's not. It's for psych research. The actual equation is more complicated, but I just wanted to know how to plot non-seperable equations in general.

Anyway, I ended up using ezplot, and it works well.

-Brian
 

Why wouldn’t you just find a series of solutions and plot the points in the plane? If you want to plot line segments between points, I guess you could sort the data by x.

For this particular example I would be tempted to use an ad hoc method.

x^2+y^2+xy+x+y=0 can be re-written as

3/4x^2+1/2x+(y+1/2x)^2+(+y+1/2x)=0

Define u=y+1/2x then
3/4x^2+1/2 x +u^2+u=0

For an array of u values one gets x values by the quadratic formula (Possibly 2 solutions.). With the x values one gets the y values from the definition of u. Plot the points.


Regards,

Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor