I want to define a function $f(x)$ as in

$\quad \quad f(x) = \sum^{n}_{i=0} c_i x^i$

as a symbolic expression. Then I'd like to do operations on it. For example, take derivatives of it with respect to any variable or collection of variables. Is there a concise way to do this, so that I get the results in symbolic form?

Again, for example, if I would like to get $ x^i$ from evaluating $ \frac{d f(x)}{dc_i}$.

  • $\begingroup$ Is $n$ a fixed number, or do you want to leave it symbolic? If $n$ is symbolic, then have you seen this? $\endgroup$
    – J. M.'s torpor
    Aug 7 '15 at 1:27
  • $\begingroup$ @Guesswhoitis. I wasn't really planning to take derivatives with respect n, so fixed would be ok, for a specific $f(x)$. I wish I knew more about mathematica to know how that matters/makes a difference. I am more concerned to take derivatives wrt to $c_i$ and $x^i$. $\endgroup$ Aug 7 '15 at 1:31
  • 1
    $\begingroup$ Then, it's easy to just do D[Sum[C[k] x^k, {k, 0, 5}], x]. $\endgroup$
    – J. M.'s torpor
    Aug 7 '15 at 1:50
  • 2
    $\begingroup$ @Guesswhoitis. Time to change your display name. How about: "You all know who it is"? $\endgroup$
    – m_goldberg
    Aug 7 '15 at 6:14
  • 1
    $\begingroup$ @m_goldberg so he is Miley? $\endgroup$
    – shrx
    Aug 7 '15 at 9:03

Browse other questions tagged or ask your own question.