Message Boards Message Boards

0
|
2893 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Help with system of equations: not numerical solutions but expressions

Hi, I compute the following:

Solve [{130858(28341+x)==(21125+z)(59784+y),115387(6008+y)==(36596+z)(82117+x), 151649(3611+z)==(45855+x)(38993+y)},{x,y,z}]

And I get solutions like

(130082943356883 + (
5068514317 (752163187 - Sqrt[
2228925658784478865]))/261716 - (752163187 - Sqrt[
2228925658784478865])^2/523432)/3806040195

Why it is not giving a simple number? Why it is not computing a number and instead gives an expression?

Thanks!

POSTED BY: Javier Segovia
2 Replies

Using exact numbers Solve give you exact solution.Try:

sol = Solve[{130858 (28341 + x) == (21125 + z) (59784 + y), 
   115387 (6008 + y) == (36596 + z) (82117 + x), 
   151649 (3611 + z) == (45855 + x) (38993 + y)}, {x, y, z}]
N[sol]
(* {{x -> -197504., y -> -190642., z -> 148038.}, {x -> -197504., 
  y -> 109379., z -> -151983.}, {x -> 102517., y -> -190642., 
  z -> -151983.}, {x -> -2830.53, y -> 30133.1, 
  z -> 16000.8}, {x -> 8578.47, y -> 43071.8, z -> 25845.7}} *)

NSolve is a numeric solver.

NSolve[{130858 (28341 + x) == (21125 + z) (59784 + y), 
  115387 (6008 + y) == (36596 + z) (82117 + x), 
  151649 (3611 + z) == (45855 + x) (38993 + y)}, {x, y, z}]

  (* {{x -> -197504., y -> -190642., z -> 148038.}, {x -> -197504., 
       y -> 109379., z -> -151983.}, {x -> 102517., y -> -190642., 
       z -> -151983.}, {x -> -2830.53, y -> 30133.1, 
       z -> 16000.8}, {x -> 8578.47, y -> 43071.8, z -> 25845.7}} *)
POSTED BY: Mariusz Iwaniuk

Big thanks Mariusz, it worked!!!

PS: I am new, I guess this is basic, my apologies

POSTED BY: Javier Segovia
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract