Integrating with Mathematica



Similar documents
A positive exponent means repeated multiplication. A negative exponent means the opposite of repeated multiplication, which is repeated

Homework 2 Solutions

By Clicking on the Worksheet you are in an active Math Region. In order to insert a text region either go to INSERT -TEXT REGION or simply

Lies My Calculator and Computer Told Me

7.7 Solving Rational Equations

Polynomial and Synthetic Division. Long Division of Polynomials. Example 1. 6x 2 7x 2 x 2) 19x 2 16x 4 6x3 12x 2 7x 2 16x 7x 2 14x. 2x 4.

The numerical values that you find are called the solutions of the equation.

Algebra 2 Unit 8 (Chapter 7) CALCULATORS ARE NOT ALLOWED

xn. x must be written as x^(2n) and NOT as x^2n. Writing x^2n means 4x y would be written as 4 x^2 y^3 or with the multiplication mark as 4*x^2*y^3.

Math 2443, Section 16.3

Negative Integral Exponents. If x is nonzero, the reciprocal of x is written as 1 x. For example, the reciprocal of 23 is written as 2

Algebra. Exponents. Absolute Value. Simplify each of the following as much as possible. 2x y x + y y. xxx 3. x x x xx x. 1. Evaluate 5 and 123

Exponential and Logarithmic Functions

Multiplying and Dividing Algebraic Fractions

10.1. Solving Quadratic Equations. Investigation: Rocket Science CONDENSED

LINEAR INEQUALITIES. less than, < 2x + 5 x 3 less than or equal to, greater than, > 3x 2 x 6 greater than or equal to,

Core Maths C3. Revision Notes

A Quick Algebra Review

6.3. section. Building Up the Denominator. To convert the fraction 2 3 factor 21 as Because 2 3

Solutions of Linear Equations in One Variable

Exponents. Learning Objectives 4-1

FRACTIONS COMMON MISTAKES

Polynomial Degree and Finite Differences

Double Integrals in Polar Coordinates

Rational Expressions - Complex Fractions

MATH 132: CALCULUS II SYLLABUS

1 Determine whether an. 2 Solve systems of linear. 3 Solve systems of linear. 4 Solve systems of linear. 5 Select the most efficient

14.1. Basic Concepts of Integration. Introduction. Prerequisites. Learning Outcomes. Learning Style

Chapter 4. Polynomial and Rational Functions. 4.1 Polynomial Functions and Their Graphs

Calculator Worksheet--page 1

Lecture 2 Mathcad Basics

3 e) x f) 2. Precalculus Worksheet P Complete the following questions from your textbook: p11: # Why would you never write 5 < x > 7?

Section 1-4 Functions: Graphs and Properties

Activity 1: Using base ten blocks to model operations on decimals

Curve Fitting with Maple

Exponential Functions, Logarithms, and e

Section 3-3 Approximating Real Zeros of Polynomials

7 Literal Equations and

Mathematics 31 Pre-calculus and Limits

LIMITS AND CONTINUITY

Work as the Area Under a Graph of Force vs. Displacement

The fairy tale Hansel and Gretel tells the story of a brother and sister who

EXCEL Tutorial: How to use EXCEL for Graphs and Calculations.

LIES MY CALCULATOR AND COMPUTER TOLD ME

Simplification Problems to Prepare for Calculus

Integrating algebraic fractions

0 Introduction to Data Analysis Using an Excel Spreadsheet

SUNY ECC. ACCUPLACER Preparation Workshop. Algebra Skills

Zero and Negative Exponents and Scientific Notation. a a n a m n. Now, suppose that we allow m to equal n. We then have. a am m a 0 (1) a m

9.3 OPERATIONS WITH RADICALS

15.1. Exact Differential Equations. Exact First-Order Equations. Exact Differential Equations Integrating Factors

The small increase in x is. and the corresponding increase in y is. Therefore

Solution Guide Chapter 14 Mixing Fractions, Decimals, and Percents Together

