Wiley.com
Print this page Share
E-book

An Engineer's Guide to Mathematica

ISBN: 978-1-118-82125-1
456 pages
March 2014
An Engineer

Description

Free Mathematica 10 Update Included! Now available from www.wiley.com/go/magrab

Updated material includes:
- Creating regions and volumes of arbitrary shape and determining their properties: arc length, area, centroid, and area moment of inertia
- Performing integrations, solving equations, and determining the maximum and minimum values over regions of arbitrary shape
- Solving numerically a class of linear second order partial differential equations in regions of arbitrary shape using finite elements



An Engineer's Guide to Mathematica
enables the reader to attain the skills to create Mathematica 9 programs that solve a wide range of engineering problems and that display the results with annotated graphics. This book can be used to learn Mathematica, as a companion to engineering texts, and also as a reference for obtaining numerical and symbolic solutions to a wide range of engineering topics. The material is presented in an engineering context and the creation of interactive graphics is emphasized.

The first part of the book introduces Mathematica's syntax and commands useful in solving engineering problems. Tables are used extensively to illustrate families of commands and the effects that different options have on their output. From these tables, one can easily determine which options will satisfy one's current needs. The order of the material is introduced so that the engineering applicability of the examples increases as one progresses through the chapters. The second part of the book obtains solutions to representative classes of problems in a wide range of engineering specialties. Here, the majority of the solutions are presented as interactive graphics so that the results can be explored parametrically.

Key features:

  • Material is based on Mathematica 9
  • Presents over 85 examples on a wide range of engineering topics, including vibrations, controls, fluids, heat transfer, structures, statistics, engineering mathematics, and optimization
  • Each chapter contains a summary table of the Mathematica commands used for ease of reference
  • Includes a table of applications summarizing all of the engineering examples presented.
  • Accompanied by a website containing Mathematica notebooks of all the numbered examples

An Engineer's Guide to Mathematica is a must-have reference for practitioners, and graduate and undergraduate students who want to learn how to solve engineering problems with Mathematica.

See More

Table of Contents

Preface xiii

Table of Engineering Applications xvii

Part 1 Introduction

1 Mathematica Environment and Basic Syntax 3

1.1 Introduction 3

1.2 Selecting Notebook Characteristics 4

1.3 Notebook Cells 8

1.4 Delimiters 12

1.5 Basic Syntax 12

1.5.1 Introduction 12

1.5.2 Templates: Greek Symbols and Mathematical Notation 15

1.5.3 Variable Names and Global Variables 18

1.6 Mathematical Constants 19

1.7 Complex Numbers 21

1.8 Elementary, Trigonometric, Hyperbolic, and a Few Special Functions 22

1.9 Strings 25

1.9.1 String Creation: StringJoin[] and ToString[] 25

1.9.2 Labeled Output: Print[], NumberForm[], EngineeringForm[], and TraditionalForm[] 26

1.10 Conversions, Relational Operators, and Transformation Rule 28

1.11 Engineering Units and Unit Conversions: Quantity[] and UnitConvert[] 30

1.12 Creation of CDF Documents and Documents in Other Formats 33

1.13 Functions Introduced in Chapter 1 34

Exercises 35

2 List Creation and Manipulation: Vectors and Matrices 39

2.1 Introduction 39

2.2 Creating Lists and Vectors 39

2.2.1 Introduction 39

2.2.2 Creating a List with Table[] 45

2.2.3 Summing Elements of a List: Total[] 46

2.2.4 Selecting Elements of a List 47

2.2.5 Identifying List Elements Matching a Pattern: Position[] 49

2.3 Creating Matrices 51

2.3.1 Introduction 51

2.3.2 Matrix Generation Using Table[] 54

2.3.3 Accessing Elements of Arrays 55

2.4 Matrix Operations on Vectors and Arrays 56

2.4.1 Introduction 56

2.4.2 Matrix Inverse and Determinant: Inverse[] and Det[] 57

2.5 Solution of a Linear System of Equations: LinearSolve[] 58

2.6 Eigenvalues and Eigenvectors: EigenSystem[] 59

