Re: NSolve problem
- To: mathgroup at smc.vnet.net
- Subject: [mg59657] Re: NSolve problem
- From: Paul Abbott <paul at physics.uwa.edu.au>
- Date: Tue, 16 Aug 2005 04:39:46 -0400 (EDT)
- Organization: The University of Western Australia
- References: <dcsc67$q0k$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In article <dcsc67$q0k$1 at smc.vnet.net>, Enrique Zeleny <ezeleny at fcfm.buap.mx> wrote: > I f I try to solve these equations > > Solve[{2 x + 3 y == 8 + I 7, > 3 x + y == 5 + 7 I, -2 I x + (1 + 3 I) y == 3 + 5 I}] > > the result is > > {{x -> 1 + 2*I, y -> 2 + I}} > > but if I have > > Solve[{2 x + 3 y == 8 + I 7, > 3 x + y == 4.99999999999999 + 7 I, -2 I x + (1 + 3 I) y == 3 + 5 I}] Others have explained the answer returned by Mathematica. Here is another approach, suitable since you have linear equations. [1] Load the LinearAlgebra stubs: << LinearAlgebra` [2] Determine the matrix A, and right-hand side b: {A, b} = LinearEquationsToMatrices[ {2*x + 3*y == 8 + I*7, 3*x + y == 4.99999999999999 + 7*I, (1 + 3*I)*y - 2*I*x == 3 + 5*I}, {x, y}] [3] Solve using LinearSolve: LinearSolve[A,b] Cheers, Paul -- Paul Abbott Phone: +61 8 6488 2734 School of Physics, M013 Fax: +61 8 6488 1014 The University of Western Australia (CRICOS Provider No 00126G) AUSTRALIA http://physics.uwa.edu.au/~paul http://InternationalMathematicaSymposium.org/IMS2005/