Manipulate help
- To: mathgroup at smc.vnet.net
- Subject: [mg128586] Manipulate help
- From: "07.350z" <andyk2320 at gmail.com>
- Date: Wed, 7 Nov 2012 00:58:35 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-newout@smc.vnet.net
- Delivered-to: mathgroup-newsend@smc.vnet.net
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) Show[Manipulate[ 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; Return[ 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!