       Re: Problem with Solve and O[x]

• To: mathgroup at christensen.cybernetics.net
• Subject: [mg1261] Re: Problem with Solve and O[x]
• From: rolfm at rulgm4.LeidenUniv.nl (Rolf Mertig)
• Date: Mon, 29 May 1995 03:18:51 -0400
• Organization: Leiden University, The Netherlands

```Steve Trainoff (steve at tweedledee.ucsb.edu) wrote:
> It appears the Solve and O[x] don't mix.  Consider the following.

> Mathematica 2.0 for NeXT
> Copyright 1988-91 Wolfram Research, Inc.

> In:= Solve[x+z==1,x]

> Out= {{x -> 1 - z}}

> In:= Solve[x+z==1+O[z],x]

> Out= {{x -> 1}}	(* I would prefer x -> 1 + O[z] *)

> In:= Solve[x+z==1+O[z]^2,x]

> Out= {}		(* What is wrong with x -> 1 + z + O[z]^2 ??? *)

> --

> ..STeve
> ------------------------------------
> Insert pithy maxim here...
> steve at tweedledee.ucsb.edu (NeXT mail)

In:= Solve2[y__]:=Block[{d},Apply[Solve,{y}/.SeriesData->d]/.d->SeriesData]

In:= Solve2[x+z==1+O[z],x]

Out= {{x -> 1 + O[z]}}

In:= Solve2[x+z==1+O[z]^2,x]

2
Out= {{x -> 1 - z + O[z] }}

Like in every more complicated system some things don't work as one
expects in Mathematica (besides the usual bugs there are just more
potential uses than originally imagined and thought of by the makers).

The nice thing about the better systems (like Mathematica) is that
one can usually write (sometimes short, sometimes long)
straightforward work-arounds (eventually some exegetic study of
the manual might be necessary).

In fact, there should be a server (or WWW-page?) (not mathsource,
it's very full) where people can
up- and down-load different work-arounds for different functions ( I have stuff
like Cases2, Coefficient2, Collect2, Expand2, Factor2, FactorTerms2,
FreeQ2, Series2, Write2, Zeta2 ).

Rolf

```

• Prev by Date: Summary: equating a variable with its value
• Next by Date: Strange behavior of Polygon...
• Previous by thread: Re: Problem with Solve and O[x]
• Next by thread: strings into lists