CE317 Computer Methods in Civil Engineering


Assignment #1

Due date: 5 October 2002

1-     Consider the function . Estimate the value of the function at x = 0 from at its value at x = 1 using Taylor Series. Find the minimum order of Taylor series that gives a true relative error єt < 1%. (Hint: the limit of the value of the function as x -> 0 is 1.)


2-    Consider the function Ln x


a-     Estimate the first derivative of the given function at x = 1 using the backward, forward and centered finite difference with h = 0.2.


b-    Repeat part (a) for the second derivative.


3-    The velocity distribution of a fluid near a flat surface is given by the following table, where v is the velocity and x is the distance from the surface:

















If α is the viscosity, the Newton’s law for the shear stress is given by

Use the forward finite difference to calculate the shear stress at the surface (x = 0). Assume that  α = 0.0011 N sec/m2.


4-    Use Mathematica to generate Taylor series for the function f= x-cos(x) with x0 = 0 and n=5. Use the series to approximate f(1) and calculate the percent relative errors.