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

Coupled First Order Equations

  1. Jul 30, 2010 #1
    I have a large project involving Runge Kutta numerical solutions of differential equations. I understand the Runge Kutta method and I've done it before, but my problem involves taking the differential equation

    y''=sin(3y(t)), t>=0

    and reexpressing this IVP into coupled first order equations. I have seen examples where people have done something similiar like set


    and there is a guy in my class that swears that this is right, but frankly that doesn't make sense to me in this case. If someone could help me understand how to do this correctly, I feel like I have a decent understanding of the numerical solution method. I have been asked to use the first order Runge Kutta method, but I have never used this method with coupled equations that looks anything like this...
  2. jcsd
  3. Jul 31, 2010 #2


    User Avatar
    Science Advisor

    Why doesn't it make sense to you? If y'= z, and z'= sin(3y) then y"= z'= sin(3y) as you want.

    In order to use Runge-Kutta on this problem do two simultaneous solutions, solving for both y and z at each step, then using the new values of y and z in the next step.
  4. Jul 31, 2010 #3
    If that is correct then I must not understand how to do the stage constants for the iteration.

    [tex]\frac{dz}{dt} = sin(3y(t)) [/tex]

    [tex]\frac{dy}{dt} = z [/tex]


    [tex]\frac{dz}{dt} = f[t, y(t)] [/tex]

    [tex]\frac{dy}{dt} = f[t, z(t)] [/tex]

    (I think)

    How are they "coupled" in that I don't see that they have a dependency on each other. I understand the runge kutta method when they have a dependency on each other, but how does solving for z or y help you solve for the other?... I don't see how the stage constants rely on each other.

    I would understand if it was

    [tex]\frac{dy}{dt} = f[t, y(t), z(t)] [/tex]

    [tex]\frac{dz}{dt} = F[t, y(t), z(t)] [/tex]

    If you could help me understand this, I'd appreciate it. It would make since if y and z were in both first order equations.
  5. Jul 31, 2010 #4
    Well.... anyway my attempt at this was:

    [tex]k1 = z_{i}[/tex]

    [tex]l1 = sin(3.*(y_{i}));[/tex]

    [tex]k2 = z_{i}+\frac{h}{2}*l1[/tex]

    [tex]l2 = sin(3*(y_{i}+\frac{h}{2}*k1))[/tex]

    [tex]k3 = z_{i}+\frac{h}{2}*l2[/tex]

    [tex]l3 = sin(3*(y_{i}+\frac{h}{2}*k2))[/tex]

    [tex]k4 = z_{i}+h*l2[/tex]

    [tex]l4 = sin(3*(y_{i}+h*k2))[/tex]

    [tex]z_{i+1} = z_{i} + \frac{h}{6}*(l1+2*l2+2*l3+l4)[/tex]

    [tex]y_{i+1} = y_{i} + \frac{h}{6}*(k1+2*k2+2*k3+k4)[/tex]

    I doubt this is correct... In the event that it is, could someone explain it to me better. Either way, I would like to understand this.
  6. Aug 1, 2010 #5


    User Avatar
    Science Advisor

    As I have said in another forum, you are right. The first pair of equations is incorrect, the second pair is correct.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook