Skip to main content
added 15 characters in body
Source Link
Bill Watts
  • 8.4k
  • 1
  • 13
  • 32

MMa doesn't know x[t] is a vector, so try this.

x0 = {1.5, -4.};
v = {0, 8};
(*x[t_]x[t_] = {x1[t], x2[t]}*)

eq = x'[t] == v // Thread
(*{x1' = [t]x1'[t] == 0, x2'[t] == 8}*)

init = x[0] == 0x0 // Thread
(*{x1[0] == 01.5, x2[0] == 0-4.}*)

DSolve[{eq, init}, x[t], t]
(*{{x1[t] -> 01.5, x2[t] -> 8 t - 4.}}*)

x[t] /. %
(*{{01.5, 8 t - 4.}}*)

MMa doesn't know x[t] is a vector, so try this.

x0 = {1.5, -4.};
v = {0, 8};
(*x[t_] = {x1[t], x2[t]}*)

eq = x'[t] == v // Thread
(*{x1' = [t] == 0, x2'[t] == 8}*)

init = x[0] == 0 // Thread
(*{x1[0] == 0, x2[0] == 0}*)

DSolve[{eq, init}, x[t], t]
(*{{x1[t] -> 0, x2[t] -> 8 t}}*)

x[t] /. %
(*{{0, 8 t}}*)

MMa doesn't know x[t] is a vector, so try this.

x0 = {1.5, -4.};
v = {0, 8};
x[t_] = {x1[t], x2[t]}

eq = x'[t] == v // Thread
(*{x1'[t] == 0, x2'[t] == 8}*)

init = x[0] == x0 // Thread
(*{x1[0] == 1.5, x2[0] == -4.}*)

DSolve[{eq, init}, x[t], t]
(*{{x1[t] -> 1.5, x2[t] -> 8 t - 4.}}*)

x[t] /. %
(*{{1.5, 8 t - 4.}}*)
Source Link
Bill Watts
  • 8.4k
  • 1
  • 13
  • 32

MMa doesn't know x[t] is a vector, so try this.

x0 = {1.5, -4.};
v = {0, 8};
(*x[t_] = {x1[t], x2[t]}*)

eq = x'[t] == v // Thread
(*{x1' = [t] == 0, x2'[t] == 8}*)

init = x[0] == 0 // Thread
(*{x1[0] == 0, x2[0] == 0}*)

DSolve[{eq, init}, x[t], t]
(*{{x1[t] -> 0, x2[t] -> 8 t}}*)

x[t] /. %
(*{{0, 8 t}}*)