CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2009
    Posts
    29

    Numerical solution for Ordinary diferential ecuation

    I started to solve some ordinary diferential ecuations (ODE) with matlab for some specific research topic.
    im using the internal solver algorithm called ode45

    i am not familiar with the advanced concepts of numerical methods so i ask the following.

    is it possible that the numerical solution computes "wrong" and result should not be trusted??

    ill explain myself, for an specific ODE ecuation, im getting a weird curve as the numerical solution. This does not happen on other simpler cases.

    more specific: this is what im getting

    http://dl.dropbox.com/u/6380744/untitled.jpg

    plotted from 0 to pi/2.

    as it approaches pi/2 it grows exponentially too fast for our context, and as consecuence the rest of the curve cannot be appreciated and looks flat.
    we are not sure if this numerical solution can be trusted
    any help or explanation, is thanked.

    if you want to reproduce the case i can give you the ODE and the initial conditions
    Last edited by chire; September 30th, 2010 at 05:43 PM. Reason: had to pee

  2. #2
    Join Date
    May 2009
    Posts
    2,413

    Re: Numerical solution for Ordinary diferential ecuation

    I'd say Matlab can be trusted. It's a very solid package. If you get weird results it's more likely a mistake you did.

    And no one can tell just by looking at a curve whether it's the correct solution to an unknown ODE. That's pretty obvious isn't it.
    Last edited by nuzzle; October 1st, 2010 at 12:53 AM.

  3. #3
    Join Date
    Sep 2010
    Posts
    27

    Re: Numerical solution for Ordinary diferential ecuation

    I don't know about ode45,
    I only know classic method Newton to resolve differential equations numerically. I use win32 API to draw the curve or OpenGl as an alternative graphics solution

  4. #4
    Join Date
    Nov 2009
    Posts
    29

    Re: Numerical solution for Ordinary diferential ecuation

    thanks,

    i was checking and it seems we have a situation on the ecuation, some complex numbers appear
    in this cases, i cannot blame numerical solutions
    Cristobal

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured