Maple 12 Hands-On Demonstration

14
Maple 12 Reviewer's Guide 1 Maple 12 Reviewer's Guide - Hands-On Demonstration Overview This demonstration is designed to give you hands-on experience with Maple 12. By following the step-by- step instructions, you will enter expressions, perform mathematical operations, and create and annotate plots. Along the way, you will have the opportunity to try many new Maple 12 features, including polar plots, dials, headers and footers, and the Exploration Assistant. At the end of this document, you will find links to applications that demonstrate Maple 12's new control systems design tools and CAD connectivity. To try this material on your own, start with an empty Maple document. Perform the steps found in the left column of each table below. The results of each step are displayed in the right column for your reference. Note for non-Windows users: The keystrokes given in this document are for Windows. There will be differences for other platforms. If you are using a different platform, see Help > Quick Help for the list of the most common keystrokes.

description

demon

Transcript of Maple 12 Hands-On Demonstration

Page 1: Maple 12 Hands-On Demonstration

Maple 12 Reviewer's Guide

1

Maple 12 Reviewer's Guide - Hands-On Demonstration

OverviewThis demonstration is designed to give you hands-on experience with Maple 12. By following the step-by-step instructions, you will enter expressions, perform mathematical operations, and create and annotate plots. Along the way, you will have the opportunity to try many new Maple 12 features, including polar plots, dials, headers and footers, and the Exploration Assistant. At the end of this document, you will find links to applications that demonstrate Maple 12's new control systems design tools and CAD connectivity.

To try this material on your own, start with an empty Maple document. Perform the steps found in the left column of each table below. The results of each step are displayed in the right column for your reference.

Note for non-Windows users: The keystrokes given in this document are for Windows. There will be differences for other platforms. If you are using a different platform, see Help > Quick Help for the list of the most common keystrokes.

Page 2: Maple 12 Hands-On Demonstration

Maple 12 Reviewer's Guide

2

Introduction to Maple 12

Steps Results

Entering Equations

When you launch Maple you start with a blank document, with menus and toolbars at the top, palettes on the side. At the cursor, you can start typing math. To enter the expression shown on the right,

Type 1-x^2•

Highlight the expression and type " / " The cursor will automatically bring you to the denominator.

Type 1+x^2•

Note: Notice that the exponents and fractions are formatted automatically as you type. To get out of a superscript or fraction, press [right arrow].

1Kx2

1Cx2

Using Context Menus

You can use Maple's context menus to perform a wide variety of mathematical and other operations.

Place your cursor on the expression, and right-click. The context menu offers several operationsto choose from according to the expression that you are using. To integrate this expression, select Integrate, then x.

To plot the result of the integration, right-click onthe result, and then select Plots > 2-D Plot.

The context menus are self-documenting. The text above the arrow shows what operation has been performed.

1Kx2

1Cx2 integrate w.r.t. x

KxC2 arctanx /

xK10 K5 0 5 10

K6

K4

K2

2

4

6

Page 3: Maple 12 Hands-On Demonstration

Maple 12 Reviewer's Guide

3

Changing the Problem

Mathematics in a Maple document is live. You can go back, make changes, and re-execute the problem to obtain a new result.

Go back to your original calculation of 1Kx2

1Cx2•

Place the cursor in front of the x2 in the numerator.

Enter 1/3 so the expression reads1K

13

x2

1Cx2 •

Highlight the entire line, including the plot, then click the execute button, , found at the top of

the Maple document.

All selected calculations are updated. •

1K

13

x2

1Cx2

integrate w.r.t. xK

13

xC43

arctanx

/

xK10 K5 0 5 10

K1

K0.5

0.5

1

Adding a Second Plot

In Maple, adding a new curve to an existing plot is as easy as dragging and dropping.

Highlight the expression 1K

13

x2

1Cx2 with your

mouse, hold down the [Ctrl] key and drag it onto the plot.

1K

13

x2

1Cx2

integrate w.r.t. xK

13

xC43

arctanx

/

xK10 K5 0 5 10

K1

K0.5

0.5

