Difficult non-linear differential equation

In summary, the student is trying to solve a differential equation numerically. They have been using a simple discretization, but it doesn't seem to be stable. They are looking for help from the listener, who provides a summary of how to reduce the equation to a set of first order ODEs. The k-values for the RK4 method are computed using the equation k1=hf(x_{i},v_{i}) and the student is still confused about how to compute the vectors.
  • #1
matteo86bo
60
0

Homework Statement



I need to solve this differential equation numerically. I hope you can help me, it's not homework!

Homework Equations



This is the equation to be solved

[itex]x''=\dfrac{\alpha}{x}-\beta\dfrac{(x'-\gamma x)^2}{x}-\delta x - \dfrac{\varepsilon}{x^2}[/itex]


The Attempt at a Solution



I've tried with a simple discretization, but it doesn't seem to be stable.

[itex]\dfrac{x(i)-2x(i-1)+x(i-2)}{h^2}=\dfrac{\alpha}{x(i-1)}-\beta\dfrac{\left(\dfrac{x(i)-x(i-1)}{h}-\gamma x(i-1)\right)^2}{x(i-1)}-\delta x(i-1) - \dfrac{\varepsilon}{x(i-1)^2}[/itex]

I think it's better to use Runge-Kutta IV but I have no idea how to apply it on such a complicated equation.
 
Physics news on Phys.org
  • #2
You can reduce a second order ODE like that to a set of first order ODE by introducing an extra state variable. For instance, in your case you could set v = x' and get the following first order equations

v' = α/x - β (v-γx)2/x - δx - ε/x2, and
x' = v

Thus, (x,v) is the state of the system and the field that you have to provide to methods like RK4 is given by the right hand side of the equations.
 
  • #3
Thanks that helped but I have still some problem in computing v.

According to what you wrote and the runge Kutta IV method definition the k should be:

[itex]k1=hf(t_{i},x_{i})[/itex]
[itex]k2=hf(t_{i+1/2},x_{i}+k1/2)[/itex]
[itex]k3=hf(t_{i+1/2},x_{i}+k2/2)[/itex]
[itex]k4=hf(t_{i+1},x_{i}+k3)[/itex]

How is v for every k?
 
  • #4
No, your state consist of two variables, not just one, meaning that in the context of the RK4 method the state variable (not to be confused with the x in your equations), the field f and the k-values are all two-dimensional. For instance, when applied to your state variables the stage k1 = h f(ti,yi) from the RK4 method (where I used y = (x,v) to denote the complete state) really means k1 = (kx1, kv1) = h f(ti,xi,vi).
 
  • #5
Ah ok, thanks. So in my case, since I don't have an explicit time dependency the ks should be


[itex]k1=hf(x_{i},v_{i})[/itex]
[itex]k2=hf(x_{i}+k1/2,v_{i}+k1/2,)[/itex]
[itex]k3=hf(x_{i}+k2/2,v_{i}+k2/2)[/itex]
[itex]k4=hfx_{i}+k3,v_{i}+k3)[/itex]

Is that right?
 
  • #6
Correct, but remember as was mentioned, that the field f also evaluates to two values, one for x' and one for v' so you need to treat the k-values as vectors also when you combine them to a new y value.
 
  • #7
Sorry but I don't understand how to compute the Ks considering them as arrays. I tried googling it but I couldn't find anything. Can please you make an example?
 
  • #8
You should treat them as vectors with two elements. If we define the field as the (column) vector

f(x,v) = ( fx(x,v), fv(x,v) )T ,

that is, a vector with the two elements

fx(x, v) = v and
fv(x, v) = α/x - β (v-γx)2/x - δx - ε/x2,

then from the definition of the RK4 method we have

k1 = h f(xi, vi) = ( h fx(xi,vi), h fv(xi,vi) )T

that is, the two elements of k1 is

h fx(xi, vi) and
h fv(xi, vi).

If you are still confused by this I suggest that you read up on vector algebra.
 
  • #9
Ok, now I got it, thanks a lot for you time!
 

What exactly is a non-linear differential equation?

A non-linear differential equation is an equation that involves derivatives of a dependent variable with respect to one or more independent variables, where the dependent variable appears in a non-linear function.

Why are non-linear differential equations difficult to solve?

Unlike linear differential equations, non-linear differential equations do not have a general solution that can be easily obtained. They often require advanced mathematical techniques and numerical methods to find a solution.

What are some real-world applications of non-linear differential equations?

Non-linear differential equations are used to model many physical phenomena, such as population growth, chemical reactions, and fluid dynamics. They are also used in economics, neuroscience, and engineering.

What are some common techniques for solving non-linear differential equations?

Some common techniques for solving non-linear differential equations include separation of variables, substitution, and using power series or numerical methods. In some cases, non-linear differential equations can also be solved by transforming them into linear equations.

Can non-linear differential equations have multiple solutions?

Yes, non-linear differential equations can have multiple solutions. In fact, some non-linear differential equations may have an infinite number of solutions. This is often due to the non-uniqueness of the initial conditions or the presence of multiple equilibrium points.

Similar threads

  • Calculus and Beyond Homework Help
Replies
4
Views
943
  • Calculus and Beyond Homework Help
Replies
14
Views
392
  • Calculus and Beyond Homework Help
Replies
2
Views
259
  • Calculus and Beyond Homework Help
Replies
2
Views
733
  • Calculus and Beyond Homework Help
Replies
15
Views
1K
  • Calculus and Beyond Homework Help
Replies
8
Views
763
  • Calculus and Beyond Homework Help
Replies
3
Views
821
  • Calculus and Beyond Homework Help
Replies
3
Views
904
  • Calculus and Beyond Homework Help
Replies
9
Views
722
  • Calculus and Beyond Homework Help
Replies
7
Views
284
Back
Top