I need to differentiate a variable that is indirectly a function of t.
For example, consider y=3*z^2, where z is a not yet specified
function of t. I need to evaluate the derivative of y with respect to
t and then substitute an expression for z later. I will finally want
a numeric answer at a specific value of t. I have tried several
different variations that seem to lead to similar results:
(%i1) depends(z,t);
(%o1) [z(t)]
(%i2) y:3*z^2;
(%o2) 3*z^2
(%i3) ydot:diff(y,t);
(%o3) 6*z*('diff(z,t,1))
(%i4) ydot, z=0.4-0.08*t^2;
(%o4) 6*(0.4-0.08*t^2)*('diff((0.4-0.08*t^2),t,1))
(%i5) ratsimp(%);
`rat' replaced 0.4 by 2/5 = 0.4
`rat' replaced -0.08 by -2/25 = -0.08
`rat' replaced 0.4 by 2/5 = 0.4
`rat' replaced -0.08 by -2/25 = -0.08
(%o5) -((12*t^2-60)*('diff((-(2*t^2-10)/25),t,1)))/25
(%i6) radcan(%);
(%o6) -((12*t^2-60)*('diff((-(2*t^2-10)/25),t,1)))/25
The main problem is that Maxima keeps outputting an answer that
contains a derivative with repect to time which should be simple to
evaluate. But Maxima refuses to evaluate it and I don't know how to
make it. As I copy and paste from wxMaxima, I see the ' in front of
the diff that forces the non-evaluation. How would I make that go
away? Is there a better way to go about this? I want to be able to
use the intermediate results for different expressions for z(t), so
just making y and explicit function of t at the beginning isn't a very
satisfying solution.
I am attaching the wxMaxima script if anyone wants to look at it that way.
Thanks,
Ryan
-------------- next part --------------
/* [wxMaxima batch file version 1] [ DO NOT EDIT BY HAND! ]*/
/* [wxMaxima: input start ] */
depends(z,t);
/* [wxMaxima: input end ] */
/* [wxMaxima: input start ] */
y:3*z^2;
/* [wxMaxima: input end ] */
/* [wxMaxima: input start ] */
ydot:diff(y,t);
/* [wxMaxima: input end ] */
/* [wxMaxima: input start ] */
ydot, z=0.4-0.08*t^2;
/* [wxMaxima: input end ] */
/* [wxMaxima: input start ] */
ratsimp(%);
/* [wxMaxima: input end ] */
/* [wxMaxima: input start ] */
radcan(%);
/* [wxMaxima: input end ] */
/* [wxMaxima: input start ] */
ev(%);
/* [wxMaxima: input end ] */
/* Maxima can't load/batch files which end with a comment! */
"Created with wxMaxima"$