Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #7492
| From | Szabolcs Horvát <szhorvat@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: FindRoot and replacement rule |
| Date | 2011-12-30 12:19 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jdka99$8gm$1@smc.vnet.net> (permalink) |
| References | <jdh68h$kjj$1@smc.vnet.net> |
On 2011.12.29. 8:52, SamTakoy wrote:
> Hi,
>
> Just wondering why FindRoot and other solvers return substitution
> rules rather than simply a list of solutions. What's the advantage?
>
If you have more than one variable, Mathematica needs a way to tell you
which value belongs to which variable.
Consider the following from the docs:
sol = Solve[a x + y == 7 && b x - y == 1, {x, y}]
If it simply returned {{8/(a + b), -((a - 7 b)/(a + b))}}, (using the
order of variables instead of explicit names), this would be a lot more
work to substitute back to the original equation.
With the current method equation /. sol[[1]] will substitute back the
first solution easily.
--
Szabolcs Horvát
Matheamtica QA site proposal: http://area51.stackexchange.com/proposals/37304
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread
FindRoot and replacement rule SamTakoy <pavelgrinfeld@gmail.com> - 2011-12-29 07:52 +0000 Re: FindRoot and replacement rule Helen Read <readhpr@gmail.com> - 2011-12-30 12:17 +0000 Re: FindRoot and replacement rule Szabolcs Horvát <szhorvat@gmail.com> - 2011-12-30 12:19 +0000
csiph-web