Re: Re: Log(ln) Function + 2 Parameters + Greater
- To: mathgroup at smc.vnet.net
- Subject: [mg89309] Re: [mg89298] Re: Log(ln) Function + 2 Parameters + Greater
- From: Murray Eisenberg <murray at math.umass.edu>
- Date: Thu, 5 Jun 2008 00:43:00 -0400 (EDT)
- Organization: Mathematics & Statistics, Univ. of Mass./Amherst
- References: <g22tp5$ikl$1@smc.vnet.net> <g237c4$q2n$1@smc.vnet.net> <200806040937.FAA18315@smc.vnet.net>
- Reply-to: murray at math.umass.edu
f[a_,x_] is a function with two arguments, the first of which is being
regarded as a "parameter".
f[a_] is a function with one argument, whose value for a given "a" is a
function to which you can input a value of x. So the construct
f[a_][x_] captures more precisely the idea of a family of functions
parameterized by parameter "a".
Jerry wrote:
> Sir, I have never seen a function definition in the form you
> give:
> f[a_][x_] := x (a + Log[x])^2
>
> After a bit of playing with it, I don't see the difference
> between this and
>
> f[a_,x_] := x (a + Log[x])^2
>
> I really don't know how to search in help for this f[a_][x_]
> form. Can you tell me if there is any essential difference?
>
> Thank you.
>
>
> David Park wrote:
>> First, define your f function with a as a parameter.
>>
>> f[a_][x_] := x (a + Log[x])^2
>>
>> Mathematica can't make a plot unless it knows values for a. Of course, it
>> won't plot any results for x < 0 and I'm not certain if you actually meant x
>> > 0 rather than a > 0. In any case, you can use any real domain for a. Here
>> is a plot for a specific value of a.
>>
>> Plot[f[2][x], {x, -5, 5},
>> AxesLabel -> {x, f}]
>>
>> You can look at an extended a domain by using Plot3D.
>>
>> Plot3D[f[a][x], {a, -5, 5}, {x, 0, 5},
>> PlotRange -> All,
>> AxesLabel -> {a, x, f}]
>>
>> Another approach is to use a Manipulate statement with a controlled by a
>> slider.
>>
>> Manipulate[
>> Plot[f[a][x], {x, 0, 5},
>> PlotRange -> {0, 250},
>> AxesLabel -> {x, f}],
>> Style[Row[{HoldForm[f["a"][x]] == f["a"][x]}], 16],
>> Delimiter,
>> {a, -5, 5, Appearance -> "Labeled"}]
>>
>>
>>
>
--
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
- References:
- Re: Log(ln) Function + 2 Parameters + Greater
- From: Jerry <Jer75811@yahoo.com>
- Re: Log(ln) Function + 2 Parameters + Greater