chapter 2: first steps in mupad

28
Chapter 2: First Steps in MuPAD MATLAB for Scientist and Engineers Using Symbolic Toolbox

Upload: kevin-roberts

Post on 31-Dec-2015

99 views

Category:

Documents


1 download

DESCRIPTION

Chapter 2: First Steps in MuPAD. MATLAB for Scientist and Engineers Using Symbolic Toolbox. You are going to. See the difference between numerical computing and symbolic computing Say hello to MuPAD notebook Enjoy the kind help system of MuPAD - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Chapter 2: First Steps in MuPAD

Chapter 2:

First Steps in MuPAD

MATLAB for Scientist and Engineers

Using Symbolic Toolbox

Page 2: Chapter 2: First Steps in MuPAD

2

You are going to See the difference between numerical com-

puting and symbolic computing Say hello to MuPAD notebook Enjoy the kind help system of MuPAD Taste the sweet power of symbolic computing Create basic 2-D, 3-D graphs and animations Be glad to know that MuPAD is there for you

Page 3: Chapter 2: First Steps in MuPAD

3

Numerical Computations

Problem solving by number calculations Approximate solutions as fast as possible Numbers are stored by floating-point repre-

sentation. The only way when no closed form solution

Page 4: Chapter 2: First Steps in MuPAD

4

Computer Algebra

Problem solving by symbolic computations Exact solution as fast as possible Numbers are stored by integer fractions. Requires more computing power and storage Can help numerical computation by simplify-

ing the expressions.

Page 5: Chapter 2: First Steps in MuPAD

5

MuPAD Software Originally developed by the MuPAD research group at the

University of Paderborn, Germany.

A computer algebra system to manipulate formulas symbolically

Program packages for linear algebra, differential equations, number theory, statistics, functional programming

An interactive graphic system that supports animations and transparent areas in 3D

Classic and verified numerical analysis in discretionary accuracy

A programming language that supports object orientation and functional programming

Ref: http://en.wikipedia.org/wiki/MuPAD

Page 6: Chapter 2: First Steps in MuPAD

6

Other Options

Mathematica, www.wolfram.com Maple, www.maplesoft.com IDL, www.ittvis.com/ProductServices/IDL.aspx

, www.gnu.org/software/octave/ M , www.ptc.com/products/mathcad/

Ref: http://amath.colorado.edu/computing/mmm/

Page 7: Chapter 2: First Steps in MuPAD

7

Starting MuPAD

Two ways of starting MuPAD1. Type mupad in the command window.

2. Start button

Page 8: Chapter 2: First Steps in MuPAD

8

MuPAD Notebook

>> mupadFormat Toolbar

Standard Toolbar

Output Region

Command Bar

Menu Bar

Input Region

Ctr-I

Text Region

Ctr-T

Page 9: Chapter 2: First Steps in MuPAD

9

Working with Input Regions

Enter

EnterShift +Enter

Enter

Evaluate and show the results.

Evaluate but do notshow the results.

The expressionscontinues to the next line

Page 10: Chapter 2: First Steps in MuPAD

10

Evaluation after Modification

Once you change the value of variable, you can re-evaluate the other dependent expressions.

Page 11: Chapter 2: First Steps in MuPAD

11

Accessing Help

Completing Commands:

Tool Tips: mouse over the command

SpaceCtrl +

Complete Help: right mouse click

Page 12: Chapter 2: First Steps in MuPAD

12

Computing Numbers

real number!Assignment!

Convert toa real number!

Change precision.

delete DIGITS PI E

Page 13: Chapter 2: First Steps in MuPAD

13

Complex Numbers1 i

imaginary

real

magnitude

in radian

Page 14: Chapter 2: First Steps in MuPAD

14

Differentiation

df

dx

2

2

df

dx

2

2

df

dx

df

da

d df

da dx

D(f) f'

Page 15: Chapter 2: First Steps in MuPAD

15

Integration

2cos( )x dx

4 2

0cos( )x dx

No closed form solution !

Numeric integration

2xe dx

Page 16: Chapter 2: First Steps in MuPAD

16

Solving Equations

solve

Solve Algebraic Equations

Solve Ordinary Differential Equations

Solve Inequalities

Page 17: Chapter 2: First Steps in MuPAD

17

Graphics

2-D Function Plotting

2-D Animation

3-D Function Plotting

3-D Animation

Page 18: Chapter 2: First Steps in MuPAD

18

Manipulating Expressions

Simplifying the expressions

Factoring, Expanding, Collecting, and etc.

Page 19: Chapter 2: First Steps in MuPAD

19

Basic Plotting Options

With plot command, you can Create 2-D and 3-D function plots Specify plotting range Create plots for piecewise functions Create multiple function plots in one graph Create animated 2-D and 3-D function plots

Page 20: Chapter 2: First Steps in MuPAD

20

Creating 2-D Plots Set range.

Parameter assignment.

Sequence of plots.

Page 21: Chapter 2: First Steps in MuPAD

21

Creating 2-D Plots (cont.)

Multiple Plots Piecewise Functions

Page 22: Chapter 2: First Steps in MuPAD

22

Creating 3-D Plots

Three Dim.

Sequence of 3D Plots

Animation Control

Page 23: Chapter 2: First Steps in MuPAD

23

Animated 2-D Plots

Additional parameter isregarded as the animationparameter.

2-D point

2-D curve

Animationparameter

Page 24: Chapter 2: First Steps in MuPAD

24

Animated 3-D Plots

Page 25: Chapter 2: First Steps in MuPAD

25

Key Takeaways

Now, you are able to tell the differences between numerical computing

and symbolic computing, expand your knowledge on MuPAD by yourself

using MuPAD help system, apply differentiation, indefinite integrals, definite

integrals on math expressions and functions, solve an equation or a set of equations, manipulate math expressions at your will, and to create basic 2-D and 3-D graphs and ani-

mations

Page 26: Chapter 2: First Steps in MuPAD

26

MuPAD Commands Review

mupad := : float

PI E abs rectform

Re Im arg conjugate

diff int infinity assuming

solve factor expand simplify

collect partfrac ode Simplify

Shift Enter+ Ctr Space+ Ctr T+ Ctr I+

Page 27: Chapter 2: First Steps in MuPAD

27

Notes

Page 28: Chapter 2: First Steps in MuPAD

28

Notes