- #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.