I want to be able to Dynamically Plot functions with parameters. One should be able to change the parameter and the function, while the function field should accept the parameter and the variable, which we set to x.
I know that one can plot any function... but when I try to include the parameter:
Panel[DynamicModule[{a = 2, f = Cos[a*x]}, Column[{InputField[Dynamic[a], ContinuousAction -> True],
InputField[Dynamic[f]], Dynamic[Plot[f, {x, -5, 5}]]}]]]
things do not seem to work as expected. When I change the parameter, the plot, nor the function field gets updated, but when I change the function, the plot updates. If use the parameter a in the input field of the function, the everything breaks.

Cos[2 x]in the secondInputFieldtoCos[234 x], you want the2in the firstInputFieldbe updated to234? If so, what's the expected behavior if you've inputted e.g.Cos[4 x^2+5 x^3]in the secondInputField? Please clarify, the question will be reopened once it meets the standard of the site. $\endgroup$