X
تبلیغات
نماشا

قرآن در کامپیوتر

دانلود نرم افزار های قرآنی یه صورت رایگان

راهنمای استفاده از Maple 6

در ادامه مطلب راهنمای استفاده Maple 6 به زبان انگلیسی گذاشته شده است

Maple New User's Tour

This worksheet is the starting point of the New User's Tour.

Maple is a complete mathematical problem-solving environment that supports a wide variety of mathematical operations such as numerical analysis, symbolic algebra, and graphics. In this session, you will sample some of the more than 3000 commands that solve problems from basic arithmetic to General Relativity Theory. Maple offers interactive mathematical visualization, a graphical user interface with real math input and output, word-processing facilities, and a full programming language, making it the tool of choice for users worldwide in education, research, and industry.
>

The New User's Tour presents the fundamental Maple commands that every user should be aware of. The tour covers many areas of Maple, including: The Maple Worksheet Environment, Numerical Calculations, Algebraic Computations, Graphics, Calculus, Differential Equations, Linear Algebra, Finance and Statistics, Programming, and Online Help. The tour is easy to proceed through, and it can take up to two hours if all topics are examined.

Please note that some parts of this tour are computationally intensive. Depending on your computer system, you may want to close any other memory-intensive applications before continuing the tour.


(1) Working Through the New User's Tour

The New User's Tour presents a series of examples that illustrate some of the more common Maple commands, organized by subject area. In most cases, the worksheets are set up for you so that you execute the commands to get an overview of possible Maple commands and functions in that area. In some cases, you may copy commands to new worksheets to try different options on them.

Executing Commands
To execute commands in the New User's Tour (and any other) worksheets:
1. Place the cursor on the first command line (for example, 1+1; below) by using your mouse or the Tab key.
2. Press Enter.

Try this now:
> 1+1;

By pressing Enter, you also move the cursor to the next command line (in this case, limit( x-7, x=3 );)  in the worksheet.
> limit( x-7, x=3 );

Please note:
If you happen to place the cursor elsewhere in a worksheet, place it back on the appropriate command line before pressing Enter to continue.
It is important to execute the commands in order because some computations require results from previous command lines.

Important Notes
You cannot save over the existing New User's Tour worksheets, but you can save a copy of them in a different directory.
Each tour worksheet opens into a different window. These windows stay open until you specifically close them, or until you exit Maple. The Window menu lists all open windows. You can switch to a different window by selecting its name from that list.
Occasionally you are referred to a help page for more information. To get that information, place your cursor on the word that you want information about. From the Help menu, choose Help on word (where word is the word the cursor is on). For more information about the Maple help system, click (11) Online Help.

Other Maple Features
In the New User's Tour, all commands are entered using Maple notation. Commands can also be entered in the following ways.
Commands can be entered by using standard math notation.
You can insert mathematical symbols, expressions, and matrices from floating palettes instead of typing them in.
By right-clicking Maple results, you get a context-sensitive menu of commands that can be applied to that result.

When user interface items are mentioned in the New User's Tour, only the menu option method is provided. However, many of these items can also be chosen by clicking buttons in the toolbar or the context bar.

For more information on these alternative options, refer to the Learning Guide or the Maple help system.

Key terms
The following specialized terms are used in the New User's Tour.

Maple Input
Executable input, usually a mathematical expression, that Maple evaluates. The input is entered at the command prompt ( > ). By default, Maple input is displayed in red type, with a Courier font.

Maple Output
The result of an executed Maple input command. (And therefore sometimes simply called the result.) By default, it is displayed in blue type in standard math notation.

Execution Group
A set of Maple input with its corresponding output. Execution groups can also contain descriptive paragraphs.

Worksheet
In Maple, a document created with the graphical user interface. The files have an .mws extension.

Section
An element of a worksheet that provides structure. It can contain paragraphs, execution groups, and other sections (subsections). The start of a section is identified by a box with a [+] or [-] sign embedded in it. Sections can be expanded or contracted by clicking on that box. When expanded, the entire section has a vertical line down the left side of it that ends in a short horizontal line.

