- #1

- 734

- 0

My guess is that you have to make a linear transformation first to simplify the equation. However, I don't know how to make a linear transformation.

You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Thread starter asdf1
- Start date

- #1

- 734

- 0

My guess is that you have to make a linear transformation first to simplify the equation. However, I don't know how to make a linear transformation.

- #2

GCT

Science Advisor

Homework Helper

- 1,728

- 0

rearrange to

[tex]2x-y+1 + (x+y)dy = 0 [/tex] and test for exactness

[tex]2x-y+1 + (x+y)dy = 0 [/tex] and test for exactness

- #3

- 734

- 0

why did you take off the dx?

- #4

saltydog

Science Advisor

Homework Helper

- 1,590

- 3

asdf1 said:

My guess is that you have to make a linear transformation first to simplify the equation. However, I don't know how to make a linear transformation.

First find out where the two lines:

y=2x+1

y=-x

intersect, say (h,k)

Then make the transformation:

x=u+h

y=v+k

Then substitute back into the ODE and solve in terms of u and v which should be homogeneous now.

- #5

- 734

- 0

Why do you have to find the intersection?

- #6

saltydog

Science Advisor

Homework Helper

- 1,590

- 3

asdf1 said:Why do you have to find the intersection?

Our objective is to remove the constant terms in both differential expressions so that we can obtain a homogeneous equation of order one. The simplest way to do that is to "translate the axes". Like if you had a linear equation: y(x)=4x+1 and you wanted to remove the 1. You could do that by translating the axes to the point (-1/4,0). That is, let v=y and u=x+1/4.

Substituting, we get: v=4(u-1/4)+1 or v=4u.

Same dif with the ODE above: If we have the expression:

[tex](a_1x+b_1y+c_1)dx+(a_2x+b_2y+c_2)dy=0[/tex]

and we consider the lines:

[tex]a_1x+b_1y+c_1=0[/tex]

[tex]a_2x+b_2y+c_2=0[/tex]

And find their intersection (h,k), then the translation:

[tex]x=u+h[/tex]

[tex]y=v+k[/tex]

will remove the constant terms and result in equations of the form:

[tex]a_1u+b_1v=0[/tex]

[tex]a_2u+b_2v=0[/tex]

How about a plot? Just use any old initial conditions that work.

- #7

- 734

- 0

thank you very much! :)

- #8

saltydog

Science Advisor

Homework Helper

- 1,590

- 3

You know, this isn't an easy equation to analyze.

In terms of u and v I get so far:

[tex]\sqrt{2}ln\left[\sqrt{2u^2+v^2}\right]=-ArcTan\left(\frac{v}{u\sqrt{2}}\right)+k[/tex]

Now I don't know how other people are, but that's just not good enough for me. Subsittuting x and y only make's it worst. I mean, what do you do with it in order to extract meaningful data from it? Well, turns out there's lots you can do with it.

The ODE is an example of the quintessential model of non-linear dynamics:

[tex]\frac{dy}{dx}=\frac{Ax+By}{Cx+Dy}[/tex]

Solutions, depending on the coefficients, fall into several classes which exhibit typical non-linear behavior.

A thorough analysis of that behavior along with the behavior of this one:

[tex]\frac{dy}{dx}=c+ky-y^3[/tex]

allows one, I think, to begin to obtain a unique perspective into the workings of nature since our world is massively non-linear.

Edit: Went over it again. Needed a negative sign in front of ArcTan.

In terms of u and v I get so far:

[tex]\sqrt{2}ln\left[\sqrt{2u^2+v^2}\right]=-ArcTan\left(\frac{v}{u\sqrt{2}}\right)+k[/tex]

Now I don't know how other people are, but that's just not good enough for me. Subsittuting x and y only make's it worst. I mean, what do you do with it in order to extract meaningful data from it? Well, turns out there's lots you can do with it.

The ODE is an example of the quintessential model of non-linear dynamics:

[tex]\frac{dy}{dx}=\frac{Ax+By}{Cx+Dy}[/tex]

