MathGroup Archive 2012

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

Search the Archive

Manipulate help

  • To: mathgroup at
  • Subject: [mg128586] Manipulate help
  • From: "07.350z" <andyk2320 at>
  • Date: Wed, 7 Nov 2012 00:58:35 -0500 (EST)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:

Create a Manipulate demonstration that draws the tangent line to a curve at the point specified by a continuous control. For the curve, the user should be able to choose between the graphs of the following functions. Make sure your demonstration shows the curve, the point, and the tangent line at that point. The functions are 7cos(x),
x^2/10, 2ln(1+x^2)

  Plot[y, {x, -10, 10}, 
   PlotRange -> {-10, 10}], {y, {7 Cos[x], x^2/10, 2*Log[1 + x^2]}}],
 Do[Module[{slopeM, tangentLine, x},
   slopeM = D[{7 Cos[x], x^2/10, 2*Log[1 + x^2]}, x] /. x -> t;
   tangentLine = slopeM*x - t;
    Plot[{{7 Cos[x], x^2/10, 2*Log[1 + x^2]}, tangentLine}, {t, -5, 
      5}]]], {x, -10, 10}]]

I know the first part of code is right, but I'm having trouble adding the tangent line. Any help would be great thanks!

  • Prev by Date: Re: Export a graphical plot to pdf file
  • Next by Date: Re: Help with map /@
  • Previous by thread: Re: Export a graphical plot to pdf file
  • Next by thread: Re: Manipulate help