Re: Log(ln) Function + 2 Parameters + Greater

*To*: mathgroup at smc.vnet.net*Subject*: [mg89318] Re: Log(ln) Function + 2 Parameters + Greater*From*: Bill Rowe <readnews at sbcglobal.net>*Date*: Thu, 5 Jun 2008 00:44:41 -0400 (EDT)

On 6/4/08 at 5:37 AM, vexie.infamous at googlemail.com (Felipe Mannshardt) wrote: >Thanks for all replies, worked for my last function, but the >suggestions you guys made so far did work with my last function, but >now i have a new one, and i am here just playing around and i am >unable to get it drawn :( >First to the first Function, i believe the best suggestion was the >use of "if", >But, i can not get it to work :/ >Clear[x, f, a] >f[a_][x_] := x (a + Log[x])^2 >If[a > 0, Plot[f[x], {x, 0, 2}]] Since a is not defined, Mathematica cannot determine whether a is greater than zero or not. Consequently, the If statement is returned unevaluated. >And all suggestions also did not work at all for my new Function, >f[a_][x_] := (x/E^(ax)); >Plot[Table[f[a, x], {a, 0, 2}], {x, 0, 3}] >What am i doing wrong ? Simply put you are not being consistent. If you define f using the form f[a_][x_] then you need to use this form when plotting. That is, f[a_][x_] := (x/E^(ax)); Plot[Table[f[a][x], {a, 0, 2}], {x, 0, 3}] should give you the plot you are expecting. Or you could get the same result with f[a_, x_] := (x/E^(ax)); Plot[Table[f[a, x], {a, 0, 2}], {x, 0, 3}] Notice, I use the same form for Plot as I used to define the function.