Differential Equations Day 1 -- Introduction & Slope Fields
Introduction and Algebra Equations
The first thing we absolutely must discuss is what a differential equation [i]is[/i]. [br][br]By the end of this activity you should know what a differential equation (or "DiffyQ" for short) is, what it means for a function to be a solution of a differential equation, and how you can verify--both geometrically and algebraically--with GeoGebra that a function is in fact a solution to a differential equation. [br][br]First, let's review something you're already familiar with: an algebraic equation. For instance these are two algebraic equations:[br][br]1. [math]5x+10=15[/math][br][br]2. [math]\left|x\right|=5[/math][br][br]For equation 1, the answer is [math]x=1[/math]. You can verify that [math]x=1[/math] is a solution by putting 1 in place of [i]x[/i] and then verifying that there is equality between the left and right side:[br][br]1. [math]5\cdot1+10=15[/math][br][br]For equation 2, the answers are [math]x=-5[/math] and [math]x=5[/math]. You can verify that these are both solutions by putting -5 and 5 in for [i][math]x[/math][/i] (one at a time) and verifying that in both equations there is equality between the left and right sides. [br][br]2. [math]\left|-5\right|=5[/math][br][br]In an algebraic equation, generally the unknown quantity "[i][math]x[/math][/i]" is a number. An algebraic equation is "solved" when a specific number is found that can be put in place (or "substituted") for the unknown, and equality is maintained. You probably already know this, but you may have never thought about it in this way before. [br][br]It's important that you stop and think through this basic fact about Algebra before proceeding. This way of thinking about algebraic equations and their solutions sets the stage nicely for defining a differential equation.
Differential Equations
[b]Definition: [/b]A [b]differential equation[/b] is an equation in which the unknown is a function, and various derivatives of the unknown function are related to each other in an equation. A differential equation is said to be [b]solved[/b] when a function (or family of functions) is found which can be substituted for the unknown function, and equality is maintained. [br][br]For example here are two differential equations:[br][br]1. [math]f'=3x^2[/math][br][br]2. [math]f'=\frac{x}{f}[/math][br][br]In both of the examples, the unknown function is [i][math]f[/math][/i], or [math]f(x)[/math]. Differential equations are often re-written with [i][math]y[/math][/i] instead of [i][math]f[/math][/i] (or instead of [math]f(x)[/math] ), and [math]f'[/math] re-written as [math]dy/dx[/math]. In other words [i][math]f[/math][/i], [math]f(x)[/math], and [i][math]y[/math][/i] all essentially mean the same thing. Similarly, [i][math]f'[/math][/i], [i][math]f'(x)[/math][/i] and [i][math]dy/dx[/math][/i] all essentially meant the same exact thing.[br][br]For instance the above differential equations are often re-written as the following equivalent differential equations:[br][br]1. [math]\frac{dy}{dx}=3x^2[/math][br][br]2. [math]\frac{dy}{dx}=\frac{x}{y}[/math][br][br]You may also see [i][math]y'[/math][/i] as shorthand for [math]dy/dx[/math]. I sincerely apologize about the variety of notation used in denoting differential equations! Unfortunately, there's nothing I can do about it.[br][br]Throughout this course we will be learning to categorize differential equations based on characteristics they exhibit. We'll also then learn algebraic solution techniques for finding solution functions of the equations. However, you only need basic Calculus 1 derivative skills to verify that a function is in fact a solution to a differential equation. [br][br]For instance let us check that the following are solutions to the above differential equations.[br][br]1. [math]f\left(x\right)=x^3+C[/math][br][br]The derivative of this family of functions is [math]f'\left(x\right)=3x^2[/math]. Note that I have to say "family of functions" because of the "[math]+C[/math][i]". [/i]In reality, [math]f\left(x\right)=x^3+C[/math] is an infinite family of functions, one for each possible value of [i][math]C[/math][/i] from negative infinity to positive infinity. Don't sweat this now however. Focus on how this function is in fact a solution to the differential equation. In fact, there's nothing to do. The differential equation was [math]f'=3x^2[/math] and the derivative of [i]f[/i] is the same thing as the differential equation.[br][br]2.[math]f\left(x\right)=\pm\sqrt{x^2+c}[/math][br][br]The derivative is [math]f'(x)=\pm\frac{1}{2}(x^2+c)^{-1/2}2x=\pm\frac{x}{\left(x^2+c\right)^{\frac{1}{2}}}=\pm\frac{x}{\sqrt{x^2+c}}[/math]. Replacing [math]\pm\sqrt{x^2+c}[/math] with [i][math]f[/math] [/i]shows us that [i][math]f[/math][/i] is a solution of the differential equation [math]f'=x/f[/math].
Visualizing Differential Equations and Solutions With Slope Fields
The most powerful tool for visualizing differential equations and their solutions are called [b]slope fields[/b]. A slope field plots [math]dy/dx[/math] as tiny slope marks by thinking of [math]dy/dx[/math] as a function of two variables [i][math]x[/math][/i] and [i][math]y[/math][/i]. [br][br]It's possible to plot slope fields by hand, but we'll mostly explore slope fields with the assistance of GeoGebra. [br][br]First we will look at the differential equation [math]\frac{dy}{dx}=3x^2[/math][br][br]You can create slope fields in GeoGebra by being sure [math]dy/dx[/math] is isolated on the left side of the equation, and then passing the right hand side to the function [code]slopefield()[/code] in the input bar. For instance, this code will plot the slope field of the above differential equation:[br][br][code]slopefield(3x^2) [/code][br][br]The family of solution functions can then be plotted by typing this code into the input bar (and I agreed to "Create a Slider for c" when prompted).[br][br][code]f(x)=x^3+c[/code][br][br]Look at the applet below. Try adjusting the slider for [code]c[/code] to explore how changes in [code]c[/code] impact [code]f[/code]. What do you notice about how [code]f[/code] relates to the slope field of the differential equation. Notice that the visual cue that a function is a solution to the differential equation is that the slope field always matches the tangent line of every function at every point. In other words, the function precisely follows the "guides" the slope field tick marks offer.[br][br]
Now try out equation 2 and its solution on your own below.[br][br]Equation 2:[br][math]\frac{dy}{dx}=\frac{x}{y}[/math] -- code: [code]slopefield(x/y)[/code][br]Solution to Equation 2:[br][math]f\left(x\right)=\pm\sqrt{x^2+c}[/math] -- code [code]f_1(x)=sqrt(x^2+c)[/code] and [code]f_2(x)=-sqrt(x^2+c)[/code] -- SAY YES to create a slider for c!
Using GeoGebra to Check a Solution of a Differential Equation
[code][/code]You can also use the Algebra Pane of GeoGebra to check if a function is a solution to a differential equation.[br][br]First, rearrange the summands of the differential equation so that everything is on one side of the equation, and the other side is 0. For instance, in the case of [br][br][math]y'=\frac{x}{y}[/math][br][br]this would mean[br][br][math]y'-\frac{x}{y}=0[/math][br][br]or[br][br][math]\frac{x}{y}-y'=0[/math][br][br]It doesn't matter which of the above you use. [br][br]Now to use GeoGebra to check that[br][br][math]f(x)=\pm\sqrt{x^2+c}[/math][br][br]is a solution, first type both functions into GeoGebra with[br][br][code]f_1(x)=sqrt(x^2+c)[/code][br][br]and[br][br][code]f_2(x)=-sqrt(x^2+c)[/code][br][br]Be sure to agree to create a variable [code]c[/code].[br][br]Now calculate their derivatives with[br][br][code]derivative(f_1)[/code][br][br]and [br][code][br]derivative(f_2)[/code][br][br]Now the key step is to type this into GeoGebra[br][br][code]simplify(f_1'-x/f_1)[/code][br][br]and[br][br][code]simplify(f_2'-x/f_2)[/code][br][br]both of these should be 0. If not, then the functions are not solutions. Note that the input to [code]simplify( )[/code] in both of the above commands is the non-zero side of the differential equation, but with the functions [code]f_1[/code] and[code] f_2[/code]. All of this has been done for you in the applet below![br]
Differential Equations Day 13 -- Second Order Differential Equations
Overview
Up to this point we've only studied first order differential equations. This means that the highest derivative of the unknown function we've been on the hunt for is the first derivative. [br][br]In this lesson we'll begin studying [b]second order differential equations[/b]. Thus there will now be a second derivative in the differential equation, and our job will be to find a function that satisfies the differential equation.
Second Order, Homogeneous, Constant Coefficient Differential Equations
The first type of second order differential equation we will encounter is called [b]homogeneous with[/b] [b]constant coefficients[/b]. For example, this is a second order differential equation which is homogeneous with constant coefficients:[br][br][math]\frac{d^2y}{dx^2}=3\frac{dy}{dx}-2y[/math][br][br]The adjective [b]homogeneous[/b] means that if we put every summand involving the unknown function [i]y[/i] on the left hand side of the differential equation, and every summand not involving [i]y[/i] on the right hand side, then the right hand side is 0. [br][br]For instance, the above differential equation has three summands involving [i]y[/i]:[br][br][math]\frac{d^2y}{dx^2},3\frac{dy}{dx},-2y[/math][br][br]After moving these three summands to the left side of the differential equation[br][br][math]\frac{d^2y}{dx^2}-3\frac{dy}{dx}+2y=0[/math][br][br]then the right hand side is 0, and so it is homogeneous. Putting the differential equation in this form is known as the [b]standard form[/b] (for second order homogeneous constant coefficient differential equations). [br][br]If there were a constant or a function of [i]x[/i] (the independent variable) remaining on the right hand side, then the differential equation would be called [b]non-homogeneous[/b], and we will see a bit about how to handle these in a later lesson. [br][br]The adjective [b]constant coefficients[/b] means that the coefficients of the summands on the left hand side are constants, or numbers. We won't see much if anything about how to handle second order homogeneous equations without constant coefficients. [br][br]
Checking If a Function is a Solution
Just as was the case in first order differential equations, you only need Algebra and Calculus 1 knowledge to check if a function is a solution of a second order differential equation.[br][br]For instance, let's check that [br][br][math]f\left(x\right)=e^x+e^{2x}[/math][br][br]is a solution of the differential equation[br][br][math]\frac{d^2y}{dx^2}-3\frac{dy}{dx}+2y=0[/math][br][br]First we must calculate the derivative of the function using the monkey rules from calculus 1.[br][br][math]f'\left(x\right)=e^x+2e^{2x}[/math][br][br]Now we must also calculate the second derivative [br][br][math]f''\left(x\right)=e^x+4e^{4x}[/math][br][br]It must be the case that if we substitute the function, [i]f(x)[/i], it's derivative [i]f'(x)[/i], and its second derivative [i]f''(x)[/i] into the differential equation, that equality must be maintained. Let's see:[br][br][math]\frac{d^2y}{dx^2}-3\frac{dy}{dx}+2y=0[/math][br][br][math]\left(e^x+4e^{2x}\right)-3\left(e^x+2e^{2x}\right)+2\left(e^x+e^{2x}\right)=0[/math][br][br][math]e^x+4e^{2x}-3e^x-6e^{2x}+2e^x+2e^{2x}=0[/math][br][br][math]3e^x-3e^x+6e^{2x}-6e^{2x}=0[/math][br][br][math]0=0[/math][br][br]If we had not arrived at a true equation (such as 0=0), then the function [i]f[/i] would NOT have been a solution. On your own, check that the following is a solution of the differential equation no matter what the constants [i][math]c_1[/math][/i] and [i][math]c_2[/math][/i] are. [br][br][math]f\left(x\right)=c_1\cdot e^x+c_2\cdot e^{2x}[/math]
The Algebraic Method for Solving Second Order Homogeneous Constant Coefficient Differential Equations
[list=1][*]Put the equation in standard form [math]a\cdot\frac{d^2y}{dx^2}+b\cdot\frac{dy}{dx}+c\cdot y=0[/math][br][/*][*]Set up the [b]auxiliary equation[/b] [math]ar^2+br+c=0[/math] (note: this is sometimes also called the [b]characteristic equation[/b])[/*][*]Solve the auxiliary (AKA characteristic) equation to obtain two roots [math]r_1[/math] and [math]r_2[/math] using methods from Algebra 1 or the GeoGebra CAS. [/*][*]If [math]r_1\ne r_2[/math] and if the roots are both real numbers, then the [b]general solution[/b] of the differential equation is [math]f(x)=c_1e^{r_1x}+c_2e^{r_2x}[/math][br][/*][*]If [math]r_1=a+bi[/math] and [math]r_2=a-bi[/math] are complex conjugates, then use [b][url=https://en.wikipedia.org/wiki/Euler%27s_formula]Euler's Formula[/url][/b] [math]e^{a+bi}=e^a\left(\cos\left(b\right)+i\cdot\sin\left(b\right)\right)[/math] to obtain the real part of the general solution [math]f(x)=c_1e^{ax}\cos\left(bx\right)+c_2e^{ax}\sin\left(bx\right)[/math]. We will see more about how to handle this in a later lesson. [br][/*][*]If [math]r_1=r_2[/math], then we will see how to handle this in a later lesson. [/*][*]If initial conditions on [i]y[/i] and [i]y[/i]' are present, then use them to obtain a [b]specific solution[/b]. This requires solving a system of equations; use Algebra 1 or the GeoGebra CAS.[/*][*](optional) Check your work by calculating the first and second derivatives and substituting to check for equality. [/*][/list]
Example 1
Let's use the algebraic method to solve the equation from above[br][br][math]\frac{d^2y}{dx^2}-3\frac{dy}{dx}+2y=0;y'\left(0\right)=2;y\left(0\right)=1[/math][br][br][list=1][*]It's already in standard form. [/*][*]The auxiliary (characteristic) equation is [math]r^2-3r+2=0[/math] which we factor [math](r-1)(r-2)=0[/math].[/*][*]The roots are [math]r_1=1[/math] and [math]r_2=2[/math].[/*][*]Since the roots are distinct the general solution is [math]f(x)=c_1e^{1\cdot x}+c_2e^{2\cdot x}=c_1e^x+c_2e^{2x}[/math] which is what we saw above[/*][*]The roots are not complex, so this step is not needed.[/*][*]The roots are not repeated, so this step is not needed. [/*][*]See below.[/*][*]Do this on your own.[/*][/list]To find the specific solution, we need to solve the system of equations[br][br][math]y(0)=1=c_1e^0+c_2e^{2\cdot0}=c_1+c_2[/math][br][math]y'\left(0\right)=2=c_1e^0+2c_2e^{2\cdot0}=c_1+2c_2[/math][br][br]Focusing on the key bits, we need to solve[br][br][math]1=c_1+c_2[/math][br][math]2=c_1+2c_2[/math][br][br]for [math]c_1[/math] and [math]c_2[/math]. [br][br]This is a task from Algebra 1, but also you learn how to solve systems like this in Linear Algebra. [br][br]In this course however, we'll use GeoGebra's CAS to solve systems of linear equations. See the documentation [url=https://wiki.geogebra.org/en/Solve_Command]here[/url]. To solve this system, open the CAS perspective in GeoGebra, and enter this code in a new line:[br][br][code]Solve({1=c_1+c_2, 2=c_1+2c_2},{c_1,c_2})[/code][br][br]I've done this below:
Therefore the specific solution for the differential equation that solves the initial condition as well is[br][br][math]f(x)=0\cdot e^x+1\cdot e^{2x}[/math][br][br]or simply[br][br][math]f\left(x\right)=e^{2x}[/math][br][br]Take a moment, and verify that [math]f(0)=1[/math] and [math]f'(0)=2[/math] to confirm to yourself that the initial condition is in fact satisfied.
Example 2 (on your own)
Try solving this second order homogeneous constant coefficient differential equation with an initial condition:[br][br][math]y''+2y'-8y=0;y\left(0\right)=1;y'\left(0\right)=4[/math]
A Word on Visualizing Second Order Differential Equations
Now that we've seen the algebraic method for solving these equations, you may be wondering if there is something like a slope field that can be used to visualize second order (or higher) differential equations. [br][br]The short answer is: yes. [br][br]The long answer is: it's a bit more complicated than you may be expecting. [br][br]We'll see how to visualize second order and higher order differential equations with higher dimensional slope fields via a method called [b]systemification[/b] in a later lesson. Unfortunately, for now, learning about systemification is more than we should try to chew at the moment. So we'll have to agree to look forward to seeing this in a later lesson.
Differential Equations Day 21 -- Introduction to Systems of Differential Equations
Overview
Earlier we saw how to use systems of first order differential equations as a way to represent second order differential equations. This was an essential step in order to use numerical methods such as Euler's Method and RK4 to estimate specific solutions. [br][br]Now we'll study systems of first order differential equations in their own right, independent of any relationship they have to second order differential equations. [br][br]The theory of systems of first order differential equations is beautiful and parallels the theory of eigenvalues and eigenvectors from linear algebra. We'll take a look at this in later lessons. For today we will start by looking at an application to get ourselves acquainted with the topic: [br][br][list][*]A linear constant coefficient model of two species -- predator and prey. [/*][/list][br]There are more sophisticated non-linear, non constant coefficient models of this process, but we won't worry about it while we're just getting acquainted with systems of differential equations.
A Linear Predator and Prey Model
The [url=https://www.stowelandtrust.org/conserved/properties/bouchardfarmlandmarkmeadow]Landmark Meadow[/url] in Stowe, VT is a great habitat for owls and mice. The two species have a predator and prey relationship; the mice are the prey of the owl, who are predators. Naturally, an abundance of mice is good for the owls, while a dearth of owls is good for the mice. Similarly, too many owls is bad for the mice. In this way, the populations of mice and owls are inter-related. This makes these populations a perfect example of something that can be modeled with a system of equations.[br][br]To do so, we need make a few assumptions about the way the presence of each species affects the rate of change of each species. We can and [i]will[/i] change them later to be more robust and reflective of reality, but for now this is a fine start:[br][br][list][*]On average, an owl eats 2 mice per day. So each owl represents a reduction in the mouse population of 2 mice per day.[/*][*]On average, each owl reproduces 0.003 times per day (in other words, each owl is the parent of 1 new baby owl per year). So each owl represents an increase in the owl population of 0.003 owls per day.[/*][*]On average, each mouse reproduces 0.055 times per day (in other words, each mouse is the parent of about 20 new baby mice per year). So each mouse represents an increase in the mouse population of 0.055 mice per day.[/*][/list][br]We could add additional assumptions about how these owl and mouse populations impact the rate of change of each other's populations, but this is enough to get started. [br][br]Now let's attempt to build a model of the mouse population with a function [math]M(t)[/math], and a model of the owl population by a function [math]O(t)[/math]. The independent variable, [math]t[/math], is in days in both models. Remember: these are only [i]models. [/i]They are not reality. So don't overthink them.[br][br]The rates of change of these models are governed by the above assumptions. In particular:[br][br][math]\frac{dM}{dt}=0.055M-2O[/math][br][br][math]\frac{dO}{dt}=0.003O[/math][br][i][br]This[/i] is a system of first order differential equations. Its full name is a [b]homogeneous linear system of differential equations with constant coefficients[/b].
Solution Functions of Linear Predator Prey Model
There is a beautiful theory that involves the eigenvalues and eigenvectors of matrices that is used to construct solutions to these types of systems of differential equations. We'll learn about it soon. For now, we'll just feast on the results of this theory, and check that it does in fact produce solutions.[br][br]I contend that these two functions are general solutions of the above system of equations:[br][br][math]M\left(t\right)=c_1\left(1\right)e^{\frac{11}{200}t}+c_2\left(-500\right)e^{\frac{3}{1000}t}[/math][br][br][math]O\left(t\right)=c_1\left(0\right)e^{\frac{11}{200}t}+c_2\left(-13\right)e^{\frac{3}{1000}t}[/math][br][br]To check, let's enter these two functions, being sure to agree to create sliders for [code]c_1[/code] and [code]c_2[/code].
Now we need to calculate the first derivatives of [code]M(t)[/code] and [code]O(t)[/code] with [code]Derivative()[/code] and check that they solve the differential equation by verifying that both[br][br][code]Simplify(M'-0.055M+2O)[/code][br][br]and[br][br][code]Simplify(O'-0.003O) [br][/code][br][br]are equal to 0.
[i]Voila[/i]! [br][br]We have verified that these two functions are solutions of the system of two first order differential equations!
Visualizing Systems and Their Solutions.
Just as we used slope fields to visualize first order differential equations, and systemifications of second order differential equations, we can use slope fields to visualize first order systems of differential equations.[br][br]To visualize the system from above[br][br][math]\frac{dM}{dt}=0.055M-2O[/math][br][br][math]\frac{dO}{dt}=0.003O[/math][br][br]we'll make the decision to think of [math]M[/math] as [code]y[/code] and [math]O[/math] as [code]x[/code], and plot the slope field of [math]\frac{\left(\frac{dM}{dt}\right)}{\left(\frac{dO}{dt}\right)}[/math]. [i]Note[/i]: we could make the opposite decision about how to think of [math]M[/math] and [math]O[/math], but if we do so we will need to remember to respect this decision later when we get to plotting solution functions as a parametric curve.[br][br]With this decision about [math]M[/math] and [math]O[/math], the code to visualize the system is[br][code][br]Slopefield((0.055y-2x)/(0.003x))[/code][br]
Just as in the case of systemifications of second order differential equations, the general solution functions[br][br][math]M\left(t\right)=c_1\left(1\right)e^{\frac{11}{200}t}+c_2\left(-500\right)e^{\frac{3}{1000}t}[/math][br][br][math]O\left(t\right)=c_1\left(0\right)e^{\frac{11}{200}t}+c_2\left(-13\right)e^{\frac{3}{1000}t}[/math][br][br]can be visualized in the slope field as parametric curves. To do so in this case, first declare the functions (agreeing to create sliders for [code]c_1[/code] and [code]c_2[/code]), and then plot the parametric curve of the solution functions in the slope field with[br][br][code]curve(O(t),M(t),t,-100,1000)[br][/code][br]Note that it's essential that [math]O(t)[/math] is the [code]x[/code] position, and [math]M(t)[/math] is in the [code]y[/code] position of [code]curve()[/code] since we made the decision earlier that [math]O[/math] would play the role of [code]x[/code], and [math]M[/math] the role of [code]y[/code]. We could have made a different decision, but we need to be careful to respect that decision here.[br][br]Also, note that I chose [code]t[/code] to go from -100 to 1000 to give us a wider view of the solution functions.
You may be wondering: where's the curve? Well we just need to zoom out a bit. [br][br]Here it is:
Be sure to explore the variety of solutions by adjusting the sliders for [code]c_1[/code] and [code]c_2[/code]. [br][br]Remember: [math]M(t)[/math], mice, is vertical, or [code]y[/code], and [math]O(t)[/math], owls, is horizontal, or [code]x[/code]. Consequently, at the outset, this solution makes no sense since it represents negative mouse [i]and [/i]owl populations. [br][br]Can you find a set of coefficients that generates a model of mice and owls that does make sense? Playing with these coefficients leads us to thinking for a moment about how to work with initial conditions on our functions, and how initial conditions lead to specific solutions of the equation.
Initial Conditions
One last item to consider in this example are initial conditions on [math]M(t)[/math] and [math]O(t)[/math]. For instance, perhaps we know that at some point in time when we want to start a model there were 13 owls and 499 mice living in Landmark Meadow. In other words [math]M(0)=499[/math] and [math]O(0)=13[/math].[br][br]We can solve a system of [i]algebraic[/i] equations to discover the values of [code]c_1[/code] and [code]c_2[/code] that lead to specific functions [math]M(t)[/math] and [math]O(t)[/math] that both solve the system of [i]differential[/i] equations, and match these initial conditions. [br][br]To this, we need to solve the system of algebraic equations:[br][br][math]M\left(0\right)=c_1\left(1\right)e^{\frac{11}{200}0}+c_2\left(-500\right)e^{\frac{3}{1000}0}=c_1-500c_2=499[/math][br][br][math]O\left(t\right)=c_1\left(0\right)e^{\frac{11}{200}0}+c_2\left(-13\right)e^{\frac{3}{1000}0}=-13c_2=13[/math][br][br]Take a moment to think of a few ways to solve this system. In the end, note that [math]c_2=-1[/math] and [math]c_1=-1[/math].[br][br]Be sure to use the above applet to visualize these constants, the solution in the slope field. What can you say about the future of the mouse population in these initial conditions?
Closing Remarks on the Mathematics Ahead
Note that for all selections of coefficients, the curve [code]a[/code] always moves [i]away [/i]from the asymptotic linear axes of the slope field as [code]t[/code] increases. When solutions do this, they are described as [b]unstable[/b] solutions since the populations never stabilize towards a proportional relationship with each other, and instead diverge from a proportional relationship.[br][br]Describing all the different types (stable and unstable) of a system based on the variety of different combinations of the constants is called a [b]phase space analysis [/b](or [b]phase portrait analysis[/b]), and we'll discuss it in detail after we get through a bit of theory of solving systems of differential equations with constant coefficients.
Differential Equations Day 25 -- Picard's Method of Successive Approximations
Overview:
After studying the various methods for solving and numerically estimating solutions to a variety of differential equations, you might wonder if there is any theory that informs the existence and uniqueness of the solutions you have found. [br][br]The answer--under certain conditions as described in the following theorem--is "yes". [i]Note[/i]: the word "theorem" just means "math fact."[br][br][br][b]Theorem [Picard, [/b][b]Lindelöf]:[/b] For a first order differential equation with initial condition[br][br][math]\frac{dy}{dx}=f\left(x,y\left(x\right)\right);y\left(x_0\right)=y_0[/math][br][br]if [math]f(x,y)[/math] [i]and[/i] [math]\frac{d}{dy}f\left(x,y\right)[/math] are continuous at [math](x_0,y_0)[/math][b],[/b] then [i][u]there exists[/u] [/i]a[i] [u]unique[/u] [/i]function [math]\phi\left(x\right)[/math] solving the differential equation, and matching the initial condition (i.e. [math]\phi\left(x_0\right)=y_0[/math]).[br][br][br]The proof of this theorem relies on studying the elements of the so-called[b] Picard Method of Successive Approximations.[/b] [br][br]The Picard Method constructs a sequence of functions that converge to exactly one solution function of the differential equation with initial condition. The proof is a classic in mathematics because it brings together two different types of mathematical thinking: analysis/topology and algebra. The proof that the sequence converges relies on the Banach Fixed Point Theorem from metric space/topological theory. For the proof of the Picard/Lindelöf theorem about the existence and uniqueness of solutions of differential equations, see [url=https://en.wikibooks.org/wiki/Ordinary_Differential_Equations/The_Picard%E2%80%93Lindel%C3%B6f_theorem]here[/url]. For the proof of the the Banach Fixed Point Theorem of contractions on complete metrics spaces, see [url=https://proofwiki.org/wiki/Banach_Fixed-Point_Theorem]here[/url].[br][br]For the remainder of this lesson, we'll focus purely on the Picard Method of successive approximations.[br][br]Picard's Method generates a sequence of increasingly accurate algebraic approximations of the specific exact solution of the first order differential equation with initial value. The sequence is called [b]Picard's Sequence of Approximate Solutions, [/b]and it can be shown that it converges to exactly one function, [math]y=\phi\left(x\right)[/math], of the independent variable. [br][br]In addition to its theoretical importance, Picard's Method also offers an algebraic alternative to numerical methods such as Euler's Method or RK4.
Picard's Method of Successive Approximations:
Given a first order differential equation with initial value[br][br][math]\frac{dy}{dx}=f\left(x,y\right);y\left(0\right)=y_0[/math][br][br]Picard's Sequence of Successive Approximate Solutions is generated by the following formula[br][br][math]\phi_{n+1}\left(x\right)=\int_0^xf\left(s,\phi_n\left(s\right)\right)ds[/math][br][br]where [math]\phi_0\left(x\right)=y_0[/math]. [br][br]The sequence of successive approximations in the case of a specific differential equation can be explored in the applet below.
About the Applet:
The applet below illustrates Picard's Sequence of Successive Approximate Solutions to the differential equation with initial condition[br][br][math]\frac{dy}{dx}=2x\left(1+y\right);y\left(0\right)=0[/math][br][br]The exact specific solution can be found via the method of separation, and is pictured in purple. [br][br]The elements of Picard's Sequence are shown in green. [br][br]Slide the variable to see successively more accurate elements of Picard's Sequence converge to the exact specific solution.
We'll work out the algebraic details of the approximations being calculated in the next lesson.[br][br]For now, just focus on observing how the green curves (the Picard Sequence of Successive Approximations) become better and better approximations of the purple curve (the specific solution of the differential equation and the initial condition). [br][br]On the next page, you'll find a calculator which lets you explore different differential equations and different initial conditions. Check it out!
Differential Equations Day 27 -- Closing Thoughts
A Closing Mantra for Differential Equations
We've come to the end of this introductory course on Differential Equations. There's so much more out there to learn, but this is a good survey of the basics, and so it's a good place to stop. We haven't dipped our toe into partial differential equations unfortunately, but the principles we've discussed at length here apply to that as well. It's just new methods and new data structures to keep track of.[br][br]With so much content both from this course, and what you might study outside this course, it can be tricky to organize it all, so I thought I'd share a mantra of mine for keeping all the material and theory of differential equations straight:[br][br][quote]Represent visually; go with the flow; look up algebraic/numerical methods.[/quote]What does this mean though? Let's take it piece by piece.
Represent it Visually
This first part of the mantra is a reminder that every differential equation has a geometric representation. [br][br]Let's take for instance[br][br][math]xy'=y+2x^3;y\left(1\right)=2[/math][br][br]This differential equation and initial condition has a visual representation. Put it in slope field form, and then use GeoGebra to visualize.
Go With the Flow
The second part of the mantra means that even if you can't find the algebraic solution, you can use the slopefield to get a sense of what the specific solution is likely to be. In this case, we can tell that the specific solution appears to be something like a cubic function just by "going with the flow" of the slope field. [br][br]It's not a bad idea to sketch an estimated solution right away. Also, don't forget, numerical methods all rely on this principle so doing a sketch helps set your mind up for being in the right place to implement numerical methods.[br][br]Here's a sketch of the solution.
Look up Algebraic Methods
The last part of the mantra is a reminder to yourself to permit yourself to look up algebraic or numerical methods. For that, refer to this book, or others, for examples of how to use an algebraic method to solve a differential equation. [br][br]In this particular example, this particular differential equation screams "linearity". The key to recognizing that a differential equation is linear is to see echos of the standard linear form in its current expression. The standard linear form is[br][br][math]y'+p(x)y=g(x)[/math][br][br]You can go back and review the method here: https://www.geogebra.org/m/cxgtwkqa#material/dpguwczw[br][br]For this particular differential equation, we can put it in standard linear form as[br][br][math]y'-\frac{1}{x}y=2x^2;y(1)=2[/math][br][br]Written this way, we see [math]p(x)=-1/x[/math] and [math]g(x)=2x^2[/math]. Now we apply the algebraic method (in particular the formula) for linear differential equations.[br][br]1. [math]\int p\left(x\right)dx=\int-\frac{1}{x}dx=-\ln\left(x\right)=\ln\left(x^{-1}\right)[/math][br]2. [math]e^{\int p\left(x\right)dx}=e^{\ln\left(x^{-1}\right)}=x^{-1}[/math][br]3.,4.,5. [math]y\left(x\right)=\frac{\int e^{\int p\left(x\right)dx}g\left(x\right)dx+c}{e^{\int p\left(x\right)dx}}=\frac{\int x^{-1}\cdot2x^2dx+c}{x^{-1}}=\frac{\int2x^{ }dx+c}{x^{-1}}[/math][br][math]=\frac{x^2+c}{x^{-1}}=x^3+c\cdot x[/math][br]6. The general solution is [math]y(x)=x^3+c\cdot x[/math]. The initial condition is that when [math]x[/math] is 1 [math]y[/math] should be 2. Thus [math]y(1)=1^3+c\cdot1=2[/math] which implies that [math]c=1[/math], and the specific solution is therefore [math]y(x)=x^3+x[/math].[br][br]Don't forget to visualize it in GeoGebra!
More Practice
The best thing to do is to spend time practicing. If you're interested, here's a sheet of several differential equations that you can use to practice.