0
$\begingroup$

I have the following code

ExD = Sum[D[y[n, t], t], {n, 0, 1}];
ExS = Sum[y[n, t], {n, 0, 1}];
\[Sigma][0] = 1;
\[Sigma]'[0] = 1;
y[0, t_] = \[Sigma][0] + t \[Sigma]'[0]
ExD
ExS

Note that when executed, ExD is still general for D[y[0,t],t], while ExS prints y[0,t] as it was defined. I cannot seem to figure out why the first derivative with respect to the second variable of y[0,t] does not evaluate even though y[0,t] is clearly defined and prints properly. Do I need to use Evaluate[] here?

$\endgroup$
0
$\begingroup$

I just realized if I use := here instead of = for ExD it will evaluate the derivative every time D[y[0,t],t] is called. This solves my problem.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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