# ODE Problem, shifting origin

1. Sep 10, 2016

### RJLiberator

1. The problem statement, all variables and given/known data
Find a particular solution to:
(3x+2y+3)dx - (x+2y-1)dy = 0, y(-2) = 1

The answer to this problem as presented in the book ODE by Tenenbaum is the following:
(2x+2y+1)(3x-2y+9)^4=-1.

2. Relevant equations
I will be shifting the origin to try to compute this problem.

3. The attempt at a solution

First:

$$\frac {dy} {dx} = -\frac {(3x+2y+3)} {(-x-2y+1)}$$

The system of lines is as follows:

$$y = -\frac {3x} {2}-\frac {3} {2}$$
$$y = -\frac {x} {2}+\frac {1} {2}$$

This system has a solution of x = -2 and y = 3/2

To shift the origin I set:

$$x = \overline{x}-2, y = \overline{y}+\frac{3} {2}$$
$$\overline{x} = x+2, \overline{y} = y-\frac{3} {2}$$

Now to start solving the problem we input the shifted values of x and y.

$$(3(\overline{x}-2)+2(\overline{y}+\frac{3} {2}) + 3)d\overline{x} + (-(\overline{x}-2)-2(\overline{y}+\frac{3} {2})+1)d\overline{y} = 0$$

This should lead (I've checked my calculations here multiple times) to:

$$(3\overline{x}+2\overline{y})d\overline{x}+(-\overline{x}-2\overline{y})d\overline{y}=0$$

Now I'm ready to solve this using methods that I had previously learned.

$$Set y=u\overline{x}, d\overline{y} = ud\overline{x}+\overline{x}du$$

$$(3\overline{x}+2u\overline{x})d\overline{x}+(-\overline{x}-2(u\overline{x}))(ud\overline{x}+\overline{x}du)=0$$

Calculating this and simplifying we get:

$$(-2u^2\overline{x}+3\overline{x}+u\overline{x})d\overline{x}+(-\overline{x}^2-2u\overline{x}^2)du = 0$$

Now, with this, I divide everything by x-bar^2. I then put it into seperable form by dividing through by (-2u^2+3+u). This becomes:

$$\frac {d\overline{x}} {\overline{x}} + \frac {(-1-2u)} {(-2u^2+3+u)} du = 0$$

A separable equation! Now I can integrate. I integrate and net :

$$log(\overline{x}) + \frac {1} {5}(4log(3-2u)+log(u+1)) + c$$

I try to manipulate the solution to appear closer to the given solution as presented in the book. So I multiply by e throughout the entire solution. I then raise everything to the 5th power.

$$\overline{x}^5 + (3-2u)^4(u+1) = 0$$
We recall that $$u=\frac {\overline{y}} {\overline{x}}$$

plugging in this, and then also plugging in the values for x-bar and y-bar i net:

$$(x+2)^5+(3-\frac{2y-3} {x+2})^4(\frac{y-\frac{3} {2}} {x+2} +1) = C$$

Well, this is bad. Using the initial condition y(-2)=1 if we let x = -2 we get a fraction with 0 in the denominator.

What have I done wrong? :/

2. Sep 10, 2016

### Ray Vickson

If $\hat{y} = u \hat{x}$ does not work, try instead $\hat{x} = u \hat{y}$.

Basically, a point on the $\hat{y}$-axis cannot be described as lying on a line $\hat{y} = u \hat{x}$ with finite $u$, but it does lie on a line $\hat{x} = u \hat{y}$ with finite $u$.

Last edited: Sep 10, 2016
3. Sep 10, 2016

### RJLiberator

Hi Ray, I appreciate the comment!

I'm at work right now, but I worked it out the way you suggested:

$$\overline{x} = u\overline{y}$$ and $$d\overline{x} = ud\overline{y}+\overline{y}du$$

After plugging it all into the equation and simplifying I get a seperable expression of the following:

$$\frac{1} {y}d\overline{y} + \frac{3u+2} {3u^2+u-2}du = 0$$

While this looks good, plugging in the integral into symbolab gives me a very, very long expression. here

This leads me to believe that this way is not working properly either. Admittedly, I did not bother plugging back in everything as that would be quite the task with that integral solution.

4. Sep 10, 2016

### Ray Vickson

I clicked on the link you provided to see what symbolab gives, and I am not convinced it is correct. Maple gets a pretty simple result:
$$\int \frac{3u+2}{3u^2+u-2} \, du = \frac{1}{5} \ln(u+1) +\frac{4}{5} \ln(3u-2)$$
You can check that this is correct by taking the derivative. Can you check the symbolab result like that? Also: Instead of using symbolab, why not try Wolfram Alpha?

BTW: the integration can be done easily manually, because the denominator factors as $(u+1)(3u-2)$, so the integrand can be written in partial fractions.

Last edited: Sep 10, 2016
5. Sep 11, 2016

### RJLiberator

You are absolutely right.

I did the integration manually using partial fraction expansion and that made it a reasonable integral.

I was able to simplify it to:

$$(y-\frac{3} {2})^5+(\frac{x+2} {y-\frac{3} {2}}) + (\frac{3x+6} {y-\frac{3} {2}} -2)^4 = C$$

So, it's an answer. I feel like I made no mistakes throughout the calculation. I am 'happy' with this answer. But I'm not sure if i can manipulate it to look like the given answer from the book.

Last edited: Sep 11, 2016
6. Sep 11, 2016

### Ray Vickson

You seem to have written that $\ln(A) + \ln(B) + \ln(C) = k$ implies $A + B + C = k'$, but that is false: it should be $A B C = k'$ (product, not sum).

7. Sep 11, 2016

### RJLiberator

YESSSSSSSSSSSSSSSSS.

What a mistake and what a way to wake up to the morning! Problem Solved. My mistakes... noted.

Kind regards.