## 1400 Reputation

18 years, 298 days
University of Twente (retired)
Enschede, Netherlands

My "website" consists of a Maple Manual in Dutch

## Two ways...

`x*[n];`

or

``x[n]`;`

## Another possibility...

Convert the lists to vectors and calculate the innerproduct:

`evalf(Vector(X).Vector(ln~(Y)));`

## Remove quotes...

You have to remove the unevaluation quotes around cat("Element ",j)

```seq( TEXT([.5*(X[B[j]]+X[EN[j]]), .5*(Y[B[j]]+Y[EN[j]])], cat("Element ", j),
ALIGNBELOW, ALIGNRIGHT),  j = 1 .. 2 );```

TEXT([0.5 X[B[1]] + 0.5 X[EN[1]], 0.5 Y[B[1]] + 0.5 Y[EN[1]]],

"Element 1", ALIGNBELOW, ALIGNRIGHT), TEXT(

[0.5 X[B[2]] + 0.5 X[EN[2]], 0.5 Y[B[2]] + 0.5 Y[EN[2]]],

"Element 2", ALIGNBELOW, ALIGNRIGHT)

## Use typeset...

```plots:-textplot( [M2,1.15*P2,typeset(``(M2,1.15*P2))] );
```

## evalf...

Replace

`y[0] := (1/4)*Pi;`

by

`y[0] := evalf((1/4)*Pi);`

## Spline of degree 1...

If you don't care about the values of the piecewise function for x<xmin or x>xmax , then the easiest way is:

`f := CurveFitting:-Spline([[0,2],[3,-2],[7,6],[9,5]], x, degree=1 );`

## Not possible...

Your example is a function R3R2,, so there cannot exist an inverse.

## To build an Array...

Because the number of rows is not fixed in advance, you can better build a sequence of rows. Not that I also made your global R local:

`S := proc (x, a, b, s)`
`  local R; global y;`
`  R := NULL: # initialization`
`  for y from a by s to b while y < 1`
`  do R := R, [y,ListTools:-FindMinimalElement(select(type, [fsolve(f(x) = 0)], positive ))] # the next row`
`  end do;`
`  Array([R]) # form the Array as output`

end proc;

Now you can get the Array by

`R := S(...);`

## Some other problems...

What do you mean by "evaluate"? If you want to view the entries of the matrix, right click on the output and choose "browse" , or make the maximum size of shown matrices larger by

`interface(rtablesize=11);`

There are two other problems:

(1) You use e^... for exponentials. This must be: exp(...)

(2) There is an undefined function vb

## Which matrices?...

(1) Are the first two lines meant as assignments? Then you have to use z1 := ... instead of z1 = ...

(2) z1 and z2 are lists (not matrices), consisting of 10 elements. In eq1 you have powers of  z1 and z2 , so these must be square matrices. But what do you mean by the square root of a matrix?

## Current directory...

The command

`currentdir();`

returns the desired string

## Implicitplot...

The solution of the ODE is given in implicit form. So you can use implicitplot to plot solutions for different values of _C1:

`plots:-implicitplot( [s], x=-4..4, y=-4..4, gridrefine=2 );`

## General case...

You must substitute x2=1/x2b etc. for all variables in the denominator. So try:

`k := indets(denom(f)):`
`s := a -> a=1/a||b:`
`eval(f,s~(k));`

## Which "Basis"?...

The packages LinearAlgebra and Groebner both have a command "Basis".  You load LinearAlgebra after Groebner, so when Basis is used, it is the LinearAlgebra-version. So: omit the statement with(LinearAlgebra) - don't forget to restart -, or, if you need both packages, do:

Groebner:-Basis( ...

## Don't use D...

Because D is the name of the differential operator, try for instance

`D(sin);`

see ?D

So, use another symbol instead of D.

 5 6 7 8 9 10 11 Last Page 7 of 27
﻿