2
$\begingroup$

I'm trying to find a way to manipulate a function and its derivative, but two variables of the function change. Is there a way to manipulate multiple graphs with the same set of parameters? Meaning, if I increase a variable for the function, the derivative will adjust to it?

$\endgroup$
  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 0) Browse the common pitfalls question 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$ – Dr. belisarius Mar 10 '16 at 4:33
  • $\begingroup$ Take a look at Manipulate. On demonstrations.wolfram.com you can find lots and lots of examples on what you can do with that. $\endgroup$ – Yves Klett Mar 10 '16 at 7:07
5
$\begingroup$

How about this...

f[n_, x_] := Sin[2 Pi n x];
g[n_, x_] := D[f[n, x], x]; 
Manipulate[Plot[{f[n , x], Evaluate[g[n, x]]}, {x, 1, 10}], {n, 0.5, 4}]
| improve this answer | |
$\endgroup$
  • $\begingroup$ This works very well. Thank you. I can't up-vote you because I don't have reputation. $\endgroup$ – Anon E. Muss Mar 10 '16 at 3:47
  • $\begingroup$ @AnonE.Muss. you can, however, accept the answer, To do so, click on the check mark that appears under down arrow to the left of this answer. $\endgroup$ – m_goldberg Mar 10 '16 at 3:52
  • $\begingroup$ sweet! there, I did it . $\endgroup$ – Anon E. Muss Mar 10 '16 at 3:53

Not the answer you're looking for? Browse other questions tagged or ask your own question.