0
$\begingroup$

One of my first times using mathematica, I'm getting a weird Subscript(1,0) output when I try to solve a derivative. What is going on and how can I fix this?

Subscript output

$\endgroup$
  • 2
    $\begingroup$ Try to avoid Subscript until you are more comfortable with Mathematica. For instance, try D[Subscript[c, t], c]. Just use cf,nf as variable names instead. $\endgroup$ – Marius Ladegård Meyer Mar 21 '15 at 17:54
2
$\begingroup$

The reason is, that the nicely formatted subscripts in the frontend looking like $c_f$ are no "real" variables, but are represented as Subscript[c,f]. You can see that, if you use FullForm on one of those subscript-lookalikes.

Therefore, your code does end up trying to create the derivative of the Mathematica-function Subscript, but of course there is no such thing. This is why you are left with that result.

Solution:

Exchange any subscript with a more straightforward representation, e.g. (as suggested by Marius): cf instead of Subscript[c,f] etc.

$\endgroup$
  • $\begingroup$ Or use the Notation package $\endgroup$ – Sjoerd C. de Vries Mar 21 '15 at 18:49

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