Progress Check 6. Objective To assess students progress on mathematical content through the end of Unit 6. Looking Back: Cumulative Assessment

Part 1 Expressions, Equations, and Inequalities: Simplifying and Solving

x 2 + y 2 = 1 y 1 = x 2 + 2x y = x 2 + 2x + 1

Workspaces Creating and Opening Pages Creating Ticker Lists Looking up Ticker Symbols Ticker Sync Groups Market Summary Snap Quote Key Statistics

UNDERSTANDING ALGEBRA JAMES BRENNAN. Copyright 2002, All Rights Reserved

About the Gamma Function

LESSON EIII.E EXPONENTS AND LOGARITHMS

MBA Jump Start Program

Microsoft Excel Tutorial

Maths Workshop for Parents 2. Fractions and Algebra

Partial f (x; y) x f (x; x2 y2 and then we evaluate the derivative as if y is a constant.

Section 3-7. Marginal Analysis in Business and Economics. Marginal Cost, Revenue, and Profit. 202 Chapter 3 The Derivative

THE POWER RULES. Raising an Exponential Expression to a Power

Roots of equation fx are the values of x which satisfy the above expression. Also referred to as the zeros of an equation

Substitute 4 for x in the function, Simplify.

Angles and Quadrants. Angle Relationships and Degree Measurement. Chapter 7: Trigonometry

Maple Quick Start. Introduction. Talking to Maple. Using [ENTER] 3 (2.1)

Years after US Student to Teacher Ratio

The majority of college students hold credit cards. According to the Nellie May

What is the difference between simple and compound interest and does it really matter?

Solutions to Homework 10

Five 5. Rational Expressions and Equations C H A P T E R

Core Maths C1. Revision Notes

SECTION P.5 Factoring Polynomials

VHDL Test Bench Tutorial

UNIT 1: ANALYTICAL METHODS FOR ENGINEERS

Mathematics Placement Packet Colorado College Department of Mathematics and Computer Science

Click on the links below to jump directly to the relevant section

POLYNOMIAL FUNCTIONS

STRAND: ALGEBRA Unit 3 Solving Equations

Getting Started with Excel Table of Contents

3. Solve the equation containing only one variable for that variable.

MATH ADVISEMENT GUIDE

AP CALCULUS AB 2008 SCORING GUIDELINES

Order of Operations More Essential Practice

Session 7 Fractions and Decimals

C3: Functions. Learning objectives

Statgraphics Getting started

Section 6-3 Double-Angle and Half-Angle Identities

LABORATORY. 14 Disk Scheduling OBJECTIVE REFERENCES. Watch how the operating system schedules the reading or writing of disk tracks.

Using the Area Model to Teach Multiplying, Factoring and Division of Polynomials

Unit 6: Polynomials. 1 Polynomial Functions and End Behavior. 2 Polynomials and Linear Factors. 3 Dividing Polynomials

Chapter 4: Exponential and Logarithmic Functions

7.6 Approximation Errors and Simpson's Rule

Beginner s Matlab Tutorial

Transcription:

Integrating with Mathematica (Supplement to Making Some Impossible Integrals Possible) by Dave Morstad Objectives of Assignment 1. To demonstrate how Mathematica integrates indefinite integrals symbolically.. To demonstrate how Mathematica integrates definite integrals symbolically. 3. To demonstrate how Mathematica integrates numerically. Mathematica is case sensitive. Upper and lower case letters are not interchangeable. You must provide the constant of integration for indefinite integrals. To make Mathematica type bigger, click on Format up at the top of the screen, then, at the bottom of the pull-down menu, click on magnification and select %. I. Indefinite Integrals Mathematica 3. has two ways in which you can tell it to perform integration. You can use the Integrate command, or you can use the mouse to construct the integral. Both methods are shown in the following eample. Eample 1. An integral Mathematica can evaluate: d. 3 +1 Method 1: Type in Integrate[^/(^3 + 1), ] and press SE. The output Mathematica gives is Log is base e. Log [ 3 + 1]. You must add C. 3 4

Method : Look over to the right side of the computer screen. Click the mouse on the button containing dl. That action should put the integral symbol in your Mathematica workspace. Net, right-click your mouse and choose Epression Input. Then choose Fraction. Now you can type in the numerator and denominator. Right-click, choose Epression Input and Superscript to put in the eponents. Finally, put an in the little bo after dl. Log [ 3 + 1] Press SE. Again, the output Mathematica gives is. You 3 must add C. Log is base e. Eample. An integral Mathematica cannot evaluate: sin(sin ) d. Type Integrate[Sin[Sin[]], ] or construct it, and press SE. The output is Sin[Sin[]] dl, which is eactly what you put in. Whenever Mathematica gives back the same thing you typed in, it means Mathematica could not evaluate it. Eample 3. An eample of an integral evaluated to a special function: e d. Type Integrate[E^^, ] or construct it, and press SE. The output is 1 Erfi [] So what does Erfi mean? For help, type?? Erfi and press SE. Mathematica will tell you a little about Erfi. Look in a tet on comple analysis for more information. This type of an answer means Mathematica couldn t come up with an elementary solution. 5

II. Definite Integrals Eample 1. A simple definite integral: sin d. Type Integrate[Sin[]^, {,, Pi}] or construct it by selecting the definite integral button. Notice e and are available on the palette at the right. Press SE. The output is. Eample. An integral with a more complicated solution: sin d. Type Integrate[Sin[^], {,, *Pi}] or construct it and press SE. The output is [ ] FresnelS. This is a solution which is given in terms of the special function FresnelS. Probably not very helpful. See below to get a numerical value for this quantity. ***** VALUABLE INFO ***** Type N[%] and press SE to make Mathematica numerically evaluate its last output. In Eample, the numerical value of the solution is.64138. Type N[%%] and press SE to make Mathematica evaluate its second to the last output. For eample, if you did Eample 1 and then Eample, N[%%] will evaluate, the output from Eample 1, and give you 1.578. N[%%%] will evaluate the third to the last output, and so on. III. Numerical Approimation of Definite Integrals with NIntegrate When Mathematica cannot evaluate a definite integral using the command Integrate[f(), {, a, b}], you can force Mathematica to approimate the integral through numerical methods. NIntegrate[f(), {, a, b}] tells Mathematica to find a numerical approimation. Eample 1. sin(sin(si n ))d. 6

Type Integrate[Sin[Sin[Sin[]]], {,, Pi}] and press SE. The output, after Mathematica loads some special integration packages, is Sin[S in[sin[]] ] dl Mathematica could not evaluate it.. Since this is the same as your input, it means that Instead, type NIntegrate[Sin[Sin[Sin[]]], {,, Pi}] and press SE. If you prefer to construct the integral, you can type in and construct N[ Sin[Sin[Si n[]]] dl, 5]. Now the output is correct to 5 decimal places. NIntregrate will not allow you to specify 5 place of accuracy, but you can use the following: N[Integrate[Sin[Sin[]], {,, }], 5]. Eample. sin sin + cos d. Using Integrate will not result in a solution. Type NIntegrate[*Sin[]/(Sin[]+ Cos[]), {,, Pi/}] and press SE. The output is.8635. Eample 3. An integral which might not converge: 5 6 sin sin + cos d. Using NIntegrate for this integral gives.8569, but Mathematica also gives a warning that the value is possibly incorrect. If you plot the function, you will see it has a vertical asymptote within the interval of integration. Using N[ 5 6 sin sin + cos d, 8] will yield an answer of 4, but changing the 8 to 5 will result in an answer of. 1 1, both after giving that convergence warning. 7

IV. Iterated Integrals ***** WARNING ***** When you type the Integrate, Mathematica s order of integration may seem backwards compared to standard notation. Mathematica will first integrate with respect to the variable which is listed last. It will integrate last with respect to the variable which is listed first. Eample 1. 1 dyd. ( y ) Type Integrate[^/(y )^, {,, 1}, {y,, }], or construct it by clicking on the definite integral button, selecting the integrand bo after it s been inserted, and then clicking the definite integral button again, and press SE. Notice the order of the limits of integration in the Integrate command: is given first, y second. This may seem backwards. 8 The answer is + 3 4 Log[ ]. Enter N[%] to simplify the answer to.159. Eample. 1 ( + 4) ( y + 3) ( z + ) dydzd. 4 3 Type Integrate[1/((+4)^4*(y+3)^3*(z+)^),, z, y] and press SE. The solution is -1 6(4+) 3 ( 3 + y) ( + z ). If you want to see the denominator multiplied out, enter EpandAll[%]. 1 1 1 y Eample 3. ( + )( y + )( z + ) dzdyd 3 4. 1 1 1 y Type Integrate[( + ) * (y + 3) * (z + 4), {, -1, 1}, {y, -Sqrt[1 - ^], Sqrt[1 - ^]}, {z, -Sqrt[1 - ^ - y^], Sqrt[1 - ^ - y^]}] and press SE. Of course, it can all be on the same line, but it might be easier to use several lines. The output should be 3 Pi (approimately1.531). 8

IV. Practice Problems Use Mathematica to evaluate the following: 1. sin 1 d. 1+ d 3. 4. 1+ sin d 1+ sin d 5. 6. + sin d + sin d Solutions: 1. 1 1 1 sin sin + + C 4 ;. + 4 4 3 3 1+ + C ; cos sin log(cos + sin ) + + cos 3. + sin + C ; 4. ; 5. Mathematica can t evaluate it +C ; 6..6981 9

Making Some Impossible Integrals Possible Objectives of Assignment 1. To practice integrating using Mathematica.. To practice reversing the order of integration and switching integrals to different coordinate systems when the integration seems impossible. I. Introduction Mathematica is an integrating wizard. Its etensive collection of integration algorithms will probably seem very impressive if you ve been through Calculus II. Unfortunately, even with Mathematica s great prowess evaluating integrals, there are still many types of integrals which are simply impossible unless special functions or series are utilized. Some integrals which seem impossible to evaluate only need to be restated in an alternate form to render them solvable. For eample, reversing the order of integration or switching to a different coordinate system can sometimes change a non integrable integrand into something more workable. Working through the preceding eamples in the hand out Integrating with Mathematica is a prerequisite for attempting this part if the assignment. The correct synta and several other little tricks are eplained there. II. A Typical Eample Suppose you want to evaluate below. sinh da where R is the dark region in the graph R 3

Setting up the integral so as to integrate first with respect to requires determining the following limits of integration: top value right curve sinh ddy. bottom value left curve A simple eamination of the graph of R reveals the desired limits of integration: y= ln = sinh ln ddy. y= = y Unfortunately, if you try to evaluate this double integral by hand, you will get stuck. Feeding it to Mathematica results in some bright red warnings about recursions eceeding 56. After the warnings, Mathematica gives a long messy output with Erf s and Erfi s. You can then use N[%] to find out that Mathematica thinks the value is.5887, but this is the result of numerical methods not the result of symbolic integration. (Face saving hint: Do not ask the instructor what N[%], Erf, and Erfi mean. It will be a dead give away that you did not even go through the first page of Integrating with Mathematica.) Well, if Mathematica could not symbolically integrate it the way you wrote it above, why not try another way? For eample, switch to Polar coordinates or reverse the order of integration. Since nothing in this problem resembles circles or polar relationships, try reversing the order of integration. That is, set up the integral as follows: rightmost value top curve sinh dyd. leftmost value This will result in the following integral: bottom curve = ln y= sinh dyd. = You should be able to evaluate this by hand and, if you ve been doing the homework, you should understand why this is possible to evaluate but the other double integral was not. Having Mathematica evaluate this produces no warnings and yields an answer of.58875. Now it is apparent that the first answer was accurate. y= 31