[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: can i do ODE2 problems with lsode ?
From: |
H. I. SALEH |
Subject: |
Re: can i do ODE2 problems with lsode ? |
Date: |
Thu, 30 Nov 1995 18:22:13 -0800 (PST) |
On Thu, 30 Nov 1995, John Utz wrote:
> Hi gang;
>
> I have been trying to do some neural-net and dynamical systems
> stuff that i have been assigned as homework.
>
> This means i need to solve ODE's and sytems of ODE's. Octave has
> dassl and lsode for this purpose. I am not sure how i need to pre process
> my equations to get them into a form that lsode or dassl would be willing
> to digest.
>
> The example in the manual for lsode is pretty good, the entry for
> dassl does not have an example, but the description seems pretty complete.
>
> Here is the function that i want to try and solve first, since i
> think it is a "simple" example of what comes in the real stuff.
>
> d^2 x dx
> ----- + lambda*( x^2 - 1 )* -- + x = 0
> dt^2 dt
>
> so we can plunk 3 in for lambda, this is supposedly an equation from a
> matlab demo, but i dont have matlab, so i dont know.
>
> my problem is that this is a 2nd order eq and lsode looks like it only
> wants 1rst order eq's.
>
> Now, i *thought* that any nOrder ode can be represented as an
> Nsystem of 1rst order diffeq's. I starting to think that i hallucinated
> this fact because i cant seem to find any example of this in either
> Boyce/DiPrima or Jordan/Smith, which are the two textbooks on the subject
> of ode's that i have at my disposal.
>
> So, did i hallucinate this? If not, can anybody provide any
> suggestions as to how i might implement this?
>
> tks folks, please feel free to tell me if u think this was an
> inapropriate use of the list.
>
> *******************************************************************************
> John Utz address@hidden
> idiocy is the impulse function in the convolution of life
>
Try the substitution y(t) = d x / dt. The above 2nd order ODE can be
written as the following 2 1st order ODEs
dx
---- = y(t)
dt
dy
---- + Lambda(x^2 - 1)y + x = 0
dt
I hope this helps.
H. I. SALEH