Standard Math Notation
Mathematics are displayed in a symbolic format similar in appearance to that found in a textbook.


2) The Worksheet Environment
Before examining this topic, please make sure that you have read (1) Working Through the New User's Tour.

Maple worksheets can serve as an interactive problem-solving environment, or as a system for generating technical documentation. This topic explains the various elements and features of Maple worksheets.

Interacting with Maple's Computational Engine
Execution groups and spreadsheets help you to interact with the Maple computational engine. They provide the primary means by which Maple is asked to carry out specific tasks and display the results. Maple commands can be entered into either of these.

Execution Groups
Execution groups are the fundamental computation elements in the worksheet. Their primary purpose is to combine one or more Maple commands and their results into a single re-executable unit. You can easily recognize an execution group by a square bracket immediately to the left of the command prompt.

> solve( a*x^2 = 4, {x} );

When you place the cursor on any command line in an execution group and press Enter, all commands in that group are executed in sequence and the results (or output) are displayed at the end of the execution group. The cursor is automatically advanced to the first command line in the next execution group.

In addition to Maple commands and their results, an execution group can contain descriptive paragraphs.  

Examples
The following execution group contains a paragraph and a Maple command line with one command. After you place the cursor on the command line and press Enter, it will also contain the command result.

A Maple command and the computed result.
> expand((a + b)^3);

New Maple worksheets begin with a single execution group containing a command prompt (as shown below). To create a new execution group within a worksheet, from the Insert menu, choose Execution Group, then Before Cursor or After Cursor. 

>

The results produced by a Maple command may be numeric, symbolic, or graphical. The following command generates a plot of a three-dimensional surface:
> plot3d( sin(x*y) , x = -2..2, y = -1..1 );
>


Spreadsheets
Maple allows you to enter spreadsheets that can contain both numeric and symbolic information. They combine Maple's math capabilities with the familiar row-and-column format of traditional spreadsheets.
You can use Maple's spreadsheets to generate tables of formulae. The following illustration is a Maple symbolic spreadsheet showing the integrals combining
> exp(x) with different formulae. The formulae in columns B and C depend on the formulae in column A.


Constructing and Executing Maple Commands
This section presents three primary means of creating Maple commands and results.

Typing Commands
You can execute commands by typing them at a Maple prompt, and pressing Enter. You can display commands as Maple notation or as standard math notation.

Using Context-sensitive Menus
Existing Maple results can be used to suggest and construct new actions. To obtain an on-screen list of suggested actions, right-click on a Maple object. (Option-click if you have only one mouse button.) The resulting list of actions is called a context-sensitive menu, because the items it contains vary depending on the properties of the selected object.

Try this out now. Copy the equation: Select it, and from the Edit menu, choose Copy. Create a new worksheet: From the File menu, choose New. (Switch between the worksheet and this one by using the Window menu.) Paste the equation at the command prompt: From the Edit menu, choose Paste. Type a semicolon at the end of the command line, and press Enter. Right-click (or option-click) on the result to see the context-sensitive menu. (Left-click elsewhere to close the menu without choosing an item.)

                                     2
                            z = sin(x  y)

You can also use the context-sensitive menus to plot expressions. Go back to your new worksheet, and right-click on the result again. From the context-sensitive menu, choose Plots, then Implicit 3-D Plot, then x,y,z as the desired permutation for the axes. You should arrive at the three-dimensional smart plot displayed below.
> smartplot3d[x,y,z](z = sin(x^2*y));


Dragging and Dropping
You can move Maple output to or from smart plots by using the mouse. When you drag the result of an evaluation to a smart plot, it will become a curve or surface. When you drag a curve or surface away from a set of axes, the corresponding expression will be placed in the worksheet.

Formulae may also be dragged from the worksheet into a cell of a spreadsheet, or from a cell of a spreadsheet to a worksheet.