Solutions, depending on the coefficients, fall into several classes which exhibit typical non-linear behavior.

A thorough analysis of that behavior along with the behavior of this one:

[tex]\frac{dy}{dx}=c+ky-y^3[/tex]

allows one, I think, to begin to obtain a unique perspective into the workings of nature since our world is massively non-linear.

Edit: Went over it again. Needed a negative sign in front of ArcTan.

Last edited:

- #9

Hurkyl

Staff Emeritus

Science Advisor

Gold Member

- 14,950

- 19

saltydog skipped a step in the explanation. He jumped past "make a linear transformation" straight to figuring out what kind of linear transformation he wants to make.

A linear transformation is a transformation that looks like:

[tex](p, q) \rightarrow (a_1 p + b_1 q, a_2 p + b_2 q)[/tex]

What you probably really wanted to do is to make an affine transformation (and what saltydog did was an affine transformation, not a linear one):

[tex](p, q) \rightarrow (a_1 p + b_1 q + c_1, a_2 p + b_2 q + c_2)[/tex]

So what you want to do is to define new variables, (u, v), by call the pre-transformed coordinates (x, y) and the post-transformed coordinates (u, v).

In other words, define

[tex](u, v) := (a_1 x + b_1 y + c_1, a_2 x + b_2 y + c_2)[/tex]

Then, once you've made the substitution, you can try and figure out what values for the coefficients would yield an equation you know how to solve.

Personally, I'd've done a different transformation: I would have aimed to eliminate the v dv term so that I could turn it into an ordinary first order differential equation. (with complex coefficients)

A linear transformation is a transformation that looks like:

[tex](p, q) \rightarrow (a_1 p + b_1 q, a_2 p + b_2 q)[/tex]

What you probably really wanted to do is to make an affine transformation (and what saltydog did was an affine transformation, not a linear one):

[tex](p, q) \rightarrow (a_1 p + b_1 q + c_1, a_2 p + b_2 q + c_2)[/tex]

So what you want to do is to define new variables, (u, v), by call the pre-transformed coordinates (x, y) and the post-transformed coordinates (u, v).

In other words, define

[tex](u, v) := (a_1 x + b_1 y + c_1, a_2 x + b_2 y + c_2)[/tex]

Then, once you've made the substitution, you can try and figure out what values for the coefficients would yield an equation you know how to solve.

Personally, I'd've done a different transformation: I would have aimed to eliminate the v dv term so that I could turn it into an ordinary first order differential equation. (with complex coefficients)

Last edited:

- #10

saltydog

Science Advisor

Homework Helper

- 1,590

- 3

Hurkyl said:Personally, I'd've done a different transformation: I would have aimed to eliminate the v dv term so that I could turn it into an ordinary first order differential equation. (with complex coefficients)

Do you mean from this equation:

[tex](2u-v)du+(u+v)dv=0[/tex]

Could you please explain how or at least give more information regarding this technique?

- #11

Hurkyl

Staff Emeritus

Science Advisor

Gold Member

- 14,950

- 19

Starting with

(2x - y + 1) dx + (x + y) dy = 0

I make the change of variable:

x = a1 u + b1 v

y = a2 u + b2 v

giving me:

(e1 u + e2 v + e3) du + (f1 u + f2 v + f3) dv = 0

In particular, I compute:

[tex]f_2 = 2 b_1^2 + b_2^2[/tex]

So, if I set b1 and b2 so that f2 = 0, then I've eliminated the v dv term.

It seemed the simplest substitution would be:

x = iv

y = u + √2 v

