DOC PREVIEW
IIT MATH 152 - Lab 3 - TechniquesOfIntegration

This preview shows page 1-2-3 out of 10 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Math 152 Lab 3 - Techniques of IntegrationIntroductionIn the back of your textbook, there are many integration formulas. In times long past, before mathematics software existed, therewere entire multivolume books of these formulas, and mathematicians had to either use these books or derive everything by hand.Mathematics software makes the problem of computing integrals much, much simpler, as all of these formulas are made availableto the software - you don't have to go and leaf through a collection of tables to find the answer.Our goal with this notebook is to understand how Mathematica approaches the problem of integration. We will use Mathematicato compute symbolic integrals, and will learn to generalize these results into integration formulas of our own. We will alsoexamine some simple methods for computing integrals numerically.Symbolic IntegrationMathematica's Integrate command is very versatile. If we give it an expression and a variable to integrate by, it will give usthe indefinite integral. Note that Mathematica does not include the constants of integration.In[18]:=Integrate@Log@xD,xDOut[18]=− x + x Log@xDAlternatively, we can give it a range in order to compute definite integrals:In[19]:=Integrate@Log@xD, 8x, 1, 5<DOut[19]=− 4 + 5 Log@5DWe can even use Integrate as part of another expression:In[20]:=Solve@8Integrate@x^3 − 2x+ 1, 8x, 1, p<D  5<,pDOut[20]=::p →164−59J−359+69285 N1ê3+J−359+6 9285 N1ê3−12163+1183 I− 359 + 69285 M1ê3−23I− 359 + 69285 M1ê3−464 −59J−359+69285 N1ê3+ I− 359 + 6 9285 M1ê3>,:p →164−59J−359+69285 N1ê3+J−359+6 9285 N1ê3+12163+1183 I− 359 + 69285 M1ê3−23I− 359 + 69285 M1ê3− 464 −59J−359+69285 N1ê3+ I− 359 + 6 9285 M1ê3>,:p →−164−59J−359+69285 N1ê3+J−359+6 9285 N1ê3−12163+1183 I− 359 + 69285 M1ê3−23I− 359 + 69285 M1ê3+ 464 −59J−359+69285 N1ê3+ I− 359 + 6 9285 M1ê3>,:p →−164−59J−359+69285 N1ê3+J−359+6 9285 N1ê3+12163+1183 I− 359 + 69285 M1ê3−23I− 359 + 69285 M1ê3+ 464 −59J−359+69285 N1ê3+ I− 359 + 6 9285 M1ê3>>Sometimes, Integrate makes assumptions that we are not making. Consider the following integral:In[21]:=Integrate@ArcSin@xD, 8x, Pi, 2 ∗ Pi<DOut[21]=− − 1 +π2+ − 1 + 4 π2−πArcSin@πD+ 2 π ArcSin@2 πDA Calculus student is expected to give a very different answer from the output of the above command.2 Lab 3 - TechniquesOfIntegration.nbThat being said, we can still make Integrate work for us. One of the ways of doing this is by looking at the output of simpleformulas and looking for patterns. We saw an indefinite integral of lnHxL, what about x lnHxL?In[22]:=Integrate@x ∗ Log@xD,xDOut[22]=−x24+12x2Log@xDIt should look somewhat similar to the indefinite integral of lnHxL. Let's try some higher powers:In[23]:=Integrate@Hx^2L ∗ Log@xD,xDIntegrate@Hx^3L ∗ Log@xD,xDIntegrate@Hx^4L ∗ Log@xD,xDOut[23]=−x39+13x3Log@xDOut[24]=−x416+14x4Log@xDOut[25]=−x525+15x5Log@xDIn general, it seems like we have a formula that looks like this: ŸxnlnHxL „ x =xn+1lnHxLn+1-xn+1Hn+1L2.In[26]:=Integrate@Hx^nL ∗ Log@xD,xDSimplify@Integrate@Hx^nL ∗ Log@xD,xD == Hx^Hn + 1L ∗ Log@xDêHn + 1L − x^Hn + 1LêHn + 1L^2LDOut[26]=x1+nH− 1 + H1 + nLLog@xDLH1 + nL2Out[27]=TrueThis is an example of one of the most powerful formulas, the Integration By Parts formula Ÿu „ v = uv-Ÿv „ u. Many, manyother formulas are simply applications of Integration by Parts.Another important technique is called Partial Fractions Expansion. Let's look at this integral:In[28]:=Integrate@1 êHx^2 − 1L,xDOut[28]=12Log@1 − xD−12Log@1 + xDThe answer is a sum of two terms. If we try to go back a few steps into how to get this answer, then that means at some point weshould be able to break up the expression 1x2-1 into two parts. What's more, the fact that the terms are logarithms means that theseterms prior to integration should look something like 1x. The purpose of Partial Fractions Expansion is to break up large polynomi-als that are in the denominator of a rational expression. Mathematica has a function called Apart that can perform this expan-sion for us:Lab 3 - TechniquesOfIntegration.nb 3In[29]:=Apart@1 êHx^2 − 1LDOut[29]=12 H− 1 + xL−12 H1 + xLIntegrating the individual terms does indeed give us the antiderivative that we found previously.Apart also works on more complicated expressions:In[30]:=Apart@H2 ∗ s + 2LêHHs^2 + 1L ∗ Hs − 1L^3LDOut[30]=2H− 1 + sL3−1H− 1 + sL2+11 + s2Numeric IntegrationSometimes Integrate doesn't give us useful output. It's just not smart enough to solve the integral for us:In[31]:=Clear@xDIntegrate@H1 + Log@xDL ∗ Sqrt@1 + Hx ∗ Log@xDL ^2D, 8x, 1, 10<DOut[32]=‡110H1 + Log@xDL 1 + x2Log@xD2 xIn times like these, we have to approximate the value of the integral numerically.Before we can understand how to approximate the value of a definite integral with Mathematica, we need to first understandsome concepts from computer science:ü Conditional StatementsA conditional statement is a way to express decision making. We use one expression which can take the value "True" or "False,"and based on that expression, we evaluate other expressions. In Mathematica, the simplest conditional statement is the Iffunction. If takes three arguments: the first argument is the expression to decide with, the second argument is the input toevaluate if the expression is true, and the third argument is the input to evalaute if the expression is false.In[33]:=1 > 22 > 1If@1 > 2, 2 + 2, 2 + 3DIf@2 > 1, 2 + 2, 2 + 3DOut[33]=FalseOut[34]=TrueOut[35]=5Out[36]=4Another important conditional statement is Piecewise. It allows us to construct piecewise-defined functions. The way to usePiecewise is to give it a list, and each element of the list is an expression-condition pair.4 Lab 3 - TechniquesOfIntegration.nbIn[37]:=f@x_D := Piecewise@88x, x < 1<, 8x^2, x ≥ 1<<DPlot@f@xD, 8x, −1, 2<DOut[38]=-1.0 -0.5 0.5 1.0 1.5 2.0-11234The most useful expressions that can take values of "True" or "False" available to us are called relational operators. They allowus to test the relationship between two other terms. We've seen > (greater than), < (less than), and >= (greater than or equal to)already. Some other important ones:In[39]:=If@1 == 2, 2 + 2, 2 + 3DH∗Equal To HL∗LIf@1 ≠ 2, 2 + 2, 2 + 3DH∗Not Equal To H!=L∗LIf@1 ≤ 2, 2 + 2, 2 + 3DH∗Less Than Or Equal To


View Full Document

IIT MATH 152 - Lab 3 - TechniquesOfIntegration

Download Lab 3 - TechniquesOfIntegration
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lab 3 - TechniquesOfIntegration and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lab 3 - TechniquesOfIntegration 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?