Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 329
# This is apparently a linked sage worksheet. So, copy/pasted what you want/need from here to YOUR OWN sage worksheet in cocalc. That way, we are not using the same worksheet at the same time. t = var('t') # declare y to be a function of t function('y',nargs=1)(t) f = y(t)*(t^2+1) show("f(t,y) = ",f) # Fp is the first derivative of f with respect to t fp = diff(f,t,1) eqns = [diff(y(t),t,1) == f] Fp = fp.substitute(eqns) show("1st derivative of f(t,y) wrt time = ", factor(Fp))
y(t)
f(t,y) = (t2+1)y(t)\displaystyle {\left(t^{2} + 1\right)} y\left(t\right)
1st derivative of f(t,y) wrt time = (t4+2t2+2t+1)y(t)\displaystyle {\left(t^{4} + 2 \, t^{2} + 2 \, t + 1\right)} y\left(t\right)
# Fpp is the second derivative of f with respect to t fpp = diff(Fp,t,1) Fpp = fpp.substitute(eqns) show("2nd derivative of f(t,y) wrt time = ",factor(Fpp))
2nd derivative of f(t,y) wrt time = (t6+3t4+6t3+3t2+6t+3)y(t)\displaystyle {\left(t^{6} + 3 \, t^{4} + 6 \, t^{3} + 3 \, t^{2} + 6 \, t + 3\right)} y\left(t\right)
# Fppp is the third derivative of f with respect to t fppp = diff(Fpp,t,1) Fppp = fppp.substitute(eqns) show("3rd derivative of f(t,y) = ", factor(Fppp))
3rd derivative of f(t,y) = (t8+4t6+12t5+6t4+24t3+24t2+12t+9)y(t)\displaystyle {\left(t^{8} + 4 \, t^{6} + 12 \, t^{5} + 6 \, t^{4} + 24 \, t^{3} + 24 \, t^{2} + 12 \, t + 9\right)} y\left(t\right)