## 155 Reputation

12 years, 150 days

## "solve" with arbitary number of variable...

Maple 18

Hi,

Suppose I have the following code

***

f[1]:=x1^2+x2;
f[2]:=-x2^3+x1-2;

solve({f[1], f[2]}, {x1, x2}):
a,b:= eval([x1, x2], %[1])[]:
a, b;

***

It could work and give me "1 and -1".

I would like to have a general subroutine, solving f[1]...f[n]. I cannot input  "solve({f[1], f[2],....,f[n]}, {x1, x2}):" just like that. Is ther any way to use "solve" or similar module to handle arbitary number of variables?

## Subtract values of variables in "Polynom...

Maple 18

Hi,

I have the following code for using "PolynomialSystem" solve equations of polynomial

*********

with(SolveTools):

f:=PolynomialSystem({x+y-3, x^2+y^2-5}, {x, y}):

print(x,y);
print(f);
f[1];f[2];
a:=f[1][1];b:=f[1][2];
print(a,b);
c:=-evalf(a);d:=-evalf(b);

****************

The output is

***

x, y
{x = 2, y = 1}, {x = 1, y = 2}
{x = 2, y = 1}
{x = 1, y = 2}
x = 2
y = 1
x = 2, y = 1
-x = -2.
-y = -1.

***

From what I have seen, I cannot subtract the values of x and y as 2 and 1. Is there any way that I can get the values of solutions of variables, namely I can assign a variable "a" as 2, and the other variable "b" as 1?

Thank you very much!

## How to set the output format as xxx e-5 ...

Maple

I tried to run a few calculation on maple, the numerical output is, e.g.

0.3 10^(-5)

Is there any simple way to set it as 0.3e-5? I am not intened to write the data into a file, hence, i am not sure if writedata is a suitable option.

Thank you very much!

## Performance of maple on Windows vs Linux...

Hi,

Is there any benchmark of the performance of maple on windows 7 64 bit vs linux, especially in solving generalized eigenvalue problem?

Thank you very much

## Extracting coefficient in Taylor and Lau...

Maple

Hi,

Excuse me, I tried to substract in a series expansion. It works for Taylor-type expansion, but not Laurent-type ones

*********

ffff:=1/(t-3);
ggg:=taylor(ffff,t=infinity,3);
coeff(ggg,t,-1);

ffff:=exp(t);
ggg:=taylor(ffff,t=0,3);
coeff(ggg,t,1);

*********

Maple gives me

Error, unable to compute coeff

1

. My question is, why "coeff" does not work in the first case? how to make it work? Though I can copy the expansion part, assign it to another variable, and "coeff" will work

 2 3 4 5 6 7 8 Page 4 of 10
﻿