Coffee Room
Discuss anything here - everything that you wish to discuss with fellow engineers.
12834 Members
Join this group to post and comment.
Aruwin • Jan 23, 2012

# solving an equation to plot a graph

Hi everyone.Someone please help me solve this problem.I am stucked,really.This is actually part 2 of a question where part one is already solved by getting the equation needed to draw the graph.
And here is the equation:
(x^2+y^2)(x+y)=2axy
and the plotting table is as shown in the image:

and a hint is that when x and y are at their higest values, the equation
(x^2+y^2)(x+y)=0 and hence,x+y=0

but how do I solve this to plot the graph?
It's a bit confusing to me.
What do theta and r value signify here?
Aruwin • Jan 23, 2012
the angle and radius i suppose...
Yes, I can make that out.
But confused which is x value and which is y value. 😔
Aruwin • Jan 23, 2012
Dancer_Engineer
Yes, I can make that out.
But confused which is x value and which is y value. 😔
I am confused too but that is the answer given 😔
Well, can you try and figure it out your own way without referring to the answers?Perhaps from there you may get something?
Post the complete question, both part 1 and part 2.
Aruwin • Jan 23, 2012
Dancer_Engineer
Post the complete question, both part 1 and part 2.
OK,but you're gonna have to wait because I have to write the solution manually cuz it is easier for me.
pranav_vanarp • Jan 23, 2012
try putting x = r * cos (theta)
y = r * sin (theta) .
equation becomes
r^3 (cos (theta) + sin (theta) ) = 2(r^2)acos(theta)sin(theta) ;

=> r(cos(theta) + sin(theta)) = 2a cos(theta)sin(theta)
=> 1/sin(theta) + 1/cos(theta) = 2a / r

if we try theta = pi/4 and r = a/sq root(2) . as the image suggests ,
the equation does seem to be satisfied

Thus one solution is x = a/2 and y = a/2.
Aruwin • Jan 23, 2012
So here is the question and the solution of the first part.The question is actually in japanese so I had to translate it into english so you can understand.

There is a rectangle paper ABCD and let point B be the peak as it is folded.The paper is folded at line EF.Let P be the shifted point of B. If PE+PF= a, how is the curve P drawn??

Aruwin • Jan 23, 2012
pranav_vanarp
try putting x = r * cos (theta)
y = r * sin (theta) .
equation becomes
r^3 (cos (theta) + sin (theta) ) = 2(r^2)acos(theta)sin(theta) ;

=> r(cos(theta) + sin(theta)) = 2a cos(theta)sin(theta)
=> 1/sin(theta) + 1/cos(theta) = 2a / r

if we try theta = pi/4 and r = a/sq root(2) . as the image suggests ,
the equation does seem to be satisfied
but why do we have to put x = r*cos theta?
Is it valid?
pranav_vanarp • Jan 23, 2012
of course it is valid.
in any equation you can put x = rcos theta
y = rsin theta.

the equation is of 2 variables. we are merely transforming the co-ordinate system.
https://en.wikipedia.org/wiki/List_o..._Cartesian_coordinates_from_polar_coordinates

where did you get the table in first post from. the one containing values of r and theta.
Aruwin • Jan 23, 2012
pranav_vanarp
of course it is valid.
in any equation you can put x = rcos theta
y = rsin theta.

the equation is of 2 variables. we are merely transforming the co-ordinate system.
https://en.wikipedia.org/wiki/List_o..._Cartesian_coordinates_from_polar_coordinates

where did you get the table in first post from. the one containing values of r and theta.
the teacher showed it.So,how do I plot the points??How does the graph gonna turn out?I am so lost 😔
pranav_vanarp • Jan 23, 2012
do you only want the solutions to the equation or the entire graph ?

Plotting r-theta graph will be easier than plotting x-y graph.
of course the shape will be same. Only procedure will be different.
(1/sin(theta) + 1/cos(theta)) = 2a/r .

Notice that you will have to plot r versus theta.
Vary theta from 0 to 2pi and find what values of r you get. Then mark the various points.
For ex in above equation at theta = 0 , r = 0. (i.e the point x=0 , y = 0)
at theta = pi/4 r = a/sq root(2). (i. e the point x=y= a/2 ).

