Higher-Order Ordinary Differential Equations
Background: Another example of for Forward Differencing
Recall how we used forward finite differencing to simulate the behavior of a function that changed proportional to its current size in Lecture 19. Consider now a function that changes "how fast it changes" proportional to its current change and its current value--in other words its current acceleration is proportional to its velocity and to its size:
Let's work out how to find a finite differencing function:
This is the current change or approximation to velocity
This is the current change in change or approximation to acceleration
Our model is that the acceleration is proportional to size of the current function and its velocity, let these proportions be: -α and -β
Solve this for the "latest" values
Replace to find the form of the solution
Notice that this forward differnce needs TWO consectutive past values before it can calculate the current value, create a function to Appends the current value to a list by using the last two values:
The fact that TWO consecutive values are needed is not surprising. Because this iteration procedure is giving an approximation to the solution of a second-order ODE, we need to make a numerical approximation to a second derivative. THREE points—the two consecutive ones and the current one—are needed to do this. (If only two points were used, you could only compute the slope of the straight line connecting the points; if three points are used, a circle can be fit to the three points and the inverse of its radius gives the curvature.)
Define a function for specific parameters of the General case, and use it to generate a sequence of length 20
Visualize results (it takes about 45 seconds to visualize 20000 iterations)
Change parameters for Growth Function:
Second-Order Linear Homogeneous ODEs with Constant Coefficients, Analysis of the Solution Basis
Analysis of basis solutions to y'' + βy' + γy = 0 in terms of constant coefficients β and γ
First write a general expression for this homogeneous ODE:
Guess a solution and substitute it into the left-hand side of the ODE:
This will be a solution when the resulting quadratic expression in λ is equal to 0:
Assuming that β and γ are real, the solutions can be characterized by the roots of the quadratic equation. That is, our solution is known to be
: the solution monotonically grows or shrinks in time if the roots are real-positive or real-negative. The condition that the roots are real is γ <![]()
If the roots have an imaginary part, the solutions can oscillate. Whether the oscillation amplitudes grow or shrink depends on whether the real part of λ is positive or negative.
We now do some calculations to make an annotated map on the β–γ plane of solution scenarios for the λ values:
If the roots complex, then the sign of the real part is determined only by the sign of β; i.e., λ =
±
Find the conditions where the real roots are positive and/or negative
Determination of Specific Solution using Boundary Values
Second order ODEs require that two conditions be specified to generate a particular solution.
Example of y(0) = 0 and y(L)=1
The general solution will have the form:
Apply the two boundary conditions and solve the resulting equations for constants CPlus and CMinus:
Write the resulting solution:
Second example with different form of boundary condition: y(0) = 1 and y'(0)=0
Now the constants CPlus and CMinus are found by solving:
And the new solution is:
Example of Higher-Order equation and Visualization of Solutions:
The Beam Equation
Visualizing Beam Deflections:
Set up the ODE solution (we will specify a unit beam stiffness) EI = 1
Set up some typical boundary conditions:
Clamped Beam, loaded at the end
Clamped Beam, Free end, unit applied load
Clamped Beam, Point load at end, Point load at Middle
Point Loaded on both ends, loaded in the middle as above
Point Loaded on both ends, with linear distributed load positive at left and negative at right
Clamped on both ends, with a "box" placed at x = 3/4
| Created by Mathematica (November 8, 2005) |