Differential Equations Day 1 -- Introduction & Slope Fields
Introduction and Algebra Equations
The first thing we absolutely must discuss is what a differential equation is.
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.
First, let's review something you're already familiar with: an algebraic equation. For instance these are two algebraic equations:
1.
2.
For equation 1, the answer is . You can verify that is a solution by putting 1 in place of x and then verifying that there is equality between the left and right side:
1.
For equation 2, the answers are and . You can verify that these are both solutions by putting -5 and 5 in for (one at a time) and verifying that in both equations there is equality between the left and right sides.
2.
In an algebraic equation, generally the unknown quantity "" 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.
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
Definition: A differential equation 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 solved when a function (or family of functions) is found which can be substituted for the unknown function, and equality is maintained.
For example here are two differential equations:
1.
2.
In both of the examples, the unknown function is , or . Differential equations are often re-written with instead of (or instead of ), and re-written as . In other words , , and all essentially mean the same thing. Similarly, , and all essentially meant the same exact thing.
For instance the above differential equations are often re-written as the following equivalent differential equations:
1.
2.
You may also see as shorthand for . I sincerely apologize about the variety of notation used in denoting differential equations! Unfortunately, there's nothing I can do about it.
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.
For instance let us check that the following are solutions to the above differential equations.
1.
The derivative of this family of functions is . Note that I have to say "family of functions" because of the "". In reality, is an infinite family of functions, one for each possible value of 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 and the derivative of f is the same thing as the differential equation.
2.
The derivative is . Replacing with shows us that is a solution of the differential equation .
Visualizing Differential Equations and Solutions With Slope Fields
The most powerful tool for visualizing differential equations and their solutions are called slope fields. A slope field plots as tiny slope marks by thinking of as a function of two variables and .
It's possible to plot slope fields by hand, but we'll mostly explore slope fields with the assistance of GeoGebra.
First we will look at the differential equation
You can create slope fields in GeoGebra by being sure is isolated on the left side of the equation, and then passing the right hand side to the function
slopefield()
in the input bar. For instance, this code will plot the slope field of the above differential equation:
slopefield(3x^2)
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).
f(x)=x^3+c
Look at the applet below. Try adjusting the slider for c
to explore how changes in c
impact f
. What do you notice about how f
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.
Now try out equation 2 and its solution on your own below.
Equation 2:
-- code:
slopefield(x/y)
Solution to Equation 2:
-- code f_1(x)=sqrt(x^2+c)
and f_2(x)=-sqrt(x^2+c)
-- SAY YES to create a slider for c!Using GeoGebra to Check a Solution of a Differential Equation
You can also use the Algebra Pane of GeoGebra to check if a function is a solution to a differential equation.
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
this would mean
or
It doesn't matter which of the above you use.
Now to use GeoGebra to check that
is a solution, first type both functions into GeoGebra with
f_1(x)=sqrt(x^2+c)
and
f_2(x)=-sqrt(x^2+c)
Be sure to agree to create a variable c
.
Now calculate their derivatives with
derivative(f_1)
and
derivative(f_2)
Now the key step is to type this into GeoGebra
simplify(f_1'-x/f_1)
and
simplify(f_2'-x/f_2)
both of these should be 0. If not, then the functions are not solutions. Note that the input to simplify( )
in both of the above commands is the non-zero side of the differential equation, but with the functions f_1
and f_2
. All of this has been done for you in the applet below!