Chapter 4. Numerical Differentiation, Integration, and Solutions ofOrdinary Differential Equations

# Chapter 4. Numerical Differentiation, Integration, and Solutions ofOrdinary Differential Equations

This preview shows pages 1–4. Sign up to view the full content.

© 2001 by CRC Press LLC 4 Numerical Differentiation, Integration, and Solutions of Ordinary Differential Equations This chapter discusses the basic methods for numerically finding the value of the limit of an indeterminate form, the value of a derivative, the value of a convergent infinite sum, and the value of a definite integral. Using an improved form of the differentiator, we also present first-order iterator tech- niques for solving ordinary first-order and second-order linear differential equations. The Runge-Kutta technique for solving ordinary differential equa- tions (ODE) is briefly discussed. The mode of use of some of the MATLAB packages to perform each of the previous tasks is also described in each instance of interest. 4.1 Limits of Indeterminate Forms DEFINITION If the quotient u ( x )/ v ( x ) is said to have an indeterminate form of the 0/0 kind. • If the quotient u ( x )/ v ( x ) is said to have an indeterminate form of the / kind. In your elementary calculus course, you learned that the standard tech- nique for solving this kind of problem is through the use of L’Hopital’s Rule, which states that: if: (4.1) then: (4.2) lim ( ) lim ( ) , x x x x u x v x = = 0 0 0 lim ( ) lim ( ) , x x x x u x v x = = ∞ 0 0 lim ( ) ( ) x x u x v x C = 0 lim ( ) ( ) x x u x v x C = 0

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
© 2001 by CRC Press LLC In this section, we discuss a simple algorithm to obtain this limit using MATLAB. The method consists of the following steps: 1. Construct a sequence of points whose limit is x 0 . In the examples below, consider the sequence Recall in this regard that as n , the n th power of any number whose magnitude is smaller than one goes to zero. 2. Construct the sequence of function values corresponding to the x - sequence, and find its limit. Example 4.1 Compute numerically the Solution: Enter the following instructions in your MATLAB command window: N=20; n=1:N; x0=0; dxn=-(1/2).^n; xn=x0+dxn; yn=sin(xn)./xn; plot(xn,yn) The limit of the yn sequence is clearly equal to 1. The deviation of the sequence of the yn from the value of the limit can be obtained by entering: dyn=yn-1; semilogy(n,dyn) The last command plots the curve with the ordinate y expressed logarithmi- cally. This mode of display is the most convenient in this case because the ordinate spans many decades of values. In-Class Exercises Find the limits of the following functions at the indicated points: Pb. 4.1 Pb. 4.2 x x n n = 0 1 2 . lim sin( ) . x x x 0 ( ) ( ) x x x x 2 2 3 3 3 at 1 1 0 + sin( ) sin( ) x x x x at
© 2001 by CRC Press LLC Pb. 4.3 Pb. 4.4 Pb. 4.5 4.2 Derivative of a Function DEFINITION The derivative of a certain function at a particular point is defined as: (4.3) Numerically, the derivative is computed at the point x 0 as follows: 1. Construct an x -sequence that approaches x 0 .

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern