Newsgroups: comp.soft-sys.math.mathematica
From: Jean-Marc Gulliet <jeanmarc.gull...@gmail.com>
Date: Sat, 4 Aug 2007 10:17:56 +0000 (UTC)
Local: Sat 4 Aug 2007 11:17
Subject: Re: Want to 'Solve' a piecewise equation for a common term
misno...@gmail.com wrote: Use *Reduce* for it knows how to handle correctly expressions with > 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[{ > I want to either solve this via > N -> Piecewise[{ > or just get mathematica to realise that there is a common term - N, > Is this type of operation possible, or am I stuck editing them by hand? *Piecewise*. In[1]:= temp = Piecewise[{{2*n*x, x < 0}, {n*x, x >= 0}}]; Out[2]= (x > 0 && n == 1/x) || (x < 0 && n == 1/(2 x)) In[3]:= Reduce[1 == n*Piecewise[{{2*x, x < 0}, {x, x >= 0}}], n] Out[3]= (x > 0 && n == 1/x) || (x < 0 && n == 1/(2 x)) *Solve* does /not/ know what to do with *Piecewise*. In[4]:= Solve[1 == n*Piecewise[{{2*x, x < 0}, {x, x >= 0}}], n] Out[4]= {{n -> 1/\[Piecewise] { (Also, note that I have replaced capital N by n because N has already a Regards, You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||