<?xml version="1.0" encoding="UTF-8"?>
<Worksheet><Version major="6" minor="0"/><View-Properties><Zoom percentage="100"/></View-Properties><Styles><Layout alignment="left" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.0" name="Normal" rightmargin="0.0" spaceabove="0.0" spacebelow="0.0"/><Layout alignment="centred" firstindent="0.0" leftmargin="0.0" linebreak="space" linespacing="0.5" name="Maple Output" rightmargin="0.0" spaceabove="0.0" spacebelow="0.0"/><Font background="[0,0,0]" bold="true" executable="true" family="Monospaced" foreground="[255,0,0]" name="Maple Input"/><Font background="[0,0,0]" bold="true" family="Times New Roman" name="2D Math_249" size="18" underline="false"/><Font background="[0,0,0]" family="Times New Roman" name="Page Number" underline="false"/><Font background="[0,0,0]" family="Times New Roman" name="2D Math_248" size="18" underline="false"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="Maple Output" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" family="Times New Roman" foreground="[255,0,0]" name="2D Math_247" size="18" underline="false"/><Font background="[0,0,0]" family="Times New Roman" name="2D Math_246" size="18" underline="false"/><Font background="[0,0,0]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" name="Normal" readonly="false" size="12" underline="false"/><Font background="[0,0,0]" family="Times New Roman" name="2D Math_245" size="18" underline="false"/><Font background="[0,0,0]" family="Times New Roman" name="2D Math_244" size="18" underline="false"/><Font background="[0,0,0]" family="Times New Roman" name="2D Math_243" size="18" underline="false"/><Font background="[0,0,0]" family="Times New Roman" name="2D Math_242" size="18" underline="false"/><Font background="[0,0,0]" family="Times New Roman" name="2D Math_241" size="18" underline="false"/><Font background="[0,0,0]" family="Times New Roman" name="2D Math_240" size="18" underline="false"/><Font background="[0,0,0]" family="Times New Roman" name="2D Math_239" size="18" underline="false"/><Font background="[0,0,0]" family="Times New Roman" name="2D Math_238" size="18" underline="false"/><Font background="[0,0,0]" family="Times New Roman" foreground="[255,0,0]" name="2D Math_237" size="18" underline="false"/><Font background="[0,0,0]" family="Times New Roman" name="2D Math_236" size="18" underline="false"/><Font background="[0,0,0]" family="Times New Roman" name="2D Math_235" size="18" underline="false"/><Font background="[0,0,0]" family="Times New Roman" name="2D Math_234" size="18" underline="false"/><Font background="[0,0,0]" family="Times New Roman" name="2D Math_233" size="18" underline="false"/><Font background="[0,0,0]" family="Times New Roman" name="2D Math_232" size="18" underline="false"/><Font background="[0,0,0]" family="Times New Roman" name="2D Math_231" size="18" underline="false"/><Font background="[0,0,0]" family="Times New Roman" name="2D Math_230" size="18" underline="false"/><Font background="[0,0,0]" family="Times New Roman" foreground="[255,0,0]" name="2D Input" underline="false"/><Font background="[0,0,0]" bold="true" name="_cstyle269"/><Font background="[0,0,0]" bold="true" name="_cstyle268"/><Font background="[0,0,0]" bold="true" name="_cstyle266"/><Font background="[0,0,0]" bold="true" name="_cstyle265"/><Font background="[0,0,0]" bold="true" name="_cstyle264"/><Font background="[0,0,0]" italic="true" name="_cstyle263"/><Font background="[0,0,0]" bold="true" name="_cstyle262"/><Font background="[0,0,0]" family="Times New Roman" name="2D Math_229" size="18" underline="false"/><Font background="[0,0,0]" bold="true" name="_cstyle261"/><Font background="[0,0,0]" family="Times New Roman" foreground="[0,0,255]" name="2D Output" underline="false"/><Font background="[0,0,0]" family="Times New Roman" name="2D Math_228" size="18" underline="false"/><Font background="[0,0,0]" bold="true" name="_cstyle260"/><Font background="[0,0,0]" family="Times New Roman" name="2D Math_227" size="18" underline="false"/><Font background="[0,0,0]" family="Times New Roman" name="2D Math_226" size="18" underline="false"/><Font background="[0,0,0]" family="Times New Roman" name="2D Math_225" size="18" underline="false"/><Font background="[0,0,0]" bold="true" name="_cstyle259"/><Font background="[0,0,0]" bold="true" name="_cstyle258"/><Font background="[0,0,0]" italic="true" name="_cstyle257"/><Font background="[0,0,0]" bold="true" name="_cstyle256" size="18"/></Styles><Page-Numbers enabled="false" first-number="1" first-numbered-page="1" horizontal-location="right" style="Page Number" vertical-location="bottom"/><Group><Input><Text-field layout="Normal" style="_cstyle256"><Font family="Times New Roman" foreground="[0,0,0]" italic="false" size="24" underline="false">MATH 156 LAB 9</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" size="18" style="_cstyle257" underline="false">Topic 1: An interesting integral</Font><Font size="18">.</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font size="18">We will consider the integral </Font><Equation input-equation="int(sin*x*cos*x,x);" style="2D Math_225">NiMtJSRpbnRHNiQqKiUkc2luRyIiIiUieEdGKCUkY29zR0YoRilGKEYp</Equation><Font size="18">. We can substitute </Font><Equation input-equation="u = sin*x;" style="2D Math_226">NiMvJSJ1RyomJSRzaW5HIiIiJSJ4R0Yn</Equation><Font size="18">, which gives </Font><Equation input-equation="du = cos*x*dx;" style="2D Math_227">NiMvJSNkdUcqKCUkY29zRyIiIiUieEdGJyUjZHhHRic=</Equation><Font size="18">. Consequently the integral is </Font><Equation input-equation="int(u,u);" style="2D Math_228">NiMtJSRpbnRHNiQlInVHRiY=</Equation><Font size="18">. This gives </Font><Equation input-equation="u^2/2 = sin^2*x/2;" style="2D Math_229">NiMvKiYlInVHIiIjRiYhIiIqKCUkc2luR0YmJSJ4RyIiIkYmRic=</Equation><Font size="18">.</Font></Text-field><Text-field layout="Normal" style="_cstyle258"><Font family="Times New Roman" foreground="[0,0,0]" italic="false" size="18" underline="false">Introduce commands that ask Maple to compute this integral and verify the answer given.</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" size="18" style="_cstyle259" underline="false">Perform this substitution with Maple and show this result</Font><Font size="18">.</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font size="18">However, we could have used the substitution </Font><Equation input-equation="u = cos*x;" style="2D Math_230">NiMvJSJ1RyomJSRjb3NHIiIiJSJ4R0Yn</Equation><Font size="18">, which gives </Font><Equation input-equation="du = -sin*x*dx;" style="2D Math_231">NiMvJSNkdUcsJCooJSRzaW5HIiIiJSJ4R0YoJSNkeEdGKCEiIg==</Equation><Font size="18">. This gives </Font><Equation input-equation="int(-u,u);" style="2D Math_232">NiMtJSRpbnRHNiQsJCUidUchIiJGJw==</Equation><Font size="18">. This gives </Font><Equation input-equation="-u^2/2 = -cos^2*x/2;" style="2D Math_233">NiMvLCQqJiUidUciIiNGJyEiIkYoLCQqKCUkY29zR0YnJSJ4RyIiIkYnRihGKA==</Equation><Font size="18">. As you see this answer is not the same as above. <Font executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" style="_cstyle260" underline="false">Perform this substitution with Maple and get this result</Font>.</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font size="18">Somehow the answers should match. It is NOT TRUE that </Font><Equation input-equation="sin^2*x = -cos^2*x;" style="2D Math_234">NiMvKiYlJHNpbkciIiMlInhHIiIiLCQqJiUkY29zR0YmRidGKCEiIg==</Equation><Font size="18">. What makes the difference is that we forgot the constants of integration. So the two answers differ by a constant. To see this we ask Maple to compute the difference and simplify. <Font executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" style="_cstyle261" underline="false">Do this.</Font></Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font size="18">There is another way to perform the integration: We can use the trigonometric identity </Font><Equation input-equation="sin(2*x) = 2*sin*x*cos*x;" style="2D Math_235">NiMvLSUkc2luRzYjKiYiIiMiIiIlInhHRikqLEYoRilGJUYpRipGKSUkY29zR0YpRipGKQ==</Equation><Font size="18">. <Font executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" style="_cstyle262" underline="false">Compute the integral using this identity and show that your answer matches with the previous two.</Font></Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" size="18" style="_cstyle263" underline="false">Topic 2: The method of partial fractions and completing the square</Font><Font size="18">.</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font size="18">Quite often we have to integrate functions that are quotients of two polynomials </Font><Equation input-equation="P(x)/Q(x);" style="2D Math_236">NiMqJi0lIlBHNiMlInhHIiIiLSUiUUdGJiEiIg==</Equation><Font size="18">. These functions are called rational functions and we can use the method of partial fractions to integrate them. Example:</Font></Text-field><Text-field layout="Normal" prompt="&gt; " style="2D Input"><Equation executable="true" input-equation="int((x^3-2*x^2+7)/(x^4-3*x^3+3*x^2-3*x+2),x);" style="2D Math_237">NiMtJSRpbnRHNiQqJiwoKiQlInhHIiIkIiIiKiYiIiNGKyokRilGLUYrISIiIiIoRitGKywsKiRGKSIiJUYrKiZGKkYrRihGK0YvKiZGKkYrRi5GK0YrKiZGKkYrRilGK0YvRi1GK0YvRik=</Equation> .</Text-field></Input></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font size="18">We introduce the expression</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">f:=(x^3-2*x^2+7)/(x^4-3*x^3+3*x^2-3*x+2);</Font></Text-field></Input><Output><Text-field layout="Maple Output" style="2D Output"><Equation style="2D Output">NiM+JSJmRyomLCgqJCklInhHIiIkIiIiRisqJiIiI0YrKUYpRi1GKyEiIiIiKEYrRissLCokKUYpIiIlRitGKyomRipGK0YoRitGLyomRipGK0YuRitGKyomRipGK0YpRitGL0YtRitGLw==</Equation></Text-field></Output></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">fpar:=convert(f, parfrac,x);</Font></Text-field></Input><Output><Text-field layout="Maple Output" style="2D Output"><Equation style="2D Output">NiM+JSVmcGFyRywoKigiIiYhIiIsJiIiJyIiIiomIiM4RislInhHRitGK0YrLCYqJClGLiIiI0YrRitGK0YrRihGKyooIiIoRitGJ0YoLCZGLkYrRjJGKEYoRisqJiIiJEYrLCZGLkYrRitGKEYoRig=</Equation></Text-field></Output></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font size="18">fpar is equal to f, only it is written in a form that is easier to integrate. Now we can define the integral of fpar and ask Maple to compute it. We recognize ourselves that </Font><Equation input-equation="x-2;" style="2D Math_238">NiMsJiUieEciIiIiIiMhIiI=</Equation><Font size="18"> in the denominator will give </Font><Equation input-equation="ln(x-2);" style="2D Math_239">NiMtJSNsbkc2IywmJSJ4RyIiIiIiIyEiIg==</Equation><Font size="18">  and the </Font><Equation input-equation="x-1;" style="2D Math_240">NiMsJiUieEciIiJGJSEiIg==</Equation><Font size="18"> in the denominator will give </Font><Equation input-equation="ln(x-1);" style="2D Math_241">NiMtJSNsbkc2IywmJSJ4RyIiIkYoISIi</Equation><Font size="18">. Also we can split the expression with </Font><Equation input-equation="x^2+1;" style="2D Math_242">NiMsJiokJSJ4RyIiIyIiIkYnRic=</Equation><Font size="18"> in the denominator into </Font><Equation input-equation="6/5(x^2+1);" style="2D Math_243">NiMqJiIiJyIiIi0iIiY2IywmKiQlInhHIiIjRiVGJUYlISIi</Equation><Font size="18"> plus </Font><Equation input-equation="13*x/5(x^2+1);" style="2D Math_244">NiMqKCIjOCIiIiUieEdGJS0iIiY2IywmKiRGJiIiI0YlRiVGJSEiIg==</Equation><Font size="18">. The first term gives an arctan (</Font><Equation input-equation="x;" style="2D Math_245">NiMlInhH</Equation><Font size="18">), while the second gives </Font><Equation input-equation="ln(x^2+1);" style="2D Math_246">NiMtJSNsbkc2IywmKiQlInhHIiIjIiIiRipGKg==</Equation><Font size="18">  with appropriate constant in front.</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">fint:=Int(fpar, x);</Font></Text-field></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">fvalue:=value(fint);</Font></Text-field></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font size="18">Naturally Maple can do all these things by itself:</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">gint:=Int(f, x);</Font></Text-field></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" size="18" style="_cstyle269" underline="false">Find the partial fraction decomposition and integrate</Font><Font size="18">:</Font><Equation executable="true" input-equation="int((x^8+2*x-1)/((x-1)^3*(x^2+3)^2),x);" style="2D Math_247">NiMtJSRpbnRHNiQqJiwoKiQlInhHIiIpIiIiKiYiIiNGK0YpRitGK0YrISIiRisqJiwmRilGK0YrRi4iIiQsJiokRilGLUYrRjFGK0YtRi5GKQ==</Equation><Font size="18"> . </Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font size="18">Sometimes this is not working because the roots of the denominator are not real numbers, or involve radicals. If the denominator does not have real roots, we can complete the square. The command is completesquare(expression, x)  .</Font></Text-field></Input></Group><Group><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">f:=1/(x^2+6*x+14);</Font></Text-field></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">fpar:=convert(f, parfrac, x);</Font></Text-field></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"><Font italic="false" size="12" underline="false">newf:=completesquare(f, x);</Font></Text-field></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font size="18">This suggests the substitution </Font><Equation input-equation="u = x+3;" style="2D Math_248">NiMvJSJ1RywmJSJ4RyIiIiIiJEYn</Equation><Font size="18">. <Font executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" style="_cstyle264" underline="false">Perform this substitution and compute the integral</Font>.</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font size="18">Naturally Maple can do all these intermediate steps at once. <Font executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" style="_cstyle265" underline="false">Write the corresponding command.</Font></Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" size="18" style="_cstyle266" underline="false">Compute the integral </Font><Equation input-equation="int((x^3+5*x^2-7*x+1)/(x^2+x+1),x);" style="2D Math_249">NiMtJSRpbnRHNiQqJiwqKiQlInhHIiIkIiIiKiYiIiZGKyokRikiIiNGK0YrKiYiIihGK0YpRishIiJGK0YrRissKEYuRitGKUYrRitGK0YyRik=</Equation><Font size="18">.</Font></Text-field></Input></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" prompt="&gt; " style="Maple Input"/></Input><Output><Text-field layout="Maple Output" style="Maple Output"/></Output></Group><Group><Input><Text-field layout="Normal" style="Normal"><Font executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" size="18" style="_cstyle268" underline="false">Verify the answer by doing the integration by hand</Font><Font size="18">.</Font></Text-field></Input></Group><Text-field/><Text-field/></Worksheet>