Message Boards Message Boards

3 Replies
0 Total Likes
View groups...
Share this post:

What is the difference between variable "t" and variable "y" ?

Posted 10 years ago

I am trying to define a function of variables "x" and "t" and take partial derivatives with respect to each. The function is as follows:


When defining the function using variable "t" the output becomes:


Then taking the partial derivative w.r.t "t" using D[f,t] returns 0 (zero).

Substituting variable "y" for "t" returns a different (correct in my eyes) result.

So my question is; What is the difference in the eyes of mathematica, to the variables "t" and "y" (or really any other variable that I could define)?

I've posted screenshots to show exactly what my inputs were. Thank you so much in helping me better understand this.

POSTED BY: Tyler Perkins
3 Replies

You can read up on some of the differences between = and := here:

POSTED BY: David Reiss
Posted 10 years ago

Thank you, I thought I had tried that before moving on to using variable "y". I guess I didn't though as D[f[x,t],t] works just fine. My mistake.

Why is using delayed evaluation advantageous over immediate evaluation?

POSTED BY: Tyler Perkins

Look at your two examples carefully. In the first case you computed


rather than


By the way, you should define your functions using delayed evaluation (:=) rather than immediate evaluation (=)

POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract