help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Solving Differential Equation


From: Juan Pablo Carbajal
Subject: Re: Solving Differential Equation
Date: Wed, 16 Apr 2014 13:38:22 +0200

On Wed, Apr 16, 2014 at 12:11 PM, c. <address@hidden> wrote:
>
> On 16 Apr 2014, at 10:22, eric_h22 <address@hidden> wrote:
>
>> xdot(1)=x(2);
>> xdot(2)=x(1)+x(1)^3;
>
> are you sure this is the correct definition of your problem?
> I am afraid you are trying to simulate a highly unstable system
> over a long time interval, I suspect whatever method you use
> you will quickly get to an overflow.
>
> c.
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-octave

I agree with carlo, it seems you are trying to simulate a physical
system. It looks like Duffing's equation then either of the orders
should be stabilizing: either -x(1)+x(1)^3 (beware of x =1,-1) or
x(1)-x(1)^3.

Try integrating your system for shorter times and see what x is
doing...in your case you should see it diverge whenever x != 0.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]