3 added 36 characters in body edited Feb 3 '17 at 14:21 zhk 10.5k11 gold badge1717 silver badges3333 bronze badges Here I will illustrate with a simple example to solve two couple systems of odes. Method I (*The first system*) Ode1 = x'[t] == 1/y[t]; Ode2 = y'[t] == x[t]; ics := {x == 1, y == 2}; sys = Join[{Ode1, Ode2}, ics]; soln = First@NDSolve[sys, {x, y}, {t, 0, 10}]; x1[t_] := Evaluate[x[t] /. soln]; (*assign the interpolating function x[t] to x1[t]*) y1[t_] := Evaluate[y[t] /. soln]; (*assign the interpolating function y[t] to y1[t]*) (*The second system*) Ode3 = x2'[t] == x1[t]; Ode4 = y2'[t] == x2[t] + y1[t] + y2[t]; ics2 := {x2 == -1, y2 == -2}; sys1 = Join[{Ode3, Ode4}, ics2]; soln1 = First@NDSolve[sys1, {x2, y2}, {t, 0, 10}]; Plot[{x1[t], y1[t], {x2[t], y2[t]} /. soln1}, {t, 0, 10}] Method II Solve the two systems as one, Ode3 = x2'[t] == x[t]; Ode4 = y2'[t] == x2[t] + y[t] + y2[t]; combsys12 = Join[{Ode1, Ode2, Ode3, Ode4}, ics, ics2]; combsoln = First@NDSolve[combsys12, {x, y, x2, y2}, {t, 0, 10}]; Plot[{x[t], y[t], x2[t], y2[t]} /. combsoln, {t, 0, 10}] Here I will illustrate with a simple example to solve two couple systems of odes. Method I (*The first system*) Ode1 = x'[t] == 1/y[t]; Ode2 = y'[t] == x[t]; ics := {x == 1, y == 2}; soln = First@NDSolve[sys, {x, y}, {t, 0, 10}]; x1[t_] := Evaluate[x[t] /. soln]; (*assign the interpolating function x[t] to x1[t]*) y1[t_] := Evaluate[y[t] /. soln]; (*assign the interpolating function y[t] to y1[t]*) (*The second system*) Ode3 = x2'[t] == x1[t]; Ode4 = y2'[t] == x2[t] + y1[t] + y2[t]; ics2 := {x2 == -1, y2 == -2}; sys1 = Join[{Ode3, Ode4}, ics2]; soln1 = First@NDSolve[sys1, {x2, y2}, {t, 0, 10}]; Plot[{x1[t], y1[t], {x2[t], y2[t]} /. soln1}, {t, 0, 10}] Method II Solve the two systems as one, Ode3 = x2'[t] == x[t]; Ode4 = y2'[t] == x2[t] + y[t] + y2[t]; combsys12 = Join[{Ode1, Ode2, Ode3, Ode4}, ics, ics2]; combsoln = First@NDSolve[combsys12, {x, y, x2, y2}, {t, 0, 10}]; Plot[{x[t], y[t], x2[t], y2[t]} /. combsoln, {t, 0, 10}] Here I will illustrate with a simple example to solve two couple systems of odes. Method I (*The first system*) Ode1 = x'[t] == 1/y[t]; Ode2 = y'[t] == x[t]; ics := {x == 1, y == 2}; sys = Join[{Ode1, Ode2}, ics]; soln = First@NDSolve[sys, {x, y}, {t, 0, 10}]; x1[t_] := Evaluate[x[t] /. soln]; (*assign the interpolating function x[t] to x1[t]*) y1[t_] := Evaluate[y[t] /. soln]; (*assign the interpolating function y[t] to y1[t]*) (*The second system*) Ode3 = x2'[t] == x1[t]; Ode4 = y2'[t] == x2[t] + y1[t] + y2[t]; ics2 := {x2 == -1, y2 == -2}; sys1 = Join[{Ode3, Ode4}, ics2]; soln1 = First@NDSolve[sys1, {x2, y2}, {t, 0, 10}]; Plot[{x1[t], y1[t], {x2[t], y2[t]} /. soln1}, {t, 0, 10}] Method II Solve the two systems as one, Ode3 = x2'[t] == x[t]; Ode4 = y2'[t] == x2[t] + y[t] + y2[t]; combsys12 = Join[{Ode1, Ode2, Ode3, Ode4}, ics, ics2]; combsoln = First@NDSolve[combsys12, {x, y, x2, y2}, {t, 0, 10}]; Plot[{x[t], y[t], x2[t], y2[t]} /. combsoln, {t, 0, 10}] 2 added 441 characters in body edited Feb 3 '17 at 13:14 zhk 10.5k11 gold badge1717 silver badges3333 bronze badges Here I will illustrate with a simple example to solve two couple systems of odes. Method I (*The first system*) Ode1 = x'[t] == 1/y[t]; Ode2 = y'[t] == x[t]; ics := {x == 1, y == 2}; soln = First@NDSolve[sys, {x, y}, {t, 0, 10}]; x1[t_] := Evaluate[x[t] /. soln]; (*assign the interpolating function x[t] to x1[t]*) y1[t_] := Evaluate[y[t] /. soln]; (*assign the interpolating function y[t] to y1[t]*) (*The second system*) Ode3 = x2'[t] == x1[t]; Ode4 = y2'[t] == x2[t] + y1[t] + y2[t]; ics2 := {x2 == -1, y2 == -2}; sys1 = Join[{Ode3, Ode4}, ics2]; soln1 = First@NDSolve[sys1, {x2, y2}, {t, 0, 10}]; Plot[{x1[t], y1[t], {x2[t], y2[t]} /. soln1}, {t, 0, 10}] Method II Solve the two systems as one, Ode3 = x2'[t] == x[t]; Ode4 = y2'[t] == x2[t] + y[t] + y2[t]; combsys12 = Join[{Ode1, Ode2, Ode3, Ode4}, ics, ics2]; combsoln = First@NDSolve[combsys12, {x, y, x2, y2}, {t, 0, 10}]; Plot[{x[t], y[t], x2[t], y2[t]} /. combsoln, {t, 0, 10}] Here I will illustrate with a simple example to solve two couple systems of odes. (*The first system*) Ode1 = x'[t] == 1/y[t]; Ode2 = y'[t] == x[t]; ics := {x == 1, y == 2}; soln = First@NDSolve[sys, {x, y}, {t, 0, 10}]; x1[t_] := Evaluate[x[t] /. soln]; (*assign the interpolating function x[t] to x1[t]*) y1[t_] := Evaluate[y[t] /. soln]; (*assign the interpolating function y[t] to y1[t]*) (*The second system*) Ode3 = x2'[t] == x1[t]; Ode4 = y2'[t] == x2[t] + y1[t] + y2[t]; ics2 := {x2 == -1, y2 == -2}; sys1 = Join[{Ode3, Ode4}, ics2]; soln1 = First@NDSolve[sys1, {x2, y2}, {t, 0, 10}]; Plot[{x1[t], y1[t], {x2[t], y2[t]} /. soln1}, {t, 0, 10}] Here I will illustrate with a simple example to solve two couple systems of odes. Method I (*The first system*) Ode1 = x'[t] == 1/y[t]; Ode2 = y'[t] == x[t]; ics := {x == 1, y == 2}; soln = First@NDSolve[sys, {x, y}, {t, 0, 10}]; x1[t_] := Evaluate[x[t] /. soln]; (*assign the interpolating function x[t] to x1[t]*) y1[t_] := Evaluate[y[t] /. soln]; (*assign the interpolating function y[t] to y1[t]*) (*The second system*) Ode3 = x2'[t] == x1[t]; Ode4 = y2'[t] == x2[t] + y1[t] + y2[t]; ics2 := {x2 == -1, y2 == -2}; sys1 = Join[{Ode3, Ode4}, ics2]; soln1 = First@NDSolve[sys1, {x2, y2}, {t, 0, 10}]; Plot[{x1[t], y1[t], {x2[t], y2[t]} /. soln1}, {t, 0, 10}] Method II Solve the two systems as one, Ode3 = x2'[t] == x[t]; Ode4 = y2'[t] == x2[t] + y[t] + y2[t]; combsys12 = Join[{Ode1, Ode2, Ode3, Ode4}, ics, ics2]; combsoln = First@NDSolve[combsys12, {x, y, x2, y2}, {t, 0, 10}]; Plot[{x[t], y[t], x2[t], y2[t]} /. combsoln, {t, 0, 10}] 1 answered Feb 3 '17 at 13:06 zhk 10.5k11 gold badge1717 silver badges3333 bronze badges Here I will illustrate with a simple example to solve two couple systems of odes. (*The first system*) Ode1 = x'[t] == 1/y[t]; Ode2 = y'[t] == x[t]; ics := {x == 1, y == 2}; soln = First@NDSolve[sys, {x, y}, {t, 0, 10}]; x1[t_] := Evaluate[x[t] /. soln]; (*assign the interpolating function x[t] to x1[t]*) y1[t_] := Evaluate[y[t] /. soln]; (*assign the interpolating function y[t] to y1[t]*) (*The second system*) Ode3 = x2'[t] == x1[t]; Ode4 = y2'[t] == x2[t] + y1[t] + y2[t]; ics2 := {x2 == -1, y2 == -2}; sys1 = Join[{Ode3, Ode4}, ics2]; soln1 = First@NDSolve[sys1, {x2, y2}, {t, 0, 10}]; Plot[{x1[t], y1[t], {x2[t], y2[t]} /. soln1}, {t, 0, 10}] 