MathGroup Archive 2004

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

Search the Archive

RE: derivation of a picewise defined function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg46118] RE: [mg46098] derivation of a picewise defined function
  • From: "David Park" <djmp at earthlink.net>
  • Date: Sat, 7 Feb 2004 04:02:00 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Luiza,

When one wants to do calculus on piecewise functions it is best to define
them with the UnitStep function.

h[x_] := E^(x - 1) + (x - E^(x - 1))UnitStep[x - 1]

Plot[h[x], {x, 0, 2},
    Frame -> True,
    PlotRange -> {0, 2}];

j[x_] = h'[x]
E^(-1 + x) + (-E^(-1 + x) + x)*DiracDelta[-1 + x] +
  (1 - E^(-1 + x))*UnitStep[-1 + x]

Plot[j[x], {x, 0, 2},
    Frame -> True,
    PlotRange -> {0, 2}];

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/




From: M.L. Bondar [mailto:mbondar at win.tue.nl]
To: mathgroup at smc.vnet.net

Hi,

I have the following problem. I need to work with the first derivative
of a picewise defined function.

A simple example :

h[x_] := x /; 1 <= x
h[x_] := E^(x - 1) /; x <= 1

I define
j[x_] := h'[x]

For 1<= x j[x] computes the values, j[x]=1 for all 1<=x, but for
x<=1 it returnes me j[x]=h'[x].

I need also the values of j for x<=1. How can I do that with
Mathematica?

Thank you.

Luiza



  • Prev by Date: Re: time serie -> sum inside a loop
  • Next by Date: Re: Polylogarithm Integration - Bis
  • Previous by thread: Re: derivation of a picewise defined function
  • Next by thread: Re: derivation of a picewise defined function