Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: derivation of a picewise defined function

  • To: mathgroup at
  • Subject: [mg46139] Re: derivation of a picewise defined function
  • From: bobhanlon at (Bob Hanlon)
  • Date: Sat, 7 Feb 2004 23:35:58 -0500 (EST)
  • References: <bvvnam$j4h$>
  • Sender: owner-wri-mathgroup at

Use UnitStep
h[x_] := E^(x-1) + UnitStep[x-1]*(x -E^(x-1));
j[x_] := Evaluate[Simplify[h'[x]]];
(1 - E^(x - 1))*UnitStep[x - 1] + E^(x - 1)
Simplify[j[x], x<1]
E^(x - 1)
Simplify[j[x], x>1]
Bob Hanlon
In article <bvvnam$j4h$1 at>, "M.L. Bondar" <mbondar at>
<< 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

  • Prev by Date: Formal Definition of the Term "Form"
  • Next by Date: Re: how to test if 2 expressions are the same? Mathematica 5.0
  • Previous by thread: RE: derivation of a picewise defined function
  • Next by thread: random numbers?