I'm new to Mathematica and I'm trying to plot a interactive graph of a curve with a slider that shows the tangent to the curve in whichever point of the interval, my implementation is
curveC = {(-1 + t^3)/(1 + t^2), t/2 - 2 t^2};
intervalC = {-1, 1}
tangentC = D[curveC, t]
Manipulate[
Show[ParametricPlot[{curveC[t], {t, interval[[1]], interval[[2]]}},
PlotStyle -> {Blue, Thick}],
Graphics[{ {Thick, Darker @ Red, Arrow[{curveC[s], curveC[s] + tangentC[s]}]}
}]], {s, -1, 1}]
and I recieve the following error
Coordinate {(1 + $CellContext`t^2)^(-1) (-1 + $CellContext`t^3), Rational[1, 2] $CellContext`t - 2 $CellContext`t^2}[-1] should be a pair of numbers, or a Scaled or Offset form.
I don't know what that error means.
{curveC[t], {t, interval[[1]], interval[[2]]}}
; (2) replaceinterval
withintervalC
; (3) UsecurveC[t_] = ...
andtangentC[t_] = ...
when defining these functions; and -- just in case -- (4) useClearAll[curveC, tangentC]
at the start of your code block. $\endgroup$