Re: Solve and Piecewise Functions
- To: mathgroup at smc.vnet.net
- Subject: [mg76425] Re: [mg76392] Solve and Piecewise Functions
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Tue, 22 May 2007 02:44:32 -0400 (EDT)
- Reply-to: hanlonr at cox.net
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?
>