Differential equation question

In summary, the problem asks for the equation of a line that intersects the y=2x+1 and y=-x lines at (h,k). First, find where these lines intersect. Next, make a linear transformation so that x=u+h and y=v+k. Finally, substitute back into the original equation and solve for u and v. 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
asdf1
734
0
For this problem, "Please solve (2x-y+1)dx+(x+y)dy=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.
 
Physics news on Phys.org
  • #2
rearrange to

[tex]2x-y+1 + (x+y)dy = 0 [/tex] and test for exactness
 
  • #3
why did you take off the dx?
 
  • #4
asdf1 said:
For this problem, "Please solve (2x-y+1)dx+(x+y)dy=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.

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
Why do you have to find the intersection?
 
  • #6
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
thank you very much! :)
 
  • #8
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. :smile:

Edit: Went over it again. Needed a negative sign in front of ArcTan.
 
Last edited:
  • #9
saltydog skipped a step in the explanation. :smile: 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)
 
Last edited:
  • #10
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
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. :smile:
 
Last edited:
  • #12
:smile:
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. :smile:

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

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 :smile: )
 
Last edited:
  • #13
wow! thanks! :)
but there's one thing I'm not too clear on...
What the difference between an affine and linear transformation?
 
  • #14
Asdf, one method of handling the solution is to convert it to polar coordinates. Wanna look at that? What will the following look like in a new coordinate system in terms of polar coordinates?

[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
I verified the solution by implicit differentiation in Mathematica and then solving for y'[x]. This is the code I used:

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}}]
 

Attachments

  • 882005.JPG
    882005.JPG
    4.9 KB · Views: 454
  • #16
just a thought~
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
closure

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.
 

Attachments

  • logspirial.JPG
    logspirial.JPG
    5.9 KB · Views: 433
  • logspiral2.JPG
    logspiral2.JPG
    6.5 KB · Views: 429
Last edited:
  • #18
wow! I missed the thought to analyze it parametrically...
I admire your patience and preserverence in analyzing this solution~
thank you very much!
interesting plot~
 
  • #19
Here's the parametric analysis for those interested.

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
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
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]

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
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
Ok fine. :biggrin: Same integrating factor, though, and you still only have to integrate w^k type things.
 
  • #24
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?
 
Last edited:
  • #25
Plug and grind. :biggrin:

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!
 
Last edited:
  • #26
P.S.

Your parametric equations:

[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]

Can be simplified: remember your trigonometry! They're equivalent to:

[tex]x(t) = A e^t \sin(\sqrt{2} t + B) - 1/3[/tex]
[tex]y(t) = A \sqrt{2} e^t \cos(\sqrt{2} t + B) + 1/3[/tex]

where [itex]A^2 = k_1^2 + k_2^2[/itex] and [itex]\tan B = k_1 / k_2[/itex].

This gives a nice way to solve for t as -B + Log(f(x, y)) where f is a linear polynomial. You ought to be able to reduce it to a nonparametric equation, but I haven't worked out the details yet.
 
Last edited:
  • #27
Ok, I'll look at your suggestions Hurkyl. Thanks.

However, continuing with the complex analysis, for:

[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]

I obtain:

[tex]
\begin{align*}
\frac{i}{\alpha(\sqrt{2}-i)} &= \frac{1}{3}+\frac{i\sqrt{2}}{3} \\
\\
-\frac{w}{\alpha(\sqrt{2}-i} &= \left(y-\frac{x}{2}-\frac{1}{2}\right)+
i\left(\frac{1}{\sqrt{8}}+\sqrt{2}x+\frac{y}{\sqrt{8}}\right) \\
\\
\frac{K}{w^{\alpha}} &= KExp\left(\frac{ln(r)}{3}+\frac{\sqrt{8}}{3}\theta\right)\left[Cos\left(\frac{\theta}{3}+\frac{\sqrt{8}}{3}ln(r)\right)-iSin\left(\frac{\theta}{3}+\frac{\sqrt{8}}{3}ln(r)\right)\right]
\end{align}
[/tex]

With:

[tex]r=\sqrt{2(x+y)^2+(1+2x-y)^2}[/tex]

[tex]\theta=ArcTan\left[\frac{1+2x-y}{x+y}\right][/tex]

It's very messy but can now be placed in a form:

[tex]f(x,y)+ig(x,y)=C[/tex]
 
  • #28
@@
my goodness~
that is one tough O.D.E!
 
  • #29
asdf1 said:
@@
my goodness~
that is one tough O.D.E!

Asdf,

All that complex stuf, maybe not necessary and don't wish to give you the impression that the ODE was complex. It wasn't really. Hurkly and I just pursued a different approach which I just left at the point I did. However, the important part is that the solution is attainable via the substitutions suggested and/or the parametric route I chose. The parametric form provides a clean means of plotting the solution and is one I'd suggest using.

However, the other one you proposed up there allows for yet another approach which also can be solved parametrically via differential operators.

I'll make some postings.
 
  • #30
Aha! I finally figured out the geometric picture I was searching for.


So, we have the equation:

[tex]
\frac{dy}{dx} = \frac{L_1(x, y)}{L_2(x, y)}
[/tex]

where the L's are linear.

The L's are computing the distance from some fixed line. (Times some constant).

dy/dx is computing the slope of the tangent line at (x, y)... or, the tangent of the angle the tangent line makes with the horizontal.


So now we can get a coordinate free picture:

"The tangent of the angle between the tangent line at (x, y) with some fixed line is proportional to the ratio of the distances from (x, y) two these other two fixed lines"

And it suggests a good way to look at the problem: after shifting coordinates so that the two fixed lines intersect at the origin, you should convert to polar coordinates!


My initial stab at the algebra suggests that the computation is straightforward, although tedious and involving the complexes.


By the way, this is a good substitution for trig integrals:

sin θ = 2t / (1 + t²)
cos θ = (1 - t²) / (1 + t²)
dθ = (2 dt) / (1 + t²)

(I think I have dθ right)
 
  • #31
Yes, you're right~
There's lots of different approaches to a question~
It's just that...
You guys are amazing!
I'd never of thought to come up with those ideas~
It makes me want to start jumping into mathematics books and brush up on my math~
 
  • #32
After homogenizing, the generic solution to the polar form looks like the product of these four terms to various powers: (if I haven't made a mistake)

(A + B tan θ + C tan² θ)
exp(arctan(D tan θ + E))
sec θ
exp(θ)

times some constant.

Sigh, not all that enlightening. :frown: Everything except the "some constant" depend on the coefficients in the original problem.
 

1. What is a differential equation?

A differential equation is a mathematical equation that describes the relationship between a function and its derivatives. It involves variables, constants, and the derivatives of the function, and is often used to model real-world phenomena in fields such as physics, engineering, and economics.

2. What are the types of differential equations?

There are several types of differential equations, including ordinary differential equations (ODEs), partial differential equations (PDEs), and stochastic differential equations (SDEs). ODEs involve a single independent variable, while PDEs involve multiple independent variables. SDEs involve random processes and are commonly used in modeling financial systems.

3. How do you solve a differential equation?

The method for solving a differential equation depends on its type and complexity. For simple ODEs, analytical methods such as separation of variables or integrating factors can be used. For more complex equations, numerical methods such as Euler's method or Runge-Kutta methods are often used. PDEs and SDEs may require specialized techniques such as finite difference or Monte Carlo methods.

4. What is the importance of differential equations in science?

Differential equations are essential in science because they allow us to mathematically model and understand complex phenomena in the natural world. They are used in fields such as physics, chemistry, biology, and economics to describe the behavior of systems and make predictions about future outcomes.

5. Can differential equations be used in real-life applications?

Yes, differential equations have many real-life applications. They are commonly used in engineering to model and design systems such as bridges, airplanes, and electrical circuits. They are also used in economics to study the behavior of markets and in biology to model population growth and disease spread. Additionally, differential equations are used in weather forecasting, image processing, and many other fields.

Similar threads

  • Differential Equations
Replies
1
Views
1K
  • Differential Equations
Replies
1
Views
1K
  • Differential Equations
Replies
2
Views
915
  • Differential Equations
Replies
3
Views
1K
Replies
7
Views
2K
  • Differential Equations
2
Replies
52
Views
514
Replies
6
Views
2K
  • Differential Equations
Replies
2
Views
1K
Replies
11
Views
417
  • Differential Equations
Replies
1
Views
1K
Back
Top