1

Page 4: Maple 12 Hands-On Demonstration

Maple 12 Reviewer's Guide

4

Plot Annotations

Graphs can be manipulated and customized using the context-sensitive menus.

Right-click the plot area and select Axes>Toggle Gridlines.

Select one of the curves by left-clicking on it. The curve should be highlighted. Then right-clickon it and select Line>Dash.

Right-click again and select Color>Blue.•

To zoom in on the plot, select from the

Plot toolbar. Left-click on the graph and, while holding down the mouse-button, move your mouse up to zoom in, down to zoom out.

To pan the plot, select from the Plot

toolbar. Left-click on the graph and, while holding down the mouse-button, move your mouse to pan the plot.

1K

13

x2

1Cx2

integrate w.r.t. xK

13

xC43

arctanx

/

xK10 K5 0 5 10

K1

K0.5

0.5

1

Palettes and Symbol Completion

Maple has over 1000 palette symbols within the over 20 palette menus. The Expression Palette contains fill-in-the-blank templates for common operations such as integrals and derivatives.

Maple also has a Symbol Completion mechanism which provides an alternative to palettes for enteringsymbols such as π, N, and Greek letters. When using symbol completion, you type the first few characters of the symbol's name, then press[Ctrl][Space].Maple will provide a list of possible choices for completion.

In this example, we will use palettes and symbol completion to create the expression

e

54

sin θ

K2 cos 2 θ , which represents the field intensity of an antenna.

Page 5: Maple 12 Hands-On Demonstration

Maple 12 Reviewer's Guide

5

Open the expression palette (click on "Expression" on the left-hand side of your Mapledocument) and click the ea button. The exponent placeholder is selected automatically.

Start entering the exponent: 5/4 [right arrow] sin(

To enter θ, type: theta [Ctrl][space], then select the θ symbol from the pop-up menu.

Type the final ), then use [right arrow] to leave the exponent

Enter the remaining expression: - 2 cos(2 theta [Ctrl][space])

e

54

sin θ

K2cos 2 θ

Page 6: Maple 12 Hands-On Demonstration

Maple 12 Reviewer's Guide

6

Interactive Plot Builder

Plotting is made easy in Maple. You can use thePlot Builder Assistant, one of many interactive task assistants in Maple, to create a variety of styles of 2-D and 3-D plots and animations, including thenew polar plot.

Right-click the previous expression and selectPlots>Plot Builder>2-D Polar Plot>Plot

To label the plot, first select the plot then click on from the taskbar

Select the Line button and draw the lines for the beam range. Double-click to finish the line segment. If you single click, use [Esc] to drop the second line segment.

To draw the arrow, first draw a line where you would like the arrow to be. Select the line so it ishighlighted. From the Drawing toolbox selectLine Styles, then select an arrow head.

Finally select the Text button and click on the drawing where you would like to enter the label text.

To change the color of the lines, select a line so itis highlighted then click to select

the color.

e

54

sin θ

K2 cos 2 θ /

0 1 2 3 4 50

π

4

π

23 π4

π

5 π4

3 π2

7 π4

Main Beam

Page 7: Maple 12 Hands-On Demonstration

Maple 12 Reviewer's Guide

7

Dials, Gauges, and other Components

Users can interact with your application through buttons, sliders, and other point-and-click tools, without having to know how to use Maple. Maple 12 provides many new components particularly suited to engineering applications, such as dials, meters, and gauges.

We will create a dial which controls on of the parameters of the antenna, and updates a plot accordingly.

Open the Components palette and drag a Dial

and Plot into your work

area.

Dial PropertiesTo set the dial properties for this application, right-click on the dial and select Component Properties. Change the following properties:Value at Lowest Position: 1Value at Highest Position: 10Current Position: 8Spacing of Major Tick Marks: 1Spacing of Minor Tick Marks: 1

0 2 4 6 8 100

π

4

π

23 π4

π

5 π4

3 π2

7 π4

Page 8: Maple 12 Hands-On Demonstration

Maple 12 Reviewer's Guide

8

