Items tagged with 2dmath 2dmath Tagged Items Feed

i noticed members use such tags in their post very rarely in mapleprimes

and i am confused whether ?

there is a list of special html tags that are supported in "HTML Source Editor" of mapleprimes

that are compatible with it ? or all tags described in html5 or html4 are compatible ?

i just tested a few of those tags and they work excellent ...



I would like to display mathematical expressions on a plot.


I am using the following command on the code edit region of Maple 15 worksheet, intending to show the maths on a plot.

t := plots:-textplot([x, y, typeset(a[0]=1)], align = above): #where x and y are the position



is the series expansion for the following expression bugged in maple or am I missing some crucial thing of series?


results in epsilon^-1 -2 -2*ln(2)

for xmaple 16.01. The console version does not add the wrong term "-2".

Apparently it works here: 

How does one change a previous Atomic setting back to non-Atomic?  This seems so simple, but I can't find anyway to Undo this change.  


I am using Maple 11.  When I set up an equation, I can see an easy solution by visual inspection but when I have Maple solve the equation then use real numbers the results are different!  What is going on??  I have uploaded my worksheet which shows the discrepancy. 



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.)



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.


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:


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




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,



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.

Here is a hacked-up and short `convert/identifier` procedure.

The shortness of the procedure should is a hint that it's not super robust. But it can be handy, in some simple display situations.

If I had made into a single procedure (named `G`, or whatever) then I could have declared its first parameter as x::uneval and thus avoided the need for placing single-right (uneval) quotes around certain examples. But for fun I wanted it to be an extension of `convert`. And while I could code special-evaluation rules on my `convert` extension I suppose that there no point in doing so since `convert` itself doesn't have such rules.

For the first two examples below I also typed in the equivalent expressions in 2D Math input mode, and then used the right-click context-menu to convert to Atomic Identifier. Some simple items come out the same, while some other come out with a different underlying structure and display.



end proc:

convert( 'sqrt(4)', identifier);









convert( 'int(BesselJ(0,Pi*sqrt(t)),t)', identifier);

`#mrow(mo("∫"),mrow(msub(mi("J",fontstyle = "normal",msemantics = "BesselJ"),mn("0")),mo("⁡"),mfenced(mrow(mi("π"),mo("⁢"),msqrt(mi("t"))))),mspace(width = "0.3em"),mo("ⅆ"),mi("t"))`


`#mrow(mo("∫"),mrow(msub(mi("J",fontstyle = "normal",msemantics = "BesselJ"),mn("0")),mo("⁡"),mfenced(mrow(mi("π"),mo("⁢"),msqrt(mi("t"))))),mspace(width = "0.3em"),mo("ⅆ"),mi("t"))`

`#mrow(mo("∫"),msub(mo("J"),mn("0")),mfenced(mrow(mi("π",fontstyle = "normal"),mo("⁢"),msqrt(mi("t")))),mo("⁢"),mo("ⅆ"),mi("t"))`

`#mrow(mo("∫"),msub(mo("J"),mn("0")),mfenced(mrow(mi("π",fontstyle = "normal"),mo("⁢"),msqrt(mi("t")))),mo("⁢"),mo("ⅆ"),mi("t"))`


convert( Vector[row](['Zeta(0.5)', a.b.c, 'limit(sin(x)/x,x=0)', q*s*t]), identifier);

Vector[row](4, {(1) = Zeta(.5), (2) = a.b.c, (3) = limit(sin(x)/x, x = 0), (4) = q*s*t})


Vector[row](4, {(1) = Zeta(.5), (2) = a.b.c, (3) = limit(sin(x)/x, x = 0), (4) = q*s*t})



As it stands this hack may be useful in a pinch for demos and purely visual effect, but unless it's robustified then it won't allow you to programmatically generate atomic names which match and inter-operate computationally with those from the context-menu conversion. Identifiers (names) with similar typeset appearance still have to match exactly if they are to be properly compared, added, subtracted with each other.

Extra points for commenting that the round-brackets (eg. in function-application) are displayed as black while the rest is in blue by default, if you have a workaround.  That also happens when using the usual context-menu driven convert-to-atomic-identifier of the Standard GUI.

Extra points for noticing that function names like `sin` are italicized and not in an upright font, if you have a workaround. How to discern which instances of fontstyle="normal" should be removed?

Points off for commenting that this whole hack doesn't provide anything new or extra for getting around automatic simplification.  :)

This is a one-liner hack. But maybe together we could turn it into something that closely matched what the context-menu generates.


Hi everyone,
While I am getting more and more comfortable with the document mode, I have some questions regarding the document block feature:
- What is a document block good for anyway?
- Why not have the whole document in one block?
- Can one join two document blocks?
- when do I "remove the document block"
- How can I make sure that say an informational 2-D math expression inside a document block never gets executed?
-- Can I still...

can you help me about multiplication :

when I type a multiplication in Maple 15, Can I skip the multiplication sign between two variable?

for example : instead of type  x*y , could I type xy ?

Hi..I need to plot the slope field for a diffEQ and having problems. I have a Maple 14 program that I just had to reinstall due to a virus and hoping that isn't the problem.  I'm very new to Maple and I'm not a good programmer, so any light you can shed on my problems would be much appreciated.  When I enter the problem, I don't get any error message or anything...just a blank return!  This is what I tried:


DEplot (diff (y(x...

I'm trying to plot a function but I recieved the error :

Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct.

It seems its simply because the function is a bit complicated, because I get the correct plot with eaither part of the function separated. Its my function:


Hi all,

I am now helping with the first year maple session in my university. Recently, some of the student are learning both 1-d and 2-d input.

Now we have something like this:


Is this some sort of bug?

I know it has something to do with the 1-d or 2-d or math input, but in short, that's what happens.


There are many ways to enter the second derivative in Maple.  Except for some silly reason I am stuck trying to figure out or find out how to enter it in 2d math form. 

d2    f

Entering it like d^2 (right arrow) f  / (dx^2)  is not the right way to enter it.  What is the right way?

1 2 Page 1 of 2