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 1996

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

Search the Archive

Re: question

  • To: mathgroup at
  • Subject: [mg4098] Re: question
  • From: rhall2 at (hall robert)
  • Date: Tue, 4 Jun 1996 02:17:59 -0400
  • Organization: University of Maryland, Baltimore County
  • Sender: owner-wri-mathgroup at

In article <4obem1$na9 at>,
Zvi Wiener  <mswiener at> wrote:

>I think there is something strange in the following lines:
>yy[x_]:=Max[ x-1, 0];
>D[ yy[x], x]/.x->2
>   (0,1)
>Max     [0, 1]
>D[Sin[x], x]/.x->2
>Of course the function Max is not everywhere differentiable, but I would
>expect to get something like step function and at least value 1 at the point
>where the function is smooth.
>How I can avoid the trouble of defining the derivative of Max?  Is the
>problem only with evaluating the expressoin before differentiating or it is
>general property of dealing with not every where differentiable functions?

According to The Book, Mathematica tries to find an explicit value 
for a derivative. The derivative of the sine is the cosine, and 
Cos[2] is an explicit value. The derivative of Max[] has no 
corresponding function, so Mathematica treats it as it would 
g[x - 1, 0]. Try the following:

  Max[D[x - 1, x], 0] /. x -> 2

This allows Mathematica to take a derivative it can find a value for.

Bob Hall            | "Know thyself? Absurd direction!
rhall2 at  |  Bubbles bear no introspection."  -Khushhal Khan Khatak


  • Prev by Date: Please Help
  • Next by Date: Re: Question?
  • Previous by thread: Please Help
  • Next by thread: Re: Question?