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

*To*: mathgroup at smc.vnet.net*Subject*: [mg89303] Re: Log(ln) Function + 2 Parameters + Greater*From*: dh <dh at metrohm.ch>*Date*: Thu, 5 Jun 2008 00:41:51 -0400 (EDT)*References*: <g22tp5$ikl$1@smc.vnet.net> <g237ef$q4d$1@smc.vnet.net> <g25ntl$hub$1@smc.vnet.net>

Hi Felippe, I am not sure if you want to Plot just one function with a specific a or several with different a. Let's try one single a: f[x_]:=x (a+Log[x])^2; a=1; If[a>0,Plot[f[x],{x,0,2}]] If we have several a's, we may try: f[a_,x_]:=x (a+Log[x])^2; Plot[Evaluate[Table[f[a,x],{a,0,2}]],{x,0,2}] the Evaluate is necessary to speed things up, otherwise the Table command is executed for every point. Of course this works with other formulas too. hope this helps, Daniel Felipe Mannshardt wrote: > dh wrote: >> Hi Felipe, >> >> why are you not simply using an If[] statement: >> >> If[a>0, Plot[...]] >> >> hope this helps, Daniel >> >> >> >> Felipe Mannshardt wrote: >> >>> Hello, >> >>> i am having problem telling Mathematica to: >> >>> First Try, >> >>> Clear[x, f] >>> f[x_] := x (a + Log[x])^2 >> >>> a > 0 >>> Plot[f[x], {x, -5, 5}] >> >>> Second Try, >> >>> f[x_] := x (a + Log[x])^2 >> >>> Plot[f[x], {x, -5, 5}] /.a-> a>0 >> >> >>> What i want is to tell Mathematica to draw a Graph of f[x] when a>0 >> >>> Thanks for the help. >> >> >> >> >> > > 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}]] > > 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 ? > > I have already drawn this function by hand, > and i have two types of function, > for a>0 and a<0 > > But i can not figure out how to draw it in Mathematica :( > > Sorry, that i ask so "noob/dumb" questions, but i have already tried > looking in the help and it did not help me further in this problem, so i > believe the best is asking, right ? > > > Thanks a Lot. > -- Daniel Huber Metrohm Ltd. Oberdorfstr. 68 CH-9100 Herisau Tel. +41 71 353 8585, Fax +41 71 353 8907 E-Mail:<mailto:dh at metrohm.com> Internet:<http://www.metrohm.com>