MathGroup Archive 2007

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

Search the Archive

Want to 'Solve' a piecewise equation for a common term

  • To: mathgroup at smc.vnet.net
  • Subject: [mg79756] Want to 'Solve' a piecewise equation for a common term
  • From: "misnomer at gmail.com" <misnomer at gmail.com>
  • Date: Fri, 3 Aug 2007 06:34:57 -0400 (EDT)

I've been battling to try to get a solution to my equation, but it
requires solving of a piecewise function, which I cannot work out how
to do. Say I have a piecewise function of the form

temp = Piecewise[{
     { 2*N*x, x < 0},
     { N*x,    x >= 0}
}]

I want to either solve this via
Solve[1==temp, N]
and either get, with the inequalities,

N -> Piecewise[{
    {1/(2*x), x < 0},
    {1/x, x >= 0}
}]

or just get mathematica to realise that there is a common term - N,
and factor it out to, say,
N * Piecewise[{
     {2*x, x < 0},
     {x, x >= 0}
}]
from where solve can handle it perfectly well.

Is this type of operation possible, or am I stuck editing them by hand?



  • Prev by Date: Re: Ploting solution sets to compound inequalites
  • Next by Date: Integration with non-numeric parameters
  • Previous by thread: Re: Convective diffusion equation in 2D
  • Next by thread: Re: Want to 'Solve' a piecewise equation for a common term