# A question about a nonlinear oscillator

1. Apr 22, 2006

### pendulum

:yuck: I numerically integrate the following nonlinear oscillator:
x''(t) + e (x'(t)^3) + x(t) = 0 , where e<<1
and what I get is a limit cycle.
The energy derivative appears to be negative , which means that
x(t) approaches zero while t approaches infinity.
I also used the analytical method of two-timing, and the first asymptotic term x0(t) does approach zero for large t.
( The algorithm for the numerical integration is Runge-Kutta4. It's unlikely to have written it incorrectly.)
So where am I wrong?
Is it possible there is a limit cycle after all?

2. May 2, 2006

### J77

What value of e did you use?

I used 1e-3 and Matlab (stiff solver ode15s) showed oscillatory motion until approximately t=7000, then decay to zero.

What you've got is an almost linear system.

The eigenvalues (of the linear stability analysis) are imaginary - so you would expect limit cycle behaviour. However, the nonlinear part eventually drives your system.

(It is almost linear because e is small.)

3. May 12, 2006

### pendulum

I used e=0.3 which is not that small.
So I dropped the R-K4, and used a matrix of the form e^At for the numerical integration, and the system did fade out.
So I guessed that R-K4 was to accurate for this case. At least for the times 'I could reach'. You see I've been running the integration in matlab, but I've not learned to use ode's yet. So the procedure was very slow (even for t=0:200).
(I find it quite inconvenient that Matlab is so slow in loops.)

Anyway thanks. I think I get your point. The non-linearity reveals itself after a long time in the particular system.

4. May 13, 2006

### Tantoblin

This is completely off-topic, but when I'm confronted with a bottleneck in Matlab, I always write the critical parts in C and then call it as MEX file. This usually speeds up things by orders of magnitude.

5. May 15, 2006

### pendulum

Thank you Tantoblin.

6. May 15, 2006

### J77

...but looking at $$e^{At}$$ will only give you results for the linear system (+ something about transients of the full nonlinear system)

7. May 22, 2006

### pendulum

I am not sure whether I understand what you mean, but the A in the e^At wasn't stable (or linear if better).

8. May 22, 2006

### J77

You'll only see the limit cycle behaviour by looking at the matrix exponentials...

ie. From the purely complex eigenvalues of the linearised system given by A.

iie. if the nonlinearity kicks in (for any e), you won't see it.