Hi!(adsbygoogle = window.adsbygoogle || []).push({});

I have to solve a system of two coupled nonlinear ordinary differential equations. In the function that defines the system there are terms with square root of the dependant variables. I tried to solve the system numerically but in the nmerical solution I get violent oscillations. Then I realized that the same problem appears in the numerical solution of this very simple exactly solvable differential equation: x'(t)=(1-x(t))^(1/2) with initial condition x(2.1)=0.9975. The exact solution is x(t)=(1/4)(4t-t^2).

It seems to me that the problem is the square root (1-x(t))^(1/2). When the numerical solution approach an extremum, then x'(t) and (1-x(t))^(1/2) both approach zero. But then (1-x(t)) also approaches zero, and in fact (1-x(t)) takes negative values, that makes the square root imaginary.

I explore the situation with the fourth-order Runge-Kutta method with step h=0.2 and in the firt iteration I find the complex value:

x(2.1)=1.00463+ 0.0042963 I

The same happens with the Euler method and the MidPoint Method

Any hint of how to get the correct numerical solution of this equation???

Thanks a lot!

**Physics Forums - The Fusion of Science and Community**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Differential eq with square root numerical

Loading...

Similar Threads - Differential square root | Date |
---|---|

I How to find a solution to this linear ODE? | Feb 21, 2018 |

A How to simplify the solution of the following linear homogeneous ODE? | Feb 18, 2018 |

A Causality in differential equations | Feb 10, 2018 |

A Numerical solution for a two dimensional 3rd order nonlinear diff. eq. | Jan 17, 2018 |

Susskind said that the square of a differential equal zero | Apr 28, 2014 |

**Physics Forums - The Fusion of Science and Community**