Question: diff transforms an one-argument function into a two-argument one

I have the following piece of code:

beta := 16250.25391;

tlow := 11.92817468;

y0 := t -> 1/4*4^(7/8)/(beta*(tlow - t))^(1/8);

r0 := 1;

r2 := 1.194444444;

r3 := -2.071877530;

dyr := t -> M*(-2*r0*diff(y0(t), t)/y0(t)^3 + 2*r2*y0(t)*diff(y0(t), t) + 4*r3*y0(t)^3*diff(y0(t), t));

plot(dyr(t))

Everything seems to work out fine until this point and I obtain a good plot. The problem occurs when I try calling the value of dyr at a specific point t. Here is an example:

dyr(5)
Error, (in dyr) invalid input: diff received 5, which is not valid for its 2nd argument

I understand there is something wrong with the diff part. I tried writing the following simple code and I have the same problem.

y := t -> t^2

z := t -> diff(y(t), t)

z(1);
Error, (in z) invalid input: diff received 1, which is not valid for its 2nd argument

I start with a function that has only one argument and it seems like introducing the diff requires that I use two arguments. y0 is a function of t solely and I would like dyr to have the same argument, so that I can call dyr(t) at any point t I want. Please take a look at this. Thanks in advance.

Please Wait...