Re: [Newbie] Interpreting output
- To: mathgroup at smc.vnet.net
- Subject: [mg56650] Re: [mg56642] [Newbie] Interpreting output
- From: Chris Chiasson <chris.chiasson at gmail.com>
- Date: Sun, 1 May 2005 03:13:32 -0400 (EDT)
- References: <200505010446.AAA13098@smc.vnet.net>
- Reply-to: Chris Chiasson <chris.chiasson at gmail.com>
- Sender: owner-wri-mathgroup at wolfram.com
Remember that the Set ( = )commands are really just "continually" applied rules, sometimes with (possibly conditional) patterns. They aren't too "smart" when it comes to conditional derivatives. You can tell Mathematica exactly what you want it to do though: f[x_/;x>0]=x; f[x_/;x<0]=-x^2; Plot[f[x],{x,-2,2}] Derivative[1][f][x_/;x>0]=D[x,x]; Derivative[1][f][x_/;x<0]=D[-x^2,x]; Plot[f'[x],{x,-2,2}] On 5/1/05, MC <daemmerung at enttaeuschung.com> wrote: > Hi everybody.... > > I'm having troubles in interpreting the output of Mathematica. > > My problem is to define a function F(x,y,z) such that: > F = (whatever) if x>c > F=(whatever) if x<=c > > I achievied this using /; > > When I derive F with respect to one of the variables, the result is a mess. > Just an example with 1 variable: > > f=x/;x>0; > f=-x^2/;x<0; > > D[f,x]=-2Condition(1,0)[x^2,x<0]+Condition(1,0)[x^2,x<0]Less(1,0)[x,0] > > Even in this very simple case, the result is a real mess: > I really do not know how should I read that...and I'm wondering if > I have defined the function in the right way. > > Anybody so kind to explain me what's goung on? > > Thank you very much for your patience > > -- Chris Chiasson http://chrischiasson.com Kettering University Mechanical Engineering Graduate Student 1 810 265 3161
- References:
- [Newbie] Interpreting output
- From: "MC" <daemmerung@enttaeuschung.com>
- [Newbie] Interpreting output