Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #1618
| From | DrMajorBob <btreat1@austin.rr.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: How to plot derivative directly? |
| Date | 2011-04-12 09:55 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <io17ic$i7o$1@smc.vnet.net> (permalink) |
Plot[D[x^3 - 6 (x + 1)^2 + x - 7, x] // Evaluate, {x, -3, 8}]
or
Clear[f]
f[x_] = x^3 - 6 (x + 1)^2 + x - 7;
Plot[f'[x], {x, -3, 8}]
Bobby
On Mon, 11 Apr 2011 06:05:40 -0500, =A6er=FDch Jakub <Serych@panska.cz> wrote:
>
> Dear mathgroup,
>
> it seems to me, that response to my question shall be very simple,
> but I cannot find it. :-(
>
> I want to plot the derivative of the function. I would like to do it
> directly, something like:
>
> Plot[D[x^3 - 6 (x + 1)^2 + x - 7, x],{x,-3,8}]
>
> It returns: General::ivar: "-2.99978 is not a valid variable."
>
> I can understand that it is because local variable x from Plot command
> interferes with the x variable from the D[].
>
> Yes I can bypass the problem by:
> deriv = D[x^3 - 6 (x + 1)^2 + x - 7, x]
> Plot[deriv, {x, -3, 8}]
>
> which is fully functional, but as far as I know Mathematica, there must
> be some simple solution how to do it directly inside the Plot[].
>
> Thanks in advance for kick-off
>
> Jakub
>
--
DrMajorBob@yahoo.com
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: How to plot derivative directly? DrMajorBob <btreat1@austin.rr.com> - 2011-04-12 09:55 +0000
csiph-web