Re: Manipulate (from Wolfram Demonstrations)

• To: mathgroup at smc.vnet.net
• Subject: [mg76822] Re: [mg76774] Manipulate (from Wolfram Demonstrations)
• From: Murray Eisenberg <murray at math.umass.edu>
• Date: Mon, 28 May 2007 00:56:34 -0400 (EDT)
• Organization: Mathematics & Statistics, Univ. of Mass./Amherst
• References: <200705270853.EAA03281@smc.vnet.net>

```The value of p is not really a function, but rather the expression
a x^3 + b x^2 + c x involving x.  And in the Epilog, the phrase "/. x ->
xi" applies to the part of the expression that includes Point[{xi,p}].
Thus the value of x in a x^3 + b x^2 + c x is replaced by xi.

Bruce Colletti wrote:
> Re Mathematica 6.0 under WinXP.
>
> The code below (from Wolfram Demonstrations site) plots a tangent at the point set by the slider.
>
> Point[{xi,p}] baffles me:  Point requires two numbers, but p is a function...I don't see how it evaluates to a number AT THIS location in the Manipulate statement.
>
> What is the mechanism that makes p evaluate to a number?  Is it somehow referring to Plot's {x,-2,2} ?
>
> Thankx.
>
> Bruce
>
> Manipulate[
>  With[{p = a x^3 + b x^2 + c x, dx = .8},
>   With[{pp = D[p, x]},
>    Plot[p, {x, -2, 2}, Ticks -> None, PlotRange -> All,
>     Epilog -> ({Orange, PointSize[.02], Point[{xi, p}],
>         Thickness[.005],
>         Line[{{xi - dx, p - dx pp}, {xi + dx, p + dx pp}}]} /.
>        x -> xi)]]], {{xi, 0, Subscript[x, 0]}, -2,
>   2}, Delimiter, {{a, -2, "a"}, -2, 2}, {{b, -2, "b"}, -2,
>   2}, {{c, -2, "c"}, -2, 2}, ControllerLinking -> True]
>

--
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305

```

• Prev by Date: Re: Quadratic form: symbolic transformation
• Next by Date: Re: Quadratic form: symbolic transformation
• Previous by thread: Manipulate (from Wolfram Demonstrations)
• Next by thread: Re: Manipulate (from Wolfram Demonstrations)