Results 1 to 9 of 9

Math Help - Questions regarding solving an ODE

  1. #1
    Newbie
    Joined
    Jan 2011
    Posts
    6

    Questions regarding solving an ODE

    Is it possible to use Euler's method to numerically approximate the solution of this system of ODEs:

    dx/dt = -y + x(p - x^2 - y^2)

    dy/dt = x + y(p - x^2 - y^2)

    where p is a parameter/constant

    The only tutorial examples i have seen on the internet involve one dependent and one independent variable. In this case it has 2 dependent variables and 1 independent variable (making it an ODE rather than a PDE).

    If it is possible to solve it with the Euler method could someone please advise me about approaching the problem. If it isn't could someone suggest an alternative method.

    Cheers
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor

    Joined
    Apr 2005
    Posts
    16,444
    Thanks
    1863
    Of course, you can't apply any numerical method to find a general solution- you need "boundary conditions" or, preferably, "initial conditions" to specify a specific function. The difficulty is that with partial differential equations, those conditions are typically prescribed functions, not numbers so the problem of numerical solution is much harder. What kind of conditions would you have here?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Jan 2011
    Posts
    6
    Well I am attempting to write a program that plots a hopf bifurcation of the system above as I vary the parameter p - So plots of y vs. p and x vs. p. I have used the Newton-Raphson method to determine y vs. p and x vs. p over a range of p's - while using the eigen values of the Jacobian to determine the parameter value after which the system bifurcates. In this case that parameter value is 0 and the x and y values are both 0 at the point of bifurcation. I wanted to use euler's method to solve the ODEs from that point onwards and establish a limit cycle ~ which would then translate into a maximum and minimum y vs t and x vs t value that I assume i could then use for plotting as x and y vs. p in the phase diagram plots.

    I hope I am clear in what i am trying to describe.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Jan 2011
    Posts
    6
    I see quite a few people have subsequently viewed this thread, but no advice? I have been trawling through the net for hours trying to find a method to do this. Help is appreciated at least to get me on track.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    5
    Awards
    2
    As per HallsofIvy's post, you CANNOT solve any ODE numerically on a computer without boundary conditions or initial conditions. What are they for your system? Also, I would probably go with Runge-Kutta methods over Euler's. It'll be more accurate.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Newbie
    Joined
    Jan 2011
    Posts
    6
    I would have thought the initial condition for time = 0, y & x = 0 too.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    5
    Awards
    2
    ...would have thought...
    You mean you don't know? How very singular (pun intended).

    So, is t=0 at the point of bifurcation?
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Newbie
    Joined
    Jan 2011
    Posts
    6
    Ok I haven't explained things really well. Given the system above, I have used the Newton Raphson method to approximate the 'steady part' (prior to bifurcation) of the graph by solving the algebraic non linear equations for f1(x,y) = 0 & f2(x,y) = 0. The code gives a solution for x & y at every 'p' parameter value while simultaneously calculating the eigenvalues of the jacobian to determine the systems stability at each parameter value. At a parameter value of 0 the system bifurcates. Prior to that the system is stable for p <= 0 and unstable for p > 0. Now the x and y points for p <= 0 are a straight line, where x = 0 & y = 0 on a plot of x on the y - axis vs. p on the x - axis & y on the y - axis vs. p on the x - axis.

    What I am trying to do now is calculate the x & y values vs. time by solving the system of ODEs numerically for each particular parameter value. So this part of the code only kicks off at p > 0. So for p = 1, I want to find the x and y values vs. time and for p = 2 and p = 3 and so on... What I think should occur, as this system exhibits a hopf bifurcation, is that for each parameter value there should be a limit cycle i.e. an oscillation of x vs. time & y vs. time where the maximum and minimum values of that oscillation represent the upper and lower branch of the hopf bifurcation as plotted in the x vs. p & y vs. p phase portraits - if thats what they are called. I haven't studied nonlinear dynamics and chaos for a long time. So I know at p = 0 a hopf bifurcation takes place and I thought that by solving the ODE for t = 0, y = x = 0 at each parameter value - i could get the limit cycle and then use that data to plot the maximum and minimum y/x values vs. that parameter in the hopf bifurcation plot. Am I making any sense or talking nonsense?
    Follow Math Help Forum on Facebook and Google+

  9. #9
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    5
    Awards
    2
    Hmm. I'm not sure I fully understand all the chaos theory you're doing (I've studied it a bit, but it was out of Marion and Thornton's Classical Dynamics of Particles and Systems, and most people agree that the chaos chapter isn't the brightest point of the book.)

    I will say this: if you do need to solve the system with the t=0=x=y initial conditions, then I'd recommend Runge-Kutta 4 as a good general-purpose solver. You have a system, so you should be aware that the y, the f, the k1 - k4's are all vector quantities, though t and h are scalars.
    Last edited by Ackbeet; January 22nd 2011 at 05:46 PM. Reason: Closing parenthesis.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. solving trigonometry questions
    Posted in the Trigonometry Forum
    Replies: 1
    Last Post: November 7th 2010, 07:57 AM
  2. Solving trig questions
    Posted in the Trigonometry Forum
    Replies: 6
    Last Post: January 14th 2010, 03:48 AM
  3. more solving trig questions
    Posted in the Trigonometry Forum
    Replies: 2
    Last Post: January 14th 2010, 02:48 AM
  4. Problem solving questions
    Posted in the Math Topics Forum
    Replies: 1
    Last Post: May 21st 2008, 04:44 PM
  5. Problem Solving questions
    Posted in the Algebra Forum
    Replies: 1
    Last Post: February 12th 2008, 10:31 PM

Search Tags


/mathhelpforum @mathhelpforum