Shifting Origin Method for Solving ODEs

  • Thread starter Thread starter RJLiberator
  • Start date Start date
  • Tags Tags
    Ode Origin
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
6 replies · 2K views
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:

[tex] \frac {dy} {dx} = -\frac {(3x+2y+3)} {(-x-2y+1)}[/tex]

The system of lines is as follows:

[tex]y = -\frac {3x} {2}-\frac {3} {2}[/tex]
[tex]y = -\frac {x} {2}+\frac {1} {2}[/tex]

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

To shift the origin I set:

[tex]x = \overline{x}-2, y = \overline{y}+\frac{3} {2}[/tex]
[tex]\overline{x} = x+2, \overline{y} = y-\frac{3} {2}[/tex]

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

[tex](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[/tex]

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

[tex](3\overline{x}+2\overline{y})d\overline{x}+(-\overline{x}-2\overline{y})d\overline{y}=0[/tex]

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

[tex]Set y=u\overline{x}, d\overline{y} = ud\overline{x}+\overline{x}du[/tex]

[tex](3\overline{x}+2u\overline{x})d\overline{x}+(-\overline{x}-2(u\overline{x}))(ud\overline{x}+\overline{x}du)=0[/tex]

Calculating this and simplifying we get:

[tex](-2u^2\overline{x}+3\overline{x}+u\overline{x})d\overline{x}+(-\overline{x}^2-2u\overline{x}^2)du = 0[/tex]

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:

[tex]\frac {d\overline{x}} {\overline{x}} + \frac {(-1-2u)} {(-2u^2+3+u)} du = 0[/tex]

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

[tex]log(\overline{x}) + \frac {1} {5}(4log(3-2u)+log(u+1)) + c[/tex]

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.

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

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

[tex](x+2)^5+(3-\frac{2y-3} {x+2})^4(\frac{y-\frac{3} {2}} {x+2} +1) = C[/tex]

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:

[tex] \frac {dy} {dx} = -\frac {(3x+2y+3)} {(-x-2y+1)}[/tex]

The system of lines is as follows:

[tex]y = -\frac {3x} {2}-\frac {3} {2}[/tex]
[tex]y = -\frac {x} {2}+\frac {1} {2}[/tex]

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

To shift the origin I set:

[tex]x = \overline{x}-2, y = \overline{y}+\frac{3} {2}[/tex]
[tex]\overline{x} = x+2, \overline{y} = y-\frac{3} {2}[/tex]

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

[tex](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[/tex]

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

[tex](3\overline{x}+2\overline{y})d\overline{x}+(-\overline{x}-2\overline{y})d\overline{y}=0[/tex]

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

[tex]Set y=u\overline{x}, d\overline{y} = ud\overline{x}+\overline{x}du[/tex]

[tex](3\overline{x}+2u\overline{x})d\overline{x}+(-\overline{x}-2(u\overline{x}))(ud\overline{x}+\overline{x}du)=0[/tex]

Calculating this and simplifying we get:

[tex](-2u^2\overline{x}+3\overline{x}+u\overline{x})d\overline{x}+(-\overline{x}^2-2u\overline{x}^2)du = 0[/tex]

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:

[tex]\frac {d\overline{x}} {\overline{x}} + \frac {(-1-2u)} {(-2u^2+3+u)} du = 0[/tex]

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

[tex]log(\overline{x}) + \frac {1} {5}(4log(3-2u)+log(u+1)) + c[/tex]

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.

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

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

[tex](x+2)^5+(3-\frac{2y-3} {x+2})^4(\frac{y-\frac{3} {2}} {x+2} +1) = C[/tex]

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:

[tex]\overline{x} = u\overline{y}[/tex] and [tex]d\overline{x} = ud\overline{y}+\overline{y}du[/tex]

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

[tex]\frac{1} {y}d\overline{y} + \frac{3u+2} {3u^2+u-2}du = 0[/tex]

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:

[tex]\overline{x} = u\overline{y}[/tex] and [tex]d\overline{x} = ud\overline{y}+\overline{y}du[/tex]

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

[tex]\frac{1} {y}d\overline{y} + \frac{3u+2} {3u^2+u-2}du = 0[/tex]

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   Reactions: 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:

[tex](y-\frac{3} {2})^5+(\frac{x+2} {y-\frac{3} {2}}) + (\frac{3x+6} {y-\frac{3} {2}} -2)^4 = C[/tex]

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:

[tex](y-\frac{3} {2})^5+(\frac{x+2} {y-\frac{3} {2}}) + (\frac{3x+6} {y-\frac{3} {2}} -2)^4 = C[/tex]

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   Reactions: RJLiberator
YESSSSSSSSSSSSSSSSS.

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

Kind regards.