Annotating and Structuring Documents
Paragraphs, sections, and hyperlinks exist to help you document and organize your results. This section describes how to use these features to make your worksheet document more interactive and usable.

Paragraphs and Text
A paragraph in a worksheet is analogous to a paragraph in a word processor. Paragraphs can contain styled text, inline mathematics, and graphics, including copies of Maple-generated output, such as plots. A paragraph can also be contained in an execution group.

Paragraphs are used for explanatory notes such as this. They are presented in black Times or Times New Roman font by default. The following sentences illustrate the types of formatting that you can easily apply to Maple paragraphs:

 1. Paragaphs can be centered.
2. They can be left-justified.
 3. They can be right-justified.
4. Text can be italicized and underlined, and it can be made bold.

5. The size and font of the text can easily be changed.

(Please note that you cannot change text in this worksheet, because it's set to "read only.")

As in word processors and desktop publishers, you can create your own paragraph and character styles for text. To do so, from the Format menu, choose Styles.

Maple supports inline mathematics so that you can develop sophisticated documents featuring typeset equations and graphics within text areas. For example, it is possible to create the following:

To compute the symbolic definite integral 
> int(x^2*sin(alpha*x),x=0..beta)   in Maple, type:
> > int( x^2*sin(alpha*x), x=0..beta );
 

Sections
Worksheets can be organized into a hierarchy of sections, with subsections within sections. Sections and subsections can be expanded and collapsed. Below are examples of subsections for this section. To expand and collapse them, click on the box beside the section (or subsection) name. Try this now:

Subsection 1
Subsection 2

Hyperlinks
A hyperlink is a navigational tool. When you click on a hyperlink, it takes you to another location in the same worksheet, to another worksheet, to a help page, to a worksheet on a web server, or to a web page. By default, Maple displays hyperlinks as underlined dark cyan text. For instance, the Main Menu for this tour contains hyperlinks to each of its twelve topics.

Maple also supports bookmarking. A bookmark is a name that identifies a particular location in a worksheet. To access a list of bookmarks in the current document, from the View menu, choose Bookmarks. Choosing a bookmark name moves the cursor to the specified location in the worksheet. Bookmarks are also a prerequisite for creating a hyperlink to another location in the same worksheet.

To place a new hyperlink, from the Insert menu, choose Hyperlinks. To convert existing text into a hyperlink, from the Format menu, choose Convert to, then Hyperlink.

(3) Numerical Calculations

Before examining this topic, please make sure that you have read:  (1) Working Through the New User's Tour.

Use the restart command to clear Maple's internal memory and get started with this topic of the tour.
> restart;

Computations with Integers
At its most basic level, you can use Maple as a very powerful calculator.
To calculate (32)(
> 12^13), you would enter the following:
> 32*12^13;

Maple recognizes many special operators, including factorial, greatest common divisor, least common multiple, and computation over the integers modulo m. The following line is an example of the factorial operator in use.
> 200!;

You can easily include the previous expansion of
> 200! in any subsequent calculation without having to type it. The ditto operator, represented by a percent sign (%), refers to the last expression computed by Maple. (For more information on the ditto operator, see the help page for ditto.) The command ifactor factors the previous result into its prime factors. 
> ifactor(%);

The next command calculates the product again, which is precisely the value of 200!. 
> expand(%);


Floating-point Arithmetic
A principal strength of Maple is its ability to do exact arithmetic. Fractions and radicals during computation are not converted to their decimal equivalent, thereby avoiding round-off errors. When you do need to use decimal equivalents, Maple has a command that approximates the value of the expression in a floating-point form.

Consider the expression
> (2^30/3^20)*sqrt(3) , which is entered on the Maple command line as follows:

> (2^30/3^20)*sqrt(3);

Use the evalf command to generate an approximation in the form of a floating-point value.
> evalf(%);

Finite and Infinite Sums and Products
You can calculate both finite and infinite sums.
Consider the finite sum  
> sum((1+i)/(1+i^4), i=1..10) . You calculate its value as follows:

> sum( (1+i)/(1+i^4), i=1..10 );

Consider the infinite sum
> sum(1/k^2, k=1..infinity); . To calculate its value, enter:

> sum( 1/k^2, k=1..infinity );

Maple also calculates both finite and infinite products.
To evaluate the finite product 
> product(((i^2+3*i-11)/(i+3)), i=0..10) , you would enter the following Maple command:

> product( ((i^2+3*i-11)/(i+3)), i=0..10 );

You can do arithmetic with floating-point numbers to any desired precision. In fact, Maple handles numbers up to hundreds of thousands of digits of precision on most operating systems. The following command calculates a 50-digit floating-point approximation of the fraction in the previous calculation.
> evalf( % , 50 );


Complex Numbers and Special Functions
Maple also performs calculations using complex numbers. Type the complex unit as a capital I.
> (3+5*I)/(7+4*I);

To easily convert a complex number to its polar-coordinate form, use the convert function. Maple represents the expression in the form polar(
> r,theta), where r is the modulus and
> theta is the argument of the complex value of the expression.
> convert( % , polar );

You can compute numeric values for the elementary functions and many special functions and constants. For example, compute
> exp(1), the base of the natural logarithm, to 40 digits.
> evalf( exp(1.0), 40 );

Consider an example of the Gamma function
> GAMMA(2.5):
> evalf( GAMMA(2.5) );

Finally, suppose that you want to evaluate
> Pi to 500 digits:
> evalf( Pi, 500 );

(4) Algebraic Computations

Before examining this topic, please make sure that you have read: (1) Working Through the New User's Tour.

Maple is a very powerful algebraic calculator that can manipulate and find solutions to many problems symbolically. Being able to use variables instead of specifying numbers at the beginning of a problem allows you to ask "What if...?" types of questions.

Use the restart command to clear Maple's internal memory and get started with this page of the tour.
> restart;

Working with Expressions
Maple provides different ways of manipulating and displaying expressions to make them easier to verify, or more effective to use. This flexibility allows you to do such things as expand binomials, factor results, simplify trigonometric expressions, assign variable names to results, and convert expressions to different forms.

Expanding and Factoring Expressions
Maple can expand binomials such as
> (x+y)^15. The following Maple commands create the expression, and then expand it.
> expr := (x+y)^15;
> expand(expr);

After viewing the results, you can use the factor command to factor the last result and check the computation.
> factor(%);


Simplifying Expressions
Maple can apply identities to simplify many lengthy mathematical expressions, such as trigonometric expressions.
Consider
> cos(x)^5 + sin(x)^4 + 2*cos(x)^2 - 2*sin(x)^2 - cos(2*x). 
> simplify( cos(x)^5 + sin(x)^4 + 2*cos(x)^2 - 2*sin(x)^2 - cos(2*x) );

Another way to simplify expressions is to use the normal command, which puts fractions on a common denominator and removes common factors in the numerator and denominator. 
The fraction
>  (x^3-y^3)/(x^2+x-y-y^2)  is much simpler after Maple removes the common factors.

> normal( (x^3-y^3)/(x^2+x-y-y^2) );


Assigning Variable Names
You can assign a variable name to the results of a computation. The use of variables is essential for managing large numbers of expressions and functions, especially if you want to reuse the output later in a session.
For example, create the expression
> (41*x^2+x+1)^2*(2*x-1), and store it as
> expr1.
> expr1 := (41*x^2+x+1)^2*(2*x-1);

Use the expand command on
> expr1 and store the result as a variable,
> expr2.
> expr2 := expand(expr1);

Evaluate
> expr2 at x=1.
> eval(expr2 , x=1 );

In the next example,
> answer is assigned the normalized quotient of the expansion of two expressions,
> top and
> bottom.
> top := expr2;
> bottom := expand((3*x+5)*(2*x-1));
> answer := normal( top/bottom );


Converting Expressions to Different Forms
The convert command allows you to convert many types of expressions into specific forms. For a complete list of conversions available in Maple, see the Help page for the convert command.
The following example converts a symbolic expression,  
> (a*x^2+b)/(x*(-3*x^2-x+4)) ,  into its partial fraction decomposition.

> my_expr := (a*x^2+b)/(x*(-3*x^2-x+4));
> convert( my_expr, parfrac, x );

The following example converts a trigonometric expression,
> cot(x), into an exponential expression.
> convert( cot(x), exp );


Function Notation
Maple provides several ways to define functions. One way is to use arrow notation (which closely resembles standard mathematical notation for a mapping). You can also use the  unapply command, which turns an expression into a function.
Define the function
> x -> x^2 + 1/2.

> f := x -> x^2+1/2 ;

Evaluate the function at numeric and symbolic values.
> f(2);
> f(a+b);

Use the unapply command to turn an expression into a function.
> g := unapply(x^2 + 1/2, x);


Solving Equations and Systems of Equations
You can use Maple to solve and verify solutions to equations and systems of equations.

Solving an Equation
Use Maple to solve the following equation:  
> x^3-a/2*x^2+13/3*x^2 = 13/6*a*x+10/3*x-5/3*a .

> eqn := x^3-1/2*a*x^2+13/3*x^2 = 13/6*a*x+10/3*x-5/3*a;
> solve( eqn, {x} );

To verify one of the solutions, evaluate the equation at that particular value of x.
> eval( eqn , x=1/2*a );


Solving a System of Equations
You can also solve systems of equations in Maple.
Consider the following set of four equations and five unknowns:
> eqn1 := a+2*b+3*c+4*d+5*e=41;
> eqn2 := 5*a+5*b+4*c+3*d+2*e=20;
> eqn3 := 3*b+4*c-8*d+2*e=125;
> eqn4 := a+b+c+d+e=9;

Now solve the system for the variables
> a,
> b,
> c, and d. Maple will return its solutions in terms of the fifth variable, e. Since there are four equations and five unknowns, we will have a parametric set of solutions. On the other hand, if we solved for a, b, c, d and e, Maple would choose one of the variables (at random) as a free parameter.
> solve( {eqn1, eqn2, eqn3, eqn4}, {a, b, c, d} );

To verify that this solution satisfies eqn1 and eqn2, evaluate both of them at this solution.
> eval( {eqn1, eqn2} , % );


Further Examples of Solving Equations
The following examples show other types of equations that you can solve using Maple, such as equations using trigonometric functions and absolute values.

Solve an equation involving trigonometric functions.
> solve( arccos(x) - arctan(x)= 0, {x} );
As a final example, solve an equation containing absolute values: 
> abs((z+abs(z+2))^2-1)^2 = 9.
> solve( abs( (z+abs(z+2))^2-1 )^2 = 9, {z});
> abs( (z+abs(z+2))^2-1 )^2 = 9;


Solving Inequalities
The following examples show how easy it is to solve systems of inequalities in Maple.
Use Maple to solve systems of inequalities, such as
> x^2<1, y^2<=1, x+y<1/2 . 

> solve( {x^2<1, y^2<=1, x+y<1/2}, {x,y} );

Another example involves solving the inequality
> x+y+4/(x+y)<10, for x in terms of y.

> ineq := x+y+4/(x+y) < 10:
> solve( ineq, {x} );

Not only does Maple solve inequalities, but it can also consider a complex inequality such as
> 2*sqrt(-1-I) * sqrt(-1+I) <> 0  , and compute its Boolean value, by using the is command.
> expr := 2*sqrt(-1-I)*sqrt(-1+I):
> is( expr <> 0 );

تاریخ ارسال: شنبه 14 آذر‌ماه سال 1388 ساعت 12:04 ب.ظ | نویسنده: مهندس | چاپ مطلب 0 نظر