2.7 Functions Introduced in Chapter 2 61

References 61

Exercises 61

3 User-Created Functions, Repetitive Operations, and Conditionals 69

3.1 Introduction 69

3.2 Expressions and Procedures as Functions 69

3.2.1 Introduction 69

3.2.2 Pure Function: Function[] 74

3.2.3 Module[] 78

3.3 Find Elements of a List that Meet a Criterion: Select[] 80

3.4 Conditionals 82

3.4.1 If[] 82

3.4.2 Which[] 83

3.5 Repetitive Operations 83

3.5.1 Do[] 83

3.5.2 While[] 83

3.5.3 Nest[] 84

3.5.4 Map[] 84

3.6 Examples of Repetitive Operations and Conditionals 85

3.7 Functions Introduced in Chapter 3 92

Exercises 92

4 Symbolic Operations 95

4.1 Introduction 95

4.2 Assumption Options 101

4.3 Solutions of Equations: Solve[] 101

4.4 Limits: Limit[] 105

4.5 Power Series: Series[], Coefficient[], and CoefficientList[] 108

4.6 Optimization: Maximize[]/Minimize[] 112

4.7 Differentiation: D[] 114

4.8 Integration: Integrate[] 120

4.9 Solutions of Ordinary Differential Equations: DSolve[] 126

4.10 Solutions of Partial Differential Equations: DSolve[] 136

4.11 Laplace Transform: LaplaceTransform[] and InverseLaplaceTransform[] 138

4.12 Functions Introduced in Chapter 4 145

References 145

Exercises 146

5 Numerical Evaluations of Equations 151

5.1 Introduction 151

5.2 Numerical Integration: NIntegrate[] 151

5.3 Numerical Solutions of Differential Equations: NDSolveValue[] and ParametricNDSolveValue[] 154

5.4 Numerical Solutions of Equations: NSolve[] 178

5.5 Roots of Transcendental Equations: FindRoot[] 180

5.6 Minimum and Maximum: FindMinimum[] and FindMaximum[] 182

5.7 Fitting of Data: Interpolation[] and FindFit[] 186

5.8 Discrete Fourier Transforms and Correlation: Fourier[], InverseFourier[], and ListCorrelate[] 189

5.9 Functions Introduced in Chapter 5 194

References 195

Exercises 196

6 Graphics 209

6.1 Introduction 209

6.2 2D Graphics 209

6.2.1 Basic Plotting 209

6.2.2 Basic Graph Enhancements 213

6.2.3 Common 2D Shapes: Graphics[] 217

6.2.4 Additional Graph Enhancements 222

6.2.5 Combining Figures: Show[] and GraphicsGrid[] 238

6.2.6 Tooltip[] 241

6.2.7 Exporting Graphics 244

6.3 3D Graphics 244

6.4 Summary of Functions Introduced in Chapter 6 253

References 254

Exercises 254

7 Interactive Graphics 263

7.1 Interactive Graphics: Manipulate[] 263

References 287

Exercises 287

Part 2 Engineering Applications

8 Vibrations of Spring–Mass Systems and Thin Beams 293

8.1 Introduction 293

8.2 Single Degree-of-Freedom Systems 294

8.2.1 Periodic Force on a Single Degree-of-Freedom System 294

8.2.2 Squeeze Film Damping and Viscous Fluid Damping 298

8.2.3 Electrostatic Attraction 302

8.2.4 Single Degree-of-Freedom System Energy Harvester 304

8.3 Two Degrees-of-Freedom Systems 307

8.3.1 Governing Equations 307

8.3.2 Response to Harmonic Excitation: Amplitude Response Functions 307

8.3.3 Enhanced Energy Harvester 310

8.4 Thin Beams 315

8.4.1 Natural Frequencies and Mode Shapes of a Cantilever Beam with In-Span Attachments 315

8.4.2 Effects of Electrostatic Force on the Natural Frequency and Stability of a Beam 318

8.4.3 Response of a Cantilever Beam with an In-Span Attachment to an Impulse Force 323

References 326

9 Statistics 327

