Maple 16 Questions and Posts

These are Posts and Questions associated with the product, Maple 16

I am playing around with the PolynomialFit command in maple.
If I want to get a return of 1% then I can simply plug in the return at time t
for v in the expression below. That works for all different returns.

I tried to use multiple light sources with transparency for 3D plots and could not get it to work.  There are indications in the plot,structure help that this is supposed to be possible.  I have attached a worksheet that demonstrates some of the problems with the "light" and "LIGHT" options for 3D plotting.  Much of the output has been removed since the graphics take so much space.  The same plots are generated in both Windows and Linux.

Does anyone...

Apart from the online description of this new Maple 16 feature here, there is also the help-page for subexpressionmenu.

I don't know of a complete listing of its current functionality, but the key thing is that it acts in context. By that I mean that the choice of displayed actions depends on the kind of subexpression that one has selected with the mouse cursor.

Apart from arithmetic operations, rearrangements and some normalizations of equations, and plot previews, one of the more interesting pieces of functionality is the various trigonometric substitutions. Some of the formulaic trig substitutions provide functionality that has otherwise been previously (I think) needed in Maple.

In Maple 16 it is now much easier to do some trigonometric identity solving, step by step.

Here is an example executed in a worksheet. (This was produced by merely selecting subexpressions of the output at each step, and waiting briefly for the new Smart Popup menus to appear automatically. I did not right-click and use the traditional context-sensitive menus. I did not have to type in any of the red input lines below: the GUI inserts them as a convenience, for reproduction. This is not a screen-grab movie, however, and doesn't visbily show my mouse cursor selections. See the 2D Math version further below for an alternate look and feel.)

expr:=sin(3*a)=3*sin(a)-4*sin(a)^3:

expr;

sin(3*a) = 3*sin(a)-4*sin(a)^3

# full angle reduction identity: sin(3*a)=-sin(a)^3+3*cos(a)^2*sin(a)
-sin(a)^3+3*cos(a)^2*sin(a) = 3*sin(a)-4*sin(a)^3;

-sin(a)^3+3*cos(a)^2*sin(a) = 3*sin(a)-4*sin(a)^3

# subtract -sin(a)^3 from both sides
(-sin(a)^3+3*cos(a)^2*sin(a) = 3*sin(a)-4*sin(a)^3) -~ (-sin(a)^3);

3*cos(a)^2*sin(a) = 3*sin(a)-3*sin(a)^3

# divide both sides by 3
(3*cos(a)^2*sin(a) = 3*sin(a)-3*sin(a)^3) /~ (3);

cos(a)^2*sin(a) = sin(a)-sin(a)^3

# divide both sides by sin(a)
(cos(a)^2*sin(a) = sin(a)-sin(a)^3) /~ (sin(a));

cos(a)^2 = (sin(a)-sin(a)^3)/sin(a)

# normal 1/sin(a)*(sin(a)-sin(a)^3)
cos(a)^2 = normal(1/sin(a)*(sin(a)-sin(a)^3));

cos(a)^2 = 1-sin(a)^2

# Pythagoras identity: cos(a)^2=1-sin(a)^2
1-sin(a)^2 = 1-sin(a)^2;

1-sin(a)^2 = 1-sin(a)^2

 

The very first step above could also be done as a pair of simpler sin(x+y) reductions involving sin(2*a+a) and sin(a+a), depending on what one allows onself to use. There's room for improvement to this whole approach, but it looks like progress.

Download trigident1.mw

In a Document, rather than using 1D Maple notation in a Worksheet as above, the actions get documented in the more usual way, similar to context-menus, with annotated arrows between lines.

expr := sin(3*a) = 3*sin(a)-4*sin(a)^3:

expr

sin(3*a) = 3*sin(a)-4*sin(a)^3

(->)

2*cos(a)*sin(2*a)-sin(a) = 3*sin(a)-4*sin(a)^3

(->)

4*cos(a)^2*sin(a)-sin(a) = 3*sin(a)-4*sin(a)^3

(->)

4*cos(a)^2*sin(a) = 4*sin(a)-4*sin(a)^3

(->)

cos(a)^2*sin(a) = sin(a)-sin(a)^3

(->)

cos(a)^2 = (sin(a)-sin(a)^3)/sin(a)

(->)

cos(a)^2 = 1-sin(a)^2

(->)

1-sin(a)^2 = 1-sin(a)^2

(->)

1 = 1

``

Download trigident2.mw

 

I am not quite sure what is the best way to try and get some of the trig handling in a more programmatic way, ie. by using the "names" of the various transformational formulas. But some experts here may discover such by examination of the code. Ie,

eval(SubexpressionMenu);

showstat(SubexpressionMenu::TrigHandler);

The above can leads to noticing the following (undocumented) difference, for example,

> trigsubs(sin(2*a));
              
                                 1       2 tan(a)
[-sin(-2 a), 2 sin(a) cos(a), --------, -----------,
                              csc(2 a)            2
                                        1 + tan(a)

    -1/2 I (exp(2 I a) - exp(-2 I a)), 2 sin(a) cos(a), 2 sin(a) cos(a)]

> trigsubs(sin(2*a),annotate=true);

["odd function" = -sin(-2 a), "double angle" = 2 sin(a) cos(a),

                               1                       2 tan(a)
    "reciprocal function" = --------, "Weierstrass" = -----------,
                            csc(2 a)                            2
                                                      1 + tan(a)

    "Euler" = -1/2 I (exp(2 I a) - exp(-2 I a)),

    "angle reduction" = 2 sin(a) cos(a),

    "full angle reduction" = 2 sin(a) cos(a)]

And that could lead one to try constructions such as,

> map(rhs,indets(trigsubs(sin(a),annotate=true),
>                identical("double angle")=anything));

                             {2 sin(a/2) cos(a/2)}

Since the `annotate=true` option for `trigsubs` is not documented in Maple 16 there is more potential here for useful functionality.

Hi all,

Im trying to use the solve command to solve the eqn:= 40 = x arccosh(56/x) for x. The command solve(eqn, x) only provides the left solution(for low values of x) while I know there must be a solution as well for higher values of x. How can I get Maple to look at the other solution?

Thanks in advance!

 

Hi everyone, Im trying to solve a catenary problem. x is defined in terms of y1, y2, and a. But in my case a is the only unknown. I try to express a in terms of x, y1 and y2 by the following script:

> x := a*arccosh((y1+a)/a)+a*arccosh((y2+a)/a);

/y1 + a\ /y2 + a\
a arccosh|----------| + a arccosh|--------|
\ a / \ a /

> solve(x, a);

...


I want to animate the display of a polygon. It's the platform of a stewart gough rig. Have 200 poses stored as Platformi i i=2..200. the Base is static( obiviously). Haven't been able to figure out how to get    animate(display .....) to work. The work sheet just contains copy/pasted commands. The time period for the animated display is about 10 seconds but real time is not that important. How do I get this to work?

Hello everyone,

I have been trying to use MAPLE 16 for Boolean algebra computations. BooleanSimplify( ) command in Logic-Mathematics is giving me incorrect results, in the following code:

with(Logic):

f:=(not(x1)and not(x2) and not(x3)) or (x1 and x2 and x4);   #Create a 4 variable function f

g:=((x1 and x2) or (x2 and x3)) or (x3 and x4);    #Create another 4 variable function g

f2:=f &or g;

f3:=Canonicalize(f2,{x1,x2,x3,x4},form=DNF...

Hi:

For many reasons, until recently, I have been always using Classic interface under Maple through Maple 16. When trying Maple 16 with Java interface I have noticed several quirks which were not present under the Classic interface of earlier versions through (at least) Maple 13. One of them is this:

The shortcut keys such as CTRL+Insert and SHIFT+Insert do not work and I am forced to use a mouse and copy/paste icons in Maple. This really slows down my keyboard...

 

Hi

 

I want to solve the equation of

F'''(x)+F(x)*F''(x)=0

with the following  boundary conditions

F(-5)=F'(-5)=0

F'(5)=0.14

for solving it numerically in the computational domain of [-5...5]. I have seprated the domain into two parts and the governing equation and boundary condition in each domain is assumed as follows


g'''(x)+g(x)*g''(x)=0
g(0)=alpha
g(-5)=0
g'(-5)=0

When using "plotsetup(png,...)" the third rotational angle is ignored.  Attached are a worksheet and the corresponding three plots that demonstrate this bug.

Dear everyone,

 

  Hello,

 

  I have a question about how to get the power 'n' in an expression "(x+y)^n". For instance, I have a Maple code

 

******

eq1:=4*x^n*y^m+(x+y)^n+x^3;

f1:=map(t -> `if`(match(t = c*y^d, y, 's'), subs(s,d), NULL),
      convert(eq1, list));
f2:=map(t -> `if`(match(t = c*x^d, x, 's'), subs(s,d), NULL),
      convert(eq1, list));

Hello,

I am experiencing wrong results using the PolynomialIdeals package in Maple 16 (see radical_error.mw). Creating the same ideal with different generators, the radicals computed differ which of course is wrong:

with(PolynomialIdeals);
J := <t*(a+A), A*(b+B+t), b*(a+A), B*a-A*(b+t), (variables = {A, B, a, b, t})>:
J2 := <t*(a+A), A*(b+B+t), b*(a+A), B*(a+A...

Hello everyone,

 

  I have a file, e.g.'helloworld.txt'. It cotains

 

hello 3 5 7
world 1 2 6

 

 If I use

  L1:=readdata(`D:\helloworld.txt`,3):
print(L1);

 I just got a "[]"

 

How can I get the data from the file which has many word?

 

Thank you very much in advance

 

When I use ImportMatrix to import a MATLAB mat file, I get a list of names and values. Should I write a "for" loop to assign them in Maple or there is an easier way to do it?

I have got the following instructions of computing the required trajectories (orbits). They have been done with Maple V3. I cannot get them going with Maple 16. I have just started with Maple and cannot see the mistake in the instruction. Can anybody help me? Thanks!


> with(LinearAlgebra);
> "A, B = Payoff matrices for players";
> A := matrix(2, 2, [4, 2, 1, 3]); B := matrix(2, 2, [1, 4, 3, 2]);
> "T defines the time interval [0,T], s is the step length";

First 34 35 36 37 38 39 40 Page 36 of 40