# Thread: Finding exact solution and using Eulers Method

1. ## Finding exact solution and using Eulers Method

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?

2. ## Re: Finding exact solution and using Eulers Method

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?
For starters, why would you leave out the constant? The constant is important. And what makes you think C - x^2 is negative?

3. ## Re: Finding exact solution and using Eulers Method

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,
And in doing so, you make it impossible! Don't "leave out the constant". With constant C, your equation becomes
$\displaystyle x^2+ y^2= C$, a circle with center at the origin and radius $\displaystyle \sqrt{C}$. "Leaving out the constant" is the same as taking the constant equal to 0, reducing your graph to the single point at the origin.

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?
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.