MathGroup Archive 2005

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

Search the Archive

Re: [Newbie] Interpreting output

  • To: mathgroup at smc.vnet.net
  • Subject: [mg56657] Re: [Newbie] Interpreting output
  • From: David Bailey <dave at Remove_Thisdbailey.co.uk>
  • Date: Mon, 2 May 2005 01:32:39 -0400 (EDT)
  • References: <d51nl8$cu9$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

You  really can't expect to take the derivative of a function defined by 
an arbitrary definition like that! D is meant to be used on algebraic 
expressions. However, you can define functions using Piecewise to do 
what you want. For example:

f[x_,c_]=Piecewise[{{x,x<c},{x-1,x\[GreaterEqual]c}}]

D[f[x,c],x]//FullSimplify

1


Having said that, I rather think that answer should contain a Dirac 
delta function to cover the discontinuity at x=c!

David Bailey
dbaileyconsultancy.co.uk


  • Prev by Date: Creating forms for user input in Mathematica
  • Next by Date: Re: [Newbie] Interpreting output
  • Previous by thread: Re: Interpreting output
  • Next by thread: Re: [Newbie] Interpreting output