Which yields, after rearrangement (if I've made no errors):

[tex]

\frac{dv}{du} + \frac{\sqrt{2} + i}{i + (\sqrt{2} - i) u} v

= \frac{-u}{i + (\sqrt{2} - i) u}

[/tex]

Which one can solve with standard methods. The trick is getting a real answer for x and y at the end, but I expect to be able to do so, even if it involves trying put logarithms together to form inverse trig functions.

P.S. I make no claim my approach is better, just that I expect I can do it.

(2x - y + 1) dx + (x + y) dy = 0

I make the change of variable:

x = a1 u + b1 v

y = a2 u + b2 v

giving me:

(e1 u + e2 v + e3) du + (f1 u + f2 v + f3) dv = 0

In particular, I compute:

[tex]f_2 = 2 b_1^2 + b_2^2[/tex]

So, if I set b1 and b2 so that f2 = 0, then I've eliminated the v dv term.

It seemed the simplest substitution would be:

x = iv

y = u + √2 v

Which yields, after rearrangement (if I've made no errors):

[tex]

\frac{dv}{du} + \frac{\sqrt{2} + i}{i + (\sqrt{2} - i) u} v

= \frac{-u}{i + (\sqrt{2} - i) u}

[/tex]

Which one can solve with standard methods. The trick is getting a real answer for x and y at the end, but I expect to be able to do so, even if it involves trying put logarithms together to form inverse trig functions.

P.S. I make no claim my approach is better, just that I expect I can do it.

Last edited:

- #12

saltydog

Science Advisor

Homework Helper

- 1,590

- 3

Hurkyl said:Starting with

(2x - y + 1) dx + (x + y) dy = 0

I make the change of variable:

x = a1 u + b1 v

y = a2 u + b2 v

giving me:

(e1 u + e2 v + e3) du + (f1 u + f2 v + f3) dv = 0

In particular, I compute:

[tex]f_2 = 2 b_1^2 + b_2^2[/tex]

So, if I set b1 and b2 so that f2 = 0, then I've eliminated the v dv term.

It seemed the simplest substitution would be:

x = iv

y = u + √2 v

Which yields, after rearrangement (if I've made no errors):

[tex]

\frac{dv}{du} + \frac{\sqrt{2} + i}{i + (\sqrt{2} - i) u} v

= \frac{-u}{i + (\sqrt{2} - i) u}

[/tex]

Which one can solve with standard methods. The trick is getting a real answer for x and y at the end, but I expect to be able to do so, even if it involves trying put logarithms together to form inverse trig functions.

P.S. I make no claim my approach is better, just that I expect I can do it.

Ok Hurkyl. That's very interesting. I'll work with it.

Edit: Ok, I got the same ODE in v and u as you did with your substitutions so I go on from there (not that I don't trust you or nothing, you know what I mean )

Last edited:

- #13

- 734

- 0

but there's one thing I'm not too clear on...

What the difference between an affine and linear transformation?

- #14

saltydog

Science Advisor

Homework Helper

- 1,590

- 3

[tex]\sqrt{2}ln\left[\sqrt{2u^2+v^2}\right]=-ArcTan\left(\frac{v}{u\sqrt{2}}\right)+k[/tex]

You know, convert to polar coordinates, take the exponential, end up with something like:

[tex]\rho(\theta)=Ke^{f(\theta)}[/tex]

But that will be in a coordinate system different than x and y. What to do to get the plot in terms of x and y?

- #15

saltydog

Science Advisor

Homework Helper

- 1,590

- 3

I verified the solution by implicit differentiation in Mathematica and then solving for y'[x]. This is the code I used:

Mathematica returns the RHS of the ODE so I have some confidence the solution is correct. Also the results agree with numerical results in a valid region (no vertical slopes).

However, I'm just disappointed that I know of no other way to plot it then the brute-force approach below which just checks every point in the x-y plane that fits the equation using a value of k determined by the IVP: y(0)=1. A plot is attached.

If someone knows of a better way (I'm still looking at Hurkyl's approach but get stuck when evaluating the last integration), please let me know.

Code:

```
Simplify[Solve[Simplify[
[tex]\qquad D[\sqrt{2}ln\left[\sqrt{2(x+1/3)^2+(y[x]-1/3)^2}\right]== -ArcTan\left[\frac{y[x]-1/3}{\sqrt{2}(x+1/3)}\right]+k,x]],y'[x]]][/tex]
```

Mathematica returns the RHS of the ODE so I have some confidence the solution is correct. Also the results agree with numerical results in a valid region (no vertical slopes).

However, I'm just disappointed that I know of no other way to plot it then the brute-force approach below which just checks every point in the x-y plane that fits the equation using a value of k determined by the IVP: y(0)=1. A plot is attached.

If someone knows of a better way (I'm still looking at Hurkyl's approach but get stuck when evaluating the last integration), please let me know.

Code:

```
plotlist1 = Table[{0, 0}, {50000}];
index = 0;
For[x = -5, x <= 5, x += 0.01;
For[y = -5, y <= 5, y += 0.01,
[tex]\quad ytest=\sqrt{2}ln\left[\sqrt{2(x+1/3)^2+(y[x]-1/3)^2}\right]+ArcTan\left[\frac{y[x]-1/3}{\sqrt{2}(x+1/3)}\right][/tex]
If[Abs[ytest - k] <= 0.01,
index++;
plotlist1[[index]] = {x, y};
];
];
];
plotlist = Take[plotlist1, index];
lp1 = ListPlot[plotlist1, PlotRange -> {{-6, 6}, {-6, 6}}]
```

- #16

- 734

- 0

i think that maybe in this case, it looks like it'll be harder if you convert it to polar coordinates... because aren't usually polar coordinates used when you see "x^2+y^2" or something similar? otherwise it'd probably get more complicated~

- #17

saltydog

Science Advisor

Homework Helper

- 1,590

- 3

Hello Asdf,

I've made progress with this. You're right, polar coordinates is not the way to go. I analyzed it parametrically. In summary, for the IVP:

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

The solution in parametric form is:

[tex]x(t)=k_1 e^t Cos[\sqrt{2}t]+k_2e^t Sin[\sqrt{2}t]-1/3[/tex]

[tex]y(t)=k_1e^t\left(-\sqrt{2}Sin(\sqrt{2}t)\right)+k_2e^t\left(\sqrt{2}Cos(\sqrt{2}t)\right)+1/3[/tex]

with:

[tex]k_1=\frac{1}{3}[/tex]

[tex]k_2=\frac{2}{3\sqrt{2}}[/tex]

A plot is attached. It's a logarithmic spiral. Rock and roll.

Edit: The second plot exhibits the vertical slope when x=-y as per the ODE.

Last edited:

- #18

- 734

- 0

I admire your patience and preserverence in analyzing this solution~

thank you very much!

interesting plot~

- #19

saltydog

Science Advisor

Homework Helper

- 1,590

- 3

For:

[tex](2x-y+1)dx+(x+y)dy=0,\quad y(0)=1[/tex]

Letting:

[tex]x=u-1/3[/tex]

[tex]y=v+1/3[/tex]

We obtain:

[tex](2u-v)du+(u+v)dv=0,\quad v(1/3)=2/3[/tex]

or:

[tex]\frac{dv}{du}=\frac{v-2u}{u+v}[/tex]

Now, this is the same as:

[tex]\frac{\frac{dv}{dt}}{\frac{du}{dt}}=\frac{v-2u}{v+u}[/tex]

or the system:

[tex]\frac{dv}{dt}=v-2u,\quad v(0)=2/3[/tex]

[tex]\frac{du}{dt}=v+u,\quad u(0)=1/3[/tex]

The eigenvalues for which are complex:

[tex]\lambda_i=1\pm\sqrt{2}i[/tex]

Choosing the positive one and calculating an eigenvector, we obtain for the solution:

[tex]\left(\begin{array}{c} v \\

u

\end{array}\right)=e^{(1+\sqrt{2}i)t}

\left(\begin{array}{c} \sqrt{2}i \\

1

\end{array}\right)

[/tex]

Solving using Euler's formula and separating into real and imaginary parts we have for the solution:

[tex]\left(\begin{array}{c} v \\

u

\end{array}\right)=k_1e^t

\left(\begin{array}{c} -\sqrt{2}Sin[\sqrt{2}t] \\

Cos[\sqrt{2}t]

\end{array}\right)+k_2e^t

\left(\begin{array}{c} \sqrt{2}Cos[\sqrt{2}t] \\

Sin[\sqrt{2}t]

\end{array}\right)

[/tex]

or:

[tex] x(t)=u(t)-1/3[/tex]

[tex]y(t)=v(t)+1/3[/tex]

- #20

- 355

- 0

GCT said:rearrange to

[tex]2x-y+1 + (x+y)dy = 0 [/tex] and test for exactness

It's clearly not exact and i its i.f. is function is of both x & y,

Salty's way i think is the only way to do it!

- #21

Hurkyl

Staff Emeritus

Science Advisor

Gold Member

- 14,950

- 19

[tex]

\frac{dv}{du} + \frac{\sqrt{2} + i}{i + (\sqrt{2} - i) u} v

= \frac{-u}{i + (\sqrt{2} - i) u}

[/tex]

To keep the notation simpler, I'll make the substitutions [itex]w = i + (\sqrt{2} - i) u[/itex] and [itex]\alpha = (\sqrt{2} + i) / (\sqrt{2} - i)[/itex], yielding:

[tex]

\frac{dv}{dw} + \frac{\alpha}{w} v = \frac{i}{(\sqrt{2} - i) w} - \frac{1}{\sqrt{2} - 1}

[/tex]

The integrating factor is [itex]w^\alpha[/itex], giving:

[tex]

\frac{d}{dw} \left(w^\alpha v \right)

= \frac{i}{\sqrt{2} - i} w^{\alpha - 1} - \frac{1}{\sqrt{2} - 1} w^{\alpha}

[/tex]

and the R.H.S. is easy to integrate. Doing so, and dividing by [itex]w^\alpha[/itex] gives, if I've done everything correctly:

[tex]

v = \frac{1 + \sqrt{2} i}{3} - \frac{1}{2\sqrt{2}}w + C w^{-\alpha}

[/tex]

- #22

saltydog

Science Advisor

Homework Helper

- 1,590

- 3

Hurkyl said:Hrm, the last integration seems easy to me...

[tex]

\frac{dv}{du} + \frac{\sqrt{2} + i}{i + (\sqrt{2} - i) u} v

= \frac{-u}{i + (\sqrt{2} - i) u}

[/tex]

To keep the notation simpler, I'll make the substitutions [itex]w = i + (\sqrt{2} - i) u[/itex] and [itex]\alpha = (\sqrt{2} + i) / (\sqrt{2} - i)[/itex], yielding:

[tex]

\frac{dv}{dw} + \frac{\alpha}{w} v = \frac{i}{(\sqrt{2} - i) w} - \frac{1}{\sqrt{2} - 1}

[/tex]

Hurkyl, I've gone over it 3 times and do not get the same result for the first step as you. This is my work:

Letting:

[tex]w=i+(\sqrt{2}-i)u[/tex]

Then:

[tex]u=\frac{w-i}{\sqrt{2}-i}[/tex]

So that:

[tex]\frac{dv}{dw}=\frac{dv}{du}\frac{du}{dw}=\frac{dv}{du}\frac{1}{\sqrt{2}-i}[/tex]

Substituting into the ODE:

[tex](\sqrt{2}-i)\frac{dv}{dw}+\frac{(\sqrt{2}+i)v}{w}=\frac{i-w}{\sqrt{2}-i}\left(\frac{1}{w}\right)[/tex]

Letting alpha be as you suggest leaves:

[tex]\frac{dv}{dw}+\frac{\alpha}{w}v=\frac{i-w}{w(\sqrt{2}-i)(\sqrt{2}-i)}[/tex]

Simplifying:

[tex]\frac{dv}{dw}+\frac{\alpha}{w}v=\frac{i}{w(1-2\sqrt{2}i)}-\frac{1}{1-2\sqrt{2}i}[/tex]

- #23

Hurkyl

Staff Emeritus

Science Advisor

Gold Member

- 14,950

- 19

Ok fine. Same integrating factor, though, and you still only have to integrate w^k type things.

- #24

saltydog

Science Advisor

Homework Helper

- 1,590

- 3

I have a question about the complex solution:

So from above we have:

[tex]\frac{dv}{dw}+\frac{\alpha}{w}v=\frac{i}{w(1-2\sqrt{2}i)}-\frac{1}{1-2\sqrt{2}i}[/tex]

Solving this I obtain:

[tex]v=\frac{i}{\alpha(\sqrt{2}-i)}-\frac{w}{\sqrt{2}(\alpha+1)}+\frac{K}{w^{\alpha}}[/tex]

with:

[tex]v=\frac{x}{i},\quad w=i+(\sqrt{2}-i)u,\quad u=y-\frac{\sqrt{2}x}{i},\quad \alpha=\frac{\sqrt{2}+i}{\sqrt{2}-i}[/tex]

Now, I can get this into the form:

[tex]f(x,y)+g(x,y)i=C[/tex]

However, unlike linear differential equations, as I understand it, neither f(x,y) nor g(x,y) separately are solutions to the differential equation. So how would we get a real solution out of this solution?

Edit: Well wait, it is a linear equation in v and w but both v and w are complex variables as per above. Know what, I think a linear combination of f and g would work.

Any comments anyone?

So from above we have:

[tex]\frac{dv}{dw}+\frac{\alpha}{w}v=\frac{i}{w(1-2\sqrt{2}i)}-\frac{1}{1-2\sqrt{2}i}[/tex]

Solving this I obtain:

[tex]v=\frac{i}{\alpha(\sqrt{2}-i)}-\frac{w}{\sqrt{2}(\alpha+1)}+\frac{K}{w^{\alpha}}[/tex]

with:

[tex]v=\frac{x}{i},\quad w=i+(\sqrt{2}-i)u,\quad u=y-\frac{\sqrt{2}x}{i},\quad \alpha=\frac{\sqrt{2}+i}{\sqrt{2}-i}[/tex]

Now, I can get this into the form:

[tex]f(x,y)+g(x,y)i=C[/tex]

However, unlike linear differential equations, as I understand it, neither f(x,y) nor g(x,y) separately are solutions to the differential equation. So how would we get a real solution out of this solution?

Edit: Well wait, it is a linear equation in v and w but both v and w are complex variables as per above. Know what, I think a linear combination of f and g would work.

Any comments anyone?

Last edited:

- #25

Hurkyl

Staff Emeritus

Science Advisor

Gold Member

- 14,950

- 19

Plug and grind.

This does bother me, though. We've determined that the base solution for*v* is affine in *w*. However, we know that *(v, w)* is affine in *(x, y)*, so that the base solution for *y* would be affine in *x*.

So, we can simply start from there, and make the conjecture that*y = mx + b*.

Plugging back into the original equation:

(2x - y + 1) + (x + y) y' = 0

2x - mx - b + 1 + (x + mx + b) m = 0

(2 - m + m + m²) x + (-b + 1 + bm) = 0

m² = -2 and b = 1 / (1 - m)

<m, b> = <i√2, (1 + i√2) / 3>

Giving:

y = (i √2)x + (1 + i√2) / 3

And the conjugate solution as well. (using the other square root of 2)

I must say that this rather distrubs me!

This does bother me, though. We've determined that the base solution for

So, we can simply start from there, and make the conjecture that

Plugging back into the original equation:

(2x - y + 1) + (x + y) y' = 0

2x - mx - b + 1 + (x + mx + b) m = 0

(2 - m + m + m²) x + (-b + 1 + bm) = 0

m² = -2 and b = 1 / (1 - m)

<m, b> = <i√2, (1 + i√2) / 3>

Giving:

y = (i √2)x + (1 + i√2) / 3

And the conjugate solution as well. (using the other square root of 2)

I must say that this rather distrubs me!

Last edited:

Share: