lkarch.org/tools/mathisfun/www.mathsisfun.com/calculus/differential-equations-undetermined-coefficients.html
Lucas Kent e39465ad2f Changes to be committed:
new file:   Files/flashplayer_32_sa.exe
	new file:   favicon.ico
	new file:   globe.gif
	new file:   imgs/download.png
	new file:   imgs/zuck.jpg
	new file:   index.html
	new file:   other.ico
	new file:   script.js
	new file:   site.webmanifest
	new file:   sitemap.html
	new file:   styles/backround.css
	new file:   styles/border.css
	new file:   styles/fonts/Titillium_Web/OFL.txt
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Black.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Bold.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-BoldItalic.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-ExtraLight.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-ExtraLightItalic.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Italic.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Light.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-LightItalic.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-Regular.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-SemiBold.ttf
	new file:   styles/fonts/Titillium_Web/TitilliumWeb-SemiBoldItalic.ttf
	new file:   styles/fonts/webfontkit-20221027-163353/generator_config.txt
	new file:   styles/fonts/webfontkit-20221027-163353/specimen_files/grid_12-825-55-15.css
	new file:   styles/fonts/webfontkit-20221027-163353/specimen_files/specimen_stylesheet.css
	new file:   styles/fonts/webfontkit-20221027-163353/stylesheet.css
	new file:   styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-demo.html
	new file:   styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-webfont.woff
	new file:   styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-webfont.woff2
	new file:   styles/fonts/webfontkit-20221027-165950/generator_config.txt
	new file:   styles/fonts/webfontkit-20221027-165950/specimen_files/grid_12-825-55-15.css
	new file:   styles/fonts/webfontkit-20221027-165950/specimen_files/specimen_stylesheet.css
	new file:   styles/fonts/webfontkit-20221027-165950/stylesheet.css
	new file:   styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-demo.html
	new file:   styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-webfont.woff
	new file:   styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-webfont.woff2
	new file:   styles/style.css
	new file:   tools/2048/.gitignore
	new file:   tools/2048/.jshintrc
	new file:   tools/2048/CONTRIBUTING.md
	new file:   tools/2048/LICENSE.txt
	new file:   tools/2048/README.md
	new file:   tools/2048/Rakefile
	new file:   tools/2048/favicon.ico
	new file:   tools/2048/index.html
	new file:   tools/2048/js/animframe_polyfill.js
	new file:   tools/2048/js/application.js
	new file:   tools/2048/js/bind_polyfill.js
	new file:   tools/2048/js/classlist_polyfill.js
	new file:   tools/2048/js/game_manager.js
	new file:   tools/2048/js/grid.js
	new file:   tools/2048/js/html_actuator.js
	new file:   tools/2048/js/keyboard_input_manager.js
	new file:   tools/2048/js/local_storage_manager.js
	new file:   tools/2048/js/tile.js
    new file:   tools/2048/meta/apple-touch-icon.png
	new file:   tools/webretro/cores/neocd_libretro.js
	new file:   tools/webretro/cores/neocd_libretro.wasm
	new file:   tools/webretro/cores/nestopia_libretro.js
	new file:   tools/webretro/cores/nestopia_libretro.wasm
	new file:   tools/webretro/cores/o2em_libretro.js
	new file:   tools/webretro/cores/o2em_libretro.wasm
	new file:   tools/webretro/cores/opera_libretro.js
	new file:   tools/webretro/cores/opera_libretro.wasm
2022-11-02 08:40:01 -04:00

500 lines
30 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html lang="en">
<!-- #BeginTemplate "/Templates/Advanced.dwt" --><!-- DW6 -->
<!-- Mirrored from www.mathsisfun.com/calculus/differential-equations-undetermined-coefficients.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 29 Oct 2022 00:49:29 GMT -->
<head>
<meta charset="UTF-8">
<!-- #BeginEditable "doctitle" -->
<title>Method of Undetermined Coefficients</title>
<meta name="description" content="Math explained in easy language, plus puzzles, games, quizzes, videos and worksheets. For K-12 kids, teachers and parents.">
<script>Author='Les Bill Gates, Jesus Montes and Rod Pierce';</script>
<!-- #EndEditable -->
<meta name="keywords" content="math, maths, mathematics, school, homework, education">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<meta name="HandheldFriendly" content="true">
<meta name="referrer" content="always">
<link rel="preload" href="../images/style/font-champ-bold.ttf" as="font" type="font/ttf" crossorigin>
<link rel="preload" href="../style4.css" as="style">
<link rel="preload" href="../main4.js" as="script">
<link rel="stylesheet" href="../style4.css">
<script src="../main4.js" defer></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-29771508-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-29771508-1');
</script>
</head>
<body id="bodybg" class="adv">
<div id="stt"></div>
<div id="adTop"></div>
<header>
<div id="hdr"></div>
<div id="tran"></div>
<div id="adHide"></div>
<div id="cookOK"></div>
</header>
<div class="mid">
<nav>
<div id="menuWide" class="menu"></div>
<div id="logo"><a href="../index.html"><img src="../images/style/logo-adv.svg" alt="Math is Fun Advanced"></a></div>
<div id="search" role="search"></div>
<div id="linkto"></div>
<div id="menuSlim" class="menu"></div>
<div id="menuTiny" class="menu"></div>
</nav>
<div id="extra"></div>
<article id="content" role="main">
<!-- #BeginEditable "Body" -->
<h1>Method of Undetermined Coefficients</h1>
<div class="def">
<p>This page is about second order differential equations of this type:</p>
<p class="center large"><span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> + P(x)<span class="intbl"><em>dy</em><strong>dx</strong></span> + Q(x)y
= f(x)</p>
<p>where P(x), Q(x) and f(x) are functions of x.</p>
</div><p><br></p>
<div class="center80">
<p>Please read <a href="differential-equations-second-order.html">Introduction to Second Order Differential Equations</a> first, it shows how to solve the simpler "homogeneous" case where f(x)=0</p></div>
<h2>Two Methods</h2>
<p>There are two main methods to solve these equations:</p>
<p class="dotpoint"><b>Undetermined Coefficients</b> (that we learn here) which only works when f(x) is a polynomial, exponential, sine, cosine or a linear combination of those.</p>
<p class="dotpoint"><a href="differential-equations-variation-parameters.html">Variation of Parameters</a> which is a little messier but works on a wider range of functions.</p>
<h2>Undetermined Coefficients</h2>
<p>To keep things simple, we only look at the case:</p>
<p class="center large"><span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> + p<span class="intbl"><em>dy</em><strong>dx</strong></span> + qy = f(x)</p>
<p>where <b>p</b> and <b>q</b> are constants.</p>
<p>The <strong>complete solution</strong> to such an equation can be found
by combining two types of solution:</p>
<ol>
<li>The <b>general solution</b> of the
homogeneous equation</li>
<p class="center"><span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> + p<span class="intbl"><em>dy</em><strong>dx</strong></span> + qy = 0</p>
<li><b>Particular solutions</b> of the
non-homogeneous equation</li>
<p class="center"><span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> + p<span class="intbl"><em>dy</em><strong>dx</strong></span> + qy = f(x)</p>
</ol>
<p>Note that f(x) could be a single function or a sum of two or more
functions.</p>
<p>Once we have found the general solution and all the particular
solutions, then the final complete solution is found by adding all the
solutions together.</p>
<div class="example">
<h3>Example 1: <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> y = 2x<sup>2</sup> x 3</h3>
<p>(For the moment trust me regarding these solutions)</p>
<p>The homogeneous equation <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> y = 0 has a general solution</p>
<p class="center">y = Ae<sup>x</sup> + Be<sup>-x</sup></p>
<p>The non-homogeneous equation <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> y = 2x<sup>2</sup> x 3 has a particular solution</p>
<p class="center">y = 2x<sup>2 </sup>+ x 1</p>
<p>So the complete solution of the differential equation is</p>
<p class="center large">y = Ae<sup>x</sup> + Be<sup>-x</sup> 2x<sup>2 </sup>+ x 1</p>
<p>Lets check if the answer is correct:</p>
<p class="so">y = Ae<sup>x</sup> + Be<sup>-x</sup> 2x<sup>2 </sup>+ x 1</p>
<p class="so"><span class="intbl"><em>dy</em><strong>dx</strong></span> = Ae<sup>x</sup> Be<sup>-x</sup> 4x + 1</p>
<p class="so"><span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> = Ae<sup>x</sup> + Be<sup>-x</sup> 4</p>
<p>Putting it together:</p>
<p class="center"><span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> y = Ae<sup>x</sup> + Be<sup>-x</sup> 4 (Ae<sup>x</sup> + Be<sup>-x</sup> 2x<sup>2 </sup>+ x 1)</p>
<p class="center">= Ae<sup>x</sup> + Be<sup>-x</sup> 4 Ae<sup>x</sup> Be<sup>-x</sup> + 2x<sup>2 </sup> x + 1</p>
<p class="center">= 2x<sup>2</sup> x 3</p>
</div>
<p>So in this case we have shown that the answer is correct, but how do we
find the particular solutions?</p>
<p>We can try <em>guessing</em> ... !</p>
<p>This method is only easy to apply if f(x) is one of the following:</p>
<div class="tbl">
<div class="row"><span class="left">Either:</span><span class="right">f(x)
is a polynomial function.</span></div>
<div class="row"><span class="left">Or:</span><span class="right">f(x)
is a linear combination of sine and cosine functions.</span></div>
<div class="row"><span class="left">Or:</span><span class="right">f(x)
is an exponential function.</span></div>
</div>
<p>And here is a guide to help us with a guess:</p>
<div class="simple">
<table style="border: 0; margin:auto;">
<tbody>
<tr>
<th align="center">f(x)</th>
<th align="center">y(x) guess</th>
</tr>
<tr>
<td style="text-align:center;">ae<sup>bx</sup></td>
<td style="text-align:center;">Ae<sup>bx</sup></td>
</tr>
<tr>
<td style="text-align:center;">a cos(cx) + b sin(cx)</td>
<td style="text-align:center;">A cos(cx) + B sin(cx)</td>
</tr>
<tr>
<td style="text-align:center;">kx<sup>n</sup> <i>(n=0, 1, 2,...)</i></td>
<td style="text-align:center;">A<sub>n</sub>x<sup>n</sup> + A<sub>n1</sub>x<sup>n1</sup> + … + A<sub>0</sub></td>
</tr>
</tbody></table>
</div>
<p>But there is one important rule that must be applied:</p>
<p class="center"><b>You must first find the general solution to the
homogeneous equation.</b></p>
<p>You will see why as we continue on.</p>
<div class="example">
<h3><strong>Example 1 (again)</strong>: Solve <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> y = 2x<sup>2</sup> x 3</h3>
<p>1. Find the general solution of</p>
<p><span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> y = 0</p>
<p>The characteristic equation is: r<sup>2</sup> 1 = 0</p>
<p>Factor: (r 1)(r + 1) = 0</p>
<p class="so">r = 1 or 1</p>
<p>So the general solution of the differential equation is</p>
<p>y = Ae<sup>x</sup> + Be<sup>-x</sup></p>
<p>2. Find the particular solution of</p>
<p><span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> y = 2x<sup>2</sup> x 3</p>
<p>We make a guess:</p>
<p>Let y = ax<sup>2</sup> + bx + c</p>
<p class="so"><span class="intbl"><em>dy</em><strong>dx</strong></span> = 2ax + b</p>
<p class="so"><span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> = 2a</p>
<p>Substitute these values into <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> y = 2x<sup>2</sup> x 3</p>
<p class="so">2a (ax<sup>2</sup> + bx + c) =
2x<sup>2</sup> x 3</p>
<p class="so">2a ax<sup>2</sup> bx c =
2x<sup>2</sup> x 3</p>
<p class="so"> ax<sup>2</sup> bx + (2a c) = 2x<sup>2</sup> x 3</p>
<p>Equate coefficients:</p>
<div class="beach">
<table style="border: 0; margin:auto;">
<tbody>
<tr>
<td style="text-align:center; width:150px;">x<sup>2</sup> coefficients: </td>
<td style="text-align: right;">a = 2 <span style="font-size:140%;"></span>a = 2&nbsp;&nbsp; ...&nbsp;&nbsp; (1) </td>
</tr>
<tr>
<td style="text-align:center; width:150px;">x coefficients: </td>
<td style="text-align: right;">b = 1 <span style="font-size:140%;"></span>b = 1 &nbsp; ...&nbsp;&nbsp; (2)</td>
</tr>
<tr>
<td style="text-align:center; width:150px;">Constant coefficients:</td>
<td style="text-align: right;">2a c = 3&nbsp;&nbsp;
...&nbsp;&nbsp; (3)</td>
</tr>
</tbody>
</table>
</div><br>
<p>Substitute a = 2 from (1) into (3)</p>
<p class="so">4 c = 3</p>
<p class="so">c = 1</p>
<p>a = 2, b = 1 and c = 1, so the particular solution of the
differential equation is</p>
<p style="text-align: center;"><strong>y = 2x<sup>2</sup> + x 1</strong></p>
<p>Finally, we combine our two answers to get the complete solution:</p>
<p style="text-align: center;"><strong>y = Ae<sup>x</sup> + Be<sup>-x</sup> 2x<sup>2 </sup>+ x 1</strong></p>
<p>Why did we guess y = ax<sup>2</sup> + bx + c (a quadratic function)
and not include a cubic term (or higher)?</p>
<p>The answer is simple. The function f(x) on the right side of the
differential equation has no cubic term (or higher); so, if y did have
a cubic term, its coefficient would have to be zero.</p>
<p><b>Hence, for a differential equation of the type<strong> </strong></b><strong><span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> + p<span class="intbl"><em>dy</em><strong>dx</strong></span> + qy = f(x) </strong><b><strong></strong>where
f(x) is a polynomial of degree n, our guess for y will also be a
polynomial of degree n.</b></p>
</div><br>
<div class="example">
<h3><strong>Example 2:</strong> Solve</h3>
<p class="center large">6<span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> 13<span class="intbl"><em>dy</em><strong>dx</strong></span> 5y = 5x<sup>3</sup> +
39x<sup>2</sup> 36x 10</p>
1. Find the general solution of 6<span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> 13<span class="intbl"><em>dy</em><strong>dx</strong></span> 5y = 0
<p>The characteristic equation is: 6r<sup>2</sup> 13r 5 = 0</p>
<p>Factor: (2r 5)(3r + 1) = 0</p>
<p class="so">r = <span class="intbl"><em>5</em><strong>2</strong></span> or <span class="intbl"><em>1</em><strong>3</strong></span></p>
<p>So the general solution of the differential equation is</p>
<p style="text-align: center;"><strong>y = Ae<sup>(5/2)x</sup> + Be<sup>(1/3)x </sup></strong></p>
<p>2. Find the particular solution of 6<span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> 13<span class="intbl"><em>dy</em><strong>dx</strong></span> 5y = 5x<sup>3</sup> +
39x<sup>2</sup> 36x 10</p>
<p>Guess a cubic polynomial because 5x<sup>3</sup> + 39x<sup>2</sup> 36x 10 is cubic.</p>
<p>Let y = ax<sup>3</sup> + bx<sup>2</sup> + cx + d</p>
<p class="so"><span class="intbl"><em>dy</em><strong>dx</strong></span> = 3ax<sup>2</sup> + 2bx + c</p>
<p class="so"><span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> = 6ax + 2b</p>
<p>Substitute these values into 6<span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> 13<span class="intbl"><em>dy</em><strong>dx</strong></span> 5y = 5x<sup>3</sup> +
39x<sup>2</sup> 36x 10</p>
<p class="so">6(6ax + 2b) 13(3ax<sup>2</sup> + 2bx + c) 5(ax<sup>3</sup> + bx<sup>2</sup> + cx + d) = 5x<sup>3</sup> + 39x<sup>2</sup> 36x 10</p>
<p class="so">36ax + 12b 39ax<sup>2 </sup> 26bx 13c 5ax<sup>3</sup> 5bx<sup>2</sup> 5cx 5d = 5x<sup>3</sup> + 39x<sup>2</sup> 36x 10</p>
<p class="so">5ax<sup>3</sup> + (39a 5b)x<sup>2</sup> + (36a 26b
5c)x + (12b 13c 5d) = 5x<sup>3</sup> + 39x<sup>2</sup> 36x 10</p>
<p>Equate coefficients:</p>
<div class="beach">
<table style="border: 0; margin:auto;">
<tbody>
<tr>
<td style="text-align:center; width:150px;">x<sup>3</sup> coefficients: </td>
<td style="text-align: right;">5a = 5 <span style="font-size:140%;"></span><strong>a = 1</strong></td>
</tr>
<tr>
<td style="text-align:center; width:150px;">x<sup>2</sup> coefficients: </td>
<td style="text-align: right;">39a 5b = 39 <span style="font-size:140%;"></span><strong>b = 0</strong></td>
</tr>
<tr>
<td style="text-align:center; width:150px;">x coefficients: </td>
<td style="text-align: right;">36a 26b 5c = 36 <span style="font-size:140%;"></span><strong>c = 0</strong></td>
</tr>
<tr>
<td style="text-align:center; width:150px;">Constant coefficients:</td>
<td style="text-align: right;">12b 13c 5d = 10 <span style="font-size:140%;"></span><strong>d = 2</strong></td>
</tr>
</tbody>
</table>
</div>
<p>So the particular solution is:</p>
<p style="text-align: center;"><strong>y = x<sup>3</sup> + 2</strong></p>
<p>Finally, we combine our two answers to get the complete solution:</p>
<p style="text-align: center;"><strong>y = Ae<sup>(5/2)x</sup> + Be<sup>(1/3)x</sup> x<sup>3</sup> + 2</strong></p>
<p>And here are some sample curves:</p>
<p class="center"><img src="images/diff-eq-undetermined-ex2.svg" height="340" width="550" ></p>
</div><br>
<div class="example">
<h3><strong>Example 3:</strong> Solve <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> + 3<span class="intbl"><em>dy</em><strong>dx</strong></span> 10y = 130cos(x) + 16e<sup>3x</sup></h3><br>
In this case we need to solve three differential equations:
<p>1. Find the general solution to <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> + 3<span class="intbl"><em>dy</em><strong>dx</strong></span> 10y = 0</p>
<p>2. Find the particular solution to <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> + 3<span class="intbl"><em>dy</em><strong>dx</strong></span> 10y = 130cos(x)</p>
<p>3. Find the particular solution to <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> + 3<span class="intbl"><em>dy</em><strong>dx</strong></span> 10y = 16e<sup>3x</sup></p>
<p>&nbsp;</p>
<p>So, heres how we do it:</p>
<p>1. Find the general solution to <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> + 3<span class="intbl"><em>dy</em><strong>dx</strong></span> 10y = 0</p>
<p>The characteristic equation is: r<sup>2</sup> + 3r 10 = 0</p>
<p>Factor: (r 2)(r + 5) = 0</p>
<p class="so">r = 2 or 5</p>
<p>So the general solution of the differential equation is:</p>
<p style="text-align: center;"><strong>y = Ae<sup>2x</sup>+Be<sup>-5x</sup><br>
</strong></p>
<div style="text-align: center;"><strong> </strong></div>
<p>2. Find the particular solution to <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> + 3<span class="intbl"><em>dy</em><strong>dx</strong></span> 10y = 130cos(x)</p>
<p>Guess. Since f(x) is a cosine function, we guess that <em>y</em> is
a linear combination of sine and cosine functions:</p>
<p>Try y = acos(x) + bsin(x)</p>
<p class="so"><span class="intbl"><em>dy</em><strong>dx</strong></span> = asin(x) + bcos(x)</p>
<p class="so"><span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> = acos(x) bsin(x)</p>
<p>Substitute these values into <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> + 3<span class="intbl"><em>dy</em><strong>dx</strong></span> 10y = 130cos(x)</p>
<p class="so">acos(x) bsin(x) +
3[asin(x) + bcos(x)] 10[acos(x)+bsin(x)] = 130cos(x)</p>
<p class="so">cos(x)[a + 3b 10a] +
sin(x)[b 3a 10b] = 130cos(x)</p>
<p class="so">cos(x)[11a + 3b] +
sin(x)[11b 3a] = 130cos(x)</p>
<p>Equate coefficients:</p>
<div class="beach">
<table style="border: 0; margin:auto;">
<tbody>
<tr>
<td style="text-align:center; width:150px;">Coefficients of cos(x): </td>
<td style="text-align: right;">11a + 3b = 130 &nbsp;
...&nbsp;&nbsp; (1)<strong></strong></td>
</tr>
<tr>
<td style="text-align:center; width:150px;">Coefficients of sin(x):</td>
<td style="text-align: right;">11b 3a = 0 &nbsp;
...&nbsp;&nbsp; (2)<strong></strong></td>
</tr>
</tbody>
</table>
</div>
<p>From equation (2), a = <span class="intbl"><em>11b</em><strong>3</strong></span></p>
<p>Substitute into equation (1)</p>
<p class="so"><span class="intbl"><em>121b</em><strong>3</strong></span> + 3b = 130</p>
<p class="so"><span class="intbl"><em>130b</em><strong>3</strong></span> = 130</p>
<p class="so">b = 3</p>
<p class="so">a = <span class="intbl"><em>11(3)</em><strong>3</strong></span> =
11</p>
<p>So the particular solution is:</p>
<p style="text-align: center;"><strong>y = 11cos(x) 3sin(x)</strong></p>
<p>3. Find the particular solution to <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> + 3<span class="intbl"><em>dy</em><strong>dx</strong></span> 10y = 16e<sup>3x</sup></p>
<p>Guess.</p>
<p>Try y = ce<sup>3x</sup></p>
<p class="so"><span class="intbl"><em>dy</em><strong>dx</strong></span> = 3ce<sup>3x</sup></p>
<p class="so"><span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> = 9ce<sup>3x</sup></p>
<p>Substitute these values into <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> + 3<span class="intbl"><em>dy</em><strong>dx</strong></span> 10y = 16e<sup>3x</sup></p>
<p class="so">9ce<sup>3x</sup> + 9ce<sup>3x</sup> 10ce<sup>3x</sup> = 16e<sup>3x</sup></p>
<p class="so">8ce<sup>3x</sup> = 16e<sup>3x</sup></p>
<p class="so">c = 2</p>
So the particular solution is:
<p class="center"><b>y = 2e<sup>3x</sup></b></p>
<p>Finally, we combine our three answers to get the complete solution:</p>
<p style="text-align: center;"><strong>y = Ae<sup>2x</sup> + Be<sup>-5x</sup> + 11cos(x) 3sin(x) + 2e<sup>3x</sup></strong></p>
</div><br>
<div class="example">
<h3><strong>Example 4:</strong> Solve <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> + 3<span class="intbl"><em>dy</em><strong>dx</strong></span> 10y = 130cos(x) + 16e<sup>2x</sup></h3>
<p>This is exactly the same as Example 3 except for the final term,
which has been replaced by 16e<sup>2x</sup>.</p>
<p>So Steps 1 and 2 are exactly the same. On to step 3:</p>
<p>3. Find the particular solution to <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> + 3<span class="intbl"><em>dy</em><strong>dx</strong></span> 10y = 16e<sup>2x</sup></p>
<p>Guess.</p>
<p>Try y = ce<sup>2x</sup></p>
<p class="so"><span class="intbl"><em>dy</em><strong>dx</strong></span> = 2ce<sup>2x</sup></p>
<p class="so"><span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> = 4ce<sup>2x</sup></p>
<p>Substitute these values into <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> + 3<span class="intbl"><em>dy</em><strong>dx</strong></span> 10y = 16e<sup>2x</sup></p>
<p class="so">4ce<sup>2x</sup> + 6ce<sup>2x</sup> 10ce<sup>2x</sup> = 16e<sup>2x</sup></p>
<p class="so">0 = 16e<sup>2x</sup></p>
<p>Oh dear! Something seems to have gone wrong. How can 16e<sup>2x</sup> = 0?</p>
<p>Well, it cant, and there is nothing wrong here except that there is
no particular solution to the differential equation <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> + 3<span class="intbl"><em>dy</em><strong>dx</strong></span> 10y = 16e<sup>2x</sup></p>
...Wait a minute!<br>
The general solution to the homogeneous equation <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> + 3<span class="intbl"><em>dy</em><strong>dx</strong></span> 10y = 0<b>,</b> which is
y = Ae<sup>2x</sup> + Be<sup>-5x</sup>, already has a term Ae<sup>2x</sup>,
so our guess y = ce<sup>2x</sup> already satisfies the differential
equation <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> + 3<span class="intbl"><em>dy</em><strong>dx</strong></span> 10y = 0 (it was just a
different constant.)<br>
<p>So we must guess y = cxe<sup>2x</sup><br>
<br>
Let's see what happens:</p>
<p class="so"><span class="intbl"><em>dy</em><strong>dx</strong></span> = ce<sup>2x</sup> + 2cxe<sup>2x</sup></p>
<p class="so"><span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> = 2ce<sup>2x </sup>+ 4cxe<sup>2x</sup> + 2ce<sup>2x</sup> = 4ce<sup>2x</sup> + 4cxe<sup>2x</sup></p>
<p>Substitute these values into <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> + 3<span class="intbl"><em>dy</em><strong>dx</strong></span> 10y = 16e<sup>2x</sup></p>
<p class="so">4ce<sup>2x</sup> + 4cxe<sup>2x&nbsp; </sup>+ 3ce<sup>2x</sup> + 6cxe<sup>2x </sup> 10cxe<sup>2x</sup> =
16e<sup>2x</sup></p>
<p class="so">7ce<sup>2x</sup> = 16e<sup>2x</sup></p>
<p class="so">c = <span class="intbl"><em>16</em>7</span></p>
<p>So in the present case our particular solution is</p>
<p class="center large">y = <span class="intbl"><em>16</em><strong>7</strong></span>xe<sup>2x</sup></p>
Thus, our final complete solution in this case is:
<p class="center large">y = Ae<sup>2x</sup> + Be<sup>-5x</sup> +
11cos(x) 3sin(x) + <span class="intbl"><em>16</em><strong>7</strong></span>xe<sup>2x</sup><br>
<strong></strong></p>
</div><br>
<div class="example">
<h3><strong>Example 5:</strong> Solve <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> 6<span class="intbl"><em>dy</em><strong>dx</strong></span> + 9y = 5e<sup>-2x</sup></h3>
<p>1. Find the general solution to <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> 6<span class="intbl"><em>dy</em><strong>dx</strong></span> + 9y = 0</p>
<p>The characteristic equation is: r<sup>2</sup> 6r + 9 = 0</p>
<p class="so">(r 3)<sup>2</sup> = 0</p>
<p class="so">r = 3,
which is a repeated root.</p>
<p>Then the general solution of the differential equation is <strong>y = Ae<sup>3x</sup> + Bxe<sup>3x</sup></strong></p>
<p>2. Find the particular solution to <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> 6<span class="intbl"><em>dy</em><strong>dx</strong></span> + 9y = 5e<sup>-2x</sup></p>
<p>Guess.</p>
<p>Try y = ce<sup>-2x</sup></p>
<p class="so"><span class="intbl"><em>dy</em><strong>dx</strong></span> = 2ce<sup>-2x</sup></p>
<p class="so"><span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> = 4ce<sup>-2x</sup></p>
<p>Substitute these values into <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> 6<span class="intbl"><em>dy</em><strong>dx</strong></span> + 9y = 5e<sup>-2x</sup></p>
<p class="so">4ce<sup>-2x</sup> + 12ce<sup>-2x</sup> + 9ce<sup>-2x</sup> = 5e<sup>-2x</sup></p>
<p class="so">25e<sup>-2x</sup> = 5e<sup>-2x</sup></p>
<p class="so">c = <span class="intbl"><em>1</em><strong>5</strong></span></p>
<p>So the particular solution is:</p>
<p class="center large">y= <span class="intbl"><em>1</em><strong>5</strong></span>e<sup>-2x </sup></p>
<p>Finally, we combine our two answers to get
the complete solution:</p>
<p class="center large">y= Ae<sup>3x</sup> + Bxe<sup>3x </sup>+ <span class="intbl"><em>1</em><strong>5</strong></span>e<sup>-2x </sup></p>
</div><br>
<div class="example">
<h3><strong>Example 6: </strong>Solve <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> + 6<span class="intbl"><em>dy</em><strong>dx</strong></span> + 34y = 109cos(5x)</h3>
<p>1. Find the general solution to <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> + 6<span class="intbl"><em>dy</em><strong>dx</strong></span> + 34y = 0</p>
<p>The characteristic equation is: r<sup>2</sup> + 6r + 34 = 0</p>
<p>Use the <u><a href="../algebra/quadratic-equation.html">quadratic
equation formula</a></u></p>
<p>r = <span class="intbl"> <em>b ± √(b<sup>2 </sup> 4ac)</em><strong>2a</strong></span></p>
<p>with a = 1, b = 6 and c = 34</p>
<p>So</p>
<p>r = <span class="intbl"> <em>6 ± √[6<sup>2 </sup> 4(1)(34)]</em><strong>2(1)</strong></span></p>
<p>r = <span class="intbl"> <em>6 ± √(36136)</em><strong>2</strong></span></p>
<p>r = <span class="intbl"> <em>6 ± √(100)</em><strong>2</strong></span></p>
<p>r = 3 ± 5i</p>
<p>And we get:</p>
<p class="so">y =e<sup>-3x</sup>(Acos(5x) +
iBsin(5x))</p>
2. Find the particular solution to <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> + 6<span class="intbl"><em>dy</em><strong>dx</strong></span> + 34y = 109sin(5x)
<p>Since f(x) is a sine function, we assume that y is a linear
combination of sine and cosine functions:</p>
<p>Guess.</p>
<p>Try y = acos(5x) + bsin(5x)</p>
<p>Note: since we do not have sin(5x) or cos(5x) in the solution to the
homogeneous equation (we have e<sup>-3x</sup>cos(5x) and e<sup>-3x</sup>sin(5x),
which are different functions), our guess should work.</p>
<p>Lets continue and see what happens:</p>
<p class="so"><span class="intbl"><em>dy</em><strong>dx</strong></span> = 5asin(5x) + 5bcos(5x)</p>
<p class="so"><span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> = 25acos(5x) 25bsin(5x)</p>
<p>Substitute these values into&nbsp; <span class="intbl"><em>d<sup>2</sup>y</em><strong>dx<sup>2</sup></strong></span> + 6<span class="intbl"><em>dy</em><strong>dx</strong></span> + 34y = 109sin(5x)</p>
<p class="so">25acos(5x) 25bsin(5x) +
6[5asin(5x) + 5bcos(5x)] + 34[acos(5x) + bsin(5x)] = 109sin(5x)</p>
<p class="so">cos(5x)[25a + 30b + 34a] +
sin(5x)[25b 30a + 34b] = 109sin(5x)</p>
<p class="so">cos(5x)[9a + 30b] + sin(5x)[9b
30a] = 109sin(5x)<br>
<span class="intbl"></span></p>
<p>Equate coefficients of cos(5x) and sin(5x):</p>
<div class="beach">
<table style="border: 0; margin:auto;">
<tbody>
<tr>
<td style="text-align:center; width:150px;">Coefficients of cos(5x): </td>
<td style="text-align: right;">9a + 30b = 0 &nbsp;
...&nbsp;&nbsp; (1)<strong></strong></td>
</tr>
<tr>
<td style="text-align:center; width:150px;">Coefficients of sin(5x):</td>
<td style="text-align: right;">9b 30a = 109 &nbsp;
...&nbsp;&nbsp; (2)<strong></strong></td>
</tr>
</tbody>
</table>
</div>
<p>From equation (1), b = <span class="intbl"><em>3a</em><strong>10</strong></span></p>
<p>Substitute into equation (2)</p>
<p class="so">9(<span class="intbl"><em>3a</em><strong>10</strong></span>) 30a = 109</p>
<p class="so">27a 300a = 1090</p>
<p class="so">327a = 1090</p>
<p class="so">a = <span class="intbl"><em>10</em><strong>3</strong></span></p>
<p class="so">b = 1</p>
So the particular solution is:
<p class="center large">y = <span class="intbl"><strong></strong></span><span class="intbl"><em>10</em><strong>3</strong></span>cos(5x) + sin(5x)</p>
<p>Finally, we combine our answers to get the complete solution:</p>
<p class="center large">y = e<sup>-3x</sup>(Acos(5x) +
iBsin(5x)) <span class="intbl"><em>10</em><strong>3</strong></span>cos(5x) + sin(5x)&nbsp;</p>
</div>
<p>&nbsp;</p>
<div class="questions">9509, 9510, 9511, 9512, 9513, 9514, 9515, 9516, 9517, 9518</div>
<div class="related">
<a href="homogeneous-function.html">Homogeneous Functions</a>
<a href="differential-equations.html">Differential Equation</a>
<a href="differential-equations-solution-guide.html">Differential Equations Solution Guide</a>
<a href="index.html">Calculus Index</a>
</div>
<!-- #EndEditable -->
</article>
<div id="adend" class="centerfull noprint"></div>
<footer id="footer" class="centerfull noprint"></footer>
<div id="copyrt">Copyright &copy; 2021 Rod Pierce</div>
</div>
</body>
<!-- #EndTemplate -->
<!-- Mirrored from www.mathsisfun.com/calculus/differential-equations-undetermined-coefficients.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 29 Oct 2022 00:49:30 GMT -->
</html>