Re: Function Programming Problems
- To: mathgroup at smc.vnet.net
- Subject: [mg90897] Re: Function Programming Problems
- From: Helen Read <hpr at together.net>
- Date: Mon, 28 Jul 2008 07:54:33 -0400 (EDT)
- References: <200807240851.EAA18893@smc.vnet.net> <200807251012.GAA11970@smc.vnet.net> <g6h5go$h2h$1@smc.vnet.net>
- Reply-to: HPR <read at math.uvm.edu>
Murray Eisenberg wrote: > Two comments: > > The use of a function name instead of a functional expression works just > as nicely for a user-defined function as for a built-in function. For > example: > > f[x_] := x^3 Exp[-x] > LinearApproximation[f,0][x] > > Second, since the original poster is writing the LinearApproximation > function for use in a calculus class, presumably this comes well before > the notion of series expansion or Taylor polynomials are are ever > discussed. So it would be unfair to the students at this point to > "spoil" things by prematurely introducing Series. Let them deal with > the special case of best local linear approximation, probably very early > in Calculus I, and some time later with best local quadratic > approximation. Then they'll have something upon which to build the > generalization to best n-th degree polynomial local approximation. Then why not let them find the linear and quadratic approximations for themselves, instead of providing a function to do it? My students would do the following. f[x_] = x^2 Cos[x] a = \[Pi] p1[x_] = f[a] + f'[a] (x - a) p2[x_] = f[a] + f'[a] (x - a) + f''[a]/2 (x - a)^2 Plot[{f[x], p1[x]}, {x, 0, 2 \[Pi]}] Plot[{f[x], p2[x]}, {x, 0, 2 \[Pi]}] -- Helen Read University of Vermont
- References:
- Function Programming Problems
- From: davey79@gmail.com
- Re: Function Programming Problems
- From: Sseziwa Mukasa <mukasa@jeol.com>
- Function Programming Problems