9.1 Descriptive Statistics 327

9.1.1 Introduction 327

9.1.2 Location Statistics: Mean[], StandardDeviation[], and  Quartile[] 327

9.1.3 Continuous Distribution Functions: PDF[] and CDF[] 329

9.1.4 Histograms and Probability Plots: Histogram[] and ProbabilityScalePlot [] 331

9.1.5 Whisker Plot: BoxWhiskerChart[] 332

9.1.6 Creating Data with Specified Distributions: RandomVariate[] 334

9.2 Probability of Continuous Random Variables 334

9.2.1 Probability for Different Distributions: NProbability[] 334

9.2.2 Inverse Cumulative Distribution Function: InverseCDF[] 337

9.2.3 Distribution Parameter Estimation: EstimatedDistribution[] and FindDistributionParameters[] 337

9.2.4 Confidence Intervals: ⋯CI[] 340

9.2.5 Hypothesis Testing: LocationTest[] and VarianceTest[] 342

9.3 Regression Analysis: LinearModelFit[] 343

9.3.1 Simple Linear Regression 343

9.3.2 Multiple Linear Regression 347

9.4 Nonlinear Regression Analysis: NonLinearModelFit[] 351

9.5 Analysis of Variance (ANOVA) and Factorial Designs: ANOVA[] 354

9.6 Functions Introduced in Chapter 9 358

10 Control Systems and Signal Processing 359

10.1 Introduction 359

10.2 Model Generation: State-Space and Transfer Function Representation 359

10.2.1 Introduction 359

10.2.2 State-Space Models: StateSpaceModel[] 360

10.2.3 Transfer Function Models: TransferFunctionModel[] 362

10.3 Model Connections – Closed-Loop Systems and System Response: SystemsModelFeedbackConnect[] and SystemsModelSeriesConnect[] 363

10.4 Design Methods 369

10.4.1 Root Locus: RootLocusPlot[] 369

10.4.2 Bode Plot: BodePlot[] 371

10.4.3 Nichols Plot: NicholsPlot[] 372

10.5 Signal Processing 374

10.5.1 Filter Models: ButterworthFilterModel[], EllipticFilterModel[], ... 374

10.5.2 Windows: HammingWindow[], HannWindow[], ... 381

10.5.3 Spectrum Averaging 385

10.6 Aliasing 388

10.7 Functions Introduced in Chapter 10 390

Reference 391

11 Heat Transfer and Fluid Mechanics 393

11.1 Introduction 393

11.2 Conduction Heat Transfer 394

11.2.1 One-Dimensional Transient Heat Diffusion in Solids 394

11.2.2 Heat Transfer in Concentric Spheres: Ablation of a Tumor 398

11.2.3 Heat Flow Through Fins 401

11.3 Natural Convection Along Heated Plates 405

11.4 View Factor Between Two Parallel Rectangular Surfaces 408

11.5 Internal Viscous Flow 411

11.5.1 Laminar Flow in Horizontal Cylindrical Pipes 411

11.5.2 Flow in Three Reservoirs 412

11.6 External Flow 416

11.6.1 Pressure Coefficient of a Joukowski Airfoil 416

11.6.2 Surface Profile in Nonuniform Flow in Open Channels 419

References 423

Index 425

See More

Author Information

Dr. Magrab is Emeritus Professor of Mechanical Engineering at the University of Maryland, College Park, Maryland. Before joining the University of Maryland, he was Chief of the Sound Section, head of the Robot Metrology Group, and led the development of the vertical machining workstation in the Automated Manufacturing Research Facility at the National Institute of Standards and Technology (NIST). He went to NIST after being a professor in the Department of Mechanics at the Catholic University of America in Washington DC. Dr. Magrab is a Life Fellow of the American Society of Mechanical Engineers and a registered professional engineer in Maryland.  He has authored eight other textbooks, published numerous journal articles, and has over 35 years of university-level teaching experience on many engineering subjects. His research interests include analytical and experimental investigations in vibrations, acoustics, and the integration of design and manufacturing. He holds one patent.

See More
Back to Top