MathGroup Archive 2008

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

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg89276] Re: Log(ln) Function + 2 Parameters + Greater
  • From: "David Park" <djmpark at comcast.net>
  • Date: Tue, 3 Jun 2008 06:44:35 -0400 (EDT)
  • References: <g22tp5$ikl$1@smc.vnet.net>

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"}]



-- 
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/


"Felipe Mannshardt" <vexie.infamous at googlemail.com> wrote in message 
news:g22tp5$ikl$1 at smc.vnet.net...
> 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.
> 



  • Prev by Date: Re: Command similar to flatten??
  • Next by Date: Re: How to introduce a Functional with the results with Solve command?
  • Previous by thread: Re: Log(ln) Function + 2 Parameters + Greater
  • Next by thread: Re: Log(ln) Function + 2 Parameters + Greater