## 400 Reputation

7 years, 277 days

## How add legend to a dataplot? ...

Maple 2017

Hello

I need to add a legend to a figure using dataplot (I am not even sure that is the right option).  In what follows I show what I did.

```dataplot([28,28,28],[.6481496576, .648149657615473, .6512873548],style='point',colorscheme=["Blue","Orange","Red"],
labels = ["k", "y(k)"], legend = ["10-digit precision", "15-digit precision", "Floating-point iteration"] ,legendstyle = [font = ["HELVETICA", 9], location = right]);
```

The outcome is

As can be seen some parts of the legend are missing.

How can I get this right? Do I have other ways to do the same thing?

Many thanks

Ed

## How to make Maple to integrate term by t...

Maple 2017

Hello

I wonder how integrate can be applied term by term to the following nonlinear differential equation

`(diff(y(t), t))*(diff(y(t), t, t, t))-(diff(y(t), t))*y(t)^2-(diff(y(t), t))*(diff(y(t), t, t))-(diff(y(t), t))*A*y(t)`

The expected output will be something like

`(diff(y(t), t))*(diff(y(t), t, t))-(1/3)*y(t)^3-(1/2)*A*y(t)^2-(1/2)*(diff(y(t), t))^2+C+int((diff(y(s), s, s))^2, s = 0 .. t)`
`map(x-> integrate(x,t),(diff(y(t), t))*(diff(y(t), t, t, t))-(diff(y(t), t))*y(t)^2-(diff(y(t), t))*(diff(y(t), t, t))-(diff(y(t), t))*A*y(t))`

solves most of it but not the first part.

Many thanks

Ed

## How to recover only the contents of m-fi...

Maple 2017

Hello

I know that anames( 'user' ) recovers the contents of the workspace but I wonder whether it would be possible to recover only the contents of each m-file read within a worksheet.

Many thanks

Ed

## How to solve or reduce a set of nonlinea...

Maple 2018

Hello

I need to solve or reduce (similar to the command Reduce in Mathematica) sets of nonlinear equations.  One such example is shown below:

`eqns := {-1+theta[3, 6] = 0, 1-theta[3, 6] = 0, alpha+rho-theta[2, 2]+theta[3, 3] = 0, -theta[3, 6]^2+1 = 0, theta[2, 2]*theta[3, 6]-alpha = 0, theta[2, 2]*theta[3, 6]^2-alpha = 0, -2*theta[3, 3]*theta[3, 6]-2*rho = 0, theta[1, 2]*theta[2, 1]*theta[3, 6]^2+1 = 0, -alpha^2+rho^2+theta[2, 2]^2-theta[3, 3]^2 = 0, -theta[2, 2]^2*theta[3, 6]+2*theta[2, 2]*theta[3, 3]*theta[3, 6]+alpha^2+2*alpha*rho = 0, -theta[1, 3]*theta[2, 2]^2*theta[3, 0]+theta[1, 3]*theta[2, 2]*theta[3, 0]*theta[3, 3]-alpha^2*beta-alpha*beta*rho = 0, -theta[1, 2]*theta[2, 1]*theta[2, 2]*theta[3, 6]+2*theta[1, 2]*theta[2, 1]*theta[3, 3]*theta[3, 6]-alpha-2*rho = 0, -theta[1, 2]*theta[2, 1]*theta[2, 2]*theta[3, 3]+theta[1, 2]*theta[2, 1]*theta[3, 3]^2+theta[1, 3]*theta[2, 2]*theta[3, 0]*theta[3, 6]+alpha*beta+alpha*rho+rho^2 = 0, -alpha^2*rho-alpha*rho^2+theta[1, 2]*theta[2, 1]*theta[2, 2]-theta[1, 2]*theta[2, 1]*theta[3, 3]+theta[1, 3]*theta[3, 0]*theta[3, 6]-theta[2, 2]^2*theta[3, 3]+theta[2, 2]*theta[3, 3]^2+alpha+beta+rho = 0}`

and the indeterminates are:

`fc := {theta[1, 2], theta[1, 3], theta[2, 1], theta[2, 2], theta[3, 0], theta[3, 3], theta[3, 6]}`

Since I do know the solution, I issued the following command to check for typos.

```seq(subs(theta[1,2]=-1,theta[1,3]=-1,theta[2,1]=1,theta[2,2]=alpha,theta[3,0]=beta,theta[3,3]=-rho,theta[3,6]=1,eqns[i]),i=1..nops(eqns))
```

and the outcome is zero for all equations.

When I try the command solve as follows:

`solve(eqns,fc);`

the result is

`{theta[1, 2] = theta[1, 2], theta[1, 3] = theta[1, 3], theta[2, 1] = -1/theta[1, 2], theta[2, 2] = alpha, theta[3, 0] = -beta/theta[1, 3], theta[3, 3] = -rho, theta[3, 6] = 1}`

that should be right but it is not what I am expecting.

How can maple return the solution needed?

Some sets of solutions do not have a solution as the one above.  Some indeterminates cannot be found, is there a way maple returns the solution of the ones that can be solved and reduced the set of equations into two parts, solved ones e non solved ones?  I can provide an example if needed.

Many thanks.

Ed

## How to save modules as package...

Hello

I have a couple of functions wrapped into a module and want to make them available as a package.  The two modules have been saved as a mpl file.   I read and tried to follow the instructions on the online help (11. Writing packages) but even copying line by line of commands there, they simply did not work at all.

Problems:

1) After following the instructions on how to add a home dir into libname and saved it .mapleinit (I guess) I issued the commands

`restart; libname;`

my lib path is not there anymore.

.mapleinit shows

libname := "mylibdir", libname:

libname:="/Users/eduardo/maple/toolbox/personal/lib", libname:

2) After issuing savelib, I did

`LibraryTools:-ShowContents(libname[1]);`

that returns [];

Could you send me a set of commands showing how to do it, please?

Many thanks

Ed

PS.  My next step is to write help files for each one of the functions.

 First 7 8 9 10 11 12 13 Page 9 of 13
﻿