Skip to main content
replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
Source Link

You can use Indexed to access the components separately:

NIntegrate[Indexed[f[t], 1], {t, 0, 3}]
NIntegrate[Indexed[f[t], 2], {t, 0, 3}]
(*
  0.75
  1.5
*)

Integrate will antidifferentiate an InterpolatingFunction. You can then subtract its values at the end points.

af = Head@Integrate[f[t], t];
af[3] - af[0]
(*  {3/4, 3/2}  *)

You can also write your own integration rulewrite your own integration rule to plug into NIntegrate, but that takes a little work.

You can use Indexed to access the components separately:

NIntegrate[Indexed[f[t], 1], {t, 0, 3}]
NIntegrate[Indexed[f[t], 2], {t, 0, 3}]
(*
  0.75
  1.5
*)

Integrate will antidifferentiate an InterpolatingFunction. You can then subtract its values at the end points.

af = Head@Integrate[f[t], t];
af[3] - af[0]
(*  {3/4, 3/2}  *)

You can also write your own integration rule to plug into NIntegrate, but that takes a little work.

You can use Indexed to access the components separately:

NIntegrate[Indexed[f[t], 1], {t, 0, 3}]
NIntegrate[Indexed[f[t], 2], {t, 0, 3}]
(*
  0.75
  1.5
*)

Integrate will antidifferentiate an InterpolatingFunction. You can then subtract its values at the end points.

af = Head@Integrate[f[t], t];
af[3] - af[0]
(*  {3/4, 3/2}  *)

You can also write your own integration rule to plug into NIntegrate, but that takes a little work.

Source Link
Michael E2
  • 244.7k
  • 18
  • 351
  • 774

You can use Indexed to access the components separately:

NIntegrate[Indexed[f[t], 1], {t, 0, 3}]
NIntegrate[Indexed[f[t], 2], {t, 0, 3}]
(*
  0.75
  1.5
*)

Integrate will antidifferentiate an InterpolatingFunction. You can then subtract its values at the end points.

af = Head@Integrate[f[t], t];
af[3] - af[0]
(*  {3/4, 3/2}  *)

You can also write your own integration rule to plug into NIntegrate, but that takes a little work.