Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: problems plotting a derivative

  • To: mathgroup at smc.vnet.net
  • Subject: [mg54530] Re: [mg54479] problems plotting a derivative
  • From: DrBob <drbob at bigfoot.com>
  • Date: Tue, 22 Feb 2005 04:24:03 -0500 (EST)
  • References: <200502210844.DAA27207@smc.vnet.net>
  • Reply-to: drbob at bigfoot.com
  • Sender: owner-wri-mathgroup at wolfram.com

This works:

f[x_] := 2*x^3;
ParametricPlot[Evaluate[
     {D[f[x], x], x^2}], {x, 0, 1}];

and this works:

{D[f[x], x], x^2};
ParametricPlot[%, {x, 0, 1}];

Both methods require x being an undefined symbol (it can't have a value).

You may have tried this, which DOESN'T work:

ParametricPlot[{Evaluate@D[f[x], x], x^2}, {x, 0, 1}]

That doesn't work, because D[f[x],x] isn't the Held argument of ParametricPlot; the List that contains it is Held, so Evaluate (in that example) isn't reached until x has a value, and D complains that you're differentiating with respect to a constant.

Bobby

On Mon, 21 Feb 2005 03:44:47 -0500 (EST), J. K. Smith <rob at pi-overe.com> wrote:

> I've tried a lot of ways but nothing has worked so far.
> The following statements are my problem simplified:
>
> f[x_] := 2x^3;
> ParametricPlot[{D[f[x], x], x^2}, {x, 0, 1}]
>
> When I run this I get  error messages griping about numbers not being
> valid variables but it doesn't end up plotting anything. In this example
> I should see a straight line.
>
> I've tried using Evaluate[ D[f[x],x] ]  and lots of other schemes which
> seemed to work in the past but I can't get ParametricPlot to digest any
> of them.  Something about the result of that derivative doesn't yield
> something that can be plotted.  But I don't know what property it is.
>
> Would you kind Mathematica gurus please get me thru this one (too)?
>
> Thanks.
>
> remove the dash if emailing
>
>
>
>



-- 
DrBob at bigfoot.com
www.eclecticdreams.net


  • Prev by Date: Re: Printing numbers
  • Next by Date: Re: The two dices
  • Previous by thread: Re: problems plotting a derivative
  • Next by thread: Re: problems plotting a derivative