Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Integrate and Piecewise

  • To: mathgroup at smc.vnet.net
  • Subject: [mg98416] Integrate and Piecewise
  • From: Hugh Goyder <h.g.d.goyder at cranfield.ac.uk>
  • Date: Thu, 9 Apr 2009 05:55:26 -0400 (EDT)

Below I make a piecewise function that is continuous. Then I integrate
it to make another piecewise function. However, the integrated
function is not continuous. Presumable because I do indefinite
integration and each part of the piecewise function needs a constant
of integration. Is there anyway of doing the integration and getting a
continuous function? I would like the function to be zero at  minus
infinity. Do I have to break the function out into its parts or can I
keep it all as a Piecewise function?

Thanks
Hugh Goyder

f4[t_, a_, t0_] := Piecewise[{
   {0, t - t0 <= -a},
   { 4 (t - t0 + a)/a, -a < t - t0 <= -(3/4) a},
   {1 - 4/a (t - t0 + (3 a)/4), -(3/4) a < t - t0 <= -(1/4) a},
   {-1 + 4/a (t - t0 + a/4), -(1/4) a < t - t0 <= 0},
   {-(4/a) (t - t0 ), 0 < t - t0 <= 1/4 a},
   {-1 + 4/a (t - t0 - 1/4 a), 1/4 a < t - t0 <= 3/4 a},
   {1 - 4/a (t - t0 - 3/4 a), 3/4 a < t - t0 <= a}
   }]

Plot[f4[t, 1, 0], {t, -3, 3}]

f3[t_, a_, t0_] := Evaluate[Integrate[f4[t, a, t0], t]]

Plot[f3[t, 1, 0], {t, -3, 3}, PlotRange -> All]


  • Prev by Date: Re: Hyperlinks
  • Next by Date: Re: Table Format Problem
  • Previous by thread: Re: dual y-axis plotting - is it possible in mathematica?
  • Next by thread: Re: Integrate and Piecewise