MathGroup Archive 2007

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

Search the Archive

Re: Solve and Piecewise Functions


Use Reduce rather than Solve.

g=Piecewise[{{0,x<0},{2 x-x^2,0<=x<4},{16 x-x^2,x>=4}}];

h=x-2;

Reduce[g>=h,x]

x < 0 || 4 <= x <= (1/2)*(15 + Sqrt[233]) || 0 <= x <= 2


Bob Hanlon

---- Michael Madrid <mfmadrid at yahoo.com> wrote:
>
> I was hoping something like this:
>   
>   
>   Clear["*"]
>   g=Piecewise[{{0,x<0},{2 x-x^2,0<=x<4},{16 x-x^2,x=C2=B34}}]
>   h=x-2;
>   Solve[g=C5=A0h,x]
>   
>   
>   would give me a meaningful answer.  But all I get is this:
>   
>   
>   Solve[\[Piecewise]{
>   {0, x<0},
>   {2 x-x2, 0=C2=A3x<4},
>   {16 x-x2, x=C2=B34}
>   }=C5=A0-2+x,x]
>   
>   Any thoughts on how to do this?
>



  • Prev by Date: Re: little help needed
  • Next by Date: Re: Re: change $UserDocumentsDirectory
  • Previous by thread: Solve and Piecewise Functions
  • Next by thread: Re: Solve and Piecewise Functions