Click Edit next to Action When Value Changes.We will tell Maple to update the plot based on the setting of the dial.

Enter or copy/paste the following code into the dialog box. Be sure to place it before the end use; command, as shown below.

Page 9: Maple 12 Hands-On Demonstration

Maple 12 Reviewer's Guide

9

val := Do(%Dial0);

Do(%Plot0 = plots[polarplot](exp(

(5/4)*sin(theta))-val*cos(2*theta),

theta = 0 .. 2*Pi));

Press OK, and then OK.

To turn the dial, hold down the left mouse button and drag. The plot will update as the dial is changed.

Page 10: Maple 12 Hands-On Demonstration

Maple 12 Reviewer's Guide

10

Formatting a Document

Maple has many word-processing tools available to allow you to turn your explorations into polished technical documents.

To organize this document into collapsible sections:

Highlight the work done on the first equation

1K13

x2

1Cx2, including the plot.

Select Enclose from the toolbar. Left-

click next to the gray arrow and enter the title:Usability

Highlight the remainder of the document and select Enclose.

Left-click next to the gray arrow and enter the title: Visualization

Note: To expand/collapse all sections at once, selectView>Expand All or Collapse All.

Usability

1K

13

x2

1Cx2

integrate w.r.t. xK

13

xC43

arctanx

/

xK10 K5 0 5 10

K1

K0.5

0.5

1

Visualization

Page 11: Maple 12 Hands-On Demonstration

Maple 12 Reviewer's Guide

11

• •

• •

Headers & Footers - New!

For printed documents, you can add headers and footers to each page. Select from predefined options, or customize your headers and footers.

Select View>Header Footer. Select the predefined header ,Date,Page.

Select the tab Custom Footer. In Center typeMaple 12 Demonstration.

Select Print Preview to preview the document.•

Further ExplorationsIn this section, you can start a new blank document, or work directly from this document.

Exploration Assistant - New!

The Exploration Assistant allows you to instantly create interactive mini-applications used to explore the parameters of expressions. For this example we will explore the integral:

sin x a$cos x b dx

To enter this expression yourself, select the indefinite integral from the Expression palette,

then enter the remainder of the expression (don't forget to use ^ for superscript and right arrow to get out of superscript). You can also copy it from above, or simply work directly inside this document.

Right click on the expression and select Explore.

Page 12: Maple 12 Hands-On Demonstration

Maple 12 Reviewer's Guide

12

• •

• •

• •

• •

Check skip for variable x.

A new document window will open with the function and sliders. Move the sliders to see the results for the given parameter values. The result will look similar to the image below.

Exploring sin x a$$$$cos x b dx

The Exploration Assistant works for plots as well.

Enter the expression

plot sin a$x C cos b$x , x = 0 ..10

You can also copy it from above, or simply work directly inside this document.

Right-click on the expression and select Explore.

Page 13: Maple 12 Hands-On Demonstration

Maple 12 Reviewer's Guide

13

• • A new document window will open with a plot and sliders. Move the sliders to see the results for the given parameter values. The result will look similar to the image below.

Exploring the plot of sin ax CCCC cos bx

Page 14: Maple 12 Hands-On Demonstration

Maple 12 Reviewer's Guide

14

Control Systems Design Tool - New!

Maple includes a suite of powerful routines for defining and analyzing dynamic system models, which are essential in control systems development. To see an example of the calculations and plots that can be done in the Dynamic Systems package, go toHelp> Take a Tour of Maple and select Control System Design Tools, or follow this link.

To see a complete application using these tools, go to Help> Take a Tour of Maple and select DC Motor Control Design, or follow this link.

CAD Connectivity - New!

Maple 12 adds important analysis capabilities to CAD systems, giving CAD users the ability to use Maple's computational power to analyze and optimize designs. Using Maple, CAD users can answer such questions as “What are the mathematical relationships between objects?” and “How do changes to object properties impact other objects?”

To see an example go to Help> Take a Tour of Maple and select Radiator Sizing, or follow this link.

Note: You can view this example even if you do not have a CAD system installed.