Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Function Programming Problems

  • To: mathgroup at smc.vnet.net
  • Subject: [mg90878] Re: [mg90809] Re: [mg90782] Function Programming Problems
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Sun, 27 Jul 2008 02:32:51 -0400 (EDT)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <200807240851.EAA18893@smc.vnet.net> <200807251012.GAA11970@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

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.

Sseziwa Mukasa wrote:
> On Jul 24, 2008, at 4:51 AM, davey79 at gmail.com wrote:
>>
>> ...I want to define a LinearApproximation command that preferably would
>> take two arguments and return the linear approximation.  Ideally,
>>
>> LinearApproximation[function_,a_] would have
>> LinearApproximation[Sin[x],0] give "x" as the output.
> 
> ...for BUILT IN functions [EMPH ADDED] of a single argument the expression
> 
> LinearApproximation[Sin, a, x]
> 
> is also allowed as shorthand.
> 
> Finally, Mathematica already has a function for series expansion  
> called Series which you may want to look at.

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: Manipulate with specified step size
  • Next by Date: Re: question about sorting lists
  • Previous by thread: Re: Function Programming Problems
  • Next by thread: Re: Function Programming Problems