I'm trying to animate a function with parameters, and it seems animate cannot handle a function definition, only the function description. For example, this works:
Animate[Plot[4 x^2 + a x^3 + 5 x, {x, -5, 5}], {a, -1, 1}]
But this does not work:
p[z_] := 4 z^2 + a z^3 + 5 z;
Animate[Plot[p[x], {x, -5, 5}], {a, -1, 1}]
and just gives a blank plot with no graph. Is Animate unable to handle functions?