1950 lines
101 KiB
HTML
1950 lines
101 KiB
HTML
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
|
||
|
||
<meta charset="utf-8">
|
||
<meta name="generator" content="quarto-1.0.32">
|
||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||
|
||
|
||
<title>Calculus with Julia - 39 Integration By Parts</title>
|
||
<style>
|
||
code{white-space: pre-wrap;}
|
||
span.smallcaps{font-variant: small-caps;}
|
||
span.underline{text-decoration: underline;}
|
||
div.column{display: inline-block; vertical-align: top; width: 50%;}
|
||
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
|
||
ul.task-list{list-style: none;}
|
||
pre > code.sourceCode { white-space: pre; position: relative; }
|
||
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
|
||
pre > code.sourceCode > span:empty { height: 1.2em; }
|
||
.sourceCode { overflow: visible; }
|
||
code.sourceCode > span { color: inherit; text-decoration: inherit; }
|
||
div.sourceCode { margin: 1em 0; }
|
||
pre.sourceCode { margin: 0; }
|
||
@media screen {
|
||
div.sourceCode { overflow: auto; }
|
||
}
|
||
@media print {
|
||
pre > code.sourceCode { white-space: pre-wrap; }
|
||
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
|
||
}
|
||
pre.numberSource code
|
||
{ counter-reset: source-line 0; }
|
||
pre.numberSource code > span
|
||
{ position: relative; left: -4em; counter-increment: source-line; }
|
||
pre.numberSource code > span > a:first-child::before
|
||
{ content: counter(source-line);
|
||
position: relative; left: -1em; text-align: right; vertical-align: baseline;
|
||
border: none; display: inline-block;
|
||
-webkit-touch-callout: none; -webkit-user-select: none;
|
||
-khtml-user-select: none; -moz-user-select: none;
|
||
-ms-user-select: none; user-select: none;
|
||
padding: 0 4px; width: 4em;
|
||
color: #aaaaaa;
|
||
}
|
||
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
|
||
div.sourceCode
|
||
{ }
|
||
@media screen {
|
||
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
|
||
}
|
||
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
|
||
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
|
||
code span.at { color: #7d9029; } /* Attribute */
|
||
code span.bn { color: #40a070; } /* BaseN */
|
||
code span.bu { } /* BuiltIn */
|
||
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
|
||
code span.ch { color: #4070a0; } /* Char */
|
||
code span.cn { color: #880000; } /* Constant */
|
||
code span.co { color: #60a0b0; font-style: italic; } /* Comment */
|
||
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
|
||
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
|
||
code span.dt { color: #902000; } /* DataType */
|
||
code span.dv { color: #40a070; } /* DecVal */
|
||
code span.er { color: #ff0000; font-weight: bold; } /* Error */
|
||
code span.ex { } /* Extension */
|
||
code span.fl { color: #40a070; } /* Float */
|
||
code span.fu { color: #06287e; } /* Function */
|
||
code span.im { } /* Import */
|
||
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
|
||
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
|
||
code span.op { color: #666666; } /* Operator */
|
||
code span.ot { color: #007020; } /* Other */
|
||
code span.pp { color: #bc7a00; } /* Preprocessor */
|
||
code span.sc { color: #4070a0; } /* SpecialChar */
|
||
code span.ss { color: #bb6688; } /* SpecialString */
|
||
code span.st { color: #4070a0; } /* String */
|
||
code span.va { color: #19177c; } /* Variable */
|
||
code span.vs { color: #4070a0; } /* VerbatimString */
|
||
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
|
||
</style>
|
||
|
||
|
||
<script src="../site_libs/quarto-nav/quarto-nav.js"></script>
|
||
<script src="../site_libs/quarto-nav/headroom.min.js"></script>
|
||
<script src="../site_libs/clipboard/clipboard.min.js"></script>
|
||
<script src="../site_libs/quarto-search/autocomplete.umd.js"></script>
|
||
<script src="../site_libs/quarto-search/fuse.min.js"></script>
|
||
<script src="../site_libs/quarto-search/quarto-search.js"></script>
|
||
<meta name="quarto:offset" content="../">
|
||
<link href="../integrals/partial_fractions.html" rel="next">
|
||
<link href="../integrals/substitution.html" rel="prev">
|
||
<script src="../site_libs/quarto-html/quarto.js"></script>
|
||
<script src="../site_libs/quarto-html/popper.min.js"></script>
|
||
<script src="../site_libs/quarto-html/tippy.umd.min.js"></script>
|
||
<script src="../site_libs/quarto-html/anchor.min.js"></script>
|
||
<link href="../site_libs/quarto-html/tippy.css" rel="stylesheet">
|
||
<link href="../site_libs/quarto-html/quarto-syntax-highlighting.css" rel="stylesheet" id="quarto-text-highlighting-styles">
|
||
<script src="../site_libs/bootstrap/bootstrap.min.js"></script>
|
||
<link href="../site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
|
||
<link href="../site_libs/bootstrap/bootstrap.min.css" rel="stylesheet" id="quarto-bootstrap" data-mode="light">
|
||
<script id="quarto-search-options" type="application/json">{
|
||
"location": "navbar",
|
||
"copy-button": false,
|
||
"collapse-after": 3,
|
||
"panel-placement": "end",
|
||
"type": "overlay",
|
||
"limit": 20,
|
||
"language": {
|
||
"search-no-results-text": "No results",
|
||
"search-matching-documents-text": "matching documents",
|
||
"search-copy-link-title": "Copy link to search",
|
||
"search-hide-matches-text": "Hide additional matches",
|
||
"search-more-match-text": "more match in this document",
|
||
"search-more-matches-text": "more matches in this document",
|
||
"search-clear-button-title": "Clear",
|
||
"search-detached-cancel-button-title": "Cancel",
|
||
"search-submit-button-title": "Submit"
|
||
}
|
||
}</script>
|
||
<script async="" src="https://hypothes.is/embed.js"></script>
|
||
<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>
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js" integrity="sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg==" crossorigin="anonymous"></script>
|
||
<script type="application/javascript">define('jquery', [],function() {return window.jQuery;})</script>
|
||
|
||
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js" type="text/javascript"></script>
|
||
|
||
</head>
|
||
|
||
<body class="nav-sidebar floating nav-fixed">
|
||
|
||
<div id="quarto-search-results"></div>
|
||
<header id="quarto-header" class="headroom fixed-top">
|
||
<nav class="navbar navbar-expand-lg navbar-dark ">
|
||
<div class="navbar-container container-fluid">
|
||
<a class="navbar-brand" href="../index.html">
|
||
<img src="../logo.png" alt="">
|
||
<span class="navbar-title">Calculus with Julia</span>
|
||
</a>
|
||
<div id="quarto-search" class="" title="Search"></div>
|
||
</div> <!-- /container-fluid -->
|
||
</nav>
|
||
<nav class="quarto-secondary-nav" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
|
||
<div class="container-fluid d-flex justify-content-between">
|
||
<h1 class="quarto-secondary-nav-title"><span class="chapter-number">39</span> <span class="chapter-title">Integration By Parts</span></h1>
|
||
<button type="button" class="quarto-btn-toggle btn" aria-label="Show secondary navigation">
|
||
<i class="bi bi-chevron-right"></i>
|
||
</button>
|
||
</div>
|
||
</nav>
|
||
</header>
|
||
<!-- content -->
|
||
<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar">
|
||
<!-- sidebar -->
|
||
<nav id="quarto-sidebar" class="sidebar collapse sidebar-navigation floating overflow-auto">
|
||
<div class="mt-2 flex-shrink-0 align-items-center">
|
||
<div class="sidebar-search">
|
||
<div id="quarto-search" class="" title="Search"></div>
|
||
</div>
|
||
</div>
|
||
<div class="sidebar-menu-container">
|
||
<ul class="list-unstyled mt-1">
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../index.html" class="sidebar-item-text sidebar-link">Preface</a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item sidebar-item-section">
|
||
<div class="sidebar-item-container">
|
||
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="false">Precalculus Concepts</a>
|
||
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-1" aria-expanded="false">
|
||
<i class="bi bi-chevron-right ms-2"></i>
|
||
</a>
|
||
</div>
|
||
<ul id="quarto-sidebar-section-1" class="collapse list-unstyled sidebar-section depth1 ">
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../precalc/calculator.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">1</span> <span class="chapter-title">From calculator to computer</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../precalc/variables.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">2</span> <span class="chapter-title">Variables</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../precalc/numbers_types.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">3</span> <span class="chapter-title">Number systems</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../precalc/logical_expressions.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">4</span> <span class="chapter-title">Inequalities, Logical expressions</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../precalc/vectors.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">5</span> <span class="chapter-title">Vectors</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../precalc/ranges.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">6</span> <span class="chapter-title">Ranges and Sets</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../precalc/functions.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">7</span> <span class="chapter-title">Functions</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../precalc/plotting.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">8</span> <span class="chapter-title">The Graph of a Function</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../precalc/transformations.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">9</span> <span class="chapter-title">Function manipulations</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../precalc/inversefunctions.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">10</span> <span class="chapter-title">The Inverse of a Function</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../precalc/polynomial.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">11</span> <span class="chapter-title">Polynomials</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../precalc/polynomial_roots.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">12</span> <span class="chapter-title">Roots of a polynomial</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../precalc/polynomials_package.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">13</span> <span class="chapter-title">The Polynomials package</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../precalc/rational_functions.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">14</span> <span class="chapter-title">Rational functions</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../precalc/exp_log_functions.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">15</span> <span class="chapter-title">Exponential and logarithmic functions</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../precalc/trig_functions.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">16</span> <span class="chapter-title">Trigonometric functions</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../precalc/julia_overview.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">17</span> <span class="chapter-title">Overview of Julia commands</span></a>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="sidebar-item sidebar-item-section">
|
||
<div class="sidebar-item-container">
|
||
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="false">Limits</a>
|
||
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="false">
|
||
<i class="bi bi-chevron-right ms-2"></i>
|
||
</a>
|
||
</div>
|
||
<ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 ">
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../limits/limits.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">18</span> <span class="chapter-title">Limits</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../limits/limits_extensions.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">19</span> <span class="chapter-title">Limits, issues, extensions of the concept</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../limits/continuity.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">20</span> <span class="chapter-title">Continuity</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../limits/intermediate_value_theorem.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">21</span> <span class="chapter-title">Implications of continuity</span></a>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="sidebar-item sidebar-item-section">
|
||
<div class="sidebar-item-container">
|
||
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="false">Derivatives</a>
|
||
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="false">
|
||
<i class="bi bi-chevron-right ms-2"></i>
|
||
</a>
|
||
</div>
|
||
<ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 ">
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../derivatives/derivatives.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">22</span> <span class="chapter-title">Derivatives</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../derivatives/numeric_derivatives.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">23</span> <span class="chapter-title">Numeric derivatives</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../derivatives/symbolic_derivatives.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">24</span> <span class="chapter-title">Symbolic derivatives</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../derivatives/mean_value_theorem.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">25</span> <span class="chapter-title">The mean value theorem for differentiable functions.</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../derivatives/optimization.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">26</span> <span class="chapter-title">Optimization</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../derivatives/first_second_derivatives.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">27</span> <span class="chapter-title">The first and second derivatives</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../derivatives/curve_sketching.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">28</span> <span class="chapter-title">Curve Sketching</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../derivatives/linearization.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">29</span> <span class="chapter-title">Linearization</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../derivatives/newtons_method.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">30</span> <span class="chapter-title">Newton’s method</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../derivatives/more_zeros.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">31</span> <span class="chapter-title">Derivative-free alternatives to Newton’s method</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../derivatives/lhospitals_rule.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">32</span> <span class="chapter-title">L’Hospital’s Rule</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../derivatives/implicit_differentiation.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">33</span> <span class="chapter-title">Implicit Differentiation</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../derivatives/related_rates.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">34</span> <span class="chapter-title">Related rates</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../derivatives/taylor_series_polynomials.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">35</span> <span class="chapter-title">Taylor Polynomials and other Approximating Polynomials</span></a>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="sidebar-item sidebar-item-section">
|
||
<div class="sidebar-item-container">
|
||
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-4" aria-expanded="true">Integrals</a>
|
||
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-4" aria-expanded="true">
|
||
<i class="bi bi-chevron-right ms-2"></i>
|
||
</a>
|
||
</div>
|
||
<ul id="quarto-sidebar-section-4" class="collapse list-unstyled sidebar-section depth1 show">
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../integrals/area.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">36</span> <span class="chapter-title">Area under a curve</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../integrals/ftc.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">37</span> <span class="chapter-title">Fundamental Theorem or Calculus</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../integrals/substitution.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">38</span> <span class="chapter-title">Substitution</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../integrals/integration_by_parts.html" class="sidebar-item-text sidebar-link active"><span class="chapter-number">39</span> <span class="chapter-title">Integration By Parts</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../integrals/partial_fractions.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">40</span> <span class="chapter-title">Partial Fractions</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../integrals/improper_integrals.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">41</span> <span class="chapter-title">Improper Integrals</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../integrals/mean_value_theorem.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">42</span> <span class="chapter-title">Mean value theorem for integrals</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../integrals/area_between_curves.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">43</span> <span class="chapter-title">Area between two curves</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../integrals/center_of_mass.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">44</span> <span class="chapter-title">Center of Mass</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../integrals/volumes_slice.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">45</span> <span class="chapter-title">Volumes by slicing</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../integrals/arc_length.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">46</span> <span class="chapter-title">Arc length</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../integrals/surface_area.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">47</span> <span class="chapter-title">Surface Area</span></a>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="sidebar-item sidebar-item-section">
|
||
<div class="sidebar-item-container">
|
||
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-5" aria-expanded="false">ODEs</a>
|
||
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-5" aria-expanded="false">
|
||
<i class="bi bi-chevron-right ms-2"></i>
|
||
</a>
|
||
</div>
|
||
<ul id="quarto-sidebar-section-5" class="collapse list-unstyled sidebar-section depth1 ">
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../ODEs/odes.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">48</span> <span class="chapter-title">ODEs</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../ODEs/euler.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">49</span> <span class="chapter-title">Euler’s method</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../ODEs/solve.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">50</span> <span class="chapter-title">The problem-algorithm-solve interface</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../ODEs/differential_equations.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">51</span> <span class="chapter-title">The <code>DifferentialEquations</code> suite</span></a>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="sidebar-item sidebar-item-section">
|
||
<div class="sidebar-item-container">
|
||
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-6" aria-expanded="false">Differential vector calculus</a>
|
||
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-6" aria-expanded="false">
|
||
<i class="bi bi-chevron-right ms-2"></i>
|
||
</a>
|
||
</div>
|
||
<ul id="quarto-sidebar-section-6" class="collapse list-unstyled sidebar-section depth1 ">
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../differentiable_vector_calculus/polar_coordinates.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">52</span> <span class="chapter-title">Polar Coordinates and Curves</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../differentiable_vector_calculus/vectors.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">53</span> <span class="chapter-title">Vectors and matrices</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../differentiable_vector_calculus/vector_valued_functions.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">54</span> <span class="chapter-title">Vector-valued functions, <span class="math inline">\(f:R \rightarrow R^n\)</span></span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../differentiable_vector_calculus/scalar_functions.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">55</span> <span class="chapter-title">Scalar functions</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../differentiable_vector_calculus/scalar_functions_applications.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">56</span> <span class="chapter-title">Applications with scalar functions</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../differentiable_vector_calculus/vector_fields.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">57</span> <span class="chapter-title">Functions <span class="math inline">\(R^n \rightarrow R^m\)</span></span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../differentiable_vector_calculus/plots_plotting.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">58</span> <span class="chapter-title">2D and 3D plots in Julia with Plots</span></a>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="sidebar-item sidebar-item-section">
|
||
<div class="sidebar-item-container">
|
||
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-7" aria-expanded="false">Integral vector calculus</a>
|
||
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-7" aria-expanded="false">
|
||
<i class="bi bi-chevron-right ms-2"></i>
|
||
</a>
|
||
</div>
|
||
<ul id="quarto-sidebar-section-7" class="collapse list-unstyled sidebar-section depth1 ">
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../integral_vector_calculus/double_triple_integrals.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">59</span> <span class="chapter-title">Multi-dimensional integrals</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../integral_vector_calculus/line_integrals.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">60</span> <span class="chapter-title">Line and Surface Integrals</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../integral_vector_calculus/div_grad_curl.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">61</span> <span class="chapter-title">The Gradient, Divergence, and Curl</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../integral_vector_calculus/stokes_theorem.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">62</span> <span class="chapter-title">Green’s Theorem, Stokes’ Theorem, and the Divergence Theorem</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../integral_vector_calculus/review.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">63</span> <span class="chapter-title">Quick Review of Vector Calculus</span></a>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="sidebar-item sidebar-item-section">
|
||
<div class="sidebar-item-container">
|
||
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-8" aria-expanded="false">Alternatives</a>
|
||
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-8" aria-expanded="false">
|
||
<i class="bi bi-chevron-right ms-2"></i>
|
||
</a>
|
||
</div>
|
||
<ul id="quarto-sidebar-section-8" class="collapse list-unstyled sidebar-section depth1 ">
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../alternatives/plotly_plotting.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">64</span> <span class="chapter-title">JavaScript based plotting libraries</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../alternatives/makie_plotting.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">65</span> <span class="chapter-title">Calculus plots with Makie</span></a>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="sidebar-item sidebar-item-section">
|
||
<div class="sidebar-item-container">
|
||
<a class="sidebar-item-text sidebar-link text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-9" aria-expanded="false">Appendices</a>
|
||
<a class="sidebar-item-toggle text-start collapsed" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-9" aria-expanded="false">
|
||
<i class="bi bi-chevron-right ms-2"></i>
|
||
</a>
|
||
</div>
|
||
<ul id="quarto-sidebar-section-9" class="collapse list-unstyled sidebar-section depth1 ">
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../misc/getting_started_with_julia.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">66</span> <span class="chapter-title">Getting started with Julia</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../misc/julia_interfaces.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">67</span> <span class="chapter-title">Julia interfaces</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../misc/calculus_with_julia.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">68</span> <span class="chapter-title">The <code>CalculusWithJulia</code> package</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../misc/unicode.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">69</span> <span class="chapter-title">Usages of Unicode symbols</span></a>
|
||
</div>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../misc/quick_notes.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">70</span> <span class="chapter-title">Quick introduction to Calculus with Julia</span></a>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="sidebar-item">
|
||
<div class="sidebar-item-container">
|
||
<a href="../references.html" class="sidebar-item-text sidebar-link">References</a>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</nav>
|
||
<!-- margin-sidebar -->
|
||
<div id="quarto-margin-sidebar" class="sidebar margin-sidebar">
|
||
<nav id="TOC" role="doc-toc">
|
||
<h2 id="toc-title">Table of contents</h2>
|
||
|
||
<ul>
|
||
<li><a href="#area-related-to-parameterized-curves" id="toc-area-related-to-parameterized-curves" class="nav-link active" data-scroll-target="#area-related-to-parameterized-curves"> <span class="header-section-number">39.1</span> Area related to parameterized curves</a></li>
|
||
<li><a href="#questions" id="toc-questions" class="nav-link" data-scroll-target="#questions"> <span class="header-section-number">39.2</span> Questions</a></li>
|
||
</ul>
|
||
<div class="toc-actions"><div><i class="bi bi-github"></i></div><div class="action-links"><p><a href="https://github.com/jverzani/CalculusWithJuliaNotes.jl/edit/main/quarto/integrals/integration_by_parts.qmd" class="toc-action">Edit this page</a></p><p><a href="https://github.com/jverzani/CalculusWithJuliaNotes.jl/issues/new" class="toc-action">Report an issue</a></p></div></div></nav>
|
||
</div>
|
||
<!-- main -->
|
||
<main class="content" id="quarto-document-content">
|
||
|
||
<header id="title-block-header" class="quarto-title-block default">
|
||
<div class="quarto-title">
|
||
<h1 class="title d-none d-lg-block"><span class="chapter-number">39</span> <span class="chapter-title">Integration By Parts</span></h1>
|
||
</div>
|
||
|
||
|
||
|
||
<div class="quarto-title-meta">
|
||
|
||
|
||
|
||
</div>
|
||
|
||
|
||
</header>
|
||
|
||
<p>This section uses these add-on packages:</p>
|
||
<div class="sourceCode cell-code" id="cb1"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="im">using</span> <span class="bu">CalculusWithJulia</span></span>
|
||
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="im">using</span> <span class="bu">Plots</span></span>
|
||
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="im">using</span> <span class="bu">SymPy</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||
<hr>
|
||
<p>So far we have seen that the <em>derivative</em> rules lead to <em>integration rules</em>. In particular:</p>
|
||
<ul>
|
||
<li>The sum rule <span class="math inline">\([au(x) + bv(x)]' = au'(x) + bv'(x)\)</span> gives rise to an integration rule: <span class="math inline">\(\int (au(x) + bv(x))dx = a\int u(x)dx + b\int v(x))dx\)</span>. (That is, the linearity of the derivative means the integral has linearity.)</li>
|
||
<li>The chain rule <span class="math inline">\([f(g(x))]' = f'(g(x)) g'(x)\)</span> gives <span class="math inline">\(\int_a^b f(g(x))g'(x)dx=\int_{g(a)}^{g(b)}f(x)dx\)</span>. That is, substitution reverses the chain rule.</li>
|
||
</ul>
|
||
<p>Now we turn our attention to the implications of the <em>product rule</em>: <span class="math inline">\([uv]' = u'v + uv'\)</span>. The resulting technique is called integration by parts.</p>
|
||
<p>The following illustrates integration by parts of the integral <span class="math inline">\((uv)'\)</span> over <span class="math inline">\([a,b]\)</span> <a href="http://en.wikipedia.org/wiki/Integration_by_parts#Visualization">original</a>.</p>
|
||
<div class="cell" data-execution_count="4">
|
||
<div class="cell-output cell-output-display" data-execution_count="5">
|
||
<p><img src="integration_by_parts_files/figure-html/cell-5-output-1.svg" class="img-fluid"></p>
|
||
</div>
|
||
</div>
|
||
<p>The figure is a parametric plot of <span class="math inline">\((u,v)\)</span> with the points <span class="math inline">\((u(a), v(a))\)</span> and <span class="math inline">\((u(b), v(b))\)</span> marked. The difference <span class="math inline">\(u(b)v(b) - u(a)v(a) = u(x)v(x) \mid_a^b\)</span> is shaded. This area breaks into two pieces, <span class="math inline">\(A\)</span> and <span class="math inline">\(B\)</span>, partitioned by the curve. If <span class="math inline">\(u\)</span> is increasing and the curve is parameterized by <span class="math inline">\(t \rightarrow u^{-1}(t)\)</span>, then <span class="math inline">\(A=\int_{u^{-1}(a)}^{u^{-1}(b)} v(u^{-1}(t))dt\)</span>. A <span class="math inline">\(u\)</span>-substitution with <span class="math inline">\(t = u(x)\)</span> changes this into the integral <span class="math inline">\(\int_a^b v(x) u'(x) dx\)</span>. Similarly, for increasing <span class="math inline">\(v\)</span>, it can be seen that <span class="math inline">\(B=\int_a^b u(x) v'(x) dx\)</span>. This suggests a relationship between the integral of <span class="math inline">\(u v'\)</span>, the integral of <span class="math inline">\(u' v\)</span> and the value <span class="math inline">\(u(b)v(b) - u(a)v(a)\)</span>.</p>
|
||
<p>In terms of formulas, by the fundamental theorem of calculus:</p>
|
||
<p><span class="math display">\[
|
||
u(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.
|
||
\]</span></p>
|
||
<p>This is re-expressed as</p>
|
||
<p><span class="math display">\[
|
||
\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,
|
||
\]</span></p>
|
||
<p>Or, more informally, as <span class="math inline">\(\int udv = uv - \int v du\)</span>.</p>
|
||
<p>This can sometimes be confusingly written as:</p>
|
||
<p><span class="math display">\[
|
||
\int f(x) g'(x) dx = f(x)g(x) - \int f'(x) g(x) dx.
|
||
\]</span></p>
|
||
<p>(The confusion coming from the fact that the indefinite integrals are only defined up to a constant.)</p>
|
||
<p>How does this help? It allows us to differentiate parts of an integral in hopes it makes the result easier to integrate.</p>
|
||
<p>An illustration can clarify.</p>
|
||
<p>Consider the integral <span class="math inline">\(\int_0^\pi x\sin(x) dx\)</span>. If we let <span class="math inline">\(u=x\)</span> and <span class="math inline">\(dv=\sin(x) dx\)</span>, then <span class="math inline">\(du = 1dx\)</span> and <span class="math inline">\(v=-\cos(x)\)</span>. The above then says:</p>
|
||
<p><span class="math display">\[
|
||
\begin{align*}
|
||
\int_0^\pi x\sin(x) dx &= \int_0^\pi u dv\\
|
||
&= uv\big|_0^\pi - \int_0^\pi v du\\
|
||
&= x \cdot (-\cos(x)) \big|_0^\pi - \int_0^\pi (-\cos(x)) dx\\
|
||
&= \pi (-\cos(\pi)) - 0(-\cos(0)) + \int_0^\pi \cos(x) dx\\
|
||
&= \pi + \sin(x)\big|_0^\pi\\
|
||
&= \pi.
|
||
\end{align*}
|
||
\]</span></p>
|
||
<p>The 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.</p>
|
||
<section id="examples" class="level4">
|
||
<h4 class="anchored" data-anchor-id="examples">Examples</h4>
|
||
<p>Consider <span class="math inline">\(\int_1^2 x \log(x) dx\)</span>. We might try differentiating the <span class="math inline">\(\log(x)\)</span> term, so we set</p>
|
||
<p><span class="math display">\[
|
||
u=\log(x) \text{ and } dv=xdx
|
||
\]</span></p>
|
||
<p>Then we get</p>
|
||
<p><span class="math display">\[
|
||
du = \frac{1}{x} dx \text{ and } v = \frac{x^2}{2}.
|
||
\]</span></p>
|
||
<p>Putting together gives:</p>
|
||
<p><span class="math display">\[
|
||
\begin{align*}
|
||
\int_1^2 x \log(x) dx
|
||
&= (\log(x) \cdot \frac{x^2}{2}) \big|_1^2 - \int_1^2 \frac{x^2}{2} \frac{1}{x} dx\\
|
||
&= (2\log(2) - 0) - (\frac{x^2}{4})\big|_1^2\\
|
||
&= 2\log(2) - (1 - \frac{1}{4}) \\
|
||
&= 2\log(2) - \frac{3}{4}.
|
||
\end{align*}
|
||
\]</span></p>
|
||
<section id="example" class="level5">
|
||
<h5 class="anchored" data-anchor-id="example">Example</h5>
|
||
<p>This related problem, <span class="math inline">\(\int \log(x) dx\)</span>, uses the same idea, though perhaps harder to see at first glance, as setting <code>dv=dx</code> is almost too simple to try:</p>
|
||
<p><span class="math display">\[
|
||
\begin{align*}
|
||
u &= \log(x) & dv &= dx\\
|
||
du &= \frac{1}{x}dx & v &= x
|
||
\end{align*}
|
||
\]</span></p>
|
||
<p><span class="math display">\[
|
||
\begin{align*}
|
||
\int \log(x) dx
|
||
&= \int u dv\\
|
||
&= uv - \int v du\\
|
||
&= (\log(x) \cdot x) - \int x \cdot \frac{1}{x} dx\\
|
||
&= x \log(x) - \int dx\\
|
||
&= x \log(x) - x
|
||
\end{align*}
|
||
\]</span></p>
|
||
<p>Were this a definite integral problem, we would have written:</p>
|
||
<p><span class="math display">\[
|
||
\int_a^b \log(x) dx = (x\log(x))\big|_a^b - \int_a^b dx = (x\log(x) - x)\big|_a^b.
|
||
\]</span></p>
|
||
</section>
|
||
<section id="example-1" class="level5">
|
||
<h5 class="anchored" data-anchor-id="example-1">Example</h5>
|
||
<p>Sometimes integration by parts is used two or more times. Here we let <span class="math inline">\(u=x^2\)</span> and <span class="math inline">\(dv = e^x dx\)</span>:</p>
|
||
<p><span class="math display">\[
|
||
\int_a^b x^2 e^x dx = (x^2 \cdot e^x)\big|_a^b - \int_a^b 2x e^x dx.
|
||
\]</span></p>
|
||
<p>But we can do <span class="math inline">\(\int_a^b x e^xdx\)</span> the same way:</p>
|
||
<p><span class="math display">\[
|
||
\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.
|
||
\]</span></p>
|
||
<p>Combining gives the answer:</p>
|
||
<p><span class="math display">\[
|
||
\int_a^b x^2 e^x dx
|
||
= (x^2 \cdot e^x)\big|_a^b - 2( (xe^x - e^x)\big|_a^b ) =
|
||
e^x(x^2 - 2x - 1) \big|_a^b.
|
||
\]</span></p>
|
||
<p>In fact, it isn’t hard to see that an integral of <span class="math inline">\(x^m e^x\)</span>, <span class="math inline">\(m\)</span> a positive integer, can be handled in this manner. For example, when <span class="math inline">\(m=10\)</span>, <code>SymPy</code> gives:</p>
|
||
<div class="cell" data-execution_count="5">
|
||
<div class="sourceCode cell-code" id="cb2"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="pp">@syms</span> 𝒙</span>
|
||
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="fu">integrate</span>(𝒙<span class="op">^</span><span class="fl">10</span> <span class="op">*</span> <span class="fu">exp</span>(𝒙), 𝒙)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||
<div class="cell-output cell-output-display" data-execution_count="6">
|
||
<span class="math-left-align" style="padding-left: 4px; width:0; float:left;">
|
||
\[
|
||
\left(𝒙^{10} - 10 𝒙^{9} + 90 𝒙^{8} - 720 𝒙^{7} + 5040 𝒙^{6} - 30240 𝒙^{5} + 151200 𝒙^{4} - 604800 𝒙^{3} + 1814400 𝒙^{2} - 3628800 𝒙 + 3628800\right) e^{𝒙}
|
||
\]
|
||
</span>
|
||
</div>
|
||
</div>
|
||
<p>The general answer is <span class="math inline">\(\int x^n e^xdx = p(x) e^x\)</span>, where <span class="math inline">\(p(x)\)</span> is a polynomial of degree <span class="math inline">\(n\)</span>.</p>
|
||
</section>
|
||
<section id="example-2" class="level5">
|
||
<h5 class="anchored" data-anchor-id="example-2">Example</h5>
|
||
<p>The same technique is attempted for this integral, but ends differently. First in the following we let <span class="math inline">\(u=\sin(x)\)</span> and <span class="math inline">\(dv=e^x dx\)</span>:</p>
|
||
<p><span class="math display">\[
|
||
\int e^x \sin(x)dx = \sin(x) e^x - \int \cos(x) e^x dx.
|
||
\]</span></p>
|
||
<p>Now we let <span class="math inline">\(u = \cos(x)\)</span> and again <span class="math inline">\(dv=e^x dx\)</span>:</p>
|
||
<p><span class="math display">\[
|
||
\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.
|
||
\]</span></p>
|
||
<p>But simplifying this gives:</p>
|
||
<p><span class="math display">\[
|
||
\int e^x \sin(x)dx = - \int e^x \sin(x)dx + e^x(\sin(x) - \cos(x)).
|
||
\]</span></p>
|
||
<p>Solving for the “unknown” <span class="math inline">\(\int e^x \sin(x) dx\)</span> gives:</p>
|
||
<p><span class="math display">\[
|
||
\int e^x \sin(x) dx = \frac{1}{2} e^x (\sin(x) - \cos(x)).
|
||
\]</span></p>
|
||
</section>
|
||
<section id="example-3" class="level5">
|
||
<h5 class="anchored" data-anchor-id="example-3">Example</h5>
|
||
<p>Positive integer powers of trigonometric functions can be addressed by this technique. Consider <span class="math inline">\(\int \cos(x)^n dx\)</span>. We let <span class="math inline">\(u=\cos(x)^{n-1}\)</span> and <span class="math inline">\(dv=\cos(x) dx\)</span>. Then <span class="math inline">\(du = (n-1)\cos(x)^{n-2}(-\sin(x))dx\)</span> and <span class="math inline">\(v=\sin(x)\)</span>. So,</p>
|
||
<p><span class="math display">\[
|
||
\begin{align*}
|
||
\int \cos(x)^n dx &= \cos(x)^{n-1} \cdot (\sin(x)) - \int (\sin(x)) ((n-1)\sin(x) \cos(x)^{n-2}) dx \\
|
||
&= \sin(x) \cos(x)^{n-1} + (n-1)\int \sin^2(x) \cos(x)^{n-1} dx\\
|
||
&= \sin(x) \cos(x)^{n-1} + (n-1)\int (1 - \cos(x)^2) \cos(x)^{n-2} dx\\
|
||
&= \sin(x) \cos(x)^{n-1} + (n-1)\int \cos(x)^{n-2}dx - (n-1)\int \cos(x)^n dx.
|
||
\end{align*}
|
||
\]</span></p>
|
||
<p>We can then solve for the unknown (<span class="math inline">\(\int \cos(x)^{n}dx\)</span>) to get this <em>reduction formula</em>:</p>
|
||
<p><span class="math display">\[
|
||
\int \cos(x)^n dx = \frac{1}{n}\sin(x) \cos(x)^{n-1} + \frac{n-1}{n}\int \cos(x)^{n-2}dx.
|
||
\]</span></p>
|
||
<p>This is called a reduction formula as it reduces the problem from an integral with a power of <span class="math inline">\(n\)</span> to one with a power of <span class="math inline">\(n - 2\)</span>, so could be repeated until the remaining indefinite integral required knowing either <span class="math inline">\(\int \cos(x) dx\)</span> (which is <span class="math inline">\(-\sin(x)\)</span>) or <span class="math inline">\(\int \cos(x)^2 dx\)</span>, which by a double angle formula application, is <span class="math inline">\(x/2 - \sin(2x)/4\)</span>.</p>
|
||
<p><code>SymPy</code> is quite able to do this repeated bookkeeping. For example with <span class="math inline">\(n=10\)</span>:</p>
|
||
<div class="cell" data-execution_count="6">
|
||
<div class="sourceCode cell-code" id="cb3"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="fu">integrate</span>(<span class="fu">cos</span>(𝒙)<span class="op">^</span><span class="fl">10</span>, 𝒙)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||
<div class="cell-output cell-output-display" data-execution_count="7">
|
||
<span class="math-left-align" style="padding-left: 4px; width:0; float:left;">
|
||
\[
|
||
\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}
|
||
\]
|
||
</span>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section id="example-4" class="level5">
|
||
<h5 class="anchored" data-anchor-id="example-4">Example</h5>
|
||
<p>The 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 <span class="math inline">\(f\)</span>. Indeed, integration by parts gives a means to possibly find antiderivatives for inverse functions.</p>
|
||
<p>Let <span class="math inline">\(uv = x f^{-1}(x)\)</span>. Then we have <span class="math inline">\([uv]' = u'v + uv' = f^{-1}(x) + x [f^{-1}(x)]'\)</span>. So, up to a constant <span class="math inline">\(uv = \int [uv]'dx = \int f^{-1}(x) + \int x [f^{-1}(x)]'\)</span>. Re-expressing gives:</p>
|
||
<p><span class="math display">\[
|
||
\begin{align*}
|
||
\int f^{-1}(x) dx
|
||
&= xf^{-1}(x) - \int x [f^{-1}(x)]' dx\\
|
||
&= xf^{-1}(x) - \int f(u) du.\\
|
||
\end{align*}
|
||
\]</span></p>
|
||
<p>The last line follows from the <span class="math inline">\(u\)</span>-substitution: <span class="math inline">\(u=f^{-1}(x)\)</span> for then <span class="math inline">\(du = [f^{-1}(x)]' dx\)</span> and <span class="math inline">\(x=f(u)\)</span>.</p>
|
||
<p>We use this to find an antiderivative for <span class="math inline">\(\sin^{-1}(x)\)</span>:</p>
|
||
<p><span class="math display">\[
|
||
\begin{align*}
|
||
\int \sin^{-1}(x) dx &= x \sin^{-1}(x) - \int \sin(u) du \\
|
||
&= x \sin^{-1}(x) + \cos(u) \\
|
||
&= x \sin^{-1}(x) + \cos(\sin^{-1}(x)).
|
||
\end{align*}
|
||
\]</span></p>
|
||
<p>Using right triangles to simplify, the last value <span class="math inline">\(\cos(\sin^{-1}(x))\)</span> can otherwise be written as <span class="math inline">\(\sqrt{1 - x^2}\)</span>.</p>
|
||
</section>
|
||
<section id="example-5" class="level5">
|
||
<h5 class="anchored" data-anchor-id="example-5">Example</h5>
|
||
<p>The <a href="http://en.wikipedia.org/wiki/Trapezoidal_rule">trapezoid</a> rule is an approximation to the definite integral like a Riemann sum, only instead of approximating the area above <span class="math inline">\([x_i, x_i + h]\)</span> by a rectangle with height <span class="math inline">\(f(c_i)\)</span> (for some <span class="math inline">\(c_i\)</span>), it uses a trapezoid formed by the left and right endpoints. That is, this area is used in the estimation: <span class="math inline">\((1/2)\cdot (f(x_i) + f(x_i+h)) \cdot h\)</span>.</p>
|
||
<p>Even though we suggest just using <code>quadgk</code> for numeric integration, estimating the error in this approximation is still of some theoretical interest.</p>
|
||
<p>Recall, just using <em>either</em> <span class="math inline">\(x_i\)</span> or <span class="math inline">\(x_{i-1}\)</span> for <span class="math inline">\(c_i\)</span> gives an error that is “like” <span class="math inline">\(1/n\)</span>, as <span class="math inline">\(n\)</span> gets large, though the exact rate depends on the function and the length of the interval.</p>
|
||
<p>This <a href="http://www.math.ucsd.edu/~ebender/20B/77_Trap.pdf">proof</a> for the error estimate is involved, but is reproduced here, as it nicely integrates many of the theoretical concepts of integration discussed so far.</p>
|
||
<p>First, for convenience, we consider the interval <span class="math inline">\(x_i\)</span> to <span class="math inline">\(x_i+h\)</span>. The actual answer over this is just <span class="math inline">\(\int_{x_i}^{x_i+h}f(x) dx\)</span>. By a <span class="math inline">\(u\)</span>-substitution with <span class="math inline">\(u=x-x_i\)</span> this becomes <span class="math inline">\(\int_0^h f(t + x_i) dt\)</span>. For analyzing this we integrate once by parts using <span class="math inline">\(u=f(t+x_i)\)</span> and <span class="math inline">\(dv=dt\)</span>. But instead of letting <span class="math inline">\(v=t\)</span>, we choose to add - as is our prerogative - a constant of integration <span class="math inline">\(A\)</span>, so <span class="math inline">\(v=t+A\)</span>:</p>
|
||
<p><span class="math display">\[
|
||
\begin{align*}
|
||
\int_0^h f(t + x_i) dt &= uv \big|_0^h - \int_0^h v du\\
|
||
&= f(t+x_i)(t+A)\big|_0^h - \int_0^h (t + A) f'(t + x_i) dt.
|
||
\end{align*}
|
||
\]</span></p>
|
||
<p>We choose <span class="math inline">\(A\)</span> to be <span class="math inline">\(-h/2\)</span>, any constant is possible, for then the term <span class="math inline">\(f(t+x_i)(t+A)\big|_0^h\)</span> becomes <span class="math inline">\((1/2)(f(x_i+h) + f(x_i)) \cdot h\)</span>, or the trapezoid approximation. This means, the error over this interval - actual minus estimate - satisfies:</p>
|
||
<p><span class="math display">\[
|
||
\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.
|
||
\]</span></p>
|
||
<p>For this, we <em>again</em> integrate by parts with</p>
|
||
<p><span class="math display">\[
|
||
\begin{align*}
|
||
u &= f'(t + x_i) & dv &= (t + A)dt\\
|
||
du &= f''(t + x_i) & v &= \frac{(t + A)^2}{2} + B
|
||
\end{align*}
|
||
\]</span></p>
|
||
<p>Again we added a constant of integration, <span class="math inline">\(B\)</span>, to <span class="math inline">\(v\)</span>. The error becomes:</p>
|
||
<p><span class="math display">\[
|
||
\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.
|
||
\]</span></p>
|
||
<p>With <span class="math inline">\(A=-h/2\)</span>, <span class="math inline">\(B\)</span> is chosen so <span class="math inline">\((t+A)^2/2 + B = 0\)</span>, or <span class="math inline">\(B=-h^2/8\)</span>. The error becomes</p>
|
||
<p><span class="math display">\[
|
||
\text{error}_i = \int_0^h \left(\frac{(t-h/2)^2}{2} - \frac{h^2}{8}\right) \cdot f''(t + x_i) dt.
|
||
\]</span></p>
|
||
<p>Now, we assume the <span class="math inline">\(\lvert f''(t)\rvert\)</span> is bounded by <span class="math inline">\(K\)</span> for any <span class="math inline">\(a \leq t \leq b\)</span>. This will be true, for example, if the second derivative is assumed to exist and be continuous. Using this fact about definite integrals <span class="math inline">\(\lvert \int_a^b g dx\rvert \leq \int_a^b \lvert g \rvert dx\)</span> we have:</p>
|
||
<p><span class="math display">\[
|
||
\lvert \text{error}_i \rvert \leq K \int_0^h \lvert (\frac{(t-h/2)^2}{2} - \frac{h^2}{8}) \rvert dt.
|
||
\]</span></p>
|
||
<p>But what is the function in the integrand? Clearly it is a quadratic in <span class="math inline">\(t\)</span>. Expanding gives <span class="math inline">\(1/2 \cdot (t^2 - ht)\)</span>. This is negative over <span class="math inline">\([0,h]\)</span> (and <span class="math inline">\(0\)</span> at these endpoints, so the integral above is just:</p>
|
||
<p><span class="math display">\[
|
||
\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}
|
||
\]</span></p>
|
||
<p>This gives the bound: <span class="math inline">\(\vert \text{error}_i \rvert \leq K h^3/12\)</span>. The <em>total</em> error may be less, but is not more than the value found by adding up the error over each of the <span class="math inline">\(n\)</span> intervals. As our bound does not depend on the <span class="math inline">\(i\)</span>, we have this sum satisfies:</p>
|
||
<p><span class="math display">\[
|
||
\lvert \text{error}\rvert \leq n \cdot \frac{Kh^3}{12} = \frac{K(b-a)^3}{12}\frac{1}{n^2}.
|
||
\]</span></p>
|
||
<p>So the error is like <span class="math inline">\(1/n^2\)</span>, in contrast to the <span class="math inline">\(1/n\)</span> 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 <span class="math inline">\(\sqrt{2}\)</span> as many, and for Simpson’s rule, only <span class="math inline">\(2^{1/4}\)</span> as many.</p>
|
||
</section>
|
||
</section>
|
||
<section id="area-related-to-parameterized-curves" class="level2" data-number="39.1">
|
||
<h2 data-number="39.1" class="anchored" data-anchor-id="area-related-to-parameterized-curves"><span class="header-section-number">39.1</span> Area related to parameterized curves</h2>
|
||
<p>The figure introduced to motivate the integration by parts formula also suggests that areas described parametrically (by a pair of functions <span class="math inline">\(x=u(t), y=v(t)\)</span> for <span class="math inline">\(a \le t \le b\)</span>) can have their area computed.</p>
|
||
<p>When <span class="math inline">\(u(t)\)</span> is strictly <em>increasing</em>, and hence having an inverse function, then re-parameterizing by <span class="math inline">\(\phi(t) = u^{-1}(t)\)</span> gives a <span class="math inline">\(x=u(u^{-1}(t))=t, y=v(u^{-1}(t))\)</span> and integrating this gives the area by <span class="math inline">\(A=\int_a^b v(t) u'(t) dt\)</span></p>
|
||
<p>However, the correct answer requires understanding a minus sign. Consider the area enclosed by <span class="math inline">\(x(t) = \cos(t), y(t) = \sin(t)\)</span>:</p>
|
||
<div class="cell" data-execution_count="7">
|
||
<div class="cell-output cell-output-display" data-execution_count="8">
|
||
<p><img src="integration_by_parts_files/figure-html/cell-8-output-1.svg" class="img-fluid"></p>
|
||
</div>
|
||
</div>
|
||
<p>We added a rectangle for a Riemann sum for <span class="math inline">\(t_i = \pi/3\)</span> and <span class="math inline">\(t_{i+1} = \pi/3 + \pi/8\)</span>. The height of this rectangle if <span class="math inline">\(y(t_i)\)</span>, the base is of length <span class="math inline">\(x(t_i) - x(t_{i+1})\)</span> <em>given</em> the orientation of how the circular curve is parameterized (counter clockwise here).</p>
|
||
<p>Taking this Riemann sum approach, we can approximate the area under the curve parameterized by <span class="math inline">\((u(t), v(t))\)</span> over the time range <span class="math inline">\([t_i, t_{i+1}]\)</span> as a rectangle with height <span class="math inline">\(y(t_i)\)</span> and base <span class="math inline">\(x(t_{i}) - x(t_{i+1})\)</span>. Then we get, as expected:</p>
|
||
<p><span class="math display">\[
|
||
\begin{align*}
|
||
A &\approx \sum_i y(t_i) \cdot (x(t_{i}) - x(t_{i+1}))\\
|
||
&= - \sum_i y(t_i) \cdot (x(t_{i+1}) - x(t_{i}))\\
|
||
&= - \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)\\
|
||
&\approx -\int_a^b y(t) x'(t) dt.
|
||
\end{align*}
|
||
\]</span></p>
|
||
<p>So with a counterclockwise rotation, the actual answer for the area includes a minus sign. If the area is traced out in a <em>clockwise</em> manner, there is no minus sign.</p>
|
||
<p>This is a case of <a href="https://en.wikipedia.org/wiki/Green%27s_theorem#Area_calculation">Green’s Theorem</a> to be taken up in <a href="file:///Users/verzani/julia/CalculusWithJulia/html/integral_vector_calculus/stokes_theorem.html">Green’s Theorem, Stokes’ Theorem, and the Divergence Theorem</a>.</p>
|
||
<section id="example-6" class="level5">
|
||
<h5 class="anchored" data-anchor-id="example-6">Example</h5>
|
||
<p>Apply the formula to a parameterized circle to ensure, the signed area is properly computed. If we use <span class="math inline">\(x(t) = r\cos(t)\)</span> and <span class="math inline">\(y(t) = r\sin(t)\)</span> then we have the motion is counterclockwise:</p>
|
||
<div class="cell" data-hold="true" data-execution_count="8">
|
||
<div class="sourceCode cell-code" id="cb4"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="pp">@syms</span> 𝒓 t</span>
|
||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a>𝒙 <span class="op">=</span> 𝒓 <span class="op">*</span> <span class="fu">cos</span>(t)</span>
|
||
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a>𝒚 <span class="op">=</span> 𝒓 <span class="op">*</span> <span class="fu">sin</span>(t)</span>
|
||
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a><span class="fu">-integrate</span>(𝒚 <span class="op">*</span> <span class="fu">diff</span>(𝒙, t), (t, <span class="fl">0</span>, <span class="fl">2</span>PI))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||
<div class="cell-output cell-output-display" data-execution_count="9">
|
||
<span class="math-left-align" style="padding-left: 4px; width:0; float:left;">
|
||
\[
|
||
\pi 𝒓^{2}
|
||
\]
|
||
</span>
|
||
</div>
|
||
</div>
|
||
<p>We see the expected answer for the area of a circle.</p>
|
||
</section>
|
||
<section id="example-7" class="level5">
|
||
<h5 class="anchored" data-anchor-id="example-7">Example</h5>
|
||
<p>Apply the formula to find the area under one arch of a cycloid, parameterized by <span class="math inline">\(x(t) = t - \sin(t), y(t) = 1 - \cos(t)\)</span>.</p>
|
||
<p>Working symbolically, we have one arch given by the following described in a <em>clockwise</em> manner, so we use <span class="math inline">\(\int y(t) x'(t) dt\)</span>:</p>
|
||
<div class="cell" data-hold="true" data-execution_count="9">
|
||
<div class="sourceCode cell-code" id="cb5"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="pp">@syms</span> t</span>
|
||
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a>𝒙 <span class="op">=</span> t <span class="op">-</span> <span class="fu">sin</span>(t)</span>
|
||
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a>𝒚 <span class="op">=</span> <span class="fl">1</span> <span class="op">-</span> <span class="fu">cos</span>(t)</span>
|
||
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="fu">integrate</span>(𝒚 <span class="op">*</span> <span class="fu">diff</span>(𝒙, t), (t, <span class="fl">0</span>, <span class="fl">2</span>PI))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||
<div class="cell-output cell-output-display" data-execution_count="10">
|
||
<span class="math-left-align" style="padding-left: 4px; width:0; float:left;">
|
||
\[
|
||
3 \pi
|
||
\]
|
||
</span>
|
||
</div>
|
||
</div>
|
||
<p>(<a href="https://mathshistory.st-andrews.ac.uk/Curves/Cycloid/">Galileo</a> was thwarted in finding this answer exactly and resorted to constructing one from metal to <em>estimate</em> the value.)</p>
|
||
</section>
|
||
<section id="example-8" class="level5">
|
||
<h5 class="anchored" data-anchor-id="example-8">Example</h5>
|
||
<p>Consider the example <span class="math inline">\(x(t) = \cos(t) + t\sin(t), y(t) = \sin(t) - t\cos(t)\)</span> for <span class="math inline">\(0 \leq t \leq 2\pi\)</span>.</p>
|
||
<div class="cell" data-execution_count="10">
|
||
<div class="cell-output cell-output-display" data-execution_count="11">
|
||
<p><img src="integration_by_parts_files/figure-html/cell-11-output-1.svg" class="img-fluid"></p>
|
||
</div>
|
||
</div>
|
||
<p>How much area is enclosed by this curve and the <span class="math inline">\(x\)</span> axis? The area is described in a counterclockwise manner, so we have:</p>
|
||
<div class="cell" data-hold="true" data-execution_count="11">
|
||
<div class="sourceCode cell-code" id="cb6"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="kw">let</span></span>
|
||
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">x</span>(t) <span class="op">=</span> <span class="fu">cos</span>(t) <span class="op">+</span> <span class="fu">t*sin</span>(t)</span>
|
||
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">y</span>(t) <span class="op">=</span> <span class="fu">sin</span>(t) <span class="op">-</span> <span class="fu">t*cos</span>(t)</span>
|
||
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">yx′</span>(t) <span class="op">=</span> <span class="fu">-y</span>(t) <span class="op">*</span> x<span class="op">'</span>(t) <span class="co"># yx\prime[tab]</span></span>
|
||
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">quadgk</span>(yx′, <span class="fl">0</span>, <span class="fl">2</span>pi)</span>
|
||
<span id="cb6-6"><a href="#cb6-6" aria-hidden="true" tabindex="-1"></a><span class="kw">end</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
|
||
<div class="cell-output cell-output-display" data-execution_count="12">
|
||
<pre><code>(44.483294893989545, 6.295185999150021e-7)</code></pre>
|
||
</div>
|
||
</div>
|
||
<p>This particular problem could also have been done symbolically, but many curves will need to have a numeric approximation used.</p>
|
||
</section>
|
||
</section>
|
||
<section id="questions" class="level2" data-number="39.2">
|
||
<h2 data-number="39.2" class="anchored" data-anchor-id="questions"><span class="header-section-number">39.2</span> Questions</h2>
|
||
<section id="question" class="level6">
|
||
<h6 class="anchored" data-anchor-id="question">Question</h6>
|
||
<p>In the integral of <span class="math inline">\(\int \log(x) dx\)</span> we let <span class="math inline">\(u=\log(x)\)</span> and <span class="math inline">\(dv=dx\)</span>. What are <span class="math inline">\(du\)</span> and <span class="math inline">\(v\)</span>?</p>
|
||
<div class="cell" data-hold="true" data-execution_count="12">
|
||
<div class="cell-output cell-output-display" data-execution_count="13">
|
||
<form class="mx-2 my-3 mw-100" name="WeaveQuestion" data-id="2830703232755395087" data-controltype="">
|
||
<div class="form-group ">
|
||
<div class="controls">
|
||
<div class="form" id="controls_2830703232755395087">
|
||
<div style="padding-top: 5px">
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_2830703232755395087_1">
|
||
<input class="form-check-input" type="radio" name="radio_2830703232755395087" id="radio_2830703232755395087_1" value="1">
|
||
|
||
<span class="label-body px-1">
|
||
\(du=1/x dx\quad v = x^2/2\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_2830703232755395087_2">
|
||
<input class="form-check-input" type="radio" name="radio_2830703232755395087" id="radio_2830703232755395087_2" value="2">
|
||
|
||
<span class="label-body px-1">
|
||
\(du=1/x dx \quad v = x\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_2830703232755395087_3">
|
||
<input class="form-check-input" type="radio" name="radio_2830703232755395087" id="radio_2830703232755395087_3" value="3">
|
||
|
||
<span class="label-body px-1">
|
||
\(du=x\log(x) dx\quad v = 1\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div id="2830703232755395087_message" style="padding-bottom: 15px"></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
<script text="text/javascript">
|
||
document.querySelectorAll('input[name="radio_2830703232755395087"]').forEach(function(rb) {
|
||
rb.addEventListener("change", function() {
|
||
var correct = rb.value == 2;
|
||
var msgBox = document.getElementById('2830703232755395087_message');
|
||
if(correct) {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>";
|
||
var explanation = document.getElementById("explanation_2830703232755395087")
|
||
if (explanation != null) {
|
||
explanation.style.display = "none";
|
||
}
|
||
} else {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>";
|
||
var explanation = document.getElementById("explanation_2830703232755395087")
|
||
if (explanation != null) {
|
||
explanation.style.display = "block";
|
||
}
|
||
}
|
||
|
||
})});
|
||
|
||
</script>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section id="question-1" class="level6">
|
||
<h6 class="anchored" data-anchor-id="question-1">Question</h6>
|
||
<p>In the integral <span class="math inline">\(\int \sec(x)^3 dx\)</span> we let <span class="math inline">\(u=\sec(x)\)</span> and <span class="math inline">\(dv = \sec(x)^2 dx\)</span>. What are <span class="math inline">\(du\)</span> and <span class="math inline">\(v\)</span>?</p>
|
||
<div class="cell" data-hold="true" data-execution_count="13">
|
||
<div class="cell-output cell-output-display" data-execution_count="14">
|
||
<form class="mx-2 my-3 mw-100" name="WeaveQuestion" data-id="3690033798579501565" data-controltype="">
|
||
<div class="form-group ">
|
||
<div class="controls">
|
||
<div class="form" id="controls_3690033798579501565">
|
||
<div style="padding-top: 5px">
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_3690033798579501565_1">
|
||
<input class="form-check-input" type="radio" name="radio_3690033798579501565" id="radio_3690033798579501565_1" value="1">
|
||
|
||
<span class="label-body px-1">
|
||
\(du=\sec(x)\tan(x)dx \quad v=\tan(x)\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_3690033798579501565_2">
|
||
<input class="form-check-input" type="radio" name="radio_3690033798579501565" id="radio_3690033798579501565_2" value="2">
|
||
|
||
<span class="label-body px-1">
|
||
\(du=\tan(x) dx \quad v=\sec(x)\tan(x)\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_3690033798579501565_3">
|
||
<input class="form-check-input" type="radio" name="radio_3690033798579501565" id="radio_3690033798579501565_3" value="3">
|
||
|
||
<span class="label-body px-1">
|
||
\(du=\csc(x) dx \quad v=\sec(x)^3 / 3\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div id="3690033798579501565_message" style="padding-bottom: 15px"></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
<script text="text/javascript">
|
||
document.querySelectorAll('input[name="radio_3690033798579501565"]').forEach(function(rb) {
|
||
rb.addEventListener("change", function() {
|
||
var correct = rb.value == 1;
|
||
var msgBox = document.getElementById('3690033798579501565_message');
|
||
if(correct) {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>";
|
||
var explanation = document.getElementById("explanation_3690033798579501565")
|
||
if (explanation != null) {
|
||
explanation.style.display = "none";
|
||
}
|
||
} else {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>";
|
||
var explanation = document.getElementById("explanation_3690033798579501565")
|
||
if (explanation != null) {
|
||
explanation.style.display = "block";
|
||
}
|
||
}
|
||
|
||
})});
|
||
|
||
</script>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section id="question-2" class="level6">
|
||
<h6 class="anchored" data-anchor-id="question-2">Question</h6>
|
||
<p>In the integral <span class="math inline">\(\int e^{-x} \cos(x)dx\)</span> we let <span class="math inline">\(u=e^{-x}\)</span> and <span class="math inline">\(dv=\cos(x) dx\)</span>. What are <span class="math inline">\(du\)</span> and <span class="math inline">\(v\)</span>?</p>
|
||
<div class="cell" data-hold="true" data-execution_count="14">
|
||
<div class="cell-output cell-output-display" data-execution_count="15">
|
||
<form class="mx-2 my-3 mw-100" name="WeaveQuestion" data-id="3760910529235295001" data-controltype="">
|
||
<div class="form-group ">
|
||
<div class="controls">
|
||
<div class="form" id="controls_3760910529235295001">
|
||
<div style="padding-top: 5px">
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_3760910529235295001_1">
|
||
<input class="form-check-input" type="radio" name="radio_3760910529235295001" id="radio_3760910529235295001_1" value="1">
|
||
|
||
<span class="label-body px-1">
|
||
\(du=-e^{-x} dx \quad v=\sin(x)\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_3760910529235295001_2">
|
||
<input class="form-check-input" type="radio" name="radio_3760910529235295001" id="radio_3760910529235295001_2" value="2">
|
||
|
||
<span class="label-body px-1">
|
||
\(du=-e^{-x} dx \quad v=-\sin(x)\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_3760910529235295001_3">
|
||
<input class="form-check-input" type="radio" name="radio_3760910529235295001" id="radio_3760910529235295001_3" value="3">
|
||
|
||
<span class="label-body px-1">
|
||
\(du=\sin(x)dx \quad v=-e^{-x}\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div id="3760910529235295001_message" style="padding-bottom: 15px"></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
<script text="text/javascript">
|
||
document.querySelectorAll('input[name="radio_3760910529235295001"]').forEach(function(rb) {
|
||
rb.addEventListener("change", function() {
|
||
var correct = rb.value == 1;
|
||
var msgBox = document.getElementById('3760910529235295001_message');
|
||
if(correct) {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>";
|
||
var explanation = document.getElementById("explanation_3760910529235295001")
|
||
if (explanation != null) {
|
||
explanation.style.display = "none";
|
||
}
|
||
} else {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>";
|
||
var explanation = document.getElementById("explanation_3760910529235295001")
|
||
if (explanation != null) {
|
||
explanation.style.display = "block";
|
||
}
|
||
}
|
||
|
||
})});
|
||
|
||
</script>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section id="question-3" class="level6">
|
||
<h6 class="anchored" data-anchor-id="question-3">Question</h6>
|
||
<p>Find the value of <span class="math inline">\(\int_1^4 x \log(x) dx\)</span>. You can integrate by parts.</p>
|
||
<div class="cell" data-hold="true" data-execution_count="15">
|
||
<div class="cell-output cell-output-display" data-execution_count="16">
|
||
<form class="mx-2 my-3 mw-100" name="WeaveQuestion" data-id="13269723266989927198" data-controltype="">
|
||
<div class="form-group ">
|
||
<div class="controls">
|
||
<div class="form" id="controls_13269723266989927198">
|
||
<div style="padding-top: 5px">
|
||
<br>
|
||
<div class="input-group">
|
||
<input id="13269723266989927198" type="number" class="form-control" placeholder="Numeric answer">
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div id="13269723266989927198_message" style="padding-bottom: 15px"></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
<script text="text/javascript">
|
||
document.getElementById("13269723266989927198").addEventListener("change", function() {
|
||
var correct = (Math.abs(this.value - 7.340354888959126) <= 0.001);
|
||
var msgBox = document.getElementById('13269723266989927198_message');
|
||
if(correct) {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>";
|
||
var explanation = document.getElementById("explanation_13269723266989927198")
|
||
if (explanation != null) {
|
||
explanation.style.display = "none";
|
||
}
|
||
} else {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>";
|
||
var explanation = document.getElementById("explanation_13269723266989927198")
|
||
if (explanation != null) {
|
||
explanation.style.display = "block";
|
||
}
|
||
}
|
||
|
||
});
|
||
|
||
</script>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section id="question-4" class="level6">
|
||
<h6 class="anchored" data-anchor-id="question-4">Question</h6>
|
||
<p>Find the value of <span class="math inline">\(\int_0^{\pi/2} x\cos(2x) dx\)</span>. You can integrate by parts.</p>
|
||
<div class="cell" data-hold="true" data-execution_count="16">
|
||
<div class="cell-output cell-output-display" data-execution_count="17">
|
||
<form class="mx-2 my-3 mw-100" name="WeaveQuestion" data-id="7325363357462372775" data-controltype="">
|
||
<div class="form-group ">
|
||
<div class="controls">
|
||
<div class="form" id="controls_7325363357462372775">
|
||
<div style="padding-top: 5px">
|
||
<br>
|
||
<div class="input-group">
|
||
<input id="7325363357462372775" type="number" class="form-control" placeholder="Numeric answer">
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div id="7325363357462372775_message" style="padding-bottom: 15px"></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
<script text="text/javascript">
|
||
document.getElementById("7325363357462372775").addEventListener("change", function() {
|
||
var correct = (Math.abs(this.value - -0.49999999999999983) <= 0.001);
|
||
var msgBox = document.getElementById('7325363357462372775_message');
|
||
if(correct) {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>";
|
||
var explanation = document.getElementById("explanation_7325363357462372775")
|
||
if (explanation != null) {
|
||
explanation.style.display = "none";
|
||
}
|
||
} else {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>";
|
||
var explanation = document.getElementById("explanation_7325363357462372775")
|
||
if (explanation != null) {
|
||
explanation.style.display = "block";
|
||
}
|
||
}
|
||
|
||
});
|
||
|
||
</script>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section id="question-5" class="level6">
|
||
<h6 class="anchored" data-anchor-id="question-5">Question</h6>
|
||
<p>Find the value of <span class="math inline">\(\int_1^e (\log(x))^2 dx\)</span>. You can integrate by parts.</p>
|
||
<div class="cell" data-hold="true" data-execution_count="17">
|
||
<div class="cell-output cell-output-display" data-execution_count="18">
|
||
<form class="mx-2 my-3 mw-100" name="WeaveQuestion" data-id="12712845985103229906" data-controltype="">
|
||
<div class="form-group ">
|
||
<div class="controls">
|
||
<div class="form" id="controls_12712845985103229906">
|
||
<div style="padding-top: 5px">
|
||
<br>
|
||
<div class="input-group">
|
||
<input id="12712845985103229906" type="number" class="form-control" placeholder="Numeric answer">
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div id="12712845985103229906_message" style="padding-bottom: 15px"></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
<script text="text/javascript">
|
||
document.getElementById("12712845985103229906").addEventListener("change", function() {
|
||
var correct = (Math.abs(this.value - 0.7182818284590451) <= 0.001);
|
||
var msgBox = document.getElementById('12712845985103229906_message');
|
||
if(correct) {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>";
|
||
var explanation = document.getElementById("explanation_12712845985103229906")
|
||
if (explanation != null) {
|
||
explanation.style.display = "none";
|
||
}
|
||
} else {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>";
|
||
var explanation = document.getElementById("explanation_12712845985103229906")
|
||
if (explanation != null) {
|
||
explanation.style.display = "block";
|
||
}
|
||
}
|
||
|
||
});
|
||
|
||
</script>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section id="question-6" class="level6">
|
||
<h6 class="anchored" data-anchor-id="question-6">Question</h6>
|
||
<p>Integration 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 <span class="math inline">\(\int (\log(x))^n dx\)</span>?</p>
|
||
<div class="cell" data-hold="true" data-execution_count="18">
|
||
<div class="cell-output cell-output-display" data-execution_count="19">
|
||
<form class="mx-2 my-3 mw-100" name="WeaveQuestion" data-id="5713475351273861724" data-controltype="">
|
||
<div class="form-group ">
|
||
<div class="controls">
|
||
<div class="form" id="controls_5713475351273861724">
|
||
<div style="padding-top: 5px">
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_5713475351273861724_1">
|
||
<input class="form-check-input" type="radio" name="radio_5713475351273861724" id="radio_5713475351273861724_1" value="1">
|
||
|
||
<span class="label-body px-1">
|
||
\(x(\log(x))^n - \int (\log(x))^{n-1} dx\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_5713475351273861724_2">
|
||
<input class="form-check-input" type="radio" name="radio_5713475351273861724" id="radio_5713475351273861724_2" value="2">
|
||
|
||
<span class="label-body px-1">
|
||
\(\int (\log(x))^{n+1}/(n+1) dx\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_5713475351273861724_3">
|
||
<input class="form-check-input" type="radio" name="radio_5713475351273861724" id="radio_5713475351273861724_3" value="3">
|
||
|
||
<span class="label-body px-1">
|
||
\(x(\log(x))^n - n \int (\log(x))^{n-1} dx\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div id="5713475351273861724_message" style="padding-bottom: 15px"></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
<script text="text/javascript">
|
||
document.querySelectorAll('input[name="radio_5713475351273861724"]').forEach(function(rb) {
|
||
rb.addEventListener("change", function() {
|
||
var correct = rb.value == 3;
|
||
var msgBox = document.getElementById('5713475351273861724_message');
|
||
if(correct) {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>";
|
||
var explanation = document.getElementById("explanation_5713475351273861724")
|
||
if (explanation != null) {
|
||
explanation.style.display = "none";
|
||
}
|
||
} else {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>";
|
||
var explanation = document.getElementById("explanation_5713475351273861724")
|
||
if (explanation != null) {
|
||
explanation.style.display = "block";
|
||
}
|
||
}
|
||
|
||
})});
|
||
|
||
</script>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section id="question-7" class="level6">
|
||
<h6 class="anchored" data-anchor-id="question-7">Question</h6>
|
||
<p>The <a href="http://en.wikipedia.org/wiki/Integration_by_parts">Wikipedia</a> page has a rule of thumb with an acronym LIATE to indicate what is a good candidate to be “<span class="math inline">\(u\)</span>”: <strong>L</strong>og function, <strong>I</strong>nverse functions, <strong>A</strong>lgebraic functions (<span class="math inline">\(x^n\)</span>), <strong>T</strong>rigonmetric functions, and <strong>E</strong>xponential functions.</p>
|
||
<p>Consider the integral <span class="math inline">\(\int x \cos(x) dx\)</span>. Which letter should be tried first?</p>
|
||
<div class="cell" data-hold="true" data-execution_count="19">
|
||
<div class="cell-output cell-output-display" data-execution_count="20">
|
||
<form class="mx-2 my-3 mw-100" name="WeaveQuestion" data-id="12232746975633099144" data-controltype="">
|
||
<div class="form-group ">
|
||
<div class="controls">
|
||
<div class="form" id="controls_12232746975633099144">
|
||
<div style="padding-top: 5px">
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_12232746975633099144_1">
|
||
<input class="form-check-input" type="radio" name="radio_12232746975633099144" id="radio_12232746975633099144_1" value="1">
|
||
|
||
<span class="label-body px-1">
|
||
L
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_12232746975633099144_2">
|
||
<input class="form-check-input" type="radio" name="radio_12232746975633099144" id="radio_12232746975633099144_2" value="2">
|
||
|
||
<span class="label-body px-1">
|
||
I
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_12232746975633099144_3">
|
||
<input class="form-check-input" type="radio" name="radio_12232746975633099144" id="radio_12232746975633099144_3" value="3">
|
||
|
||
<span class="label-body px-1">
|
||
A
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_12232746975633099144_4">
|
||
<input class="form-check-input" type="radio" name="radio_12232746975633099144" id="radio_12232746975633099144_4" value="4">
|
||
|
||
<span class="label-body px-1">
|
||
T
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_12232746975633099144_5">
|
||
<input class="form-check-input" type="radio" name="radio_12232746975633099144" id="radio_12232746975633099144_5" value="5">
|
||
|
||
<span class="label-body px-1">
|
||
E
|
||
</span>
|
||
</label>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div id="12232746975633099144_message" style="padding-bottom: 15px"></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
<script text="text/javascript">
|
||
document.querySelectorAll('input[name="radio_12232746975633099144"]').forEach(function(rb) {
|
||
rb.addEventListener("change", function() {
|
||
var correct = rb.value == 3;
|
||
var msgBox = document.getElementById('12232746975633099144_message');
|
||
if(correct) {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>";
|
||
var explanation = document.getElementById("explanation_12232746975633099144")
|
||
if (explanation != null) {
|
||
explanation.style.display = "none";
|
||
}
|
||
} else {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>";
|
||
var explanation = document.getElementById("explanation_12232746975633099144")
|
||
if (explanation != null) {
|
||
explanation.style.display = "block";
|
||
}
|
||
}
|
||
|
||
})});
|
||
|
||
</script>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<p>Consider the integral <span class="math inline">\(\int x^2\log(x) dx\)</span>. Which letter should be tried first?</p>
|
||
<div class="cell" data-hold="true" data-execution_count="20">
|
||
<div class="cell-output cell-output-display" data-execution_count="21">
|
||
<form class="mx-2 my-3 mw-100" name="WeaveQuestion" data-id="6599882867490170525" data-controltype="">
|
||
<div class="form-group ">
|
||
<div class="controls">
|
||
<div class="form" id="controls_6599882867490170525">
|
||
<div style="padding-top: 5px">
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_6599882867490170525_1">
|
||
<input class="form-check-input" type="radio" name="radio_6599882867490170525" id="radio_6599882867490170525_1" value="1">
|
||
|
||
<span class="label-body px-1">
|
||
L
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_6599882867490170525_2">
|
||
<input class="form-check-input" type="radio" name="radio_6599882867490170525" id="radio_6599882867490170525_2" value="2">
|
||
|
||
<span class="label-body px-1">
|
||
I
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_6599882867490170525_3">
|
||
<input class="form-check-input" type="radio" name="radio_6599882867490170525" id="radio_6599882867490170525_3" value="3">
|
||
|
||
<span class="label-body px-1">
|
||
A
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_6599882867490170525_4">
|
||
<input class="form-check-input" type="radio" name="radio_6599882867490170525" id="radio_6599882867490170525_4" value="4">
|
||
|
||
<span class="label-body px-1">
|
||
T
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_6599882867490170525_5">
|
||
<input class="form-check-input" type="radio" name="radio_6599882867490170525" id="radio_6599882867490170525_5" value="5">
|
||
|
||
<span class="label-body px-1">
|
||
E
|
||
</span>
|
||
</label>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div id="6599882867490170525_message" style="padding-bottom: 15px"></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
<script text="text/javascript">
|
||
document.querySelectorAll('input[name="radio_6599882867490170525"]').forEach(function(rb) {
|
||
rb.addEventListener("change", function() {
|
||
var correct = rb.value == 1;
|
||
var msgBox = document.getElementById('6599882867490170525_message');
|
||
if(correct) {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>";
|
||
var explanation = document.getElementById("explanation_6599882867490170525")
|
||
if (explanation != null) {
|
||
explanation.style.display = "none";
|
||
}
|
||
} else {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>";
|
||
var explanation = document.getElementById("explanation_6599882867490170525")
|
||
if (explanation != null) {
|
||
explanation.style.display = "block";
|
||
}
|
||
}
|
||
|
||
})});
|
||
|
||
</script>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<p>Consider the integral <span class="math inline">\(\int x^2 \sin^{-1}(x) dx\)</span>. Which letter should be tried first?</p>
|
||
<div class="cell" data-hold="true" data-execution_count="21">
|
||
<div class="cell-output cell-output-display" data-execution_count="22">
|
||
<form class="mx-2 my-3 mw-100" name="WeaveQuestion" data-id="17615135848882515521" data-controltype="">
|
||
<div class="form-group ">
|
||
<div class="controls">
|
||
<div class="form" id="controls_17615135848882515521">
|
||
<div style="padding-top: 5px">
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_17615135848882515521_1">
|
||
<input class="form-check-input" type="radio" name="radio_17615135848882515521" id="radio_17615135848882515521_1" value="1">
|
||
|
||
<span class="label-body px-1">
|
||
L
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_17615135848882515521_2">
|
||
<input class="form-check-input" type="radio" name="radio_17615135848882515521" id="radio_17615135848882515521_2" value="2">
|
||
|
||
<span class="label-body px-1">
|
||
I
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_17615135848882515521_3">
|
||
<input class="form-check-input" type="radio" name="radio_17615135848882515521" id="radio_17615135848882515521_3" value="3">
|
||
|
||
<span class="label-body px-1">
|
||
A
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_17615135848882515521_4">
|
||
<input class="form-check-input" type="radio" name="radio_17615135848882515521" id="radio_17615135848882515521_4" value="4">
|
||
|
||
<span class="label-body px-1">
|
||
T
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_17615135848882515521_5">
|
||
<input class="form-check-input" type="radio" name="radio_17615135848882515521" id="radio_17615135848882515521_5" value="5">
|
||
|
||
<span class="label-body px-1">
|
||
E
|
||
</span>
|
||
</label>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div id="17615135848882515521_message" style="padding-bottom: 15px"></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
<script text="text/javascript">
|
||
document.querySelectorAll('input[name="radio_17615135848882515521"]').forEach(function(rb) {
|
||
rb.addEventListener("change", function() {
|
||
var correct = rb.value == 2;
|
||
var msgBox = document.getElementById('17615135848882515521_message');
|
||
if(correct) {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>";
|
||
var explanation = document.getElementById("explanation_17615135848882515521")
|
||
if (explanation != null) {
|
||
explanation.style.display = "none";
|
||
}
|
||
} else {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>";
|
||
var explanation = document.getElementById("explanation_17615135848882515521")
|
||
if (explanation != null) {
|
||
explanation.style.display = "block";
|
||
}
|
||
}
|
||
|
||
})});
|
||
|
||
</script>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<p>Consider the integral <span class="math inline">\(\int e^x \sin(x) dx\)</span>. Which letter should be tried first?</p>
|
||
<div class="cell" data-hold="true" data-execution_count="22">
|
||
<div class="cell-output cell-output-display" data-execution_count="23">
|
||
<form class="mx-2 my-3 mw-100" name="WeaveQuestion" data-id="12806129458511797748" data-controltype="">
|
||
<div class="form-group ">
|
||
<div class="controls">
|
||
<div class="form" id="controls_12806129458511797748">
|
||
<div style="padding-top: 5px">
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_12806129458511797748_1">
|
||
<input class="form-check-input" type="radio" name="radio_12806129458511797748" id="radio_12806129458511797748_1" value="1">
|
||
|
||
<span class="label-body px-1">
|
||
L
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_12806129458511797748_2">
|
||
<input class="form-check-input" type="radio" name="radio_12806129458511797748" id="radio_12806129458511797748_2" value="2">
|
||
|
||
<span class="label-body px-1">
|
||
I
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_12806129458511797748_3">
|
||
<input class="form-check-input" type="radio" name="radio_12806129458511797748" id="radio_12806129458511797748_3" value="3">
|
||
|
||
<span class="label-body px-1">
|
||
A
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_12806129458511797748_4">
|
||
<input class="form-check-input" type="radio" name="radio_12806129458511797748" id="radio_12806129458511797748_4" value="4">
|
||
|
||
<span class="label-body px-1">
|
||
T
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_12806129458511797748_5">
|
||
<input class="form-check-input" type="radio" name="radio_12806129458511797748" id="radio_12806129458511797748_5" value="5">
|
||
|
||
<span class="label-body px-1">
|
||
E
|
||
</span>
|
||
</label>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div id="12806129458511797748_message" style="padding-bottom: 15px"></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
<script text="text/javascript">
|
||
document.querySelectorAll('input[name="radio_12806129458511797748"]').forEach(function(rb) {
|
||
rb.addEventListener("change", function() {
|
||
var correct = rb.value == 4;
|
||
var msgBox = document.getElementById('12806129458511797748_message');
|
||
if(correct) {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>";
|
||
var explanation = document.getElementById("explanation_12806129458511797748")
|
||
if (explanation != null) {
|
||
explanation.style.display = "none";
|
||
}
|
||
} else {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>";
|
||
var explanation = document.getElementById("explanation_12806129458511797748")
|
||
if (explanation != null) {
|
||
explanation.style.display = "block";
|
||
}
|
||
}
|
||
|
||
})});
|
||
|
||
</script>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section id="question-8" class="level6">
|
||
<h6 class="anchored" data-anchor-id="question-8">Question</h6>
|
||
<p>Find an antiderivative for <span class="math inline">\(\cos^{-1}(x)\)</span> using the integration by parts formula.</p>
|
||
<div class="cell" data-hold="true" data-execution_count="23">
|
||
<div class="cell-output cell-output-display" data-execution_count="24">
|
||
<form class="mx-2 my-3 mw-100" name="WeaveQuestion" data-id="7885794677386813062" data-controltype="">
|
||
<div class="form-group ">
|
||
<div class="controls">
|
||
<div class="form" id="controls_7885794677386813062">
|
||
<div style="padding-top: 5px">
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_7885794677386813062_1">
|
||
<input class="form-check-input" type="radio" name="radio_7885794677386813062" id="radio_7885794677386813062_1" value="1">
|
||
|
||
<span class="label-body px-1">
|
||
\(-\sin^{-1}(x)\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_7885794677386813062_2">
|
||
<input class="form-check-input" type="radio" name="radio_7885794677386813062" id="radio_7885794677386813062_2" value="2">
|
||
|
||
<span class="label-body px-1">
|
||
\(x\cos^{-1}(x)-\sqrt{1 - x^2}\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_7885794677386813062_3">
|
||
<input class="form-check-input" type="radio" name="radio_7885794677386813062" id="radio_7885794677386813062_3" value="3">
|
||
|
||
<span class="label-body px-1">
|
||
\(x^2/2 \cos^{-1}(x) - x\sqrt{1-x^2}/4 - \cos^{-1}(x)/4\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div id="7885794677386813062_message" style="padding-bottom: 15px"></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
<script text="text/javascript">
|
||
document.querySelectorAll('input[name="radio_7885794677386813062"]').forEach(function(rb) {
|
||
rb.addEventListener("change", function() {
|
||
var correct = rb.value == 2;
|
||
var msgBox = document.getElementById('7885794677386813062_message');
|
||
if(correct) {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>";
|
||
var explanation = document.getElementById("explanation_7885794677386813062")
|
||
if (explanation != null) {
|
||
explanation.style.display = "none";
|
||
}
|
||
} else {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition alert alert-danger'><span>👎 Incorrect </span></div>";
|
||
var explanation = document.getElementById("explanation_7885794677386813062")
|
||
if (explanation != null) {
|
||
explanation.style.display = "block";
|
||
}
|
||
}
|
||
|
||
})});
|
||
|
||
</script>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</section>
|
||
</section>
|
||
|
||
</main> <!-- /main -->
|
||
<script id="quarto-html-after-body" type="application/javascript">
|
||
window.document.addEventListener("DOMContentLoaded", function (event) {
|
||
const toggleBodyColorMode = (bsSheetEl) => {
|
||
const mode = bsSheetEl.getAttribute("data-mode");
|
||
const bodyEl = window.document.querySelector("body");
|
||
if (mode === "dark") {
|
||
bodyEl.classList.add("quarto-dark");
|
||
bodyEl.classList.remove("quarto-light");
|
||
} else {
|
||
bodyEl.classList.add("quarto-light");
|
||
bodyEl.classList.remove("quarto-dark");
|
||
}
|
||
}
|
||
const toggleBodyColorPrimary = () => {
|
||
const bsSheetEl = window.document.querySelector("link#quarto-bootstrap");
|
||
if (bsSheetEl) {
|
||
toggleBodyColorMode(bsSheetEl);
|
||
}
|
||
}
|
||
toggleBodyColorPrimary();
|
||
const icon = "";
|
||
const anchorJS = new window.AnchorJS();
|
||
anchorJS.options = {
|
||
placement: 'right',
|
||
icon: icon
|
||
};
|
||
anchorJS.add('.anchored');
|
||
const clipboard = new window.ClipboardJS('.code-copy-button', {
|
||
target: function(trigger) {
|
||
return trigger.previousElementSibling;
|
||
}
|
||
});
|
||
clipboard.on('success', function(e) {
|
||
// button target
|
||
const button = e.trigger;
|
||
// don't keep focus
|
||
button.blur();
|
||
// flash "checked"
|
||
button.classList.add('code-copy-button-checked');
|
||
var currentTitle = button.getAttribute("title");
|
||
button.setAttribute("title", "Copied!");
|
||
setTimeout(function() {
|
||
button.setAttribute("title", currentTitle);
|
||
button.classList.remove('code-copy-button-checked');
|
||
}, 1000);
|
||
// clear code selection
|
||
e.clearSelection();
|
||
});
|
||
function tippyHover(el, contentFn) {
|
||
const config = {
|
||
allowHTML: true,
|
||
content: contentFn,
|
||
maxWidth: 500,
|
||
delay: 100,
|
||
arrow: false,
|
||
appendTo: function(el) {
|
||
return el.parentElement;
|
||
},
|
||
interactive: true,
|
||
interactiveBorder: 10,
|
||
theme: 'quarto',
|
||
placement: 'bottom-start'
|
||
};
|
||
window.tippy(el, config);
|
||
}
|
||
const noterefs = window.document.querySelectorAll('a[role="doc-noteref"]');
|
||
for (var i=0; i<noterefs.length; i++) {
|
||
const ref = noterefs[i];
|
||
tippyHover(ref, function() {
|
||
let href = ref.getAttribute('href');
|
||
try { href = new URL(href).hash; } catch {}
|
||
const id = href.replace(/^#\/?/, "");
|
||
const note = window.document.getElementById(id);
|
||
return note.innerHTML;
|
||
});
|
||
}
|
||
var bibliorefs = window.document.querySelectorAll('a[role="doc-biblioref"]');
|
||
for (var i=0; i<bibliorefs.length; i++) {
|
||
const ref = bibliorefs[i];
|
||
const cites = ref.parentNode.getAttribute('data-cites').split(' ');
|
||
tippyHover(ref, function() {
|
||
var popup = window.document.createElement('div');
|
||
cites.forEach(function(cite) {
|
||
var citeDiv = window.document.createElement('div');
|
||
citeDiv.classList.add('hanging-indent');
|
||
citeDiv.classList.add('csl-entry');
|
||
var biblioDiv = window.document.getElementById('ref-' + cite);
|
||
if (biblioDiv) {
|
||
citeDiv.innerHTML = biblioDiv.innerHTML;
|
||
}
|
||
popup.appendChild(citeDiv);
|
||
});
|
||
return popup.innerHTML;
|
||
});
|
||
}
|
||
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
|
||
var filterRegex = new RegExp('/' + window.location.host + '/');
|
||
var isInternal = (href) => {
|
||
return filterRegex.test(href) || localhostRegex.test(href);
|
||
}
|
||
// Inspect non-navigation links and adorn them if external
|
||
var links = window.document.querySelectorAll('a:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external)');
|
||
for (var i=0; i<links.length; i++) {
|
||
const link = links[i];
|
||
if (!isInternal(link.href)) {
|
||
// target, if specified
|
||
link.setAttribute("target", "_blank");
|
||
}
|
||
}
|
||
});
|
||
</script>
|
||
<nav class="page-navigation">
|
||
<div class="nav-page nav-page-previous">
|
||
<a href="../integrals/substitution.html" class="pagination-link">
|
||
<i class="bi bi-arrow-left-short"></i> <span class="nav-page-text"><span class="chapter-number">38</span> <span class="chapter-title">Substitution</span></span>
|
||
</a>
|
||
</div>
|
||
<div class="nav-page nav-page-next">
|
||
<a href="../integrals/partial_fractions.html" class="pagination-link">
|
||
<span class="nav-page-text"><span class="chapter-number">40</span> <span class="chapter-title">Partial Fractions</span></span> <i class="bi bi-arrow-right-short"></i>
|
||
</a>
|
||
</div>
|
||
</nav>
|
||
</div> <!-- /content -->
|
||
<footer class="footer">
|
||
<div class="nav-footer">
|
||
<div class="nav-footer-center">Copyright 2022, John Verzani</div>
|
||
</div>
|
||
</footer>
|
||
|
||
|
||
|
||
</body></html> |