Shifting Origin Method for Solving ODEs

  • Thread starter Thread starter RJLiberator
  • Start date Start date
  • Tags Tags
    Ode Origin
Click For Summary
The discussion revolves around solving a particular ordinary differential equation (ODE) using a method of shifting the origin. The initial attempt involved transforming the variables and simplifying the equation, leading to a separable form. However, complications arose when applying the initial condition, resulting in a division by zero. After further suggestions, the user successfully reworked the problem using a different substitution, leading to a reasonable integral that was simplified correctly. Ultimately, the user expressed satisfaction with the new solution, acknowledging previous mistakes in their calculations.
RJLiberator
Gold Member
Messages
1,094
Reaction score
63

Homework Statement


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.

Homework Equations


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

The Attempt at a Solution



First:

<br /> \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? :/
 
Physics news on Phys.org
RJLiberator said:

Homework Statement


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.

Homework Equations


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

The Attempt at a Solution



First:

<br /> \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? :/

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:
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.
 
RJLiberator said:
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.

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:
  • Like
Likes 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:
RJLiberator said:
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.

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).
 
  • Like
Likes RJLiberator
YESSSSSSSSSSSSSSSSS.

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

Kind regards.
 

Similar threads

  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 15 ·
Replies
15
Views
2K
Replies
5
Views
2K
Replies
2
Views
1K
  • · Replies 8 ·
Replies
8
Views
800
Replies
6
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K