You getting the drift ?
Aruwin • Jan 23, 2012
pranav_vanarp
do you only want the solutions to the equation or the entire graph ?

Plotting r-theta graph will be easier than plotting x-y graph.
of course the shape will be same. Only procedure will be different.
(1/sin(theta) + 1/cos(theta)) = 2a/r .

Notice that you will have to plot r versus theta.
Oh thank you thank you!!Well, I want the solutions only for the equation because when the equation is solved, then I can just plot r against theta.
pranav_vanarp • Jan 23, 2012
Aruwin
Oh thank you thank you!!Well, I want the solutions only for the equation because when the equation is solved, then I can just plot r against theta.
Ok. Well it is good to know how to plot equations in r and theta. It simplifies matters in some cases in some cases it does not.

Anyways this is how your plot should look for a = 1.
https://www.wolframalpha.com/input/?i=plot+(x^2+++y^2)(+x+++y)+=+2(x*y)
Aruwin • Jan 23, 2012
pranav_vanarp
Ok. Well it is good to know how to plot equations in r and theta. It simplifies matters in some cases in some cases it does not.

Anyways this is how your plot should look for a = 1.
https://www.wolframalpha.com/input/?i=plot (x^2 + y^2)( x + y) = 2(x*y)
Oh no,wait a minute.Now what do I do with a??Can I assume a=1 always?
pranav_vanarp • Jan 23, 2012
I think not. The equation needs an 'a'. That plot was just to illustrate for a = 1.

But 'a' is a constant , so you don't need to worry about it too much. You have to plot in terms of 'a'.
i.e at theta = pi/4 , r = a/sq root(2) (or x = y = a/2).
Why don't you try google graphs? It would help you plot the graph of the equation na???
Aruwin • Jan 24, 2012
pranav_vanarp
do you only want the solutions to the equation or the entire graph ?

Plotting r-theta graph will be easier than plotting x-y graph.
of course the shape will be same. Only procedure will be different.
(1/sin(theta) + 1/cos(theta)) = 2a/r .

Notice that you will have to plot r versus theta.
Vary theta from 0 to 2pi and find what values of r you get. Then mark the various points.
For ex in above equation at theta = 0 , r = 0. (i.e the point x=0 , y = 0)
at theta = pi/4 r = a/sq root(2). (i. e the point x=y= a/2 ).

You getting the drift ?
Hey, I have one doubt here. In the table graph,When theta=0,r=0 but according to the equation
(1/sin(theta) + 1/cos(theta)) = 2a/r ,isn't it supposed to be that r=2a???
Because cos(0)=1,am I right??
Same goes to when theta=pi,why is r=0 and not 2a?
Because sin(pi)=1

And can you explain to me why is when theta=3pi/4,r=+/- infinity????
How come it becomes infinity?
Hello.

Aruwin
Hey, I have one doubt here. In the table graph,When theta=0,r=0 but according to the equation
(1/sin(theta) + 1/cos(theta)) = 2a/r ,isn't it supposed to be that r=2a???
Because cos(0)=1,am I right??
You seem to be ignoring sin(theta). rewrite the said equation as
r = 2a(sin(theta)cos(theta))/(sin(theta) + cos(theta)) ----- (i)
putting theta = 0
you get
r = 2a(sin(0)cos(0)/(sin(0) + cos(0)). Similarly for theta = pi use equation (i). Earlier form of equation must have confused you. There 1/sin(0) term was present ,you missed it.

r = 2a(sin(3pi/4)cos(3pi/4))/(sin 3pi/4 + cos 3pi/4). Denominator is zero. Hence you approach infinity for r. I don't know why +/- infinity is given to you. Perhaps when you approach theta from right side of 3pi/4 you get + infinity and when approaced from left side of 3pi/4 you get -infinity (or other way around).
Aruwin • Jan 24, 2012
Deepesh Bagwale
Hello.

You seem to be ignoring sin(theta). rewrite the said equation as
r = 2a(sin(theta)cos(theta))/(sin(theta) + cos(theta)) ----- (i)
putting theta = 0
you get
r = 2a(sin(0)cos(0)/(sin(0) + cos(0)). Similarly for theta = pi use equation (i). Earlier form of equation must have confused you. There 1/sin(0) term was present ,you missed it.