marcelp82
(Marcel Pelletier)
July 9, 2016, 2:07am
1
Hi,
The code below don’t work!
f[x_] := x^2 + 2 x - 3
p = {{a, f[a]}}
Animate[ Plot[f[x], {x, -2, 4}, Epilog -> Point[p]], {a, -2, 4}]
But, If I replace the variable p with is evaluation, the code is OK.
Animate[Plot[f[x], {x, -2, 4}, Epilog -> Point[{{a, -3 + 2 a + a^2}}]], {a, -2, 4}]
I want to use the variable in my document. How can I do it?
Thank you.
Marcel Pelletier
f[x_] := x^2 + 2 x - 3
p[a_] := {{a, f[a]}}
Animate[Plot[f , {x, -2, 4}, Epilog → Point[p[a]]], {a, -2, 4}]
marcelp82
(Marcel Pelletier)
July 9, 2016, 1:18pm
3
Hi Valeriu.
Thank you for your help.
This will ameliorate my document.
Marcel Pelletier
vaungureanu
(Valeriu Ungureanu)
August 2, 2016, 2:35pm
5
f[x_] := 2 x^3 + 2 x - 3
p[a_] := {{a, f[a]}}
t[x_, a_] := f[a] + (x - a) f’[a]
Animate[Plot[f , {x, -2, 4}, PlotRange → {{-2, 4}, {-24, 128}},
Epilog → {PointSize[Medium], Point[p[a]], Red,
InfiniteLine[{p[a][[1]], {0, t[0, a]}}]}], {a, -2, 4},
AnimationDirection → ForwardBackward]
marcelp82
(Marcel Pelletier)
August 2, 2016, 3:10pm
6
Hi Valeriu,
Thank you for this new response!
I have create animations for my course.. Your help are welcome.
Marcel Pelletier
vaungureanu
(Valeriu Ungureanu)
August 2, 2016, 3:29pm
7
Hi, Marcel, I posted this new code for the tangent line as a suggestion for you to post other pieces of code that you are using in the course. They may be useful for others in the Wolfram Community and the Community may suggest new solutions and useful pieces of code. Sure, it’s your decision…