Message from discussion
Want to 'Solve' a piecewise equation for a common term
Path: g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!novia!newspump.sol.net!161.49.252.4.MISMATCH!sxnews1.qg.com!newsfeeds.sol.net!posts.news.twtelecom.net!nnrp3.twtelecom.net!not-for-mail
From: "misno...@gmail.com" <misno...@gmail.com>
Newsgroups: comp.soft-sys.math.mathematica
Subject: Want to 'Solve' a piecewise equation for a common term
Date: Fri, 3 Aug 2007 10:48:49 +0000 (UTC)
Organization: Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Sender: st...@smc.vnet.net
Approved: Steven M. Christensen <st...@smc.vnet.net>, Moderator
Message-ID: <f8v16h$d96$1@smc.vnet.net>
Lines: 29
NNTP-Posting-Date: 03 Aug 2007 10:48:00 GMT
NNTP-Posting-Host: bdd0ad31.news.twtelecom.net
X-Trace: DXC=QGFAC;M\L9<G9T[HIVmA74C_A=>8kQj6=14\NmbkV;i=[;P3\56\S57EFiONJ7[Go6WdgAjI?UY24
X-Complaints-To: abuse@twtelecom.net
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?