## Maple Questions and Posts

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

Even though dsolve is great, I'm just curious as to how the "Add an initial condition" menu choice works in the Standard Mode. If I enter a simple equation like this: diff(y(x),x)=0; I would like to create the initial condition that y(0)=6. I right-click, add an initial condition and blue "reply" text comes up that looks like the IC I would enter for dsolve. However, I can't edit that IC, and it just generally does nothing. How would I go about this? Thanks, /Ivan

## Using a lowess filter...

I have some 2-dimensional data to which I would like to fit a curve. The data is not functional, i.e. there can be multiple values of y for a given x. The curve should be continuous, but otherwise I have little idea about what form it should take. Maple provides a really nice way to plot one such curve: Statistics[ScatterPlot] with the lowess option. But I do not want to just plot the curve. I would also like to do computations with the curve. For example, I would like to compute the sum of squared residuals. What is the best way to get the curve (as a procedure, say)?

## slightly strange strange plot behaviour

by: Maple

Does anyone else see the following strange behaviour in the Maple 11 plot engine?

I was acting in a Std GUI Worksheet, not a Document. (I use Maple for 64bit Linux, which may or may not matter.)

1) In this next plot below, a (superfluous?) solid triangle appears. It lies in a xz-parallel plane at y=-1, with vertices (0.0,0.0,0.0), (1.0,-1.0,0.4), and (1.0,-1.0,0.0).

plot3d(sqrt(1-y^2),x=1..2,y=-1..1,colour=red,filled=true,view=[-0..2,-1..1,0..1]);

## I can´t get any output; I just get the instruction...

I´ve just programed some procedures. Those procedures don´t have any syntax errors. But after the execution I don´t obtain any result, I get only the instruction to execute. Where´s the problem?

## Smoothing a curve...

I am trying to plot a graph of 3sin(3x) that is being displayed as choppy lines. How do I get it to display smoother? Thanks, glenn

## Rotate curves around axis to make a solid?...

Can anyone point me to a tutorial or something to show me how to take 2 curves and rotate them around an axis to form a 3D solid? thanks, glenn

## Defaulting Fonts...

I'm trying to set my default font and type set for my documents and worksheets but can't find where to do so. Using Mac OS and Maple 11. If I turn off bold for example and hit return it turns it back on. Even tried selecting entire document content and turning bold off but still when I hit enter it goes back to bold. What gives? thanks, glenn

## Working with 3D Plots (Product Balls)...

A colleague recently approached me with this problem: Given two sets S1 and S2 in R^3, define the "product ball" of S1 and S2 to be the set of all points in R^3 obtained as the componentwise product of a point in S1 and a point in S2. That is, PB(S1,S2) = { (a*x,b*y,c*z) : (a,b,c) in S1 and (x,y,z) in S2 }. Can Maple help me to visualize this set? For a concrete example, let S1 = { (x,y,z) : max( abs(z), abs(x)+abs(y) ) = 1 } and S2 = { (x,y,z) : max( abs(y), abs(x)+abs(z) ) = 1 } In this case it can be shown that PB(S1,S2) consists of the following eight parametric surfaces: (x,y,z) = ( s*t, 1-s, 1-t), s=0..1, t=0..1

## Obtaining all roots I.A.W. De Moivre's theorem...

Is there a command for obtaining "ALL" n roots of the nth root of a real or complex number in accordance with DeMoivre's theorem? For example there are three cube roots of unity, namely 1,-1/2+sqrt(3)/2*i, and -1/2-sqrt(3)/2*i

## separate subexpressions according to its variables...

Hello, suppose I have an expression that consists of a multiplication of subexpressions involving only one variable, for example a_m(z) = a(m) * f(z) How can I retrieve a(m) and f(z) resp. separately? That is, I would like to be able to identify only those subexpressions involving that one variable in which I am interested. For instance, how can I retrieve a(m) from a_m(z)? I have tried using select( depends, op(factor(a_m(z))), m ), but is this bullet proof and/or is there a better solution? Thanks in advance, Regards, Franky.

## Tip: Transpose a pair of indices of an Array

Maple
A note added: Although the coding below is correct, it has clearly been superseeded by the following two entries contributed by acer: Entry 1 and Entry 2. As in any fairytale (even though this blog of mine certainly is not) it takes three of something (at least according to the fairytales of my fellow-countryman H. C. Andersen). Todays entry is the third and last (at least for now) in a row of three consecutive ones dealing with manipulations of indices of Arrays. The other two entries are Tip: Index an Array and Tip: Permute the indices of an Array.

## Pls help me check this problem of "Kernel connecti... when i am using CodeGeneration for Matlab in this file, the Maple gives out this error of "Kernel connection has been lost". But when I tried other cased of CodeGeneration for Matlab, sometimes it is working well.

## Creating a caption that contains 2-D math

by: Maple
In Maple 11, we added the ability to put captions on a plot. To do this, just use the 'caption' option with any plotting command, in the same way you'd use the 'title' option. These options are described in the plot/options help page. One additional change we made in Maple 11 for these two options is to allow the right-hand-side of the option equation to be a list containing the title or caption, followed by a 'font' suboption. So now you can use title=["my title", font=[times, bold, 20]] instead of having to specify the font separately with the 'titlefont' option. You can also display 2-D math in captions, titles and other text elements in a 2-D plot. To do this, simply use the mathematical expression as the option value: e.g. caption=x^2/2. To combine math with plain text, wrap everything in a 'typeset' structure: caption=typeset("my plot of ", x^2/2). If you enter the plotting command in 2-D math, you can use the palettes to build the expression directly in the command.