Coupled Differential Equations: How Do They Depend on Each Other?

Jwill
Messages
39
Reaction score
0
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 similar like set

z'=sin(3y(t))
y'=z

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...
 
Physics news on Phys.org
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.
 
If that is correct then I must not understand how to do the stage constants for the iteration.

If
\frac{dz}{dt} = sin(3y(t))

\frac{dy}{dt} = z

then

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

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

(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

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

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

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.
 
Well... anyway my attempt at this was:

k1 = z_{i}

l1 = sin(3.*(y_{i}));

k2 = z_{i}+\frac{h}{2}*l1

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

k3 = z_{i}+\frac{h}{2}*l2

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

k4 = z_{i}+h*l2

l4 = sin(3*(y_{i}+h*k2))

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

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

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.
 
Jwill said:
If that is correct then I must not understand how to do the stage constants for the iteration.

If
\frac{dz}{dt} = sin(3y(t))

\frac{dy}{dt} = z

then

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

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

(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

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

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

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.
As I have said in another forum, you are right. The first pair of equations is incorrect, the second pair is correct.
 
Thread 'Direction Fields and Isoclines'
I sketched the isoclines for $$ m=-1,0,1,2 $$. Since both $$ \frac{dy}{dx} $$ and $$ D_{y} \frac{dy}{dx} $$ are continuous on the square region R defined by $$ -4\leq x \leq 4, -4 \leq y \leq 4 $$ the existence and uniqueness theorem guarantees that if we pick a point in the interior that lies on an isocline there will be a unique differentiable function (solution) passing through that point. I understand that a solution exists but I unsure how to actually sketch it. For example, consider a...
Back
Top