8 years, 24 days

## How to build a system of linear equation...

Maple 2017

Hello

I need to build a system of linear equations from a list of polynomials.  The list of indeterminates is as follows:

`incog:=[theta[1, 1], theta[1, 2], theta[2, 1], theta[2, 2], theta[2, 6], theta[3, 0], theta[3, 3], theta[3, 4], theta[3, 5]];`

The list of polynomials is:

`eq:=[1, theta[1, 1]+theta[2, 2]+theta[3, 3], -theta[1, 1]-theta[2, 2], theta[2, 6]*theta[3, 5], -theta[1, 1]*theta[3, 3]-theta[2, 2]*theta[3, 3], -theta[1, 1]*theta[2, 6]*theta[3, 5]+theta[1, 2]*theta[2, 6]*theta[3, 4], theta[1, 1]*theta[2, 2]*theta[3, 3]-theta[1, 2]*theta[2, 1]*theta[3, 3]+theta[1, 2]*theta[2, 6]*theta[3, 0]];`

eq[1], eq[2] and eq[5] will be used as examples, although all of them should be used.

In eq[1], there are no indeterminates, therefore the first line of the matrix related to the system of equations is:

[0, 0, 0, 0, 0, 0, 0, 0, 0]

In eq[2], there is a summation of  three indeterminates and the outcome is a set of three lines (summation of indeterminates)

[1, 0, 0, 0, 0, 0, 0, 0, 0]

[0, 0, 0, 1, 0, 0, 0, 0, 0]

[0, 0, 0, 0, 0, 0, 1, 0, 0]

In eq[5], there is a summation of a product of indeterminates and outcome is a set of two lines as follows:

[1, 0, 0, 0, 0, 0, 1, 0, 0]

[0, 0, 0, 1, 0, 0, 1, 0, 0]

Carrying on like this will result in a matrix of 14 lines with zeros and ones in positions related to the indeterminates.  Building the matrix is what matters to me.

I have a thousand of such problems with different indeterminates and set of polynomials.

Any ideas on how to build a function to automatically create the matrices would be most appreciated.

Thank you.

Cheers

Ed

## Invalid Subscript selector - Maple 14...

Maple 14

Hello

The following maple command returns an error in Maple 14 (internal error in Typesetting ... "invalid subscript selector") but not in Maple 2017.

f:=(l::list)-> eval([y,y*z-x,-15*x*y-x*z-x],[x,y,z]=~l):

What did I miss?

Many thanks

Ed

## Help on using dsolve...

Maple 2017

Hello

I am using Maple to solve a couple of differential equations.  Here is what I did so far

```k := 141/10000;
yB0 := 296/1000;
e := -148/1000;
Ff0 := 67844/1000;
Far0 := 323066/1000;
FB0 := 135688/1000;
P0 := 10;
x0 := 0;
a := 38/1000;
dsys:={diff(x(w),w)=(k*((yB0*p(w)*(1 - x(w)))/(1 + e*x(w)))^(1/3)*(Ff0/(Far0 + FB0)*p(w)*((Ff0/FB0 - 1/2*x(w))/(1 + e*x(w))))^(2/3))/FB0,
diff(p(w),w)=P0*(-a)/(2*p(w)/P0)*(1 + e*x(w)),x(0)=x0,p(0)=P0}:
dsn1:≔dsolve(dsys,numeric,[x(w),p(w)],stiff=true);

```

Maple returns neither an error message or a solution.   I am sure I have mistyped something or did not understand how dsolve works at all.

Can you help me out?

Many thanks

Ed

PS. How to plot the solution?

## How to remove the frame box on plot:-dis...

Maple 2017

Hello

I have a series of plots saved in fig0 (fig0:=rtable(1..number_of_figures);).  I had them plotted using plot:-display(fig0) but I could not figure out how to remove the frame box that separates each figure nor how to control the space between them when using size.

An exaggerated example follows

Many thanks

Ed

## Problem when iterating a discrete map...

Hello

After getting help from users on this list, I wrote an example on how to iterate a discrete map using a given initial condition as follows:

```restart:with(ListTools):
NestList := proc (f, x, n::nonnegint, nprec::posint := 10) local R, k; R := rtable(0 .. n, [x]); Digits := nprec; for k to n do R[k] := expand(f(R[k-1])) end do; [seq(R)] end proc:
logistic := proc (x) options operator, arrow; 4*x*(1-x) end proc:
fp := [solve((logistic@@5)(x) = x, x)]:
cfp := allvalues(fp[5]);
nstep:=12:
p := nstep+50;
aaa := Flatten(map(`~`[Re], evalf(NestList(logistic, evalf(cfp), p))));
dat := [seq([i-nstep-1, aaa[i]], i = 1 .. p)];
plot(dat, style = pointline, symbol = solidcircle, symbolsize = 4, thickness = 0, view = [default, 0 .. 1]);
```

The result should be a period 5 and some chaotic data due to machine precision. However the trajectory ejected to infinity. I have tried with a different initial condition, say 0.1, and it worked just fine. Even if the precision is increased, the trajectory (orbit) will eventually eject to infinity.  I couldn't spot what is wrong.

I am running Maple 2017 on linux and on a mac.

Many thanks

Ed

 First 10 11 12 13 14 15 Page 12 of 15
﻿