Differential Equations Day 17 -- Revisiting Systemification & Euler's Method for Second Order Differential Equations
Overview
Earlier we saw how to perform systemification, the process of converting a single second order differential equation into a system of first order differential equations.
In this lesson we will revisit this process, and see how to bring Euler's Method for estimating solutions of differential equations into the fold.
By the end of this lesson you should understand how to systemify a second order equation, how to apply Euler's Method to the system, and then how to translate that back to an estimate of a solution of your second order differential equation.
Review of Systemification
The goal of systemification is to convert a second order differential equation such as
into a system of first order differential equations about two different functions.
Let's take a step back, and review some basics of the concept of systemification. The above second order equation is asking us to find a function which satisfies the second order differential equation. The goal of systemification is to translate this task into the related task of finding two equations, and , which are related to each other by only first derivatives. The reason for doing this is because first derivatives are easier to manage, visualize and numerically engage with than second derivatives. Furthermore, although you may not feel this way now, it's not considerably harder to study two functions at once than one.
Process-wise, the process of systemification is actually quite prosaic, and always goes the same way.
- Introduce two new variables and
- Differentiate these variables to obtain and
- Substitute for in the first equation from step 2 to obtain
- Use Algebra 1 level manipulations to solve the original second order differential equation for
- Substitute the right side of the equation from step 4 for in the second equation from step 2.
- In the new second equation (from step 5) substitute for and for .
- (optional) Drop the ""s on and and their derivatives (you also can do this from the outset in step 1 if you prefer)
- Write down your second order system as
After systemification of a second order differential equation is complete, it is now ready for visualization as a slope field in GeoGebra. Note that these steps are specific to GeoGebra and the
slopefield( )
command.
- On the right hand side of both equations of the system: replace
x_1
withx
, and replacex_2
withy
, and replacet
withT
- Plot
slopefield((x_2')/(x_1'))
but instead of actually typingx_2'
andx_1'
instead put the right hand side of these equations with the substitutions forx
,y
andT
as described in the previous step. Say yes to create a slider forT
.
Practicing Systemification
Let's practice systemification on the second order non-homogeneous constant coefficient differential equation
- and
- and
- and
- The final system is:
x_1'=y
x_2'=4*x+3*y+2*sin(T)
These are then passed to slopefield( )
as
slopefield((4*x+3*y+2*sin(T))/(y))
which results in Euler's Method for Systems of Differential Equations
In an earlier lesson we learned about Euler's Method, a technique to estimate solutions of single first order differential equations. Only a small adjustment to Euler's Method is needed to estimate solutions of systems of first order differential equations such as the systems that obtained from systemification.
Here's how to implement Euler's Method on a system of first order differential equations
with initial conditions and .
- Put the system of first order equations in slope field form (also sometimes called normal form) and identify and . What this means in practice is that the equations are as written above with on the left, and everything else involving , and on the right.
- Select a step count, . This is how many steps of an estimated solution you need.
- Select a step size (sometimes also called or )
- The first estimate point is the , the initial conditions on and The first time point is , the initial time (it's often the case that ).
- Apply the Euler Method formulas to calculate the next estimate point and the next time point (see below for the formulas)
- Continue for steps.
Example of Euler's Method for Systems of Differential Equations
Let's apply Euler's Method to estimate solutions of to the systemification
of the second order differential equation
We'll use for steps.
- The system is already in slope field form; and
- First estimate point: . First time point:
- Next time point: . Next point: . Next point: . Therefore next estimate point is .
- We only need to do one more step. Next time point: . Next point: . Next point: . Therefore the next estimate point is .
slopefield((4*x+3*y+2*sin(T))/(y))
We've also entered the algebraic solution by entering, and hiding
f(t)=4/5*e^(-1*t)+87/85*e^(4*t)-5/17*sin(t)+3/17*cos(t)
Note that we are calling the function f
instead of y
because GeoGebra won't let us name functions y
.
We've also plotted the algebraic solution in the slope field using
a=curve(f(t),f'(t),t,0,10)
As well as this curve evaluated at t=0, t=0.5 and t=1 with
a(0)
a(0.1)
a(0.2)
Lastly, we've also plotted the initial condition, and second and third estimate points from Euler's method
InitialCondition=(2,3)
FirstEstimatePoint=(2.3,4.7)
SecondEstimatePoint=(2.77,7.049967)
As we can see, the numerical method is close, but seems to be systematically in error, and coming up short of the algebraic solution. This is normal case of solutions where one or both of or becomes large fast. Soon we'll see the Runge-Kutta method which is an improvement on Euler's Method that performs considerably better in the setting of second order and higher order systemifications.
On the next page a calculator for using Euler's Method to estimate solutions of systems of first order equations is presented. Be sure to utilize it.
Practice (Quiz Content for VSCS MAT 3310 Students)
Consider the second order homogeneous constant coefficient differential equation with initial conditions
Use the method of systemification to convert this to a system of first order differential equations. Apply Euler's Method to the system with to estimate , , , and .