So the problem is dy/dx=-x/y. Im using Eulers method so i want to find an exact solution since one wasent given so i can compare the results.
Doing eulers method is fine, its just trying to find the exact solution so i can graph it in matlab thats giving me trouble
now i see this is separable so
dy*y=dx*-x
Intergrating i get an exact solution of
(y^2)/2 = (-x^2)/2
I leave out the constant, divide by 2 and sq rt both sides and get
y=(-x^2)^(1/2) ... 'sqrt(-x^2)'
Now i see this is complex cause we cant have negative in a square root.
So first, can anyone let me know is this the correct exact solution?
And in doing so, you make it impossible! Don't "leave out the constant". With constant C, your equation becomes
, a circle with center at the origin and radius . "Leaving out the constant" is the same as taking the constant equal to 0, reducing your graph to the single point at the origin.
In any case, Euler's method is a numerical method that requires some initial value to start it. What was the initial value given for this problem? That is what would determine the constant.divide by 2 and sq rt both sides and get
y=(-x^2)^(1/2) ... 'sqrt(-x^2)'
Now i see this is complex cause we cant have negative in a square root.
So first, can anyone let me know is this the correct exact solution?