

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


MAT 305 FALL 2009
Due date: 1 Dec 2009
For each problem, devise properly-formatted pseducode as well as Python code. Submit your solutions as Sage worksheets, sharing with mat305_fa2009. Be sure that your name appears somewhere on the worksheet. Where appropriate, split the task into subtasks and write separate psuedocode and Python code for each subtasks. Each Python-coded function must include at least one comment indicating the purpose of the function.
ยด (^) b a f^ (x)^ dx^ using the Mid- point Rule: For the i-th rectangle on the interval
xiโ 1 , xi
, use the value f
mi
at the mid- point mi =
xiโ 1 + xi
/ 2, for the height of the rectangle. The function must accept as input a function f , the number of partitions N , and the endpoints of the interval a and b.
ยด (^) b a f^ (x)^ dx using the Midpoint Rule. This interactive function should accept values of f , a, and b in input boxes, and N on a slider from 1 to 10. It should plot f and the rectangles used to approximate the integral, then print the approximate area. The rectangles should appear in a different color with some translucence so as to see the plot of f , but you need not include a color selector. You can either print the approximate area below the graph, or (bonus!) display it as a text object inside the plot.
y = f (a) โ
f โฒ^ (a)
(x โ a).
In the exceptional case when f โฒ^ (a) = 0 (i.e., the tangent line is horizontal), the normal line is vertical and has equation x = a.
In analogy with the sequence of secant lines, write a function to plot a sequence of five normal lines Ni to the graph of f at points
a + hi , f
a + hi
, i = 1,... , 5, with h 1 > ยท ยท ยท > h 5 > 0 and h 5 small. Also plot the normal line N at (a, f (a)). By limiting the domains/ranges in the plot and show commands, choose suitable lengths for the normal lines Ni so that (i) they all intersect the normal line N , (ii) they start at the point
a + hi , f
a + hi
on the curve, and (iii) they are not so long as to make the graph of f too small. Plot the graph of f (on the given interval [c, b ]) and all six normal lines in the same picture and clearly label which normal line corresponds to which value of hi. 1
INDIVIDUAL ASSIGNMENT 3 2
(a) f (x) = (^14)
x^5 โ 2 x^3 โ 4 x^2 + x + 4
, with a = 0.3, c = โ1, b = 2.
(b) f (x) = x^2 eโx^ , with a = โ0.3, c = โ1, b = 2. (c) f (x) = sin (x) โ 12 cos 3x, with a = 1, c = 0.2, b = 2.