This notebook "MathematicaDemo.nb" can be downloaded from the course web page.

Size: px
Start display at page:

Download "This notebook "MathematicaDemo.nb" can be downloaded from the course web page."

Transcription

1 Mathematica demo This notebook "MathematicaDemo.nb" can be downloaded from the course web page. Basics Evaluate cells by pressing "shift-enter" / shift-return In[]:= + 3 Out[]= 5 Square brackets for function arguments! Round brackets for grouping. In[]:= Sin[0.7] Out[]= There is a lot of documentation, including a help page for each function, tutorials, etc. To solve the exercises, it is easiest to copy examples from the documentation (or from the notebook below) and then to modify them. Functional (rule-based) programming Mathemtica is an example of a rule based programming language. As opposed to imperative languages, the code is not a series of instructions, but consists of a series of functions (or substitution rules) acting on expressions. Mathematica works using replacement rules In[3]:= expression = (x + ) ; To numerically evaluate for x = 3, we replace x with 3 In[4]:= expression /. x 3 Out[4]= 6 Alternatively, we can define a function The quantity x_ is a pattern. A placeholder for the argument that will later be passed to the function. In[5]:= f[x_] := (x + ) ; In[6]:= f[3] Out[6]= 6 In[7]:= f[cos[θ]] Out[7]= ( + Cos[θ]) Nontrivial example

2 MathematicaDemo.nb In[8]:= Fact[x_] := (x - ) Fact[x - ]; In[9]:= Fact[] := ; The function calls itself! (Recursion) In[0]:= Fact[0] Out[0]= In[]:= Fact[9.5] $RecursionLimit::reclim : Recursion depth of 04 exceeded during evaluation of B Out[]= Hold[(9.5 - ) Fact[9.5 - ]] (... disaster could have been avoided with better programming.) Same with rules In[]:= In[3]:= Out[3]= factrule = fact[], fact[n_] (n - ) fact[n - ] ; fact[5] /. factrule 4 fact[4] In[4]:= Out[4]= fact[5] /. factrule /. factrule fact[3] The command //.factrule applies the rule until the result no longer changes. In[5]:= fact[5] //. factrule Out[5]= 4 Substitution rules are quite natural for mathematics In[6]:= expression = Sin[x] 0 + Cos[x] 0 ; In[7]:= expression = expression /. Sin[x] - Cos[x] Out[7]= Cos[x] Cos[x] 5 In[8]:= expression3 = Expand expression Out[8]= - 5 Cos[x] + 0 Cos[x] 4-0 Cos[x] Cos[x] 8... obviously Mathematica has built in functions to do similar manipulations In[9]:= Out[9]= In[0]:= expression4 = TrigReduce expression ( Cos[4 x] + 5 Cos[8 x]) 8 Simplify expression4 - expression3 Out[0]= 0 Solving equations The solution is given as a list.

3 MathematicaDemo.nb 3 In[]:= Solve[x^ + * x + 4 == 0, x] Out[]= x - - i 3, x - + i 3 Note the difference between == and = a == b means "a is equal to b" a = b means "a is defined to be b" In[]:= Out[]= False In[3]:= = Out[3]= Set::setraw : Cannot assign to raw object. B Differentiation and integration Define a function f In[4]:= fun = Sin[x] Cos[x]; Note the square brackets for function arguments! 4th derivative of f In[5]:= res = D fun, {x, 4} Out[5]= -4 Sec[x] + Sin[x] Tan[x] - Sec[x] Tan[x] + 4 Cos[x] Sec[x] Sec[x] Tan[x] + Sin[x] 6 Sec[x] 4 Tan[x] + 8 Sec[x] Tan[x] 3 In[6]:= res // FullSimplify Out[6]= -Cos[x] + Sec[x] - 0 Sec[x] Sec[x] 5 Taylor series around x=0 to 0th order: In[7]:= Series fun, {x, 0, 0} Out[7]= x + x x x x O[x] Integrals In[8]:= Out[8]= intf = Integrate fun, x -Log Cos x - Sin x + Log Cos x + Sin x - Sin[x] In[9]:= intf = Integrate fun, x, 0, Pi 4 Out[9]= - + ArcTanh Tan π 8 In[30]:= N intf Out[30]= Numerical value of the integral, to 800 digits accuracy

4 4 MathematicaDemo.nb In[3]:= N intf, 800 Out[3]= Vectors and matrices In[3]:= vector = a, b, c ; In[33]:= vector = {,, 3}; (Because of the semicolons at the end of the lines, the output is suppressed.) Third element In[34]:= Out[34]= vector[[3]] c Scalar product In[35]:= Out[35]= vector.vector a + b + 3 c In[36]:= matrix = {{,, 3}, {4, 5, 6}, {7, 8, 9}}; In[37]:= matrix // MatrixForm Out[37]//MatrixForm= In[38]:= matrix[[3, ]] Out[38]= 7 In[39]:= Matrix times vector matrix.vector Out[39]= {4, 3, 50} Egenvectors, Eigenvalues In[40]:= Eigensystem matrix Out[40]= , , 0, , ,, , ,, {, -, }

5 MathematicaDemo.nb 5 In[4]:= values = Eigensystem matrix [[]] Out[4]= , , 0 In[4]:= mat = Eigensystem matrix [[]] // MatrixForm Out[4]//MatrixForm= In[43]:= Inverse[Transpose[mat]].matrix.Transpose[mat] // Simplify // MatrixForm Out[43]//MatrixForm= Vector analysis: Curl[f,{x,y,z}] = f Exercise 3. a In[44]:= r = x + y + z ; In[45]:= vecf = {x, y, z} f[r] r ; In[46]:= Curl vecf, {x, y, z} Out[46]= {0, 0, 0} In[47]:= pot = Grad[g[r], {x, y, z}] Out[47]= x g x + y + z x + y + z, y g x + y + z z g x + y + z, x + y + z x + y + z Differential equations Analytical solution In[48]:= Out[48]= DE = D[x[t], {t, }] - D[x[t], t] - Sin[t] -Sin[t] - x [t] + x [t] Note again: A=B means A is defined to be B, while A B represents the equation A=B: In[49]:= DSolve[0 DE, x[t], t] Out[49]= x[t] e t C[] + C[] + Cos[t] - Sin[t] This second order equation involves two integration contants C[] and C[]:

6 6 MathematicaDemo.nb The boundary conditions x(0) = and dx/dt(0) = are specified as follows: In[50]:= soln = DSolve[{0 DE, x[0], x [0] }, x[t], t] Out[50]= x[t] et + Cos[t] - Sin[t] Mathematica gives the solutions as a list, even if it is unique. To obtain the solution itself, use soln, In[5]:= solutionwithboundary = x[t] /. soln, Out[5]= et + Cos[t] - Sin[t] In[5]:= Plot solutionwithboundary, {t, 0, 4} Out[5]= Numerical solution First order In[53]:= firstorder = NDSolve[{y'[x] x * y[x] * ( - y[x]), y[0] }, y[x], {x, 0, }] Out[53]= y[x] InterpolatingFunction Domain: {{0.,.}} [x] The solution is computed for a set of points, and Mathematica provides an interpolation for arbitrary values in the specified interval, in our case x [0,]. In[54]:= yfun = y[x] /. firstorder, Out[54]= InterpolatingFunction Domain: {{0.,.}} [x]

7 MathematicaDemo.nb 7 In[55]:= Plot yfun, {x, 0, }.4.3 Out[55]= Second order In[56]:= a =.0; In[57]:= secondorder = NDSolve {y''[x] -y[x]^3 + Cos[a x], y[0], y'[0] 0}, y[x], {x, 0, 600}, MaxSteps 0 5 Out[57]= y[x] InterpolatingFunction [x] In[58]:= yfun = y[x] /. secondorder, Out[58]= InterpolatingFunction [x] In[59]:= Plot yfun, {x, 0, 60} Out[59]= In[60]:= vel = D yfun, x Out[60]= InterpolatingFunction [x] Complicated, but periodic:

8 8 MathematicaDemo.nb In[6]:= ParametricPlot yfun, vel, {x, 0, 00}, PlotRange All Out[6]= Animation

9 MathematicaDemo.nb 9 In[6]:= Animate Graphics Disk., yfun /. x t, 0., PlotRange {{0.5,.5}, {-.3,.3}}, {t, 0, 30}, AnimationRate t Out[6]= Chaotic oscillation Same as before, but we change the frequency In[63]:= a =.8; In[64]:= secondorder = NDSolve {y''[x] -y[x]^3 + Cos[a x], y[0], y'[0] 0}, y[x], {x, 0, 600}, MaxSteps 0 5 Out[64]= y[x] InterpolatingFunction [x]

10 0 MathematicaDemo.nb In[65]:= yfun = y[x] /. secondorder, Out[65]= InterpolatingFunction [x] In[66]:= Plot yfun, {x, 0, 60} Out[66]= In[67]:= vel = D yfun, x Out[67]= InterpolatingFunction [x] In[68]:= ParametricPlot yfun, vel, {x, 0, 600}, PlotRange All 6 4 Out[68]= This is no longer periodic...

Mathematical Experiments with Mathematica

Mathematical Experiments with Mathematica Mathematical Experiments with Mathematica Instructor: Valentina Kiritchenko Classes: F 12:00-1:20 pm E-mail : vkiritchenko@yahoo.ca, vkiritch@hse.ru Office hours : Th 5:00-6:20 pm, F 3:30-5:00 pm 1. Syllabus

More information

A Brief Introduction to Mathematica

A Brief Introduction to Mathematica A Brief Introduction to Mathematica Objectives: (1) To learn to use Mathematica as a calculator. (2) To learn to write expressions in Mathematica, and to evaluate them at given point. (3) To learn to plot

More information

Integrating Equations of Motion in Mathematica

Integrating Equations of Motion in Mathematica MmaGuide-GLG.nb Integrating Equations of Motion in Mathematica Gary L. Gray Assistant Professor Engineering Science and Mechanics The Pennsylvania State University 227 Hammond Building University Park,

More information

TU Bergakademie Freiberg. Computer Algebra System Mathematica

TU Bergakademie Freiberg. Computer Algebra System Mathematica TU Bergakademie Freiberg Winter 12/13 Computer Algebra System Mathematica 1 Introduction 1.1 About Mathematica Mathematica (www.wolfram.com/mathematica/) is one of the highest developed computer algebra

More information

Parametric Curves, Polar Plots and 2D Graphics

Parametric Curves, Polar Plots and 2D Graphics Parametric Curves, Polar Plots and 2D Graphics Fall 2016 In[213]:= Clear "Global`*" 2 2450notes2_fall2016.nb Parametric Equations In chapter 9, we introduced parametric equations so that we could easily

More information

ü 1.1 Getting Started

ü 1.1 Getting Started Chapter 1 Introduction Welcome to Mathematica! This tutorial manual is intended as a supplement to Rogawski's Calculus textbook and aimed at students looking to quickly learn Mathematica through examples.

More information

2 Second Derivatives. As we have seen, a function f (x, y) of two variables has four different partial derivatives: f xx. f yx. f x y.

2 Second Derivatives. As we have seen, a function f (x, y) of two variables has four different partial derivatives: f xx. f yx. f x y. 2 Second Derivatives As we have seen, a function f (x, y) of two variables has four different partial derivatives: (x, y), (x, y), f yx (x, y), (x, y) It is convenient to gather all four of these into

More information

CurvesGraphics. A free package for Advanced Calculus illustrations. Gianluca Gorni. Arrows on 2D curves. Motivation

CurvesGraphics. A free package for Advanced Calculus illustrations. Gianluca Gorni. Arrows on 2D curves. Motivation CurvesGraphics A free package for Advanced Calculus illustrations. Gianluca Gorni Motivation As a teacher of Calculus and Mathematical Analysis at college and university level, I feel that Mathematica

More information

Introduction to Matlab

Introduction to Matlab Introduction to Matlab Kristian Sandberg Department of Applied Mathematics University of Colorado Goal The goal with this worksheet is to give a brief introduction to the mathematical software Matlab.

More information

4. Mathematica. 4.1 Introduction. 4.2 Starting Mathematica Starting Mathematica from an X-terminal (Maths)

4. Mathematica. 4.1 Introduction. 4.2 Starting Mathematica Starting Mathematica from an X-terminal (Maths) 4. Mathematica 4.1 Introduction Mathematica is a general purpose computer algebra system. That means it can do algebraic manipulations (including calculus and matrix manipulation) and it can also be used

More information

A practical guide for using Mathematica in problem sets. 2. Prerequisites: variables, functions, rule replacements, prefixes/suffixes, and lists

A practical guide for using Mathematica in problem sets. 2. Prerequisites: variables, functions, rule replacements, prefixes/suffixes, and lists How to Mathematica A practical guide for using Mathematica in problem sets Ben Bartlett - Ruddock 17 2017 Ruddock Upperclassman Workshop: 24 April, 9pm Contents: 0. Wolfram documentation 1. Formatting

More information

Overview: The original Mathematica was a computer algebra system (CAS) released by Stephen Wolfram in 1988.

Overview: The original Mathematica was a computer algebra system (CAS) released by Stephen Wolfram in 1988. Mathematica 7.0.1 Overview: The original Mathematica was a computer algebra system (CAS) released by Stephen Wolfram in 1988. Modern releases have augmented the CAS with powerful numerical and graphical

More information

Physics 115/242 Introduction to Mathematica. Peter Young

Physics 115/242 Introduction to Mathematica. Peter Young Physics 115/242 Introduction to Mathematica. Peter Young April 29, 2005 Contents 1 Introduction 2 1.1 Starting Mathematica........................................... 2 1.2 A Simple Mathematica Session......................................

More information

Dynamical Systems - Math 3280 Mathematica: From Algebra to Dynamical Systems c

Dynamical Systems - Math 3280 Mathematica: From Algebra to Dynamical Systems c Dynamical Systems - Math 3280 Mathematica: From Algebra to Dynamical Systems c Edit your document (remove extras and errors, ensure the rest works correctly). If needed, add comments. It is not necessary

More information

STAT/MATH 395 A - PROBABILITY II UW Winter Quarter Matlab Tutorial

STAT/MATH 395 A - PROBABILITY II UW Winter Quarter Matlab Tutorial STAT/MATH 395 A - PROBABILITY II UW Winter Quarter 2016 Néhémy Lim Matlab Tutorial 1 Introduction Matlab (standing for matrix laboratory) is a high-level programming language and interactive environment

More information

MATLAB Programming for Numerical Computation Dr. Niket Kaisare Department Of Chemical Engineering Indian Institute of Technology, Madras

MATLAB Programming for Numerical Computation Dr. Niket Kaisare Department Of Chemical Engineering Indian Institute of Technology, Madras MATLAB Programming for Numerical Computation Dr. Niket Kaisare Department Of Chemical Engineering Indian Institute of Technology, Madras Module No. #01 Lecture No. #1.1 Introduction to MATLAB programming

More information

LAB 1 General MATLAB Information 1

LAB 1 General MATLAB Information 1 LAB 1 General MATLAB Information 1 General: To enter a matrix: > type the entries between square brackets, [...] > enter it by rows with elements separated by a space or comma > rows are terminated by

More information

MATLAB TUTORIAL WORKSHEET

MATLAB TUTORIAL WORKSHEET MATLAB TUTORIAL WORKSHEET What is MATLAB? Software package used for computation High-level programming language with easy to use interactive environment Access MATLAB at Tufts here: https://it.tufts.edu/sw-matlabstudent

More information

Getting Started with Mathematica

Getting Started with Mathematica Getting Started with Mathematica Introduction What is Mathematica? Mathematica is a computer program for doing mathematics. It is often used for instruction, homework, research, and writing. Mathematica

More information

Blue 21 Extend and Succeed Brain Growth Senior Phase. Trigonometry. Graphs and Equations

Blue 21 Extend and Succeed Brain Growth Senior Phase. Trigonometry. Graphs and Equations Blue 21 Extend and Succeed Brain Growth Senior Phase Trigonometry Graphs and Equations Trig Graphs O1 Trig ratios of angles of all sizes 1. Given the diagram above, find sin 130, cos 130 and tan 130 correct

More information

Verifying Trigonometric Identities

Verifying Trigonometric Identities 40 Chapter Analytic Trigonometry. f x sec x Sketch the graph of y cos x Amplitude: Period: One cycle: first. The x-intercepts of y correspond to the vertical asymptotes of f x. cos x sec x 4 x, x 4 4,...

More information

Matlab Tutorial. The value assigned to a variable can be checked by simply typing in the variable name:

Matlab Tutorial. The value assigned to a variable can be checked by simply typing in the variable name: 1 Matlab Tutorial 1- What is Matlab? Matlab is a powerful tool for almost any kind of mathematical application. It enables one to develop programs with a high degree of functionality. The user can write

More information

The notebook interface is the usual one and is quite sophisticated. (It was used to create these notes, for instance.)

The notebook interface is the usual one and is quite sophisticated. (It was used to create these notes, for instance.) 4. Mathematica 4. Introduction Mathematica is a general purpose computer algebra system. That means it can do algebraic manipulations (including calculus and matrix manipulation) and it can also be used

More information

Matlab Programming Introduction 1 2

Matlab Programming Introduction 1 2 Matlab Programming Introduction 1 2 Mili I. Shah August 10, 2009 1 Matlab, An Introduction with Applications, 2 nd ed. by Amos Gilat 2 Matlab Guide, 2 nd ed. by D. J. Higham and N. J. Higham Starting Matlab

More information

A Mathematica Tutorial

A Mathematica Tutorial A Mathematica Tutorial -3-8 This is a brief introduction to Mathematica, the symbolic mathematics program. This tutorial is generic, in the sense that you can use it no matter what kind of computer you

More information

A Mathematica Primer

A Mathematica Primer A Mathematica Primer For Students of Physics 218: Oscillatory and Wave Phenomena Brooks Thomas Lafayette College Second Edition 2017 Chapter 1 Basic Syntax Getting started After you double-clicking on

More information

Education Resources. This section is designed to provide examples which develop routine skills necessary for completion of this section.

Education Resources. This section is designed to provide examples which develop routine skills necessary for completion of this section. Education Resources Trigonometry Higher Mathematics Supplementary Resources Section A This section is designed to provide examples which develop routine skills necessary for completion of this section.

More information

Chapter 7: Analytic Trigonometry

Chapter 7: Analytic Trigonometry Chapter 7: Analytic Trigonometry 7. Trigonometric Identities Below are the basic trig identities discussed in previous chapters. Reciprocal csc(x) sec(x) cot(x) sin(x) cos(x) tan(x) Quotient sin(x) cos(x)

More information

Matlab and Octave: Quick Introduction and Examples 1 Basics

Matlab and Octave: Quick Introduction and Examples 1 Basics Matlab and Octave: Quick Introduction and Examples 1 Basics 1.1 Syntax and m-files There is a shell where commands can be written in. All commands must either be built-in commands, functions, names of

More information

EGR 111 Introduction to MATLAB

EGR 111 Introduction to MATLAB EGR 111 Introduction to MATLAB This lab introduces the MATLAB help facility, shows how MATLAB TM, which stands for MATrix LABoratory, can be used as an advanced calculator. This lab also introduces assignment

More information

Partial Derivatives (Online)

Partial Derivatives (Online) 7in x 10in Felder c04_online.tex V3 - January 21, 2015 9:44 A.M. Page 1 CHAPTER 4 Partial Derivatives (Online) 4.7 Tangent Plane Approximations and Power Series It is often helpful to use a linear approximation

More information

Part V Appendices c Copyright, Todd Young and Martin Mohlenkamp, Department of Mathematics, Ohio University, 2017

Part V Appendices c Copyright, Todd Young and Martin Mohlenkamp, Department of Mathematics, Ohio University, 2017 Part V Appendices c Copyright, Todd Young and Martin Mohlenkamp, Department of Mathematics, Ohio University, 2017 Appendix A Glossary of Matlab Commands Mathematical Operations + Addition. Type help plus

More information

MATH 162 Calculus II Computer Laboratory Topic: Introduction to Mathematica & Parametrizations

MATH 162 Calculus II Computer Laboratory Topic: Introduction to Mathematica & Parametrizations MATH 162 Calculus II Computer Laboratory Topic: Introduction to Mathematica & Goals of the lab: To learn some basic operations in Mathematica, such as how to define a function, and how to produce various

More information

Review of Trigonometry

Review of Trigonometry Worksheet 8 Properties of Trigonometric Functions Section Review of Trigonometry This section reviews some of the material covered in Worksheets 8, and The reader should be familiar with the trig ratios,

More information

Programming in Mathematics. Mili I. Shah

Programming in Mathematics. Mili I. Shah Programming in Mathematics Mili I. Shah Starting Matlab Go to http://www.loyola.edu/moresoftware/ and login with your Loyola name and password... Matlab has eight main windows: Command Window Figure Window

More information

Starting Matlab. MATLAB Laboratory 09/09/10 Lecture. Command Window. Drives/Directories. Go to.

Starting Matlab. MATLAB Laboratory 09/09/10 Lecture. Command Window. Drives/Directories. Go to. Starting Matlab Go to MATLAB Laboratory 09/09/10 Lecture Lisa A. Oberbroeckling Loyola University Maryland loberbroeckling@loyola.edu http://ctx.loyola.edu and login with your Loyola name and password...

More information

Module 4 Graphs of the Circular Functions

Module 4 Graphs of the Circular Functions MAC 1114 Module 4 Graphs of the Circular Functions Learning Objectives Upon completing this module, you should be able to: 1. Recognize periodic functions. 2. Determine the amplitude and period, when given

More information

AN INTRODUCTION TO MATLAB

AN INTRODUCTION TO MATLAB AN INTRODUCTION TO MATLAB 1 Introduction MATLAB is a powerful mathematical tool used for a number of engineering applications such as communication engineering, digital signal processing, control engineering,

More information

Contents. Implementing the QR factorization The algebraic eigenvalue problem. Applied Linear Algebra in Geoscience Using MATLAB

Contents. Implementing the QR factorization The algebraic eigenvalue problem. Applied Linear Algebra in Geoscience Using MATLAB Applied Linear Algebra in Geoscience Using MATLAB Contents Getting Started Creating Arrays Mathematical Operations with Arrays Using Script Files and Managing Data Two-Dimensional Plots Programming in

More information

Beginner s Mathematica Tutorial

Beginner s Mathematica Tutorial Christopher Lum Autonomous Flight Systems Laboratory Updated: 12/09/05 Introduction Beginner s Mathematica Tutorial This document is designed to act as a tutorial for an individual who has had no prior

More information

Calculus II (Math 122) Final Exam, 11 December 2013

Calculus II (Math 122) Final Exam, 11 December 2013 Name ID number Sections B Calculus II (Math 122) Final Exam, 11 December 2013 This is a closed book exam. Notes and calculators are not allowed. A table of trigonometric identities is attached. To receive

More information

4. Dynamic Interactivity

4. Dynamic Interactivity 4. Dynamic Interactivity Mathematica has several dynamic elements. It is very useful for visualization of the results if the problem contains some parameters and one wants to study it under the change

More information

Mathematica Basics. Exponential Functions Exp[expression] Natural Logarithms (ln) Log[expression]

Mathematica Basics. Exponential Functions Exp[expression] Natural Logarithms (ln) Log[expression] Mathematica Basics To evaluate a Mathematica command, press [Shift]+[Enter]. Pay attention to spaces! Mathematica interprets some of them as multiplication. Syntax, capitalization and punctuation are meaningful.

More information

Chapter 7. Exercise 7A. dy dx = 30x(x2 3) 2 = 15(2x(x 2 3) 2 ) ( (x 2 3) 3 ) y = 15

Chapter 7. Exercise 7A. dy dx = 30x(x2 3) 2 = 15(2x(x 2 3) 2 ) ( (x 2 3) 3 ) y = 15 Chapter 7 Exercise 7A. I will use the intelligent guess method for this question, but my preference is for the rearranging method, so I will use that for most of the questions where one of these approaches

More information

MAT 275 Laboratory 1 Introduction to MATLAB

MAT 275 Laboratory 1 Introduction to MATLAB MATLAB sessions: Laboratory 1 1 MAT 275 Laboratory 1 Introduction to MATLAB MATLAB is a computer software commonly used in both education and industry to solve a wide range of problems. This Laboratory

More information

HW#50: Finish Evaluating Using Inverse Trig Functions (Packet p. 7) Solving Linear Equations (Packet p. 8) ALL

HW#50: Finish Evaluating Using Inverse Trig Functions (Packet p. 7) Solving Linear Equations (Packet p. 8) ALL MATH 4R TRIGONOMETRY HOMEWORK NAME DATE HW#49: Inverse Trigonometric Functions (Packet pp. 5 6) ALL HW#50: Finish Evaluating Using Inverse Trig Functions (Packet p. 7) Solving Linear Equations (Packet

More information

MATLAB Project: Getting Started with MATLAB

MATLAB Project: Getting Started with MATLAB Name Purpose: To learn to create matrices and use various MATLAB commands for reference later MATLAB functions used: [ ] : ; + - * ^, size, help, format, eye, zeros, ones, diag, rand, round, cos, sin,

More information

Mathematica Primer.nb 1

Mathematica Primer.nb 1 Mathematica Primer.nb (* Mathematica is a powerful mathematics software pacage that can perform numerical calculations and SYMBOIC manipulations. To enter the program from either a Mac or Windows environment,

More information

4.2 Graphing Inverse Trigonometric Functions

4.2 Graphing Inverse Trigonometric Functions 4.2 Graphing Inverse Trigonometric Functions Learning Objectives Understand the meaning of restricted domain as it applies to the inverses of the six trigonometric functions. Apply the domain, range and

More information

STEPHEN WOLFRAM MATHEMATICADO. Fourth Edition WOLFRAM MEDIA CAMBRIDGE UNIVERSITY PRESS

STEPHEN WOLFRAM MATHEMATICADO. Fourth Edition WOLFRAM MEDIA CAMBRIDGE UNIVERSITY PRESS STEPHEN WOLFRAM MATHEMATICADO OO Fourth Edition WOLFRAM MEDIA CAMBRIDGE UNIVERSITY PRESS Table of Contents XXI a section new for Version 3 a section new for Version 4 a section substantially modified for

More information

Dr Richard Greenaway

Dr Richard Greenaway SCHOOL OF PHYSICS, ASTRONOMY & MATHEMATICS 4PAM1008 MATLAB 3 Creating, Organising & Processing Data Dr Richard Greenaway 3 Creating, Organising & Processing Data In this Workshop the matrix type is introduced

More information

Starting MATLAB To logon onto a Temple workstation at the Tech Center, follow the directions below.

Starting MATLAB To logon onto a Temple workstation at the Tech Center, follow the directions below. What is MATLAB? MATLAB (short for MATrix LABoratory) is a language for technical computing, developed by The Mathworks, Inc. (A matrix is a rectangular array or table of usually numerical values.) MATLAB

More information

Introduction to Matlab

Introduction to Matlab Technische Universität München WT 21/11 Institut für Informatik Prof Dr H-J Bungartz Dipl-Tech Math S Schraufstetter Benjamin Peherstorfer, MSc October 22nd, 21 Introduction to Matlab Engineering Informatics

More information

Functions and Graphs. The METRIC Project, Imperial College. Imperial College of Science Technology and Medicine, 1996.

Functions and Graphs. The METRIC Project, Imperial College. Imperial College of Science Technology and Medicine, 1996. Functions and Graphs The METRIC Project, Imperial College. Imperial College of Science Technology and Medicine, 1996. Launch Mathematica. Type

More information

This is called the horizontal displacement of also known as the phase shift.

This is called the horizontal displacement of also known as the phase shift. sin (x) GRAPHS OF TRIGONOMETRIC FUNCTIONS Definitions A function f is said to be periodic if there is a positive number p such that f(x + p) = f(x) for all values of x. The smallest positive number p for

More information

Assignment 1. Prolog to Problem 1. Two cylinders. ü Visualization. Problems by Branko Curgus

Assignment 1. Prolog to Problem 1. Two cylinders. ü Visualization. Problems by Branko Curgus Assignment In[]:= Problems by Branko Curgus SetOptions $FrontEndSession, Magnification Prolog to Problem. Two cylinders In[]:= This is a tribute to a problem that I was assigned as an undergraduate student

More information

HANDS-ON START TO WOLFRAM MATHEMATICA. and Programming with the Wolfram Language. Cliff Hastings Kelvin Mischo Michael Morrison.

HANDS-ON START TO WOLFRAM MATHEMATICA. and Programming with the Wolfram Language. Cliff Hastings Kelvin Mischo Michael Morrison. HANDS-ON START TO WOLFRAM MATHEMATICA and Programming with the Wolfram Language Cliff Hastings Kelvin Mischo Michael Morrison Champaign 11 11 1 111THE COMPLETE OVERVIEW 1 Chapter 1 The Very Basics 3 Chapter

More information

Math 3 Coordinate Geometry Part 2 Graphing Solutions

Math 3 Coordinate Geometry Part 2 Graphing Solutions Math 3 Coordinate Geometry Part 2 Graphing Solutions 1 SOLVING SYSTEMS OF EQUATIONS GRAPHICALLY The solution of two linear equations is the point where the two lines intersect. For example, in the graph

More information

ARRAY VARIABLES (ROW VECTORS)

ARRAY VARIABLES (ROW VECTORS) 11 ARRAY VARIABLES (ROW VECTORS) % Variables in addition to being singular valued can be set up as AN ARRAY of numbers. If we have an array variable as a row of numbers we call it a ROW VECTOR. You can

More information

MATLAB Basics EE107: COMMUNICATION SYSTEMS HUSSAIN ELKOTBY

MATLAB Basics EE107: COMMUNICATION SYSTEMS HUSSAIN ELKOTBY MATLAB Basics EE107: COMMUNICATION SYSTEMS HUSSAIN ELKOTBY What is MATLAB? MATLAB (MATrix LABoratory) developed by The Mathworks, Inc. (http://www.mathworks.com) Key Features: High-level language for numerical

More information

Physics 326G Winter Class 2. In this class you will learn how to define and work with arrays or vectors.

Physics 326G Winter Class 2. In this class you will learn how to define and work with arrays or vectors. Physics 326G Winter 2008 Class 2 In this class you will learn how to define and work with arrays or vectors. Matlab is designed to work with arrays. An array is a list of numbers (or other things) arranged

More information

Calculus II - Math 1220 Mathematica Commands: From Basics To Calculus II - Version 11 c

Calculus II - Math 1220 Mathematica Commands: From Basics To Calculus II - Version 11 c Calculus II - Math 1220 Mathematica Commands: From Basics To Calculus II - Version 11 c Edit your document (remove extras and errors, ensure the rest works correctly) and turn-in your print-out. If needed,

More information

Basic stuff -- assignments, arithmetic and functions

Basic stuff -- assignments, arithmetic and functions Basic stuff -- assignments, arithmetic and functions Most of the time, you will be using Maple as a kind of super-calculator. It is possible to write programs in Maple -- we will do this very occasionally,

More information

GETTING STARTED WITH MATHEMATICA

GETTING STARTED WITH MATHEMATICA GETTING STARTED WITH MATHEMATICA Loading Mathematica : If you are on any Loyola network computer, you should be able to load Mathematica by clicking on the start button (on the lower left of the computer

More information

1 Introduction to Matlab

1 Introduction to Matlab 1 Introduction to Matlab 1. What is Matlab? Matlab is a computer program designed to do mathematics. You might think of it as a super-calculator. That is, once Matlab has been started, you can enter computations,

More information

Introduction to MATLAB 7 for Engineers

Introduction to MATLAB 7 for Engineers Introduction to MATLAB 7 for Engineers William J. Palm III Chapter 3 Functions and Files Getting Help for Functions You can use the lookfor command to find functions that are relevant to your application.

More information

AMS 27L LAB #1 Winter 2009

AMS 27L LAB #1 Winter 2009 AMS 27L LAB #1 Winter 2009 Introduction to MATLAB Objectives: 1. To introduce the use of the MATLAB software package 2. To learn elementary mathematics in MATLAB Getting Started: Log onto your machine

More information

Translation of graphs (2) The exponential function and trigonometric function

Translation of graphs (2) The exponential function and trigonometric function Lesson 35 Translation of graphs (2) The exponential function and trigonometric function Learning Outcomes and Assessment Standards Learning Outcome 2: Functions and Algebra Assessment Standard Generate

More information

LECTURE 0: Introduction and Background

LECTURE 0: Introduction and Background 1 LECTURE 0: Introduction and Background September 10, 2012 1 Computational science The role of computational science has become increasingly significant during the last few decades. It has become the

More information

MatLab Just a beginning

MatLab Just a beginning MatLab Just a beginning P.Kanungo Dept. of E & TC, C.V. Raman College of Engineering, Bhubaneswar Introduction MATLAB is a high-performance language for technical computing. MATLAB is an acronym for MATrix

More information

Basic Exercises about Mathematica

Basic Exercises about Mathematica Basic Exercises about Mathematica 1. Calculate with four decimal places. NB F. 2.23607 2.23607 Ë We can evaluate a cell by placing the cursor on it and pressing Shift+Enter (or Enter on the numeric key

More information

Limits and Continuity: section 12.2

Limits and Continuity: section 12.2 Limits and Continuity: section 1. Definition. Let f(x,y) be a function with domain D, and let (a,b) be a point in the plane. We write f (x,y) = L if for each ε > 0 there exists some δ > 0 such that if

More information

University of Alberta

University of Alberta A Brief Introduction to MATLAB University of Alberta M.G. Lipsett 2008 MATLAB is an interactive program for numerical computation and data visualization, used extensively by engineers for analysis of systems.

More information

MATLAB QUICK START TUTORIAL

MATLAB QUICK START TUTORIAL MATLAB QUICK START TUTORIAL This tutorial is a brief introduction to MATLAB which is considered one of the most powerful languages of technical computing. In the following sections, the basic knowledge

More information

Trigonometric Graphs Dr. Laura J. Pyzdrowski

Trigonometric Graphs Dr. Laura J. Pyzdrowski 1 Names: About this Laboratory In this laboratory, we will examine trigonometric functions and their graphs. Upon completion of the lab, you should be able to quickly sketch such functions and determine

More information

Introduction to Matlab

Introduction to Matlab Introduction to Matlab The purpose of this intro is to show some of Matlab s basic capabilities. Nir Gavish, 2.07 Contents Getting help Matlab development enviroment Variable definitions Mathematical operations

More information

Introduction to Engineering gii

Introduction to Engineering gii 25.108 Introduction to Engineering gii Dr. Jay Weitzen Lecture Notes I: Introduction to Matlab from Gilat Book MATLAB - Lecture # 1 Starting with MATLAB / Chapter 1 Topics Covered: 1. Introduction. 2.

More information

P-Set 1 Solution Set. Solutions created by Melissa Diskin. Part 1 (3 points) Part 2 (4 points) ê H1 ê 2 + xl^hx ê 2L, xdd

P-Set 1 Solution Set. Solutions created by Melissa Diskin. Part 1 (3 points) Part 2 (4 points) ê H1 ê 2 + xl^hx ê 2L, xdd PSet Solution Set Solutions created by Melissa Diskin I (Handworked, 5 points) Simplified version of the derivative with respect to x. In[80]:= Simplify@D@ ê H ê + xl^hx ê L, xdd Out[80]= + x xê x + x

More information

Dynamics and Vibrations Mupad tutorial

Dynamics and Vibrations Mupad tutorial Dynamics and Vibrations Mupad tutorial School of Engineering Brown University ENGN40 will be using Matlab Live Scripts instead of Mupad. You can find information about Live Scripts in the ENGN40 MATLAB

More information

CALCULUS - PRACTICAL II - ELEMENTARY CALCULUS

CALCULUS - PRACTICAL II - ELEMENTARY CALCULUS CALCULUS - PRACTICAL II - ELEMENTARY CALCULUS PEDRO FORTUNY AYUSO The students will have already received the lessons about its, continuity and derivation although these concepts should not be new for

More information

Getting Started with Mathematica

Getting Started with Mathematica G563 Quantitative Paleontology Department of Geological Sciences P. David Polly Getting Started with Mathematica Mathematica has a unique interface that takes a while to get used to. You open to a blank

More information

Efficacy of Numerically Approximating Pi with an N-sided Polygon

Efficacy of Numerically Approximating Pi with an N-sided Polygon Peter Vu Brewer MAT66 Honors Topic Efficacy of umerically Approximating Pi with an -sided Polygon The quest for precisely finding the irrational number pi has been an endeavor since early human history.

More information

Mathematics Computer Laboratory - Math Version 11 Lab 6 - Trigonometric Functions c

Mathematics Computer Laboratory - Math Version 11 Lab 6 - Trigonometric Functions c Mathematics Computer Laboratory - Math 100 - Version 11 Lab 6 - Trigonometric Functions c Due You should only turn in exercises in this lab with its title and your name in Title and Subtitle font, respectively.

More information

MATHEMATICA LAB SKILLS ACTIVITY 2: ANALYZING DATA IN MATHEMATICA

MATHEMATICA LAB SKILLS ACTIVITY 2: ANALYZING DATA IN MATHEMATICA MATHEMATICA LAB SKILLS ACTIVITY 2: ANALYZING DATA IN MATHEMATICA LEARNING GOALS You will be 1. able to define and use functions in Mathematica. 2. able to scale and shift lists (arrays) of data. 3. able

More information

Unit II Graphing Functions and Data

Unit II Graphing Functions and Data Unit II Graphing Functions and Data These Materials were developed for use at and neither nor the author, Mark Schneider, assume any responsibility for their suitability or completeness for use elsewhere

More information

autograd tutorial Paul Vicol, Slides Based on Ryan Adams January 30, 2017 CSC 321, University of Toronto

autograd tutorial Paul Vicol, Slides Based on Ryan Adams January 30, 2017 CSC 321, University of Toronto autograd tutorial Paul Vicol, Slides Based on Ryan Adams January 30, 2017 CSC 321, University of Toronto 1 tutorial outline 1. Automatic Differentiation 2. Introduction to Autograd 3. IPython Notebook

More information

Lab 2B Parametrizing Surfaces Math 2374 University of Minnesota Questions to:

Lab 2B Parametrizing Surfaces Math 2374 University of Minnesota   Questions to: Lab_B.nb Lab B Parametrizing Surfaces Math 37 University of Minnesota http://www.math.umn.edu/math37 Questions to: rogness@math.umn.edu Introduction As in last week s lab, there is no calculus in this

More information

Huei-Huang Lee. Programming with MATLAB2016 SDC ACCESS CODE. Better Textbooks. Lower Prices. UNIQUE CODE INSIDE

Huei-Huang Lee. Programming with MATLAB2016 SDC ACCESS CODE. Better Textbooks. Lower Prices.   UNIQUE CODE INSIDE Programming with Huei-Huang Lee MATLAB2016 SDC P U B L I C AT I O N S Better Textbooks. Lower Prices. www.sdcpublications.com ACCESS CODE UNIQUE CODE INSIDE Powered by TCPDF (www.tcpdf.org) Visit the following

More information

Introduction to Programming

Introduction to Programming Introduction to Programming Department of Computer Science and Information Systems Tingting Han (afternoon), Steve Maybank (evening) tingting@dcs.bbk.ac.uk sjmaybank@dcs.bbk.ac.uk Autumn 2017 Week 4: More

More information

Computer Project: Getting Started with MATLAB

Computer Project: Getting Started with MATLAB Computer Project: Getting Started with MATLAB Name Purpose: To learn to create matrices and use various MATLAB commands. Examples here can be useful for reference later. MATLAB functions: [ ] : ; + - *

More information

5.5 Newton s Approximation Method

5.5 Newton s Approximation Method 498CHAPTER 5. USING DERIVATIVES TO ANALYZE FUNCTIONS; FURTHER APPLICATIONS 4 3 y = x 4 3 f(x) = x cosx y = cosx 3 3 x = cosx x cosx = 0 Figure 5.: Figure showing the existence of a solution of x = cos

More information

Trigonometric Integrals

Trigonometric Integrals Most trigonometric integrals can be solved by using trigonometric identities or by following a strategy based on the form of the integrand. There are some that are not so easy! Basic Trig Identities and

More information

Chapter 3. built in functions help feature elementary math functions data analysis functions random number functions computational limits

Chapter 3. built in functions help feature elementary math functions data analysis functions random number functions computational limits Chapter 3 built in functions help feature elementary math functions data analysis functions random number functions computational limits I have used resources for instructors, available from the publisher

More information

Approximate First and Second Derivatives

Approximate First and Second Derivatives MTH229 Project 6 Exercises Approximate First and Second Derivatives NAME: SECTION: INSTRUCTOR: Exercise 1: Let f(x) = sin(x 2 ). We wish to find the derivative of f when x = π/4. a. Make a function m-file

More information

ipad App User Guide Getting Started with Desmos Tables Variables and Sliders Settings, Zoom, and Language Graphable Expressions Supported Functions

ipad App User Guide Getting Started with Desmos Tables Variables and Sliders Settings, Zoom, and Language Graphable Expressions Supported Functions ipad App User Guide Learn more about graphing functions, plotting tables of data, evaluating equations, exploring transformations, and more! If you have questions that aren t answered in here, send us

More information

MATLAB Basics. Configure a MATLAB Package 6/7/2017. Stanley Liang, PhD York University. Get a MATLAB Student License on Matworks

MATLAB Basics. Configure a MATLAB Package 6/7/2017. Stanley Liang, PhD York University. Get a MATLAB Student License on Matworks MATLAB Basics Stanley Liang, PhD York University Configure a MATLAB Package Get a MATLAB Student License on Matworks Visit MathWorks at https://www.mathworks.com/ It is recommended signing up with a student

More information

Automating the Tedious Stuff (Functional programming and other Mathematica magic)

Automating the Tedious Stuff (Functional programming and other Mathematica magic) /22 Automating the Tedious Stuff (Functional programming and other Mathematica magic) Connor Glosser Michigan State University Departments of Physics & Electrical/Computer Engineering π, 2014 /22 Table

More information

REPRESENTATION OF CURVES IN PARAMETRIC FORM

REPRESENTATION OF CURVES IN PARAMETRIC FORM - Representation of curves in parametric form 1 REPRESENTATION OF CURVES IN PARAMETRIC FORM.1. Parametrization of curves in the plane Given a curve in parametric form, its graphical representation in a

More information

Final Examination. Math1339 (C) Calculus and Vectors. December 22, :30-12:30. Sanghoon Baek. Department of Mathematics and Statistics

Final Examination. Math1339 (C) Calculus and Vectors. December 22, :30-12:30. Sanghoon Baek. Department of Mathematics and Statistics Math1339 (C) Calculus and Vectors December 22, 2010 09:30-12:30 Sanghoon Baek Department of Mathematics and Statistics University of Ottawa Email: sbaek@uottawa.ca MAT 1339 C Instructor: Sanghoon Baek

More information

Welcome. Please Sign-In

Welcome. Please Sign-In Welcome Please Sign-In Day 1 Session 1 Self-Evaluation Topics to be covered: Equations Systems of Equations Solving Inequalities Absolute Value Equations Equations Equations An equation says two things

More information