Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Strange oscillation using finite difference to solve a Initial Valus Problem(IVP)

  1. Jul 31, 2012 #1
    Hallo, I tried to use 'finite difference' method to solve a Initial Value Problem(IVP). For the two boundaries I used periodical condtion and for the differential operators I used 4th degree center approximations. But as result, I got this thing. Where comes this strange oscillation What do you think could be the problem. Should I use a smaller x stepsize? Will use a forward approximation help? Thanks.
    Actually I am using matlab's odes15s.

    The strange thing is that, if I use a biger x stepsize, say 0.1, i will get a smooth result. With smaller stepsize from 0.08, I will get the result showed in the picture.
    I tried ode45, which is based on an explicit Runge-Kutta (4,5) formula, the Dormand-Prince pair and ode23tb, which is an implementation of TR-BDF2. I got the same result.


    \dot{q} & = -\frac{\partial (6*q^2/5*h)}{\partial x}-\frac{3*q}{h^2}+h*h'''-(1+10*cos(pi*t))*h*h'\\

    \dot{h} & = -\frac{\partial q}{\partial x}

    h(t,0) = h(t,10),q(t,0) = q(t,10)

    h(0,x), q(0,x) are known.
  2. jcsd
  3. Aug 1, 2012 #2
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Threads - Strange oscillation using Date
A Damped Thermal Oscillations Oct 24, 2017
Another strange ODE Jan 13, 2015
A strange ODE Dec 31, 2009
Solution strange, differential equation May 28, 2008
Strange differential equation May 4, 2008