2358 lines
122 KiB
HTML
2358 lines
122 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 - 38 Substitution</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/integration_by_parts.html" rel="next">
|
||
<link href="../integrals/ftc.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">38</span> <span class="chapter-title">Substitution</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 active"><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"><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="#integration-by-substitution" id="toc-integration-by-substitution" class="nav-link active" data-scroll-target="#integration-by-substitution"> <span class="header-section-number">38.0.1</span> Integration by substitution</a></li>
|
||
<li><a href="#sympy-and-substitution" id="toc-sympy-and-substitution" class="nav-link" data-scroll-target="#sympy-and-substitution"> <span class="header-section-number">38.1</span> SymPy and substitution</a>
|
||
<ul class="collapse">
|
||
<li><a href="#failures" id="toc-failures" class="nav-link" data-scroll-target="#failures"> <span class="header-section-number">38.1.1</span> Failures…</a></li>
|
||
</ul></li>
|
||
<li><a href="#trigonometric-substitution" id="toc-trigonometric-substitution" class="nav-link" data-scroll-target="#trigonometric-substitution"> <span class="header-section-number">38.2</span> Trigonometric substitution</a></li>
|
||
<li><a href="#questions" id="toc-questions" class="nav-link" data-scroll-target="#questions"> <span class="header-section-number">38.3</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/substitution.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">38</span> <span class="chapter-title">Substitution</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>The technique of <span class="math inline">\(u\)</span>-<a href="https://en.wikipedia.org/wiki/Integration_by_substitution">substitution</a> is derived from reversing the chain rule: <span class="math inline">\([f(g(x))]' = f'(g(x)) g'(x)\)</span>.</p>
|
||
<p>Suppose that <span class="math inline">\(g\)</span> is continuous and <span class="math inline">\(u(x)\)</span> is differentiable with <span class="math inline">\(u'(x)\)</span> being Riemann integrable. Then both these integrals are defined:</p>
|
||
<p><span class="math display">\[
|
||
\int_a^b g(u(t)) \cdot u'(t) dt, \quad \text{and}\quad \int_{u(a)}^{u(b)} g(x) dx.
|
||
\]</span></p>
|
||
<p>We wish to show they are equal.</p>
|
||
<p>Let <span class="math inline">\(G\)</span> be an antiderivative of <span class="math inline">\(g\)</span>, which exists as <span class="math inline">\(g\)</span> is assumed to be continuous. (By the Fundamental Theorem part I.) Consider the composition <span class="math inline">\(G \circ u\)</span>. The chain rule gives:</p>
|
||
<p><span class="math display">\[
|
||
[G \circ u]'(t) = G'(u(t)) \cdot u'(t) = g(u(t)) \cdot u'(t).
|
||
\]</span></p>
|
||
<p>So,</p>
|
||
<p><span class="math display">\[
|
||
\begin{align*}
|
||
\int_a^b g(u(t)) \cdot u'(t) dt &= \int_a^b (G \circ u)'(t) dt\\
|
||
&= (G\circ u)(b) - (G\circ u)(a) \quad\text{(the FTC, part II)}\\
|
||
&= G(u(b)) - G(u(a)) \\
|
||
&= \int_{u(a)}^{u(b)} g(x) dx. \quad\text{(the FTC part II)}
|
||
\end{align*}
|
||
\]</span></p>
|
||
<p>That is, this substitution formula applies:</p>
|
||
<blockquote class="blockquote">
|
||
<p><span class="math inline">\(\int_a^b g(u(x)) u'(x) dx = \int_{u(a)}^{u(b)} g(x) dx.\)</span></p>
|
||
</blockquote>
|
||
<p>Further, for indefinite integrals,</p>
|
||
<blockquote class="blockquote">
|
||
<p><span class="math inline">\(\int f(g(x)) g'(x) dx = \int f(u) du.\)</span></p>
|
||
</blockquote>
|
||
<p>We have seen a special case of substitution where <span class="math inline">\(u(x) = x-c\)</span> in the formula <span class="math inline">\(\int_{a-c}^{b-c} g(x) dx= \int_a^b g(x-c)dx\)</span>.</p>
|
||
<p>The main use of this is to take complicated things inside of the function <span class="math inline">\(g\)</span> out of the function (the <span class="math inline">\(u(x)\)</span>) by renaming them, then accounting for the change of name.</p>
|
||
<p>Some examples are in order.</p>
|
||
<p>Consider:</p>
|
||
<p><span class="math display">\[
|
||
\int_0^{\pi/2} \cos(x) e^{\sin(x)} dx.
|
||
\]</span></p>
|
||
<p>Clearly the <span class="math inline">\(\sin(x)\)</span> inside the exponential is an issue. If we let <span class="math inline">\(u(x) = \sin(x)\)</span>, then <span class="math inline">\(u'(x) = \cos(x)\)</span>, and this becomes</p>
|
||
<p><span class="math display">\[
|
||
\int_0^2 u\prime(x) e^{u(x)} dx =
|
||
\int_{u(0)}^{u(\pi/2)} e^x dx = e^x \big|_{\sin(0)}^{\sin(\pi/2)} = e^1 - e^0.
|
||
\]</span></p>
|
||
<p>This all worked, as the problem was such that it was more or less obvious what to choose for <span class="math inline">\(u\)</span> and <span class="math inline">\(G\)</span>.</p>
|
||
<section id="integration-by-substitution" class="level3" data-number="38.0.1">
|
||
<h3 data-number="38.0.1" class="anchored" data-anchor-id="integration-by-substitution"><span class="header-section-number">38.0.1</span> Integration by substitution</h3>
|
||
<p>The process of identifying the result of the chain rule in the function to integrate is not automatic, but rather a bit of an art. The basic step is to try some values and hope one works. Typically, this is taught by “substituting” in some value for part of the expression (basically the <span class="math inline">\(u(x)\)</span>) and seeing what happens.</p>
|
||
<p>In the above problem, <span class="math inline">\(\int_0^{\pi/2} \cos(x) e^{\sin(x)} dx\)</span>, we might just rename <span class="math inline">\(\sin(x)\)</span> to be <span class="math inline">\(u\)</span> (suppressing the “of <span class="math inline">\(x\)</span> part). Then we need to rewrite the”<span class="math inline">\(dx\)</span>” part of the integral. We know in this case that <span class="math inline">\(du/dx = \cos(x)\)</span>. In terms of differentials, this gives <span class="math inline">\(du = \cos(x) dx\)</span>. But this allows us to substitute in with <span class="math inline">\(u\)</span> and <span class="math inline">\(du\)</span> as is possible:</p>
|
||
<p><span class="math display">\[
|
||
\int_0^{\pi/2} \cos(x) e^{\sin(x)} dx = \int_0^{\pi/2} e^{\sin(x)} \cdot \cos(x) dx = \int_{u(0)}^{u(\pi)} e^u du.
|
||
\]</span></p>
|
||
<hr>
|
||
<p>Let’s illustrate with a new problem: <span class="math inline">\(\int_0^2 4x e^{x^2} dx\)</span>.</p>
|
||
<p>Again, we see that the <span class="math inline">\(x^2\)</span> inside the exponential is a complication. Letting <span class="math inline">\(u = x^2\)</span> we have <span class="math inline">\(du = 2x dx\)</span>. We have <span class="math inline">\(4xdx\)</span> in the original problem, so we will end up with <span class="math inline">\(2du\)</span>:</p>
|
||
<p><span class="math display">\[
|
||
\int_0^2 4x e^{x^2} dx = 2\int_0^2 e^{x^2} \cdot 2x dx = 2\int_{u(0)}^{u(2)} e^u du = 2 \int_0^4 e^u du =
|
||
2 e^u\big|_{u=0}^4 = 2(e^4 - 1).
|
||
\]</span></p>
|
||
<hr>
|
||
<p>Consider now <span class="math inline">\(\int_0^1 2x^2 \sqrt{1 + x^3} dx\)</span>. Here we see that the <span class="math inline">\(1 + x^3\)</span> makes the square root term complicated. If we call this <span class="math inline">\(u\)</span>, then what is <span class="math inline">\(du\)</span>? Clearly, <span class="math inline">\(du = 3x^2 dx\)</span>, or <span class="math inline">\((1/3)du = x^2 dx\)</span>, so we can rewrite this as:</p>
|
||
<p><span class="math display">\[
|
||
\int_0^1 2x^2 \sqrt{1 + x^3} dx = \int_{u(0)}^{u(1)} 2 \sqrt{u} (1/3) du = 2/3 \cdot \frac{u^{3/2}}{3/2} \big|_1^2 =
|
||
\frac{4}{9} \cdot(2^{3/2} - 1).
|
||
\]</span></p>
|
||
<hr>
|
||
<p>Consider <span class="math inline">\(\int_0^{\pi} \cos(x)^3 \sin(x) dx\)</span>. The <span class="math inline">\(\cos(x)\)</span> function inside the <span class="math inline">\(x^3\)</span> function is complicated. We let <span class="math inline">\(u(x) = \cos(x)\)</span> and see what that implies: <span class="math inline">\(du = \sin(x) dx\)</span>, which we see is part of the question. So the above becomes:</p>
|
||
<p><span class="math display">\[
|
||
\int_0^{\pi} \cos(x)^3 \sin(x) dx = \int_{u(0)}^{u(\pi)} u^3 du= \frac{u^4}{4}\big|_0^0 = 0.
|
||
\]</span></p>
|
||
<p>Changing limits leaves the two endpoints the same, which means the total area after substitution is <span class="math inline">\(0\)</span>. A graph of this function shows that about <span class="math inline">\(\pi/2\)</span> the function has odd-like symmetry, so the answer of <span class="math inline">\(0\)</span> is supported by the plot:</p>
|
||
<div class="cell" data-hold="true" data-execution_count="4">
|
||
<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="fu">f</span>(x) <span class="op">=</span> <span class="fu">cos</span>(x)<span class="op">^</span><span class="fl">3</span> <span class="op">*</span> <span class="fu">sin</span>(x)</span>
|
||
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="fu">plot</span>(f, <span class="fl">0</span>, <span class="fl">1</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="5">
|
||
<p><img src="substitution_files/figure-html/cell-5-output-1.svg" class="img-fluid"></p>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<p>Consider <span class="math inline">\(\int_1^e \log(x)/x dx\)</span>. There isn’t really an “inside” function here, but instead just a tricky <span class="math inline">\(\log(x)\)</span>. If we let <span class="math inline">\(u=\log(x)\)</span>, what happens? We get <span class="math inline">\(du = 1/x \cdot dx\)</span>, which we see present in the original. So with this, we have:</p>
|
||
<p><span class="math display">\[
|
||
\int_1^e \frac{\log(x)}{x} dx = \int_{u(1)}^{u(e)} u du = \frac{u^2}{2}\big|_0^1 = \frac{1}{2}.
|
||
\]</span></p>
|
||
<section id="example-transformations" class="level5">
|
||
<h5 class="anchored" data-anchor-id="example-transformations">Example: Transformations</h5>
|
||
<p>We say that the area intrinsically discussed in the definite integral <span class="math inline">\(A=\int_a^b f(x-c) dx\)</span> is unaffected by shifts, in that <span class="math inline">\(A = \int_{a-c}^{b-c} f(x) dx\)</span>. What about more general transformations? For example: if <span class="math inline">\(g(x) = (1/h) \cdot f((x-c)/h)\)</span> for values <span class="math inline">\(c\)</span> and <span class="math inline">\(h\)</span> what is the integral over <span class="math inline">\(a\)</span> to <span class="math inline">\(b\)</span> in terms of the function <span class="math inline">\(f(x)\)</span>?</p>
|
||
<p>If <span class="math inline">\(A = \int_a^b (1/h) \cdot f((x-c)/h) dx\)</span> then we let <span class="math inline">\(u = (x-c)/h\)</span>. With this, <span class="math inline">\(du = 1/h \cdot dx\)</span>. This allows a straight substitution:</p>
|
||
<p><span class="math display">\[
|
||
A = \int_a^b \frac{1}{h} f(\frac{x-c}{h}) dx = \int_{(a-c)/h}^{(b-c)/h} f(u) du.
|
||
\]</span></p>
|
||
<p>So the answer is: the area under the transformed function over <span class="math inline">\(a\)</span> to <span class="math inline">\(b\)</span> is the area of the function over the transformed region.</p>
|
||
<p>For example, consider the “hat” function $f(x) = 1 - x $ when <span class="math inline">\(-1 \leq x \leq 1\)</span> and <span class="math inline">\(0\)</span> otherwise. The area under <span class="math inline">\(f\)</span> is just <span class="math inline">\(1\)</span> - the graph forms a triangle with base of length <span class="math inline">\(2\)</span> and height <span class="math inline">\(1\)</span>. If we take any values of <span class="math inline">\(c\)</span> and <span class="math inline">\(h\)</span>, what do we find for the area under the curve of the transformed function?</p>
|
||
<p>Let <span class="math inline">\(u(x) = (x-c)/h\)</span> and <span class="math inline">\(g(x) = h f(u(x))\)</span>. Then, as <span class="math inline">\(du = 1/h dx\)</span></p>
|
||
<p><span class="math display">\[
|
||
\begin{align}
|
||
\int_{c-h}^{c+h} g(x) dx
|
||
&= \int_{c-h}^{c+h} h f(u(x)) dx\\
|
||
&= \int_{u(c-h)}^{u(c+h)} f(u) du\\
|
||
&= \int_{-1}^1 f(u) du\\
|
||
&= 1.
|
||
\end{align}
|
||
\]</span></p>
|
||
<p>So the area of this transformed function is still <span class="math inline">\(1\)</span>. The shifting by <span class="math inline">\(c\)</span> we know doesn’t effect the area, the scaling by <span class="math inline">\(h\)</span> inside of <span class="math inline">\(f\)</span> does, but is balanced out by the multiplication by <span class="math inline">\(h\)</span> outside of <span class="math inline">\(f\)</span>.</p>
|
||
</section>
|
||
<section id="example-speed-versus-velocity" class="level5">
|
||
<h5 class="anchored" data-anchor-id="example-speed-versus-velocity">Example: Speed versus velocity</h5>
|
||
<p>The “velocity” of an object includes a sense of direction in addition to the sense of magnitude. The “speed” just includes the sense of magnitude. Speed is always non-negative, whereas velocity is a signed quantity.</p>
|
||
<p>As mentioned previously, position is the integral of velocity, as expressed precisely through this equation:</p>
|
||
<p><span class="math display">\[
|
||
x(t) = \int_0^t v(u) du - x(0).
|
||
\]</span></p>
|
||
<p>What is the integral of speed?</p>
|
||
<p>If <span class="math inline">\(v(t)\)</span> is the velocity, the <span class="math inline">\(s(t) = \lvert v(t) \rvert\)</span> is the speed. If integrating either <span class="math inline">\(s(t)\)</span> or <span class="math inline">\(v(t)\)</span>, the integrals would agree when <span class="math inline">\(v(t) \geq 0\)</span>. However, when <span class="math inline">\(v(t) \leq 0\)</span>, the position back tracks so <span class="math inline">\(x(t)\)</span> decreases, where the integral of <span class="math inline">\(s(t)\)</span> would only increase.</p>
|
||
<p>This integral</p>
|
||
<p><span class="math display">\[
|
||
td(t) = \int_0^t s(u) du = \int_0^t \lvert v(u) \rvert du,
|
||
\]</span></p>
|
||
<p>Gives the <em>total distance</em> traveled.</p>
|
||
<p>To illustrate with a simple example, if a car drives East for one hour at 60 miles per hour, then heads back West for an hour at 60 miles per hour, the car’s position after one hour is <span class="math inline">\(x(2) = x(0)\)</span>, with a change in position <span class="math inline">\(x(2) - x(0) = 0\)</span>. Whereas, the total distance traveled is <span class="math inline">\(120\)</span> miles. (Gas is paid on total distance, not change in position!). What are the formulas for speed and velocity? Clearly <span class="math inline">\(s(t) = 60\)</span>, a constant, whereas here <span class="math inline">\(v(t) = 60\)</span> for <span class="math inline">\(0 \leq t \leq 1\)</span> and <span class="math inline">\(-60\)</span> for <span class="math inline">\(1 < t \leq 2\)</span>.</p>
|
||
<p>Suppose <span class="math inline">\(v(t)\)</span> is given by <span class="math inline">\(v(t) = (t-2)^3/3 - 4(t-2)/3\)</span>. If <span class="math inline">\(x(0)=0\)</span> Find the position after 3 time units and the total distance traveled.</p>
|
||
<p>We let <span class="math inline">\(u(t) = t - 2\)</span> so <span class="math inline">\(du=dt\)</span>. The position is given by</p>
|
||
<p><span class="math display">\[
|
||
\int_0^3 ((t-2)^3/3 - 4(t-2)/3) dt = \int_{u(0)}^{u(3)} (u^3/3 - 4/3 u) du =
|
||
(\frac{u^4}{12} - \frac{4}{3}\frac{u^2}{2}) \big|_{-2}^1 = \frac{3}{4}.
|
||
\]</span></p>
|
||
<p>The speed is similar, but we have to work harder:</p>
|
||
<p><span class="math display">\[
|
||
\int_0^3 \lvert v(t) \rvert dt = \int_0^3 \lvert ((t-2)^3/3 - 4(t-2)/3) \rvert dt =
|
||
\int_{-2}^1 \lvert u^3/3 - 4u/3 \rvert du.
|
||
\]</span></p>
|
||
<p>But <span class="math inline">\(u^3/3 - 4u/3 = (1/3) \cdot u(u-1)(u+2)\)</span>, so between <span class="math inline">\(-2\)</span> and <span class="math inline">\(0\)</span> it is positive and between <span class="math inline">\(0\)</span> and <span class="math inline">\(1\)</span> negative, so this integral is:</p>
|
||
<p><span class="math display">\[
|
||
\begin{align*}
|
||
\int_{-2}^0 (u^3/3 - 4u/3 ) du + \int_{0}^1 -(u^3/3 - 4u/3) du
|
||
&= (\frac{u^4}{12} - \frac{4}{3}\frac{u^2}{2}) \big|_{-2}^0 - (\frac{u^4}{12} - \frac{4}{3}\frac{u^2}{2}) \big|_{0}^1\\
|
||
&= \frac{4}{3} - -\frac{7}{12}\\
|
||
&= \frac{23}{12}.
|
||
\end{align*}
|
||
\]</span></p>
|
||
</section>
|
||
<section id="example" class="level5">
|
||
<h5 class="anchored" data-anchor-id="example">Example</h5>
|
||
<p>In probability, the normal distribution plays an outsized role. This distribution is characterized by a family of <em>density</em> functions:</p>
|
||
<p><span class="math display">\[
|
||
f(x; \mu, \sigma) = \frac{1}{\sqrt{2\pi}}\frac{1}{\sigma} \exp(-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^2).
|
||
\]</span></p>
|
||
<p>Integrals involving this function are typically transformed by substitution. For example:</p>
|
||
<p><span class="math display">\[
|
||
\begin{align*}
|
||
\int_a^b f(x; \mu, \sigma) dx
|
||
&= \int_a^b \frac{1}{\sqrt{2\pi}}\frac{1}{\sigma} \exp(-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^2) dx \\
|
||
&= \int_{u(a)}^{u(b)} \frac{1}{\sqrt{2\pi}} \exp(-\frac{1}{2}u^2) du \\
|
||
&= \int_{u(a)}^{u(b)} f(u; 0, 1) du,
|
||
\end{align*}
|
||
\]</span></p>
|
||
<p>where <span class="math inline">\(u = (x-\mu)/\sigma\)</span>, so <span class="math inline">\(du = (1/\sigma) dx\)</span>.</p>
|
||
<p>This shows that integrals involving a normal density with parameters <span class="math inline">\(\mu\)</span> and <span class="math inline">\(\sigma\)</span> can be computed using the <em>standard</em> normal density with <span class="math inline">\(\mu=0\)</span> and <span class="math inline">\(\sigma=1\)</span>. Unfortunately, there is no elementary antiderivative for <span class="math inline">\(\exp(-u^2/2)\)</span>, so integrals for the standard normal must be numerically approximated.</p>
|
||
<p>There is a function <code>erf</code> in the <code>SpecialFunctions</code> package (which is loaded by <code>CalculusWithJulia</code>) that computes:</p>
|
||
<p><span class="math display">\[
|
||
\int_0^x \frac{2}{\sqrt{\pi}} \exp(-t^2) dt
|
||
\]</span></p>
|
||
<p>A further change of variables by <span class="math inline">\(t = u/\sqrt{2}\)</span> (with <span class="math inline">\(\sqrt{2}dt = du\)</span>) gives:</p>
|
||
<p><span class="math display">\[
|
||
\begin{align*}
|
||
\int_a^b f(x; \mu, \sigma) dx &=
|
||
\int_{t(u(a))}^{t(u(b))} \frac{\sqrt{2}}{\sqrt{2\pi}} \exp(-t^2) dt\\
|
||
&= \frac{1}{2} \int_{t(u(a))}^{t(u(b))} \frac{2}{\sqrt{\pi}} \exp(-t^2) dt
|
||
\end{align*}
|
||
\]</span></p>
|
||
<p>Up to a factor of <span class="math inline">\(1/2\)</span> this is <code>erf</code>.</p>
|
||
<p>So we would have, for example, with <span class="math inline">\(\mu=1\)</span>,<span class="math inline">\(\sigma=2\)</span> and <span class="math inline">\(a=1\)</span> and <span class="math inline">\(b=3\)</span> that:</p>
|
||
<p><span class="math display">\[
|
||
\begin{align*}
|
||
t(u(a)) &= (1 - 1)/2/\sqrt{2} = 0\\
|
||
t(u(b)) &= (3 - 1)/2/\sqrt{2} = \frac{1}{\sqrt{2}}\\
|
||
\int_1^3 f(x; 1, 2)
|
||
&= \frac{1}{2} \int_0^{1/\sqrt{2}} \frac{2}{\sqrt{\pi}} \exp(-t^2) dt.
|
||
\end{align*}
|
||
\]</span></p>
|
||
<p>Or</p>
|
||
<div class="cell" data-execution_count="5">
|
||
<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="fl">1</span><span class="op">/</span><span class="fl">2</span> <span class="op">*</span> <span class="fu">erf</span>(<span class="fl">1</span><span class="op">/</span><span class="fu">sqrt</span>(<span class="fl">2</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">
|
||
<pre><code>0.3413447460685429</code></pre>
|
||
</div>
|
||
</div>
|
||
<div class="callout-note callout callout-style-default callout-captioned">
|
||
<div class="callout-header d-flex align-content-center">
|
||
<div class="callout-icon-container">
|
||
<i class="callout-icon"></i>
|
||
</div>
|
||
<div class="callout-caption-container flex-fill">
|
||
The <code>Distributions</code> package
|
||
</div>
|
||
</div>
|
||
<div class="callout-body-container callout-body">
|
||
<p>The above calculation is for illustration purposes. The add-on package <code>Distributions</code> makes much quicker work of such a task for the normal distribution and many other distributions from probability and statistics.</p>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</section>
|
||
<section id="sympy-and-substitution" class="level2" data-number="38.1">
|
||
<h2 data-number="38.1" class="anchored" data-anchor-id="sympy-and-substitution"><span class="header-section-number">38.1</span> SymPy and substitution</h2>
|
||
<p>The <code>integrate</code> function in <code>SymPy</code> can handle most problems which involve substitution. Here are a few examples:</p>
|
||
<ul>
|
||
<li>This integral, <span class="math inline">\(\int_0^2 4x/\sqrt{x^2 +1}dx\)</span>, involves a substitution for <span class="math inline">\(x^2 + 1\)</span>:</li>
|
||
</ul>
|
||
<div class="cell" data-execution_count="6">
|
||
<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> x<span class="op">::</span><span class="dt">real </span>t<span class="op">::</span><span class="dt">real</span></span>
|
||
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="fu">integrate</span>(<span class="fl">4</span>x <span class="op">/</span> <span class="fu">sqrt</span>(x<span class="op">^</span><span class="fl">2</span> <span class="op">+</span> <span class="fl">1</span>), (x, <span class="fl">0</span>, <span class="fl">2</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;">
|
||
\[
|
||
-4 + 4 \sqrt{5}
|
||
\]
|
||
</span>
|
||
</div>
|
||
</div>
|
||
<ul>
|
||
<li>This integral, <span class="math inline">\(\int_e^{e^2} 1/(x\log(x)) dx\)</span> involves a substitution of <span class="math inline">\(u=\log(x)\)</span>. Here we see the answer:</li>
|
||
</ul>
|
||
<div class="cell" data-hold="true" data-execution_count="7">
|
||
<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="fu">f</span>(x) <span class="op">=</span> <span class="fl">1</span><span class="op">/</span>(<span class="fu">x*log</span>(x))</span>
|
||
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="fu">integrate</span>(<span class="fu">f</span>(x), (x, sympy.E, sympy.E<span class="op">^</span><span class="fl">2</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="8">
|
||
<span class="math-left-align" style="padding-left: 4px; width:0; float:left;">
|
||
\[
|
||
\log{\left(2 \right)}
|
||
\]
|
||
</span>
|
||
</div>
|
||
</div>
|
||
<p>(We used <code>sympy.E)</code> - and not <code>e</code> - to avoid any conversion to floating point, which could yield an inexact answer.)</p>
|
||
<p>The antiderivative is interesting here; it being an <em>iterated</em> logarithm.</p>
|
||
<div class="cell" data-execution_count="8">
|
||
<div class="sourceCode cell-code" id="cb7"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="fu">integrate</span>(<span class="fl">1</span><span class="op">/</span>(<span class="fu">x*log</span>(x)), x)</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;">
|
||
\[
|
||
\log{\left(\log{\left(x \right)} \right)}
|
||
\]
|
||
</span>
|
||
</div>
|
||
</div>
|
||
<section id="failures" class="level3" data-number="38.1.1">
|
||
<h3 data-number="38.1.1" class="anchored" data-anchor-id="failures"><span class="header-section-number">38.1.1</span> Failures…</h3>
|
||
<p>Not every integral problem lends itself to solution by substitution. For example, we can use substitution to evaluate the integral of <span class="math inline">\(xe^{-x^2}\)</span>, but for <span class="math inline">\(e^{-x^2}\)</span> or <span class="math inline">\(x^2e^{-x^2}\)</span>. The first has no familiar antiderivative, the second is done by a different technique.</p>
|
||
<p>Even when substitution can be used, <code>SymPy</code> may not be able to algorithmically identify it. The main algorithm used can determine if expressions involving rational functions, radicals, logarithms, and exponential functions is integrable. Missing from this list are absolute values.</p>
|
||
<p>For some such problems, we can help <code>SymPy</code> out - by breaking the integral into pieces where we know the sign of the expression.</p>
|
||
<p>For substitution problems, we can also help out. For example, to find an antiderivative for</p>
|
||
<p><span class="math display">\[
|
||
\int(1 + \log(x)) \sqrt{1 + (x\log(x))^2} dx
|
||
\]</span></p>
|
||
<p>A quick attempt with <code>SymPy</code> turns up nothing:</p>
|
||
<div class="cell" data-execution_count="9">
|
||
<div class="sourceCode cell-code" id="cb8"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="fu">𝒇</span>(x) <span class="op">=</span> (<span class="fl">1</span> <span class="op">+</span> <span class="fu">log</span>(x)) <span class="op">*</span> <span class="fu">sqrt</span>(<span class="fl">1</span> <span class="op">+</span> (<span class="fu">x*log</span>(x))<span class="op">^</span><span class="fl">2</span> )</span>
|
||
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a><span class="fu">integrate</span>(<span class="fu">𝒇</span>(x), x)</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;">
|
||
\[
|
||
\int \sqrt{x^{2} \log{\left(x \right)}^{2} + 1} \left(\log{\left(x \right)} + 1\right)\, dx
|
||
\]
|
||
</span>
|
||
</div>
|
||
</div>
|
||
<p>But were we to try <span class="math inline">\(u=x\log(x)\)</span>, we’d see that this simplifies to <span class="math inline">\(\int \sqrt{1 + u^2} du\)</span>, which has some hope of having an antiderivative.</p>
|
||
<p>We can help <code>SymPy</code> out by substitution:</p>
|
||
<div class="cell" data-execution_count="10">
|
||
<div class="sourceCode cell-code" id="cb9"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="fu">u</span>(x) <span class="op">=</span> x <span class="op">*</span> <span class="fu">log</span>(x)</span>
|
||
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a><span class="pp">@syms</span> w dw</span>
|
||
<span id="cb9-3"><a href="#cb9-3" aria-hidden="true" tabindex="-1"></a>ex <span class="op">=</span> <span class="fu">𝒇</span>(x)</span>
|
||
<span id="cb9-4"><a href="#cb9-4" aria-hidden="true" tabindex="-1"></a>ex₁ <span class="op">=</span> <span class="fu">ex</span>(<span class="fu">u</span>(x) <span class="op">=></span> w, <span class="fu">diff</span>(<span class="fu">u</span>(x),x) <span class="op">=></span> dw)</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="11">
|
||
<span class="math-left-align" style="padding-left: 4px; width:0; float:left;">
|
||
\[
|
||
dw \sqrt{w^{2} + 1}
|
||
\]
|
||
</span>
|
||
</div>
|
||
</div>
|
||
<p>This verifies the above. Can it be integrated in <code>w</code>? The “<code>dw</code>” is only for familiarity, <code>SymPy</code> doesn’t use this, so we set it to 1 then integrate:</p>
|
||
<div class="cell" data-execution_count="11">
|
||
<div class="sourceCode cell-code" id="cb10"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a>ex₂ <span class="op">=</span> <span class="fu">ex₁</span>(dw <span class="op">=></span> <span class="fl">1</span>)</span>
|
||
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a>ex₃ <span class="op">=</span> <span class="fu">integrate</span>(ex₂, w)</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">
|
||
<span class="math-left-align" style="padding-left: 4px; width:0; float:left;">
|
||
\[
|
||
\frac{w \sqrt{w^{2} + 1}}{2} + \frac{\operatorname{asinh}{\left(w \right)}}{2}
|
||
\]
|
||
</span>
|
||
</div>
|
||
</div>
|
||
<p>Finally, we put back in the <code>u(x)</code> to get an antiderivative.</p>
|
||
<div class="cell" data-execution_count="12">
|
||
<div class="sourceCode cell-code" id="cb11"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="fu">ex₃</span>(w <span class="op">=></span> <span class="fu">u</span>(x))</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="13">
|
||
<span class="math-left-align" style="padding-left: 4px; width:0; float:left;">
|
||
\[
|
||
\frac{x \sqrt{x^{2} \log{\left(x \right)}^{2} + 1} \log{\left(x \right)}}{2} + \frac{\operatorname{asinh}{\left(x \log{\left(x \right)} \right)}}{2}
|
||
\]
|
||
</span>
|
||
</div>
|
||
</div>
|
||
<div class="callout-note callout callout-style-default callout-captioned">
|
||
<div class="callout-header d-flex align-content-center">
|
||
<div class="callout-icon-container">
|
||
<i class="callout-icon"></i>
|
||
</div>
|
||
<div class="callout-caption-container flex-fill">
|
||
Note
|
||
</div>
|
||
</div>
|
||
<div class="callout-body-container callout-body">
|
||
<p>Lest it be thought this is an issue with <code>SymPy</code>, but not other systems, this example was <a href="http://faculty.uml.edu/jpropp/142/Integration.pdf">borrowed</a> from an illustration for helping Mathematica.</p>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</section>
|
||
<section id="trigonometric-substitution" class="level2" data-number="38.2">
|
||
<h2 data-number="38.2" class="anchored" data-anchor-id="trigonometric-substitution"><span class="header-section-number">38.2</span> Trigonometric substitution</h2>
|
||
<p>Wait, in the last example an antiderivative for <span class="math inline">\(\sqrt{1 + u^2}\)</span> was found. But how? We haven’t discussed this yet.</p>
|
||
<p>This can be found using <em>trigonometric</em> substitution. In this example, we know that <span class="math inline">\(1 + \tan(\theta)^2\)</span> simplifies to <span class="math inline">\(\sec(\theta)^2\)</span>, so we might <em>try</em> a substitution of <span class="math inline">\(\tan(u)=x\)</span>. This would simplify <span class="math inline">\(\sqrt{1 + x^2}\)</span> to <span class="math inline">\(\sqrt{1 + \tan(u)^2} = \sqrt{\sec(u)^2}\)</span> which is <span class="math inline">\(\lvert \sec(u) \rvert\)</span>. What of <span class="math inline">\(du\)</span>? The chain rule gives <span class="math inline">\(\sec(u)^2du = dx\)</span>. In short we get:</p>
|
||
<p><span class="math display">\[
|
||
\int \sqrt{1 + x^2} dx = \int \sec(u)^2 \lvert \sec(u) \rvert du = \int \sec(u)^3 du,
|
||
\]</span></p>
|
||
<p>if we know <span class="math inline">\(\sec(u) \geq 0\)</span>.</p>
|
||
<p>This leaves still the question of integrating <span class="math inline">\(\sec(u)^3\)</span>, which we aren’t (yet) prepared to discuss, but we see that this type of substitution can re-express an integral in a new way that may pay off.</p>
|
||
<section id="examples" class="level4">
|
||
<h4 class="anchored" data-anchor-id="examples">Examples</h4>
|
||
<p>Let’s see some examples where a trigonometric substitution is all that is needed.</p>
|
||
<section id="example-1" class="level5">
|
||
<h5 class="anchored" data-anchor-id="example-1">Example</h5>
|
||
<p>Consider <span class="math inline">\(\int 1/(1+x^2) dx\)</span>. This is an antiderivative of some function, but if that isn’t observed, we might notice the <span class="math inline">\(1+x^2\)</span> and try to simplify that. First, an attempt at a <span class="math inline">\(u\)</span>-substitution:</p>
|
||
<p>Letting <span class="math inline">\(u = 1+x^2\)</span> we get <span class="math inline">\(du = 2xdx\)</span> which gives <span class="math inline">\(\int (1/u) (2x) du\)</span>. We aren’t able to address the “<span class="math inline">\(2x\)</span>” part successfully, so this attempt is for naught.</p>
|
||
<p>Now we try a trigonometric substitution, taking advantage of the identity <span class="math inline">\(1+\tan(x)^2 = \sec(x)^2\)</span>. Letting <span class="math inline">\(\tan(u) = x\)</span> yields <span class="math inline">\(\sec(u)^2 du = dx\)</span> and we get:</p>
|
||
<p><span class="math display">\[
|
||
\int \frac{1}{1+x^2} dx = \int \frac{1}{1 + \tan(u)^2} \sec(u)^2 du = \int 1 du = u.
|
||
\]</span></p>
|
||
<p>But <span class="math inline">\(\tan(u) = x\)</span>, so in terms of <span class="math inline">\(x\)</span>, an antiderivative is just <span class="math inline">\(\tan^{-1}(x)\)</span>, or the arctangent. Here we verify with <code>SymPy</code>:</p>
|
||
<div class="cell" data-execution_count="13">
|
||
<div class="sourceCode cell-code" id="cb12"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="fu">integrate</span>(<span class="fl">1</span><span class="op">/</span>(<span class="fl">1</span><span class="op">+</span>x<span class="op">^</span><span class="fl">2</span>), x)</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="14">
|
||
<span class="math-left-align" style="padding-left: 4px; width:0; float:left;">
|
||
\[
|
||
\operatorname{atan}{\left(x \right)}
|
||
\]
|
||
</span>
|
||
</div>
|
||
</div>
|
||
<p>The general form allows <span class="math inline">\(a^2 + (bx)^2\)</span> in the denominator (squared so both are positive and the answer is nicer):</p>
|
||
<div class="cell" data-hold="true" data-execution_count="14">
|
||
<div class="sourceCode cell-code" id="cb13"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="pp">@syms</span> a<span class="op">::</span><span class="dt">real</span>, b<span class="op">::</span><span class="dt">real</span>, x<span class="op">::</span><span class="dt">real</span></span>
|
||
<span id="cb13-2"><a href="#cb13-2" aria-hidden="true" tabindex="-1"></a><span class="fu">integrate</span>(<span class="fl">1</span> <span class="op">/</span> (a<span class="op">^</span><span class="fl">2</span> <span class="op">+</span> (b<span class="op">*</span>x)<span class="op">^</span><span class="fl">2</span>), x)</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="15">
|
||
<span class="math-left-align" style="padding-left: 4px; width:0; float:left;">
|
||
\[
|
||
\frac{\operatorname{atan}{\left(\frac{b x}{a} \right)}}{a b}
|
||
\]
|
||
</span>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section id="example-2" class="level5">
|
||
<h5 class="anchored" data-anchor-id="example-2">Example</h5>
|
||
<p>The expression <span class="math inline">\(1-x^2\)</span> can be attacked by the substitution <span class="math inline">\(\sin(u) =x\)</span> as then <span class="math inline">\(1-x^2 = 1-\cos(u)^2 = \sin(u)^2\)</span>. Here we see this substitution being used successfully:</p>
|
||
<p><span class="math display">\[
|
||
\begin{align*}
|
||
\int \frac{1}{\sqrt{9 - x^2}} dx &= \int \frac{1}{\sqrt{9 - (3\sin(u))^2}} \cdot 3\cos(u) du\\
|
||
&=\int \frac{1}{3\sqrt{1 - \sin(u)^2}}\cdot3\cos(u) du \\
|
||
&= \int du \\
|
||
&= u \\
|
||
&= \sin^{-1}(x/3).
|
||
\end{align*}
|
||
\]</span></p>
|
||
<p>Further substitution allows the following integral to be solved for an antiderivative:</p>
|
||
<div class="cell" data-hold="true" data-execution_count="15">
|
||
<div class="sourceCode cell-code" id="cb14"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a><span class="pp">@syms</span> a<span class="op">::</span><span class="dt">real</span>, b<span class="op">::</span><span class="dt">real</span></span>
|
||
<span id="cb14-2"><a href="#cb14-2" aria-hidden="true" tabindex="-1"></a><span class="fu">integrate</span>(<span class="fl">1</span> <span class="op">/</span> <span class="fu">sqrt</span>(a<span class="op">^</span><span class="fl">2</span> <span class="op">-</span> b<span class="op">^</span><span class="fl">2</span><span class="op">*</span>x<span class="op">^</span><span class="fl">2</span>), x)</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="16">
|
||
<span class="math-left-align" style="padding-left: 4px; width:0; float:left;">
|
||
\[
|
||
\begin{cases} - \frac{i x \left|{a}\right| \operatorname{acosh}{\left(\frac{\left|{b}\right| \left|{x}\right|}{\left|{a}\right|} \right)}}{a \left|{b}\right| \left|{x}\right|} + \frac{\pi x \left|{a}\right|}{2 a \left|{b}\right| \left|{x}\right|} & \text{for}\: \frac{b^{2} x^{2}}{a^{2}} > 1 \\\frac{x \left|{a}\right| \operatorname{asin}{\left(\frac{\left|{b}\right| \left|{x}\right|}{\left|{a}\right|} \right)}}{a \left|{b}\right| \left|{x}\right|} & \text{otherwise} \end{cases}
|
||
\]
|
||
</span>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section id="example-3" class="level5">
|
||
<h5 class="anchored" data-anchor-id="example-3">Example</h5>
|
||
<p>The expression <span class="math inline">\(x^2 - 1\)</span> is a bit different, this lends itself to <span class="math inline">\(\sec(u) = x\)</span> for a substitution, for <span class="math inline">\(\sec(u)^2 - 1 = \tan(u)^2\)</span>. For example, we try <span class="math inline">\(\sec(u) = x\)</span> to integrate:</p>
|
||
<p><span class="math display">\[
|
||
\begin{align*}
|
||
\int \frac{1}{\sqrt{x^2 - 1}} dx &= \int \frac{1}{\sqrt{\sec(u)^2 - 1}} \cdot \sec(u)\tan(u) du\\
|
||
&=\int \frac{1}{\tan(u)}\sec(u)\tan(u) du\\
|
||
&= \int \sec(u) du.
|
||
\end{align*}
|
||
\]</span></p>
|
||
<p>This doesn’t seem that helpful, but the antiderivative to <span class="math inline">\(\sec(u)\)</span> is <span class="math inline">\(\log\lvert (\sec(u) + \tan(u))\rvert\)</span>, so we can proceed to get:</p>
|
||
<p><span class="math display">\[
|
||
\begin{align*}
|
||
\int \frac{1}{\sqrt{x^2 - 1}} dx &= \int \sec(u) du\\
|
||
&= \log\lvert (\sec(u) + \tan(u))\rvert\\
|
||
&= \log\lvert x + \sqrt{x^2-1} \rvert.
|
||
\end{align*}
|
||
\]</span></p>
|
||
<p>SymPy gives a different representation using the arccosine:</p>
|
||
<div class="cell" data-hold="true" data-execution_count="16">
|
||
<div class="sourceCode cell-code" id="cb15"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="pp">@syms</span> a<span class="op">::</span><span class="dt">positive</span>, b<span class="op">::</span><span class="dt">positive</span>, x<span class="op">::</span><span class="dt">real</span></span>
|
||
<span id="cb15-2"><a href="#cb15-2" aria-hidden="true" tabindex="-1"></a><span class="fu">integrate</span>(<span class="fl">1</span> <span class="op">/</span> <span class="fu">sqrt</span>(a<span class="op">^</span><span class="fl">2</span><span class="op">*</span>x<span class="op">^</span><span class="fl">2</span> <span class="op">-</span> b<span class="op">^</span><span class="fl">2</span>), x)</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="17">
|
||
<span class="math-left-align" style="padding-left: 4px; width:0; float:left;">
|
||
\[
|
||
\frac{\operatorname{acosh}{\left(\frac{a x}{b} \right)}}{a}
|
||
\]
|
||
</span>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section id="example-4" class="level5">
|
||
<h5 class="anchored" data-anchor-id="example-4">Example</h5>
|
||
<p>The equation of an ellipse is <span class="math inline">\(x^2/a^2 + y^2/b^2 = 1\)</span>. Suppose <span class="math inline">\(a,b>0\)</span>. The area under the function <span class="math inline">\(b \sqrt{1 - x^2/a^2}\)</span> between <span class="math inline">\(-a\)</span> and <span class="math inline">\(a\)</span> will then be half the area of the ellipse. Find the area enclosed by the ellipse.</p>
|
||
<p>We need to compute:</p>
|
||
<p><span class="math display">\[
|
||
2\int_{-a}^a b \sqrt{1 - x^2/a^2} dx =
|
||
4 b \int_0^a\sqrt{1 - x^2/a^2} dx.
|
||
\]</span></p>
|
||
<p>Letting <span class="math inline">\(\sin(u) = x/a\)</span> gives <span class="math inline">\(a\cos(u)du = dx\)</span> and an antiderivative is found with:</p>
|
||
<p><span class="math display">\[
|
||
4 b \int_0^a \sqrt{1 - x^2/a^2} dx = 4b \int_0^{\pi/2} \sqrt{1-u^2} a \cos(u) du
|
||
= 4ab \int_0^{\pi/2} \cos(u)^2 du
|
||
\]</span></p>
|
||
<p>The identify <span class="math inline">\(\cos(u)^2 = (1 + \cos(2u))/2\)</span> makes this tractable:</p>
|
||
<p><span class="math display">\[
|
||
\begin{align*}
|
||
4ab \int \cos(u)^2 du
|
||
&= 4ab\int_0^{\pi/2}(\frac{1}{2} + \frac{\cos(2u)}{2}) du\\
|
||
&= 4ab(\frac{1}{2}u + \frac{\sin(2u)}{4})\big|_0^{\pi/2}\\
|
||
&= 4ab (\pi/4 + 0) = \pi ab.
|
||
\end{align*}
|
||
\]</span></p>
|
||
<p>Keeping in mind that that a circle with radius <span class="math inline">\(a\)</span> is an ellipse with <span class="math inline">\(b=a\)</span>, we see that this gives the correct answer for a circle.</p>
|
||
</section>
|
||
</section>
|
||
</section>
|
||
<section id="questions" class="level2" data-number="38.3">
|
||
<h2 data-number="38.3" class="anchored" data-anchor-id="questions"><span class="header-section-number">38.3</span> Questions</h2>
|
||
<section id="question" class="level6">
|
||
<h6 class="anchored" data-anchor-id="question">Question</h6>
|
||
<p>For <span class="math inline">\(\int \sin(x) \cos(x) dx\)</span>, let <span class="math inline">\(u=\sin(x)\)</span>. What is the resulting substitution?</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="16746168862769873063" data-controltype="">
|
||
<div class="form-group ">
|
||
<div class="controls">
|
||
<div class="form" id="controls_16746168862769873063">
|
||
<div style="padding-top: 5px">
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_16746168862769873063_1">
|
||
<input class="form-check-input" type="radio" name="radio_16746168862769873063" id="radio_16746168862769873063_1" value="1">
|
||
|
||
<span class="label-body px-1">
|
||
\(\int u (1 - u^2) du\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_16746168862769873063_2">
|
||
<input class="form-check-input" type="radio" name="radio_16746168862769873063" id="radio_16746168862769873063_2" value="2">
|
||
|
||
<span class="label-body px-1">
|
||
\(\int u du\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_16746168862769873063_3">
|
||
<input class="form-check-input" type="radio" name="radio_16746168862769873063" id="radio_16746168862769873063_3" value="3">
|
||
|
||
<span class="label-body px-1">
|
||
\(\int u \cos(x) du\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div id="16746168862769873063_message" style="padding-bottom: 15px"></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
<script text="text/javascript">
|
||
document.querySelectorAll('input[name="radio_16746168862769873063"]').forEach(function(rb) {
|
||
rb.addEventListener("change", function() {
|
||
var correct = rb.value == 2;
|
||
var msgBox = document.getElementById('16746168862769873063_message');
|
||
if(correct) {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>";
|
||
var explanation = document.getElementById("explanation_16746168862769873063")
|
||
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_16746168862769873063")
|
||
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>For <span class="math inline">\(\int \tan(x)^4 \sec(x)2 dx\)</span> what <span class="math inline">\(u\)</span>-substitution makes this easy?</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="2319460748349250542" data-controltype="">
|
||
<div class="form-group ">
|
||
<div class="controls">
|
||
<div class="form" id="controls_2319460748349250542">
|
||
<div style="padding-top: 5px">
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_2319460748349250542_1">
|
||
<input class="form-check-input" type="radio" name="radio_2319460748349250542" id="radio_2319460748349250542_1" value="1">
|
||
|
||
<span class="label-body px-1">
|
||
\(u=\tan(x)\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_2319460748349250542_2">
|
||
<input class="form-check-input" type="radio" name="radio_2319460748349250542" id="radio_2319460748349250542_2" value="2">
|
||
|
||
<span class="label-body px-1">
|
||
\(u=\sec(x)^2\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_2319460748349250542_3">
|
||
<input class="form-check-input" type="radio" name="radio_2319460748349250542" id="radio_2319460748349250542_3" value="3">
|
||
|
||
<span class="label-body px-1">
|
||
\(u=\sec(x)\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_2319460748349250542_4">
|
||
<input class="form-check-input" type="radio" name="radio_2319460748349250542" id="radio_2319460748349250542_4" value="4">
|
||
|
||
<span class="label-body px-1">
|
||
\(u=\tan(x)^4\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div id="2319460748349250542_message" style="padding-bottom: 15px"></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
<script text="text/javascript">
|
||
document.querySelectorAll('input[name="radio_2319460748349250542"]').forEach(function(rb) {
|
||
rb.addEventListener("change", function() {
|
||
var correct = rb.value == 1;
|
||
var msgBox = document.getElementById('2319460748349250542_message');
|
||
if(correct) {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>";
|
||
var explanation = document.getElementById("explanation_2319460748349250542")
|
||
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_2319460748349250542")
|
||
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>For <span class="math inline">\(\int x \sqrt{x^2 - 1} dx\)</span> what <span class="math inline">\(u\)</span> substitution makes this easy?</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="929830638715641208" data-controltype="">
|
||
<div class="form-group ">
|
||
<div class="controls">
|
||
<div class="form" id="controls_929830638715641208">
|
||
<div style="padding-top: 5px">
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_929830638715641208_1">
|
||
<input class="form-check-input" type="radio" name="radio_929830638715641208" id="radio_929830638715641208_1" value="1">
|
||
|
||
<span class="label-body px-1">
|
||
\(u=\sqrt{x^2 - 1}\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_929830638715641208_2">
|
||
<input class="form-check-input" type="radio" name="radio_929830638715641208" id="radio_929830638715641208_2" value="2">
|
||
|
||
<span class="label-body px-1">
|
||
\(u=x^2 - 1\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_929830638715641208_3">
|
||
<input class="form-check-input" type="radio" name="radio_929830638715641208" id="radio_929830638715641208_3" value="3">
|
||
|
||
<span class="label-body px-1">
|
||
\(u=x\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_929830638715641208_4">
|
||
<input class="form-check-input" type="radio" name="radio_929830638715641208" id="radio_929830638715641208_4" value="4">
|
||
|
||
<span class="label-body px-1">
|
||
\(u=x^2\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div id="929830638715641208_message" style="padding-bottom: 15px"></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
<script text="text/javascript">
|
||
document.querySelectorAll('input[name="radio_929830638715641208"]').forEach(function(rb) {
|
||
rb.addEventListener("change", function() {
|
||
var correct = rb.value == 2;
|
||
var msgBox = document.getElementById('929830638715641208_message');
|
||
if(correct) {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>";
|
||
var explanation = document.getElementById("explanation_929830638715641208")
|
||
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_929830638715641208")
|
||
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>For <span class="math inline">\(\int x^2(1-x)^2 dx\)</span> will the substitution <span class="math inline">\(u=1-x\)</span> prove effective?</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="13425140540783858566" data-controltype="">
|
||
<div class="form-group ">
|
||
<div class="controls">
|
||
<div class="form" id="controls_13425140540783858566">
|
||
<div style="padding-top: 5px">
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_13425140540783858566_1">
|
||
<input class="form-check-input" type="radio" name="radio_13425140540783858566" id="radio_13425140540783858566_1" value="1">
|
||
|
||
<span class="label-body px-1">
|
||
Yes
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_13425140540783858566_2">
|
||
<input class="form-check-input" type="radio" name="radio_13425140540783858566" id="radio_13425140540783858566_2" value="2">
|
||
|
||
<span class="label-body px-1">
|
||
No
|
||
</span>
|
||
</label>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div id="13425140540783858566_message" style="padding-bottom: 15px"></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
<script text="text/javascript">
|
||
document.querySelectorAll('input[name="radio_13425140540783858566"]').forEach(function(rb) {
|
||
rb.addEventListener("change", function() {
|
||
var correct = rb.value == 2;
|
||
var msgBox = document.getElementById('13425140540783858566_message');
|
||
if(correct) {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>";
|
||
var explanation = document.getElementById("explanation_13425140540783858566")
|
||
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_13425140540783858566")
|
||
if (explanation != null) {
|
||
explanation.style.display = "block";
|
||
}
|
||
}
|
||
|
||
})});
|
||
|
||
</script>
|
||
</div>
|
||
</div>
|
||
<p>What about expanding the factored polynomial to get a fourth degree polynomial, will this prove effective?</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="7884941333517863931" data-controltype="">
|
||
<div class="form-group ">
|
||
<div class="controls">
|
||
<div class="form" id="controls_7884941333517863931">
|
||
<div style="padding-top: 5px">
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_7884941333517863931_1">
|
||
<input class="form-check-input" type="radio" name="radio_7884941333517863931" id="radio_7884941333517863931_1" value="1">
|
||
|
||
<span class="label-body px-1">
|
||
Yes
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_7884941333517863931_2">
|
||
<input class="form-check-input" type="radio" name="radio_7884941333517863931" id="radio_7884941333517863931_2" value="2">
|
||
|
||
<span class="label-body px-1">
|
||
No
|
||
</span>
|
||
</label>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div id="7884941333517863931_message" style="padding-bottom: 15px"></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
<script text="text/javascript">
|
||
document.querySelectorAll('input[name="radio_7884941333517863931"]').forEach(function(rb) {
|
||
rb.addEventListener("change", function() {
|
||
var correct = rb.value == 1;
|
||
var msgBox = document.getElementById('7884941333517863931_message');
|
||
if(correct) {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>";
|
||
var explanation = document.getElementById("explanation_7884941333517863931")
|
||
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_7884941333517863931")
|
||
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>For <span class="math inline">\(\int (\log(x))^3/x dx\)</span> the substitution <span class="math inline">\(u=\log(x)\)</span> reduces this to what?</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="8832051585607433668" data-controltype="">
|
||
<div class="form-group ">
|
||
<div class="controls">
|
||
<div class="form" id="controls_8832051585607433668">
|
||
<div style="padding-top: 5px">
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_8832051585607433668_1">
|
||
<input class="form-check-input" type="radio" name="radio_8832051585607433668" id="radio_8832051585607433668_1" value="1">
|
||
|
||
<span class="label-body px-1">
|
||
\(\int u du\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_8832051585607433668_2">
|
||
<input class="form-check-input" type="radio" name="radio_8832051585607433668" id="radio_8832051585607433668_2" value="2">
|
||
|
||
<span class="label-body px-1">
|
||
\(\int u^3/x du\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_8832051585607433668_3">
|
||
<input class="form-check-input" type="radio" name="radio_8832051585607433668" id="radio_8832051585607433668_3" value="3">
|
||
|
||
<span class="label-body px-1">
|
||
\(\int u^3 du\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div id="8832051585607433668_message" style="padding-bottom: 15px"></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
<script text="text/javascript">
|
||
document.querySelectorAll('input[name="radio_8832051585607433668"]').forEach(function(rb) {
|
||
rb.addEventListener("change", function() {
|
||
var correct = rb.value == 3;
|
||
var msgBox = document.getElementById('8832051585607433668_message');
|
||
if(correct) {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>";
|
||
var explanation = document.getElementById("explanation_8832051585607433668")
|
||
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_8832051585607433668")
|
||
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>For <span class="math inline">\(\int \tan(x) dx\)</span> what substitution will prove effective?</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="12388155574224826075" data-controltype="">
|
||
<div class="form-group ">
|
||
<div class="controls">
|
||
<div class="form" id="controls_12388155574224826075">
|
||
<div style="padding-top: 5px">
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_12388155574224826075_1">
|
||
<input class="form-check-input" type="radio" name="radio_12388155574224826075" id="radio_12388155574224826075_1" value="1">
|
||
|
||
<span class="label-body px-1">
|
||
\(u=\tan(x)\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_12388155574224826075_2">
|
||
<input class="form-check-input" type="radio" name="radio_12388155574224826075" id="radio_12388155574224826075_2" value="2">
|
||
|
||
<span class="label-body px-1">
|
||
\(u=\sin(x)\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_12388155574224826075_3">
|
||
<input class="form-check-input" type="radio" name="radio_12388155574224826075" id="radio_12388155574224826075_3" value="3">
|
||
|
||
<span class="label-body px-1">
|
||
\(u=\cos(x)\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div id="12388155574224826075_message" style="padding-bottom: 15px"></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
<script text="text/javascript">
|
||
document.querySelectorAll('input[name="radio_12388155574224826075"]').forEach(function(rb) {
|
||
rb.addEventListener("change", function() {
|
||
var correct = rb.value == 3;
|
||
var msgBox = document.getElementById('12388155574224826075_message');
|
||
if(correct) {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>";
|
||
var explanation = document.getElementById("explanation_12388155574224826075")
|
||
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_12388155574224826075")
|
||
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>Integrating <span class="math inline">\(\int_0^1 x \sqrt{1 - x^2} dx\)</span> can be done by using the <span class="math inline">\(u\)</span>-substitution <span class="math inline">\(u=1-x^2\)</span>. This yields an integral</p>
|
||
<p><span class="math display">\[
|
||
\int_a^b \frac{-\sqrt{u}}{2} du.
|
||
\]</span></p>
|
||
<p>What are <span class="math inline">\(a\)</span> and <span class="math inline">\(b\)</span>?</p>
|
||
<div class="cell" data-hold="true" data-execution_count="24">
|
||
<div class="cell-output cell-output-display" data-execution_count="25">
|
||
<form class="mx-2 my-3 mw-100" name="WeaveQuestion" data-id="1260642748268818163" data-controltype="">
|
||
<div class="form-group ">
|
||
<div class="controls">
|
||
<div class="form" id="controls_1260642748268818163">
|
||
<div style="padding-top: 5px">
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_1260642748268818163_1">
|
||
<input class="form-check-input" type="radio" name="radio_1260642748268818163" id="radio_1260642748268818163_1" value="1">
|
||
|
||
<span class="label-body px-1">
|
||
\(a=1,~ b=0\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_1260642748268818163_2">
|
||
<input class="form-check-input" type="radio" name="radio_1260642748268818163" id="radio_1260642748268818163_2" value="2">
|
||
|
||
<span class="label-body px-1">
|
||
\(a=0,~ b=0\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_1260642748268818163_3">
|
||
<input class="form-check-input" type="radio" name="radio_1260642748268818163" id="radio_1260642748268818163_3" value="3">
|
||
|
||
<span class="label-body px-1">
|
||
\(a=1,~ b=1\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_1260642748268818163_4">
|
||
<input class="form-check-input" type="radio" name="radio_1260642748268818163" id="radio_1260642748268818163_4" value="4">
|
||
|
||
<span class="label-body px-1">
|
||
\(a=0,~ b=1\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div id="1260642748268818163_message" style="padding-bottom: 15px"></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
<script text="text/javascript">
|
||
document.querySelectorAll('input[name="radio_1260642748268818163"]').forEach(function(rb) {
|
||
rb.addEventListener("change", function() {
|
||
var correct = rb.value == 4;
|
||
var msgBox = document.getElementById('1260642748268818163_message');
|
||
if(correct) {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>";
|
||
var explanation = document.getElementById("explanation_1260642748268818163")
|
||
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_1260642748268818163")
|
||
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 integral <span class="math inline">\(\int \sqrt{1 - x^2} dx\)</span> lends itself to what substitution?</p>
|
||
<div class="cell" data-hold="true" data-execution_count="25">
|
||
<div class="cell-output cell-output-display" data-execution_count="26">
|
||
<form class="mx-2 my-3 mw-100" name="WeaveQuestion" data-id="9816442339115992491" data-controltype="">
|
||
<div class="form-group ">
|
||
<div class="controls">
|
||
<div class="form" id="controls_9816442339115992491">
|
||
<div style="padding-top: 5px">
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_9816442339115992491_1">
|
||
<input class="form-check-input" type="radio" name="radio_9816442339115992491" id="radio_9816442339115992491_1" value="1">
|
||
|
||
<span class="label-body px-1">
|
||
\(u = 1 - x^2\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_9816442339115992491_2">
|
||
<input class="form-check-input" type="radio" name="radio_9816442339115992491" id="radio_9816442339115992491_2" value="2">
|
||
|
||
<span class="label-body px-1">
|
||
\(\tan(u) = x\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_9816442339115992491_3">
|
||
<input class="form-check-input" type="radio" name="radio_9816442339115992491" id="radio_9816442339115992491_3" value="3">
|
||
|
||
<span class="label-body px-1">
|
||
\(\sin(u) = x\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_9816442339115992491_4">
|
||
<input class="form-check-input" type="radio" name="radio_9816442339115992491" id="radio_9816442339115992491_4" value="4">
|
||
|
||
<span class="label-body px-1">
|
||
\(\sec(u) = x\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div id="9816442339115992491_message" style="padding-bottom: 15px"></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
<script text="text/javascript">
|
||
document.querySelectorAll('input[name="radio_9816442339115992491"]').forEach(function(rb) {
|
||
rb.addEventListener("change", function() {
|
||
var correct = rb.value == 3;
|
||
var msgBox = document.getElementById('9816442339115992491_message');
|
||
if(correct) {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>";
|
||
var explanation = document.getElementById("explanation_9816442339115992491")
|
||
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_9816442339115992491")
|
||
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>The integral <span class="math inline">\(\int x/(1+x^2) dx\)</span> lends itself to what substitution?</p>
|
||
<div class="cell" data-hold="true" data-execution_count="26">
|
||
<div class="cell-output cell-output-display" data-execution_count="27">
|
||
<form class="mx-2 my-3 mw-100" name="WeaveQuestion" data-id="6705820243768511417" data-controltype="">
|
||
<div class="form-group ">
|
||
<div class="controls">
|
||
<div class="form" id="controls_6705820243768511417">
|
||
<div style="padding-top: 5px">
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_6705820243768511417_1">
|
||
<input class="form-check-input" type="radio" name="radio_6705820243768511417" id="radio_6705820243768511417_1" value="1">
|
||
|
||
<span class="label-body px-1">
|
||
\(u = 1 + x^2\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_6705820243768511417_2">
|
||
<input class="form-check-input" type="radio" name="radio_6705820243768511417" id="radio_6705820243768511417_2" value="2">
|
||
|
||
<span class="label-body px-1">
|
||
\(\sec(u) = x\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_6705820243768511417_3">
|
||
<input class="form-check-input" type="radio" name="radio_6705820243768511417" id="radio_6705820243768511417_3" value="3">
|
||
|
||
<span class="label-body px-1">
|
||
\(\tan(u) = x\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_6705820243768511417_4">
|
||
<input class="form-check-input" type="radio" name="radio_6705820243768511417" id="radio_6705820243768511417_4" value="4">
|
||
|
||
<span class="label-body px-1">
|
||
\(\sin(u) = x\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div id="6705820243768511417_message" style="padding-bottom: 15px"></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
<script text="text/javascript">
|
||
document.querySelectorAll('input[name="radio_6705820243768511417"]').forEach(function(rb) {
|
||
rb.addEventListener("change", function() {
|
||
var correct = rb.value == 1;
|
||
var msgBox = document.getElementById('6705820243768511417_message');
|
||
if(correct) {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>";
|
||
var explanation = document.getElementById("explanation_6705820243768511417")
|
||
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_6705820243768511417")
|
||
if (explanation != null) {
|
||
explanation.style.display = "block";
|
||
}
|
||
}
|
||
|
||
})});
|
||
|
||
</script>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section id="question-9" class="level6">
|
||
<h6 class="anchored" data-anchor-id="question-9">Question</h6>
|
||
<p>The integral <span class="math inline">\(\int dx / \sqrt{1 - x^2}\)</span> lends itself to what substitution?</p>
|
||
<div class="cell" data-hold="true" data-execution_count="27">
|
||
<div class="cell-output cell-output-display" data-execution_count="28">
|
||
<form class="mx-2 my-3 mw-100" name="WeaveQuestion" data-id="7715812252684175965" data-controltype="">
|
||
<div class="form-group ">
|
||
<div class="controls">
|
||
<div class="form" id="controls_7715812252684175965">
|
||
<div style="padding-top: 5px">
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_7715812252684175965_1">
|
||
<input class="form-check-input" type="radio" name="radio_7715812252684175965" id="radio_7715812252684175965_1" value="1">
|
||
|
||
<span class="label-body px-1">
|
||
\(\tan(u) = x\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_7715812252684175965_2">
|
||
<input class="form-check-input" type="radio" name="radio_7715812252684175965" id="radio_7715812252684175965_2" value="2">
|
||
|
||
<span class="label-body px-1">
|
||
\(u = 1 - x^2\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_7715812252684175965_3">
|
||
<input class="form-check-input" type="radio" name="radio_7715812252684175965" id="radio_7715812252684175965_3" value="3">
|
||
|
||
<span class="label-body px-1">
|
||
\(\sin(u) = x\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_7715812252684175965_4">
|
||
<input class="form-check-input" type="radio" name="radio_7715812252684175965" id="radio_7715812252684175965_4" value="4">
|
||
|
||
<span class="label-body px-1">
|
||
\(\sec(u) = x\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div id="7715812252684175965_message" style="padding-bottom: 15px"></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
<script text="text/javascript">
|
||
document.querySelectorAll('input[name="radio_7715812252684175965"]').forEach(function(rb) {
|
||
rb.addEventListener("change", function() {
|
||
var correct = rb.value == 3;
|
||
var msgBox = document.getElementById('7715812252684175965_message');
|
||
if(correct) {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>";
|
||
var explanation = document.getElementById("explanation_7715812252684175965")
|
||
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_7715812252684175965")
|
||
if (explanation != null) {
|
||
explanation.style.display = "block";
|
||
}
|
||
}
|
||
|
||
})});
|
||
|
||
</script>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section id="question-10" class="level6">
|
||
<h6 class="anchored" data-anchor-id="question-10">Question</h6>
|
||
<p>The integral <span class="math inline">\(\int dx / \sqrt{x^2 - 16}\)</span> lends itself to what substitution?</p>
|
||
<div class="cell" data-hold="true" data-execution_count="28">
|
||
<div class="cell-output cell-output-display" data-execution_count="29">
|
||
<form class="mx-2 my-3 mw-100" name="WeaveQuestion" data-id="17473887115112980222" data-controltype="">
|
||
<div class="form-group ">
|
||
<div class="controls">
|
||
<div class="form" id="controls_17473887115112980222">
|
||
<div style="padding-top: 5px">
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_17473887115112980222_1">
|
||
<input class="form-check-input" type="radio" name="radio_17473887115112980222" id="radio_17473887115112980222_1" value="1">
|
||
|
||
<span class="label-body px-1">
|
||
\(4\sec(u) = x\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_17473887115112980222_2">
|
||
<input class="form-check-input" type="radio" name="radio_17473887115112980222" id="radio_17473887115112980222_2" value="2">
|
||
|
||
<span class="label-body px-1">
|
||
\(\sec(u) = x\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_17473887115112980222_3">
|
||
<input class="form-check-input" type="radio" name="radio_17473887115112980222" id="radio_17473887115112980222_3" value="3">
|
||
|
||
<span class="label-body px-1">
|
||
\(\sin(u) = x\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_17473887115112980222_4">
|
||
<input class="form-check-input" type="radio" name="radio_17473887115112980222" id="radio_17473887115112980222_4" value="4">
|
||
|
||
<span class="label-body px-1">
|
||
\(4\sin(u) = x\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div id="17473887115112980222_message" style="padding-bottom: 15px"></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
<script text="text/javascript">
|
||
document.querySelectorAll('input[name="radio_17473887115112980222"]').forEach(function(rb) {
|
||
rb.addEventListener("change", function() {
|
||
var correct = rb.value == 1;
|
||
var msgBox = document.getElementById('17473887115112980222_message');
|
||
if(correct) {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>";
|
||
var explanation = document.getElementById("explanation_17473887115112980222")
|
||
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_17473887115112980222")
|
||
if (explanation != null) {
|
||
explanation.style.display = "block";
|
||
}
|
||
}
|
||
|
||
})});
|
||
|
||
</script>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section id="question-11" class="level6">
|
||
<h6 class="anchored" data-anchor-id="question-11">Question</h6>
|
||
<p>The integral <span class="math inline">\(\int dx / (a^2 + x^2)\)</span> lends itself to what substitution?</p>
|
||
<div class="cell" data-hold="true" data-execution_count="29">
|
||
<div class="cell-output cell-output-display" data-execution_count="30">
|
||
<form class="mx-2 my-3 mw-100" name="WeaveQuestion" data-id="9785040180496417213" data-controltype="">
|
||
<div class="form-group ">
|
||
<div class="controls">
|
||
<div class="form" id="controls_9785040180496417213">
|
||
<div style="padding-top: 5px">
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_9785040180496417213_1">
|
||
<input class="form-check-input" type="radio" name="radio_9785040180496417213" id="radio_9785040180496417213_1" value="1">
|
||
|
||
<span class="label-body px-1">
|
||
\(\tan(u) = x\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_9785040180496417213_2">
|
||
<input class="form-check-input" type="radio" name="radio_9785040180496417213" id="radio_9785040180496417213_2" value="2">
|
||
|
||
<span class="label-body px-1">
|
||
\(\tan(u) = x\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_9785040180496417213_3">
|
||
<input class="form-check-input" type="radio" name="radio_9785040180496417213" id="radio_9785040180496417213_3" value="3">
|
||
|
||
<span class="label-body px-1">
|
||
\(a\sec(u) = x\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_9785040180496417213_4">
|
||
<input class="form-check-input" type="radio" name="radio_9785040180496417213" id="radio_9785040180496417213_4" value="4">
|
||
|
||
<span class="label-body px-1">
|
||
\(\sec(u) = x\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div id="9785040180496417213_message" style="padding-bottom: 15px"></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
<script text="text/javascript">
|
||
document.querySelectorAll('input[name="radio_9785040180496417213"]').forEach(function(rb) {
|
||
rb.addEventListener("change", function() {
|
||
var correct = rb.value == 1;
|
||
var msgBox = document.getElementById('9785040180496417213_message');
|
||
if(correct) {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>";
|
||
var explanation = document.getElementById("explanation_9785040180496417213")
|
||
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_9785040180496417213")
|
||
if (explanation != null) {
|
||
explanation.style.display = "block";
|
||
}
|
||
}
|
||
|
||
})});
|
||
|
||
</script>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section id="question-12" class="level6">
|
||
<h6 class="anchored" data-anchor-id="question-12">Question</h6>
|
||
<p>The integral <span class="math inline">\(\int_{1/2}^1 \sqrt{1 - x^2}dx\)</span> can be approached with the substitution <span class="math inline">\(\sin(u) = x\)</span> giving:</p>
|
||
<p><span class="math display">\[
|
||
\int_a^b \cos(u)^2 du.
|
||
\]</span></p>
|
||
<p>What are <span class="math inline">\(a\)</span> and <span class="math inline">\(b\)</span>?</p>
|
||
<div class="cell" data-hold="true" data-execution_count="30">
|
||
<div class="cell-output cell-output-display" data-execution_count="31">
|
||
<form class="mx-2 my-3 mw-100" name="WeaveQuestion" data-id="5350435097460811136" data-controltype="">
|
||
<div class="form-group ">
|
||
<div class="controls">
|
||
<div class="form" id="controls_5350435097460811136">
|
||
<div style="padding-top: 5px">
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_5350435097460811136_1">
|
||
<input class="form-check-input" type="radio" name="radio_5350435097460811136" id="radio_5350435097460811136_1" value="1">
|
||
|
||
<span class="label-body px-1">
|
||
\(a=1/2,~ b= 1\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_5350435097460811136_2">
|
||
<input class="form-check-input" type="radio" name="radio_5350435097460811136" id="radio_5350435097460811136_2" value="2">
|
||
|
||
<span class="label-body px-1">
|
||
\(a=\pi/3,~ b=\pi/2\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_5350435097460811136_3">
|
||
<input class="form-check-input" type="radio" name="radio_5350435097460811136" id="radio_5350435097460811136_3" value="3">
|
||
|
||
<span class="label-body px-1">
|
||
\(a=\pi/6,~ b=\pi/2\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_5350435097460811136_4">
|
||
<input class="form-check-input" type="radio" name="radio_5350435097460811136" id="radio_5350435097460811136_4" value="4">
|
||
|
||
<span class="label-body px-1">
|
||
\(a=\pi/4,~ b=\pi/2\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div id="5350435097460811136_message" style="padding-bottom: 15px"></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
<script text="text/javascript">
|
||
document.querySelectorAll('input[name="radio_5350435097460811136"]').forEach(function(rb) {
|
||
rb.addEventListener("change", function() {
|
||
var correct = rb.value == 3;
|
||
var msgBox = document.getElementById('5350435097460811136_message');
|
||
if(correct) {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>";
|
||
var explanation = document.getElementById("explanation_5350435097460811136")
|
||
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_5350435097460811136")
|
||
if (explanation != null) {
|
||
explanation.style.display = "block";
|
||
}
|
||
}
|
||
|
||
})});
|
||
|
||
</script>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section id="question-13" class="level6">
|
||
<h6 class="anchored" data-anchor-id="question-13">Question</h6>
|
||
<p>How would we verify that <span class="math inline">\(\log\lvert (\sec(u) + \tan(u))\rvert\)</span> is an antiderivative for <span class="math inline">\(\sec(u)\)</span>?</p>
|
||
<div class="cell" data-hold="true" data-execution_count="31">
|
||
<div class="cell-output cell-output-display" data-execution_count="32">
|
||
<form class="mx-2 my-3 mw-100" name="WeaveQuestion" data-id="18132241296680278339" data-controltype="">
|
||
<div class="form-group ">
|
||
<div class="controls">
|
||
<div class="form" id="controls_18132241296680278339">
|
||
<div style="padding-top: 5px">
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_18132241296680278339_1">
|
||
<input class="form-check-input" type="radio" name="radio_18132241296680278339" id="radio_18132241296680278339_1" value="1">
|
||
|
||
<span class="label-body px-1">
|
||
We could differentiate \(\log\lvert (\sec(u) + \tan(u))\rvert\)
|
||
</span>
|
||
</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<label class="form-check-label" for="radio_18132241296680278339_2">
|
||
<input class="form-check-input" type="radio" name="radio_18132241296680278339" id="radio_18132241296680278339_2" value="2">
|
||
|
||
<span class="label-body px-1">
|
||
We could differentiate \(\sec(u)\).
|
||
</span>
|
||
</label>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div id="18132241296680278339_message" style="padding-bottom: 15px"></div>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
<script text="text/javascript">
|
||
document.querySelectorAll('input[name="radio_18132241296680278339"]').forEach(function(rb) {
|
||
rb.addEventListener("change", function() {
|
||
var correct = rb.value == 1;
|
||
var msgBox = document.getElementById('18132241296680278339_message');
|
||
if(correct) {
|
||
msgBox.innerHTML = "<div class='pluto-output admonition note alert alert-success'><span> 👍 Correct </span></div>";
|
||
var explanation = document.getElementById("explanation_18132241296680278339")
|
||
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_18132241296680278339")
|
||
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/ftc.html" class="pagination-link">
|
||
<i class="bi bi-arrow-left-short"></i> <span class="nav-page-text"><span class="chapter-number">37</span> <span class="chapter-title">Fundamental Theorem or Calculus</span></span>
|
||
</a>
|
||
</div>
|
||
<div class="nav-page nav-page-next">
|
||
<a href="../integrals/integration_by_parts.html" class="pagination-link">
|
||
<span class="nav-page-text"><span class="chapter-number">39</span> <span class="chapter-title">Integration By Parts</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> |