MATH 163, Spring 2001 Due Date: Name(s): Extra Project 1.3c: Function Addition Objective To illustrate how new functions can be created from old ones by function addition. Narrative If you have not already done so, read Section 1.3 in the text. There are several ways in which new functions can be created from old ones. In this project we illustrate function addition. We also illustrate how to write procedures in Maple. Procedures are a basic construct in many programming languages; they are useful since they (like loops) allow us to perform repetitive tasks without duplicating code. Task a) Type the command lines below into Maple in the order in which they are listed. They use a procedure to produce two sets of points, one set on the graph of f(x) = x+2 and the other set on the graph of g(x) = x2 . > # Project 1.3c: Sum of Functions > restart: with(plots): > pointset := proc(f,a,b,N) local dx,mylist,i: dx := (b-a)/(N-1): mylist := [a,evalf(f(a))]: for i from 1 to N-1 do mylist := mylist,[a+i*dx,f(a+i*dx)]: od: RETURN([mylist]): > end: > plot0 := pointplot(pointset(x -> x+2,-1.5,1.5,11),color=red,symbol=circle): > plot1 := pointplot(pointset(x -> x^2,-1.5,1.5,11),color=green,symbol=circle): > display({plot0,plot1},scaling=constrained); At this time make a hard-copy of your typed input and Maple's responses. Then, ... b) Using a ruler and "ordinate addition", plot by hand the 11 points that lie on the graph of f(x) + g(x) = x2 + x + 2. c) Connect the dots that lie on the graph of f(x), those that lie on the graph of g(x), and those that lie on the graph of f(x) + g(x). Finally, label the graphs of f, g, and f + g by "y = f(x)", "y = g(x)", and "y = f(x) + g(x)".