Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'piecewise hiccup' topicStudent Support Forum > General > "piecewise hiccup"

Next Comment >Help | Reply To Topic
Author Comment/Response
ray
03/27/10 5:13pm

If I take {10,x=-2} out of piecewise, the formulaton works, but if it stays in, mathematica complaints that "General::ivar: -2. is not a valid variable. >>" I don't understand the problem here??

ClearAll["`*"]
f[x_]=Piecewise[{{x-x^2,x<-2},{10,x=-2},{-5x,x>-2}}]
a=-2
Factor[Numerator[f[x]]]
f[x]//Simplify
fm=Limit[f[x],x->a,Direction->1]
fm1=Limit[f[x],x->a,Direction->-1]
f[a]
Plot[{f[x],fm},{x,-10,9},AxesOrigin->{0,0}]

URL: ,

Subject (listing for 'piecewise hiccup')
Author Date Posted
piecewise hiccup ray 03/27/10 5:13pm
Re: piecewise hiccup Tom 03/28/10 2:53pm
Re: piecewise hiccup Nasser M. Ab... 03/28/10 8:36pm
Next Comment >Help | Reply To Topic