Re: simple modification of Solve
- To: mathgroup at smc.vnet.net
 - Subject: [mg72706] Re: simple modification of Solve
 - From: "dimitris" <dimmechan at yahoo.com>
 - Date: Tue, 16 Jan 2007 02:39:22 -0500 (EST)
 - References: <eofjfh$hgk$1@smc.vnet.net>
 
Thanks to Bob Hanlon for his resonse
Dimitris
dimitris wrote:
> I introduce the following trivial modification of (the output of) Solve
>
> solveMod[eq_Equal, x_] :=
>    ({x -> #1[[1]], If[Length[#1] > 1, StringJoin[ToString[Length[#1]],
> "-ple root"], "simple root"]} & ) /@
>     Split[x /. Solve[eq, x]]//(TableForm[#1, TableAlignments -> Center,
> TableHeadings -> {None, {"root\n", "multiplicity\n"}}] & )
>
> Here is a simple application
>
> solveMod[(x - 1)^2*x*(x - 3)^3*(x + 5)^5*(x + 2) == 0, x]
>
> I look for other possible similar one-liners.
> Any response will be greatly appreciate.
> 
> Dimitris