# Question:Solving a set of equations: want to get numeric floating values

## Question:Solving a set of equations: want to get numeric floating values

Maple

I wish to solve three linear simultaneous equations and obtain the solutions in floating point form.

the following works...

solvec:=fsolve({T+N1-m1=0, N2-N1-m2=0,T-N2-m3=0}, {T,N1,N2});

...but the solutions are given in either symbolic, or equation form.  I would like numbers - floating point form.

Below is my attempt to solve this.  with(plots) & with(plottools) is not necessary for this - but I was doing some related graphic work.  I did try with(RealDomain), but it seemedto make little difference.  I have done a copy & paste of an rtf file, but the Maple output has not come out so well.  Any help would be appreciated.

> restart:

with(plots):

with(plottools):

with(RealDomain);

#Masses in kg (or pounds!)

m1:=70.0:m2:=25.0:m3:=3.0:

#Equations

solvec:=fsolve({T+N1-m1=0, N2-N1-m2=0,T-N2-m3=0}, {T,N1,N2});

#Above gives the solutions in symbolic or equation form, as well as putting the solutions in a set.  How can the programme distinguish between the various values?

# From here is my attempt to form floating point values – to no avail.

NTab:=convert([solvec],table);

N1A:=evalf(solvefor[N1](T+N1-m1*g=0, N2-N1-m2*g=0,T-N2-m3*g=0));

N1B:=convert(N1A, float);

#Problem to isolate the solutions in the vector in floating form,

#and also get the correct ones.  NB the solution is a set - not an ordered list.

maxvec:=max(solvec[1],solvec[2],solvec[3]);

#maxvec:=convert(max(solvec[1],solvec[2],solvec[3]), float);

maxvec:=convert(solvec[2], float);

solvec[2];

whattype(solvec[2]);

type(N2,symbol);

type(solvec[2],equation);

N2_fl:=evalf(solvec[2]);

N2_fl:=convert(solvec[2], float);

N3:=N2_fl+3;

#T:=(m1+m2+m3)/2;

#N1:=(m1-m2-m3)/2;

#N2:=T-m2;

OUTPUT:

Error, (in simpl/max) arguments must be of type algebraic

Error, (in simpl/relopsum) invalid terms in sum

﻿