Solving the Differential Equation: A Step-by-Step Guide

In summary, the conversation discusses methods for solving a second order nonlinear homogeneous differential equation with a substitution technique. The resulting equation is then converted to a first order exact equation, which can be solved using integrating factors. The solution for y' is given in terms of an integral, which can be approximated numerically. Another method of solving the equation without using the exact differential equation solution is also discussed.
  • #1
maphysique
3
0
Could anyone teach how to solve the following differential equation?

[tex]\frac{d^2 y}{dx^2}+2\left(\frac{dy}{dx}\right)^2+y=0[/tex]
 
Last edited:
Physics news on Phys.org
  • #2
Well this is a 2nd order nonlinear homogeneous differential equation. Its tougher because the y' is of 2nd power.
 
Last edited:
  • #3
Make the substitution [tex] v = \frac{dy}{dx}[/tex] so that [tex]v \frac{dv}{dy} = \frac{d^2y}{dx^2}[/tex]. This results in a first-order ODE (where y is now the indep. variable). Solve this DE for [itex]v(y)[/itex], then sub back in [itex]\frac{dy}{dx}[/itex] for [itex]v[/itex] to get a first-order DE for [itex]y(x)[/itex] and solve (I don't have time to do it right now, so it may not be very pretty).

The reason that this method works in this case is that [itex]x[/itex] does not appear explicitly in the DE.
 
  • #4
How are you going to solve it if its v^2 ?
 
  • #5
[tex] \frac{d^2y}{dx^2} + 2\left(\frac{dy}{dx}\right)^2 + y = 0 \Longrightarrow
v\frac{dv}{dy} + 2v^2 + y = 0[/tex]

which is an inexact DE, ie. it is in the form [tex] P(y, \ v) + Q( y, \ v)v^\prime = 0[/tex] with [tex] \frac{\partial P}{\partial v} \neq \frac{\partial Q}{\partial y}[/tex]. We look for an integrating factor [itex]I(y)[/itex] such that

[tex] \ln{I(y)} = \int \frac{P_v -Q_y}{Q} dy[/tex]

In this case, [tex]Q(y, \ v) = v[/tex] and [tex]P(y, \ v) = 2v^2 + y[/tex] so

[tex] \ln{I(y)} = \int \frac{ 4v - 0 }{v} dy = \int 4 dy \Longrightarrow I(y) = e^{4y}[/tex]

note that not including a constant of integration makes no difference for our purposes. From the above, we know that

[tex]e^{4y}(2v^2 + y) + e^{4y}v\frac{dv}{dy} = 0[/tex]

is an exact equation.

Then you need to know how to solve exact equations, but that's not hard~

Note that I skipped a bunch of steps on the theory of inexact first-order ODEs (as in, why did I look for an integrating factor that way?), but you can look those up or just ask and I can post them~
 
Last edited:
  • #6
Come on guys. I'd like to see this to completion. Maphysique, can you solve the exact equation in v, and get an expression in terms of F(y,v)=c? I end up with an expression for y' that I cannot integrate (a radical). Don't want to interfere with Data helping you though.
 
  • #7
Getting an expression for y' that you cannot integrate is fairly typical of problems like this. In general, solutions to non-linear equations cannot be written in terms of elementary functions. Do you have reason to think that this one can be?
 
  • #8
Yeah, the resulting integral for y is not nice at all. But at least he has it down to an integral, which is perfectly sufficient for approximating a solution :).
 
  • #9
Data said:
Yeah, the resulting integral for y is not nice at all. But at least he has it down to an integral, which is perfectly sufficient for approximating a solution :).

Thanks Data. When I first saw the problem, I didn't think to solve it that way. Just in case you guys don't feel like typing it all in, I'll do the next part. Perhaps Maphysique will follow it through:

I'll write the exact equation as follows:

[tex][e^{4y}(2v^2 + y]dy + [e^{4y}v]dv = 0[/tex]

"Exact" means its a total differential of some function F(y,v), that is:

[tex]dF=[e^{4y}(2v^2 + y]dy + [e^{4y}v]dv[/tex]

Then surely:

[tex]\frac{\partial F}{\partial y}=[e^{4y}(2v^2 + y][/tex]

and:

[tex]\frac{\partial F}{\partial v}=[e^{4y}v][/tex]

To find F(y,v), let's integrate the partial with respect to y:

[tex]\int{\frac{\partial F}{\partial y}=\int{[e^{4y}(2v^2 + y]}dy[/tex]

And thus:

[tex]F(y,v)=\frac{1}{2}v^2e^{4y}+\frac{1}{4}ye^{4y}-\frac{1}{16}e^{4y}+T(v)[/tex]

Where integrating the partial with respect to y necessarilly yields some arbitrary function of v, T(v).

Differentiating F(y,v) with respect to v now yields:

[tex]\frac{\partial F}{\partial v}=ve^{4y}+\frac{dT}{dv}[/tex]

But according to the exact differential, this is also equal to [itex]e^{4y}v[/itex]

Or:

[tex]ve^{4y}+\frac{dT}{dv}=e^{4y}v[/tex]

or:

[tex]\frac{dT}{dv}=0[/tex]

Integrating yields:

[tex]T(v)=k[/tex]

So that:

[tex]F(y,v)=\frac{1}{2}v^2e^{4y}+\frac{1}{4}ye^{4y}-\frac{1}{16}e^{4y}+k[/tex]

Where k is a constant which we'll absorb into the constant c:

[tex]\frac{1}{2}v^2e^{4y}+\frac{1}{4}ye^{4y}-\frac{1}{16}e^{4y}=c[/tex]

Finally, solving for v (which is y') yields:

[tex](\frac{dy}{dx})^2=ce^{-4y}-\frac{1}{2}y+\frac{1}{8}[/tex]

or:

[tex]\frac{dy}{dx}=\pm \sqrt{ce^{-4y}-\frac{1}{2}y+\frac{1}{8}}[/tex]

But that's ok. You just solve two differential equations now and use whatever part meets the initial conditions. Anyway, I'll spend some time studying this numerically in Mathematica and report some useful results with select initial conditions.
 
  • #10
Thank you for your replies,and sorry for my delaying reply,everyone.

I have just solved for myself without using the solution by exact differential equation.

Here is my solution.


As pointed by Data, Set

[tex]v=\frac{dy}{dx}[/tex],

we can rewrite the differential equation in question

[tex]\frac{d^2y}{dx^2}+2\left(\frac{dy}{dx}\right)^2+y=0[/tex]

as follows.

[tex]v\frac{dv}{dy}+2v^2+y=0[/tex].

For [tex]v\neq 0[/tex],

we have

[tex]\frac{dv}{dy}+2v=-\frac{1}{v}y\ \cdots [E][/tex]

Considering the solution of the differential equation

[tex]\frac{dv}{dy}+2v=0[/tex]

we set

[tex]v=ze^{-2y}[/tex],differentiating with respect to [tex]y[/tex]

[tex]\frac{dv}{dy}=\frac{dz}{dy}e^{-2y}-2ze^{-2y}[/tex]

plugging this into [tex][E][/tex]

we have

[tex]z\frac{dz}{dy}=-ye^{4y}[/tex],

[tex]\frac{d}{dy}\left(\frac{1}{2}z^2\right)=-ye^{4y}[/tex]

integrating with respect to [tex]y[/tex]

[tex]\frac{1}{2}z^2=-\int ye^{4y}dy[/tex]

using integral by parts

[tex]\frac{1}{2}z^2=-\left(\frac{1}{4}ye^{4y}-\frac{1}{16}e^{4y}\right)+C'[/tex]

i.e.

[tex]z^2=-\left(\frac{1}{2}ye^{4y}-\frac{1}{8}e^{4y}\right)+C[/tex]

where [tex] C=2C' [/tex]

therefore we obtain

[tex]v^2=z^2e^{-4y}[/tex]

[tex]v^2=-\left(\frac{1}{2}y-\frac{1}{8}\right)+Ce^{-4y}[/tex]

Consequently,as deduced by saltydog,

[tex]\frac{dy}{dx}=\pm \sqrt{Ce^{-4y}-\left(\frac{1}{2}y-\frac{1}{8}\right)}[/tex]


Thank you.

maphysique
 
Last edited:
  • #11
Hello Maphysique. Glad you're still with us and can explain how you approached it. This is my study of it:

It's interesting to note that if one would have approached this equation by converting it to two ODEs:

[tex]y'=u[/tex]

[tex]u'=-2u^2-y[/tex]

The constraint on y described below would not have been immediately clear unless the particular application it was describing would have indicated such.

As stated earlier, the equation is reduced to:

[tex]\frac{dy}{dx}=\pm\sqrt{ce^{4y}-\frac{1}{2}y+\frac{1}{8}}[/tex]

Solving (for c=1):

[tex]e^{4x}-\frac{1}{2}x+\frac{1}{8}=0[/tex]

we obtain [itex]x\approx 0.51003[/itex] and becomes negative when x is greater than this value. Thus, the ODE is valid only when y is less than the root of this equation.

Looking at the ODE again:

[tex]\frac{d^2 y}{dx^2}+2\left(\frac{dy}{dx}\right)^2+y=0[/tex]


Since y' is squared, then y'' must necessarilly be negative for the LHS to have any chance of being zero.

If y'(0)>0 then the graph slopes upward and concaving downward until y reaches the zero of the radical.

If y'(0)<0 then the graphs slopes downward and concaving downward and becomes more so to balance the square of the derivative.

Attached are two particular solutions with y'(0)>0 and y'(0)<0 respectively.
 

Attachments

  • odep.JPG
    odep.JPG
    5 KB · Views: 363
  • oden.JPG
    oden.JPG
    4.9 KB · Views: 384
Last edited:
  • #12
actually, salty, I believe the solution to the exact DE is

[tex]\frac{dy}{dx} = \pm \sqrt{ ce^{-4y} - \frac{y}{2} + \frac{1}{8}}[/tex]

(note the [itex]ce^{-4y}[/itex] as opposed to [itex]ce^{4y}[/itex])

Edit: I just noticed you had it right in your first post. Undoubtedly just a typo~
 
Last edited:
  • #13
And maphysique, that is a nice method. Unfortunately it doesn't lead to any additional simplifications that I can see (you still get the messy square root), but maybe you've figured out how to get around that too! :)
 
  • #14
I have just edited.

Thank you, everyone!

maphysique
 
  • #15
Un petit coup de Laplace devrait marcher...
 
  • #16
If your suggestion is to use the Laplace transform, then tell me what the Laplace transform of [itex]f^\prime(x)^2[/itex] is~
 
  • #17
U can't use Laplace transformation for nonlinear ODE-s...


Daniel.
 
  • #18
"U can't use Laplace transformation for nonlinear ODE-s...


Daniel."

why?
 
  • #19
Like I asked before, what's the Laplace transform of [itex]f^\prime(x)^2[/itex]?
 
  • #20
tyutyu fait le train said:
"U can't use Laplace transformation for nonlinear ODE-s...


Daniel."

why?


I assume it's very easy to ask questions without doing some documenting first.I think there are plenty of books on the application of integral transformations (Laplace & Fourier) to PDE-s/ODE-s...You can find one,i'm sure.

Daniel.
 
  • #21
"I assume it's very easy to ask questions without doing some documenting first.I think there are plenty of books on the application of integral transformations (Laplace & Fourier) to PDE-s/ODE-s...You can find one,i'm sure.

Daniel."


OK
 

What is a differential equation?

A differential equation is a mathematical equation that describes the relationship between a function and its derivatives. It includes one or more independent variables, the function itself, and its derivatives. Differential equations are used to model various physical and natural phenomena such as motion, heat transfer, and population growth.

Why is solving differential equations important?

Differential equations are used in many scientific fields to model and understand real-world phenomena. By solving these equations, we can make predictions, analyze systems, and develop new technologies. They are also essential in developing mathematical models for engineering, physics, and chemistry.

What are the steps involved in solving a differential equation?

The steps involved in solving a differential equation depend on its type and complexity. Generally, the steps include identifying the type of differential equation, finding the general solution, applying initial or boundary conditions, and obtaining the particular solution. Other methods such as using separation of variables or using integral transforms may also be used.

What are the different 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 include a random or probabilistic element in the equation.

Are there any software or tools available for solving differential equations?

Yes, there are various software and tools available for solving differential equations, such as MATLAB, Mathematica, and Python libraries like SciPy and Sympy. These tools use numerical methods to solve differential equations and provide accurate solutions. However, it is still essential to understand the concepts and steps involved in solving differential equations manually.

Similar threads

Replies
7
Views
3K
  • Differential Equations
Replies
1
Views
1K
  • Differential Equations
Replies
2
Views
981
  • Differential Equations
Replies
1
Views
1K
Replies
1
Views
1K
  • Differential Equations
2
Replies
52
Views
798
Replies
2
Views
1K
  • Differential Equations
Replies
1
Views
747
  • Differential Equations
Replies
20
Views
2K
  • Differential Equations
Replies
16
Views
887
Back
Top