15 lines
51 KiB
JSON
15 lines
51 KiB
JSON
{
|
||
"hash": "52799ff4663fcd423e565a03ebbe0a77",
|
||
"result": {
|
||
"markdown": "# Integration By Parts\n\n\n\nThis section uses these add-on packages:\n\n``` {.julia .cell-code}\nusing CalculusWithJulia\nusing Plots\nusing SymPy\n```\n\n\n\n\n---\n\n\nSo far we have seen that the *derivative* rules lead to *integration rules*. In particular:\n\n\n * The sum rule $[au(x) + bv(x)]' = au'(x) + bv'(x)$ gives rise to an integration rule: $\\int (au(x) + bv(x))dx = a\\int u(x)dx + b\\int v(x))dx$. (That is, the linearity of the derivative means the integral has linearity.)\n * The chain rule $[f(g(x))]' = f'(g(x)) g'(x)$ gives $\\int_a^b f(g(x))g'(x)dx=\\int_{g(a)}^{g(b)}f(x)dx$. That is, substitution reverses the chain rule.\n\n\nNow we turn our attention to the implications of the *product rule*: $[uv]' = u'v + uv'$. The resulting technique is called integration by parts.\n\n\nThe following illustrates integration by parts of the integral $(uv)'$ over $[a,b]$ [original](http://en.wikipedia.org/wiki/Integration_by_parts#Visualization).\n\n::: {.cell execution_count=4}\n\n::: {.cell-output .cell-output-display execution_count=5}\n{}\n:::\n:::\n\n\nThe figure is a parametric plot of $(u,v)$ with the points $(u(a), v(a))$ and $(u(b), v(b))$ marked. The difference $u(b)v(b) - u(a)v(a) = u(x)v(x) \\mid_a^b$ is shaded. This area breaks into two pieces, $A$ and $B$, partitioned by the curve. If $u$ is increasing and the curve is parameterized by $t \\rightarrow u^{-1}(t)$, then $A=\\int_{u^{-1}(a)}^{u^{-1}(b)} v(u^{-1}(t))dt$. A $u$-substitution with $t = u(x)$ changes this into the integral $\\int_a^b v(x) u'(x) dx$. Similarly, for increasing $v$, it can be seen that $B=\\int_a^b u(x) v'(x) dx$. This suggests a relationship between the integral of $u v'$, the integral of $u' v$ and the value $u(b)v(b) - u(a)v(a)$.\n\n\nIn terms of formulas, by the fundamental theorem of calculus:\n\n\n\n$$\nu(x)\\cdot v(x)\\big|_a^b = \\int_a^b [u(x) v(x)]' dx = \\int_a^b u'(x) \\cdot v(x) dx + \\int_a^b u(x) \\cdot v'(x) dx.\n$$\n\n\nThis is re-expressed as\n\n\n\n$$\n\\int_a^b u(x) \\cdot v'(x) dx = u(x) \\cdot v(x)\\big|_a^b - \\int_a^b v(x) \\cdot u'(x) dx,\n$$\n\n\nOr, more informally, as $\\int udv = uv - \\int v du$.\n\n\nThis can sometimes be confusingly written as:\n\n\n\n$$\n\\int f(x) g'(x) dx = f(x)g(x) - \\int f'(x) g(x) dx.\n$$\n\n\n(The confusion coming from the fact that the indefinite integrals are only defined up to a constant.)\n\n\nHow does this help? It allows us to differentiate parts of an integral in hopes it makes the result easier to integrate.\n\n\nAn illustration can clarify.\n\n\nConsider the integral $\\int_0^\\pi x\\sin(x) dx$. If we let $u=x$ and $dv=\\sin(x) dx$, then $du = 1dx$ and $v=-\\cos(x)$. The above then says:\n\n\n\n$$\n\\begin{align*}\n\\int_0^\\pi x\\sin(x) dx &= \\int_0^\\pi u dv\\\\\n&= uv\\big|_0^\\pi - \\int_0^\\pi v du\\\\\n&= x \\cdot (-\\cos(x)) \\big|_0^\\pi - \\int_0^\\pi (-\\cos(x)) dx\\\\\n&= \\pi (-\\cos(\\pi)) - 0(-\\cos(0)) + \\int_0^\\pi \\cos(x) dx\\\\\n&= \\pi + \\sin(x)\\big|_0^\\pi\\\\\n&= \\pi.\n\\end{align*}\n$$\n\n\nThe technique means one part is differentiated and one part integrated. The art is to break the integrand up into a piece that gets easier through differentiation and a piece that doesn't get much harder through integration.\n\n\n#### Examples\n\n\nConsider $\\int_1^2 x \\log(x) dx$. We might try differentiating the $\\log(x)$ term, so we set\n\n\n\n$$\nu=\\log(x) \\text{ and } dv=xdx\n$$\n\n\nThen we get\n\n\n\n$$\ndu = \\frac{1}{x} dx \\text{ and } v = \\frac{x^2}{2}.\n$$\n\n\nPutting together gives:\n\n\n\n$$\n\\begin{align*}\n\\int_1^2 x \\log(x) dx\n&= (\\log(x) \\cdot \\frac{x^2}{2}) \\big|_1^2 - \\int_1^2 \\frac{x^2}{2} \\frac{1}{x} dx\\\\\n&= (2\\log(2) - 0) - (\\frac{x^2}{4})\\big|_1^2\\\\\n&= 2\\log(2) - (1 - \\frac{1}{4}) \\\\\n&= 2\\log(2) - \\frac{3}{4}.\n\\end{align*}\n$$\n\n\n##### Example\n\n\nThis related problem, $\\int \\log(x) dx$, uses the same idea, though perhaps harder to see at first glance, as setting `dv=dx` is almost too simple to try:\n\n\n\n$$\n\\begin{align*}\nu &= \\log(x) & dv &= dx\\\\\ndu &= \\frac{1}{x}dx & v &= x\n\\end{align*}\n$$\n\n$$\n\\begin{align*}\n\\int \\log(x) dx\n&= \\int u dv\\\\\n&= uv - \\int v du\\\\\n&= (\\log(x) \\cdot x) - \\int x \\cdot \\frac{1}{x} dx\\\\\n&= x \\log(x) - \\int dx\\\\\n&= x \\log(x) - x\n\\end{align*}\n$$\n\n\nWere this a definite integral problem, we would have written:\n\n\n\n$$\n\\int_a^b \\log(x) dx = (x\\log(x))\\big|_a^b - \\int_a^b dx = (x\\log(x) - x)\\big|_a^b.\n$$\n\n\n##### Example\n\n\nSometimes integration by parts is used two or more times. Here we let $u=x^2$ and $dv = e^x dx$:\n\n\n\n$$\n\\int_a^b x^2 e^x dx = (x^2 \\cdot e^x)\\big|_a^b - \\int_a^b 2x e^x dx.\n$$\n\n\nBut we can do $\\int_a^b x e^xdx$ the same way:\n\n\n\n$$\n\\int_a^b x e^x = (x\\cdot e^x)\\big|_a^b - \\int_a^b 1 \\cdot e^xdx = (xe^x - e^x)\\big|_a^b.\n$$\n\n\nCombining gives the answer:\n\n\n\n$$\n\\int_a^b x^2 e^x dx\n= (x^2 \\cdot e^x)\\big|_a^b - 2( (xe^x - e^x)\\big|_a^b ) =\ne^x(x^2 - 2x - 1) \\big|_a^b.\n$$\n\n\nIn fact, it isn't hard to see that an integral of $x^m e^x$, $m$ a positive integer, can be handled in this manner. For example, when $m=10$, `SymPy` gives:\n\n::: {.cell execution_count=5}\n``` {.julia .cell-code}\n@syms 𝒙\nintegrate(𝒙^10 * exp(𝒙), 𝒙)\n```\n\n::: {.cell-output .cell-output-display execution_count=6}\n```{=html}\n<span class=\"math-left-align\" style=\"padding-left: 4px; width:0; float:left;\"> \n\\[\n\\left(𝒙^{10} - 10 𝒙^{9} + 90 𝒙^{8} - 720 𝒙^{7} + 5040 𝒙^{6} - 30240 𝒙^{5} + 151200 𝒙^{4} - 604800 𝒙^{3} + 1814400 𝒙^{2} - 3628800 𝒙 + 3628800\\right) e^{𝒙}\n\\]\n</span>\n```\n:::\n:::\n\n\nThe general answer is $\\int x^n e^xdx = p(x) e^x$, where $p(x)$ is a polynomial of degree $n$.\n\n\n##### Example\n\n\nThe same technique is attempted for this integral, but ends differently. First in the following we let $u=\\sin(x)$ and $dv=e^x dx$:\n\n\n\n$$\n\\int e^x \\sin(x)dx = \\sin(x) e^x - \\int \\cos(x) e^x dx.\n$$\n\n\nNow we let $u = \\cos(x)$ and again $dv=e^x dx$:\n\n\n\n$$\n\\int e^x \\sin(x)dx = \\sin(x) e^x - \\int \\cos(x) e^x dx = \\sin(x)e^x - \\cos(x)e^x - \\int (-\\sin(x))e^x dx.\n$$\n\n\nBut simplifying this gives:\n\n\n\n$$\n\\int e^x \\sin(x)dx = - \\int e^x \\sin(x)dx + e^x(\\sin(x) - \\cos(x)).\n$$\n\n\nSolving for the \"unknown\" $\\int e^x \\sin(x) dx$ gives:\n\n\n\n$$\n\\int e^x \\sin(x) dx = \\frac{1}{2} e^x (\\sin(x) - \\cos(x)).\n$$\n\n\n##### Example\n\n\nPositive integer powers of trigonometric functions can be addressed by this technique. Consider $\\int \\cos(x)^n dx$. We let $u=\\cos(x)^{n-1}$ and $dv=\\cos(x) dx$. Then $du = (n-1)\\cos(x)^{n-2}(-\\sin(x))dx$ and $v=\\sin(x)$. So,\n\n\n\n$$\n\\begin{align*}\n\\int \\cos(x)^n dx &= \\cos(x)^{n-1} \\cdot (\\sin(x)) - \\int (\\sin(x)) ((n-1)\\sin(x) \\cos(x)^{n-2}) dx \\\\\n&= \\sin(x) \\cos(x)^{n-1} + (n-1)\\int \\sin^2(x) \\cos(x)^{n-1} dx\\\\\n&= \\sin(x) \\cos(x)^{n-1} + (n-1)\\int (1 - \\cos(x)^2) \\cos(x)^{n-2} dx\\\\\n&= \\sin(x) \\cos(x)^{n-1} + (n-1)\\int \\cos(x)^{n-2}dx - (n-1)\\int \\cos(x)^n dx.\n\\end{align*}\n$$\n\n\nWe can then solve for the unknown ($\\int \\cos(x)^{n}dx$) to get this *reduction formula*:\n\n\n\n$$\n\\int \\cos(x)^n dx = \\frac{1}{n}\\sin(x) \\cos(x)^{n-1} + \\frac{n-1}{n}\\int \\cos(x)^{n-2}dx.\n$$\n\n\nThis is called a reduction formula as it reduces the problem from an integral with a power of $n$ to one with a power of $n - 2$, so could be repeated until the remaining indefinite integral required knowing either $\\int \\cos(x) dx$ (which is $-\\sin(x)$) or $\\int \\cos(x)^2 dx$, which by a double angle formula application, is $x/2 - \\sin(2x)/4$.\n\n\n`SymPy` is quite able to do this repeated bookkeeping. For example with $n=10$:\n\n::: {.cell execution_count=6}\n``` {.julia .cell-code}\nintegrate(cos(𝒙)^10, 𝒙)\n```\n\n::: {.cell-output .cell-output-display execution_count=7}\n```{=html}\n<span class=\"math-left-align\" style=\"padding-left: 4px; width:0; float:left;\"> \n\\[\n\\frac{63 𝒙}{256} + \\frac{\\sin{\\left(𝒙 \\right)} \\cos^{9}{\\left(𝒙 \\right)}}{10} + \\frac{9 \\sin{\\left(𝒙 \\right)} \\cos^{7}{\\left(𝒙 \\right)}}{80} + \\frac{21 \\sin{\\left(𝒙 \\right)} \\cos^{5}{\\left(𝒙 \\right)}}{160} + \\frac{21 \\sin{\\left(𝒙 \\right)} \\cos^{3}{\\left(𝒙 \\right)}}{128} + \\frac{63 \\sin{\\left(𝒙 \\right)} \\cos{\\left(𝒙 \\right)}}{256}\n\\]\n</span>\n```\n:::\n:::\n\n\n##### Example\n\n\nThe visual interpretation of integration by parts breaks area into two pieces, the one labeled \"B\" looks like it would be labeled \"A\" for an inverse function for $f$. Indeed, integration by parts gives a means to possibly find antiderivatives for inverse functions.\n\n\nLet $uv = x f^{-1}(x)$. Then we have $[uv]' = u'v + uv' = f^{-1}(x) + x [f^{-1}(x)]'$. So, up to a constant $uv = \\int [uv]'dx = \\int f^{-1}(x) + \\int x [f^{-1}(x)]'$. Re-expressing gives:\n\n\n\n$$\n\\begin{align*}\n\\int f^{-1}(x) dx\n&= xf^{-1}(x) - \\int x [f^{-1}(x)]' dx\\\\\n&= xf^{-1}(x) - \\int f(u) du.\\\\\n\\end{align*}\n$$\n\n\nThe last line follows from the $u$-substitution: $u=f^{-1}(x)$ for then $du = [f^{-1}(x)]' dx$ and $x=f(u)$.\n\n\nWe use this to find an antiderivative for $\\sin^{-1}(x)$:\n\n\n\n$$\n\\begin{align*}\n\\int \\sin^{-1}(x) dx &= x \\sin^{-1}(x) - \\int \\sin(u) du \\\\\n&= x \\sin^{-1}(x) + \\cos(u) \\\\\n&= x \\sin^{-1}(x) + \\cos(\\sin^{-1}(x)).\n\\end{align*}\n$$\n\n\nUsing right triangles to simplify, the last value $\\cos(\\sin^{-1}(x))$ can otherwise be written as $\\sqrt{1 - x^2}$.\n\n\n##### Example\n\n\nThe [trapezoid](http://en.wikipedia.org/wiki/Trapezoidal_rule) rule is an approximation to the definite integral like a Riemann sum, only instead of approximating the area above $[x_i, x_i + h]$ by a rectangle with height $f(c_i)$ (for some $c_i$), it uses a trapezoid formed by the left and right endpoints. That is, this area is used in the estimation: $(1/2)\\cdot (f(x_i) + f(x_i+h)) \\cdot h$.\n\n\nEven though we suggest just using `quadgk` for numeric integration, estimating the error in this approximation is still of some theoretical interest.\n\n\nRecall, just using *either* $x_i$ or $x_{i-1}$ for $c_i$ gives an error that is \"like\" $1/n$, as $n$ gets large, though the exact rate depends on the function and the length of the interval.\n\n\nThis [proof](http://www.math.ucsd.edu/~ebender/20B/77_Trap.pdf) for the error estimate is involved, but is reproduced here, as it nicely integrates many of the theoretical concepts of integration discussed so far.\n\n\nFirst, for convenience, we consider the interval $x_i$ to $x_i+h$. The actual answer over this is just $\\int_{x_i}^{x_i+h}f(x) dx$. By a $u$-substitution with $u=x-x_i$ this becomes $\\int_0^h f(t + x_i) dt$. For analyzing this we integrate once by parts using $u=f(t+x_i)$ and $dv=dt$. But instead of letting $v=t$, we choose to add - as is our prerogative - a constant of integration $A$, so $v=t+A$:\n\n\n\n$$\n\\begin{align*}\n\\int_0^h f(t + x_i) dt &= uv \\big|_0^h - \\int_0^h v du\\\\\n&= f(t+x_i)(t+A)\\big|_0^h - \\int_0^h (t + A) f'(t + x_i) dt.\n\\end{align*}\n$$\n\n\nWe choose $A$ to be $-h/2$, any constant is possible, for then the term $f(t+x_i)(t+A)\\big|_0^h$ becomes $(1/2)(f(x_i+h) + f(x_i)) \\cdot h$, or the trapezoid approximation. This means, the error over this interval - actual minus estimate - satisfies:\n\n\n\n$$\n\\text{error}_i = \\int_{x_i}^{x_i+h}f(x) dx - \\frac{f(x_i+h) -f(x_i)}{2} \\cdot h = - \\int_0^h (t + A) f'(t + x_i) dt.\n$$\n\n\nFor this, we *again* integrate by parts with\n\n\n\n$$\n\\begin{align*}\nu &= f'(t + x_i) & dv &= (t + A)dt\\\\\ndu &= f''(t + x_i) & v &= \\frac{(t + A)^2}{2} + B\n\\end{align*}\n$$\n\n\nAgain we added a constant of integration, $B$, to $v$. The error becomes:\n\n\n\n$$\n\\text{error}_i = -(\\frac{(t+A)^2}{2} + B)f'(t+x_i)\\big|_0^h + \\int_0^h (\\frac{(t+A)^2}{2} + B) \\cdot f''(t+x_i) dt.\n$$\n\n\nWith $A=-h/2$, $B$ is chosen so $(t+A)^2/2 + B = 0$, or $B=-h^2/8$. The error becomes\n\n\n\n$$\n\\text{error}_i = \\int_0^h \\left(\\frac{(t-h/2)^2}{2} - \\frac{h^2}{8}\\right) \\cdot f''(t + x_i) dt.\n$$\n\n\nNow, we assume the $\\lvert f''(t)\\rvert$ is bounded by $K$ for any $a \\leq t \\leq b$. This will be true, for example, if the second derivative is assumed to exist and be continuous. Using this fact about definite integrals $\\lvert \\int_a^b g dx\\rvert \\leq \\int_a^b \\lvert g \\rvert dx$ we have:\n\n\n\n$$\n\\lvert \\text{error}_i \\rvert \\leq K \\int_0^h \\lvert (\\frac{(t-h/2)^2}{2} - \\frac{h^2}{8}) \\rvert dt.\n$$\n\n\nBut what is the function in the integrand? Clearly it is a quadratic in $t$. Expanding gives $1/2 \\cdot (t^2 - ht)$. This is negative over $[0,h]$ (and $0$ at these endpoints, so the integral above is just:\n\n\n\n$$\n\\frac{1}{2}\\int_0^h (ht - t^2)dt = \\frac{1}{2} (\\frac{ht^2}{2} - \\frac{t^3}{3})\\big|_0^h = \\frac{h^3}{12}\n$$\n\n\nThis gives the bound: $\\vert \\text{error}_i \\rvert \\leq K h^3/12$. The *total* error may be less, but is not more than the value found by adding up the error over each of the $n$ intervals. As our bound does not depend on the $i$, we have this sum satisfies:\n\n\n\n$$\n\\lvert \\text{error}\\rvert \\leq n \\cdot \\frac{Kh^3}{12} = \\frac{K(b-a)^3}{12}\\frac{1}{n^2}.\n$$\n\n\nSo the error is like $1/n^2$, in contrast to the $1/n$ error of the Riemann sums. One way to see this, for the Riemann sum it takes twice as many terms to half an error estimate, but for the trapezoid rule only $\\sqrt{2}$ as many, and for Simpson's rule, only $2^{1/4}$ as many.\n\n\n## Area related to parameterized curves\n\n\nThe figure introduced to motivate the integration by parts formula also suggests that areas described parametrically (by a pair of functions $x=u(t), y=v(t)$ for $a \\le t \\le b$) can have their area computed.\n\n\nWhen $u(t)$ is strictly *increasing*, and hence having an inverse function, then re-parameterizing by $\\phi(t) = u^{-1}(t)$ gives a $x=u(u^{-1}(t))=t, y=v(u^{-1}(t))$ and integrating this gives the area by $A=\\int_a^b v(t) u'(t) dt$\n\n\nHowever, the correct answer requires understanding a minus sign. Consider the area enclosed by $x(t) = \\cos(t), y(t) = \\sin(t)$:\n\n::: {.cell execution_count=7}\n\n::: {.cell-output .cell-output-display execution_count=8}\n{}\n:::\n:::\n\n\nWe added a rectangle for a Riemann sum for $t_i = \\pi/3$ and $t_{i+1} = \\pi/3 + \\pi/8$. The height of this rectangle if $y(t_i)$, the base is of length $x(t_i) - x(t_{i+1})$ *given* the orientation of how the circular curve is parameterized (counter clockwise here).\n\n\nTaking this Riemann sum approach, we can approximate the area under the curve parameterized by $(u(t), v(t))$ over the time range $[t_i, t_{i+1}]$ as a rectangle with height $y(t_i)$ and base $x(t_{i}) - x(t_{i+1})$. Then we get, as expected:\n\n\n\n$$\n\\begin{align*}\nA &\\approx \\sum_i y(t_i) \\cdot (x(t_{i}) - x(t_{i+1}))\\\\\n &= - \\sum_i y(t_i) \\cdot (x(t_{i+1}) - x(t_{i}))\\\\\n &= - \\sum_i y(t_i) \\cdot \\frac{x(t_{i+1}) - x(t_i)}{t_{i+1}-t_i} \\cdot (t_{i+1}-t_i)\\\\\n &\\approx -\\int_a^b y(t) x'(t) dt.\n\\end{align*}\n$$\n\n\nSo with a counterclockwise rotation, the actual answer for the area includes a minus sign. If the area is traced out in a *clockwise* manner, there is no minus sign.\n\n\nThis is a case of [Green's Theorem](https://en.wikipedia.org/wiki/Green%27s_theorem#Area_calculation) to be taken up in [Green's Theorem, Stokes' Theorem, and the Divergence Theorem](file:///Users/verzani/julia/CalculusWithJulia/html/integral_vector_calculus/stokes_theorem.html).\n\n\n##### Example\n\n\nApply the formula to a parameterized circle to ensure, the signed area is properly computed. If we use $x(t) = r\\cos(t)$ and $y(t) = r\\sin(t)$ then we have the motion is counterclockwise:\n\n::: {.cell hold='true' execution_count=8}\n``` {.julia .cell-code}\n@syms 𝒓 t\n𝒙 = 𝒓 * cos(t)\n𝒚 = 𝒓 * sin(t)\n-integrate(𝒚 * diff(𝒙, t), (t, 0, 2PI))\n```\n\n::: {.cell-output .cell-output-display execution_count=9}\n```{=html}\n<span class=\"math-left-align\" style=\"padding-left: 4px; width:0; float:left;\"> \n\\[\n\\pi 𝒓^{2}\n\\]\n</span>\n```\n:::\n:::\n\n\nWe see the expected answer for the area of a circle.\n\n\n##### Example\n\n\nApply the formula to find the area under one arch of a cycloid, parameterized by $x(t) = t - \\sin(t), y(t) = 1 - \\cos(t)$.\n\n\nWorking symbolically, we have one arch given by the following described in a *clockwise* manner, so we use $\\int y(t) x'(t) dt$:\n\n::: {.cell hold='true' execution_count=9}\n``` {.julia .cell-code}\n@syms t\n𝒙 = t - sin(t)\n𝒚 = 1 - cos(t)\nintegrate(𝒚 * diff(𝒙, t), (t, 0, 2PI))\n```\n\n::: {.cell-output .cell-output-display execution_count=10}\n```{=html}\n<span class=\"math-left-align\" style=\"padding-left: 4px; width:0; float:left;\"> \n\\[\n3 \\pi\n\\]\n</span>\n```\n:::\n:::\n\n\n([Galileo](https://mathshistory.st-andrews.ac.uk/Curves/Cycloid/) was thwarted in finding this answer exactly and resorted to constructing one from metal to *estimate* the value.)\n\n\n##### Example\n\n\nConsider the example $x(t) = \\cos(t) + t\\sin(t), y(t) = \\sin(t) - t\\cos(t)$ for $0 \\leq t \\leq 2\\pi$.\n\n::: {.cell execution_count=10}\n\n::: {.cell-output .cell-output-display execution_count=11}\n{}\n:::\n:::\n\n\nHow much area is enclosed by this curve and the $x$ axis? The area is described in a counterclockwise manner, so we have:\n\n::: {.cell hold='true' execution_count=11}\n``` {.julia .cell-code}\nlet\n x(t) = cos(t) + t*sin(t)\n y(t) = sin(t) - t*cos(t)\n yx′(t) = -y(t) * x'(t) # yx\\prime[tab]\n quadgk(yx′, 0, 2pi)\nend\n```\n\n::: {.cell-output .cell-output-display execution_count=12}\n```\n(44.483294893989545, 6.295185999150021e-7)\n```\n:::\n:::\n\n\nThis particular problem could also have been done symbolically, but many curves will need to have a numeric approximation used.\n\n\n## Questions\n\n\n###### Question\n\n\nIn the integral of $\\int \\log(x) dx$ we let $u=\\log(x)$ and $dv=dx$. What are $du$ and $v$?\n\n::: {.cell hold='true' execution_count=12}\n\n::: {.cell-output .cell-output-display execution_count=13}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='12488691866768770163' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_12488691866768770163\">\n <div style=\"padding-top: 5px\">\n <div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_12488691866768770163_1\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_12488691866768770163\"\n id=\"radio_12488691866768770163_1\" value=\"1\">\n </input>\n <span class=\"label-body px-1\">\n \\(du=x\\log(x) dx\\quad v = 1\\)\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_12488691866768770163_2\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_12488691866768770163\"\n id=\"radio_12488691866768770163_2\" value=\"2\">\n </input>\n <span class=\"label-body px-1\">\n \\(du=1/x dx \\quad v = x\\)\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_12488691866768770163_3\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_12488691866768770163\"\n id=\"radio_12488691866768770163_3\" value=\"3\">\n </input>\n <span class=\"label-body px-1\">\n \\(du=1/x dx\\quad v = x^2/2\\)\n </span>\n </label>\n</div>\n\n \n </div>\n </div>\n <div id='12488691866768770163_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.querySelectorAll('input[name=\"radio_12488691866768770163\"]').forEach(function(rb) {\nrb.addEventListener(\"change\", function() {\n var correct = rb.value == 2;\n var msgBox = document.getElementById('12488691866768770163_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_12488691866768770163\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_12488691866768770163\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n})});\n\n</script>\n```\n:::\n:::\n\n\n###### Question\n\n\nIn the integral $\\int \\sec(x)^3 dx$ we let $u=\\sec(x)$ and $dv = \\sec(x)^2 dx$. What are $du$ and $v$?\n\n::: {.cell hold='true' execution_count=13}\n\n::: {.cell-output .cell-output-display execution_count=14}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='13777681461185582822' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_13777681461185582822\">\n <div style=\"padding-top: 5px\">\n <div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_13777681461185582822_1\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_13777681461185582822\"\n id=\"radio_13777681461185582822_1\" value=\"1\">\n </input>\n <span class=\"label-body px-1\">\n \\(du=\\csc(x) dx \\quad v=\\sec(x)^3 / 3\\)\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_13777681461185582822_2\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_13777681461185582822\"\n id=\"radio_13777681461185582822_2\" value=\"2\">\n </input>\n <span class=\"label-body px-1\">\n \\(du=\\tan(x) dx \\quad v=\\sec(x)\\tan(x)\\)\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_13777681461185582822_3\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_13777681461185582822\"\n id=\"radio_13777681461185582822_3\" value=\"3\">\n </input>\n <span class=\"label-body px-1\">\n \\(du=\\sec(x)\\tan(x)dx \\quad v=\\tan(x)\\)\n </span>\n </label>\n</div>\n\n \n </div>\n </div>\n <div id='13777681461185582822_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.querySelectorAll('input[name=\"radio_13777681461185582822\"]').forEach(function(rb) {\nrb.addEventListener(\"change\", function() {\n var correct = rb.value == 3;\n var msgBox = document.getElementById('13777681461185582822_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_13777681461185582822\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_13777681461185582822\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n})});\n\n</script>\n```\n:::\n:::\n\n\n###### Question\n\n\nIn the integral $\\int e^{-x} \\cos(x)dx$ we let $u=e^{-x}$ and $dv=\\cos(x) dx$. What are $du$ and $v$?\n\n::: {.cell hold='true' execution_count=14}\n\n::: {.cell-output .cell-output-display execution_count=15}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='8273614187717696730' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_8273614187717696730\">\n <div style=\"padding-top: 5px\">\n <div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_8273614187717696730_1\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_8273614187717696730\"\n id=\"radio_8273614187717696730_1\" value=\"1\">\n </input>\n <span class=\"label-body px-1\">\n \\(du=-e^{-x} dx \\quad v=\\sin(x)\\)\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_8273614187717696730_2\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_8273614187717696730\"\n id=\"radio_8273614187717696730_2\" value=\"2\">\n </input>\n <span class=\"label-body px-1\">\n \\(du=-e^{-x} dx \\quad v=-\\sin(x)\\)\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_8273614187717696730_3\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_8273614187717696730\"\n id=\"radio_8273614187717696730_3\" value=\"3\">\n </input>\n <span class=\"label-body px-1\">\n \\(du=\\sin(x)dx \\quad v=-e^{-x}\\)\n </span>\n </label>\n</div>\n\n \n </div>\n </div>\n <div id='8273614187717696730_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.querySelectorAll('input[name=\"radio_8273614187717696730\"]').forEach(function(rb) {\nrb.addEventListener(\"change\", function() {\n var correct = rb.value == 1;\n var msgBox = document.getElementById('8273614187717696730_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_8273614187717696730\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_8273614187717696730\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n})});\n\n</script>\n```\n:::\n:::\n\n\n###### Question\n\n\nFind the value of $\\int_1^4 x \\log(x) dx$. You can integrate by parts.\n\n::: {.cell hold='true' execution_count=15}\n\n::: {.cell-output .cell-output-display execution_count=16}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='3809059964379459478' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_3809059964379459478\">\n <div style=\"padding-top: 5px\">\n </br>\n<div class=\"input-group\">\n <input id=\"3809059964379459478\" type=\"number\" class=\"form-control\" placeholder=\"Numeric answer\">\n</div>\n\n \n </div>\n </div>\n <div id='3809059964379459478_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.getElementById(\"3809059964379459478\").addEventListener(\"change\", function() {\n var correct = (Math.abs(this.value - 7.340354888959126) <= 0.001);\n var msgBox = document.getElementById('3809059964379459478_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_3809059964379459478\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_3809059964379459478\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n});\n\n</script>\n```\n:::\n:::\n\n\n###### Question\n\n\nFind the value of $\\int_0^{\\pi/2} x\\cos(2x) dx$. You can integrate by parts.\n\n::: {.cell hold='true' execution_count=16}\n\n::: {.cell-output .cell-output-display execution_count=17}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='6864915166706009573' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_6864915166706009573\">\n <div style=\"padding-top: 5px\">\n </br>\n<div class=\"input-group\">\n <input id=\"6864915166706009573\" type=\"number\" class=\"form-control\" placeholder=\"Numeric answer\">\n</div>\n\n \n </div>\n </div>\n <div id='6864915166706009573_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.getElementById(\"6864915166706009573\").addEventListener(\"change\", function() {\n var correct = (Math.abs(this.value - -0.49999999999999983) <= 0.001);\n var msgBox = document.getElementById('6864915166706009573_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_6864915166706009573\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_6864915166706009573\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n});\n\n</script>\n```\n:::\n:::\n\n\n###### Question\n\n\nFind the value of $\\int_1^e (\\log(x))^2 dx$. You can integrate by parts.\n\n::: {.cell hold='true' execution_count=17}\n\n::: {.cell-output .cell-output-display execution_count=18}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='17489947935099236' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_17489947935099236\">\n <div style=\"padding-top: 5px\">\n </br>\n<div class=\"input-group\">\n <input id=\"17489947935099236\" type=\"number\" class=\"form-control\" placeholder=\"Numeric answer\">\n</div>\n\n \n </div>\n </div>\n <div id='17489947935099236_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.getElementById(\"17489947935099236\").addEventListener(\"change\", function() {\n var correct = (Math.abs(this.value - 0.7182818284590451) <= 0.001);\n var msgBox = document.getElementById('17489947935099236_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_17489947935099236\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_17489947935099236\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n});\n\n</script>\n```\n:::\n:::\n\n\n###### Question\n\n\nIntegration by parts can be used to provide \"reduction\" formulas, where an antiderivative is written in terms of another antiderivative with a lower power. Which is the proper reduction formula for $\\int (\\log(x))^n dx$?\n\n::: {.cell hold='true' execution_count=18}\n\n::: {.cell-output .cell-output-display execution_count=19}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='12755710984255893598' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_12755710984255893598\">\n <div style=\"padding-top: 5px\">\n <div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_12755710984255893598_1\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_12755710984255893598\"\n id=\"radio_12755710984255893598_1\" value=\"1\">\n </input>\n <span class=\"label-body px-1\">\n \\(x(\\log(x))^n - n \\int (\\log(x))^{n-1} dx\\)\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_12755710984255893598_2\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_12755710984255893598\"\n id=\"radio_12755710984255893598_2\" value=\"2\">\n </input>\n <span class=\"label-body px-1\">\n \\(x(\\log(x))^n - \\int (\\log(x))^{n-1} dx\\)\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_12755710984255893598_3\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_12755710984255893598\"\n id=\"radio_12755710984255893598_3\" value=\"3\">\n </input>\n <span class=\"label-body px-1\">\n \\(\\int (\\log(x))^{n+1}/(n+1) dx\\)\n </span>\n </label>\n</div>\n\n \n </div>\n </div>\n <div id='12755710984255893598_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.querySelectorAll('input[name=\"radio_12755710984255893598\"]').forEach(function(rb) {\nrb.addEventListener(\"change\", function() {\n var correct = rb.value == 1;\n var msgBox = document.getElementById('12755710984255893598_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_12755710984255893598\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_12755710984255893598\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n})});\n\n</script>\n```\n:::\n:::\n\n\n###### Question\n\n\nThe [Wikipedia](http://en.wikipedia.org/wiki/Integration_by_parts) page has a rule of thumb with an acronym LIATE to indicate what is a good candidate to be \"$u$\": **L**og function, **I**nverse functions, **A**lgebraic functions ($x^n$), **T**rigonmetric functions, and **E**xponential functions.\n\n\nConsider the integral $\\int x \\cos(x) dx$. Which letter should be tried first?\n\n::: {.cell hold='true' execution_count=19}\n\n::: {.cell-output .cell-output-display execution_count=20}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='12869603942671396372' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_12869603942671396372\">\n <div style=\"padding-top: 5px\">\n <div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_12869603942671396372_1\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_12869603942671396372\"\n id=\"radio_12869603942671396372_1\" value=\"1\">\n </input>\n <span class=\"label-body px-1\">\n L\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_12869603942671396372_2\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_12869603942671396372\"\n id=\"radio_12869603942671396372_2\" value=\"2\">\n </input>\n <span class=\"label-body px-1\">\n I\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_12869603942671396372_3\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_12869603942671396372\"\n id=\"radio_12869603942671396372_3\" value=\"3\">\n </input>\n <span class=\"label-body px-1\">\n A\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_12869603942671396372_4\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_12869603942671396372\"\n id=\"radio_12869603942671396372_4\" value=\"4\">\n </input>\n <span class=\"label-body px-1\">\n T\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_12869603942671396372_5\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_12869603942671396372\"\n id=\"radio_12869603942671396372_5\" value=\"5\">\n </input>\n <span class=\"label-body px-1\">\n E\n </span>\n </label>\n</div>\n\n \n </div>\n </div>\n <div id='12869603942671396372_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.querySelectorAll('input[name=\"radio_12869603942671396372\"]').forEach(function(rb) {\nrb.addEventListener(\"change\", function() {\n var correct = rb.value == 3;\n var msgBox = document.getElementById('12869603942671396372_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_12869603942671396372\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_12869603942671396372\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n})});\n\n</script>\n```\n:::\n:::\n\n\n---\n\nConsider the integral $\\int x^2\\log(x) dx$. Which letter should be tried first?\n\n::: {.cell hold='true' execution_count=20}\n\n::: {.cell-output .cell-output-display execution_count=21}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='1757134732697709979' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_1757134732697709979\">\n <div style=\"padding-top: 5px\">\n <div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_1757134732697709979_1\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_1757134732697709979\"\n id=\"radio_1757134732697709979_1\" value=\"1\">\n </input>\n <span class=\"label-body px-1\">\n L\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_1757134732697709979_2\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_1757134732697709979\"\n id=\"radio_1757134732697709979_2\" value=\"2\">\n </input>\n <span class=\"label-body px-1\">\n I\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_1757134732697709979_3\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_1757134732697709979\"\n id=\"radio_1757134732697709979_3\" value=\"3\">\n </input>\n <span class=\"label-body px-1\">\n A\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_1757134732697709979_4\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_1757134732697709979\"\n id=\"radio_1757134732697709979_4\" value=\"4\">\n </input>\n <span class=\"label-body px-1\">\n T\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_1757134732697709979_5\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_1757134732697709979\"\n id=\"radio_1757134732697709979_5\" value=\"5\">\n </input>\n <span class=\"label-body px-1\">\n E\n </span>\n </label>\n</div>\n\n \n </div>\n </div>\n <div id='1757134732697709979_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.querySelectorAll('input[name=\"radio_1757134732697709979\"]').forEach(function(rb) {\nrb.addEventListener(\"change\", function() {\n var correct = rb.value == 1;\n var msgBox = document.getElementById('1757134732697709979_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_1757134732697709979\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_1757134732697709979\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n})});\n\n</script>\n```\n:::\n:::\n\n\n---\n\n\nConsider the integral $\\int x^2 \\sin^{-1}(x) dx$. Which letter should be tried first?\n\n::: {.cell hold='true' execution_count=21}\n\n::: {.cell-output .cell-output-display execution_count=22}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='5437609310435932955' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_5437609310435932955\">\n <div style=\"padding-top: 5px\">\n <div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_5437609310435932955_1\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_5437609310435932955\"\n id=\"radio_5437609310435932955_1\" value=\"1\">\n </input>\n <span class=\"label-body px-1\">\n L\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_5437609310435932955_2\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_5437609310435932955\"\n id=\"radio_5437609310435932955_2\" value=\"2\">\n </input>\n <span class=\"label-body px-1\">\n I\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_5437609310435932955_3\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_5437609310435932955\"\n id=\"radio_5437609310435932955_3\" value=\"3\">\n </input>\n <span class=\"label-body px-1\">\n A\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_5437609310435932955_4\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_5437609310435932955\"\n id=\"radio_5437609310435932955_4\" value=\"4\">\n </input>\n <span class=\"label-body px-1\">\n T\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_5437609310435932955_5\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_5437609310435932955\"\n id=\"radio_5437609310435932955_5\" value=\"5\">\n </input>\n <span class=\"label-body px-1\">\n E\n </span>\n </label>\n</div>\n\n \n </div>\n </div>\n <div id='5437609310435932955_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.querySelectorAll('input[name=\"radio_5437609310435932955\"]').forEach(function(rb) {\nrb.addEventListener(\"change\", function() {\n var correct = rb.value == 2;\n var msgBox = document.getElementById('5437609310435932955_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_5437609310435932955\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_5437609310435932955\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n})});\n\n</script>\n```\n:::\n:::\n\n\n---\n\nConsider the integral $\\int e^x \\sin(x) dx$. Which letter should be tried first?\n\n::: {.cell hold='true' execution_count=22}\n\n::: {.cell-output .cell-output-display execution_count=23}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='16262314712967535292' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_16262314712967535292\">\n <div style=\"padding-top: 5px\">\n <div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_16262314712967535292_1\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_16262314712967535292\"\n id=\"radio_16262314712967535292_1\" value=\"1\">\n </input>\n <span class=\"label-body px-1\">\n L\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_16262314712967535292_2\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_16262314712967535292\"\n id=\"radio_16262314712967535292_2\" value=\"2\">\n </input>\n <span class=\"label-body px-1\">\n I\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_16262314712967535292_3\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_16262314712967535292\"\n id=\"radio_16262314712967535292_3\" value=\"3\">\n </input>\n <span class=\"label-body px-1\">\n A\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_16262314712967535292_4\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_16262314712967535292\"\n id=\"radio_16262314712967535292_4\" value=\"4\">\n </input>\n <span class=\"label-body px-1\">\n T\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_16262314712967535292_5\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_16262314712967535292\"\n id=\"radio_16262314712967535292_5\" value=\"5\">\n </input>\n <span class=\"label-body px-1\">\n E\n </span>\n </label>\n</div>\n\n \n </div>\n </div>\n <div id='16262314712967535292_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.querySelectorAll('input[name=\"radio_16262314712967535292\"]').forEach(function(rb) {\nrb.addEventListener(\"change\", function() {\n var correct = rb.value == 4;\n var msgBox = document.getElementById('16262314712967535292_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_16262314712967535292\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_16262314712967535292\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n})});\n\n</script>\n```\n:::\n:::\n\n\n###### Question\n\n\nFind an antiderivative for $\\cos^{-1}(x)$ using the integration by parts formula.\n\n::: {.cell hold='true' execution_count=23}\n\n::: {.cell-output .cell-output-display execution_count=24}\n```{=html}\n<form class=\"mx-2 my-3 mw-100\" name='WeaveQuestion' data-id='1587973727920908811' data-controltype=''>\n <div class='form-group '>\n <div class='controls'>\n <div class=\"form\" id=\"controls_1587973727920908811\">\n <div style=\"padding-top: 5px\">\n <div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_1587973727920908811_1\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_1587973727920908811\"\n id=\"radio_1587973727920908811_1\" value=\"1\">\n </input>\n <span class=\"label-body px-1\">\n \\(-\\sin^{-1}(x)\\)\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_1587973727920908811_2\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_1587973727920908811\"\n id=\"radio_1587973727920908811_2\" value=\"2\">\n </input>\n <span class=\"label-body px-1\">\n \\(x^2/2 \\cos^{-1}(x) - x\\sqrt{1-x^2}/4 - \\cos^{-1}(x)/4\\)\n </span>\n </label>\n</div>\n<div class=\"form-check\">\n <label class=\"form-check-label\" for=\"radio_1587973727920908811_3\">\n <input class=\"form-check-input\" type=\"radio\" name=\"radio_1587973727920908811\"\n id=\"radio_1587973727920908811_3\" value=\"3\">\n </input>\n <span class=\"label-body px-1\">\n \\(x\\cos^{-1}(x)-\\sqrt{1 - x^2}\\)\n </span>\n </label>\n</div>\n\n \n </div>\n </div>\n <div id='1587973727920908811_message' style=\"padding-bottom: 15px\"></div>\n </div>\n </div>\n</form>\n\n<script text='text/javascript'>\ndocument.querySelectorAll('input[name=\"radio_1587973727920908811\"]').forEach(function(rb) {\nrb.addEventListener(\"change\", function() {\n var correct = rb.value == 3;\n var msgBox = document.getElementById('1587973727920908811_message');\n if(correct) {\n msgBox.innerHTML = \"<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>\";\n var explanation = document.getElementById(\"explanation_1587973727920908811\")\n if (explanation != null) {\n explanation.style.display = \"none\";\n }\n } else {\n msgBox.innerHTML = \"<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>\";\n var explanation = document.getElementById(\"explanation_1587973727920908811\")\n if (explanation != null) {\n explanation.style.display = \"block\";\n }\n }\n\n})});\n\n</script>\n```\n:::\n:::\n\n\n",
|
||
"supporting": [
|
||
"integration_by_parts_files"
|
||
],
|
||
"filters": [],
|
||
"includes": {
|
||
"include-in-header": [
|
||
"<script src=\"https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js\" integrity=\"sha512-c3Nl8+7g4LMSTdrm621y7kf9v3SDPnhxLNhcjFJbKECVnmZHTdo+IRO05sNLTH/D3vA6u1X32ehoLC7WFVdheg==\" crossorigin=\"anonymous\"></script>\n<script src=\"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js\" integrity=\"sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg==\" crossorigin=\"anonymous\"></script>\n<script type=\"application/javascript\">define('jquery', [],function() {return window.jQuery;})</script>\n"
|
||
]
|
||
}
|
||
}
|
||
} |